Example Sheet 1

advertisement
Problem Set #1
03/30/09
For questions, comments or typos: cosmin.ionita[at]rice.edu.
Problem [1]. Approximation of the clown.mat image: after starting Matlab, type
load clown;
Z = ind2gray(X, map);
[mz,nz] = size(Z);
imshow(Z,64);
mag = 2;
truesize(1, [mz*mag, nz*mag]);
Compute the SVD of Z, using the command: [U,S,V] = svd(Z);
(a) Plot the singular values of Z on a logarithmic scale, normalized to the largest singular value.
(b) Compute the approximant having error less than 5% of the largest singular value of Z. What is the rank of
the corresponding approximant?
(c) Now tile the image into four equal pieces. Use the SVD to approximate each sub-image with error less
than 5% and then reconstruct the complete image. Compute the 2-norm error of the approximant and then
compare the result with the previous one. Which method is better? Which one requires more computations?
Problem [2]. System invariance
Consider the system
E ẋ(t)
= Ax(t) + Bu(t)
y(t)
= Cx(t) + Du(t)
with E ∈ Rn×n , A ∈ Rn×n , B ∈ Rn×m , C ∈ Rp×n and D ∈ Rp×m . For simplicity, consider E to be the identity.
Let T ∈ Rn×n be a non-singular matrix that transforms the state coordinates from x to x
b, that is, x
b = T x.
Show that the following quantities are system invariant, that is, they remain the same after the basis change.
(a) the system poles,
(b) the transfer function and impulse response,
(c) the system’s reachability and observability.
The infinite reachability and observability gramians, P and Q ∈ Rn×n , are the solutions of two Lyapunov
equations, namely:
AP + PAT + BB T = 0,
and
AT Q + QA + C T C = 0.
(d) Show how the system gramians P and Q transform with the basis change.
(e) What happens with the product PQ ?
Problem [3]. The circuit below is composed of resistors (the R’s), inductors (the L’s), capacitors (the C’s), and a
voltage source v(t) that feeds voltage to the circuit.
First, we want to write down the state-space equations. The following laws describe the system’s dynamics: (i)
the current through a capacitor is proportional to the derivative of the voltage accross the capacitor, and (ii) the
voltage accross an inductor is proportional to the derivative of the current through the inductor, that is,
(i) iC (t) = C
(ii) uL (t) = L
d
dt uC (t),
d
dt iL (t).
We can substitute these formulas into Kirchhoff’s current and voltage laws: (i) the sum of the currents entering a
node equals the sum of the currents exiting the node, and (ii) the sum of the voltages across a closed loop equals
zero, e.g.,
(i) iR (t) = iC1 (t) + iL1 (t),
(ii) v(t) = uR (t) + vC1 (t) = R iR (t) + vC1 (t).
(a) Let the input u(t) be the voltage v(t), and let the states be defined as the voltages accross the capacitors
and currents through the inductors:

 

x1 (t)
vC1 (t)
 x2 (t)   iL1 (t) 
 

x(t) = 
 x3 (t)  =  vC2 (t)  .
x4 (t)
iL2 (t)
Also, let the observed output be the current through the second inductor, namely y(t) = x4 (t). Write down
the system matrices [E, A, B, C, D].
Hint: You may want to use Kirchhoff’s laws again, to get formulas for x˙3 and x˙4 .
Take the passive components to have the following values: R = 1/2, Ci = 1, Li = 1, for i = 1, 2.
(b) Compute the system poles. Is this system stable ?
(c) Check if this system is reachable and observable.
(d) Compute the transfer function H(s) = C(sE − A)−1 B + D = Y (s)/U (s), and write the imput-output
d
d
)y = p( dt
)u.
equation in the form q( dt
(e) Produce a Bode amplitude plot of the system, that is, plot |H(jω)| for relevant values of ω > 0.
√
√
(f) Compute the H2 norm of the system, given by trace CPC ∗ or trace B ∗ QB. In Matlab, use lyapchol
to compute the gramians.
p
(g) Compute the Hankel norm of the system, given by λmax (PQ).
(h) The H∞ norm of the system is defined as supω σmax H(jω) . For SISO systems, this quantity is the peak
of the amplitude Bode plot. However, we want to avoid evaluating the transfer function at ω ∈ [0 ∞].
For D = 0, we can use the bisection algorithm, which looks for the H∞ norm γ inside a given interval [γ1 γ2 ]:
Algorithm 1 (Bisection algorithm for finding the H∞ norm)
1. Pick [γ1 , γ2 ].
2. While(not converged)
γ = 21 (γ1 + γ2 );
Aγ =
A
− γ1 C ∗ C
1
∗
γ BB
∗
−A
;
If Aγ has eigenvalues on the jω axis
Set γ1 = γ;
Else
Set γ2 = γ;
EndIf
EndWhile
The procedure converges when the difference γ2 − γ1 is sufficiently small.
Compare the output of the bisection algorithm with the peak of the Bode amplitude plot from point (e).
(i) Find a state transformation which will transform the system to a basis where e1 is the state easiest to reach,
e2 the second-easiest,. . . , and e4 is the state which is least easy to reach.
(j) Find a state transformation which will transform the system to a basis where e1 is the state easiest to
observe, e2 the second-easiest,. . . , and e4 is the state which is least easy to observe. Hence, reduce the
system by eliminating the state which is most difficult to observe. What is the degree of reachability of the
state that has been eliminated.
(k) Change the basis of the state space so that all states are equally observable.
Download