The arx()function can also be used in the identification of multivariable systems. In the system, suppose that there are p inputs and q outputs. The difference equation for the multivariable system can be written as
A(z−1)y(t )= B(z−1)u(t− d) + ε(t), (2.43) where d is the delay matrix, A(z−1)and B(z−1)are both p× q polynomial matrices, and
A(z−1)= Ip×q+ A1z−1+ · · · + Anaz−na,
B(z−1)= Ip×q+ B1z−1+ · · · + Bnbz−nb. (2.44) With the use of thearx()function, the matrices Ai and Bican be obtained, and the transfer function matrix can be extracted with thetf()function.
Example 2.30. Assume that the transfer function matrix is given by
G(z)=
0.5234z− 0.1235 z2+ 0.8864z + 0.4352
3z+ 0.69 z2+ 1.084z + 0.3974 1.2z− 0.54
z2+ 1.764z + 0.9804
3.4z− 1.469 z2+ 0.24z + 0.2848
.
The two input signals can be individually set to PRBS sequences. To cancel out the corre-lations of the two sets of signals, the two sequences u1and u2are arranged in reverse order.
The following statements can be used to identify the system model:
>> u1=idinput(31,’PRBS’); t=0:.1:3; u2=u1(end:-1:1);
g11=tf([0.5234, -0.1235],[1, 0.8864, 0.4352],’Ts’,0.1);
g12=tf([3, 0.69],[1, 1.084, 0.3974],’Ts’,0.1);
g21=tf([1.2, -0.54],[1, 1.764, 0.9804],’Ts’,0.1);
g22=tf([3.4, 1.469],[1, 0.24, 0.2848],’Ts’,0.1);
G=[g11, g12; g21, g22]; y=lsim(G,[u1 u2],t);
na=4*ones(2); nb=na; nc=ones(2);
U=iddata(y,[u1,u2],0.1); T=arx(U,[na nb nc])
The difference equation identified is a multivariable equation, and it can be converted to the required multivariable transfer function matrix. For instance, taking into consideration the subtransfer function item, with the first input versus the first output, the subtransfer function g11(z)can be extracted from
>> H=tf(T); g11=H(1,1) and one finds that
g11(z)=
0.5234z11+1.493z10+1.847z9+1.235z8+0.5004z7+0.09574z6−0.01551z5
−0.0137z4−1.683×10−16z3−3.582×10−17z2−4×10−18z+5.362×10−19 z12+ 3.974z11+ 7.431z10+ 8.483z9+ 6.585z8+ 3.611z7+ 1.401z6 . The order of the model is very high, and thus the minimum realization method to the model should be used, with relatively large error tolerance of = 10−4, to find a closer transfer function to the original one,
>> G11=minreal(g11,1e-4) and the subtransfer function
g11(z)= 0.5234z− 0.1235 z2+ 0.8864z + 0.4352
can be identified. Using similar methods, the other subtransfer functions can be extracted from the identified model. The transfer function matrix can also be obtained with
>> H=minreal(H(1:2,1:2),1e-3)
Since the state space equations are not unique, sometimes it is not a good choice to identify the state space model of the system from measured input and output data, since there are too many redundant parameters to be identified.
Problems
1. Enter the following system models into the MATLAB environment:
(a) G(s)= s3+ 4s2+ 3s + 2 s2(s+ 1)[(s + 4)2+ 4],
(b) ˙x(t) =
−0.3 0.1 −0.05
1 0.1 0
−1.5 −8.9 −0.05
x(t) +
2 0 4
u(t), y = [1, 2, 3]x(t).
2. Suppose that the models in Problem 1 are all open-loop models. Using MATLAB, evaluate the closed-loop models if unity negative feedback is assumed. Find all the open-loop and closed-loop poles and zeros of the above models.
3. Assume that the linear ODEs describing a system are given by
˙x1(t )= −x1(t )+ x2(t ),
˙x2(t )= −x2(t )− 3x3(t )+ u1(t )
˙x3(t )= −x1(t )− 5x2(t )− 3x3(t )+ u2(t ), and y= −x2(t )+ u1(t )− 5u2(t ),
where there are two input signals u1(t )and u2(t ). Model the two-input single-output (TISO) system in the MATLAB workspace.
4. An ODE is given by
y(3)(t )+ 13 ¨y(t) + 6 ˙y(t) + 5y(t) = 2u(t).
Select a set of states and represent the equation in the MATLAB workspace.
5. Find the equivalent transfer function for the state space model
˙x =
1 2 3
4 5 6
7 8 0
x +
4 3 2
u, y = [1, 2, 3]x and also find the poles and zeros of the model.
6. Assume that in the typical feedback control structure, the blocks are given by Find state space models and transfer functions of the overall systems. Get the zero-pole-gain representations of the systems.
7. Suppose that a typical feedback system is given such that G(s)= KmJ
8. Enter the following plant model into MATLAB:
G(s)= 1
s5+ 8s4+ 19.5s3+ 19s2+ 7.5s + 1
and evaluate the closed-loop model if unity positive or negative feedback is assumed.
Find and make comments on the closed-loop poles and zeros.
9. Find a state space realization of the plant model given by G(s)= 1/(s+1)3. Comment on what may affect the Jordanian canonical form. Compare the computer results with those obtained by direct manual calculations.
10. Consider the system models
(a) ˙x = Perform balanced realizations for the systems.
11. Assume that the models of the systems are given by
(a) ˙x =
Try to check whether these models are minimally realized. If not, find the minimally realized models and give an explanation from the transfer function point of view.
12. Suppose that an overall system is composed from the series connection of two blocks G1(s)and G2(s)given, respectively, by
G1(s)= s+ 1
s2+ 3s + 4 and G2(s)= s2+ 3s + 5 s4+ 4s3+ 3s2+ 2s + 1.
If the state space representation for the overall system is required, compare the differ-ence in the results using the following two approaches in MATLAB:
(a) Perform the series connection of the two transfer functions, and then find the state space expression for the overall system model.
(b) Find the state space expressions of the two blocks, and then find the overall system model.
13. Assume that the multivariable plant G(s) and its precontroller Gc(s)are given by
G(s)=
−0.252 (1+3.3s)3(1+1800s)
0.43 (1+12s)(1+1800s)
−0.0435 (1+25.3s)3(1+360s)
0.097 (1+12s)(1+360s)
, Gc(s)=
−10 77.5
0 50
.
Evaluate the closed-loop transfer function matrix under unity negative feedback, and then find the state space realization.
14. Derive the overall system model from r(t) to y(t) as shown in the following block diagram:
3 1
s+ 1
6
s s2+ 2
4s+ 2 (s+ 1)2
1 s2
50
s2+ 2 s3+ 14
- - -
- 6
6
r(t ) y(t )
−
15. Assume that the plant model is given by
G(s)= 12
s(s+ 1)3e−2s, and the controller is
Gc(s)=2s+ 3 s .
For a unity negative feedback system, check whether it is possible to express the closed-loop system by the MATLABtfobject. Please give reasons why.
16. Draw the PRBS sequence for 127 points and draw the autocorrelation function of the sequence with thexcorr()function.
17. If the block diagram of a linear system is shown as below, derive the total system model from the input r(t ) to the output y(t):
G1(s)
- G2(s) G3(s) G4(s) G5(s) G6(s) H4(s)
-H2(s) H3(s)
H1(s)
- - -
-
? 6
6
6
r(t ) y(t )
18. Suppose that the measured input/output data of a discrete-time model is given in the table below. Identify the transfer function model, based on the suitable order selection with AIC values:
i ui yi i ui yi i ui yi
1 0.9103 0 9 0.9910 54.5252 17 0.6316 62.1589
2 0.7622 18.4984 10 0.3653 65.9972 18 0.8847 63.0000
3 0.2625 31.4285 11 0.2470 62.9181 19 0.2727 68.6356
4 0.0475 32.3228 12 0.9826 57.5592 20 0.4364 60.8267
5 0.7361 28.5690 13 0.7227 67.6080 21 0.7665 57.1745
6 0.3282 39.1704 14 0.7534 70.7397 22 0.4777 60.5321
7 0.6326 39.8825 15 0.6515 73.7718 23 0.2378 57.3803
8 0.7564 46.4963 16 0.0727 74.0165 24 0.2749 49.6011
19. For a system model
G(s)= 4s2− 4
s4+ 7s3+ 18s2+ 22s + 12,
excite the system by different signals, for instance, step signal, sinusoidal signal, and PRBS signal. Check how many samples are necessary to accurately identify the system model.
20. Based on the AIC criterion, suitable orders can be found and the discrete-time model can be identified. In control systems analysis and design, however, sometimes a low-order approximate model may be needed. This is the topic of model reduction and will be explored in Chapter 3. Try to find a good low-order approximation for the data given in Problem 18 and test how good the reduced-order models are.
21. Suppose that the measured step response data of a continuous system are as shown in the table below. Identify the transfer function model and, with the help of the AIC
values, determine a suitable order combination for the system:
t y(t ) t y(t ) t y(t ) t y(t ) t y(t ) t y(t )
0 0 1.6 0.2822 3.2 0.3024 4.8 0.3145 6.4 0.3218 8 0.3263
0.1 0.08324 1.7 0.2839 3.3 0.3034 4.9 0.315 6.5 0.3222 8.1 0.3265 0.2 0.1404 1.8 0.2855 3.4 0.3043 5 0.3156 6.6 0.3225 8.2 0.3267 0.3 0.1798 1.9 0.287 3.5 0.3051 5.1 0.3161 6.7 0.3228 8.3 0.3269 0.4 0.2072 2 0.2885 3.6 0.306 5.2 0.3166 6.8 0.3231 8.4 0.3271 0.5 0.2265 2.1 0.2899 3.7 0.3068 5.3 0.3172 6.9 0.3235 8.5 0.3273 0.6 0.2402 2.2 0.2912 3.8 0.3076 5.4 0.3176 7 0.3238 8.6 0.3275 0.7 0.2501 2.3 0.2925 3.9 0.3084 5.5 0.3181 7.1 0.324 8.7 0.3277 0.8 0.2574 2.4 0.2937 4 0.3092 5.6 0.3186 7.2 0.3243 8.8 0.3278 0.9 0.2629 2.5 0.2949 4.1 0.3099 5.7 0.319 7.3 0.3246 8.9 0.328 1 0.2673 2.6 0.2961 4.2 0.3106 5.8 0.3195 7.4 0.3249 9 0.3282 1.1 0.2708 2.7 0.2973 4.3 0.3113 5.9 0.3199 7.5 0.3251 9.1 0.3283 1.2 0.2737 2.8 0.2983 4.4 0.312 6 0.3203 7.6 0.3254 9.2 0.3285 1.3 0.2762 2.9 0.2994 4.5 0.3126 6.1 0.3207 7.7 0.3256 9.3 0.3286 1.4 0.2784 3 0.3004 4.6 0.3133 6.2 0.3211 7.8 0.3258 9.4 0.3288 1.5 0.2804 3.1 0.3014 4.7 0.3139 6.3 0.3214 7.9 0.3261 9.5 0.3289