The University of Jordan
School of Engineering
Department of Mechatronics Engineering
Homework no. 1: State-Space Modeling - Solution
Digital Signals and Systems Analysis - 0908483
Instructor: Dr. Mohammad A. Masadeh
Question no. (1):
R1 R2
The output i1
i2 i3
u(t) L1 C1 L2 C2
1 𝑑𝑑/𝑑𝑑𝑑𝑑
𝑣𝑣𝑐𝑐1 (𝑡𝑡) = 𝑥𝑥1 (𝑡𝑡) = 𝐶𝐶 ∫ 𝑖𝑖2 (𝑡𝑡) 𝑑𝑑𝑑𝑑 �⎯⎯⎯⎯⎯� 𝐶𝐶1 𝑣𝑣𝐶𝐶1
̇ (𝑡𝑡) = 𝐶𝐶1 𝑥𝑥1̇ = 𝑖𝑖2 (𝑡𝑡)
1
1 𝑑𝑑/𝑑𝑑𝑑𝑑
𝑣𝑣𝑐𝑐2 (𝑡𝑡) = 𝑥𝑥2 (𝑡𝑡) = 𝐶𝐶 ∫ 𝑖𝑖3 (𝑡𝑡) 𝑑𝑑𝑑𝑑 �⎯⎯⎯⎯⎯� 𝐶𝐶2 𝑣𝑣𝐶𝐶̇ 2 (𝑡𝑡) = 𝐶𝐶2 𝑥𝑥2̇ = 𝑖𝑖3 (𝑡𝑡) …………………………………………… (*)
2
By using KCL (Loop 1):
𝑣𝑣𝑅𝑅1 𝑣𝑣𝑅𝑅2
𝑖𝑖1 (𝑡𝑡) = 𝑖𝑖2 (𝑡𝑡) + 𝑖𝑖3 (𝑡𝑡) ������ 𝑅𝑅1
= 𝑖𝑖2 (𝑡𝑡) + 𝑅𝑅2
Employing KVL in Loop 1 to replace 𝑣𝑣𝑅𝑅1 and KVL in Loop 2 to replace 𝑣𝑣𝑅𝑅2 :
𝑢𝑢(𝑡𝑡)−𝑣𝑣𝐶𝐶1 (𝑡𝑡) 𝑣𝑣𝑐𝑐1(𝑡𝑡)−𝑣𝑣𝑐𝑐2 (𝑡𝑡)
̇ (𝑡𝑡) +
= 𝐶𝐶1 𝑣𝑣𝐶𝐶1
𝑅𝑅1 𝑅𝑅2
1 1 1 1
𝑅𝑅1
𝑢𝑢 (𝑡𝑡) − 𝑅𝑅 𝑣𝑣𝐶𝐶1 (𝑡𝑡) = 𝐶𝐶1 𝑣𝑣𝐶𝐶1
̇ (𝑡𝑡) + 𝑅𝑅 𝑣𝑣𝑐𝑐1 (𝑡𝑡) − 𝑅𝑅 𝑣𝑣𝑐𝑐2 (𝑡𝑡)
1 2 2
1 1 1 1
𝑅𝑅1
𝑢𝑢 (𝑡𝑡) − 𝑅𝑅 𝑥𝑥1 = 𝐶𝐶1 𝑥𝑥1̇ + 𝑅𝑅 𝑥𝑥1 − 𝑅𝑅 𝑥𝑥2
1 2 2
1 1 1 1
𝑅𝑅1
𝑢𝑢 (𝑡𝑡) − 𝑅𝑅 𝑥𝑥1 − 𝑅𝑅 𝑥𝑥1 + 𝑅𝑅 𝑥𝑥2 = 𝐶𝐶1 𝑥𝑥1̇
1 2 2
1 1 1 1
𝑥𝑥1̇ =
𝑅𝑅
𝑢𝑢 (𝑡𝑡) − �𝑅𝑅 + 𝑅𝑅 � 𝑥𝑥1 + 𝑥𝑥2 …………………………………………………………………………… (1)
1 𝐶𝐶1 1 𝐶𝐶1 2 𝐶𝐶1 𝑅𝑅2 𝐶𝐶1
By employing KVL in Loop 2:
𝑣𝑣𝑐𝑐1 (𝑡𝑡) − 𝑣𝑣𝑐𝑐2 (𝑡𝑡) = 𝑉𝑉𝑅𝑅 2 (𝑡𝑡)
𝑣𝑣𝑐𝑐1 (𝑡𝑡) − 𝑣𝑣𝑐𝑐2 (𝑡𝑡) = 𝑅𝑅2 𝑖𝑖3 (𝑡𝑡)
By substituting (*) in 𝑖𝑖3 (𝑡𝑡)
𝑣𝑣𝑐𝑐1 (𝑡𝑡) − 𝑣𝑣𝑐𝑐2 (𝑡𝑡) = 𝑅𝑅2 𝐶𝐶2 𝑣𝑣̇ 𝑐𝑐2 (𝑡𝑡)
1 1
𝑅𝑅2 𝐶𝐶2
𝑣𝑣𝑐𝑐1 (𝑡𝑡) − 𝑅𝑅 𝑣𝑣𝑐𝑐2 (𝑡𝑡) = 𝑣𝑣̇𝑐𝑐2 (𝑡𝑡)
2 𝐶𝐶2
1 1
𝑥𝑥
𝑅𝑅2 𝐶𝐶2 1
− 𝑅𝑅 𝑥𝑥2 = 𝑥𝑥2̇
2 𝐶𝐶2
1 1
𝑥𝑥2̇ = 𝑅𝑅 𝑥𝑥1 − 𝑅𝑅 𝑥𝑥2 …………………………………………………………………………..………………………… (2)
2 𝐶𝐶2 2 𝐶𝐶2
Prepared by Dr. Mohammad A. Masadeh for 0908483 Digital Signals and Systems Analysis, MEX Department. 1
By utilizing equations (1) and (2) to set up the state equation: 𝑥𝑥̇ = 𝐴𝐴𝐴𝐴 + 𝐵𝐵𝐵𝐵 :
1 1 1
𝑥𝑥 ̇ − 𝑅𝑅 𝐶𝐶 − 𝑅𝑅 𝐶𝐶 𝑅𝑅2 𝐶𝐶1 𝑥𝑥1 1
� 1 � = � 1 11 2 1 � �𝑥𝑥 � + � 1 𝐶𝐶1 � 𝑢𝑢(𝑡𝑡)
𝑅𝑅
𝑥𝑥̇ 2 − 𝑅𝑅
1 2
0
𝑅𝑅2 𝐶𝐶2 2 𝐶𝐶2
𝑢𝑢(𝑡𝑡)−𝑣𝑣𝐶𝐶1 (𝑡𝑡) 1 1 1 1
The output equation: 𝑦𝑦 = 𝑖𝑖1 = = 𝑅𝑅 𝑢𝑢(𝑡𝑡) − 𝑅𝑅 𝑣𝑣𝐶𝐶1 (𝑡𝑡) = 𝑅𝑅 𝑢𝑢 (𝑡𝑡) − 𝑅𝑅 𝑥𝑥1
𝑅𝑅1 1 1 1 1
𝑦𝑦 = 𝐶𝐶𝐶𝐶 + 𝐷𝐷𝐷𝐷
1 𝑥𝑥
𝑦𝑦 = 𝑖𝑖1 = �− 𝑅𝑅 0� � 1 � + � 1 � 𝑢𝑢(𝑡𝑡)
1 𝑥𝑥2 𝑅𝑅 1
The block diagram:
The signal flow chart:
1/(R2C1)
. .
u(t) 1/(R1C1) X1 S-1 X1 1/(R2C2) X2 S-1 X2
Input
-1/R1
-[1/(R1C1)+1/(R2C1)] -1/(R2C2)
y(t)
Output
1/R1
Prepared by Dr. Mohammad A. Masadeh for 0908483 Digital Signals and Systems Analysis, MEX Department. 2
Question no. (2):
By drawing the free-body diagram at equilibrium, one can use Newton’s law of motion as follows:
∑ 𝐹𝐹 = 𝑚𝑚. 𝑎𝑎
𝐹𝐹 (𝑡𝑡) + 𝐹𝐹1 (𝑡𝑡) − 𝐹𝐹2 (𝑡𝑡) − 𝐹𝐹3 (𝑡𝑡) = 𝑚𝑚. 𝑎𝑎 .
F2 = b.v = bx F3 = kx
𝐹𝐹 (𝑡𝑡) + 𝑚𝑚𝑚𝑚 − 𝑏𝑏𝑥𝑥̇ (𝑡𝑡) − 𝑘𝑘𝑘𝑘 (𝑡𝑡) = 𝑚𝑚. 𝑎𝑎 = 𝑚𝑚𝑥𝑥̈ (𝑡𝑡)
𝑚𝑚𝑥𝑥̈ (𝑡𝑡) = 𝐹𝐹 (𝑡𝑡) + 𝑚𝑚𝑚𝑚 − 𝑏𝑏𝑥𝑥̇ (𝑡𝑡) − 𝑘𝑘𝑘𝑘 (𝑡𝑡)
1 1 𝑏𝑏 𝑘𝑘 Mass m
𝑥𝑥̈ (𝑡𝑡) = 𝑚𝑚 𝐹𝐹 (𝑡𝑡) + 𝑚𝑚 𝑚𝑚𝑚𝑚 − 𝑚𝑚
𝑥𝑥̇ (𝑡𝑡) − 𝑚𝑚 𝑥𝑥 (𝑡𝑡),
where 𝑘𝑘 is the spring constant [𝑁𝑁/𝑚𝑚], 𝑏𝑏 is the damping constant [𝑁𝑁. 𝑠𝑠/𝑚𝑚],
𝑀𝑀 is the mass [𝑘𝑘𝑘𝑘], 𝑔𝑔 is the acceleration due to gravity [𝑚𝑚/𝑠𝑠 2 ], 𝐹𝐹 is the F(t) F1 = mg
input force [𝑁𝑁], 𝑥𝑥 is the output displacement in 𝑦𝑦-direction [𝑚𝑚].
𝑑𝑑/𝑑𝑑𝑑𝑑
𝑥𝑥1 (𝑡𝑡) = 𝑥𝑥 (𝑡𝑡) �⎯⎯⎯⎯� 𝑥𝑥1̇ (𝑡𝑡) = 𝑥𝑥̇ (𝑡𝑡) = 𝑥𝑥2 (𝑡𝑡)
𝑑𝑑/𝑑𝑑𝑑𝑑 1 1 𝑏𝑏 𝑘𝑘
𝑥𝑥2 (𝑡𝑡) = 𝑥𝑥̇ (𝑡𝑡) �⎯⎯⎯⎯� 𝑥𝑥2̇ (𝑡𝑡) = 𝑥𝑥̈ (𝑡𝑡) = 𝑚𝑚 𝐹𝐹(𝑡𝑡) + 𝑚𝑚 𝑚𝑚𝑚𝑚 − 𝑚𝑚 𝑥𝑥2 (𝑡𝑡) − 𝑚𝑚 𝑥𝑥1 (𝑡𝑡)
The state equation: 𝑥𝑥̇ = 𝐴𝐴𝐴𝐴 + 𝐵𝐵𝐵𝐵 will be as follows:
𝑥𝑥1̇ 0 1 𝑥𝑥1 0
� � = � 𝑘𝑘 𝑏𝑏 � � � + � 1 � [𝐹𝐹 (𝑡𝑡) + 𝑚𝑚𝑚𝑚]
𝑥𝑥̇ 2 −
𝑚𝑚
− 𝑚𝑚 𝑥𝑥2 𝑚𝑚
The output equation will be: 𝑦𝑦 = 𝐶𝐶𝐶𝐶 + 𝐷𝐷𝐷𝐷
𝑥𝑥1 𝑥𝑥1
𝑦𝑦 = 𝑥𝑥 (𝑡𝑡) = 𝑥𝑥1 (𝑡𝑡) = [1 0] �𝑥𝑥 � + [0]. [𝐹𝐹 (𝑡𝑡) + 𝑚𝑚𝑚𝑚] = [1 0] �𝑥𝑥 �
2 2
The block diagram:
The signal flow chart:
mg 1/m -k/m
.. .
F(t) 1/m X S-1 X S-1 X 1 y(t)
Input . . Output
x2 x2 = x1 x1
-b/m
Prepared by Dr. Mohammad A. Masadeh for 0908483 Digital Signals and Systems Analysis, MEX Department. 3