Sale!

ECE211 Problem Set VI: State-Space Analysis solution

Original price was: $35.00.Current price is: $30.00. $25.50

Category:

Description

5/5 - (6 votes)

Signal Processing & Systems Analysis
1. Given:
H (z) = 5z
2 + 6z + 7
10z
2 3z 4
(a) Sketch the direct form II transposed realization.
(b) Find the fA; B; C; Dg state-space representation. Take the convention that the
delay element on top is state-variable x1 [n], and the one below is x2 [n]. Note:
Sometimes the path from one input or state variable to an output or state variable
goes through more than one multiplier and/or adder; in this case you have to trace
out the full path to get the proper coe¢ cients in A; B; C; D.
(c) In MATLAB, use ss2tf (not the symbolic toolbox) to convert your state-space
realizations back to a transfer function, and verify that you get back the original
H (z).
(d) Obtain fA0
; B0
; C0
; D0g where A0 = AT
, B0 = C
T
, C
0 = BT and D0 = DT
. Apply
ss2tf to check that H (z) has not changed. Note: This will turn out to be the
direct form II realization, you donít have to draw it.
(e) Now call tf2ss with H (z). Does MATLAB return either of the two realizations
you have so far, or something else?
(f) Start with the fA; B; C; Dg realization MATLAB tf2ss returns from H (z). Apply the following transformation of state: x
0 = T x, which results in A0 = T AT 1
,
B0 = T B, C
0 = CT 1
, D0 = D. Take:
T =

5 2
7 3 
Compute fA0
; B0
; C0
; D0g, and use the symbolic toolbox to compute the transfer
function (using the formula for H (z) in terms of the state-space matrices), and
verify that it is the same H (z).
2. The following information about an analog state-space realization fA; B; C; Dg is
known: D is a 23 matrix, and the eigenvalues of A are: 3 with multiplicity 3,
2  j5 (simple) and +0:5 (simple).
(a) Specify the number of inputs, outputs and state variables, and the dimensions of
A; B; C; H (s).
(b) Write the general form of an entry in e
At (as a sum of real time-domain functions
with several unspeciÖed constants).
(c) Is it possible for the transfer function matrix H (s) to be stable? If so, what is
the condition for this to occ
3. Given:
A =
2
4
139:3 263 135
83 156:7 80:4
18 34 17:5
3
5
(a) (Make sure you typed in the MATRIX **PRECISELY** as given, in MATLAB;
this has been carefully crafted to produce fun results!! Youíre welcome.) Use
MATLAB to check that the eigenvalues are 0:3 with multiplicity 2, and 0:5
(simple).
(b) Use the symbolic toolbox to compute z (zI A)
1
. Then use iztrans to compute
 [n] = An
.
(c) Take N = 40. With initial condition ~x [0] = [1 1 1]T
, compute ~x [n] for 0  n  N
using the iteration ~x [n + 1] = Ax [n]. (Do NOT directly compute using An
).
(d) Here, for a vector ~v, let j~vj denote its length. Graph j~x [n]j on a stem plot, with
the value given in decibels (should it be 20 log10 or 10 log10?). [If ~x ! 0, what do
you expect to happen to the length jx [n]j in decibels?]
(e) Look at your graph of j~x [n]j in decibels. For large n, this seems to converge to a
straight line with a negative slope. Why? What would the slope be, and why?
(f) Again with N = 40, you can evaluate AN directly in MATLAB, and you can also
evaluate it using your symbolic representation of  [n]; if phi is the name you gave
to the symbolic state transition matrix, then the following will evaluate it at N:
phiN = double(subs(phi;0 n
0
; N));
Do this, and compare your computed AN with  [N] found as above by computing
the following: Önd the maximum absolute error between the elements of the two
computed matrices.
4. Here we continue the example from the previous problem. Look at your graph for
jx [n]j. You should make the following observation: although ~x ! 0, it does not
decrease monotonically; that is, it is possible for jA~vj  jvj even though its eigenvalues
have magnitude less than 1. The operator norm of A (even if A is nonlinear) is deÖned
as:
kAk = max
j~vj6=0
jA~vj
j~vj
In MATLAB, norm(A) returns the operator norm of the matrix A.
(a) Evaluate
p
norm(A): you may be surprised how big it is! Note that jA~vj =
v
T (ATA) v; it turns out kAk is the square root of the largest eigenvalue of
ATA: use MATLAB to check that this is right. In fact, look at the eigenvalues of
ATA: two are tiny but one is HUGE. If ~v has a component in that eigendirection,
A~v will ìexplodeî but if ~v is ? to that direction, then A~v will get tiny. This is
signiÖcant because, even though An ! 0 in the limit, it can cause large transients, for example triggering overáows. In fact, this can in turn cause the actual
system to become UNSTABLE when quantization is taken into account! In
of ~x [n + 1] = A~x [n], we have ~x [n + 1] = Q (Ax [n]) where Q is the (nonlinear)
quantization operation. Thus, over time, we apply the operation QA (multiply
by A, then quantize) repeatedly, and can write ~x [n] = (QA)
n
~x [0]. Although we
have a mathematical guarantee that An ! 0, meaning this potentially explosive
nature of A will eventually not be triggered (look at your graph of j~x [n]j), the
perturbation caused by Q might prevent (QA)
n ! 0. If this happens, it is called
a limit cycle and is a form of instability!
(b) Let Q (~v) be a saturation overáow function where each component of the vector is
replaced by +127 if vi > 127, or 128 if vi < 128. With this, run the iteration:
~xQ [n + 1] = Q (A~xQ [n])
with ~xQ [0] = [1 1 1]T
. Run this iteration to compute ~xQ [n] for 0  n  5.
Look at the contents of xQ (donít graph jxQ [n]j, look at the actual state vector
entries) and you will see what happens! You have hit a limit cycle! [This doesnít
necessarily mean it oscillates. It means it doesnít collapse to 0. Actually, in this
case, it gets “stuck” pretty far from 0! Obviously with an overáow operation,
we donít have to worry about anything blowing up. But this certainly violates
asymptotic stability!]
Remark: Here is an explanation. No work required, this is just (fun?) reading. We
observe that our overáow quantization scheme has the property that jQ~vj  j~vj
for all ~v, and in fact we see that the operator norm is kQk = 1. In fact, any
operator F with the property kFk  1 is called nonexpansive or passive. If we
have two (linear or nonlinear) operators say F; G, it turns out kF Gk  kFk kGk.
From this we get k(QA)
n
k  kQk
n
kAk
n = kAk
n
. Our problem is although all the
eigenvalues of A have magnitude less than 1, which forces An ! 0, we have kAk
bigger than the largest eigenvalue magnitude. Letís denote this as max j (A)j.
Because the system is internally stable, we know max j (A)j < 1. However, this
does not force kAk < 1! In fact, kAk > 1 in our case! Note that kAk
n
is an upper
bound on the norm of (QA)
n
. Thus, we MAY have (QA)
n ! 0 still, if we are lucky,
but it may not (in this case, you have seen it does not!) So, in general, we may
or may not have a limit cycleñthey can be very di¢ cult to predict. HOWEVER
there is a trick! If A is a square matrix and T is square invertible, we know
A0 = T AT 1 has the same eigenvalues of A. There is a mathematical theorem
that for every A, we can Önd T such that kA0k = max j (A0
)j which means
kA0k = max j (A)j. In this case, if we start with A having max j (A)j < 1,
i.e., An ! 0, we would get (QA0
)
n ! 0, in fact, it will decay exponentially
fast! Thus, for any state-space realization fA; B; C; Dg that is internally stable,
we can always Önd a transformation of state that prevents limit cycles due to
passive nonlinearities, such as overáow. Last comment: roundo§ can make values
LARGER (when you round up); in fact, if QR is the roundo§ operation, kQRk = 2
(e.g., 0.5 rounds up to 1 if we round to nearest integer). For these types of
nonlinearities, there is no systematic way to universally prevent limit cycles- the
situation needs to be studied on a case by case basis. Although it might seem
that overáow is a ìworseî form of quantization than roundo§, in that the size of
overáow errors tend to be larger than roundo§ errors, the fact that roundo§ is
not passive can suggest it is a more di¢ cult kind of nonlinearity to contend with.