MODELLING AND CONTROL DESIGN OF

Transcription

MODELLING AND CONTROL DESIGN OF
MODELLING AND CONTROL DESIGN OF TEMPERATURE VENTILATION
RIG
NABIHAH BINTI HUSSIN
Submitted to the Faculty of Electrical Engineering
in partial fulfillment of the requirement for the degree of
Bachelor of Engineering (Electrical Control & Instrumentation)
Faculty of Electrical Engineering
Universiti Teknologi Malaysia
APRIL 2010
ii
I declarethat this thesisentitled" Modell@ and Control DesignOf Temperature
Ventilation-Rig"is the result of my own research
exceptascited in the references.The thesishasnot beenacceptedfor any degreeand
is not
submittedin candidatureof any otherdegree.
Name' NabihahBinti Hussin
DAtC:30 APRIL 2O1O
iii
Dedicated and thankful appreciation to my beloved parents, brothers,
sisters, friends and lecturers for their support, encouragement and
understandings
iv
ACKNOWLEDGEMENTS
First and foremost, praise is upon Allah S.W.T, the Almighty for giving me
the opportunity and strength to accomplish this project and also the thesis.
My gratitude goes to my supervisor, Assoc. Prof. Dr. Hj Mohd Fua’ad bin Hj
Rahmat for his precious assistance and guidance given throughout the progress of
this project. No words can replace my appreciation to him for advice and
cooperation.
My appreciation also goes to my beloved father, mother and siblings for
motivating and supporting me throughout this experience. Thanks for their
encouragement, love and emotional supports that they had given to me.
I would also like to thank our Process Lab Assistant and also the master’s
student for their co-operations, advice, guidance, knowledge and helps in this project.
Finally, I would like to express my heartfelt gratitude to my friends,
classmate and to all my professors and all also those whoever has helped me either
directly or indirectly in the completion of my final semester project and thesis.
v
ABSTRACT
This project is mainly concerned on modelling and control design
temperature ventilation rig using VVS-400 as an instrutek where the input is Pseudo
Random Binary Sequence (PRBS) and the output is temperature. PCI 1711 has been
use as the data acquisition card (DAQ) which is to interfaces between the signal and
a PC. Real-time Windows Target (RTWT) toolbox are use to design simulink block
diagram and then connect the PCI-1711(DAQ) for interfacing between computer and
VVS-400(plant). The PRBS input is generated in Matlab. PID controller has been
selected as the controller design using Ziegler Nichols tuning method. PID
controllers are designed using simulation by approximated model plant and also have
been implemented to a real VVS-400 Trainer. Results reveal that PID controller after
retuning found to be better than before retuning due to its time response and also the
time taken for output to steady state. VVS-400 has been successfully modeled by
ARX model structure using System Identification approach.
vi
ABSTRAK
Projek ini ditumpukan kepada reka bentuk model dan kawalan suhu dengan
memanipulasikan pengaliran udara VVS-400 dimana PRBS digunakan sebagai input
dan suhu sebagai output. PCI 1711 digunakan sebagai data perolehan (DAQ) dimana
ia menjadi penghubung diantara isyarat dan PC. RTWT digunakan untuk
merekabentuk
rajah
bongkah
dan
kemudian
PCI-1711
digunakan
untuk
menghubungkan antara komputer dan VVS-400. Kawalan PID telah dipilih sebagai
kawalan reka bentuk menggunakan penalaan Ziegler Nichols dimana VVS-400 telah
direka bentuk menggunakan ARX sebagai model struktur. Simulasi dilakukan
dengan dan tanpa menggunakan PID untuk melihat perbezaan antara kedua-dua
keluaran. Penggunaan PID adalah penting untuk memastikan hasil yang di perolehi
adalah Berjaya untuk VVS-400 dimodelkan menggunakan ARX model. Hasilnya
menunjukkan pengunnan kawalan PID selepas retuning adalah lebih bagus daripada
sebulumnya dan model ARX adalah Berjaya diimplementasikan.
vii
TABLES OF CONTENTS
CHAPTER
TITLE
DECLARATION OF THESIS
DEDICATION
ACKNOWLEDGEMENT
ABSTRACT
ABSTRAK
TABLE OF CONTENT
LIST OF FIGURES
LIST OF TABLES
LIST OF SYMBOLS
LIST OF ABBREVIATIONS
1
PAGE
ii
iii
iv
v
vi
vii
x
xii
xiii
xiv
INTRODUCTION
1.1
Background
1
1.2
Plant Description
4
1.3
Project Objectives
6
1.4
Scope of Work
6
1.5
Thesis Outline
7
viii
2
LITERATURE REVIEW
2.1
Introduction
8
2.2
Parametric Model Structure
9
4
9
2.2.2
ARMAX Model
10
2.2.3
Box Jenkins
11
2.2.4
Output-error Model
12
Case study of VVS-400
2.4
The Control of a Pilot Scale Heating and
12
Ventilation System
13
PCI 1711 Interface Card
16
METHODOLOGY
3.1
Introduction
20
3.2
Design an Experiment
23
3.3
Experimental Setup
25
3.4
Selection of Model Structure
26
3.5
Estimation and Validation
26
3.6
Controller Design
27
RESULT AND DISCUSSION
4.1
Introduction
30
4.2
Process Model Identification Experiment
30
4.3
Closed- Loop Simulation and Performance
4.4
5
ARX Model
2.3
2.5
3
2.2.1
Analysis
37
Online Implementation
41
CONCLUSION AND RECOMMENDATION
44
REFERENCES
46
ix
LIST OF FIGURES
FIGURE
1.1
TITLE
a. Block diagram representation of a system
PAGE
1
b. Block diagram representation of an interconnection
of subsystem
1.2
Feedback Control System Block Diagram
2
1.3
Instrutek VVS-400
4
1.4
Schematic diagram of the Instrutek VVS-400
4
2.1
Flow Process Characteristic Curve
14
2.2
Temperature Process Characteristic Curve
15
2.3
PCI 1711 Low-Cost Multi-Function Card
19
2.4
PRBS Generator Circuit
21
3.1
System Identification Procedure
22
3.2
Relationship between Temperature and Voltage
24
3.3
A block diagram of a PID controller
28
4.1
Experimental Setup
31
4.2
Data Collection
31
4.3
The input-output Signal
32
4.4
Measured and Simulated Model Output of ARX 661
33
4.5
Pole and zero plots
34
4.6
Autocorrelation of Residuals
36
4.7
Simulink Block Diagram (without PID Controller)
39
4.8
Input vs. Output Response (without PID Controller)
39
4.9
Simulink Block Diagram (with PID Controller)
40
x
4.10
Input vs. Output Response (with PID Controller)
40
4.11
Simulink Block Diagram for Online Implementation
41
4.12
Online Implementation before Retuning
42
5.3
Process Response for Online Implementation
43
xi
LIST OF TABLES
TABLE
TITLE
PAGE
1
All flow process models obtained
13
2
All temperature process models obtained
15
3
Input Voltage and Output Temperature
24
4
Ziegler–Nichols method
29
xii
LIST OF SYMBOLS
r(t)
-
Reference input
Kp
-
The controller path gains
Ti
-
The controller’s integrator time constant
Td
-
The controller’s derivative time constant
nu
-
Number of input channels
na
-
Number of poles
nb
-
Number of zeroes plus 1
nc
-
Number of C coefficients
nk
-
Time delay
°C
-
Celsius
V
-
Voltage
K
-
Constant
i
-
nth data
Tu
-
Oscillation period
Ku
-
Ultimate gain
Kd
-
Derivative gain
Ki
-
Integral gain
y(t)
-
Output at time t
q
-
Delay operator
MHz
-
Megahertz
xiii
LIST OF ABBREVIATIONS
HVAC
-
Heating, Ventilating, and Air Conditioning
RTD
-
Resistance Temperature Detectors
SSR
-
Solid State Relay
PI D
-
Proportional–Integral–Derivative
PI
-
Proportional–Integral
PC
-
Personal Computer
ITS-90
-
International Temperature Standard 90
SI
-
System Identification
PRBS
-
Pseudo-Random Binary Sequence
ARX
-
Autoregressive with exogenous
ARMAX
-
Autoregressive integrated moving average
BJ
-
Box-Jenkins
OE
-
Output-Error
MIMO
-
Multi-input multi-output
IAE
-
Integral of Absolute Error
NIC
-
Network Interface Card
LAN
-
Local Area Network
A/D
-
Analog/Digital
FIFO
-
First In First Out
RTWT
-
Real-time Windows Target
xiv
DAQ
-
Data Acquisition
MLS
-
Maximal Length Sequences
I/O
-
Input/output
FPE
-
Final Prediction Error
ROC
-
Region of Convergence
IEEE
-
Institute of Electrical and Electronics Engineers
PCI-1711
-
Interface Card
UTM
-
Universiti Teknologi Malaysia
FKE
-
Fakulti Kejuruteraan Elektrik
GUI
-
Graphical User Interface
CHAPTER 1
INTRODUCTION
1.1
Background
A control system is an interconnection of components forming a system
configuration that would provide a desired output in response to input signals.
Figure 1.1 shows the two types of control system open loop and closed loop.
Figure 1.1
a. Block diagram representation of a system;
b. Block diagram representation of an interconnection of subsystems
2
Figure 1.2 shows the basic elements of a feedback control system as
represented by a block diagram. The functional relationships between these elements
are easily seen.
An important factor to remember is that the block diagram
represents flow paths of control signals, but does not represent flow of energy
through the system or process.
Figure 1.2
Feedback Control System Block Diagram
The heating and ventilating system is a common process in our daily life
where certain desired temperature is being controller.
In industries such as
pharmaceutical, ability to control temperature is crucial to ensure the quality of the
product always within control.
Another example is HVAC that stands for the "Heating, Ventilating, and Air
Conditioning ". HVAC is particularly important in the design of medium to large
industrial and office buildings such as skyscrapers and in marine environments such
as aquariums, where safe and healthy building conditions are regulated with
temperature and humidity, as well as "fresh air" from outdoors. However, most of
heating and ventilation plants are complex with higher-order systems, which leads to
unsatisfactory performance.
3
The controller is one part of the entire control system, and the whole system
should be analyzed in selecting the proper controller. The following items should be
considered when selecting a controller:
1. Type of input sensor (thermocouple, RTD) and temperature range
2. Type of output required (electromechanical relay, SSR, analog output)
3. Control algorithm needed (on/off, proportional, PID)
4. Number and type of outputs (heat, cool, alarm, limit)
There are three basic types of controllers: on-off, proportional and PID.
Depending upon the system to be controlled, the operator will be able to use one type
or another to control the process.
The VVS-400 is selected as a model system for identification purpose. These
models have a three type of control which are temperature, flow and cascade control.
However only temperature process need to be considered in this project where it has
larger dead time and time constant.
1.2
Plant Description
An electric fan is located at one end of a non-insulated metal tube (painted
white). The fan blows air over a heating element. The air exits to the surroundings
at the other end of the tube. An orifice plate is situated just before the exit (see endelevation view, Figure 1.3). The differential pressure across the orifice is used to
determine the flow rate.
4
Figure 1.3
Figure 1.4
Instrutek VVS-400
a. Overview of Instrutek
b. End-elevation View
Schematic diagram of the Instrutek VVS-400
From the Figure 1.4 a load vane provides a method of restricting the airflow
at the tube exit. The power supply and other electrical components of the rig are
inside the housing. Two independent local controllers for the flow and temperature
processes, that have PID and auto-tuning functions, are provided. It is possible to
connect directly to the fan and the heating element, switching out the local
controllers, so that the processes may be P.C. controlled [2].
PID controller type provides proportional with integral and derivative control,
or PID.
This controller combines proportional control with two additional
5
adjustments, which helps the unit automatically compensate for changes in the
system.
These adjustments, integral and derivative, are expressed in time-based units;
they are also referred to by their reciprocals, RESET and RATE, respectively. The
proportional, integral and derivative terms must be individually adjusted or “tuned”
to a particular system using trial and error. It provides the most accurate and stable
control of the three controller types, and is best used in systems which have a
relatively small mass, those which react quickly to changes in the energy added to
the process.
It is recommended in systems where the load changes often and the controller
is expected to compensate automatically due to frequent changes in setpoint, the
amount of energy available, or the mass to be controlled.
A platinum resistance temperature sensor is positioned inside the tube where
the type is Pt-100 has a resistance of 100 ohms at 0 °C and 138.4 ohms at 100 °C [1]
. The relationship between temperature and resistance is approximately linear over a
small temperature range: for example, if you assume that it is linear over the 0 to 100
°C range, the error at 50 °C is 0.4 °C.
For precision measurement, it is necessary to linearise the resistance to give
an accurate temperature. The most recent definition of the relationship between
resistance and temperature is International Temperature Standard 90 (ITS-90). For a
Pt-100 sensor, a 1 °C temperature change will cause a 0.384 ohm change in
resistance, so even a small error in measurement of the resistance (for example, the
resistance of the wires leading to the sensor) can cause a large error in the
measurement of the temperature.
6
1.3
Project Objectives
Several objectives have been set out as the working focus points. The main
objectives of this project are:
1. To determine a mathematical model that describes the heating and ventilation
control system using system identification and estimation approach.
2. To design a suitable controller design for the process plant.
3. To test the stability at the system after controller installation.
1.4
Scope of Works
1. Study the characteristic of pilot scale heating and ventilation system(VVS400)
2. Perform an experiment and collect data(Data logger) – PRBS
3. Determine the appropriate model structure – ARX model
4. Choose the suitable method and estimated parameters
5. Validate the experimental model with the simulation model(Matlab)
6. Controller design
7
1.5
Thesis Outline
This thesis consists of five chapters. The first chapter gives an overview of
the project that gives the introduction of control system, VVS-400, temperature
controller and its possible application.
Chapter two will discuss more on theory and literature reviews that related to
this project. It will cover the general knowledge about system identification, PCI 1711,
parametric model structure and also about the plant VVS-400
Chapter three cover the flow of methodology and description of each
procedure including experiment setup and the data taken.
Chapter four mainly discuss about the result from simulation and also from
real implementation.
Chapter five includes the conclusion and recommendation of the thesis.
CHAPTER 2
LITERATURE REVIEW
2.1
Introduction
This chapter consists of parametric model, case study of VVS-400, the
control of a pilot scale heating and ventilation system and also PCI 1711 Interface
Card.
System Identification allows you to build mathematical models of a dynamic
system based on measured data. Essentially by adjusting parameters within a given
model until its output coincides as well as possible with the measured output. A
good test is to take a close look at the model’s output compared to the measured one
on a data set that wasn’t used for the fit.
The techniques apply to very general models. Most common models are
difference equations descriptions, such as ARX and ARMAX models, as well as all
types of linear state-space models. There are two categories of linear model which is
parametric and non parametric. The parametric will provides results in term of
parameter values in the model while nonparametric in a curve or table form.
Nonlinear models are difficult to obtain because of the high degree of complexity
presented by both the structure determination and the parameter estimation.
9
2.2
Parametric Model Structure
The model-based control design process involves modeling the plant to be
controlled, analyzing and synthesizing a controller for the plant, simulating the plant
and controller, and deploying the controller. A variety of model structures are
available to assist in modeling a system. The choice of model structure is based
upon an understanding of the system identification method and insight and
understanding into the system undergoing identification.
Even then it is often
beneficial to test a number of structures to determine the best one [8].
A general input-output linear model for a single-output system with input u and
output y can be written:
(2.1)
Here ui denotes input i, and A, Bi, C, D, and Fi, are polynomials in the shift
operator (z or q). The general structure is defined by giving the time-delays nk and
the orders of the polynomials.
2.2.1
ARX Model
The ARX estimate parameters of ARX or AR model using least squares.
ARX model is the simplest model incorporating the stimulus signal. The estimation
of the ARX model is the most efficient of the polynomial estimation methods
because it is the result of solving linear regression equations in analytic form [8].
Moreover, the solution is unique.
In other words, the solution always
satisfies the global minimum of the loss function. The ARX model therefore is
10
preferable, especially when the model order is high. ARX does not support multipleoutput continuous-time models.
The parameters of the ARX model structure:
(2.2)
The parameters na and nb are the orders of the ARX model, and nk is the delay.
y(t) : Output at time t
na :
Number of poles
nb :
Number of zeroes plus 1
nk :
Dead time
y(t-1)…y(t- na)
:
u(t- nk)… u(t- nk- nb+1) :
Previous outputs on which the current output depends
Previous and delayed inputs on which the current
output depends
e(t-1)…e(t- nc)
:
White-noise disturbance value.
A more compact way to write the difference equation is:
(2.3)
q is the delay operator
2.2.2
ARMAX Model
The ARMAX model structure is:
y(t) + a1y(t −1) +… +anay(t − na) =
b1u(t – nk) +…+bnbu(t – nk– nb + 1) + c1e(t −1) +…+ cnce(t – nc) + e(t)
(2.4)
11
A more compact way to write the difference equation is:
A(q)y(t) = B(q)u(t − nk) + C(q)e(t)
(2.5)
y(t) : Output at time t
na
:
Number of poles
nb
:
Number of zeroes plus 1
nc
: Number of C coefficients
nk :
Dead time
(t −1)…y(t − na)
: Previous outputs on which the current output depends
u(t − nk)…u(t – nk– nb + 1) : Previous and delayed inputs on which the current
output depend
e(t −1)… e(t – nc)
2.2.3
: White-noise disturbance value
Box Jenkins
Box-Jenkins (BJ) model is a combination of the AR and MA models.
The general Box-Jenkins model structure is:
(2.6)
Where nu is the number of input channels
The orders of Box-Jenkins model are defined as follows:
(2.7)
(2.8)
(2.9)
(2.10)
12
2.2.4
Output-error Model
The general Output-Error model structure is:
(2.11)
The orders of the Output-Error model are:
(2.12)
(2.13)
nb and nc are orders of the B and C polynomials, respectively. nk is the input delay.
2.3
Case study of VVS-400
A three dimensional diagram of the pilot scale heating and ventilation system
is shown in Figure 1.3. The system is represented in 2x2 multi-inputs, multi-output
(MIMO) form.
A process reaction curve identification technique was used to model (in
FOLPD form) the flow process and temperature process portions of the system, over
a range of operating conditions [2].
Tests revealed that both processes were
continuously non-linear.
This trainer has been conducted for temperature and flow process control [3].
Temperature process was continuously nonlinear and the maximum temperature is
limited by the maximum power output supplied to the heating element. Process
interaction temperature process dynamics depends on the operating condition of the
flow process.
13
PI and PID controllers were chosen to control the processes because of the
relatively low time delay to time constant ratio revealed by the identification tests
and also because of their wide use in industry and relatively simple implementation.
Suitable tuning rules were chosen for these controllers, based on minimizing
the integral of absolute error (IAE) performance criterion, for both servo and
regulator applications [4], [5].
2.4 The Control of a Pilot Scale Heating and Ventilation System
Process models were determined, from the open loop step response of both
the flow process and the temperature process, using the alternative tangent and point
method of Ziegler and Nichols [6], over a range of operating conditions.
Process models were determined, from the open loop step response of both
the flow process and the temperature process, using the alternative tangent and point
method of Ziegler and Nichols [6], over a range of operating conditions.
After some preliminary tests, three flow process models were specified
corresponding to low, medium, and high and flow settings is low is specified as fan
voltage setting < 55% of maximum, medium is specified as fan voltage setting in the
range 55% to 75% of maximum, with high being specified as fan voltage setting >
75% of maximum. Table 1 shows all of the flow process models obtained.
Table 1: All flow process models obtained
Model
14
Figure 2.1
Flow process characteristic curve
The resulting flow process curve Figure 2.1 shows that limits exist on its
maximum and minimum operating region which is at flows less than 15% of
maximum fan voltage setting (labelled as input flow in Figure 2.1), very little change
in measured flow (labelled as output flow in Figure 2.1) occurs for a change in input.
This is effectively a dead-band region of the flow. The figure also shows that
the slope of the characteristic curve is greater at high inputs, implying high process
model gain at high inputs (this is compatible with the results reported in Table 1).
15
Table 2:
Model (30% Flow)
All temperature process models obtained
Model (50% Flow)
Model (70% Flow)
The temperature process characteristics depend on the flow process. Table 2
shows the nine models of the temperature process were determined corresponding to
low, medium, and high heater settings, at three different flow rates for the
temperature process, low is specified as heater setting < 45% of maximum, medium
is specified as heater setting in the range 45% to 65% of maximum, with high
specified as heater setting > 65% of maximum.
16
Figure 2.2: Temperature process characteristic curve
The temperature process has an infinite number of characteristic curves, as
process behavior depends on the infinite number of possible flow rates.
Characteristic curves at three flow rates were determined as shown at Figure 2.2.
It is clear that the higher the flow rate, the lower the maximum temperature
achievable. This is sensible from an intuitive point of view as the cooling effect of
the airflow would be greater at high flow rates.
At high heater settings (labelled as input temperature in Figure 2.2), each
curve tended to level off or saturate, and the maximum temperature obtainable is
limited by the maximum power output of the element. Each curve has a lower limit
consistent with the ambient room temperature.
17
2.5
PCI 1711 Interface Card
A network interface card (NIC) is a computer circuit board or card that is
installed in a computer so that it can be connected to a network. Personal computers
and workstations on a local area network (LAN) typically contain a network
interface card specifically designed for the LAN transmission technology, such as
Ethernet or Token Ring.
Network interface cards provide a dedicated, full-time connection to a
network. Most home and portable computers connect to the Internet through asneeded dial-up connection.
Data acquisition is the process of sampling of real world physical conditions
and conversion of the resulting samples into digital numeric values that can be
manipulated by a computer.
Data acquisition and data acquisition systems
(abbreviated with the acronym DAS) typically involves the conversion of analog
waveforms into digital values for processing. The components of data acquisition
systems include:
Sensors that convert physical parameters to electrical signals.
Signal conditioning circuitry to convert sensor signals into a form that can
be converted to digital values.
Analog-to-digital converters, which convert conditioned sensor signals to
digital values.
Data acquisition applications are controlled by software programs developed
using various general purpose programming languages such as BASIC, C,
FORTRAN, Java, Lisp, and Pascal. COMEDI is an open source API (application
program Interface) used by applications to access and controls the data acquisition
hardware. Using COMEDI allows the same programs to run on different operating
systems, like Linux and Windows.
18
Specialized software tools used for building large scale data acquisition
systems include EPICS. Graphical programming environments include ladder logic,
Visual C++, Visual Basic, MATLAB and LabVIEW
DAQ hardware is what usually interfaces between the signal and a PC. It
could be in the form of modules that can be connected to the computer's ports
(parallel, serial, USB, etc…) or cards connected to slots (S-100 bus, AppleBus, ISA,
MCA, PCI, PCI-E, etc…) in the mother board. Usually the space on the back of a
PCI card is too small for all the connections needed, so an external breakout box is
required. The cable between this box and the PC can be expensive due to the many
wires, and the required shielding.
DAQ cards often contain multiple components (multiplexer, ADC, DAC,
TTL-IO, high speed timers, RAM).
These are accessible via a bus by a
microcontroller, which can run small programs. A controller is more flexible than a
hard wired logic, yet cheaper than a CPU so that it is alright to block it with simple
polling loops. For example: Waiting for a trigger, starting the looking up the time,
waiting for the ADC to finish, move value to RAM, switch multiplexer, get TTL
input, let DAC proceed with voltage ramp.
Many times reconfigurable logic is used to achieve high speed for specific
tasks and Digital signal processors are used after the data has been acquired to obtain
some results. The fixed connection with the PC allows for comfortable compilation
and debugging. Using an external housing a modular design with slots in a bus can
grow with the needs of the user.
Not all DAQ hardware has to run permanently connected to a PC, for
example intelligent stand-alone loggers and oscilloscopes, which can be operated
from a PC, yet they can operate completely independent of the PC.
The modem provides the connection interface to the Internet service provider.
For this project has been use PCI-1711 as an interface card. PCI-1711 is a multi-
19
function data acquisition card for the PCI bus.
This card provides multiple
measurement and control functions.
Figure 2.3
PCI-1711 Low-Cost Multi-Function Card
Figure 2.3 shows the Model PCI-1711 Low-Cost Multi-Function Card which
is offers 16 12-bit single ended channels of A/D input, 16 channels of digital inputs,
16 channels of digital outputs, two 12-bit channels of analog output, and one 16-bit
timer/counter with a time base of 10 MHz.
This card provides an on-board FIFO (First In First Out) memory buffer that
can store up to 1K A/D samples. The card provides a programmable counter for
generating a pacer trigger for the A/D conversion.
The counter chip is an 82C54 or equivalent, which includes three 16-bit
counters on a 10 MHz clock. One counter is used as an event counter for counting
events coming from the input channels. The other two are cascaded together to make
a 32-bit timer for a pacer trigger.
PCI-1711 series is also designed with the feature of automatic channel/ gain
scanning circuit. Users can set different ranges of analog input for each channel
according to their various applications.
20
With PCI-1711installed, the PC is able to access the data automatically
without further manual intervention. The system performance can reach a 100kS/s
high-speed sampling rate as well. PCI-1711series is designed especially for the
applications in transducer/sensor interfacing, industrial process control, laboratory
test and measurement, etc.
2.6
Pseudorandom binary sequence
A binary sequence (BS) is a sequence of N bits,
aj for j = 0,1,...,N − 1,
i.e. m ones and N − m zeros. A BS is pseudo-random (PRBS) if its autocorrelation
function:
(2.14)
has only two values:
Where
(2.15)
is called the duty cycle of the PRBS.
A PRBS is random in a sense that the value of an aj element is independent of
the values of any of the other elements, similar to real random sequences.
21
It is 'pseudo' because it is deterministic and after N elements it starts to repeat
itself, unlike real random sequences, such as sequences generated by radioactive
decay or by white noise.
The PRBS is more general than the n-sequence, which is a special pseudorandom binary sequence of n bits generated as the output of a linear shift register.
An n-sequence always has a 1/2 duty cycle and its number of elements N = 2k − 1.
PRBS's are used in telecommunication, encryption, simulation, correlation technique
and time-of-flight spectroscopy.
PRBS The pseudo random sequences codes are also known as Maximum
Length Sequence codes. Also; maximal length sequences [MLS] or m-sequences.
The Pseudo random number appears to be random, but not really random.
Figure 2.4
PRBS Generator Circuit
Pseudorandom Number Generator [PRNG], a circuit that generates pseudo random
numbers.
CHAPTER 3
METHODOLOGY
3.1
Introduction
This chapter will discuss about the procedures and the techniques used in this
project. Besides the experiment set-up and the major equipment are also described.
In this project Matlab have been use as the software to estimate and validation the
data. The flowchart of the system is shown in Figure 3.1. From the flowchart we
will discuss of each flow of it.
Figure 3.1
System Identification Procdure
23
3.2
Design an Experiment
Firstly, we need to design simulink block diagram with Real-time Windows
Target (RTWT) toolbox and then connect the PCI-1711(DAQ) for interfacing
between computer and VVS-400(plant). Generate PRBS input using idinput syntax
in Matlab. PRBS stand for Pseudo Random Binary Sequence.
Real-Time Windows Target software enables you to run Simulink and
Stateflow models in real time on your desktop or laptop PC for rapid prototyping or
hardware-in-the-loop simulation of control system and signal processing algorithms.
It can create and control a real-time executable entirely through Simulink
software. Using the Real-Time Workshop product, you generate C code, compile it,
and start real-time execution on your Windows-based PC while interfacing to real
hardware using PC I/O boards
The pseudo random sequences codes are also known as Maximum Length
Sequence codes. Also; maximal length sequences [MLS] or m-sequences. The
Pseudo random number appears to be random, but not really random. Often, PseudoRandom Binary Sequences (PRBS) input were chosen due to its large energy content
in a large frequency range.
24
Table 3 shows the relationship between input voltage and output temperature.
This relationship is important since the PCI 1711 only apply
Table 3:
Voltage (V)
Input Voltage and Output Temperature
Temperature (Celsius)
1.96
40
2.3
46
2.35
48
2.5
50
2.56
52
2.9
59
3.2
64
3.5
70
3.65
73
3.95
80
4.3
86
The relationship between voltage and temperature is obtained and is plotted
as shown in Figure 3.2. This is done by observing the output temperature with
different input voltage as shown in Table 3.
25
Figure 3.2
Relationships between Temperature and Voltage
From Figure 3.2, it can be noted that:
Temperature (°C) α K x Voltage (V)
(3.1)
K = constant = gradient = 19.81
Hence,
Temperature (°C) = 20 x Voltage (V)
Ti = 19.81Vi
(3.2)
Where i = nth data
Therefore, process output must be multiplied with constant 19.81, since the
output from the approximated plant and data acquisition (DAQ) card is in voltage.
Temperature process study of VVS-400 plant has been conducted in [3] which reveal
the temperature process is continuously nonlinear.
26
3.3
Experimental Setup
Initially, system model must be determined. The system modeling part is the
most challenging and important part in designing the control system of VVS-400 due
to its large time constant and slow process response [9].
In order to obtain a particular model for this system, the open loop
identification experiment has been done using parametric approach. In this
experiment, a system model is identified using data collected when the Pseudo
Random Binary Sequence (PRBS) is perturbed into the system.
3.4
Selection of Model Structure
Parametric approach Autoregressive with exogenous input (ARX) has been chosen
as model structure for VVS-400.
Orders: [na nb nk]
A(q)y(t) = B(q)u(t-nk)+e(t)
3.2
(3.3)
Estimation and Validation
From input output data, the data will divided into two part which is
estimation and validation data.
Estimation Data is the data set that is used to fit a model to data. In the GUI
this is the same as the Working Data. Validation Data is the data set that is used for
27
model validation purposes. This includes simulating the model for these data and
computing the residuals from the model when applied to these data [8].
The GUI is particularly suited for dealing with multivariable systems since it
will do useful bookkeeping for you, handling different channels. The step of this
agenda is:
Import data and create a data set with all input and output channels of
interest. Do the necessary preprocessing of this set in terms of detrending,
prefiltering, etc., and then select a Validation Data set with all channels.
Then select a Working Data set with all channels, and estimate state-space
models of different orders. Examine the resulting model primarily using the
Model Output view.
If it is difficult to get a good fit in all output channels or we would like to
investigate how important the different input channels are, construct new data
sets using subsets of the original input/output channels. Use the pop-up menu
Preprocess > Select Channels for this. Don’t change the Validation Data. The
GUI will keep track of the input and output channel numbers. It will “do the
right thing” when evaluating the channel-restricted models using the
Validation Data. It might also be appropriate to see if improvements in the fit
are obtained for various model types, built for one output at a time.
Model Validation is the process of gaining confidence in a model.
Essentially this is achieved by “twisting and turning” the model to scrutinize all
aspects of it. Of particular importance is the model’s ability to reproduce the
behavior of the Validation Data sets. Thus it is important to inspect the properties of
the residuals from the model when applied to the Validation Data [8].
28
3.6
Controller Design
The PID controller type provides proportional with integral and derivative
control, or PID. This controller combines proportional control with two additional
adjustments, which helps the unit automatically compensate for changes in the
system.
These adjustments, integral and derivative, are expressed in time-based units;
they are also referred to by their reciprocals, RESET and RATE, respectively. The
proportional, integral and derivative terms must be individually adjusted or “tuned”
to a particular system using trial and error.
It provides the most accurate and stable control of the three controller types,
and is best used in systems which have a relatively small mass, those which react
quickly to changes in the energy added to the process. It is recommended in systems
where the load changes often and the controller is expected to compensate
automatically due to frequent changes in setpoint, the amount of energy available, or
the mass to be controlled.
Proportional integral derivative (PID) control is the most commonly used
control algorithm in the industry today. PID controller popularity can be attributed
to the controller’s effectiveness in a wide range of operation conditions, its functional
simplicity, and the ease with which engineers can implement it using current
computer technology.
From Figure 3.3 it shows the block diagram of a PID Controller based on this
approximated plant model. PID controller will be designed to perform the closed
loop system simulation. PID Controller was design using Ziegler Nichols tuning
method.
29
Figure 3.3
A block diagram of a PID controller
The Ziegler–Nichols tuning method is a heuristic method of tuning a PID
controller. It was developed by John G. Ziegler and Nathaniel B. Nichols. It is
performed by setting the I and D gains to zero. The "P" gain is then increased (from
zero) until it reaches the ultimate gain Ku, at which the output of the control loop
oscillates with a constant amplitude. Ku and the oscillation period Tu are used to set
the P, I, and D gains depending on the type of controller used.
Table 4:
Ziegler–Nichols method
Ziegler–Nichols method
Control Type
Kp
Ki
Kd
P
0.5Ku
-
-
PI
0.45Ku
1.2 Kp/Tu
-
PID
0.6Ku
2 Kp/Tu
KpTu/8
From Table 4 it shows the three PID gain parameters which is tune by the
Zeigler Nichols Method:
1. Kp - the controller path gain
2. Ti - the controller's integrator time constant
3. Td - the controller's derivative time constant
CHAPTER 4
RESULT AND DISCUSSION
4.1
Introduction
Some experiments had been conducted for the project. First and foremost, an
experiment is conducted to find out the input output data. The data will be analyzing
using Matlab. After that, the simulation for PID controller was design using Matlab.
Last but not least, an analysis on real process implementation of the system is made.
4.2
Process Model Identification Experiment
Initially, system model must be determined before control technique is
applied. The system modeling part is the most challenging and vital part in designing
the control system of VVS-400 due to its large time constant and slow process
response [8]. In order to obtain a particular model for this system, the open loop
identification experiment has been done using parametric approach.
31
Figure 4.1 shows the experimental setup to this project.
This setup is
important to get the input output data and also to implement the real process. Since
the temperatures have large dead time and slow process response this experiment
will need longer time to finish it.
PRBS input from PC
PRBS input from
VVS- 400 plant
I/O Board
Figure 4.1
Experimental Setup
Figure 4.2
Data Collection
In this experiment, a system model is identified using data collected when the
Pseudo Random Binary Sequence (PRBS) is perturbed into the system as can be seen
in Figure 4.2.
32
The PRBS input is generated in Matlab.
The collection of data was
performed by PCI-1711 interface card. The input-output data is then be analyzed by
System Identification toolbox in Matlab [7].
Figure 4.3
The input-output Signal
From Figure 4.3, there are 5000 samples of data with 1 seconds sampling
interval. From the set of input-output data and it was divided into two parts. The
first part is the estimation data and the second is validation data.
In this project, the VVS-400 system is modelled based on Autoregressive
with exogenous input (ARX) model structure.
Its polynomial structure can be written as:
(4.1)
(4.2)
− 0.002242q −1 + 0.001465q −2 + 0.0006469q −3 + 0.0004487q −4 − 0.0006620q −5 + 0.0013q −6
(4.3)
33
Measured
Estimated
Figure 4.4
Measured and Simulated Model Output of ARX 661
The best fit of output model is 78.12% as depicted in Figure 4.4.
Then, Loss function = 0.00000122201
Akaike’s Final Prediction Error (FPE) = 0.0000012338.
Therefore, the pilot scale heating and ventilation VVS-400 plant can be
approximated modeled by this following equation:
B(q) − 0.002242q −1 + 0.001465q −2 + 0.0006469q −3 + 0.0004487q −4 − 0.0006620q −5 + 0.0013q −6
=
A(q)
1 − 0.7754q −1 − 0.3189q −2 + 0.007183q −3 + 0.06149q −4 + 9.677 ×10−005 q −5 + 0.02707q −6
(4.4)
34
Hence, based on this approximated plant model, conventional PID controller
will be designed to perform the closed loop system simulation. The approximated
plant gives a higher order model where an excess model order is usually represent
the noise. Since the ARX model incorporate with noise in the system model, the
model might be influenced by this noise [10].
F
igure 4.5
Pole and zero plots
Figure 4.5 shows the pole-zero plot of the ARX 661 model since all poles
inside the circle it will called it as non minimum phase model. In mathematics,
signal processing and control theory, a pole–zero plots is a graphical representation
of a rational transfer function in the complex plane which helps to convey certain
properties of the system such as:
Stability
Causal system / anticausal system
Region of convergence (ROC)
Minimum phase / non minimum phase
35
There is one zero outside the circle of the z-domain. It makes the system
become non minimum phase model. In mathematics and signal processing, the Ztransform converts a discrete time-domain signal, which is a sequence of real or
complex numbers, into a complex frequency-domain representation.
It can be
considered as a discrete equivalent of the Laplace transform. This similarity is
explored in the theory of time scale calculus.
The Zed-transform was introduced, under this name, by Ragazzini and Zadeh
in 1952. The modified or advanced Z-transform was later developed by E. I. Jury,
and presented in his book Sampled-Data Control Systems (John Wiley & Sons
1958). The idea contained within the Z-transform was previously known as the
"generating function method".
In control theory and signal processing, a linear, time-invariant system is said
to be minimum-phase if the system and its inverse are causal and stable. For
example, a discrete-time system with rational transfer function H(z) can only satisfy
causality and stability requirements if all of its poles are inside the unit circle.
However, we are free to choose whether the zeros of the system are inside or outside
the unit circle [8].
Systems that are causal and stable whose inverses are causal and unstable are
known as non-minimum-phase systems. A given non-minimum phase system will
have a greater phase contribution than the minimum-phase system with the
equivalent magnitude response. For a non-minimum phase process the converse is
true, a non-minimum phase pole will tend to cause a +90º phase shift, and a nonminimum phase zero will tend to cause a -90º phase shift. Since the system is
assumed to be stable, all the poles will have negative real parts [8].
36
Figure 4.6
Autocorrelation of Residuals
Figure 4.6 shows the autocorrelatio, that it’s a good model since the residual
autocorrelation is inside the interval. Residuals are differences between the one-steppredicted output from the model and the measured output from the validation data
set. Thus, residuals represent the portion of the validation data not explained by the
model. Residual analysis consists of two tests which is the whiteness test and the
independence test.
According to the whiteness test criteria, a good model has the residual
autocorrelation function inside the confidence interval of the corresponding
estimates, indicating that the residuals are uncorrelated.
According to the independence test criteria, a good model has residuals
uncorrelated with past inputs. Evidence of correlation indicates that the model does
not describe how part of the output relates to the corresponding input.
The horizontal scale is the number of lags, which is the time difference (in
samples) between the signals at which the correlation is estimated. The horizontal
37
dashed lines on the plot represent the confidence interval of the corresponding
estimates. Any fluctuations within the confidence interval are considered to be
insignificant [8].
It can be conclude that a good model should have a residual autocorrelation
function within the confidence interval, indicating that the residuals are uncorrelated.
The plots for these models fall within the confidence intervals. Thus, when choosing
the best model among several estimated models, it is reasonable to pick ARX 661.
4.3
Closed- Loop Simulation and Performance Analysis
The simulation is important before the real process implementation done. In
this simulation only close loop controller is consider to make sure that the system
meet the stability. Besides that, PID controller will be used to verify the propose
controller design. Step input have been applied in simulation as a reference input
with a set point of 57.
PID control is commonly used in the following industries such as Chemical,
Petrochemical, Pulp & Paper, Oil & Gas, Food & Beverage, and Municipal
Water/Sewerage Facilities. PID controllers are used to control process variables
ranging from fluid flow, level, pressure, temperature, pH, consistency, density and
position. In this project PID controller have been tune using Zeigler Nichols method
and it design from three PID gain parameters.
Tuning PID:
1. Proportional gain, Kp
Larger values typically mean faster response since the larger the error, the
larger the proportional term compensation. An excessively large proportional
gain will lead to process instability and oscillation.
38
2. Integral gain, Ki
Larger values imply steady state errors are eliminated more quickly. The
trade-off is larger overshoot: any negative error integrated during transient
response must be integrated away by positive error before reaching steady
state.
3. Derivative gain, Kd
Larger values decrease overshoot, but slow down transient response and may
lead to instability due to signal noise amplification in the differentiation of
the error.
Defining u(t) as the controller output, the final form of the PID algorithm is:
(4.5)
Tuning a control loop is the adjustment of its control parameters
(gain/proportional band, integral gain/reset, derivative gain/rate) to the optimum
values for the desired control response. Stability (bounded oscillation) is a basic
requirement, but beyond that, different systems have different behaviour, different
applications have different requirements, and some desiderata conflict.
Further, some processes have a degree of non-linearity and so parameters that
work well at full-load conditions don't work when the process is starting up from noload; this can be corrected by gain scheduling (using different parameters in different
operating regions). PID controllers often provide acceptable control even in the
absence of tuning, but performance can generally be improved by careful tuning, and
performance may be unacceptable with poor tuning.
39
Figure 4.7
Simulink Block Diagram (without PID Controller)
Figure 4.8
Input vs. Output Response (without PID Controller)
Figure 4.7 and 4.8 showed the Simulink block diagram without PID
controller and the process output, respectively. Step input is applied to the system as
a reference input. Step input applied with the desired temperature 57°C and the
output response 35°C. ARX 661 is chosen as our model and the result from the scope
is shown at figure 4.8.
40
Figure 4.9
Simulink Block Diagram (with PID Controller)
Figure 4.10
Input vs. Output Response (with PID Controller)
Figures 4.9 and 4.10 showed the Simulink block diagram with PID controller
and the process output, respectively. Before plot the graph the value of Ku and Tu
must be determine. The value of Ku is 7.41 and Tu 29 and then used a new Ku and Tu
to set the P, I, and D gains. From Figure 4.1, the process output shows high
overshoot with settling time is 24 seconds corresponding to step input reference.
While the overshoot is 11.46% and peak time 16 second. It can be seen that the
response of this proposed controller is satisfactory.
PID tuning is a difficult problem, even though there are only three parameters
and in principal is simple to describe, because it must satisfy complex criteria within
the limitations of PID control.
41
4.4
Online Implementation
The PID controller has been successfully design via simulation. The
simulation only is not enough to ensure that all the design controllers are exactly
capable to control the VVS-400 system model. So, the online implementation is
important to discover whether the controller is good or not.
Figure 4.11
Simulink Block Diagram for Online Implementation
Figure 4.11 shows the simulink block diagram for online implementation and
this real system implementation is done using Real Time Windows Target (RTWT)
toolbox in Matlab [8].
Two blocks called Analog Output and Analog Input from RTWT connect the
Simulink Matlab to the VVS-400 plant using data acquisition (DAQ) card PCI1711[11]. The controller will respond to the online process with 1 seconds sampling
interval.
42
The output of the controller will be fed into the Analog Output and the
process output is generated from the Analog Input. Since only voltage is applicable
in this RTWT toolbox, the output from the Analog Output need to be converted into
temperature by multiply with constant, 19.81 as given in the previous section.
However, to satisfy the output, tuning parameter requires a little adjustment since the
simulation tuning parameter is designed based on the approximated plant.
Figure 4.12
Online Implementation before Retuning
Figure 4.13 shows the result for the online implementation and it seem that
the output is still oscillate until the end of the experiment. As the conclusion retuning is needed to overcome this problem. From the graph, a new Ku and the
oscillation period Tu can be determined and then used a new Ku and Tu to set the P, I,
and D gains. The new value of Ku is 7.18 Tu is 102.
43
Figure 4.13
Process Response for Online Implementation after Re-tuning
It has a contrast between real implantation with simulation, the overshoot for
online is been reduce to 4.13 but the time taken for settling time is too high 189 sec
while the rise time 158 sec.
Re-tuning is needed during controller’s implementation with a real VVS-400
plant. Most of heating and ventilation plants are complex with higher-order systems
and required longer time to achieve satisfactory output performance. Therefore, in
certain cases where there is deficient of experience with the processes, it is
sometimes quite impossible to achieve a satisfactory performance.
CHAPTER 5
CONCLUSION AND RECOMMENDATION
Recent developments in science and technology provide a wide range scope
of applications of temperature controller. Proportional integral derivative (PID)
control is the most commonly used control algorithm in the industry today. PID
controller popularity can be attributed to the controller’s effectiveness in a wide
range of operation conditions, its functional simplicity, and the ease with which
engineers can implement it using current computer technology.
PID controller tuning rules can be directly implemented in a variety of
applications. In this project the heating and ventilation temperature rig has been
successfully modeled by ARX model structure using System Identification approach.
The PID controller has been chosen as the controller design using Ziegler
Nichols tuning method. PID controller designed using simulation by approximated
model plant and also has been implemented to a real VVS-400 plant. PCI 1711 has
been use as data acquisition card (DAQ) which is to interfaces between the signal
and a PC.
From this project, it can be clearly seen that the simulation and implemented
to a real VVS-400 plant has a contrast between it. It showed that the real
implantation will give higher settling time, rise time and also peak time compare to
simulation.
45
In real world application the plant exactly has a noise and it required longer
time to achieve satisfactory output performance because of large dead time and slow
process response.
Although the controller can function as we expected, we can use other than
PID controller to implement with another controller such as Fuzzy controller, Robust
Controller and neural Network Controller. Besides that, we can model the system
with other structure such as ARMAX, Box-Jenkins and OE to compare with ARX
model.
REFERENCES
[1]
Manual, "VVS-400 ", Instrutek A/S, Larvik, Norway
[2]
Aidan O’Dwyer.(2006), " Enhancing Waste Management through Automatic
Control", Dublin Institute of Technology.
[3]
O’Dwyer, A(2006). “A Case Study in Modelling and Process Control: The
Control of a Pilot Scale Heating and Ventilation System”. Proceeding of the
23rd International Manufacturing,IMC.
[4]
O’Dwyer, A (2003). Handbook of PI and PID controller tuning rules, 1st
Ed.,Imperial College Press.
[5]
O’Dwyer, A (2006). Handbook of PI and PID controller tuning rules, 2nd
Ed., To be published by Imperial College Press.
[6]
J.G. Ziegler and N.B. Nichols, Process lags in automatic control circuits,
Trans. ASME, (July 1943), 433-444.
[7]
Ljung, L. (2007). "System Identification Toolbox 7 Reference Manual."
[8]
Mathworks (1999). "Real-Time Windows Target User's Guide.“
[9]
M. H. Fazalul Rahiman MIEEE, M. N. T. M. a. Y. M. S. (2006). "Black Box
Modeling Of Steam Temperature." 4th Student Conference on Research and
Development (SCOReD 2006), Shah Alam, Selangor, MALAYSIA.
[10]
Mohd Hezri Fazalul Rahiman, M., Mohd Nasir Taib, and Yusof Md Salleh
"ARX, ARMAX And NNARX Modeling For Essential Oil Extraction
System." Universiti Teknologi MARA, Shah Alam, Malaysia.
[11]
Lennart Anderson, U. J., Karl Henrik Johansson, and Johan Bengtsson "A
manual for system identification.“
[12]
R. Mooney, The estimation and control of a laboratory heating and
ventilation process, ME dissertation, Dublin Institute of Technology (2003).
[13]
K.J. Åström and T. Hägglund, PID Controllers: Theory, Design and Tuning,
Second Edition, Instrument Society of America (1995).
47
[14]
Kashif (2009). "Intelligent Control of Diving System of an Underwater
Vehicle." Master's Thesis of Engineering (Electrical – Mechatronics &
Automatic Control), Universiti Teknologi Malaysia.
[15]
J.G.
Ziegler
and
N.B.
Nichols,
Optimum
settings
for
automatic
controllers,Trans. ASME, (November 1942), 759-768.
[16]
Barenthin, M. (2006). "On Input Design in System Identi_cation for Control."
KTH School of Electrical Engineering,Stockholm, Sweden.
[17]
R. Mooney, The estimation and control of a laboratory heating and
ventilation process, ME dissertation, Dublin Institute of Technology (2003).
[18]
A.B. Rad, W.L. Lo and K.M. Tsang, Simultaneous online identification of
rational dynamics and time delay: a correlation-based approach, IEEE Trans.
Control Syst. Tech.,Vol. 11 (2003), 957-959.
[19]
C.C. Chan, A.B. Rad and Y.K. Wong, Comparison of GPC controller and a
PID auto-tuner for a heating plant, Int. J. Elect. Enging. Educ., Vol. 34
(1997), 316-325.
[20]
D.E. Seborg, T.F. Edgar and D.A. Mellichamp, Process Dynamics and
Control, Wiley,(1989).