Control Design Tool for Algebraic Digital Controllers Authors: Javier López, Ramón P. Ñeco, Óscar Reinoso, José M. Azorín, José M. Sabater, Nicolás M. García Departamento de Ingeniería de Sistemas Industriales, Universidad Miguel Hernández, Elche, Alicante, Spain,
[email protected]
Abstract. — In this paper we present a new control design tool for algebraic methods to obtain digital controllers. These controllers are very useful to obtain an exact response (zero errors) in the close loop control system. But for students the algebraic methods are difficult and tedious because they involve the resolution of large linear systems. This is the main motivation for the tool presented in this paper. The tool is a graphical toolbox for Matlab and it is able to show the detailed solution of the controller design using symbolic notation, very similar to the resolution of problems in practical laboratories. The tool includes a visual environment and has been very useful in the learning process for engineering undergraduate students. Four types of digital controllers have been considered: poles placement, cancellation, minimum time, and finite time controllers. The specifications in the complex plane are the starting point of the design and the toolbox can obtain the final controller in two different ways: didactic mode (with symbolic details) and direct mode (obtaining the controller without design details).
Index Terms Control design tools, control and signal processing education, digital controllers, systems engineering. INTRODUCTION In this paper we present the development of a toolbox in Matlab that supports the design of digital controllers using algebraic methods or “direct synthesis” methods. In particular, the toolbox considers four classes of controllers: poles placement, cancellation, minimum time and finite time controllers. Contrary to the digital controllers design methods based on analytic analisys that give approximate solutions, the synthesis methods provide controllers that make the total transfer function equal to a pre-specified transfer function M(z), or have some concrete properties specified by the designer. These methods lead to transfer functions very complex, being difficult their application to continuous controllers. For this reason the didactic tool described in this article concerns only with the design of digital controllers. The design of the controllers using the algebraic synthesis methods implies the resolution of linear systems of equations, as well as the verification of certain properties such as the condition of the controller's physical realization, their simplicity, the stability of the close loop system and the consideration of possible saturations that take place in the control signals. This way, the final result of the work described in this paper has been a graphic tool that computes the whole design process in an automatic way, starting from the specifications and obtaining the final controller. With this graphic tool an student can develop the algebraic design of a digital controller in a quick and simple way, as well as the verification of its correct operation using the simulation block of the tool. The design of digital controllers using algebraic methods is one of the contents taken by the Engineering students of the Miguel Hernández University in the subject “Automata and control systems” in the third year (fifth and sixth semesters). The different types of algebraic design methods of digital controllers involve a very procedural computation, although these methods are also very tedious because they require the resolution of a polinomial equation. Since the computation process is very methodical, we thought that the creation of a graphical tool which allows the automatic design of the controller should be very useful for the students. The developed tool can be executed in two modes: • Direct mode. In this mode, given the design specifications, the tool computes the controller parameters and presents the final result directly in the screen. This mode is focused to the automatic design, simulation and controllers' test for real systems. • Didactic mode. In this mode, the tool designs the controller showing step by step the process of such design (in the same way as a student would solve it applying the methods explained in class). This mode is oriented to the teaching and practice of the methods.
International Conference on Engineering Education
July 21–25, 2003, Valencia, Spain. 1
ALGEBRAIC DESIGN OF DIGITAL CONTROLLERS In the automatic control of industrial processes, the most used controllers are the well-known PIDs, in their continuous or discrete version [4]-[5]. These controllers have three adjustable parameters, having in general a good behavior, provided the control specifications are not too strict. Therefore, when exact specifications are necessary or when an asyntotic behavior in the response system is not allowed, the PID controllers are not appropriate. The algebraic controllers allow to save some of the previously mentioned problems, and they are a possible alternative to the PIDs. The design methods described in this paper are based on the description given in [3]. Other similar design methods are described in [5] and [2] for the cancellation controllers and poles placement. In [1] the Truxal method can be found, applied to minmum-time and finite-time systems. In this section we describe very briefly the fundamental ideas of each of the controllers considered in this paper. Poles Placement Controllers These controllers are used to achieve that the poles of the transfer function in the closed loop coincide with the established poles by the designer. This way, given a discrete model of the process, the objective is to design the controller such that the close loop transfer function has the poles specified by the designer. The design of these controllers consists on obtaining an equation from the equality of the characteristic equation of the close loop system and the polynomial corresponding to the poles to assign:
A( z ) ⋅ P ( z ) + B ( z ) ⋅ Q ( z ) = ∏ ( z − pi ) = 0 i
where A(z) and B(z) are the denominator and numerator of GP (z ) and P(z) and Q(z) are the denominator and numerator of GR ( z ) . This equality leads to a linear system of equations whose incognits are the coefficients of the transfer function of the controller. Cancellation Controllers The cancellation controllers have as objective the cancellation of the dynamics of the process to be substituted by a new one, through the close loop transfer function. The process is very simple: given the close loop transfer function composed by a controller and a process with negative and unitary feedback,
M ( z −1 ) =
GR ( z −1 )GP ( z −1 ) 1 + GR ( z −1 )GP ( z −1 )
from this equation the transfer function of the controller can be obtained as:
GR ( z −1 ) =
1 M ( z −1 ) GP ( z −1 ) 1 − M ( z −1 )
[
]
The design of this type of controllers must verify some restrictions [1]-[3]-[5]. Minimum Time Controllers The objective of this type of controllers is to cancel the error in a minimum number of sampling periods. The minimum time controllers can be considered as a particular case of cancellation controllers with some additional restrictions. The main problem with these controllers is the eventual existence of hidden oscillations, problem which motivates the development of the finite-time controllers. Finite Time Controllers In some minimum time controllers the output reaches the reference exactly in the sampling instants, however, between this instants the output signal is oscillatory (hidden oscillations problem). In these cases we should relax the condition of minimum time, so that the error it is cancelled in a finite (although non minimum) time. The minimum time controllers are able of eliminating the error more quickly as possible, without presenting the hidden oscillations problem.
International Conference on Engineering Education
July 21–25, 2003, Valencia, Spain. 2
To reach this objective the control signal of the controller should be constant from a certain instant given by
order ( M ( z −1 )) or l + 1 (l is the order of the polynomial error E ( z −1 ) ). The design of a finite time controller implies the resolution of the following system:
M ( z −1 ) = z − d B( z −1 ) M 2 ( z −1 ) 1 − M ( z −1 ) = (1 − z −1 ) max(ν +1,ν ') A( z −1 ) M 1 ( z −1 ) where d is the process delay, and M1(z-1) and M2(z-1) are the incognit polynomials.
AUTOMATIC DESIGN OF ALGEBRAIC CONTROLLERS TOOL (ADACT) ADACT is a tool developed in Matlab that makes the automatic design of digital controllers using algebraic methods, as well as the simulation of its operation. Once designed a controller for the discrete model of a (continuous) process the simulation of the temporal response of the closed loop system can be made to check its operation. Also, the tool allows the representation of the root locus, useful for the confirmation of the poles of the closed loop system in a controller implemented with the pole placement method. ADACT has been programmed using the module GUIDE of Matlab 6.1. The main screen of ADACT is composed by four panels at the top and four graphics at the bottom (figure 1). The panels are the following: 1.- Process transfer function: where the mathematical model of the process is introduced given by its discrete or continuous transfer function. 2.- Controller design: corresponding to the algebraic design of each type of controller. 3.- Temporary response: in which the specifications are indicated for the simulation in the active graph, such as the control signal output, the reference and the signal to represent (output, error, control). 4.- Root locus: for the representation of the root locus of the process, and the root locus with the designed controller. The steps to use the graphical are the following: 1) Introduction of the discrete or continuous model of the process; 2) Design of the algebraic controller for the process; and 3) Simulation and/or representation of the root locus. The design will be made using the controls of the panel “Design of the controller” of the main screen. The procedure is very simple and can be made following three steps: 1) In the case of having a previously designed controller, press the button “new controller” located at the top of the main screen. 2) Select the type of controller that is wanted to design in the option radio buttons of the panel: “poles placement”, “cancellation”, “minimum time” and “finite time.” 3) Then, a window will appear where the student should introduce in the program the controller's specifications to design and its design mode (didactic or direct, figure 1). The tool also allows the students to simulate the process and the controller according to different control schemes, expressing the results directly in the graphics windows of the main screen. The simulation options that ADACT allows are presented in the panel “temporal response.” This panel is formed by three columns of radio buttons. In the first column the user will select the control scheme, in the second column the reference type and in third the resulting signal of the simulation to represent in the active graph. This way, the students can quickly represent the main graphics to analyse the response of the designed controller, and to choose between various design options.
SOME EXPERIMENTAL RESULTS In this section the design of an automatic digital control system for the control of a speed control of an engine is described, implemented with different controllers computed by ADACT. This way, the verification of the operation of the controllers is checked using a real physical system. A comparison will be made between the graphics obtained in the control in real time
International Conference on Engineering Education
July 21–25, 2003, Valencia, Spain. 3
and those extracted from simulation. This will allow the students to verify the precision of the designed control system, considering that the discrete model of the controlled process is not exact. The first step is to design a controller that allows that the dynamic specifications are the following ones: Settling time: Overshoot:
s=
ts ≤ 0.51 s
M p ≤ 29%
These specifications converted to the complex plane results in the following dominant conjugated complex poles: −6.2 ± 15.71 j . Since the controller's computation is based on a discrete model of the process, the dynamic
specifications should be translated to the Z plane. From this translation we obtain: z = 0.9283 ± 0.147 j . Introducing the previous discrete poles as specifications in the tool, the obtained controller is the following:
GR ( z ) =
1.126 z − 0.5018 z −1
Now the students should perform a simulation of the speed control of the engine using the Matlab/Simulink environment in order to confirm that the designed controller is mathematically correct. The control scheme is shown in figure 2. The reference signal is a unitary step from the sample instant 300 (3 seconds), and finished at the simple time 1000 (10 seconds). The simulation time was 15 seconds. The system response is shown in figure 3. From this figure we can see that the overshot that presents the process does not overcome 29% of the value in which it is stabilized. Also, the settling time is less than the time specified ( ts ≤ 0.51 s ). From these observations the students can conclude that the digital controller designed for the process has been (mathematically) designed correctly by ADACT. The next step in the laboratory work of the students is to obtain the process response in real time, i.e., to control the engine using the digital controller and compare the “simulated” response and the “real” response of the physical system. This way, the students can obtain conclusions about the accuracy of the process model used in the experiments and the design method. The real output of the system in the example of this section is shown in figure 4. In this case, the speed of the engine follows the reference presenting in the same way as in the simulated system with a bigger delay in the real system, probably as consequence of the intrinsic error in the model of the process (which is an input parameter to the design method).
CONCLUSIONS •
In this paper we have shown a tool for algebraic design of digital controllers that solves the necessary systems of equations automatically for the computation of the controller, also allowing the test of its operation by simulation.
•
The tool has been developed with the possibility of showing the design process with the objective that the student checks the results (didactic mode). This aspect is of special importance for the educational application of the developed tool. The students can follow the details of the resolution process of the digital controller design.
•
One of the most important advantages of the tool is that it allows the design and test of controllers in real systems in a very quick and simple way, which allows the students to prove in a very short time several controllers on the physical equipments available in the laboratories.
•
The tool has been programmed using the symbolics toolbox of Matlab, which has allowed the programming of the design methods following the algebraic procedure explained in the lectures. This way the program can show the design in the same way that the students perform it “with pencil and paper”.
International Conference on Engineering Education
July 21–25, 2003, Valencia, Spain. 4
REFERENCES [1]
Aracil, R., Jiménez, A., “Sistemas discretos de control”, S.P. Universidad Politécnica de Madrid, 1989 (in Spanish).
[2]
Astrom, K., “Computer Controlled Systems. Theory and Design”, Prentice-Hall, 1988.
[3]
Bernabeu, E.J., Martínez, M.A., “Diseño algebraico de controladores discretos”, S.P. Universidad Politécnica de Valencia, 1999 (in Spanish).
[4]
Kuo, B.C, “Automatic Control Systems”, Prentice-Hall, 1996.
[5]
Ogata, K., “Discrete-Time Control Systems”, Prentice-Hall, 1996.
[6]
Ogata, K. “Solving Control Engineering Problems with MATLAB”, Prentice-Hall, 1999.
FIGURES AND TABLES FIGURE 1 MAIN SCREEN OF ADACT
FIGURE 2 CONTROL SCHEME USED FOR SIMULATIONS
International Conference on Engineering Education
July 21–25, 2003, Valencia, Spain. 5
FIGURE 3 STEP RESPONSE OBTAINED FROM SIMULATION (CLOSE LOOP SYSTEM WITH THE DESIGNED CONTROLLER) 1.4 1.2 1 0.8 0.6 0.4 0.2 0 -0.2 -0.4
0
200
400
600
800
1000
1200
1400
1600
FIGURE 4 STEP RESPONSE OBTAINED FROM THE REAL PHYSICAL SYSTEM (CLOSE LOOP SYSTEM WITH THE DESIGNED CONTROLLER) 1.4 1.2 1 0.8 0.6 0.4 0.2 0 -0.2
0
200
400
600
800
International Conference on Engineering Education
1000
1200
1400
1600
July 21–25, 2003, Valencia, Spain. 6