6a) The state variable equations for the system shown below are given. If the outputs of interests are 1) tensile force
in spring K₂; 2) total momentum of the masses and 3) velocity of mass M₂, find matrices A, B, C and D.
6b) MATLAB Coding: For the system shown below, assume the numerical value of all constants = 1 (in consistent
units). Input, fa(t) = cos(t); Initial Conditions = 0. Plot x2 vs. time for 0≤ t ≤ 10 seconds using a) Isim and b) ode45
function. Have both (a & b) on the same graph for comparison. Refer example-5 (page-9) in the MATLAB manual.
voo
K₁
x₁ = V1
U1
x2 = 22
v₂ =
M₁
+
B
000
K₂
M₂
-fa(t)
voo
K3
-[−(K₁ +K2)x₁ − Bv₁ +K2x2+Bv2]
M₁
M₂ [K2x₁ + BU₁ − (K2 + K3)x2 − Bv2 + fa(1)]
Fig: 1