The CRONE toolbox for Matlab

1 downloads 0 Views 371KB Size Report
Abstract: A new CAD tool: the CRONE Matlab toolbox, is presented for engineers and researchers in mathematics and engineering sciences, particularly for ...
The CRONE toolbox for Matlab A. Oustaloup, P. Melchior, P. Lanusse, O. Cois and F. Dancla Laboratoire d’Automatique et de Productique (LAP) - EP 2026 CNRS Equipe CRONE Université Bordeaux 1 - ENSERB 351 cours de la Libération - F33405 Talence Cedex - France Phone +33 (0)556 846 607 - Fax +33 (0)556 846 644 [email protected] ; [email protected] Abstract: A new CAD tool: the CRONE Matlab toolbox, is presented for engineers and researchers in mathematics and engineering sciences, particularly for electrical and electronic engineering and automatic control. The originality, aims, form and use of the toolbox are presented. The three main modules are described: their content, principle, algorithms, and applications for identification and control. Examples of their use are given. The original theoretical mathematical concepts developed in our laboratory based on non integer differentiation are used for the computation. CRONE control (French abbreviation for Non Integer Order Robust Control) is a typical application. The toolbox is not only for researchers, including Ph.D students, but also for industrials whose growing interest in non integer integration, and their readiness to invest in the development of its applications, are manifest. The paper is divided into four sections: aims and organization of the toolbox, "Mathematical tools" module, "Identification by non integer model" module, and the "CRONE CSD" module. The final section discusses perspectives. Keywords: Automatic control, Matlab toolbox, Computer Assisted Design, Control System Design, Industrial techniques, Non-integer differentiation, Fractional calculus, Identification by non integer model, CRONE control.

I. INTRODUCTION I.1. The CRONE toolbox The various modules of the CRONE toolbox have been developed gradually since the beginning of the nineties. There have been many publications, including various theses, and patents in 1993 and 1994 [1][13]. Each module deals with a specific application theme of non integer differentiation. Some modules were initially programmed in Pascal for MSDOS using the High Screen generation tool. These modules have been rewritten for Matlab under Windows. Matlab 5.3 provides an environment for analysis, visualization and development, and is the international standard in automatic control. It is used by most university and industrial research and development laboratories. It uses both numerical and symbolic computation and offers visualization functions and a high level programming language. The choice of Matlab for Windows was particularly due to its numeric and graphic resolution algorithms (Simulink Toolbox), graphic display, the use of numeric results, ease of menu creation, guarantee of continuing evolution of this program which is a standard in many fields, and the widespread use of the Windows environment by potential users. I.2. Main modules We present three main modules of the Matlab version of the CRONE toolbox:

- "Mathematical tools", including the following units: "Non integer (or fractional) differentiation", "Non integer differential equation", "Non integer characteristic equation", "Non integer complex differential operator", "Inverse Laplace transform of non integer transfer function", "Non integer differential system" - "Non integer system identification", - "CRONE control". At least six main modules will be made available eventually. Through this toolbox we aim to achieve our high scientific priority to make our research results on non integer mathematics widely available. The tools are limited for the moment to the scalar case (one input, one output) to ensure progressive learning for the user. The three modules presented here, developed with the help of the French CNRS and the automobile industry, were chosen to enhance collaboration with any industry concerning non integer computation. I.3. Structure Four access levels are proposed each with a Help menu. Level 1: the various elementary functions that an advanced user needs. The Help menu, ensures all input and output parameters can be clearly identified. Level 2: macro or high level functions for resolving any part or all of a problem. Level 3: access to these functions through structured and user-friendly menus with a standard format, and colour coding. Level 4: demos showing the use of Level 3. They demonstrate the practical and not only the theoretical interest of the toolbox, using concrete application examples studied by our team. II. "MATHEMATICAL TOOLS" MODULE II.1. Introduction Other software tools currently available cannot be used for systems with generalized derivatives (i.e. non integer or complex order derivatives). The "Mathematical tools" module includes all algorithms which allow the use of non integer or complex order derivation.

Fig. 1. Main window The "File" menu is devoted to the management of all

variables : data import, save, etc. There is also a specific menu for each unit of the module. II.2. "Generalized Derivative" unit This unit permits the user to compute the non integer or complex order derivative of time functions from literal expressions or from external data files. The first definition is given by par Rieman-Liouville [19] from the definition of the generalized integral: 1 t f (τ ) t > 0 . (1) I n f (t ) = dτ , with  1− n ∫ 0 (n ) (t − τ ) n∈" In fact, the algorithm is based on a second definition which computes integer, real or complex order derivatives:   n 1 +∞  (2) Dn f (t) = n ∑(−1)k   f (t − kh) . k h k=0  n∈"    Explicit Generalised Derivative of in=10*sin(2.3*t) 30 order 1+0i order 0.3+0i order 0.73+0i order 0.21+0.8i

20

Real part

10

II.4. "Generalized implicit systems" unit This unit simulates the time response of a system with implicit derivatives : 

-30 0

1

2

3

4

5 time (s)

6

7

8

9

10

20 15 10 Imaginary part

"Time Response" simulates the time response. "Bode", "Nichols/Black", and "Nyquist" plot corresponding frequency diagrams.

n  s ) p ,q  Y (s) p  q  . = U (s)  nk ,l  ∑k ∏l (1 + τ k ,l s ) 

∑ ∏ (1 + τ

-20

p ,q

(4)

5 0 -5 -10 -15 -20

0

1

2

3

4

5 time (s)

6

7

8

9

10

Fig. 2. Derivative of 10sin(2.3t) with various non integer orders II.3. " Generalized Differential Equations" unit This unit plots the time response of the SISO or MIMO systems from differential equations with integer, non integer or complex orders [2][5]. The form of differential equation for SISO systems is :

∑ a l D s(t ) =

l =1

Fig. 5. Data entry boxes of input signals

0 -10

L

"New Input Signal" loads the input signals from literal expressions or from external data files, and "Modify Input Signal" filters and plots signals.

nl

Q

∑ aq D

nq

e(t ) , with nq and nl∈". (3)

q =1

II.5. "Generalized Differentiator Synthesis" unit This synthesizes a rational differentiator from non integer differentiator and frequency-band differentiator. The Laplace Transform of the non integer differentiation operator is the generalized differentiator:

 s D gen ( s ) =   ωu

n

  . 

(5)

This differentiator is approximated by a frequency-band differentiator with the same order: s  1+ ω b D (s) =  fband  s 1+ ω h 

n

  .    

(6)

The synthesis of the rational differentiator uses a recursive distribution of real zeros and poles: s  1+ ω hk ( s) = ∏  D  synth s k 1 +   ωbk

Fig. 3. "Differential Equations" Menu Using "New Differential Equations" the system can be defined.

Fig. 4. Data entry boxes of coefficients and orders

  .   

(7)

Users can directly modify values of any parameters in editable boxes. This updates the Bode diagrams. Reciprocally, positions of any zeros and any poles can be shifted using the mouse. This updates the corresponding parameters. The display of Bode diagrams on the same figure provides real time evaluation of degradation due to the approximation of the synthesis.

III.2. Contains and principles The time domain identification module allows the identification of real systems in the time domain using identification methods based on non integer models. Two identification methods are currently available : - identification by non integer AR and ARX models, based on the discretization of a continuous non integer differential equation ; - identification by continuous non integer model, where parameter estimation is directly obtained from a continuous linear regression. In the two cases, the aim of the identification is to estimate the parameters of a continuous non integer differential equation of the form:

Fig. 6. Bode diagrams of generalized differentiator, frequency band and rational differentiator II.6. "Generalized characteristic equation" unit This unit computes polynomial roots with real or complex powers of variable. The resolution depends on the approximation of these powers by rational powers. The roots of this equation are then given thanks to a change of variable to obtain a new polynomial with integer powers. The inverse change of variable permits solving the starting polynomial and thus to determine poles. Poles of a system can be computed with either: denominator of transfer function, evolution matrix of state representation, or eigen value. II.7. "Laplace Transform and Inverse Laplace Transform" unit Other software tools currently available (e.g. Maple© software) compute satisfactorily neither the Laplace transform nor the inverse Laplace transform of functions used in the non integer domain. A new method is thus proposed using the Aitken system. This method computes, with satisfactory precision, the Laplace Transform and the inverse Laplace Transform of real or complex functions. III. "IDENTIFICATION BY NON INTEGER MODEL" MODULE III.1. Introduction The aim of any system identification is to establish a mathematical model capable of reproducing the system’s physical behavior as faithfully as possible from a series of observations. In the time domain, many mathematical models have been developed such as AR, ARX and ARMAX [18]. Studies on real systems such as thermal [16] or electrochemical, reveal inherent non integer (or fractional) differentiation in their behavior. The use of integer models is thus inappropriate in identifying these non integer systems. Thus, a new model category, called non integer models, based on the concept of non integer differentiation has been developed [6]. The "Identification by non integer model" module results from work of the CRONE team during the last ten years. It will be composed in the long term of two modules: - a first module for time domain identification; - a second module, being developed, for frequency domain identification.

(n 1 ) y(t ) + L + (n ) D 1 u (t ) + L +

D

1 1

I J

(n I ) y(t ) = (n ) D J u (t ) + e(t )

D

(8)

where e(t) denotes the equation error. Identification by non integer AR and ARX models. The method is completely described in [6] or [16] and summarized below. The estimation procedure is based on the discretization of the equation (8) using the discrete definition of non integer differentiation [11]: n

n  d  1 K   f (t ) = (− 1)k   f (t − k h ) , (9) n ∑ k d t h k =0     h being the sampling period, and t = Kh. Isolating y(kh), we can rewrite equation (1) as: I

y (t ) =



αi

i =1 h

 nα i   y (t − k h )  k 

K

∑ (− 1)k 

nai

k =1

I



αi

i =1 h

βj

J



j =1 h

nb j

nai

.

 nβ j   u (t − k h )  k 

K

∑ (− 1)k 

k =0

I



αi

i =1 h

+

+

nai

(10)

e(t ) I



αi

i =1 h

na i

This relation being nonlinear with respect to parameters (α 1 , L , α I , β 1 , L , β J ) , a change of variables allows the output to be expressed by a linear relation in a new set of parameters ˆ = (a , L , a , b , L , b ) by: r

1 I

I

1

J

J

y (t ) = −∑ a i Yi (t ) + ∑ b j U j (t ) + e~ (t ) , i =1

(11)

j =1

where the new set of parameters is given by β

αi ai =

h I



j =1

j nβ j

nα i

α h

, 1 ≤ i ≤ I and b j = h I αi

j



j



i =1

h

,1 ≤ j ≤ J

(12)

nα i

scalar functions Yi (t ) and U j (t ) being defined from past outputs and inputs. Due to the linearity of y(t) with the new parameters, a least square technique is now applicable, as described in [6], the initial parameters characterizing the continuous non integer model being determined by solving a linear equation system. Identification by continuous non integer model. This method results directly from the generalization of classical

continuous equation error methods. Two methods providing an estimation of the parameters of model 8 are proposed. In the first method, a direct continuous linear regression is built. The parameters are then estimated using a classical linear least square method. In the second method, the non integer model is integrated and a continuous linear regression containing only integration is built. The parameter estimation is then obtained by a classic linear least square method. III.3. Graphic interface The graphic interface is composed of a main window containing 4 menus (Figure 7).

Fig. 9. System and model output graphs Fig. 7. Main window “File” menu. This menu is devoted to the management of all variables: import identification data, save estimated models, etc. “Data sizing” menu. Its filters and plots identification and validation data. “Identification methods” menu. Its proposes the choice and design of the identification method: non integer AR or ARX model / continuous non integer model. “Identification results” menu. All the results of model estimations are managed by this menu: residue plotting, model pole locus, model validation plotting (Figure 8).

IV. CRONE CSD MODULE IV.1. Introduction This unit of the Crone (the French acronym which means non-integer order robust control) software results from theoretical and software developments begun in the 1980’s. SISO Crone CSD [8] is a linear frequency approach for the robust control of perturbed plants under the common unityfeedback configuration. Three Crone CSD methods have been developed, successively extending the application field. In these three methods the controller or open-loop transfer function is defined using integro-differentiation with non-integer (or fractional) orders. IV.2. Contains and Principles IV.2.1. Perturbed plant modeling The interest of using Crone CSD lies in the fact that it permits the genuine uncertainty domains of the plant (owing to the absence of norms) being taken into account, whether structured or not. So, from the set of all the realistic plant frequency responses, and from the one chosen as nominal, the software determines a set of uncertainty domains as polygonal convex hulls for a set of well-chosen frequencies.

Fig. 8. “Identification results” menu III.4. Example An application to a real thermal system identification has been performed [16]. According to the laws of physics, the system behavior is characterized by non integer order differentiations. Using a non integer ARX model, the software provides this estimated model:

1.85e − 2 D1.5 y (t )− 1.85e − 1 D 1 y (t ) + D 0.5 y (t ) = − 4.22e − 3 D 0.5 u (t ) + 2.378e − 2 u (t ) + e(t )

. (13)

Figure 9 shows identification results of 2 models which permit the user to compare the performance of two estimated models: the non integer ARX model and an integer continuous model.

IV.2.2. Specifications In the following steps, required specifications need to be set. They are: speed (for example the open-loop gaincrossover frequency ωcg which is close to the closed-loop cut-off frequency); stability degree (overshoot O or magnitude peak Q); accuracy; and the four sensibility functions: sensibility function S, complementary sensibility function T, input sensibility function CS, and sensibility function GS. Figure 10 shows how specifications on complementary sensibility function T can be modified. Then, one of the three Crone CSD methods is selected considering the nature of the plant, the plant uncertainty and the specifications. IV.2.3. First Crone CSD method At the time of plant perturbations, the phase margin variation results from the variations of the plant and controller phases versus the frequency around the required open-loop gain crossover frequency ωcg The first Crone CSD method is based on a constant phase of

the controller around ωcg obtain through a band-limited real non-integer differentiator transfer function:

 1+ s ωl C ( s ) = C 0  1+ s ωh

n

  with C0, ωl, ωh and n ∈ 3 . (14) 

The achievable version Cin(s) [7] of the controller, which can be implemented, is defined from a rational transfer function resulting from of a recursive distribution of real negative zeros and poles: N 1 + s ω ’i

C in ( s ) = C 0 ∏ and

with C0, ω’i, ωi, N ∈ µ (15) i =1 1 + s ω i ωi ω’ ωh log α = α , i +1 = η , n = ,N = . (16) log αη ω ’i ω ’i αηω l

The perfect robustness of the phase margin is ensured only if ωcg is within a constant phase frequency range of the plant (only gain-like plant variation). When such a frequency range can not be used the second Crone CSD method can be used.

vertical Nichols locus does not slide on itself. It is more convenient to consider a Nichols locus that is still defined as a straight line segment (around frequency ωcg) for the nominal parametric state of the plant, but with any direction. The open-loop transfer function is now defined from the real part with respect to imaginary unit i of a complex non-integer integrator transfer function:

(

)

β (s ) = 5H /i ω cg s n with n = a + ib ∈ " i and s = σ + jω ∈ " j .

(19)

The real order a determines the phase placement of this Nichols locus (called generalized template), and then the imaginary order b determines its angle to the vertical. From an infinity of these templates which tangent the magnitude contour related to a required magnitude peak Qr for the nominal parametric state of the plant, the optimal template can be defined as the template which permits minimization of the variations of Q stemming from the uncertainty domains which in turn stem from the various parametric states of the plant. As previously, the open-loop is in fact defined by:

IV.2.4. Second Crone CSD method For problems of control effort level, it is sometimes impossible to choose a ωcg within an asymptotic behavior frequency band of the plant. Nevertheless, as Bode first stated for the "design of single loop absolutely stable amplifiers" whose tube gains vary, the robust controller is the one which permits the open-loop transfer function to be defined by a constant phase in a useful band. So, the Crone approach defines the open-loop transfer function around ωcg from the open-oop transfer function of a non-integer integrator:

(

)

β (s ) = ωcg s n with n ∈ 3.

(17)

The vertical sliding of the vertical Nichols locus (called vertical template), due to gain variation ensures the constancy of the phase margin, of the magnitude peak Q, of the modulus margin (the minimal distance between the open-loop Nyquist locus and the critical point) and of the damping ratio of the closed-loop system. For the Crone controller to manage accuracy, robustness and control effort problems, using integer orders nl and nh, the open-loop is in fact defined by: s  n  1+  l  ωh  ωl β ( s ) = K  + 1    1+ s  s  ωl 

     

n ak ω −  l N +  1 + s / ω − N k +1    β (s) = K +1 ∏   s   1 + s / ω k    k = − N −  −sign (bk )  ibk   (20)    1 + s   − nh      s  ω k +1  1 + 5H /i  Ck   ω    s    1+ N + +1      ωk      

where (N++N-+1) ∈ µ is a small number of band-limited complex integrators. Taking into account all the specifications, the optimization process of the independent parameters of (20) is made easier by the use of few integration orders (high-level parameters). Figure 12 shows the result obtained using the aided optimization mode of the software. The Constr function of the Optimization Toolbox can also be used in an automatic mode.

n

 s 1 + ω h 

  

− nh

.

(18)

The non-integer controller Cni(s) is defined by the ratio of nominal open-loop and plant frequency responses: C ( jω ) = β ( jω ) G 0 ( jω ) . To aid synthesis of the low integer order transfer function of real controller Cin(s), ideal frequency response Cni(j ω) is identified by a rational integer model (Figure 11). IV.2.5. Third Crone CSD method For more general cases than gain-like plant variations, the

Fig. 10. Modification of frequency bound telated to complementary sensibility function

Fig. 11. Aided synthesis of the rational controller from is desired frequency response

Fig. 12. Aided optimization of open-loop parameters V. CONCLUSION New developments are being added to the "Mathematical tools" module, for example the extension of time simulation of implicit systems to MIMO systems and the use of struct variables to define generalized systems. Two identification methods by non integer models are proposed by this module. The graphic interface permits the user to estimate and compare a variety of models. In the future, a third method, based on the modal decomposition of a non integer system, will be proposed. Three Crone CSD method are proposed in the CSD unit for the control of SISO plants: unstable plants [8][12][14] nonminimum-phase plants, plants with bending modes, and discrete-time control problems. Crone control has also been extended to MIMO, nonlinear and time variant plants VI. REFERENCES [1] APP (Agence pour la Protection des Programmes) - N° 93.30.006.00 (IDDN.FR.001.300006.00.R.P.1993.000. 00000-28/07/1993 & N° 94.11.015.00 (IDDN.FR.001. 110015.00.R.P.1994.000.00000)-16/03/1994. [2] M. Bansard - Du formalisme de la dérivation généralisée à l'unité "Outils Mathématiques" du logiciel

CRONE - Thèse de Doctorat, Université Bordeaux 1, 29 Juillet 1993. [3] H. W. Bode - Network Analysis and Feedback Amplifier Design - Princeton, NJ : Van Nostrand, 1945 [4] P. Lanusse - De la commande CRONE de première génération à la commande CRONE de troisième génération - Thèse de Doctorat, Université Bordeaux 1, 14 Février 1994. [5] F. Nanot - Dérivateur généralisé et représentation généralisée des systèmes linéaires - Thèse de Doctorat, Université Bordeaux 1, 10 Janvier 1996. [6] L. Le Lay - Identification fréquentielle et temporelle par modèle non entier - Ph. D. Thesis, Université de Bordeaux 1, 20 Octobre 1998. [7] A. Oustaloup - La commande CRONE - HERMES Ed., Paris, 1991. [8] A. Oustaloup et B. Mathieu - La commande CRONE : du scalaire au multivariable ; 2ème Edition revue et augmentée - HERMES Ed., Paris, 1999. [9] A. Oustaloup, B. Mathieu et P. Lanusse - An overview of the CRONE Control - JESA Vol.32, N°1, Mars 1998. [10] A. Oustaloup - La robustesse : analyse et synthèse de commandes robustes - HERMES Ed., Paris, 1994. [11] A. Oustaloup - La dérivation non entière, théorie, synthèse et applications - HERMES Ed., Paris, 1995. [12] J. Bernussou - Commande robuste : développements et applications - Editions HERMES, 1995. [13] A. Oustaloup, P. Lanusse et P. Melchior - Le logiciel CRONE - Elisa'97, Journées d'Etude sur les Logiciels pour le traitement de l'Image, du Signal et l'Automatique, Organisées dans le cadre du Club EEA Nancy, 25 et 26 Mars 1997. [14] A. Oustaloup, B. Mathieu et P. Lanusse - Intégration non entière complexe et contours d'isoamortissement RAIRO-APII, Vol. 29, N°2, pp. 177-203, 1995. [15] A. Oustaloup, B. Mathieu and P. Lanusse - The CRONE control of resonant plants : application to a flexible transmission - European Journal of Control, Vol. 1, N°2, pp. 113-121, Ed. SPRINGER, 1995. [16] J.-L. Battaglia, L. Le Lay, J.-C. Batsale, A. Oustaloup and O. Cois - Heat flow estimation through inverted non integer identification models - International Journal of Thermal Sciences, Vol. 39, N°3, pp 374389, Mars 2000. [17] R. Darling and J. Newman - On the short behavior of porous intercalation electrodes - J. Electrochem. Soc., Vol. 144, N°9, September 1997. [18] L. Ljung - System identification: theory for the user Prentice Hall, London, 1987. [19] S.G. Samko, A.A. Kilbas and O.I. Marichev Fractional integrals and derivatives: theory and applications - Gordon and Breach Science Publishers, 1993. [20] T. Söderstrom and P. Stoïca - System identification Prentice Hall International, London, 1989. [21] J.-C. Trigeassou, T. Poinot, J. Lin, A. Oustaloup and F. Levron - Modeling and identification of a non integer order system - ECC'99, European Control Conference, Karlsruhe, Germany, 1999. [22] P. Melchior, P. Lanusse, F. Dancla et O. Cois Valorisation de l'approche non entière par le logiciel CRONE - CETSIS-EEA'99, Montpellier, 4-5 Novembre 1999.