FEMLAB-BASED OUTPUT REGULATION OF ...

Report 2 Downloads 49 Views
FEMLAB-BASED OUTPUT REGULATION OF NONHYPERBOLICALLY NONMINIMUM PHASE SYSTEM AND ITS REAL-TIME IMPLEMENTATION Branislav Reh´ ak ∗,1 Jorge Orozco-Mora ∗∗ ˇ Sergej Celikovsk´ y ∗∗∗,2 Javier Ruiz-Le´ on ∗∗

Czech Technical University, Faculty of Electrical Engineering, Department of Control Engineering, Technick´ a 2, 166 27 Praha 6, Czech Republic. E-mail: [email protected] ∗∗ CINVESTAV-IPN, Unidad Guadalajara, P.O. Box 31-438, Plaza la Luna,44550 Guadalajara, Jalisco, Mexico. E-mail: {jruiz,jorozco}@gdl.cinvestav.mx ∗∗∗ Institute of Information Theory and Automation, Academy of Sciences of the Czech Republic. P.O. Box 18, 182 08 Prague, Czech Republic. E-mail: [email protected]. ∗

Abstract: The aim of this paper is twofold. It provides another option how to obtain a universal easily implementable method for the solution of the regulator equations using the FEMLAB package. The regulator equation originates from the output regulation problem. The main idea is making a slight change of the regulator equation. It is then solved using the finite-element method. Some theoretical aspects concerning solvability of the equations and convergence to the original problem are introduced. Secondly, to demonstrate viability of our approach, the results were applied to the real-time control of a gyroscope. Both simulations and c 2005 IFAC real-time laboratory experiments are included. Copyright Keywords: Nonlinear control systems, output regulation, partial differential equations, singularly perturbed differential equations, gyroscopes.

1. INTRODUCTION The problem of asymptotic reference tracking of a nonlinear system in the presence of disturbances is one of most exciting problems of the recent control 1

Supported by the Research program J04/98:212300013. ”Decision Making and Control for Manufacturing” of the Czech Technical University in Prague (sponsored by the Ministry of Education, Youth and Sports of the Czech Republic. 2 Supported by the Grant Agency of the Czech Republic through the research grant No. 102/02/0709.

theory. If the reference input and disturbances are generated by an autonomous system the problem is called nonlinear output regulation problem (alternatively, nonlinear servomechanism problem) (Isidori and Byrnes, 1990). The additional autonomous system that generates the reference is called as the exogenous system (exosystem). The problem described above will be referred to as the output regulation problem. The classical output regulation was extensively studied in (Francis and Wonham, 1976; Fran-

cis, 1977) for linear systems. For nonlinear systems, the problem was first studied in (Hepburn and Wonham, 1981), and solutions to the output regulation of nonlinear systems have been presented in (Huang and Rugh, 1990; Isidori and Byrnes, 1990) using “full information” which includes the measurements of exogenous signals as well as of the system state. The necessary and sufficient conditions for the existence of a local full information solution of the classical output regulation problem are given in (Isidori and Byrnes, 1990; Huang and Rugh, 1990); they basically mean that the linearized system is stabilizable and there exists a certain invariant manifold. The classical output regulation via error feedback has been solved in (Byrnes et al., 1997; Isidori, 1995) by application of system immersion technique. The plant uncertainty parametrized by unknown constant parameters is treated as a special case of exogenous signals and the solution, extended from the error feedback regulation, is referred to as the structurally stable regulation in (Byrnes et al., 1997). The basic approach, introduced by (Isidori and Byrnes, 1990), uses the solution of the so called regulator equation. Its solution is obtained offline since it is based on the model of the plant and on the exosystem only. However this equation is in fact a system of partial differential equations (PDE) combined with algebraic restrictions. Solvability of such systems of equations is still a complex issue with a number of open problems. Moreover the regulator equation does not fit into the usual framework of partial differential equations - it is a first-order problem on the whole space Rn (n being the number of independent variables which is equal to the dimension of the exosystem) with singularity in its coefficients. The results concerning solvability of the regulator equation that exist so far are based on a geometrical approach and require a special structure of the controlled system. The most simple situation is when both the controlled plant and the exosystem are hyperbolically minimum phase, see (Isidori and Byrnes, 1990). (Huang, 2003) shows that the regulator equation can be reduced to the partial differential equation part for a quite general class of systems together with algorithms for the solution of this PDE. Nonetheless these algorithms require laborious symbolic computation and are not easy to implement as an universal algorithm. This is because they are based on an undetermined power series technique (Huang, 2000; Huang, 1995). Universal algorithms for the solution of the regulator equation based on the finiteˇ element method were introduced in (Celikovsk´ y, ˇ Reh´ak, 2004a; Celikovsk´ y and Reh´ak, 2004b). The difficulties met while solving the regulator equation were overcome by adding an additional term

ˇ in (Celikovsk´ y, Reh´ak, 2004a) while the satisfaction of the algebraic equation is approximated by numerical minimization of a certain functional in ˇ (Celikovsk´ y and Reh´ak, 2004b). The aim of this paper is twofold: first, a further variant of an universal algorithm for solving regulator equation is provided. This algorithm does not refer to a particular structure of the controlled system. Instead it uses a ”regularization” of the algebraic equation by adding a small term containing first derivative with respect to time of the control. The regulator equation is then a system of first-order PDE’s which can be solved by the finite-element method. The package FEMLAB was used for solving this equation. Some results concerning solvability of such systems are presented. Secondly, the control algorithm is verified on the task of control of a real system - a model of gyroscope. Simulations of the controlled gyroscope and real-time results are presented to demonstrate suitability of this approach. The paper is organized as follows: some preliminary facts are presented in the second section. In the third section, the algorithm is introduced in detail. Section 4 contains a brief description of the model of the gyroscope while the simulations as well as the real-time results are contained in the fifth section. Concluding remarks are collected in the final section. 2. THE OUTPUT REGULATION PROBLEM At this stage some facts on nonlinear output regulation problem are recalled (Isidori and Byrnes, 1990; Huang, 2000; Huang, 1995). Consider the plant x˙ = f (x(t)) + g(x(t))u(t) + p(x(t))v(t)) (1) y(t) = h(x(t)), where sufficient smoothness of the vector fields f, g, p and row functions of h is assumed. Further, x(t) ∈ Rn is the state, u(t) ∈ Rm is its input, y(t) ∈ Rp its output and w(t) ∈ Rν is the socalled exogenous signal. This signal is generated by the so-called exosystem which is supposed to be known and linear, i.e. for a known (µ × µ)-matrix S and a known (ν × µ) matrix Q the exosystem is given by v˙ = Sv, w = Qv.sometimes called neutral stability. Thereby, exogeneous signal is used to describe both reference to be tracked and undesired disturbance to be rejected. This leads to the output regulation problem, which may be tackled by various kind of feedback compensators. The full information output regulation problem (full information: all the states are measured, hence no observer necessary) consists in finding the feedback compensator u = α(x, v) such that

(1) if no exogenous signal is present the equilibrium x = 0 of the controlled system is exponentially stable (2) there exists a neighborhood U ⊂ Rn+µ of (0, 0) such that for each initial condition (x(0), v(0)) holds lim (h(x(t)) − w(t)) = 0.

t→+∞

This problem requires a solution of the regulator equations ∂x(v) = f (x(v)) + g(x(v))u(v) vS ∂v

(2)

together with the conditions h(x(v)) = w, and x(v) = 0 for v = 0.

(3)

for the unknown functions x(v), u(v). Then the control scheme might be expressed in the form: u(t) = −K(x(t) − x(v(t))) + u(v(t)). Here, the meaning of the variables is as follows • u(t) is the control at the time t, • v(t) is the state of the exosystem at the time t, • x = (x1 , x2 )T is the state of the system (1), • v(t) is the state of the exosystem, • x(v), u(v) is the solution of the system of equations (2), • K is a matrix so that u = −Kx is a stabilizing feedback for the approximate linearization of the system (1).

3. THE CONTROL The system of the regulator equations possesses two features that make it difficult to handle. First one sees the system is a set of algebraicdifferential equations. On the other hand there is no differential equation for the control u. The idea how to solve the system is to replace the algebraic condition (3) by a differential equation εu˙ = ϕ(x, u, v)

(4)

with a small constant ε. The most natural choice of the function ϕ could be ϕ(x, u, v) = h(x(v)) − Qv. However this choice causes several difficulties as will become apparent below. The complete system of equations is then x˙ = f (x) + g(x)u εu˙ = ϕ(x(v), v, u)

if the parameter ε is replaced by zero the equation changes the type, namely from a differential equation into an algebraic one. Obviously if ε → 0 then the equation (4) turns into (3). Nevertheless it is far from being clear that this condition guarantees also convergence of the obtained solutions to a limit. In the following text we attempt to give some conditions of convergence. Several results concerning solvability of the set of singularly perturbed equations are contained in (Tichonov, et al., 1980; Vasil’eva, Butuzov, 1973; Artstein, 2002). The major result (fitted to the above control problem) is cited here. Theorem 1. Let the following assumptions on the system (5) hold: (1) The function u : C → R such that 0 = ϕ(x, v, u) is continuous on an open neighborhood C of x(0). (2) For each x ∈ C the point y(x) is a locally asymptotically stable equilibrium of the equation du = ϕ(x, v, u). (7) ds (3) The solution of the equation (7) is uniquely determined by the initial conditions. (4) The initial condition y(0) is in the basin of attraction of y(x) where y(x) solves the equation (7) with the initial condition x(0). (5) The equation dx = f (x, y(x)), x(0) = x0 dt has a unique solution x0 . Then the solutions of the perturbed system (5) converge to the solution of the equation (1) if ε → 0. A condition that guarantees the solution y(x) to be an asymptotically stable equilibrium can be found in (Tichonov, et al., 1980). It requires validity of the inequality ∂ϕ ∂u < 0 (consult (Tichonov, et al., 1980) for details). Nonetheless this condition excludes the most natural choice of the function ϕ : ϕ(x(v), v1 , u(v)) = h(x(v)) − Qv.

(8)

Unfortunately the natural choice (8) does not admit to apply another results. The problem is that the system (5) together with the condition (8) build up an index 2-algebro-differential equation. For example the method described in (Khalil, 1987) seems not to be applicable.

(5)

This yields the set of center-manifold equations

(6)

∂x1 (v) = f (x(v)) + g(x(v))u(v)) ∂v ∂u(v) = ϕ(x(v), u, v) εvS ∂v

This system is singularly perturbed (Tichonov, et al., 1980; Vasil’eva, Butuzov, 1973). This means

vS

(9)

The equations describing this system, obtained from the dynamics of the system and the physical parameters, are as follows a1 α ¨ + a2 ψ˙ cos α + a3 ψ˙ 2 sin α cos α = a4 tan α b1 ψ¨ + b2 cos2 αψ¨ + b3 sin2 αψ¨ + b4 α˙ cos α (10) ˙ +b5 ψ˙ α˙ sin α cos α = b6 u + b7 ψ. Thee angle α defines the angular position of the structure with the rotor with respect to the gyro module, angle ψ is located between the gyro module and the support plate, and the control input u is the voltage applied to the DC motor.

Fig. 1. The gyroscope The system of equations is defined on the whole space Rn . Since the solution cannot be found exactly in general one has to apply a numerical method. Due to this one must restrict the domain where the system is solved such that all the trajectories of the exosystem which will be computed in future lie in the restricted domain. However another problem appears. Having restricted the domain an ”artificial” boundary appears. Some numerical software packages allow leaving the boundary conditions undefined. The condition xi (0) = 0, u(0) = 0 is satisfied if for example the following condition holds: 0 = f (x) + g(x)u, 0 = ϕ(x, 0, u) ⇒ x = 0, u = 0. The remaining point is to find a stabilizing state feedback matrix K. Its choice does not influence the design of the feedforward above.

The constants ai , bi were found by identification. Their values are as follows: a1 = 0.005443, a2 = 0.47174, a3 = −0.0004879, a4 = 2.461092, b1 = 0.002, b2 = 0.000847, b3 = 0.001335, b4 = −0.4717 Converting the equations (10) into a system of first order and introducing the notation ψ = x1 , ψ˙ = x2 , α = x3 , α˙ = x4 one obtains x˙ 1 = x2 a2 a3 2 a4 tan x1 − x4 cos x1 − x sin 2x1 x˙ 2 = a1 a1 2a1 4 (11) x˙ 3 = x4 b5 b6 u + b7 x4 − b4 x2 cos x1 − 2 x4 x2 sin 2x1 x˙ 4 = b1 + b2 cos2 x1 + b3 sin2 x1 The position of the plate is considered as the output. Thus the first two equations express the zero dynamics. The system is not minimum phase. Our task is to design a control so that the output tracks the trajectory x3 = k sin t, k ∈ R. This corresponds to the case if the exosystem were v˙ 1 = ωv2 , v˙ 2 = −ωv1 .

4. THE GYROSCOPE Gyroscopes are used to measure the angular movement with respect to a fixed structure, and are a key component of plane automatic pilots, rocket guidance systems, spatial vehicle altitude systems, navigation gyrocompasses, etc. (Cannon, 1967). Regarding previous works on the control of gyroscopes, in (Ruiz-Le´on et al., 2002) H2 and H∞ techniques are applied to the real-time of a gyroscope using a polynomial approach. The system considered in this work is a gyroscope of two axes, shown schematically in Fig. 1, which is a lab experiment developed by Quanser Inc. (see www.quanser.com). The gyroscope consists basically of the following components: a support plate holding the gyro module with a rotor which rotates at a constant speed, its movement being produced by a DC motor, sensors for the angles α and ψ, and a data acquisition card connecting the gyroscope to a computer.

(12)

The algebraic condition then reads 0 = v1 − x1 . ∂x1 ∂v1 ∂x2 ω(v2 ∂v1 ∂x3 ω(v2 ∂v1 ∂x4 ω(v2 ∂v1

ω(v2

∂x1 ) ∂v2 ∂x2 − v1 ) ∂v2 ∂x3 − v1 ) ∂v2 ∂x4 − v1 ) ∂v2 − v1

= x2 = F1 (13) = x4 = F2

where a4 a2 a3 2 tan x1 − x4 cos x1 − x sin 2x1 a1 a1 2a1 4 b5 b6 u + b7 x4 − b4 x2 cos x1 − 2 x4 x2 sin 2x1 F2 = b1 + b2 cos2 x1 + b3 sin2 x1

F1 =

together with the algebraic condition. This condition is replaced by a perturbed equation εu˙ = v1 − x1 .

(14)

The output and the reference 0.3 x3(t), v1(t)

(rad)

0.2

0.1

0

−0.1

−0.2

−0.3

5

10

15

20

25

30

35

40 t (sec)

Fig. 2. The Simulink simulation - the output This equation does not satisfy the stability condition from the Theorem 1. The additional equation to the system of the regulator equation is ∂u ∂u εω(v2 ∂v − v1 ∂v ) = v1 − x1 The system of equa1 2 tions was numerically solved using the finiteelement method with ε = 10−6 . The software package FEMLAB was used for the solution. This is a Matlab-compatible PDE solver. Besides the ability to cooperate with Matlab it contains fairly powerful algorithms for the solution of quite general PDE’s which was of a great advantage for our purpose. The equations were solved on a circle centered at the origin and with radius 2. This was sufficient for the evaluation of the trajectory since the maximal amplitude was 1. FEMLAB enables to leave some boundaries with undefined boundary condition which was used here. At the end the matrix K providing the stabilizing feedback control was designed as follows: K = (−26.8688, −0.1360, −3.1623, 2.5637).

5. SIMULATIONS AND REAL-TIME RESULTS Numerous simulations were carried out on the described system as well as on its Simulink model. The task was to track the trajectory w(t) = 0.3 sin t by the plate, this means, by the state x3 . First, the designed control scheme is applied to the model of the gyroscope using the Simulink diagram. The output (the state x3 ) together with the reference is shown in Fig. 2. The solid line is the output while the dashed line is the reference signal r(t) = 0.3 sin t. The initial conditions for this simulation as well as for the real-time results (see below) were equal to 0. The next step is to apply the designed control scheme to the physical system in real time. The diagram is shown in 3. The derivatives of the angles (state variables x2 and x4 ) are obtained from the corresponding angles using a derivative

Fig. 3. The Real-time Workshop scheme of the gyroscope The output and the reference 0.5

3

0

x (t),w(t)

−0.4

0.4

0.3

0.2

0.1

0

−0.1

−0.2

−0.3

−0.4 0

5

10

15

20 t(sec)

25

30

35

40

Fig. 4. The trajectory x3 (t) and the reference function from Matlab, since the values of these variables are not available from the physical system. Additionally, to avoid highly changing values of the outputs of the derivative blocks due to introduced noise, a low-pass filter is also used to smooth the signals. Applying the designed control scheme in real time to the physical system, the support plate of the gyroscope rotates relative to the gyro module describing a sinusoidal signal with approximate amplitude of 0.3 rad (16.8 degrees) as expected. The output of the gyroscope in real-time is shown in 4, as well as the reference signal generated by the exosystem. It can be seen that the output of the system is very similar to the reference signal, showing a satisfactory performance of the control scheme in real-time. The error (the difference of these two signals) can be seen in figure 5. All the states of the gyroscope are depicted in figure 6. The upper subplot shows the states x1 and x2 , also the position and the velocity of the gyro module. The lower subplot shows the position and the velocity of the plate (denoted by x3 , resp. x4 ).

6. CONCLUSION A method for solving the regulator equations was presented. This system contains an algebraic

The tracking error 0.2

0.1

0

error

−0.1

−0.2

−0.3

−0.4

−0.5 0

5

10

15

20 t(sec)

25

30

35

40

Fig. 5. The tracking error The states of the gyroscope 1.5

x 1 x

1

2

x (t),x (t)

1

2

0.5 0 −0.5 −1 0

5

10

15

20 t(sec)

25

30

35

1

40

x 3 x

x3(t),x4(t)

4

0.5

0

−0.5 0

5

10

15

20 t(sec)

25

30

35

40

Fig. 6. The state of the gyroscope equation. The method presented here is based on adding a term that converts an algebraic equation into a differential one. Nonetheless the system obtained is singularly perturbed. Conditions of solvability are presented. The method was applied to the control of a model of a gyroscope. Extensive simulations were carried out. Although the realtime results are not as perfect as in the simulations, which is quite normal, we consider them to be satisfactory. The discrepancy between the output of the system and the reference signal can be due to a number of factors. For instance, the fact that the derivatives of the angles are approximated by a Matlab function instead of using the real values, which are not available, introduces a considerable source of error. Some other aspects to be considered are non-modelled dynamics, errors in the measurement of the signals, etc. A detailed study of these phenomena as well as the design of techniques to eliminate them remains a challenge for the future work.

REFERENCES Artstein, Z. (2002). On singularly perturbed ordinary differential equations with measurevalued limits. Mathematica Bohemica, 127, 139–152.

Byrnes, C. I., F. Delli Priscoli, A. Isidori and W. Kang (1997). Structurally stable output regulation of nonlinear systems. Automatica, 33, 369–285. Cannon, R.H. (1967). Dynamics of physical systems. McGraw-Hill, New York. ˇ Celikovsk´ y, S., B. Reh´ak (2004a) Universal algorithm for the solution of the regulator equation. To appear in: NOLCOS 2004. ˇ Celikovsk´ y, S. and B. Reh´ak (2004b) Output regulation problem with nonhyperbolic zero dynamics: a FEMLAB-based approach. To appear in: SSSC 2004. Francis, B.A. and W. M. Wonham (1976). The internal model principle of control theory. Automatica, 12, 457–465. Francis, B.A. (1977). The linear multivariable regulator problem, SIAM Journal on Control and Optimization, 15, 486–505. Hepburn, J.S.A. and W.M. Wonham (1981). Error feedback and internal models on differentiable manifolds. IEEE Transactions on Automatic Control, 29, 397–403. Huang, J. and W.J. Rugh (1990). On a nonlinear multivariable servomechanism problem. Automatica, 26, 963-972. Huang, J. and W.J. Rugh (1992). Stabilization on zero-error manifolds and the nonlinear servomechanism problem. IEEE Transactions on Automatic Control, 37, 1009-1013. Huang, J. (1995). Output regulation of nonzero systems with nonhyperbolic zero dynamics. IEEE Trans. on AC, 40, 1497-1500. Huang, J. (2000). Asymptotic tracking of a nonminimum phase nonlinear system with nonhyperbolic zero dynamics. IEEE Trans. on AC, 45, 542–546. Huang J. (2003). On the solvability of the regulator equations for a class of nonlinear systems. IEEE Trans. on AC, 48, 880-885. Isidori, A. Nonlinear control systems. Third Edition (Springer, New York, 1995). Isidori, A. and C. I. Byrnes (1990). Output regulation of nonlinear systems. IEEE Transactions on Automatic Control, 35, 131–140. Khalil, H. K. (1987). Stability analysis of singularly perturbed systems. In: Singular perturbations and asymptotic analysis in control systems. Springer, Berlin. Ruiz-Le´on, J., J.L. Orozco-Mora and D. Henrion (1992). Real-time H2 and H∞ control of a gyroscope using Polynomial Toolbox 2.5. In: Latin-American Conference on Automatic Control CLCA 2002, Guadalajara, Mexico. Tichonov, A. N., A B. Vasil’eva and A. G. Sveshnikov (1980). Differential equations. Nauka, Moscow. (in Russian) Vasil’eva, A. B. and B. F. Butuzov (1973). Asymptotic expansions of solutions of singularly perturbed equations. Nauka, Moscow. (in Russian)