Professional Documents
Culture Documents
CL1 Solutions Part2
CL1 Solutions Part2
Computer Exercise 1
Solutions part 2
Andreas Svensson
andreas.svensson@it.uu.se
November 3, 2013
Exercise 4.1
The order of the system is the number of states. Since the A-matrix A4tank is 4 x 4, the order is 4. The system
is found being controllable using, e.g., this Matlab code
if rank(ctrb(A4tank,B4tank)) == length(A4tank)
display(Controllable)
end
In a similar way, the system can be found being observable. A controllable and observable state space description
is a minimal realization.
Exercise 4.2
Since the the state space description is a minimal realization of the system, the poles of the system are the
eigenvalues of the A-matrix1 . The eigenvalues, and hence the poles, is found using the command eig to be
-0.0161, -0.0111, -0.0435, -0.0333. Since the real parts of all poles are negative, the system is stable.
Exercise 4.3
At the end of Section 2 in the instructions, the approximate relation for for the systems impulse response g ptq
(for t " 0 and a system with diagonalizable A-matrix) is derived:
log g ptq p1 t
(1)
For plotting the logarithm of g ptq, the follwing matlab code can be used:
[Y,T] = impulse(G4tank);
subplot(221); plot(T,log(Y(:,1,1)));
...
subplot(224); plot(T,log(Y(:,2,2)));
For each separate element in the transfer function, the following slopes2 (and, hence, dominating poles) can be
found for t " 0:
(1,1):
(1,2):
(2,1):
(2,2):
-0.016
-0.016
-0.011
-0.011
1 Check: If the state space description is not a minimal realization, what is the relation between the eigenvalues of A and the
poles then?
2 An easy way to find the approximate slope is to use the data cursor tool in the plots.
Exercise 4.4
Using the command tf, the following transfer function is found:
Gpsq
0.042
s 0.016
ps
ps
0.00052
0.033 s 0.011
qp
0.0010
0.044 s 0.016
qp
0.031
s 0.011
(2)
Exercise 4.5
For computing zeros of MIMO-system, the Matlab command tzero is to be used, according to the Matlab
documentation! tzero(G4tank) gives the zeros -0.017 and -0.059, and hence is the system minimum phase.
Try to find out why tzero(G), where G is the transfer function from Exercise 4.4, does not give the same
answer!
Exercise 4.6
-