Practical Control Loop Tuning Using A Matlab/Simulink Toolbox
Practical Control Loop Tuning Using A Matlab/Simulink Toolbox
Practical Control Loop Tuning Using A Matlab/Simulink Toolbox
Keywords: Computer aided control system design, control strategy. In all of the above scenarios, it is obviously
Modelling and simulation, Non–linear systems, System desirable if some kind of advice could be generated
identification and signal processing, Utilities automatically. This would be especially useful if the advice
would also embrace the modelling phase that inevitably
Abstract accompanies any design strategy. The software toolbox
described in this paper has been specifically designed to
This paper describes a suite of software which has been produce this kind of assistance.
developed at the University of Sunderland. The software
takes the form of a toolbox for the MATLAB and Simulink
environment. It assists in the many stages of designing a 2 The Software
feedback controller for a real process.
The authors have developed a comprehensive set of software
The software may be used for data collection, data pre– tools running under the MATLAB and Simulink platform to
processing, process modelling, controller design and finally assist in performing real–time modelling and control
controller evaluation. The software has been demonstrated on experiments. MATLAB and Simulink are closely related
a laboratory based process trainer and several controller computer packages which provide an environment that allows
architectures have been designed and evaluated. the integration of computation, visualisation, and
programming in an easy–to–use environment. Typical uses
The software presented here is thought to provide several include: mathematics and computation; algorithm
advantages over some of the commercial loop–tuning and development; modelling, simulation, and prototyping; data
controller design software. These are discussed within the analysis, exploration, and visualisation; scientific and
paper. engineering graphics; and application development, including
graphical user interface building.
1 Introduction The name MATLAB stands for matrix laboratory, since most
of the functionality of the software comes from matrix
It is well known that many complex processes are often manipulation. It has many uses therefore in mathematics,
satisfactorily controlled by means of simple three term (PID) engineering, and science. In this case the software has been
controllers. In fact, many industrial solutions are realised utilised for teaching process modelling and control systems
using only the P and I terms but it has been widely reported, design. The Simulink environment provides a drag–and–drop
that even after careful instruction, plant operators still have interface for building mathematical models of systems in the
difficulty installing and operating such systems. It is obvious conventional block diagram form.
that a feedback system is of little value if the tuning
parameters are poorly selected. For systems with long time The toolbox which has been developed contains numerous
constants (of the order of several minutes) the semi–empirical MATLAB functions and Simulink blocks to assist many of
methods favoured by some users can be both time consuming the tasks described above. There are many types of process
and tedious. input signals, process controller structures and interfaces for
typical laboratory process training equipment. The standard
Consequently, any help offered to the process operator to ease Simulink block libraries may also be included in any
this tedious task and at the same time produce consistent activities being performed.
closed–loop behaviour on the process is clearly very
desirable. In many process industries (e.g. the water industry) The typical activities of data collection, data pre–processing,
it is often found that the system dynamics display appreciable process modelling, controller design, implementation and
time delay. The use of PI(D) control in these situations is not evaluation can be performed very rapidly. The simple drag–
recommended. Instead, some form of dead–time and–drop interface allows for easy adjustment of the various
compensation is necessary. Whilst improved performance is parameters, the display of process variables, the storage of
achievable it is accomplished at the cost of a more complex data, etc.
Control 2004, University of Bath, UK, September 2004 ID-095
3 The Test System. test rig or an industrial process. Signal conditioning units
have been built to allow the sampling of voltages or currents.
The test system used to demonstrate the application of the Typical scales which are used include -10 to +10V, 0 to 10V,
toolbox was the process trainer as shown in Figure 1. This 4 to 20mA.
apparatus is known informally as the ‘hairdryer’ for obvious
reasons. The system consists of a fixed speed blower which To read or measure signals from a sensor (process output) via
propels a current of air through the plastic tube. The air flow the ADC we use the function:
rate may be modified by the use of a damper. The air is
warmed using a simple heating device consisting of a mesh of » y = changet(chan_no);
wires just inside the entrance to the tube. The heating effect is
controlled by the voltage supplied to the mesh. The air To write or send signals to an actuator (process input) via the
temperature may be measured at one of three locations along DAC we use the function:
the tube with a thermistor. Hence the test equipment forms a
simple single–input single–output system. » chanput(chan_no,sig_lev);
Ke − Ds
Figure 2: Example of a simple Simulink model used for the G (s ) = (1)
collection of data from a process in real–time. 1 + sT
The results are presented graphically on the screen as the test The function required to calculate the three parameters is
is being performed. A typical result is shown in Figure 3. This shown below:
is a data collected from the test rig using a sample time of
» [K,T,D] = fopdt(t,y,u);
0.1s. The collected data was plotted using the function:
Figure 4: Results of the model estimation using data collected Figure 6: Controller performance for the PI design.
from the process.
The additional inputs define which controller design method
to use (in this case Ziegler–Nichols has been used) and which
controller structure to use (1 = P, 2 = PI, and 3 = PID). The
controller is defined by the controller gain, Kc, the controller
integral action time, Ti, and the controller derivative time, Td.
The function call shown performs a Ziegler–Nichols
controller design, but several other design methods are
available.
The main problem faced with using this software is the final
implementation of more complex control strategies within
off–the–shelf controllers or PLCs. This is possible in some
devices that have specific configuration software. It may also
be possible to implement coded versions of the control
strategies in PLCs using the IEC1131 standard.