You are on page 1of 27

Dynamic System Analysis

State Variables
Examples
Example 3.1

• Find the state-variable model for this system.

• The outputs of interest are:


EX 3.1
• the tensile force for the spring 𝐾 and Video solution
• the velocity of the mass 𝑀, and attached
• the acceleration of the mass 𝑀
Example 3.1
1. Identify the state variables and the inputs

• Single mass node 𝑥


𝑞=
𝑣

• Mass node needs two state variables


• The mass position 𝑥
• The mass velocity 𝑣
𝑢 = 𝑓𝑎 (𝑡)

• The input is the applied force


Example 3.1

2. Draw FBD for each independent mass and junction point that can move with
an unknown motion.
𝑥
𝑞= 𝑢 = 𝑓𝑎 (𝑡)
𝑣

• List all the forces acting on the system


• Express the forces using the state variables 𝑥 and 𝑣
• You may use derivatives of the state variables
• Express the forces in terms of the inputs 𝑓𝑎 (𝑡)
Example 3.1
3. Sum the forces on each FBD to obtain a set of differential equations. Add equations of
the state variables.
𝑥
𝑞= 𝑢 = 𝑓𝑎 (𝑡)
𝑣

• Equations from the state variables

𝑥ሶ = 𝑣

• Equations from the Free Body Diagram

𝑀𝑣ሶ + 𝐵𝑣 + 𝐾𝑥 = 𝑓𝑎 (𝑡)
Example 3.1
4. Manipulate the equations in state-variable form.
𝑥 𝑢 = 𝑓𝑎 (𝑡)
𝑞=
𝑣
• Equations from the state variables

𝑥ሶ = 𝑣

• Equations from the Free Body Diagram


𝐵 𝐾 1
𝑣ሶ = − 𝑣 − 𝑥 + 𝑓𝑎 (𝑡)
𝑀 𝑀 𝑀
𝑥ሶ = 𝑣
• State variable equations: ቐ 𝐵 𝐾 1
𝑣ሶ = − 𝑣 − 𝑥 + 𝑓𝑎 (𝑡)
𝑀 𝑀 𝑀
Example 3.1
5. Express the output variables as algebraic functions of the state variables, the inputs
and possibly time.
𝑥
𝑞= 𝑢 = 𝑓𝑎 (𝑡)
𝑣
• the tensile force for the spring 𝐾

𝑓𝐾 = 𝐾𝑥

• the velocity of the mass 𝑀, and


𝑣𝑀 = 𝑣

𝐵 𝐾 1
• the acceleration of the mass 𝑀 𝑎𝑀 = 𝑣ሶ = − 𝑣 − 𝑥 + 𝑓𝑎 (𝑡)
𝑀 𝑀 𝑀
Example 3.2
EX 3.2
Video solution
• Find the state-variable model for this system. attached

• The outputs of interest are


• tensile force for the spring 𝑓𝐾 ,
2
• the velocity the masses 𝑣1 and 𝑣2 , and
• the total momentum 𝑚𝑇 of the masses.
Example 3.2
• For the state variables we choose 𝑥1, 𝑣1, 𝑥2, 𝑣2

• Summing the forces of the FBD for the 2 masses:

𝐾1 𝑥1 𝐵 𝑣1 − 𝑣2 𝑓𝑎 (𝑡)
𝑀1 𝐵 𝑣2 − 𝑣1
𝑀1 𝑣ሶ 1 𝐾2 𝑥1 − 𝑥2 𝑀2 𝑣ሶ 2
𝑀2
𝐾2 𝑥2 − 𝑥1

𝑀1 𝑣ሶ 1 + 𝐵 𝑣1 − 𝑣2 + 𝐾1 𝑥1 + 𝐾2 𝑥1 − 𝑥2 = 0
𝑀2 𝑣ሶ 2 + 𝐵 𝑣2 − 𝑣1 + 𝐾2 𝑥2 − 𝑥1 = 𝑓𝑎 (𝑡)

𝑥ሶ 1 = 𝑣1
• Extra equations using just the state variables 𝑥ሶ 2 = 𝑣2
Example 3.2
• The state variables and the inputs
𝑥1
𝑣1
𝑞= 𝑥2 𝑢 = 𝑓𝑎 (𝑡)
𝑣2

• The state-variable equations become:


𝑥ሶ 1 = 𝑣1
𝐵 𝐾1 𝐾2
𝑣ሶ 1 = − 𝑣 − 𝑣2 − 𝑥 − 𝑥 − 𝑥2
𝑀1 1 𝑀1 1 𝑀1 1
𝑥ሶ 2 = 𝑣2
𝐵 𝐾2 1
𝑣ሶ 2 = − 𝑣2 − 𝑣1 − 𝑥2 − 𝑥1 + 𝑓𝑎 (𝑡)
𝑀2 𝑀2 𝑀2
Example 3.2
• The outputs:
• tensile force for the spring 𝑓𝐾 ,
2

𝑓𝐾2 = 𝐾2 (𝑥2 − 𝑥1 )

• the velocity the masses 𝑣1 and 𝑣2 , and


𝑣1
𝑣2

• the total momentum 𝑚𝑇 of the masses.


𝑚 𝑇 = 𝑀1 𝑣1 + 𝑀2 𝑣2
Example 3.3 EX 3.3
Video solution
attached
• Use an alternate choice of state variables. Use
• the relative displacement xR of mass M1 with respect to M2
• the relative velocity vR of mass M1 with respect to M2

𝑥𝑟 = 𝑥1 − 𝑥2
𝑣𝑟 = 𝑣1 − 𝑣2

𝑥2

𝑥1 𝑥𝑟
𝑀2
𝑀1
Example 3.3
• The state variables and the inputs
𝑥1
𝑣1 𝑥𝑟 = 𝑥1 − 𝑥2
𝑞= 𝑥𝑟 𝑢 = 𝑓𝑎 (𝑡)
𝑣𝑟 = 𝑣1 − 𝑣2
𝑣𝑟

• The state-variable equations become:


𝑥ሶ 1 = 𝑣1
𝐵 𝐾1 𝐾2
𝑣ሶ 1 = − 𝑣1 − 𝑣2 − 𝑥1 − 𝑥1 − 𝑥2
𝑀1 𝑀1 𝑀1
𝑥ሶ 2 = 𝑣2
𝐵 𝐾2 1
𝑣ሶ 2 = − 𝑣2 − 𝑣1 − 𝑥2 − 𝑥1 + 𝑓𝑎 (𝑡)
𝑀2 𝑀2 𝑀2

• We need to eliminate 𝑥2 and 𝑣2


Example 3.3

• The state variables and the inputs


𝑥1
𝑣1 𝑥𝑟 = 𝑥1 − 𝑥2
𝑞= 𝑥𝑟 𝑢 = 𝑓𝑎 (𝑡) 𝑣𝑟 = 𝑣1 − 𝑣2
𝑣𝑟

• The state-variable equations become:


𝑥ሶ 1 = 𝑣1 𝐵 𝐾1 𝐾2
𝐵 𝐾1 𝐾2 𝑣ሶ𝑟 = 𝑣ሶ 1 − 𝑣ሶ 2 = − 𝑣 − 𝑥 − 𝑥
𝑣ሶ 1 = − 𝑣 − 𝑥 − 𝑥 𝑀1 𝑟 𝑀1 1 𝑀1 𝑟
𝑀1 𝑟 𝑀1 1 𝑀1 𝑟 𝐵 𝐾2 1
𝑥ሶ 𝑟 = 𝑣𝑟 − − −𝑣𝑟 − −𝑥𝑟 + 𝑓 𝑡
𝑀2 𝑀2 𝑀2 𝑎
𝐵 𝐾2 1 1 1 1 1 𝐾1 1
𝑣ሶ 2 = − −𝑣𝑟 − −𝑥𝑟 + 𝑓𝑎 (𝑡) =− + 𝐵𝑣𝑟 − + 𝐾𝑥 − 𝑥 − 𝑓 𝑡
𝑀2 𝑀2 𝑀2 𝑀2 𝑀1 𝑀2 𝑀1 2 𝑟 𝑀1 1 𝑀2 𝑎
Example 3.3
• The state variables and the inputs
𝑥1
𝑣1 𝑥𝑟 = 𝑥1 − 𝑥2
𝑞= 𝑢 = 𝑓𝑎 (𝑡)
𝑥𝑟 𝑣𝑟 = 𝑣1 − 𝑣2
𝑣𝑟

• The state-variable equations become:


𝑥ሶ 1 = 𝑣1
𝐵 𝐾1 𝐾2
𝑣ሶ 1 = − 𝑣 − 𝑥 − 𝑥
𝑀1 𝑟 𝑀1 1 𝑀1 𝑟
𝑥ሶ 𝑟 = 𝑣𝑟
1 1 1 1 𝐾1 1
𝑣ሶ𝑟 = − + 𝐵𝑣𝑟 − + 𝐾2 𝑥𝑟 − 𝑥1 − 𝑓𝑎 𝑡
𝑀2 𝑀1 𝑀2 𝑀1 𝑀1 𝑀2
Example 3.3
• The outputs:
• tensile force for the spring 𝑓 𝐾 ,
2

𝑓𝐾2 = 𝐾2 𝑥2 − 𝑥1
= −𝐾2 𝑥𝑟
• the velocity the masses 𝑣1 and 𝑣2 , and

𝑣1
𝑣2 = 𝑣1 − 𝑣𝑟

• the total momentum 𝑚𝑇 of the masses.

𝑚 𝑇 = 𝑀1 𝑣1 + 𝑀2 𝑣2 = 𝑀1 𝑣1 + 𝑀2 𝑣1 − 𝑣𝑟
Example 3.7
• Find the state-variable model for this system.
• The input is the force 𝑓𝑎(𝑡) and the output is the displacement 𝑥2 of the
massless junction A.

EX 3.7
Video solution
attached
Example 3.7
• Inspect the FBD at the mass M and the node A

𝑥1
𝑞 = 𝑣1
𝑥2

𝑥1
𝑥2

𝑓𝑎 (𝑡) 𝐵1 𝑣1 𝐵2 𝑥ሶ 2
𝑀𝑣ሶ 1
𝑀 𝐾2 𝑥2 𝐴
𝐾1 𝑥1 − 𝑥2 𝐾1 𝑥2 − 𝑥1

Needs two state variables Needs one state variables


𝑞 = 𝑥1 𝑣1 𝑞 = 𝑥2

MECH 432 - SHAMMAS


Example 3.7
• From the FBD equations
𝑥1 𝑥2

𝑓𝑎 (𝑡) 𝐵1 𝑣1 𝐵2 𝑥ሶ 2
𝑀𝑣ሶ 1
𝑀 𝐾2 𝑥2 𝐴
𝐾1 𝑥1 − 𝑥2 𝐾1 𝑥2 − 𝑥1

𝑀𝑣ሶ 1 + 𝐵1 𝑣1 + 𝐾1 𝑥1 − 𝑥2 = 𝑓𝑎 𝑡
𝐵2 𝑣2 + 𝐾1 𝑥2 − 𝑥1 + 𝐾2 𝑥2 = 0

• The State variable equations and the output 𝑥2

𝑥1 𝑥ሶ 1 = 𝑣1
𝑢 = 𝑓𝑎 (𝑡) 𝐵1 𝐾1 1
𝑞 = 𝑣1 𝑣ሶ 1 = − 𝑣1 − 𝑥1 − 𝑥2 + 𝑓𝑎 𝑡 𝑦 = 𝑥2
𝑥2 𝑀 𝑀 𝑀
𝐾1 𝐾2
𝑥ሶ 2 = − 𝑥2 − 𝑥1 − 𝑥2
𝐵2 𝐵2
Example 3.7
• What if 𝐵2 is removed

𝑥1 𝑥2

𝑓𝑎 (𝑡) 𝐵1 𝑣1 𝐵2 𝑥ሶ 2
𝑀𝑣ሶ 1
𝑀 𝐾2 𝑥2 𝐴
𝐾1 𝑥1 − 𝑥2 𝐾1 𝑥2 − 𝑥1

Needs two state variables Needs one state variables


𝑞 = 𝑥1 𝑣1 𝑞 = 𝑥2
Example 3.7
• From the FBD equations
𝑥2
𝑥1
𝑓𝑎 (𝑡) 𝐵1 𝑣1 𝐵2 𝑥ሶ 2
𝑀𝑣ሶ 1
𝑀 𝐾2 𝑥2 𝐴
𝐾1 𝑥1 − 𝑥2 𝐾1 𝑥2 − 𝑥1

𝑀𝑣ሶ 1 + 𝐵1 𝑣1 + 𝐾1 𝑥1 − 𝑥2 = 𝑓𝑎 𝑡
𝐵2 𝑣2 + 𝐾1 𝑥2 − 𝑥1 + 𝐾2 𝑥2 = 0

• From the second equation, this will give an algebraic relation between 𝑥1 and 𝑥2 . This
means that the are NOT independent, and hence can NOT both be state variables.

𝐾1 𝑥2 − 𝑥1 + 𝐾2 𝑥2 = 0
𝐾1 + 𝐾2
𝑥1 = 𝑥2
𝐾1
Example 3.7
• From the FBD equations
𝑥2
𝑥1
𝑓𝑎 (𝑡) 𝐵1 𝑣1 𝐵2 𝑥ሶ 2
𝑀𝑣ሶ 1
𝑀 𝐾2 𝑥2 𝐴
𝐾1 𝑥1 − 𝑥2 𝐾1 𝑥2 − 𝑥1

𝑀𝑣ሶ 1 + 𝐵1 𝑣1 + 𝐾1 𝑥1 − 𝑥2 = 𝑓𝑎 𝑡
𝐾1 𝑥2 − 𝑥1 + 𝐾2 𝑥2 = 0

• The State variable equations and the output 𝑥2


𝑥1 𝑥ሶ 1 = 𝑣1 𝑦 = 𝑥2
𝑞= 𝑣 𝑢 = 𝑓𝑎 (𝑡) 𝐵1 𝐾1 𝐾1 1 𝐾1
1 𝑣ሶ 1 = − 𝑣1 − 𝑥 − 𝑥 + 𝑓𝑎 𝑡 = 𝑥1
𝑀 𝑀 1 𝐾1 + 𝐾2 1 𝑀 𝐾1 + 𝐾2
Comments
• Sometimes the proposed state-variable equations are found to contain the
derivative of the input.

• It is important (for computer solutions) to eliminate any derivatives on the right


side of the state-variable equations.

• This is done by redefining one of the state variables.

• It is also desirable to avoid input derivatives on the right side of the output
equations, if possible, although this is not always possible.
Example 3.8
• Find the state-variable model for this system. The input to the system is the
displacement 𝑥2(𝑡).The output of interest are the displacement and velocity of M1.

EX 3.8
Video solution
attached

• 𝑥2(𝑡) is a known input. There must be a force F that is causing the motion of 𝑀2 .
𝑥1 𝑥2 (𝑡)

𝐵 𝑣1 − 𝑥ሶ 2 (𝑡) 𝐾1 𝑥1 𝐹 𝐵 𝑥ሶ 2 𝑡 − 𝑣1
𝑀𝑣ሶ 1
𝑀1 𝑀2 𝑥ሷ 2 (𝑡) 𝑀2
𝐾2 𝑥1 − 𝑥2 (𝑡) 𝐾2 𝑥2 (𝑡) − 𝑥1
Example 3.8
• The FBD equation, second FBD can be used to solve for the unknown force 𝐹
𝑥1 𝑥2 (𝑡)
𝐵 𝑣1 − 𝑥ሶ 2 (𝑡) 𝐾1 𝑥1 𝐹 𝐵 𝑥ሶ 2 𝑡 − 𝑣1
𝑀𝑣ሶ 1
𝑀1 𝑀2 𝑥ሷ 2 (𝑡) 𝑀2
𝐾2 𝑥1 − 𝑥2 (𝑡) 𝐾2 𝑥2 (𝑡) − 𝑥1

𝑀𝑣ሶ 1 + 𝐵 𝑣1 − 𝑥ሶ 2 (𝑡) + 𝐾1 𝑥1 + 𝐾2 𝑥1 − 𝑥2 (𝑡) = 0

• The state variables and state variable equations

𝑥1 𝑥ሶ 1 = 𝑣1
𝑞= 𝑣 𝑢 = 𝑥2 (𝑡) 𝐵 𝐾1 + 𝐾2 𝐾2 𝐵
1 𝑣ሶ 1 = − 𝑣1 − 𝑥1 + 𝑥2 (𝑡) + 𝑥ሶ 2 (𝑡)
𝑀 𝑀 𝑀 𝑀

• The derivative on the RHS is an issue, can we fix this?


Example 3.8
• The state variables and state variable equations

𝑥1 𝑥ሶ 1 = 𝑣1
𝑞= 𝑣 𝑢 = 𝑥2 (𝑡) 𝐵 𝐾1 + 𝐾2 𝐾2 𝐵
1 𝑣ሶ 1 = − 𝑣1 − 𝑥1 + 𝑥2 (𝑡) + 𝑥ሶ 2 (𝑡)
𝑀 𝑀 𝑀 𝑀

• One can employ a change of variables to fix this.

𝐵 𝐵
𝑥1 𝑤1 = 𝑣1 − 𝑥2 (𝑡) 𝑥ሶ 1 = 𝑣1 = 𝑤1 + 𝑥2 (𝑡)
𝑞= 𝑤 𝑀 𝑀
1 𝐵 𝐵 𝐵 𝐾1 + 𝐾2 𝐾2
𝑤ሶ 1 = 𝑣ሶ 1 − 𝑥ሶ 2 (𝑡) 𝑤ሶ 1 = − 𝑤1 + 𝑥2 (𝑡) − 𝑥1 + 𝑥2 (𝑡)
𝑀 𝑀 𝑀 𝑀 𝑀

You might also like