EE422
SOL'N TO HW #10
1a) Take Laplace transform of state and output equations, and solve for Y(s)/W(s)!! Remember, the initial conditions are always zero for transfer functions:

So, for our problem:
According to Matlab's ss2tf() function,
» a= [2 1;2 3]
a =
2 1
2 3
» b=[0;1]
b =
0
1
» c=[2 1]
c =
2 1
» d=[0]
d =
0
» [num,den]=ss2tf(a,b,c,d,1)
num =
0 1 0
den =
1 -5 4
Hence, the numerator of H(s) is 0s2+1s1+0 and the denominator is 1s2+-5s1+4 which agrees with our theoretical answer.
b) » a=[1 0 1 0;2 1 0 0;-1 0 0 1;2 0 0 1]
a =
1 0 1 0
2 1 0 0
-1 0 0 1
2 0 0 1
» b=[0;0;1;0]
b =
0
0
1
0
» c=[1 0 2 0]
c =
1 0 2 0
» d=[0]
d =
0
» [num,den]=ss2tf(a,b,c,d,1)
num =
0 2.0000 -5.0000 4.0000 -1.0000
den =
1.0000 -3.0000 4.0000 -5.0000 3.0000
Hence, the numerator of H(s) is 0s4+2s3-5s2+4s1-1 and the denominator is 1s4-3s3+4s2-5s1+3. Hence, H(s) is H(s)=(0s4+2s3-5s2+4s1-1)/( 1s4-3s3+4s2-5s1+3)
2a) Find a block diagram for the transfer function
using:
i) Phase variables
ii) Parallel Decomposition
iii) Cascade Decompostion
2a-iii)
Phase Variables
Draw simulation diagram:

2a-ii)
Parallel method![]()
Draw simulation diagram:

2a-iii)
Cascade method![]()

2b) From your three different block diagrams, find three state variable models. Check your answer using the Matlab command ss2tf(). Do you obtain the correct H(s) for each state variable model?
Phase Variable:

Check on Matlab
» a=[0 1 0;0 0 1;0 -24 -10]
a =
0 1 0
0 0 1
0 -24 -10
» b=[0;0;1]
b =
0
0
1
» c=[30 10 0]
c =
30 10 0
» d=[0]
d =
0
» [num,den]=ss2tf(a,b,c,d,1)
num =
0 0 10.0000 30.0000
den =
1 10 24 0
It checks!!
Parallel (Decoupled):
Check on Matlab
» a=diag([0 -4 -6])
a =
0 0 0
0 -4 0
0 0 -6
» b=[5/4;5/4;-5/2]
b =
1.2500
1.2500
-2.5000
» c=[1 1 1]
c =
1 1 1
» [num,den]=ss2tf(a,b,c,d,1)
num =
0 0.0000 10.0000 30.0000
den =
1 10 24 0
It checks!!
Cascade:

Check on Matlab:
» a=[-6 5 5;0 -4 -1;0 0 0]
a =
-6 5 5
0 -4 -1
0 0 0
» b=[0;0;2]
b =
0
0
2
» c=[1 0 0]
c =
1 0 0
» [num,den]=ss2tf(a,b,c,d,1)
num =
0 0.0000 10.0000 30.0000
den =
1 10 24 0
It checks!!
2c) Use the Matlab command, tf2ss(), to directly transfer H(s) to a state variable model. Do you obtain one of your answers to part b) (remember, the choice of state variables is not unique!)?
num =
0 0.0000 10.0000 30.0000
den =
1 10 24 0
» [a,b,c,d]=tf2ss(num,den)
a =
-10 -24 0
1 0 0
0 1 0
b =
1
0
0
c =
0.0000 10.0000 30.0000
d =
0
We almost get the Phase Variable form of the state variable model. The difference is that the order of the states has been reversed! But, this doesn't bother us since the choice of state variables is not unique!
2d) Using your block diagram for Parallel Decomposition (i.e., your answer to 2a) part ii)), find an op-amp circuit which has H(s) as a transfer function.
Without any reduction, an op-amp circuit which realizes our parallel form is:
2e) Can you reduce your op-amp circuit down to just 5 op-amps?
In terms of Op-Amp reduction, note that the following Op-Amp circuit:

produces the KCL in the S-domain of: Aw(s)+PY(s)+sY(s)=0 or Y(s)/W(s) = -A/(s+P). Using this trick, we can write the transfer function for the in class example as:
![]()
Thus, we can realize this transfer function using just 5 Op-Amps!!
