Microsoft Word - 01_R.doc HUNGARIAN JOURNAL OF INDUSTRIAL CHEMISTRY VESZPRÉM Vol. 35. pp. 47-55 (2007) CONTROL STRUCTURES BASED ON CONSTRAINED INVERSES F. SZEIFERT, T. CHOVÁN, L. NAGY University of Pannonia, Department of Process Engineering, H-8201 Veszprém, P.O. Box 158, HUNGARY The widespread use of the PID algorithms in the classical feedback scheme is due to the following to basic reasons: the role of PID-controllers in the traditional process control profession, and the good control performance achieved at the local control level. Present paper proposes a well structured control solution for the local control level allowing the integration of different types of engineering information into the control algorithm. Based on a comparative study of the structures of PID and IMC controllers a novel control structure with two degrees of freedom (or three if the possibility of adaptation is considered too) is defined. The application of the new control structure is illustrated by the example of the temperature control in a laboratory water heater system. Keywords: PID, IMC, constrained inverse Introduction More open control solutions which, at the same time, allow taking into account the inherent steady-state and unsteady-state (dynamic) characteristics of the process are recently introduced for chemical processes, too. In spite of the fact that the IFAC Technical Committee on “Chemical Process Control” has already outlined the necessity of the integration of process design and control design at its World Congress in 1994, the broader application of control solutions mapping all the aspects of process characteristics directly requires much more time. This integration can assure that the a priori chemical engineering knowledge used in the process design could be employed in the development of the control algorithms in an explicit way. The introduction of this methodology is slowed down by several factors: ● It is well known that in the most part of chemical process control PID controllers, that map the model of the traditional instrumental controllers, are used. The digital technology allowed the implementation of several PID-modifications softening the difficulties of the application of common PID-algorithms in many cases. The consequence is that configuring a real control loop on the control system involves determining numerous structural and calculation parameters beside the three original control parameters. This way the simple algorithm loses its transparency and makes it almost impossible for the personnel operating the process application carefully the tuning methods of the control theory enforcing the application of empirical tuning techniques. According to an estimation, the ratio of PID controllers is 98 % in an average chemical process and only 5-10 % can be considered as more advanced solution. Among these, 80 % of industrial PID-controllers are poorly tuned, 30 % of them are operated in manual mode and 30 % of them use the parameters set at commissioning [1]. Limited competitors of PID-controllers are the MPC techniques which are mainly applied at the hierarchy level above the PID-controllers. ● Control theory has a wide range of linear techniques, however thorough investigation the prerequisites of the practical applications has started only recently. Measurement noises got a large attention from the beginning; while the dead-time, steady-state characteristics (e.g. nonlinearity of valves), the constraints of control outputs, the model error and the effect of the non-measured disturbances are getting into the researchers’ interest only recently. ● The chemical engineering knowledge regarding the process is principally given in form of balances for the phase masses, the component masses, the enthalpy (heat) and maybe the momentum which is a complex set of partial differential equations supplemented with the constitutive algebraic equations. In process design generally the simplified steady-state form of the equation set is used. The chemical engineering approach can be mainly tied to the steady-state models. The unsteady-state model is usually too complex to be employed directly in the control. On the other hand the black box models applied in control theory do not include any information regarding the structure of the controlled process. Recently published approaches use models reflecting the structure of the controlled process to some extent while maintaining a simplified 48 form of the model (tendency models [2], grey box model, etc). Present paper proposes a well structured form of the local control level which allows the integration of different types of engineering information in the control algorithm. Comparison of control structures The widespread use of the PID algorithms in the classical feedback scheme is due to the following to basic reasons: 1. The role of PID-controllers in the traditional process control profession. 2. The good control performance achieved at the local control level. The second one is accounted for in a bit more details. The algorithm is transformed as follows: )1( 1 ) 1 1( 2 ++∗=++= sTsTT T TK sT sT sT KG IDI I CC C D I Cc (1) i.e. the PID-controller can be interpreted as a serial system of an integrator and the inverse of a second order system (see Fig. 1). If the dynamics of the process is second order then the transfer function of the part in dotted frame could be set to unity by appropriately tuning the PID parameters. This way the transfer function of the closed loop is a first-order filter and its time constant can be set arbitrarily. Since many of the chemical processes can be well approximated by first- or second-order dynamics, in such cases the excellent performance of PID controllers is not surprising. It should be emphasized, that the same results are obtained with model-based design techniques (direct synthesis, IMC, etc.), in case of nonlinear systems the results are not equivalent rather they are only similar. Figure 1: Classical feedback scheme Fig. 1 illustrates well the functions of the two parts of the controller used in the feedback loop. The inverse part compensates for the dynamics of the process, while the integrator eliminates the control error (and ultimately the final control error completely). The feed-back part can compensate for the influence of both the changes of the setpoint and disturbances (causes) by feeding back the output (time-delayed effect). Measuring the dominant disturbances, the dynamics of the compensation can be significantly improved by applying a feed-forward part. The feed-back and feed-forward parts can be synthesized in the IMC structure (see Fig. 2). The applied filter has two functions; on the one hand it filters the noises, and on the other hand assures the operability of the scheme (without a filter a short circuit can be obtained). Applying a first-order filter, the scheme can be transformed according to Fig. 3. Taking into account that the product of the transfer functions of the model and the inverse is unity, the transfer function of the part in dotted frame is the following: Inverse sTModelInverse sT Inverse sT G C C C ∗= ∗∗ + − ∗ + = 1 1 1 1 1 1 (2) Figure 2: The IMC structure Filter Inverse Process Model + - + - Inverse of the second order system Process + - 1=SG sTC 1 49 Figure 3: The transformed IMC This gives the same result shown on Fig. 1, except that there was not any assumption made for the model. Therefore the part in dotted frame fulfils both the inverting and the error elimination functions. The above analyses are valid for linear system models. The IMC structure allows taking into account the effect of the measured disturbances in the model construction as well as in the model-based inverse formation. The model error and the effect of the unmeasured disturbances are measured together by the model error. Therefore the accuracy of the model is known by very instant by calculating the model error. In the original IMC structure the model error is compensated by feeding back the model error to the input of the feed-forward inverse model. This way the model approximates the real system. In the structure shown on Fig. 2 the input of process and the model are the same, consequently it can be used for the control of stable systems only. New control structure In the construction of the new structure related to the above ones the following starting assumptions are made: 1. The system model includes all important properties regarding the process dynamics and it maps the manipulated variables, the measured disturbances and the parameters of the model to the controlled variables. 2. Based on the model a constrained inverse model is constructed. The constrained inverse maps the setpoints, the measured disturbances and the parameters of the inverse model to realizable (constrained) manipulated variables. Sound knowledge of the process is utilised in feed- forward form. 3. The difference between the dynamics of the process and model is to be eliminated by applying a model-error compensator. As it was shown earlier, the model error comes from the direct error of the applied model and from the unmeasured disturbances. Missing knowledge about the process is compensated for by feeding back the model error obtained from the measurements and the calculations. Based on the above assumptions a control structure shown on Fig. 4 can be constructed. The manipulated variable which is the feed-forward part of the real (physical) manipulated (uFF) variable is calculated from the setpoint and the measured disturbances by forming the constrained inverse. From this signal the controlled variable which serves as reference signal for the process output can be calculated using the model. The difference (control error which is not equivalent with control deviation calculated directly from the setpoint) is due to the different dynamics of the model and the process. In the IMC scheme this error can be compensated for by correcting the setpoint (see Fig. 2, the correction is on the input of the inverse model, i.e. this correction approaches the model to the process). Another option is to apply the correction on the input of the process (i.e. the output of the inverse model) using a compensator (this approaches the process dynamics to the model by correcting on its physical input). This correction is the feed-back part of the physical manipulated variable (uFB). The compensator is required to eliminate the difference (control error) between the controlled variable and the reference signal, i.e. it has an integrating character. The IMC scheme synthesises the feed-back and feed-forward parts and makes the correction on the input of the inverse model. In the above structure, defining distinct functionalities, the feed-forward and feed-back terms are firmly separated, hence the degrees of freedom of the controller increases. The feed-forward part treats the servo problem while the feed-back part provides the “noise” compensation. The design of the above two parts of the controller can be separated. Inverse Model Process 1 1 +sTC + + - + G 50 Figure 4: The control scheme Using feed the control error relative to the reference signal arising from the different dynamics of the model and the process can be set to zero. The actual model error is generated in a parallel scheme of the process and the model. Based on the model error the model parameters can be refined too (adaptive systems). This involves a secondary feed back with a much larger time constant than that of the primary feed back. The different adaptation possibilities are not discussed in this paper. Construction of the constrained inverse The function of the inverse term is to generate the input for the specified output. This is interpreted on Fig. 5. The model of the process to be controlled maps the manipulated variable(s), the measured disturbance(s) (inputs) and the parameter(s) to the controlled variable(s) (outputs). This is a cause-effect relationship inferring that a physically feasible output can always be generated for every physically realizable input. The inverse model maps the physically possible disturbances, the references given independently from process and the parameters to the process inputs. This is a goal-cause relationship, i.e. the suitable system inputs must be find for the given system outputs. It is not always guaranteed that the specifications can be satisfied. This is the basic problem of composing the inverse. The impractical specifications can be corrected by applying constrained inverses. The details of this method are discussed in the following. Let us define the model of the process to be controlled in the following state-space form (the principle of the method is not affected when, for the sake of simplicity, only one manipulated and one controlled variable considered in the calculations in the continuous time domain): ),,( zuxf dt dx = , state-transition function (3) y = g(x, u, z), output function (4) where u input signal, z measure disturbance(s), y controlled variable, x state variables t time. Figure 5: Interpretation of the constrained inverse Constrains Model Inverse Manipulated variable, u Constrained manipulated variable input, u output, y Measured disturbance, z Reference signal, w Constrained inverse model Process Compensation Model Adaptation Model Setpoint Disturbance Manipulated variable Controlled variable Parameters 51 The relative order of (3-4) system has an important role in the invertation [3]. The relative order basically means the smallest order differential of the output signal which is affected by the manipulated variable directly. Therefore if the relative order of the system is r, then the following applies: ),,( xzu dt yd r r ϕ= , (5) while the (r-1)-differential is not a direct function of u. Function φ(u, z, x) can be obtained by differentiating equation (4) r-times and taking into account the state- transition function too. The ideal form of inverting was, if the output followed the reference signal without any time delay (y = w). Apart from the zero-order systems without any time delay, this is impossible in case of finite manipulated variables. Consequently an r-order filter can be applied as inverting rule: ,... 11 1 10 wydt dy a dt yd a dt yd a rr r r r =++++ −− − (6) where a0, a1, ..., ar–1, altogether r pieces of parameters of the inverse formation. The r-order filter can be given as cascading r first-order filter. In this case the inverting has only one parameter. Substituting relationship (5) into specification (6) and ordering the equation, φ(u, z, x) can be expressed as: )...( 1 ),,( 1 1 11 0 − − − −−−−= r r r dt yd a dt dy ayw a xzuϕ (7) The manipulating variable can be expressed by inverting φ(u, z, x) with respect to u: u = φ-1(u, z, x) (8) The smaller is the time constant of the inverse, the more aggressive is the control action, at the same time the higher is the risk that the manipulated variable gets outside the physical constraints. Conversely, at higher time constants, the physical constraints of the manipulated variable are more rarely attained. The physical realization of the manipulated variable calculated according to equation (8) cannot be guaranteed, hence usually the constraints are considered: u = {umin, if u < umin; umax, if u > umax; u otherwise} (9) where the allowable range of u: u ∈ [umin, umax]. The constrained manipulated variable calculated according to equation (9) can always be realized; however during the cutbacks the invertation rule (6) cannot be applied. Model error compensation The design of the model error compensator is based on Fig. 4 and the scheme of the constrained inverse based feed-back controlled process given on Fig. 6. The input of the constrained inverse is the setpoint and the measured disturbance and its output is the feed- forward manipulation variable (uFF) and the reference signal calculated from the model. The model error is compensated by correcting the physical input of the process (u), while the control error (y) is calculated from difference of the reference signal and the measured output. The model for calculating the model error (Merr) describes the relationship. The error model can be derived from the process model (3-4); however an autonomous black-box model can also be identified. E.g. if the error model is a maximum second-order input-output model, then a constrained PID controller (C-PID, [3], see Fig. 7) can be well applied. The model error can also be compensated in IMC structure, assuming that the constrained inverse which makes unnecessary the application of a separate filter and discussed in the previous part, is used. Eliminating the model error, the setpoint is implicitly zero; therefore the scheme becomes simpler as shown on Fig. 8. It is well known, that the model is required to be self- adjusting in the IMC structure. Figure 6: Classical feedback scheme Constrained inverse model Process + - FBu+ FFu+ Control error y Correction u 52 Figure 7: Model error compensation with C-PID controller Figure 8: Model error compensation with C-PID controller Application of the method The application of the new control structure is illustrated by the example of the temperature control in a laboratory water heater system. The scheme of the system is shown on Fig. 9. The feed flow rate can be controlled; the discharge temperature of the water can be controlled by the performance of the electric heater [4] Figure 9: Scheme of the laboratory water heater system The objective is to control the discharge temperature of the water while the feed flow rate and the feed temperature can fluctuate. Accordingly, the controlled variable (y) is the discharge temperature, the manipulated variable (u) is the performance of the electric heater, the measured disturbances are the feed temperature (z1) and the feed flow rate (z2). The model of the process is the following heat balance of the tubular equipment: )( hPP ttKux T cB t T cV −= ∂ ∂ + ∂ ∂ ρρ (10) where x ∈ [0, 1] dimensionless length coordinate, T(t, x) temperature function, th pure time delay, B volumetric flow rate, disturbance signal (z2), V total volume, ρcP heat capacity of the liquid, Ku(t – th) source density of electric heating, manipulated variable. The necessary initial and boundary conditions: T(0, x) given, T(t, 0) = z1 temperature of liquid feed (disturbance signal), y = T(t, 1) controlled variable. The heat balance (10) is a partial differential equation (distributed-parameter model) which is practical to be spatially discretized. The so called cascade model, obtained this way, can be transformed into the following state-space model: )]([ 211 1 21 httupxzp z dt dx −+−= )]([ 21 1 2 hii i ttupxx p z dt dx −+−= − , i=2,…,n, (11) y = xn, where n the number of cascade elements (the order of the state-space model), n K p n V p == 21 , parameters. The state-space model (11) has four parameters (p1, p2, th, n) which can be determined from a priory knowledge or by parameter estimation from experimental data. Based on the experimental and simulation studies it was concluded that the model adequately reflects the experimental data; therefore it is suitable for the controller design. MV water T in F T < Heating PC < Open Close ADAM-5000 LAN U Process for feed back Constrained inverse error model Control error C-PID Process for feed back 53 The first step of controller design is the development of the constrained inverse model. Since y does not directly depend on u, the output signal is differentiated according to equation (5): )]([ 21 1 2 hnn n ttupxx p z dt dx dt dy −+−≡= − . (12) The differential of the output is a direct function of u; therefore the relative order of the system is one. According to equation (6) the rule for inverting is the following: wy dt dy C =+τ , (13) where w setpoint, τC time constant. Substituting relationship (12) regarding the differential into equation (13), the manipulated variable can be calculated based on equations (7-8): ])([ 1 1 2 1 2 −−+−= nnn C xxxw z p p u τ . (14) Since the system is time-delayed, the variables on the right hand side of equation (14) can be considered as the values predicted for time t + th. The constraints corresponding to equation (9) are the following: If u < 0, then u = 0; if u > 10, then u = 10. (15) This way the constrained inverse model is completely defined. The scheme given on Fig. 8 is applied for compensating the model error. Since the state-space model (11) can be considered as a linear system with changing parameters for variables u, x, y, a model which is isomorphic to model (11) can be used as error model too. The difference is that in this case the input is the correction feed back while the output is negative control error (with respect to the reference signal). Zero initial values are used as initial conditions involving that there is not any the control error initially. Due to the isomorphism of the two models, the constrained inverse error model is isomorphic to the constrained inverse model. The input, output and state variables as well as the constraints are different, while the disturbances and the parameters are the same. The scheme of the controller constructed according to the above reasoning is shown on Fig. 10. The control algorithm based on the scheme on Fig. 10 was implemented in MATLAB/Simulink programming environment. The algorithm was tested in several simulation and physical experiments. The results of a representative simulation study are presented on Fig. 11. While the temperature of the feed is constant, a simulated disturbance is generated by applying a step function on the setpoint of the ideal flow controller. The controlled system is excited by step-wise changes of the temperature setpoint and the disturbance signal. The controller parameters can be directly estimated on the basis of the parameters of the a priori model. The control performance is significantly better than that of a PID controller; the tuning is much simpler; however the construction of the model is much more time consuming. After acquiring simulation experiences physical experiments were conducted (see Fig. 12). In this case the flow control of the system was not ideal either due to other (unpredictable) disturbances affecting the system disturbances. In spite of the poor performance of the flow controller the experience collected in the simulation studies regarding the temperature control are still valid. Figure 10: Temperature control of the water heater system Calculation of uFF (14) Constraint (15) Constraint (15) Model (11) Error model (11) Calculation of uFB (14) Water heater Delay (th) Delay (th)) Setpoint Disturbance Constrained inverse error model Constrained inverse model Controlled cariable Manipulated variable 54 0 5 10 15 20 25 30 0 5 10 15 20 25 30 35 40 45 50 55 60 Time (min) Te m pe ra tu re (° C ) 0 50 100 150 200 250 300 Fl ow r at e (l/ h) , H ea tin g (% ) Wtout Tout U F Figure 11: Results of the simulation study 0 5 10 15 20 25 30 0 5 10 15 20 25 30 35 40 45 50 55 60 Time (min) Te m pe ra tu re (° C ) 0 50 100 150 200 250 300 Fl ow r at e (l/ h) , H ea tin g (% ) Wtout Tout F U Figure 12: Results of the experimental study 55 Conclusions Based on a comparative study of the structures of PID and IMC controllers a novel control structure with two degrees of freedom (or three if the possibility of adaptation is considered too) is defined. At the given setpoint and measured disturbances, the firm knowledge regarding the controlled process is fed forward through a constrained inverse model (i.e. the feed-forward solution of the servo problem). The difference between the reference signal and the measured controlled variable is a control error coming from the model error and the effect of the unmeasured disturbances which is not accounted for. This error represents the lack of knowledge regarding the process to be controlled that can only be compensated for in feed-back scheme (i.e. the feed-back solution of the noise compensation). This can be designed on the basis of model error in several ways. The application of IMC structure is advantageous in case of stable systems. Simulation and physical experiments conducted on a water heater system, which can be described by a distributed parameter model, justified the feasibility and good performance of the proposed scheme. REFERENCES 1. LUYBEN W. L.: Effect of Derivative Algorithm and Tuning Selection on PID Control of dead-time Processes, Ind. Eng. Chem. Res., 2001, 40, 3605- 3611 2. FILIPPI-BOSSY C., BORDET J., VILLERMAUX J.: MARCHAL-BRASSELY S., GEORGAKIS C.:, Batch Reactor Optimization by use of Tendency Models, Comp. Chem. Eng., 1989, 13, 35-47 3. SZEIFERT F., NAGY L., CHOVAN T., ABONYI J.: Constrained PI(D) Algorithms (C-PID), Hung. J. Ind. Chem., 2005, 33, 81-88 4. BODIZS A., SZEIFERT F., CHOVAN T.: Convolution Model Based Predictive Controller for Nonlinear Process, Ind. Eng. Chem. Res., 1999, 38, 154-161