Professional Documents
Culture Documents
2-Tank System
Circuit Equivalent
R1
X1
X1
X2
X2
+
Y
R2
U
C1
Y
-
C2
R1
1b) Find the transfer function from U to Y
Rewrite in matrix form:
1
1
R1
C 1 0 sX 1 R 1
= 1
1 1
0 C 2 sX 2 R 1 R 1 + R 2
X1 1
+ U
X2 0
R2 = 100;
A = [-1/R1, 1/R1; 1/R1, -(1/R1+1/R2)];
B = [1;0]
C = [0,1];
D = 0;
G=ss(A,B,C,D)
tf(G)
Transfer function:
0.1
-------------------s^2 + 0.21 s + 0.001
evalfr(G,0)
ans =
100.0000
If you want to verify this, the step response from MATLAB is shown below:
t = [0:1000]';
y = step(G1,t);
plot(t,y)
Problem #2
Temperature Along a Metal Bar
U
Mechanical System
T2
Finite Elements T1
Electrical Equivalent
R
T2
T1
Y
T3
T4
T3
T4
+
R
R
sC + 2 T 2 1 T 1 1 T 3 = 0
R
R
R
sC + 2 T 3 1 T 2 1 T 4 = 0
R
R
R
sC + 1 T 4 1 T 3 = 0
R
T1
T
s 2 =
T 3
T4
2
RC
1
RC
0
1
RC
2
RC
1
RC
0
1
RC
2
RC
1
RC
0
0
1
RC
1
RC
T1
T2
T2
T4
1
RC
+
0
0
0
Y = T 4 = 0 0 0 1
T1
T2
T3
T3
+ [0]U
R = 1.5e6;
C=1e-6;
a = 1/(R*C);
A=[-2*a,a,0,0;a,-2*a,a,0;0,a,-2*a,a;0,0,a,-a]
A =
-1.3333
0.6667
0
0
0.6667
-1.3333
0.6667
0
0
0.6667
-1.3333
0.6667
0
0
0.6667
-0.6667
B=[a;0;0;0];
C=[0,0,0,1];
D=0;
G=ss(A,B,C,D);
tf(G)
Transfer function:
0.1975
---------------------------------------------s^4 + 4.667 s^3 + 6.667 s^2 + 2.963 s + 0.1975
zpk(G)
Zero/pole/gain:
0.19753
-----------------------------------------(s+0.6667) (s+1.565) (s+2.355) (s+0.08041)
DC gain = 1
Overshoot = 0%
2% settling time = 49.74 seconds
t = [0:1:100]';
y=step(G,t);
plot(t,y)
3. DC SERVO MOTOR:
Ra = 1 Ohm
La = 50mH
J = 0.1kg m2
B = 0.5Ns/m
Kt = 5N/A = 5Vs
Ra
Va
+
-
La
Ia
Kt W
Kt Ia
B
J
3a) Find the transfer function for a DC servo motor from Va (the voltage applied to the armature) to (the motor
speed).
i) Write the equations which describe the dynamics:
V K
I a = Raa +L at s
K t I a = (Js + B)
ii) Solve for
V K
K t I a = K t Raa +L at s = (Js + B)
K t (V a K t ) = (Ls + R)(Js + B)
(Ls + R)(Js + B) + K 2 = K t V a
t
Kt
= (Js+B)(Ls+R)+K
2 Va
t
Plugging in values...
R=1;
L=0.05;
J=0.1;
B=0.5;
Kt=5;
num = Kt;
den = [J*L,J*R+L*B,B*R+Kt*Kt];
G=tf(num,den);
zpk(G)
Zero/pole/gain:
1000
-----------------(s^2 + 25s + 5100)
3c) From the dominant pole(s), determine the systems response to a step input, including i) Steady-State value (DC gain),
ii) Overshoot, iii) Settling Time
t = [0:0.001:1]';
y = step(G,t);
plot(t,y)
DC = evalfr(G,0)
DC =
0.1961
OS = (max(y) - DC) / DC
OS =
0.5719
Problem 4:
For the DC servo motor, replace the voltage source with a current source.
4a) Find the transfer function from Ia to .
The input is Ia
The node equation is then
K t I a = (Js + B)
or
K
= Js+Bt I a
Plugging in numbers...
G4 = tf(Kt,[J,B])
zpk(G4)
Zero/pole/gain:
50
----(s+5)
Problem 5:
F
M1
(Car)
X1
B
X2
X1
M2
(tire)
K1
F
K1
(springs)
(shocks)
M1
M2
X2
K2
K2
5c) Write the state-space equations which describe the dynamics of this system as
M (s 2 X) + B (sX) + K X = H F
Grouping terms and writing in matrix form:
M 1 0 s 2 x 1 B B sx 1 K 1
x1 1
K 1
2 +
= F
+
(
)
sx
s
x
K
+
K
x
K
0
M
B
B
2
2
2
1
1
2
2
6) Assume
M1 = M2 = 1kg
K1 = K2 = 100N/m
B1 = 1Ns/m
6a) Find the transfer function from F ro X1
x
X= 1
x2
sX
X 0
0
I
2 =
+ 1
1
1
s X M K M B sX M H
M1 = 1;
M2 = 1;
B = 1;
K1 = 100;
K2 = 100;
Mm = [M1,0;0,M2];
Bm = [B,-B;-B,B];
Km = [K1,-K1;-K1,K1+K2];
Z = zeros(2,2);
I = eye(2,2);
H = [1;0];
A = [Z,I;-inv(Mm)*Km,-inv(Mm)*Bm]
A =
0
0
-100
100
0
0
100
-200
1
0
-1
1
0
1
1
-1
B = [0;0;inv(Mm)*H]
B =
0
0
1
0
x1
x2
sx 1
sx 2
0
0
0
0
=
100 100
100 200
1
0
1
1
0
1
1
1
x1
x2
sx 1
sx 2
0
0
1
0
C = [1,-1,0,0];
D = 0;
G = ss(A,B,C,D);
tf(G)
Transfer function:
s^2 + 1.421e-014 s + 100
------------------------------------s^4 + 2 s^3 + 300 s^2 + 100 s + 1e004
zpk(G)
Zero/pole/gain:
(s^2 + 100)
---------------------------------------------(s^2 + 0.1054s + 38.23) (s^2 + 1.895s + 261.6)
6c) How do the poles change as you change what you define as the output?
The poles do not depend upon what you are measuring. They stay the same for the same system.
The zeros do change depending upon what you're measuring.