identification of physical systems (applications to condition monitoring, fault diagnosis, soft...
TRANSCRIPT
10Modeling and Identificationof Physical Systems
10.1 OverviewThe theoretical underpinnings of identification and its applications are thoroughly verified by extensivesimulations and very well corroborated by practical implementation on laboratory-scale systems includ-ing (i) a two-tank process control system, (ii) a magnetically-levitated system, and (iii) a mechatroniccontrol system. In this chapter, mathematical models of the physical system derived from physical lawsare given. The input–output data obtained from experiments performed on these physical systems areused to evaluate the performance of the identification, fault diagnosis, and soft sensor schemes. Theclosed-loop identification scheme developed in the earlier chapters is employed.
10.2 Magnetic Levitation SystemA magnetic levitation system is a nonlinear and unstable system. Identification and control of themagnetic levitation system has been a subject of research in recent times in view of its applicationsto transportation systems, magnetic bearings used to eliminate friction, magnetically levitated microrobot systems, and magnetic levitation-based automotive engine valves. It poses a challenge for bothidentification and controller design [1–5]. A schematic of the magnetic levitation is shown in Figure 10.1,where there is an electromagnetic coil and a steel ball. The steel ball is levitated in the air by an upwardelectromagnetic force and the downward force due to the gravity. The electromagnetic field is generatedby the current in the coil with a soft iron core.
10.2.1 Mathematic Model of a Magnetic Levitation SystemThe magnetic levitation system is a nonlinear closed-loop system formed of the continuous time controller(cascade connected with an amplifier) and a plant as shown in Figure 10.2. The plant consists of a balllevitating in the air as a result of two balancing forces: the gravitational force pulls the ball down whilean electromagnetic force balances the ball by pulling it up. The electromagnetic field is generated by anelectromagnetic coil. The force balance is achieved by the closed-loop controller action. The controlleris driven by the error between the reference input r and the position of the ball y and the output of thecontroller (control input) u drives the coil.
Identification of Physical Systems: Applications to Condition Monitoring, Fault Diagnosis, Soft Sensor andController Design, First Edition. Rajamani Doraiswami, Chris Diduch and Maryhelen Stevenson.© 2014 John Wiley & Sons, Ltd. Published 2014 by John Wiley & Sons, Ltd.
428 Identification of Physical Systems
x F
Mg
i
V
Figure 10.1 Magnetic levitation system
10.2.1.1 Nonlinear Model of the Plant
The electromagnetic force fe(t) acting on the steel ball is given by:
fe(t) = keV2(t)X2(t)
(10.1)
The gravitation force fg on the steel ball is:
fg = mg (10.2)
where V(t) is the voltage applied to the coil, X(t) is vertical distance of the ball from some referenceposition X0, and ke is a constant, and m is mass of the ball. The electromagnetic force fe(t) and thegravitational force fg are indicated in Figure 10.2 by F and Mg respectively.
Using Newton’s law of motion, the acceleration X of the ball is related to the net force fe − fg actingon it as shown below:
X(t) = kV2(t)X2(t)
− g (10.3)
where k =ke
m.
r e u y
w
acG
Controller Plant
mcG+ +
+
−
Figure 10.2 Closed-loop system
Modeling and Identification of Physical Systems 429
10.2.2 Linearized ModelLet x(t) = X(t) − X0 and 𝜈(t) = V(t) − V0 be respectively incremental values of the position and thevoltage, and X0 and V0 are the respective nominal values. Linearizing Eq. (10.3) yields:
x(t) = amc0x(t) + bmc0𝜈(t) (10.4)
where amc0 = 2kV2
0 (t)
X30 (t)
and bmc0 = 2kV0(t)
X20(t)
. Note that amc0 is positive as the reference direction of X0
is negative as indicated in Figure 10.2. The transfer function of the magnetic levitation system Gmc(s)relating the current and the position is given by:
Gmc(s) = x(s)𝜈(s)
=bmc0
s2 − amc0
(10.5)
where amc0 and bmc0 are the coefficients of the transfer function, x(s) and 𝜈(s) the Laplace transforms ofx(t) and 𝜈(t) respectively. The magnetic levitation system is unstable with poles symmetrically located oneither side of the imaginary axis. The poles are real and are symmetrically located about the imaginaryaxis:
pc1 =√
am0
pc2 = −pc1 = −√
am0
(10.6)
where pc1 and pc2 are the poles of the continuous-time model.
10.2.2.1 Controller
The controller is connected in cascade to an amplifier and the controller and the amplifier are treated asa single entity termed the controller. The controller is a phase lead circuit and the amplifier is modeledas a static gain. The controller is driven by the error between the reference input and the sensed positionof the ball. The transfer function Gac(s) of the controller and amplifier combination takes the form:
Gac(s) = 𝜈(s)e(s)
=bac1s + bac0
s + aac0
(10.7)
where aac0, baco, and bac1 are the coefficients of the transfer function, e(s) is the Laplace transform of theerror e(t).
10.2.2.2 Position Sensor Output
The position x(t) of the ball is measured by an induction sensor given by:
y(t) = x(t) + w(t) (10.8)
where w(t) is the combination of the measurement noise and the disturbance.
430 Identification of Physical Systems
10.2.2.3 Closed-Loop System
The closed-loop transfer function Tyc(s) formed of the controller Gac(s) and the magnetic levitationsystem Gmc(s), which relates the output y(s) and the reference input r(s), is given by:
y(s) = Tyc(s)(r(s) − w(s)) (10.9)
where Tyc(s) =Gac(s)Gma(s)
1 + Gac(s)Gma(s)=
bmc0(bac1s + bac0)
(s2 − amc0)(s + aac0) + bmc0(bac1s + bac0), y(s), r(s) and w(s) are
respectively the Laplace transforms of y(t), r(t), and the disturbance w(t). Simplifying using the expres-sions (10.5) and (10.9) yields:
Tyc(s) =bc1s + bc0
s3 + ac2s2 + ac1s + ac0
(10.10)
where bc0 = bmc0bac0, bc1 = bmc0bac1, ac2 = aac0, ac1 = −amc0 + bc1, ac0 = −aac0amc0 + bc0.
10.2.3 Discrete-Time Equivalent of Continuous-Time ModelsThe continuous time system is expressed by an equivalent discrete-time model for the purpose of systemidentification using sampled input–output data.
10.2.3.1 Transfer Function of the Magnetic Levitation System
The discrete-equivalent of the continuous-time transfer function given by Eq. (10.5) is:
Gm(z) = x(z)𝜈(z)
=bm1z−1 + bm2z−2
1 + am1z−1 + am2z−2(10.11)
where x(z) and 𝜈(z) are respectively the z-transforms of the discrete-time signals x(k) and 𝜈(k). The polesof the discrete-time model are related those of the continuous-time model (10.6) as:
pdi = epc1Ts
pd2 = epc2Ts = e−pc1Ts = 1pd1
(10.12)
where pd1 and pd2 are the poles of the discrete-time model and Ts is the sampling period. Note that thepoles of the discrete-time equivalent model are real and satisfy reciprocal symmetry with respect to theunit circle, pd1pd2 = 1, whereas the poles of the continuous-time model are located symmetrically withrespect to the imaginary axis, pc2 = −pc1.
10.2.3.2 Transfer Function of the Controller and Amplifier
The discrete equivalent of the continuous-time transfer function given by Eq. (10.7) is:
Ga(z) = 𝜈(z)e(z)
=ba0 + ba1z−1
1 + aa1z−1(10.13)
where e(z) and 𝜈(z) are respectively the z-transforms of the discrete-time signals e(k) and 𝜈(k).
Modeling and Identification of Physical Systems 431
The expression for the output given by Eq. (10.9) becomes:
y(z) = Ty(z)(r(z) − w(z)) (10.14)
where Ty(z) =Gc(z)Gm(z)
1 + Gc(z)Gm(z)is the discrete equivalent of the continuous-time transfer function
denoted Tc(z).
10.2.3.3 Closed-Loop Transfer Functions
Complementary Sensitivity FunctionUsing Eqs. (10.11) and (10.13), the expression for the closed-loop transfer function Ty(z), termed thecomplementary sensitivity function is:
Ty(z) =(bm1z−1 + bm2z−2
) (ba0 + ba1z−1
)(1 + am1z−1 + am2z−2
) (1 + aa1z−1
)+
(bm1z−1 + bm2z−2
) (ba0 + ba1z−1
) (10.15)
Expressing in a compact form yields:
Ty(z) =b1z−1 + b2z−2 + b3z−3
1 + a1z−1 + a2z−2 + a3z−3(10.16)
where b1 = ba0bm1, b2 = ba0bm2 + ba1bm1; b3 = ba1bm2, a1 = am1 + aa1 + b1, a2 = am2 + am1aa1 + b2,a3 = am2aa1 + b3.
Substituting the expression for Ty(z) in Eq. (10.14), and taking the inverse z-transform, the linearregression model becomes:
y(k) + a1y(k − 1) + a2y(k − 2) + a3y(k − 3) = b1r(k − 1) + b2r(k − 2) + b3r(k − 3) + 𝜐(k) (10.17)
where 𝜐(k) is the equation error which is colored given by:
𝜐(k) = −(b1w(k − 1) + b2w(k − 2) + b3w(k − 3)) (10.18)
Sensitivity FunctionThe input sensitivity function Su(z) is given by
Su(z) = u(z)r(z)
=Gc(z)
1 + Gc(z)Gm(z)(10.19)
Using the expressions for Ga(z) and Gm(z) given by Eqs. (10.11) and (10.13) yields
Su(z) =(ba0 + ba1z−1
) (1 + am1z−1 + am2z−2
)(1 + am1z−1 + am2z−2
) (1 + aa1z−1
)+
(bm1z−1 + bm2z−2
) (ba0 + ba1z−1
) (10.20)
Simplifying yields:
Su(z) =bu1z−1 + bu2z−2 + bu3z−3
1 + a1z−1 + a2z−2 + a3z−3(10.21)
432 Identification of Physical Systems
where bui : i = 1, 2, 3 is the numerator coefficient obtained from simplifying the numerator of Eq. (10.20).The expression for the control input u(z) becomes:
u(z) = Su(z)(r(z) − w(z)) (10.22)
Substituting the expression for Su(z) given by Eq. (10.21) and taking the inverse z-transform, the linearregression model becomes:
u(k) + a1u(k − 1) + a2u(k − 2) + a3u(k − 3) = bu1r(k − 1) + bu2r(k − 2) + bu3r(k − 3) + 𝜐u(k) (10.23)
where 𝜐u(k) is the equation error which is colored given by:
𝜐u(k) = −(bu1w(k − 1) + bu2w(k − 2) + bu3w(k − 3)) (10.24)
Comments From the expressions of the complementary sensitivity function (10.15) and the inputsensitivity function (10.20), we can deduce the following:
∙ The zeros of the complementary sensitivity function Ty(z) are the zeros of the controller Gc(z) and thelevitation system Gm(z).
∙ The zeros of the input sensitivity function Su(z) contain the poles of the levitation system Gm(z).
The above relationships governing the zeros of the closed-loop transfer functions, and the zeros andthe poles of the open-loop subsystems, play an important role in cross-checking the accuracy of theidentification method.
10.2.4 Identification Approach10.2.4.1 Identification Objective
The magnetic levitation is a closed-loop system and the objective is to identify the plant Gm(z). Since theplant is unstable, the identification has to be performed in closed-loop configuration. The application forthe identification includes the design of a controller for the magnetic levitation.
There are two popular approaches, namely the direct approach and the two-stage approach [6–8].
10.2.4.2 Direct Approach
The input–output data of the plant u(k) and y(k) are employed to identify the plant Gm(z) using anopen-loop identification method. A direct approach using the classical least-squares approach generallyyields poor estimates due to the presence of disturbance w(k) circulating in the closed-loop system. Itcan be deduced from Eqs. (10.17) and (10.23) that the output y(k) and the input u(k) are correlated withthe disturbance w(k − i) : i = 1, 2, 3. Hence an indirect approach, based on the two-stage identificationscheme is employed instead.
10.2.4.3 Two-Stage Approach
∙ In Stage 1, the input sensitivity function Su(z) and the complementary sensitivity function Ty(z) areidentified using the linear regression models (10.23) and (10.17). Let Su(z) and Ty(z) be the estimatedmodels of Su(z) and Ty(z) respectively. The estimate u(k) of u(k) and the estimated y(k) of y(k)
Modeling and Identification of Physical Systems 433
( )aG zr
y
+
−
+
+
re
w
( )mG z
u
u
Closed loop system
Stage Iidentification
Stage IIidentification
r y
u
ˆ ( )mG z
Figure 10.3 Two-stage identification method
are computed from the identified sensitivity function and the complementary sensitivity functionrespectively:
u(z) = Su(z)r(z)
y(z) = Ty(z)r(z)(10.25)
∙ In Stage 2, the subsystem Gm(z) is then identified using the estimated input u(k) and the output y(k)(rather than the actual ones) obtained from the first stage. The linear regression model relating u(k)and y(k):
y(k) + am1y(k − 1) + am2y(k − 2) = bm1u(k − 1) + bm2u(k − 2) (10.26)
where am1, am2, bm1, and bm2 are respectively the estimates of the coefficients am1, am2, bm1, and bm2
of the transfer function Gm(z) given by Eq. (10.11). The linear regression model (10.26) is used foridentifying Gm(z). Figure 10.3 shows the two-stage identification scheme.
Comments The two-stage scheme ensures that the estimated sensitivity and the closed-loop sensitivityfunctions are consistent, that is they are associated with a closed-loop system formed of the plant tobe identified and other subsystems including the controllers, actuators, and sensors. For example, thedenominator polynomials of Su(z) and Ty(z) are identical, the zeros of S(z) and T(z) are respectively
equal to the poles and the zeros of the estimated plant Gm(z).In the case when the plant is unstable, unstable poles of the plant are captured by the zeros of the
sensitivity function in Stage 2 under a very mild restriction on the the Stage 1 identification, namely thethe estimated plant input and the output are bounded. Thanks to boundedness of the estimated output ofStage 1, the Stage 2 identification is robust.
10.2.5 Identification of the Magnetic Levitation SystemA linearized model of the system was identified as closed-loop using a LABVIEW data A/D and D/Adevice. The reference input was a rich probing signal, random binary sequence. The plant model wasidentified from the closed-loop input–output data of the plant. An appropriate sampling frequency was
434 Identification of Physical Systems
determined by analyzing the input–output data for different choices of the sampling frequencies. Asampling frequency of 5 msec was found to be appropriate. The physical system was identified in theStage 1 using the high-order least squares method with nh = 6, and a reduced second-order model wasderived. First, the closed-loop sensitivity and complementary sensitivity function were identified. Theestimated plant input and the estimated plant output were employed in the second stage to estimatethe plant model. The model order was determined using the Akaike Information Criterion (AIC). Theorder of the identified sensitivity and the complementary functions were 2, while the order based onthe physical laws was 3.
The subfigures on the left of Figure 10.4 show the output y(k) and the control input u(k) and theirestimates y(k) and u(k) respectively, which are obtained using MIMO identification of the Stage 1identification. The subfigure on the top shows y(k) and y(k) while the subfigure on the bottom shows u(k)and u(k). The subfigures on the right show the poles and the zeros of the sensitivity function identifiedin Stage 1, and those of the plant identified in Stage 2. The subfigure on the top shows the poles and thezeros of the identified plant Gm(z) obtained in Stage 2 while the subfigure at the bottom shows the polesand the zeros of the identified sensitivity function Su(z) from Stage 1.
The identified model was verified by comparing the frequency response of the identified model, G(j𝜔),with the estimate of the transfer function, Gfreq(j𝜔), obtained using a non-parametric identification methodusing the Fourier transforms of the plant input and the plant output:
Gfreq(j𝜔) =Y(j𝜔)U(j𝜔)
(10.27)
Figure 10.5 shows the comparison of the frequency response of the identified model, G(j𝜔), and estimateof the transfer function Gfreq(j𝜔).
The identified sensitivity function was:
Su(z) = −1.7124z−1 + 1.833z−2
1 − 1.7076z−1 + 0.7533z−2(10.28)
The poles and the zeros of Su(z) were 0.8538 ± j0.1560 and 1.0706 respectively. The identified plantmodel was:
Gm(z) = −0.2472z−1 + 0.2400z−2
1 − 1.9139z−1 + 0.9028z−2(10.29)
The poles and the zeros of Gm(z) were 1.0706 and 0.8433, and 0.97 respectively. Subfigures on the rightof Figure 10.5 show the poles and the zeros of Gm(z) at the top and those of Su(z) at the bottom.
10.2.5.1 Model Validation
Unlike the case of the simulated system, there is a need to validate the identified model. The followingare the guidelines used in the verification process:
∙ A reliable model-order selection criterion, namely AIC, was employed to determine the appropriatestructure of the magnetic levitation system.
∙ The structure of the model identified derived from the physical laws given by Eq. (10.11) wasemployed. The plant has two real poles, one stable and the other unstable. Further, the poles arereciprocals of each other.
∙ The zeros of the sensitivity function should contain the unstable pole(s) of the plant.∙ The frequency responses of the plant computed using two entirely different approaches should be
close to each other. In this case, a non-parametric approach was employed to compare the frequencyresponse obtained using the proposed model-based scheme.
0500
100
0150
0200
025
00
30
00
35
00
40
00
4500
5000
-1
-0.9
-0.8
-0.7
-0.6
-0.5
Tim
e
U and uest
Outp
ut
and e
stim
ate
0500
100
0150
0200
025
00
30
00
35
00
40
00
4500
5000
-0.50
0.51
Tim
e
U and uest
Contr
ol and e
sti
ma
te
-1-0
.50
0.5
1-1
-0.50
0.51
Pole
-zero
map
of th
e p
lant
Real a
xis
Imaginary axis
-1-0
.50
0.5
1-1
-0.50
0.51
Pole
-zero
map
of th
e s
ensiti
vity
Real a
xis
Imaginary axisF
igur
e10
.4T
heou
tput
and
the
cont
roli
nput
and
thei
res
timat
esan
dth
epo
le-z
ero
map
s
436 Identification of Physical Systems
0 0.5 1 1.5 2 2.5 3 3.50.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1Non-parametric and frequency domain identification
Frequency
Magnitude r
esponse
Non-parametric
Frequency domain
Figure 10.5 The frequency responses of the identified parametric and non-parametric models
Comments From the identified models of the sensitivity function and the plant, the zeros of thesensitivity function are 1.0706 and the poles of the plant are located at 1.0706 and 0.8433. It is thereforeclearly seen that the unstable plant pole at 1.0706 is accurately captured by the zero of the sensitivityfunction. However the reciprocal property of the plant poles is not satisfied by the identified plant model,as indicated by Eq. (10.12). The estimated unstable pole 1.0706 and the stable pole 0.8433 are clearlynot reciprocal of each other. Theoretically, the pole pair should have been at the locations of 1.0706and 0.9341 (1/1.0706) instead of 0.8433. This error (of about 10%) may be due to the complexity of themodel, noise artifacts, and the nonlinearities present in the physical system.
The estimated frequency response of the identified model using the parametric approach closelymatches that obtained using the non-parametric approach, as can be deduced from Figure 10.6.
10.3 Two-Tank Process Control SystemThe two-tank process control system is formed of two tanks connected by a pipe. The leakage is simulatedin the tank by opening the drain valve. A Direct Current (DC) motor-driven pump supplies the fluid tothe first tank and a Proportional Integral (PI) controller is used to control the fluid level in the secondtank by maintaining the level at a specified level, as shown in Figure 10.6.
10.3.1 Model of the Two-Tank SystemConsider Figure 10.7, where r(k), e(k), u(k), H1(k), and H2(k) are respectively the reference input, errorinput driving the controller, control input to the DC motor, height of the first tank, height of the secondtank; Qi, Qo, and Q𝓁 are respectively the (volumetric) flow rate of the inflow from the pump to the firsttank, outflow from the second tank, and leakage outflow from the pipe connecting the two tanks; A1 and
Modeling and Identification of Physical Systems 437
3γ
1γ2γ
r e u
u
2H
iQFlow rate
Height
Control input
Controller
dc motor Pump
Inflow
Leakage
Outflow
R
H1
H2
Qi
Ql
Qo
L
Leakage
LABVIEW
interfaced
to PC
Figure 10.6 Two-tank process control system
0G aG
1w1sk
1v
mG 2sk
2v
1yr
3y
2y
1 γ−
γ
2w
Flow sensorHeight sensor
Controller Actuator Motor and pump Tank
Leakage
hGe
3w
Figure 10.7 Sensor network: closed-loop two-tank process control system
438 Identification of Physical Systems
A2 are respectively the cross-sectional areas of the first and the second tanks. The data from the processcontrol system, namely the flow rate, the height, and the control input, are acquired using LABVIEWinterfaced to a personal computer (PC). 𝛾1, 𝛾2, and 𝛾3 are the gains associated with height sensor of H2,the flow rate sensor of Qi, and the control input u to the actuator (DC motor).
The control input to the motor, u, and the flow rate Qi are related by a first-order nonlinear equation
Qi(t) = −amQi(t) + bm𝜙(u) (10.30)
where am and bm are the parameters of the motor-pump subsystem and 𝜙(u) is a dead-band and saturation-type of nonlinearity. The Proportional and Integral (PI) controller is given by:
x3(t) = e(t) = r(t) − H2(t)
u(t) = kpe(t) + kIx3(t)(10.31)
where kp and kI are the PI controller’s gains and r is the reference input. With the inclusion of the leakage,the liquid level system is now modeled by:
A1
dH1
dt= Qi − C12𝜑(H1 − H2) − C𝓁𝜑(H1)
A2
dH2
dt= C12𝜑(H1 − H2) − C0𝜑(H2)
(10.32)
where 𝜑(.) = sign(.)√
2g(.), Q𝓁 = C𝓁𝜑(H1) is the leakage flow rate, Q0 = C0𝜑(H2), g = 980 cm/sec2 isthe gravitational constant, and C12 and Co the discharge coefficients of the inter-tank and output valves,respectively. The linearized continuous-time state-space model (A, B, C) of the entire system is given by:
x(t) = Ax(t) + Br(t) + Eww(t)
yi(t) = Cix(t) + vi(t)(10.33)
where x(t) is the 4 × 1 state, y(t) is 3 × 1 the output measurement formed of (i) the height of the secondtank y1(k), (ii), the input flow rate y2(k), and (iii) the control input y3(k), w(k) is the disturbance affectingthe system, vi(k) is the measurement noise; A is 4 × 4, B is 4 × 1, and Ci is 1 × 4 matrix:
x =⎡⎢⎢⎢⎣h1
h2
x3
qi
⎤⎥⎥⎥⎦ , y =⎡⎢⎢⎣y1
y2
y3
⎤⎥⎥⎦ , A =⎡⎢⎢⎢⎣−a1 − 𝛼 a1 0 b1
a2 −a2 − 𝛽 0 0−1 0 0 0
−bmkp 0 bmkI −am
⎤⎥⎥⎥⎦ , B =⎡⎢⎢⎢⎣
001
bmkp
⎤⎥⎥⎥⎦ , C =⎡⎢⎢⎣1 0 0 00 1 0 00 0 0 1
⎤⎥⎥⎦qi = Qi − Q0
i , q𝓁 = Q𝓁 − Q0𝓁 , q0 = Qo − Q0
o, h1 = H1 − H01 , and h2 = H2 − H0
2 are respectively theincrements in Qi, Q𝓁 , Qo, and H0
1 , H02 , Q0
i , Q0𝓁 , and Q0
o are their respective nominal values; a1, a2, 𝛼, and𝛽 are parameters associated with the linearization process, 𝛼 is the leakage flow rate, q𝓁 = 𝛼h1, and 𝛽
is the output flow rate, and qo = 𝛽h2.
10.3.2 Identification of the Closed-Loop Two-Tank System [9]The two-tank closed-loop process control system be considered as a simple sensor network as shown inFigure 10.7.
The sensor network is formed of the controller G0, the actuator (amplifier) Ga, DC motor and pumpGm, and the combination of two tanks Gh.
Modeling and Identification of Physical Systems 439
The linearized discrete-time model of the system is identified from the sample reference input r(k)and the sampled measurements yi(k): i = 1, 2, 3.
10.3.2.1 Objective
The objective is to identify the transfer functions of the three subsystems Gi(z): i = 0, 1, 2, which aredefined by G0(z) = Geu(z) relating the error e(k) and the control input u(k), G1(z) = Guq(z), relating thecontrol input u(k) and the flow rate qi(k), and G2(z) = Gqh(z), relating the flow rate qi(k) and the heighth2(k).
The application for the identification includes the fault diagnosis of the sensor network using a bankof Kalman filters. The Kalman filters are designed using the identified fault-free subsystem models.
10.3.2.2 Identification Approach
There are two popular approaches, namely the direct approach and the two-stage approach.
Direct ApproachThe input–output data (r(k) − y3(k), y2(k)), (y3(k), y2(k)), and (y2(k), y1(k)) are employed to identifyrespectively the subsystems G0(z), G1(z), and G2(z). Hence an indirect approach, based on our proposedtwo-stage identification scheme. is employed instead.
Two-Stage Approach∙ In Stage 1, the MIMO closed-loop system is identified using data formed of the reference input r, and
the subsystems’ outputs measured by the three available sensors, yi(k): i = 1, 2, 3.∙ In Stage 2, the subsystems {Gi} are then identified using the ith subsystem’s estimated input and
output measurements (rather than the actual ones) obtained from the first stage.
10.3.2.3 Stage 1: Identification of the Closed-Loop System
The subspace method was employed as it can handle both the MIMO system and the model order selectionseamlessly. The estimate of the 4 × 4 matrix transfer function of the MIMO closed-loop transfer functionis given by:
[e(z) u(z) f (z) h(z)]T = D−1(z)N(z) r(z) (10.34)
N =⎡⎢⎢⎢⎣
1.9927 −191.5216z−1 380.4066z−2 −190.8783z−3
0.0067 −1.2751z−1 2.5526z−2 −1.2842z−3
−183.5624 472.5772z−1 −394.4963z−2 105.4815z−3
−0.9927 189.1386z−1 −378.6386z−2 190.4933z−3
⎤⎥⎥⎥⎦D = 1.0000 −2.3830z−1 +1.7680z−2 −0.3850z−3
(10.35)
The zeros of the sensitivity function, relating the reference input r to the error e are 1.02 and 1.0.Figure 10.8 shows the estimation of the error, the control input, flow rate, and the height. Subfigures
on the left, show the estimate of the error and its estimate on the top, and the control input and its estimateat the bottom. Subfigures on the right, show the estimate of the flow rate and its estimate on the top, andthe height and its estimate at the bottom.
0200
400
600
800
1000
1200
1400
-200
-150
-100
-500
Error
Err
or
input
Err
or
Err
or
estim
ate
0200
400
600
800
1000
1200
1400
-1
-0.50
Tim
e
Control
Contr
ol in
put
Contr
ol
Contr
ol estim
ate
0200
400
600
800
1000
1200
1400
-3-2-10
Flo
w r
ate
Flow
Flo
w
Flo
w e
stim
ate
0200
400
600
800
1000
1200
1400
0
50
100
150
200
Heig
ht
Tim
e
Height
Heig
ht
Heig
ht
estim
ate
Fig
ure
10.8
The
erro
r,co
ntro
linp
ut,fl
owra
tean
dth
ehe
ight
,and
thei
res
timat
es
Modeling and Identification of Physical Systems 441
0 500 1000 1500-200
0
200
400Height and its estimate
0 500 1000 1500-4
-2
0
2Flow rate and its estimate
0 500 1000 1500-2
-1
0
1Control input and its estumate
Figure 10.9 The height, flow rate, and control input and their estimates from Stages 1 and 2
10.3.2.4 Stage 2: Identification
This stage yields the following three open-loop transfer functions that are identified using their respectiveinput–output estimates generated by the Stage-1 identification process:
G0(z) = u(z)e(z)
= 0.0067 + 0.4576z−1
1 − z−1(10.36)
G1(z) =qi(z)
u(z)= 0.0104z−1
1 − 0.9968z−1(10.37)
G3(z) =h2(z)
qi(z)= 0.7856z−1
1 − 1.0039z−1(10.38)
Figure 10.9 shows the combined plots of the actual values of the height, flow rate, and control input, andtheir estimates from both Stage 1 and 2.
From this figure, we can conclude that the results are on the whole excellent, especially for both theheight and control input.
Comments
∙ The two-tank level system is highly nonlinear, as can be clearly seen especially from the flow rateprofile in Figure 10.9 located at the top right corner. This is saturation-type nonlinearity.
∙ The subsystems G0(z) and G1(z) representing respectively the PI controller and the transfer functionrelating the flow rate to the tank height are both unstable with a pole at unity representing an integralaction. The estimated transfer functions G0(z) and G1(z) have captured these unstable poles. Although
442 Identification of Physical Systems
the pole of G1(z) is exactly equal to unity, the pole of G1(z) is 1.0039 instead of unity. The error maybe due to the nonlinearity effect on the flow rate.
∙ The zeros of the sensitivity function have captured the unstable poles of the open-loop unstable plantwith some error. The zeros of the sensitivity function are 1.0178 and 1.0002 while that of the subsystempoles are 1 and 1.0039.
10.4 Position Control SystemA laboratory-scale physical position control system shown in Figure 10.11 was identified. The systemconsists of an actuator, namely a PWM amplifier, a DC armature-controlled motor, a position sensor,and a velocity sensor. The angular position V𝜃 and the angular velocity VT are the sensor measurements.The input to the armature of the DC motor is u. A digital PID controller was implemented on a PC usinga real-time rapid prototyping environment, namely MATLAB® Real-time workshop. The outputs V𝜃
and VT were acquired by analog-to-digital converters (ADC) and the control input u generated by thedigital controller drives the pulse width modulator (PWM) amplifier interfaced to a digital-to-analogconverter (DAC).
10.4.1 Experimental SetupThe identification scheme was implemented and tested on the DC servo system as shown in Figure 10.10.The motor was driven by a PWM amplifier. A tacho-generator and quadrature position encoder providedmeasurements of angular velocity and position respectively. The control input to the PWM amplifier,u, was generated by a digital to analog converter, DAC, on the target PC. The velocity sensor voltagewas applied to the input of an analog to digital converter, ADC, and the position sensor was interfacedto an incremental position decoder on the target PC. A host PC and target PC were used as part of arapid prototyping system that included MATLAB®/SIMULINK, Real Time Workshop, MS Visual C++,and xPC Target. The target PC boots a real-time kernel which permits feedback and signal processingalgorithms to be downloaded from the host PC and executed in real time. The host PC and target PCcommunicate through a communication channel used for downloading compiled code from the host PCand exchanging commands and data.
10.4.2 Mathematical Model of the Position Control SystemA simplified block diagram of the servo system based on a first-order continuous time model for themotor velocity dynamics appears in Figure 10.11.
10.4.2.1 State-Space Model
x(k + 1) =⎡⎢⎢⎣
1 1 0−k𝜃 kAkp 𝛼 − k1kAk𝜔kd kikA
−k𝜃 0 1
⎤⎥⎥⎦ x(k) +⎡⎢⎢⎣
0kpkAk1
1
⎤⎥⎥⎦ r(k) +⎡⎢⎢⎣010
⎤⎥⎥⎦ w(k)
y(k) = [k𝜃 0 0]x(k) + v(k)
(10.39)
10.4.2.2 Identification Experiment
The physical position control system was identified off-line using a square wave reference input r(k) offrequency 0.5 Hz, the sampling period Ts = 0.001 sec., and the number of data samples N = 2000. Thehigh-order least squares method was used. Since the dynamics of the physical system contain uncertaintyin the form of unmodeled dynamics, including nonlinear effects such as friction, backlash, and saturation,
Modeling and Identification of Physical Systems 443
Host PC
Target PC
Position
decoder
DAC
ADC + filter
Communication channel
y kθθ=
u
MATLAB®/SIMULINK
Real time workshop
C++ xPC target
Real time kernel
Digital controller
Data acquisition, FDI
PWMamp
d wk k ω
Motor-tacho Encoder
Figure 10.10 Experimental setup
the order of the identified model was selected by analyzing the model fit for a number of different ordersthat range from 3 to 25, and a 10th order model was selected.
Figure 10.12 shows the output of the system y(k) (denoted Y0), the estimated output y(k) (denoted Y),and the reference input r(k) (denoted R0). Since the dynamics of the physical system contain uncertaintyin the form of unmodeled dynamics, including nonlinear effects such as friction, backlash, and saturation,the order of the identified model was selected by analyzing the model fit for a number of different ordersthat range from 3 to 25, and a tenth order model was selected. The probing input was a 0.5 Hz squarewave, the sample frequency was 100 Hz and each data record contained 1000 samples.
1
11i
p
k zk
z
−
−+−
1
1
11
k z
zα
−
−−
1
11
z
z
−
−−Ak
kωdk
kθr e u
Actuator Plant Sensor
Sensor
PID controller
yω
Figure 10.11 Block diagram of the position control system
444 Identification of Physical Systems
0.15 0.2 0.25 0.3 0.35 0.4 0.45
-1
-0.5
0
0.5
1
1.5
Time
R0, input
Y0, output
Y, estimated output
Figure 10.12 The output and its estimate
10.5 Summary
Magnetic Levitation SystemThe system is unstable:
X(t) = kV2(t)X2(t)
− g
Linearized Model
x(t) = amc0x(t) + bmc0𝜈(t)
y(t) = x(t) + w(t)
Gmc(s) = x(s)𝜈(s)
=bmc0
s2 − amc0
Poles of the system are pc1 =√
am0 and pc2 = −pc1 = −√
am0
Controller
Gac(s) = 𝜈(s)e(s)
=bac1s + bac0
s + aac0
Discrete-Time Equivalent of Continuous-Time Model
Gm(z) = x(z)𝜈(z)
=bm1z−1 + bm2z−2
1 + am1z−1 + am2z−2
pdi = epc1Ts and pd2 = epc2Ts = e−pc1Ts = 1pd1
Modeling and Identification of Physical Systems 445
Note that the poles of the discrete-time equivalent model are real and satisfy reciprocal symmetrywith respect to the unit circle, pd1pd2 = 1, whereas the poles of the continuous-time model are locatedsymmetrically with respect to the imaginary axis, pc2 = −pc1.
Identification ApproachA closed-loop identification based on two-stage approach is employed.
Model ValidationUnlike the case of simulated system, there is a need to validate the identified model. The following arethe guidelines used in the verification process:
∙ A reliable model-order selection criterion, namely AIC, was employed to determine the appropriatestructure of the magnetic levitation system.
∙ The structure of the model identified derived from the physical laws given was employed. The planthas two real poles, one stable and the other unstable. Further, the poles are reciprocals of each other.
∙ The zeros of the sensitivity function should contain the unstable pole(s) of the plant.∙ The frequency responses of the plant computed using two entirely different approaches should be
close to each other. In this case, a non-parametric approach was employed to compare the frequencyresponse obtained using the proposed model-based scheme.
Two-Tank Process Control SystemModel of the two-tank system
Qi(t) = −amQi(t) + bm𝜙(u)
The Proportional and Integral (PI) controller is given by:
x3(t) = e(t) = r(t) − H2(t)
u(t) = kpe(t) + kIx3(t)
A1
dH1
dt= Qi − C12𝜑(H1 − H2) − C𝓁𝜑(H1)
A2
dH2
dt= C12𝜑(H1 − H2) − C0𝜑(H2)
The linearized continuous-time state-space model (A, B, C) of the entire system is given by:
⎡⎢⎢⎢⎣h1
h2
x3
qi
⎤⎥⎥⎥⎦ =⎡⎢⎢⎢⎣−a1 − 𝛼 a1 0 b1
a2 −a2 − 𝛽 0 0−1 0 0 0
−bmkp 0 bmkI −am
⎤⎥⎥⎥⎦⎡⎢⎢⎢⎣h1
h2
x3
qi
⎤⎥⎥⎥⎦ +⎡⎢⎢⎢⎣
001
bmkp
⎤⎥⎥⎥⎦ r(t) +⎡⎢⎢⎢⎣
010
bmkp
⎤⎥⎥⎥⎦ w(t)
y(t) = Cx(t) + v(t)
Identification of the closed-loop two-tank system
∙ The two-tank level system is highly nonlinear, as can be clearly seen especially from the flow rateprofile in Figure 10.9 located at the top right corner. This is saturation-type nonlinearity.
∙ The subsystems G0(z) and G1(z) representing respectively the PI controller and the transfer functionrelating the flow rate to the tank height are both unstable with a pole at unity representing an integralaction. The estimated transfer functions G0(z) and G1(z) have captured these unstable poles. Although
446 Identification of Physical Systems
the pole of G1(z) is exactly equal to unity, the pole of G1(z) is 1.0039 instead of unity. The error maybe due to the nonlinearity effect on the flow rate.
∙ The zeros of the sensitivity function have captured the unstable poles of the open-loop unstableplant with some error. The zeros of the sensitivity function are 1.0178 and 1.0002 while those of thesubsystem poles are 1 and 1.0039.
Position Control SystemState-space model
x(k + 1) =⎡⎢⎢⎣
1 1 0−k𝜃 kAkp 𝛼 − k1kAk𝜔kd kikA
−k𝜃 0 1
⎤⎥⎥⎦ x(k) +⎡⎢⎢⎣
0kpkAk1
1
⎤⎥⎥⎦ r(k) +⎡⎢⎢⎣010
⎤⎥⎥⎦ w(k)
y(k) = [k𝜃 0 0]x(k) + v(k)
Identification experiment [10, 11]The high-order least squares method was used. Since the dynamics of the physical system containuncertainty in the form of unmodeled dynamics, including nonlinear effects such as friction, backlash,and saturation, the order of the identified model was selected by analyzing the model fit for a number ofdifferent orders that range from 3 to 25, and a 10th order model was selected.
References
[1] Valle, R., Neves, F., and Andrade, R.D. (2012) Electromagnetic levitation of a disc. IEEE Transactions onEducation, 55(2), 248–254.
[2] Shahab, M. and Doraiswami, R. (2009) A novel two-stage identification of unstable systems. Seventh Interna-tional Conference on Control and Automation (ICCA 2010), Christ Church, New Zealand.
[3] Craig, D. and Khamesee, M.B. (2007) Black box model identification of a magnetically levitated microboyicsystem. Smart Materials and Structures, 16, 739–747.
[4] Peterson, K., Grizzle, J., and Stefanpolou, A. (2006).Nonlinear Magnetic Levitatiobn of Automotive EngineValves. IEEE Transactions Control Systems Technology, 14(2) 346–354.
[5] Galvao, R.K., Yoneyama, T., Araujo, F., and Machado, R. (2003) A simple technique for identifying a linearizedmodel for a didactic magnetic levitation system. IEEE Transactions on Education, 46(1), 22–25.
[6] Forssell, U. and Ljung, L. (1999) Closed loop identification revisited. Automatica, 35(7), 1215–1241.[7] Ljung, L. (1999) System Identification: Theory for the User, Prentice Hall, New Jersey.[8] Huang, B. and Shah, S.L. (1997) Closed-loop identification: a two step approach. Journal of Process Control,
7(6), 425–438.[9] Doraiswami, R.L., Cheded, L., and Khalid, M.H. (2010) Sequential Integration Approach to Fault Diagnosis
with Applications: Model-Free and Model-Based Approaches, VDM Verlag Dr. Muller Aktiengesellschaft &Co. KG.
[10] Liu, Y., Diduch, C., and Doraiswmi, R. (2003) Modeling and identification for fault diagnosis. In 5th IFACSymposium on Fault Detection, Supervision and Safety of RTechnical Process, Safeprocess 2003, WashingtonD.C.
[11] Doraiswami, R., Diduch, C., and Kuehner, J. (2001) Failure Detection and Isolation: a new paradigm. Proceed-ings of the American Control Conference, Arlington, USA.