GENERALIZED PREDICTIVE CONTROL DESIGN FOR A NONLINEAR HYDRAULIC SYSTEM

The paper deals with the design of optimization predictive control algorithms, which are based on the input-output ARX and CARIMA models of the dynamic systems. The paper also deals with the simulation verification of predictive control algorithms on a nonlinear hydraulic system with different settings of various control algorithms parameters, with a system subject to noise, or disturbance. There is mentioned a brief theoretical derivation and the particular formulas for concrete predictive control methods in the paper. The paper includes a flow chart diagram for predictive control methods programming and the control structure, where predictive control algorithms were used in nonlinear hydraulic system control. Nonlinear differential equations, which express hydraulic system’s dynamic are presented, too. The results of generalized predictive control algorithms comparison are expressed by the control action and the hydraulic system’s output in a graphs form.


INTRODUCTION
In the paper we are engaged in designing of generalized predictive control (GPC) algorithms, that are based on the dynamic systems' models input-output description, on the transfer functions.
Particularly, we are concerned in the GPC algorithm, which is based on the ARX dynamic system's model and was used in adaptive predictive control in [1] and [2] and the GPC algorithm based on the CARIMA dynamic system's model, which contains typically an integrator in linear model expression [3].
In the second part we mention a brief theoretical derivation of single algorithm and the particular formulas.
We analyze in detail the GPC algorithms design in a function form, which serves for control action computing in the dynamic systems control process in the part 3.
In the fourth part we are concerned in simulation control of a nonlinear hydraulic system using designed GPC algorithms in the particular control structure.
We are presenting the results acquired by GPC algorithms comparing with different settings of the various algorithms' parameters, possibly with noisy system's output or with an impact of the disturbance on the control action in the paper.

GENERALIZED PREDICTIVE CONTROL ALGORITHMS OVERVIEW
Generalized predictive control algorithms belong to optimization tasks.In general they minimize the criterion where: u(k) is an control action, ŷ(k) is a predicted output value and w(k) is a reference trajectory.
Values N 1 and N p represent a prediction horizon, N u denotes a control horizon with u p N N ≤ . If reduction of degrees of freedom is used in a predictive control algorithm, coefficients of a deviation between the system output and the reference trajectory on the prediction horizon and R(i) represents weighting coefficients of the control action on the control horizon.
Predictive control algorithm design can be divided in two steps: I) predictor derivation, II) computing optimal sequence of control actions.
Advantage of predictive control algorithms consists in possibility to compose various constraints in computation of the optimal control sequence.Most commonly it is carried out by quadratic programming.In our case we used the quadprog function, that is one of functions of the Optimization Toolbox in the Matlab and computes a vector of the optimal values u by formula where the form of the matrix H and the vector g depend on used algorithm and matrix A con and vector b con are composed in compliance with required constraints.

GPC algorithm based on the ARX model
This algorithm is based on the regression ARX model of the dynamic systems: where B z (z -1 ) is m ordered polynomial numerator with b i coefficients and A z (z -1 ) is n ordered polynomial denominator with a i coefficients.
u(k) is input, y(k) is output and ξ(k) is a system output error or output noise measurement [1].

I) Predictor derivation
According to [1] we can express the output of the dynamic system in sample k + 1 from the ARX model (3) by relation 1 1 ( 1) We are able to arrange (4) into a matrix form (5) which represents the "pseudostate" space model of the dynamic system [1].By derivation mentioned in [1] or [8] it is possible to express the predictor from the pseudostate space model in form of ˆ + (6) where y 0 introduces the free response and G Np u represents the forced response of the system.Following the control horizon length it is necessary to create a p u It is recommended to right multiply U with G Np , whereby we obtain a matrix , Np = G G U that ensures considering the real control horizon in computation of the optimal control sequence [1].Thus, the final matrix form of the predictor will be 0 ˆ = + y y Gu. (8)

II) Computation of the optimal control sequence
The algorithm minimizes the criterion which in contrast to (1) includes weighting coefficients.
A matrix form of the criterion J ARX is whereby according to [2] it is sufficient to minimize only one part by solving algebraic equations 0 Since the matrix S is not square, according to [5], for computing the optimal control sequence u without considering required constraints it is possible to use the QR-decomposition or the pseudoinversion of the matrix S: 1 ( ) The matrix H and the vector g, which are needed in computation of the optimal control sequence u by quadprog function with required constraints respecting, have with control action value u weighted in criterion (10) form 0 ( ) In the case, where the control move ∆u is weighted in the criterion (10) it is necessary to modify equations ( 11), ( 12) and ( 14).This technique is introduced in [8].

GPC algorithm based on the CARIMA model
The algorithm is derived from the CARIMA model of the dynamic system where in contrast to the ARX model C z (z -1 ) is multinominal and introduces an integrator [3].According to [3] the criterion, that is minimized in this GPC algorithm has form is relative weighting quotient.

I) Predictor derivation
According to [3] the output of a SISO dynamic system in sample k + 1 is given by equation (without z -1 ): Solving diophantine equations it is possible to express the predictor for j steps in form where y 0 is system's free response and coefficients of matrix G are given by matrix dividing / B A Δ , According to [3] we can reduce the matrix G to size on the basis of values N 1 and N u .

II) Computation of the optimal control sequence
From the matrix form of the criterion (16 ) , it is possible to express a formula for the control action without required constraints computing by minimization condition For computing the optimal control action sequence with required constraints it is possible to use quadratic programming, where input parameters of the quadprog function are the matrix H, vector g, matrix and vector A con and b con representing the constraints.
It is important to note, that control move Δu is result of GPC algorithm computing, which is based on the CARIMA model.In the case the control action value u is weighted in criterion (20), the optimal sequence of the control action is given by , ( )

GPC ALGRITHMS DESIGN
We programmed GPC algorithms mentioned in the previous part as Matlab function form, which compute the control action value on the basis of input parameters.
In Fig. 1 the flow chart, which correspondes to GPC algorithms programming is depicted.The equation ( 21) computes the control move, thus in the case of GPC algorithm, based on the CARIMA model, the previous value of the control action must be added to the function's output.
The algorithms are designed in such way that it is possible to carry out computation of the optimal control sequence by receding horizon principle.It means the next procedure is evaluated in mentioned functions within every control step: 1. assigning of the reference trajectory w over the prediction horizon, 2. detection of the actual state x(k) or output y(k) of the system in specific sample, 3. prediction of system response on the prediction horizon based on the actual values of the control action u opt (k) and state x(k) in previous samples without influence of next control action, so-called system free response, 4. the optimal control sequence u opt computing by the criterion J minimization with known parameters N 1 , N p , N u , Q(i) and R(i), using u opt (k) to the system input.

SIMULATION VERIFICATION OF GPC ALGORITHMS ON HYDRAULIC SYSTEM
We carried out simulation control of the nonlinear hydraulic system with designed GPC algorithms on the basis of the control structure, that is shown in Fig. 2.
The algorithm, which we used for feedback control structure programming has several steps:  4. Computing the control action u(k) by specific equation for used GPC algorithm and eventually the control action saturation. 5. Disturbance value addition to the control action (if it is required).6.New output y(k) computing with using computed control action value u(k) on basis of the system discrete transfer function.7. Noise addition to the output (if it is required).8. Setting the output of the dynamic system linear model by output of the controlled system.9.
11. Clearing of samples in inverse time.12. Visual display of simulation results.

Nonlinear hydraulic system
The hydraulic system (adapted from [6]), which we used in GPC algorithms verification and comparing, is composed of two tanks with areas S 2 and S 3 and heights h 2max and h 3max .The tanks are joined by the valve V 1 with relative opening L V1 and with area S V1 .A liquid is ducted to the first tank from a receiver through a feed-pipe with area S 1 and height h 1max by a pump and it flow out from the second tank through the valve V 2 with relative opening L V2 and area S V2 back to the receiver.The control input to the hydraulic system is the motor's voltage of pump U mot , disturbance value is the opening of the second valve L V2 , we consider height of the second tank h 3 (t) as an output.The area of the pump's untightness is S c , U insens represents a voltage of motor's insensitivity.The mathematical description of the hydraulic system's model is created by the nonlinear differential equations 2 1 2 Detailed derivation of the mathematical description and numerical parameters of this system are presented in [7].
We programmed a numerical method Runge-Kutta of 4 th order as a function in Matlab to solve the nonlinear differential equations (23), which describe the dynamics of the hydraulic system.Within this function we programmed also physical constraints of the hydraulic system: We used the physical constraints of hydraulic system (24) noted above in designed GPC algorithms in computation of the optimal control sequence by the quadprog function.
Although we verified designed GPC algorithms on the nonlinear hydraulic system, it is necessary to note, that we stated the predictor on the basis of linear model for each algorithm.We established the linear model of the hydraulic system by the Taylor linearization approach of the nonlinear differential equations (23) in the operating point: . This operating point ensures a state of hydraulic system, where water levels in both tanks are around the middle height of tanks.

Simulation control of hydraulic system results
In Fig. 4 the results of simulation control of the hydraulic system are shown, where GPC algorithms was dealt with settings: R is a diagonal matrix with values R v = 0.001, the noise and the disturbance value were not considered in this case, the control move ∆u(k) was weighted in the criterion (1).
The fundamental difference is evident between GPC algorithms, particularly the GPC algorithm based on the ARX model does not introduce any integration character into the control process.
This mentioned difference between GPC algorithms is more visible with settings N p = 50, N u = 1, Q v = 1000, R v = 0.01, the results are shown in Fig. 6.
It is needed to note, in that case, when the control action value u(k) was weighted in the criterion (1), the deviation between the system output y(k) and the reference trajectory w(k) existed in the control process with both GPC algorithms.
The results of the simulation control with noise, which mean value was 0 and standard deviation was 0.005 and 0.001 are shown in Fig. 7 and Fig. 8.In Fig. 8 it is seen, that the control action is with noisy system output more oscillatory for both GPC algorithms.Comparing Fig. 7 and Fig. 8 we can clearly see a massive control downgrade when the GPC algorithm based on the CARIMA model was used in the control with increasing noise, particularly its standard deviation.We assume the noise affects much more the linear predictor based on the CARIMA model than on the ARX model.The integrator The results of simulation control, where a disturbance value was added into the control structure as increased or decreased value 6V in time 300s or 600s of the control action are visible in Fig. 9.It is seen from Figure, that both of GPC algorithms respond almost equally to disturbance impact, but with the GPC algorithm based on the ARX model above mentioned deviation between the system output y(k) and the reference trajectory w(k) appears.We consider that is necessary to note for concluding, that the control has better performance with the prediction horizon increasing for both of GPC algorithms.Moreover, changing of the weighting coefficients in the matrices Q and R has much bigger influence on the control with the GPC algorithm based on the ARX model than with the GPC algorithm based on the CARIMA model.Both of mentioned facts can be deduced from Fig. 4 and Fig. 6 comparison.

CONCLUSIONS
We introduced two different generalized predictive control algorithms, which vary each other by the dynamic system model's type using and also by the form of the predictor expression.We were engaged in the basic theoretical fundaments of GPC algorithms, the method for programming them in the function form, moreover the control structure programming.We concentrated on GPC algorithms comparing in nonlinear hydraulic system simulation control with various settings, whether in the control algorithms, the noise or the disturbance impact adjusting in the control process.
We can point out from the obtained results, that it is preferable to use the GPC algorithm based on the CARIMA model in the case, where the request for deviation between the output and the reference trajectory removal is present.On the other side, in the case the system is noisy, the GPC algorithm based on the ARX

Fig. 1 1 V
Fig. 1 Flow chart diagram for GPC algorithms

Fig. 2
Fig. 2 Control structure with GPC algorithm