Subspace Identification of Unstable Transfer Function

0 downloads 0 Views 299KB Size Report
levitation system (Maglev) by a subspace identification method. The closed loop nonlinear model equation of the magnetic levitation system under PID control is ...
Proceedings of the Third International Conference on Advances in Control and Optimization of Dynamical Systems, Indian Institute of Technology Kanpur, India, March 13-15, 2014

ThbT5.6

Subspace Identification of Unstable Transfer Function Model for a Magnetic Levitation System C. Sankar Rao ∗ M. Chidambaram ∗∗ ∗ Indian

Institute of Technology Madras, 600036 INDIA (e-mail: [email protected]). ∗∗ Indian Institute of Technology Madras, 600036 INDIA (e-mail: [email protected]) Abstract: This paper deals with the identification of an unstable transfer function model for a magnetic levitation system (Maglev) by a subspace identification method. The closed loop nonlinear model equation of the magnetic levitation system under PID control is simulated and a second order unstable transfer function model is identified. PID controller settings are calculated based on the identified model. Using the PID controller on an experimental Maglev system, an improved transfer function model is obtained. A PID controller is designed based on the model, and the performances of the above PID controllers are evaluated on the experimental system. The controller designed on the model identified on the experimental data works better than that obtained from nonlinear or linear model equation. Keywords: Subspace identification, pole placement method, magnetic levitation, unstable system 1. INTRODUCTION Subspace method reflects the fact that linear methods can be obtained from row and column spaces of certain matrices calculated from the input-output data. There is no need for an explicit model parameterization. The subspace algorithm has the elegancy and computational efficiency. Subspace identification methods aim at directly estimating the system matrices A, B, C, D in a state-space model structure from the noisy inputoutput data. Block Hankel matrices play an important role in the subspace identification algorithms. These matrices can be easily constructed from the given input-output data. Subspace identification algorithms make extensive use of their structures. The method uses projection algorithms by which the system order and the extended observability matrix can be extracted from a singular value decomposition of an appropriate matrix. Subspace identification algorithms are often based on geometric concepts. It should be noted that these geometric operations can be easily implemented using the QR decomposition. There are several classical subspace identification algorithms available such as Numerical algorithms for Subspace State Space System Identification (N4SID) (Van Overschee and De Moor (1994)), Multivariable Output Error State sPace (MOESP) (Verhaegen (1994)) and Canonical Variate Analysis (CVA) (Larimore (1990)). Each and every subspace identification algorithm is different from each other due to its implementation, concept and interpretation. Different kinds of closed loop identification methods are available and these are broadly categorized into three main types such as direct, indirect and joint input output identification method (Forssell and Ljung (1999)). In the direct methods the identification is performed as it does in the open loop method (McKelvey et al. (1996) and Chiuso and Picci (2005)). An indirect method (Pouliquen et al. (2010)) is developed to identify the dynamics of the plant. The closed loop subspace identification for stable systems has been carried out extensively by orthogonal projection approach (Huang et al. (2005)) and orthogonal decomposition method

(Katayama et al. (2005)). Review works on the closed loop subspace identification are given by Qin (2006) and Miller and Callafon (2009). Closed loop subspace identification of stable systems using real time data have been reported in the literature. Reported work on the closed loop subspace identification of transfer function models for unstable systems is limited in literature. Sendrescu et al. (2008) proposed the subspace based method for unstable system in which they used orthogonal projection to eliminate the influence of the noise term. Due to pole zero cancellation while identifying an open loop unstable system, it is quite common to get a stable closed loop model (Ljung (1999)). Shahab and Doraiswami (2009) have shown that the estimated model is erroneous to the extent that the identified plant model stable with unstable pole appearing zeros of the sensitivity function. They used reference input, plant input and plant output to ensure that the estimates are reliable. A MIMO rather than SISO identification scheme is used with one input and two outputs. A two-stage MIMO identification is proposed wherein the plant input and the plant output are estimated first and in the second stage using the above estimates, the plant transfer function model is identified. In the present work, a matlab code developed by implementing the MON4SID algorithm reported (Miranda and Garcia (2009)) and it is applied by simulation to identify an unstable transfer function model. A. The subspace identification algorithms such as N4SID, MOESP and CVA are asymptotically biased (Van Overschee and De Moor, 1996) when these are applied to closed loop systems. A modification of MOESP and N4SID has been introduced by Verhaegen (1993) and Van Overschee, P. and De Moor (1996) respectively to overcome the problem. However, MOESP needs the order of the controller for identification of closed loop system and N4SID requires a limited number of impulse response samples of the controller. The MON4SID method does not require any information regarding the controller. The objective of this paper is to obtain a model based on experimental data. This problem is same as

394

that was reported by Sendrescu et al. (2008) and Shahab and Doraiswami (2009) but the approach is quite different. This subspace identification algorithm is tested on Magnetic Levitation System (Maglev). These unstable systems are used in many industries. Identification of levitation system has been a subject of research in recent years in view of its applications. The applications of these systems are magnetic bearings which are used in turbines, magnetic levitation based automotive engine valves (Peterson et al. (2006)), friction less bearings for high speed machining (Knospe (2007)) and identifying a linearized model for a didactic Maglev by frequency domain approach (Kawakami et al. (2003)). Some other magnetic bearings applications include fans, pumps and other rotating machines.

Step 2. Determine the LQ factorization of a data matrix which is formed from U f ,U p ,Yp ,Y f : ! ! ! Q1 L11 0 0 Uf Q2 Wp = L21 L22 0 (6) L31 L32 L33 Q3 Uf Step 3. Compute SVD of the matrix L32 :    S1 0 V1 L32 = ( U1 U2 ) (7) 0 S2 V2 Step 4. Find the order of the system by inspecting the singular values in matrix S. Step 5. Estimate the extended observability matrix Γi as

2. MON4SID IDENTIFICATION METHOD A linear time invariant dynamic system is described by the state space model in the innovation form xk+1 = Axk + Buk + Kek yk = Cxk + Duk + ek (1) where uk ∈ Rm , yk ∈ Rl and xk ∈ Rn are denoted as input, output and state vectors respectively. The matrices A, B, C, D and K are system, input, output, direct feed through and the noise matrices with appropriate dimensions. ek ∈ Rl denotes the zeromean white innovation process. The first step in each subspace identification algorithm is the conversion of state space model into one single linear matrix equation. This can be done by recursive substitution of state equation in the output equation. The linear matrix equations are written as Y f = Γi X f + Hid U f + His E f

(2)

Yp = Γi X p + Hid U p + His E p X f = Ai X p + ∆di U p + ∆si E p

(3)

(4) where p and f are past and future data horizons indices. Superscripts d and s denote deterministic and stochastic. The linear matrix equations are built from the block Hankel matrices. The input block Hankel matrix is defined as   u0 u1 · · · u j−1  u u ··· uj  U p = U0|i−1 =  1 2 (5) ··· ··· ··· ···  u0 u1 · · · u j−1

Γi = U1 Step 6. Determine the state sequences as

(8)

X = Γ†i L32 (L22 )−1Wp Step 7. Define the following matrices with j-1 columns

(9)

Xi+1 = [Xi+1 · · · Xi+ j−1 ]

(10)

Xi = [Xi · · · Xi+ j−2 ]

(11)

Ui|i = [Ui · · · Ui+ j−2 ]

(12)

Yi|i = [Yi · · · Yi+ j−2 ] (13) Step 8. Solve the following equations by the least square method to estimate A, B, C and D:        A B r X˜i+1 X˜i = + 1 (14) C D r2 Yi|i Ui|i Step 9. Determine the transfer function model using the estimated system matrices by the following equation. G(s) = C(sI − A)−1 B + D 2.1 Closed loop subspace identification Several subspace based closed loop identification methods have been reported (Forssell and Ljung (1999), Katayama et al. (2002)). The data to be collected under closed loop condition. Closed loop system can be identified by considering the following plant and controller state space model p

Similar definitions hold for Yp ,U f ,Y f , E p and E f . i is a number of block rows. ∆i is the reversed extended controllability matrix. Γi is the extended observability matrix. and are the lower triangular block-Toeplitz matrices for deterministic and stochastic part respectively. The above equations play a very important role in the development of subspace identification. MON4SID method is developed using the two classical subspace identification methods such as MOESP and N4SID. The basic idea in all subspace identification methods is to estimate extended observability matrix and Kalman state sequence and then retrieve the system matrices. This method uses the POMOESP method to find the extended observability matrix and uses N4SID method to estimate the state sequences. The MON4SID algorithm is given by the following steps: Step 1. Construct the past and future block Hankel matrices of input and output such as U p , U f , Yp and Y f (C Sankar Rao and M. Chidambaram (2013))

(15)

p

p

p

p

xk+1 = A p xk + B p uk p

yk = C p xk + D p uk

(16)

c xk+1 = Ac xkc + Bc uck

yck = Cc xkc + Dc uck (17) One obtains the following state space model for the closed loop system xk+1 = Axk + Buk yk = Cxk + Duk

(18)

where 

   A p −B pCc Bp ,B = ,C = ( C p 0 ) (19) BcC p Ac , 0 and D p = 0 the matrices involved in the Equation (19) have the appropriate dimensions. By using the above algorithm, one A=

395

can get the matrices A, B, C and D and knowing the controller matrices one finds the plant matrices A p , B p , C p and D p . A Matlab code is developed by implementing this algorithm to calculate the matrices from the input and output data as discussed above.

influence of electromagnet is given by the following nonlinear electro-mechanical equation Ljung (1999) F = f (x, i) − mg

(20)

Where f (x, i) is the magnetic control force given by i2 (21) x2 In the Equation (20) m is the mass of the steel ball, g is the acceleration due to gravity, x is the distance of the ball from the electromagnet and i denotes the current through the coil. And k is a constant depending on the coil (electromagnet) parameters. Using Newtons second law, a differential equation is obtained: f (x, i) = k

Fig. 1. Schematic diagram of closed loop structure

i2 d2x = k − mg (22) dt 2 x2 The nonlinear equation must be linearized around the operating point in order to design a suitable controller. The linearized model of the magnetic levitation system is given by the following equation m

3. APPLICATION OF SUBSPACE IDENTIFICATION

G(s) =

Fig. 2. Maglev system The simulated magnetic levitation system (Maglev) is considered. The maglev experiment is a magnetic ball suspension system which is used to levitate steel ball in air by the electromagnetic force generated by an electromagnet (Figure 1). The maglev system consists of an electromagnet, a ball rest, a ball position sensor, and a steel ball. The maglev system is completely encased in a rectangular enclosure divided into three distinct vertical chambers. The main control objective of this system is the steel body levitation by means of the electromagnetic field counteracting the force of gravity. The applied control is voltage, which is converted into the current via a driver embedded within the unit. The current passes through an electromagnet, which creates the corresponding magnetic field in its vicinity. The sphere is placed along the vertical axis of the electromagnet. The measured position is determined from an array of infrared transmitters and detectors, positioned in such a way that the infrared beam is intersected by the sphere. The infrared photo sensor is assumed to be linear in the required range of operation. To avoid the problem of phase compensation due to the high inductance of the electromagnet, the active drive to the electromagnet is current. Namely, the control voltage is linearly converted into the current by the internal circuit within the Maglev system. The force experienced by the ball under the

−Ki ∆x = 2 ∆i s + Kx

(23)

For the parameters reported in the user manual of the experimental system, we get Kx = -0.2613 and Ki = 0.49 and hence the poles are 0.511 and -0.511. The controller is designed based on the linear model by the pole placement method Chidambaram (1998). The basis of the pole placement method is to choose the closed loop poles and also to assume the mode of controller. Now we have a second order system with a PID controller. The degree of the characteristic equation is three which means that the degree of desired characteristic polynomial is present. Here we assumed the location of the closed loop poles as -0.5,-0.5, 0.5 which are nearer to the open loop stable pole. In order to get the PID controller settings, equate the coefficients of s2 , s and constant value of the desired characteristic equation and that of the equation which is formed by the given model and the assumed controller. The obtained controller parameters from this method are KC = 0.9973, KI = 0.255 and KD = 3.061. Output 0.5 0 −0.5 0

500

1000

1500

2000 2500 3000 Time (seconds) reference signal

3500

4000

4500

5000

500

1000

1500

2000 2500 3000 Time (seconds)

3500

4000

4500

5000

0.5 0 −0.5 0

Fig. 3. Dataset used for the identification of nonlinear maglev Before implementation of the controller on the real time experiment, extensive simulations are carried out in order to evaluate the linear controller performance in controlling the nonlinear system (Equation 22). The simulations are carried out in a closed loop condition using MATLAB Simulink with PID settings obtained from the linearized model. A white noise of mean zero and variance 0.1 is added to the set point (0.009m) to get the input in the deviation form. Similarly a steady state value is subtracted from the output measurement to obtain the

396

10

x 10

−3

9.5

Position [m]

9

8.5

8

7.5

7 0

200

400

600 Time [sec]

800

1000

1200

Fig. 4. Closed loop performance of the nonlinear equations using PID controllers.(solid line: controller designed on derived transfer function model; dotted line: controller designed on identified model using the nonlinear system)

Table 1 shows the values of the designed PID controller for the linearized model and the model identified by the present method. The performance of the closed loop system is evaluated by simulating the nonlinear magnetic levitation system with the PID settings from both the transfer function models. The results are shown in the Figure 3. The closed loop response of the nonlinear system is evaluated for a step change in the set point 0.009m to 0.00795 which is shown in the Figure 3. The regulatory response of the magnetic levitation system for a 10% change in k (k = 0.689) value is shown in the Figure 4. There is a difference in the response due to the nonlinearity of the system. If we use the experimental data to identify a suitable transfer function model, there may a difference in the parameters when compared to that based on numerically generated data for the nonlinear equations. This may be due to the mismatch between the assumptions made in the development of the nonlinear equations and that of the experimental system. 3.1 Closed loop subspace identification

−3

9.05

x 10

9

Position [m]

8.95

8.9

8.85

8.8

8.75

8.7 0

100

200

300

400

500 Time [sec]

600

700

800

900

Fig. 5. The regulatory response of the maglev system for a 10 percent change in k (Legends: same as in Figure 3) Table 1 PID settings for the magnetic levitation system. Model

Open loop poles

KC

KI

KD

Local linearized model

-0.511,+0.511

0.9973

0.255

3.061

Identified model using data from nonlinear model

-0.791,+0.4413

0.8245

0.0937

0.863

Model obtained from experiment

-0.4529,+0.9859

1.194

0.125

2.033

output in the deviation form. Based on these reference signal and output data (refer Figure 2), the identification method is applied. The subspace based algorithm MON4SID method is applied to identify the model. The poles of the estimated model are -0.7910 and 0.4414 and the process gain of the identified model is -1.333. Due to the nonlinear nature of the system, the estimated poles are not matching with the linearized model. A PID controller is to be designed using the newly identified model. The desired closed loop poles (-0.5, -0.5, -0.5) are assumed. The obtained PID settings for the identified model are KC = 0.8245, KI = 0.0937 and KD = 0.863.

After testing the controller in nonlinear model, it has to be prepared for implementaion on the real time experiment. In this section, an experimental application of subspace identification is considered. The schematic diagram of the magnetic levitation system is shown in the Figure 1. This system is unstable because to maintain the steel ball at a stationary point some finite amount of current is required to be passed through the wire wound around the armature. The current passing through the wire wound around the armature creates a magnetic force, which attracts the steel ball and counter balances the force due to gravity. The magnetic force is proportional to the square of the current and inversely proportional to the distance between the ball and the armature. In the previous section, we have designed and evaluated the PID controller for the nonlinear magnetic levitation system. The PID settings which are designed based on nonlinear model have been tested on the physical system. The simulation is performed by adding a white noise of mean zero and variance 0.001 to the reference point 0.009m. The system is initially at rest at 0.009m and when noise is added to the simulation, the resulting dynamics can be observed. Experiment is carried out to collect 4000 data points with a sampling time of 0.01 seconds. The reference signal and the observed output data are considered for the identification. The number of columns in the block Hankel matrices is 960 and the number of block rows is taken as 20. The previously demonstrated subspace based identification method such as MON4SID is applied to identify the closed loop model. Open loop plant is extracted from the closed loop one. The identified poles of the plant are 0.9859 and -0.4529. Due to the model complexity, noise and nonlinearity of the physical system the poles of the plant are not matching exactly with that of the linear and nonlinear model. Table 1 presents comparisons of PID settings and the poles of the three identified models. The system at steady state (0.009m) was given 10 percent step change to the nominal value (at time = 400 sec) and the responses obtained are shown in Figure 5 and 6. The controller is designed by the identifying nonlinear model and the experiments are carried out with these estimated settings and the closed loop response is obtained. Similarly, controller is designed from the model which is identified from the experimental data and comparison with nonlinear model is shown in Figure 5. As we can see from the Figure 5, the performance of the nonlinear model and the real time experiments are showing

397

encountered in the identification as reported by Shahab and Doraiswami (2009) is not found in the present method.

−3

x 10

Position [m]

10 9

REFERENCES

8 7 6 5 0

200

400

600

800

1000

1200

200

400

600 800 Time [sec]

1000

1200

−3

Position [m]

9.5

x 10

9 8.5 8 7.5 0

Fig. 6. Experimental closed loop performance of the magnetic levitation system. (solid line: controller designed based on experimental model(above figure); controller designed based on nonlinear model (below figure) dotted: setpoint ) −3

12

x 10

11

Position [m]

10

9

8

7

6

5 0

200

400

600

800 1000 Time [sec]

1200

1400

1600

Fig. 7. Experimental closed loop performance of the magnetic levitation system. (solid line: controller designed based on linear model; dotted line: set point) almost the same trend. But the response obtained from the nonlinear model takes more time to reach steady state than the experimental one. The PID settings obtained from the transfer function model are implemented on the physical maglev system to verify the responses of nonlinear model and the real time experiment. The response is shown in Figure 6. Even though initially there are oscillations in the response, system attains stability eventually. 4. CONCLUSION This paper discussed the application of subspace identification algorithms to identify a suitable transfer function model for a magnetic levitation system. The MON4SID algorithm is used to identify the model: first on the data collected form the nonlinear model equation and second on the closed loop data collected on the experimental system. The controlers are designed based on the three transfer models such as locally linearized model, the model identified from the nonlinear model equation and the model identified from the experimental data. performance of the controllers are evaluated on the real time system. It is observed that the controller designed on the model identified on the experimental data works better than that of the model obtained from nonlinear model equation. The problem

C Sankar Rao and M. Chidambaram (2013). Subspace Identification of Unstable Systems by MON4SID algorithm. In 10th IFAC International Symposium on Dynamics and Control of Process Systems, 666–671. Mumbai. Chidambaram, M. (1998). Applied Process Control. Allied Publication, 1 edition. Chiuso, A. and Picci, G. (2005). Consistency analysis of some closed-loop subspace identification methods. Automatica, 41(3), 377–391. Forssell, U. and Ljung, L. (1999). Closed loop identification revisited. Automatica, 35(7), 1215–1241. Huang, B., Ding, S.X., and Qin, S.J. (2005). Closed-loop subspace identification: an orthogonal projection approach. Journal of Process Control, 15(1), 53–66. Katayama, T., Kawauchi, H., and Picci, G. (2002). Subspace identification of closed loop systems by stochastic realization. In 15th IFAC World Congress, Barcelona, Spain. Katayama, T., Kawauchi, H., and Picci, G. (2005). Subspace identification of closed loop systems by the orthogonal decomposition method. Automatica, 41(5), 863–872. Kawakami, R., Galv˜ao, H., and Yoneyama, T. (2003). A Simple Technique for Identifying a Linearized Model for a Didactic Magnetic Levitation System. IEEE Transactions on Education, 46(1), 22–25. Knospe, C.R. (2007). Active magnetic bearings for machining applications. Control Engineering Practice, 15(3), 307–313. Larimore, W.E. (1990). Canonical Variate Analysis in Identification , Filtering , and Adaptive Control. In Proceedings of the 29th Conference on Decion and Control, 596 – 604. Hawali. Ljung, L. (1999). System Identification: Theory for the User (2nd Edition). Prentice Hall, 2 edition. McKelvey, T., Huseyin, A., and Lennart, L. (1996). Subspace based multivariable system identification from frequency response data.pdf. IEEE Transactions on Automatic Control, 41(7), 960 – 979. Miller, D.N. and Callafon, R.A.D. (2009). Subspace Identification From Classical Realization Methods. In 15th IFAC Symposium on System Identification, 1, 102–107. France. Miranda, S. and Garcia, C. (2009). Subspace closed loop identification using the integration of MOESP and N4SID methods. In Advanced Control of Chemical Processes, volume 7, 476 – 481. Peterson, K., Grizzle, J., and Stefanopoulou, A. (2006). Nonlinear control for magnetic levitation of automotive engine vales. IEEE Transactions on Control Systems Techn, 14(2), 346–354. Pouliquen, M., Gehan, O., and Pigeon, E. (2010). An indirect closed loop subspace identification method. Decision and Control CDC 2010 49th IEEE Conference on, (3), 4417– 4422. Qin, S.J. (2006). An overview of subspace identification. Computers & Chemical Engineering, 30(10-12), 1502–1513. Sendrescu, D., Selisteanu, D., and Marin, C. (2008). Subspace based identification of unstable systems. 2008 IEEE International Conference on Automation Quality and Testing Robotics, 2. Shahab, M. and Doraiswami, R. (2009). A Novel Two-Stage Identification of Unstable Systems. In IEEE International

398

Conference on Control and Automation, m. New Zealand. Van Overschee, P. and De Moor, B. (1994). N4SID: Subspace Algorithms for the Stochastic Systemst. Autamatica, 311(I), 75–93. Van Overschee, P. and De Moor, B. (1996). Subspace identification for linear systems: Theory, implementation, application. Kluwer Academic Publishers, Dordrecht. Verhaegen, M. (1993). Application of a subspace model identification technique to identify LTI systems operating in closed-loop. Automatica, 29(4), 1027–1040. Verhaegen, M. (1994). Identification of the Deterministic Part of MIMO State Space Models given in Innovations Form from Input-Output Data *. Automatic, 3(I), 61–74.

399