Filter-based Approximated Models for Discrete-time Systems

0 downloads 0 Views 352KB Size Report
Key-Words: - Modeling, Discrete-time systems, System identification, Multirate sampling, LTI (linear ... that nowadays the processing and control of physical.
Filter-based Approximated Models for Discrete-time Systems. Application to Multirate Sampled LTI Systems AITOR J. GARRIDO, MANUEL DE LA SEN and RAFAEL BÁRCENA Instituto de Investigación y Desarrollo de Procesos (IIDP). Dpto. de Electricidad y Electrónica Facultad de Ciencias Universidad del País Vasco Leioa, Bizkaia, Apdo. 644 de Bilbao, 48080 SPAIN

Abstract: - This paper deals with the task of obtaining approximated models of discrete-time systems by the use of parametrical identification algorithms. Firstly, a filter-based identification method used to obtain a parametric model from a series data of the impulse of the system based in Leverrier’s algorithm is revised. A second method based on least squares minimization that allows identifying the discrete system from input-output data is also presented. These techniques are of particular practical interest when treating discrete-time systems where the analytical resolution becomes very complex or even unfeasible. This is the case of the problem presented in the examples, where a multirate sampling technique is used to discretize the system under real sampling. This strategy yields a better description than that obtained using the traditional sampling method, but it involves a difficult treatment of parametrical model in terms of the poles and zeros due to the complexity of the resulting discrete transfer functions, but where a measured data series of the output is available. Key-Words: - Modeling, Discrete-time systems, System identification, Multirate sampling, LTI (linear time invariant) systems.

1 Introduction Modeling approximated models for discrete-time LTI systems via parameter identification using discrete-time data is an important subject which has numerous applications ranging from control and signal processing, to industrial robotics and aerospace. The interest on the study of discrete-time systems model synthesis is obvious, if we consider that nowadays the processing and control of physical processes is made using computer-based systems, which deal with discrete data even when that physical problems are inherently continuous. In this paper two identification methods are revised and presented in order to obtain a parametric model from measured available input-output data series. This can be very useful when the analytical resolution using Z-Transforms, becomes very complex or even unfeasible as in the case studied in [6], or when the continuos transfer function is unknown but the sampled output sequence is available for measurement. Note that, in discrete-time domain, it is always possible to obtain a transfer function containing all the information of the system

by making coincide the sampling rate with the points of the obtained time series (see [7-9]). The paper is organized as follows: Section 2 presents some background material on system identification and a brief explanation of the problem to deal with, namely, the application of identification methods to the use of multirate sampling techniques in the discretization of continuous systems. Section 3 provides an analysis of the method used in the rest of the paper. In Section 4, some examples with their illustrative simulations are given, and, finally, conclusions end the paper in Section 5.

2 Background 2.1 On system identification The continuous physical processes are mostly controlled by computer-based strategies incorporating discrete-time dynamic models whose parameters need to be controlled. In cases where the system exhibit significant non-linearity or simply the analytical derivation of a dynamic model is complex,

this model development task stands as one of the primary obstacles to industrial application of highperformance control strategies. This task may be carried out via direct empirical modeling considering a set of discrete-data output from simulations of the complex analytical models previously obtained of the system. The specification of the structure of this discrete-time dynamic model is critical in the goodness of the design process, as it will be shown in Section 4, and is strongly influencing by both the analytical model used to obtain the data and the desired accuracy of the resulting identification problem. This the case of the problem presented below (see [6]), where a multirate sampling technique is used to discretize the system yielding a better description than that obtained using the traditional sampling method, but involving a difficult treatment of the pole-zeros due to the complexity of the resulting discrete transfer functions. A first attempt to overcame this problem was developed in [15], using the discrete impulse response of the system to provide a data series, in terms of sampled inputoutput pairs, together with a filter of adequate order to derive a discrete model representing the system by identifying coefficients via Leverrier's algorithm [14].

real sampling case. Thus, T0=ε⋅T =(p+s)⋅T′, with p being p=max z∈Z+ / p⋅T′≤ ε⋅T and s∈[0,1) as figured out in Figure 2. This is very useful when dealing with hybrid systems (i.e., systems involving mixed continuous and discrete data), like the one given in (3), where the discrete equation of temporal state evolution has been obtained from (2) at t=(k+1)⋅T, applying a real sampling of pulse duration εT with a FROH, (namely, discretizing with a sampling period T, but considering the continuous input during T0), which is valid from (1) at sampling instants for some real β∈[0,1]. (1−ε)⋅T

x[(k+1)⋅T] =eA⋅(1−ε)⋅T ⋅x[(k+ε)⋅T]+ ∫eA⋅[(1−ε)⋅T−τ] ⋅b⋅ 0

(3)

u[(k+¥ ⋅T+´ ]−u[(k-1+¥ ⋅T+´ ]   ⋅u[(k+¥ ⋅T+´ ]+¢ ⋅ ⋅´ d´ T   In general, a discrete-oriented model is desired for computational purposes and, specially, for the implementation of discrete adaptive controllers. The difficulty in dealing with such a class of hybrid systems may be avoided by approximating the continuous term x[(k+ε)⋅T], making an auxiliary sampling of these continuous data in order to obtain a discrete approximate expression for them (see [6]). x[(k+ε)⋅T]=x[(k′+p+s)⋅T′] x[(k′+p)⋅T′]

2.2 Problem formulation Consider a typical state-space equation of a continuous-time linear system: x (t) = A ⋅ x(t) + b ⋅ u(t) (1) y(t) = c T ⋅ x(t) where A ∈ ℜ n×n , b, c ∈ ℜ n×1 and u(t), y(t) and x(t) are the scalar input, the output and the state of the continuous system respectively. The solution for the state is given by: t

x ( t ) = e A⋅t ⋅ x (0) + ∫ e A⋅( t − τ ) ⋅ b ⋅ u( τ) dτ

(2)

0

Let us consider now the multirate sampling shown on Figure 1, being used to discretize the system instead of a traditional sampling one (using a fractional order hold (FROH), for example). x[k⋅T]

x[(k+1)⋅T]

x[(k+ε)⋅T]

T ε⋅

Figure 1 where T is the real sampling period and T′ is an auxiliary, or “fictitious”, sampling period, so that T′ is a submultiple of the sampling pulse length T0 in the

x[(k′+1)⋅T′] x[k⋅T]= x[k′⋅T′] ..... p times ...... T′

T′

s⋅T′

T0=(p+s)⋅T′

Figure 2 The basic idea is to obtain a finite parametrical identified model from the input-output sampled series obtained from (1) under real sampling instead through (3) and the second equation of (1). A multirate sampling technique is involved since two sampling periods are used. These sampling periods are the real one T and the fictitious T′, which is used to approximate via discretization the duration of the real sampling. The use of this multirate sampling technique not only provides a simple way to treat this sort of hybrid systems, but it also leads to more accurate results than those obtained with a traditional ideal sampling when describing real discrete systems. Nevertheless, the discrete transfer functions obtained possess an inherent complexity that makes difficult the pole-zero treatment, which may be overcame by deriving an adequate model via parametrical identification.

3 Method Statement Consider the discrete impulse response of a system G(z) obtained from the multirate discretization of the continuous system G0(s) (see [6]), by exciting it with an impulse input δ(t). This δ(t) function may be represented by a "hat" function with small step-size, so that it may be considered a valid impulse approximation (see [10], [11] and [12]). Taking the values of this discrete impulse response at sampling instants and using the delay operator q −1 , it can be obtained a series, which, in turn, identifies a filter that completely describes the discrete transfer function of the system (see [15]): ∞ Y(q−1) B(q−1) G(q−1) = −1 = y0 + y1q−1 +...+ ynq−n + ∑yiq−i = −1 (4) U(q ) A(q ) i=n+1 B(q −1 ) b1 + b2q −1 + b3q −2 + ... (5) = A(q −1 ) 1 + a1q −1 + a 2q −2 + a 3q −3 + ... so that the discrete transfer function can be described as a rational function of q −1 . Besides, since the Z-Transform of an ideal impulse is unity, it can be consider for the input impulse that Z(u(t))=1. In this way, it can be tracked as many points of the temporal series as necessary to achieve the desired accuracy and that this accuracy is also dependent on the adequacy of the chosen filter. The procedure of identifying coefficients of the realizable filter with a truncated discrete data series is known as Leverrier's algorithm. In what follows, an improvement of the method used in [15] will be presented. Let us derive from (5) the following difference equation which relates the current output yk of the system with a finite number of past outputs yk-i and inputs uk-i for a general input signal uk: y k + a 1 y k −1 + ... + a n y k − n = b1u k −d + ... (6) + b m u k −d −( m +1)

where

where n is equal to the number of poles, m-1≤n is the number of zeros and d represents the inputoutput time delay of the system. Thus, A(q −1 ) y k = B(q −1 )u k −d + v k (7) where the term vk has been added in order to represent the error introduced by modeling errors, data series truncation, etc., and it is usually implemented as filtered white noise: H(q −1 )e k , with H(q −1 ) = 1 + h1q −1 + ... + h kq − k . Note that equations (6) and (7) can be extended to the multivariable case, becoming coefficients ai into matrices (ny x ny) and coefficients bi into matrices (ny x nu), being ny and nu the number of outputs and inputs respectively.

Equation (7) may be rewritten as:  B(q −1 )  uk  e k = H −1 (q −1 )  y k − (8) A(q −1 )   Now, a parametric identification algorithm is applied, using a least squares method to adjust A, B and H in order to minimize the evaluation function: N

V = ∑ ek

(9)

T =1

where N is the number of considered input-output pairs. In such a way, the identification algorithm is given by: (10) θˆ k = θˆ k −1 + K k ( y k − yˆ k ) where θˆ k is the estimate parameter vector at time tk=kT , yk is the observed output at time t and yˆ k is the prediction of the output of the current model based on observations at previous instants up to time (k-1)T. The gain K(t) determines the way in which the current prediction error ( y k − yˆ k ) affects the updating process of the estimate parameter vector. It is typically chosen as K k = C k ψ k , where ψ k is a regression vector containing previous values of observed inputs and outputs, and Ck is an adjustable gain. The impulse response used in [15] is the output signal obtained when the input is an impulse, namely, u(t) is zero for all values of t except t=0, where u(0)=1, and it can be computed through this method as a particular case. Note that the above method may potentially improve the results compared to the use of Leverrier's algorithm since an arbitrary number of input-output pairs, instead of a limited finite one, could be considered for modelling purposes.

4 Examples In this section two different continuous systems will be considered: 1 G 01 (s) = (11) (s+ 1)(s + 2) 1 G 02 (s) = (12) (s+ 1)(s + 0.1) from which, for traditional ideal sampling, it can be obtained an analytical expression of the discrete transfer functions to exactly describe the systems for a fixed sampling period and a fixed order hold. Namely, when using a ZOH, G i (z) = Z( B0 (s) ⋅ G 0 (s) ) , where Z is the Z-Transform and B0 (s) is the continuous transfer function of the ZOH.

Now, consider a multirate sampling of the continuous system G01(s), applied as explained in Section 2.2, for a given sampling period T=p1⋅T′=0.3 sec. with a finite sampling pulse duration T0=(p+s) ⋅T′=0.1 sec., being the fictitious sampling period T′=0.1 sec., p=1, p1=3 and s=0, that is, supposing that T′ exactly matches T0. For a fixed order of the hold β, applying an impulse input to the complex discrete transfer functions of the system obtained with this method, we can now obtain the discrete impulse response of the system. Therefore, the identification algorithm of Section 3 may be applied for different filter orders, choosing the approximate discrete transfer function that better describes the system. To do so, the output of the different discretetime models obtained using the identification method is compared with the output of the original complex discrete transfer function, when excited with the same sinusoidal signal of amplitude 5 and frequency 4 rad/sec., for β=0, as shown in Figure 3.

depending of the desired accuracy, we may prefer the use of a lower or a higher order model. In this case, the following fourth order model has been chosen: G1m1 (z) =

− 1.98⋅ 10−4 z2 + 2.137⋅ 10−4 z4 − 3.361z3 + 4.223z2 − 2.3512z + 4.894⋅ 10−1

(14)

Once the appropriate filter order has been established, the pole-zero properties as well as the performance of the models obtained when varying the order of the hold used in the multirate discretization process may be easily studied. In this way, variations the parameter β for the fourth order filter used above report the mean square performance errors shown in Table 1, in which J is refereed to the continuous system. Namely, y(τ) is the output of the continuous system G01(s) (see equation (13)).

β J

-1 -0.8 -0.6 -0.4 -0.2 0 0.1237 0.1148 0.1061 0.0977 0.0898 0.08267

Exact system and models outputs 0.6

Approximated model for order 4 Approximated model for order 3 Approximated model for order 2 Exact multirate sampled system

0.5

0.2 0.4 0.6 0.8 1 0.0764 0.0713 0.0677 0.0656 0.0651 Table 1: Mean square performance error of fourth order models with respect to the continuous system

0.4

0.3

0.2

0.1

0

−0.1

−0.2

−0.3 0

2

4

6

8

10 Time

12

14

16

18

20

Exact system and models outputs 0.6

Approximated model for order 4 Approximated model for order 3 Approximated model for order 2 Exact multirate sampled system

0.5

0.4

0.3

0.2

0.1

0

−0.1

−0.2

−0.3 0

0.5

1

1.5

2

2.5 Time

3

3.5

4

4.5

5

Figure 3: Outputs of the models and the multirate sampled system for G01 Although it may be used diverse order filters, it has been chosen models of the same relative order than the original one to preserve the behavior of the system. It can be observed how, en general, for a higher order, the

accuracy of the model increases.

Note that the use of negative hold orders only indicates the sign of the gradient between a sampling instant and the next one, and sometimes leads to a better results than the typically used positive values of β. In this case, it can be observed how the most accurate model corresponds to the multirate sampled discrete system obtained for a FOH, which corresponds to the following discrete transfer function: G1m2 (z) =

− 1.035⋅ 10−4 z2 + 1.21⋅ 10−4 z4 − 3.371z3 + 4.268z2 − 2.416z + 5.189⋅ 10−1

whose output may be compared with the continuous system in Figure 4. Models and continuous system outputs 0.6 Best model Worst model Continuous system

0.5

In order to compare accuracy of the models, a mean square performance error J is defined for all continuous time t, so that: 1t 2 J ( t ) = ∫ (y(τ) − y m (τ) ) dτ (13) t0 where y(τ) is the output of the reference system (in this case the original multirate sampled system) and ym(τ) is the output of the model. In the case of G01, for the second, third and fourth order models of Figure 3, the reports of this error are 0.0383, 0.0401 and 0.0286, respectively. Therefore,

(15)

0.4

0.3

0.2

0.1

0

−0.1

−0.2

−0.3

−0.4

0

5

10 Time

Figure 4: Outputs of the best (G1m 2 ) and worst models and the continuous system G01(s)

15

Exact system and models outputs

Analogous results can be observed for G02(s) in Figure 5, where a ZOH has been used to discretize the system, reporting the following mean square performance error: 0.1341, 0.0356, when using a third and fourth order filters for the identification, respectively. The better fit is provided by the fourth order model: − 5.535⋅ 10−5 z 2 + 6.565⋅10−5 G2m1 (z) = 4 (16) z − 3.421z 3 + 4.386z 2 − 2.506z + 0.541 whose output can be compared with the original multirate sampled system in Figure 6.

1.5

1

0.5

0

−0.5

0

5

10

15

Time

Figure 7: Outputs of deficient order models and the multirate sampled system for G02 Exact system and models outputs 1.5 Exact system and models outputs

20

Approximated model for order 3 Exact multirate sampled system Approximated model for order 4

0

1

−20

0.5

−40

−60

0 −80

−100

−0.5

0

5

10

15

Time

−120

Figure 5: Outputs of the models and the multirate sampled system for G02

0

5

10

15

Time

Figure 8: Output of the second order model and the multirate sampled system for G02

Measured and simulated model output 1.5

Now, in the same way as done for the previous example, it can be computed the mean square performance errors of fourth order models for different values of the order of the hold used in the multirate discretization process (see Table 2).

Exact multirate sampled system Approximated model for order 4

1

0.5

β J

0

−0.5

0

5

10

15

20

25 Time

30

35

40

45

50

Figure 6: Outputs of G2m(z) and the original multirate sampled system

Observe that the selection of the filter order is crucial within the identification process. A low or inadequate order of the filter may lead to deficient models. This is obvious in Figure 7, where solid and dotted-solid lines represents the outputs of first order models. This takes special importance when the original plant possesses poles near the unstability border, as it can be observed in Figure 8, where the second order filter used in the previous example, leads this time to an unstable model. On the other hand, if the zero-pole distribution of a model indicates pole-zero cancellations in the dynamics, this suggests that a lower order filter should be used instead.

0

-1

-0.95

-0.9

-0.8

-0.6

-0.4

-0.2

0.3963 0.4708 0.4605 0.4396 0.3963 0.3526 0.3103 0.2

0.4

0.6

0.8

0.9

0.95

1

0.2715 0.2387 0.2137 0.1975 0.1902 0.1895 0.1898 0.1905

Table 2: Mean square performance error of fourth order models with respect to the continuous system It may be observed how the most accurate model corresponds to the multirate sampled discrete system obtained using β=0.9, which corresponds to the following discrete transfer function: − 6.066⋅10−5 z2 + 7.573⋅10−4 G2m2 (z) = 4 (17) z − 3.401z3 + 4.346z2 − 2.486z + 0.5411 whose output when excited with the same sinusoidal input, and zero-pole map are shown in Figures 9 and 10, respectively.

Models and continuous system outputs 1.5 Worst model Best model Continuous system

1

0.5

0

−0.5

0

5

10

15

Time

Figure 9: Outputs of the best (G 21m 2 ) and worst models and the continuous system G02(s) Pole−zero map 1

0.8

0.6

0.4

Imag Axis

0.2

0

−0.2

−0.4

−0.6

−0.8

−1 −1.5

−1

−0.5

0

0.5

1

1.5

Real Axis

Figure 10: Pole-zero map of the discrete fourth order model G 2 m 2

5 Conclusions A method for the obtaining of approximated discrete models for multirate sampled LTI systems via parameter identification has been presented. The main idea relies in the use of an available measured input-output data series at sampling instants of the sampled system together with a filter of adequate order to identify a discrete model representing the system. As it has been shown in the examples, this technique is specially relevant when the discrete transfer functions obtained from the discretization process possesses an inherent complexity that makes difficult the pole-zero treatment, which may be overcame by deriving an adequate model via parameter identification. Then, the accuracy of the discrete model is analyzed for various hold orders with a loss function that performs over continuous time including the inter-sample periods.

Acknowledgments The authors are very grateful to DGES by the support of this work through the research project DPI2000-0244. They are also grateful to UPV/EHU by its partial support through project 00I06.I06.EB8235/2000 and by financially supporting the Ph.D. studies of Mr. Garrido.

References [1] Ogata, K. Discrete-Time Control Systems. Chapter 3. Prentice-Hall. 1994. [2] De la Sen, M. Non periodic and adaptive sampling. A tutorial review. INFORMATICA, Vol. 7, No. 2, pp. 175-228. 1996. [3] Akaike, M. Identification of Transfer Function of Multipath Propagation in Frequency-Domain Delay-Distortion Equalization. IEICE Trans. Electron. Vol.E82-C N.7 pp.1267-1272. 1999. [4] Wan, E.A. Finite impulse response neural networks for autoregressive time series prediction. In Predicting the Future and Understanding the Past, Vol. XVII. AddisonWesley, Reading, MA, 1993. [5] Jury, E.I. Sampled-Data Control Systems. Chapter 2. John Wiley & Sons (Eds.), New York. 1958. [6] Garrido, A.J., De la Sen, M. and Bárcena, R. Approximate Models to describe Real Sampling and Hold Processes based on Multirate Sampling Techniques. Proceedings of the 2000 American Control Conference. pp. 195-199. 2000. [7] Ljung, L. System Identification. 2nd Ed. Chapter 4. Prentice-Hall, Upper Saddle River, NJ, 1999. [8] Naslin, P. Technologie et calcul pratique des systèmes asservis. Chapter 7. Dunod Eds. 1968. [9] Davies, W.D.T. System Identification for SelfAdaptive Control. Chapter 2. Wiley-Interscience. 1970. [10] Ljung, L. System Identification Toolbox – For use with MATLAB. The Mathworks, Inc. 4th Ed. 1995. [11] Phillips, C.L. and Nagle, T. H. Digital Control System Analysis and Design using MATLAB. Prentice-Hall. 1994. [12] Aràndiga, F, Donat, R. and Harten, A. Multiresolution Based on Weighted Averages of the Hat Function II: Nonlinear Reconstruction Techniques. SIAM Journal on Scientific Computing. Vol. 20, N. 3, pp. 1053-1093. 1999. [13] Helmke, U., Shayman, M.A. Critical Points of Matrix Least Squares Distance Functions. Technical Reports of The Institute of Systems Research. N.92-30 University of Maryland. 1992. [14] Sévely, Y. Systémes et asservissements linéaires échantillonnés. Chapter 7. Dunod Eds. 1969. [15] Garrido, A.J., De la Sen, M. and Bárcena, R. On the Validity of Realizable Physical Approximations to δ(t) Input Impulses to obtain Impulse Responses. Application to synthesize Discrete-Time models for LTI Systems. Proceedings of the 5th WSES/IEEE CSCC 2001. pp. 6631-6626. 2001.

Suggest Documents