You are on page 1of 10

# ECE 461 - Homework Set #3

## EE 461 - Homework Set #3

Transfer Function for Electrical Systems

2-Tank System

Circuit Equivalent

R1

X1

X1

X2

X2

+
Y

R2

U
C1

Y
-

C2

## 1) 2-Tank System. C1 = C2 = 1F. R1 = 10, R2 = 100

1a) Write the node equations for the 2-tank system.
(sC 1 + R11 )X 1 R11 X 2 = U
sC 2 + 1 + 1 X 2 1 X 1 = 0
R1
R2

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

## Plug into MATLAB. Since C1 = C2 = 1, the left matrix can be ignored.

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

## 1c) What are the dominant pole(s) for this system?

zpk(G)
Zero/pole/gain:
0.1
----------------------(s+0.004875) (s+0.2051)

## The dominant pole is at -0.004875

1d) 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

evalfr(G,0)
ans =
100.0000

## The DC gain is 100

The 2% settling time is 820 seconds

If you want to verify this, the step response from MATLAB is shown below:
t = [0:1000]';
y = step(G1,t);
plot(t,y)

## ECE 461 - Homework Set #3

Problem #2
Temperature Along a Metal Bar
U

Mechanical System
T2

Finite Elements T1

Electrical Equivalent
R
T2

T1

Y
T3

T4

T3

T4
+

## 2) Temperature on a Metal Bar. R = 1.5M, C = 1uF.

2a) Write the node equations for the folowing circuit
sC + 1 + 1 T 1 1 U 1 T 2 = 0
R
R

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

## 2b) Find the transfer function from U to Y

Solve for the highest derivative:
2
1
1
sT 1 = RC
T 1 + RC U + RC T 2
2
1
1
sT 2 = RC
T 2 + RC T 1 + RC T 3
2
1
1
sT 3 = RC
T 3 + RC T 2 + RC T 4
1
1
sT 4 = RC
T 4 + RC T 3

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

## ECE 461 - Homework Set #3

Y = T 4 = 0 0 0 1

T1
T2
T3
T3

+ U

## Place into MATLAB

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)

## 2c) What are the dominant pole(s) for this system?

The dominant pole is at -0.08041
2d) 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
evalfr(G,0)
1.0000

DC gain = 1
Overshoot = 0%
2% settling time = 49.74 seconds
t = [0:1:100]';
y=step(G,t);
plot(t,y)

## ECE 461 - Homework Set #3

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)

## 3b) What are the dominant pole(s) for this system?

roots(den)
ans =
-12.5000 +70.3118i
-12.5000 -70.3118i

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

## DC gain = 1000 / 5100 = 0.196

= 0.168
Overshoot = 58.53%
Ts = 4/12.5 = 0.320 seconds
The step response from MATLAB is shown below:

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

## ECE 461 - Homework Set #3

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)

## 4b) What are the dominant pole(s) for this system?

The dominant pole is at -5
4c) 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
DC gain = 10
0% overshoot
4/5 second settling time
The step response from MATLAB is shown below...

Problem 5:
F

## Mechanical Systems: 1/4 Car Model

5) The system to the right is called a 1/4 car model and is used to design the
suspension of a car.

M1
(Car)

X1

B1

B
X2

X1

M2
(tire)

K1
F

K1
(springs)

(shocks)

M1

M2

X2

K2
K2

## 5b) Write the node equations for this system.

(M 1 s 2 + Bs + K 1 )X 1 (Bs + K 1 )X 2 = F
(M 2 s 2 + Bs + K 1 + K 2 )X 2 (Bs + K 1 )X 1 = 0

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

## ECE 461 - Homework Set #3

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

## Plugging in numbers in MATLAB:

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

## If you are looking at the first state (x1), then

C = [1,0,0,0]
D = 0;
G = ss(A,B,C,D)
tf(G)
Transfer function:
s^2 + s + 200
-------------------------------------

## s^4 + 2 s^3 + 300 s^2 + 100 s + 1e004

zpk(G)
Zero/pole/gain:
(s^2 + s + 200)
---------------------------------------------(s^2 + 0.1054s + 38.23) (s^2 + 1.895s + 261.6)

## 6b) Find the transfer function from F to (X1-X2)

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.