System representation in matrix form

A dynamic system can be represented mathematically in various forms, such as:

There is a direct dependency between these representations. For example, the matrix format and state-space form are obtained directly from the set of the differential equations describing the system. The transfer function is also obtained from the differential equations, converted with Laplace transform into algebraic equations. The block diagram representation can be obtained starting from the differential equation or from the transfer function.

Configuration form

A set of coordinates that completely describes the motion of a dynamic system is known as a set of generalized coordinates. This set is not unique but the number of coordinates remains the same. A given dynamic system can be described by:

\[\left\{\begin{matrix}
\ddot{q_1} = f_1 \left ( q_1,q_2,…,q_n,\dot{q_1},\dot{q_2},…,\dot{q_n},t \right )\\
\ddot{q_2} = f_2 \left ( q_1,q_2,…,q_n,\dot{q_1},\dot{q_2},…,\dot{q_n},t \right )\\
…\\
\ddot{q_n} = f_n \left ( q_1,q_2,…,q_n,\dot{q_1},\dot{q_2},…,\dot{q_n},t \right )\\
\end{matrix}\right.\]

where:

\[ \begin{split}
\ddot{q_1},\ddot{q_2},…,\ddot{q_n} \quad &- \quad \text{generalized accelerations}\\
\dot{q_1},\dot{q_2},…,\dot{q_n} \quad &- \quad \text{generalized velocities}\\
q_1,q_2,…,q_n \quad &- \quad \text{generalized coordinates}\\
f_1,f_2,…,f_n \quad &- \quad \text{generalized forces}\\
t \quad &- \quad \text{time}
\end{split} \]

The set of equations is subject to initial conditions:

\[ \begin{split}
\dot{q_1}(0),\dot{q_2}(0),…,\dot{q_n}(0) \quad &- \quad \text{initial generalized velocities}\\
q_1(0),q_2(0),…,q_n(0) \quad &- \quad \text{initial generalized positions}
\end{split} \]

A system described by a generalized set of coordinates with initial condition is represented in configuration form.

Let’s take as example a mechanical system, with two degrees of freedom, consisting of two inertial elements, two compliant elements and one resistive element.

Mass spring damper (2-body system)

Image: Mass spring damper (2-body system)

where:

m1, m2 [kg] – body masses
k1, k2 [N/m] – spring stiffnesses
c1 [Ns/m] – damping coefficient
x1, x2 [m] – body displacements
F(t) [N] – input force

In order to get the generalized set of coordinates we need to draw the free body diagram (FBD) of the system and write the equations of equilibrium.

Mass spring damper FBD (2-body system)

Image: FBD

By applying d’Alembert’s law, we get the equations of equilibrium for each body:

\[F(t)-F_{i1}-F_{d1}-F_{e1}-F_{e2}=0 \tag{1}\]
\[F_{i2}-F_{e2}=0 \tag{2}\]

where:

Fe1, Fe2 [N] – elastic forces
Fd [N] – damping force
Fi1 , Fi2 [N] – inertia forces

The elastic, damping and input force are making up the generalized forces. We can write them function of the generalized coordinates and velocities.

\[ \begin{split}
F_e &= kx \quad \text{(for a body moving relative to fixed position)}\\
F_e &= k \Delta x \quad \text{(between two moving bodies)}\\
F_d &= c \dot{x}\\
F_i &= m \ddot{x}\\
\Delta x &= x_1 – x_2
\end{split} \]

By replacing the expressions of the generalized forces in equations (1) and (2), we get the configuration form of our mechanical system.

\[ \begin{split} \bbox[#FFFF9D]{
\ddot{x_1} = \frac{1}{m_1}\left ( F(t)-c_1 \dot{x_1} -k_1 x-k_2 \Delta x \right )\\
\ddot{x_2} = \frac{1}{m_2}\left ( k_2 \Delta x \right )}
\end{split} \]

After we establish the set of differential equation describing our dynamic system, we need to make sure that they are correct. How do we do this? A very good and easy practice is to put them into a block diagram model and run a simulation.

The advantage of the configuration form is that the equations can be easily solved using a simulation environment like Xcos. The right side of the equations are integrated giving the generalized speed coordinates.

Xcos block diagram model

Image: Xcos block diagram model

For this example we’ll assume that all initial conditions are zero.

\[ \begin{split}
\dot{x_1}(0)=0\\
\dot{x_2}(0)=0\\
x_1(0)=0\\
x_2(0)=0
\end{split} \]

Before running the simulation, we use the Set Context menu within Xcos to set the values of the mass, stiffness and damping parameters.

m1 = 1;
m2 = 0.5;
k1 = 10;
k2 = 5;
c1 = 1;

To run the simulation for 20 s, we set the Final integration time parameter in the Setup menu to 20. The force F(t) is a step input which takes the value of 1 N after 1 s. The system’s response is plotted in the graphical window below.

System's response to step force input

Image: System’s response to step force input

By looking at the results we have confidence that our set of differential equations are correct because:

  • both displacements are in the positive direction
  • the mass m1 moves first, followed by m2 (correct since the force input is acting on m1)

Matrix form

Models of dynamic systems that are governed by n-dimensional systems of second-order differential equations can be also expressed in a general matrix form as:

\[[M]\left \{ \ddot{x} \right \} + [C]\left \{ \dot{x} \right \} + [K]\left \{ x \right \} = \left \{ f \right \}\]

where:

M – mass matrix
C – damping matrix
K – stiffness matrix

These are n x n matrices, the mass matrix M being a diagonal matrix.

The generalized coordinates are in vector format of size n x 1:

\[ \begin{split}
\ddot{x} &- \text{ accelerations vector}\\
\dot{x} &- \text{ velocities vector}\\
{x} &- \text{ displacement vector}\\
{f} &- \text{ external forces vector}
\end{split} \]

Notice that the matrices are written in square brackets [] with uppercase letters, while the vectors are written with lowercase letters in curly brackets {}.

Using the same example as for the configuration form, we can rewrite equations (1) and (2) as:

\[ \begin{split}
F_{i1}+F_{d1}+F_{e1}+F_{e2} &= F(t)\\
F_{i2}-F_{e2} &= 0
\end{split} \]

Replacing the expression of the forces, we get:

\[ \begin{split}
m_1 \ddot{x_1}+c_1 \dot{x_1}+k_1 x_1 + k_2 (x_1 – x_2) &= F(t)\\
m_2 \ddot{x_2}-k_2 (x_1-x_2) &= 0
\end{split} \]

We can rearrange the equations as:

\[ \begin{split}
m_1 \ddot{x_1}+c_1 \dot{x_1}+(k_1+k_2)x_1 – k_2 x_2 &= F(t)\\
m_2 \ddot{x_2}-k_2 x_1 +k_2 x_2 &= 0
\end{split} \]

We can now write our set of differential equations as matrix operations:

\[ \begin{split} \bbox[#FFFF9D]{
\begin{bmatrix}
m_1 & 0\\
0 & m_2
\end{bmatrix}
\begin{Bmatrix}
\ddot{x_1}\\
\ddot{x_2}
\end{Bmatrix}+
\begin{bmatrix}
c_1 & 0\\
0 & 0
\end{bmatrix}
\begin{Bmatrix}
\dot{x_1}\\
\dot{x_2}
\end{Bmatrix}+
\begin{bmatrix}
k_1+k_2 & -k_2\\
-k_2 & k_2
\end{bmatrix}
\begin{Bmatrix}
x_1\\
x_2
\end{Bmatrix}=
\begin{Bmatrix}
F(t)\\
0
\end{Bmatrix}}
\end{split} \]

We can now easily extract the mass, damping and stiffness matrices:

\[ \begin{split}
M &= \begin{bmatrix}
m_1 & 0\\
0 & m_2
\end{bmatrix}\\
C &= \begin{bmatrix}
c_1 & 0\\
0 & 0
\end{bmatrix}\\
K &= \begin{bmatrix}
k_1+k_2 & -k_2\\
-k_2 & k_2
\end{bmatrix}
\end{split} \]

The matrix form of a dynamic system is usually useful to perform a vibration modal analysis of the system. This topic will be explained in detail in another tutorial.

For any questions, observations and queries regarding this article, use the comment form below.

Don’t forget to Like, Share and Subscribe!

Leave a Reply

Ad Blocker Detected

Dear user, Our website provides free and high quality content by displaying ads to our visitors. Please support us by disabling your Ad blocker for our site. Thank you!

Refresh