Problem Set 12

ENGR 12, Spring 2026.

Due Date Thu, Apr 23
Turn in link Gradescope
URL emadmasroor.github.io/E12-S26/Homework/HW12

Points Distribution

Please note that each of the following grade items is a single rubric item. Each rubric item is scored on a four-level scale of 3-2-1-0. You may wish to take this into account when deciding how to allocate your efforts to each problem.

Problem % Weightage
Problem 1 40
Problem 2 20
Problem 3 40

1 Moving a system of two masses

1.1 Derive the state-space equations

Figure 1

Derive the state-space equations for the above system, considering \(f_a(t)\) to be the sole input and \(x_2-x_1\) to be the sole output. Let \(m_1=m_2=m\). Use the state variables

  1. \(\dot{x}_1\)
  2. \(\dot{x}_2\)
  3. \(x_2-x_1\)

1.2 Explore in MATLAB

Note

For the entirety of Section 1.2, the physical system is identical to Figure 1, but the outputs we are interested in are different from the output in Section 1.1. We are now interested in the following two outputs:

  1. \(\dot{x}_1\)
  2. \(\dot{x}_2\)

Use the following parameter values: \(b=5\), \(m=1\) and \(k=3\).

TipHint

Consider which of the matrices A, B, C and D need to change before you can use MATLAB. Also check out this slide to make sure the dimensions of your matrices are correct.

1.2.1 Transfer Functions using MATLAB

Use the ss and tf functions to determine the transfer function between the input \(f_a\) and the two outputs:

  1. \(\dot{x}_1\)
  2. \(\dot{x}_2\)

Give your answer in the form of a rational function of \(s\), the frequency variable.

1.2.2 Poles in MATLAB

You will notice that the transfer functions you have found in Section 1.2.1 have third-degree polynomials in \(s\) in their denominator. This tells us that the system is third order, and there should be three poles.

Tip

Recall that a pole is a value of \(s\) that would make the transfer function undefined. A pole of a transfer function is also a root of the denominator polynomial of that transfer function.

Determine the numerical value of the three poles of this system. To do this, you may either use MATLAB’s pole function, or use a computer algebra program such as WolframAlpha to find the roots of the cubic polynomial in the denominator.

Give your answer as a set of three (possibly complex) numbers.

1.2.3 Zeros in MATLAB

A transfer function has zeros in addition to poles.

Tip

Recall that a zero of a transfer function is a value of \(s\) that would make the transfer function equal to zero. A zero of a transfer function is also a root of the numerator polynomial of that transfer function.

Find the zeros of each of the transfer functions that you found in Section 1.2.1. You can either do this mathematically or you can use the zero function of MATLAB.

Note

The MATLAB function zero only works for ‘single-input, single-output’ systems, not for multiple-input or multiple-output systems. However, it is still possible to use zero here by extracting two separate transfer functions out of the output of tf from your answer to Section 1.2.1.

1.2.4 Impulse Response

We would like to examine the response of this system to an impulse input where \(f_a(t)\) takes the form of a Dirac Delta function. Use MATLAB’s impulse function to produce a time-domain plot of how \(\dot{x}_1\) and \(\dot{x}_2\) respond to such an input. It is okay to directly reproduce MATLAB’s plots without any modification.

Also write a brief description of what this represents physically.

1.3 Repeat with a smaller \(b\) value

Repeat Section 1.2.1, Section 1.2.2, Section 1.2.3, and Section 1.2.4 for the following system parameters, and briefly comment on the differences you observe (one to two sentences).

\(m=1, k = 3, b = 0.2\).

2 The shape of matrices in state-space equations

Write out a sample set of matrices and vectors (the entries are irrelevant; the size and shape of the matrices are what you should pay attention to) for the state-space equations when a linear physical system has:

  1. Three state variables, 3 outputs, and 2 inputs.

  2. Two state variables, 1 input, and 3 outputs.

  3. Two state variables, 1 output, and 3 inputs.

  4. Four state variables, 2 inputs, and 4 outputs that are identical to the state variables. (for this one, your matrix \(C\) and \(D\) must have the numerically correct entries)

For each part, write down:

  • The matrices A, B, C and D with the correct shape and dummy entries.
  • The vectors \(\boldsymbol{u}\), \(\boldsymbol{x}\) and \(\boldsymbol{y}\) with entries labeled with \(u_1\), \(u_2\), … \(x_1\), \(x_2\), …, and \(y_1\), \(y_2\), ….
  • The state-space equation in full form.
TipSample Answer

A sample answer for part 1 is provided below.

  1. The matrices are: \[ A = \begin{bmatrix} A_{11} & A_{12} & A_{13} \\ A_{21} & A_{22} & A_{23} \\ A_{31} & A_{32} & A_{33} \end{bmatrix}, \quad B = \begin{bmatrix} B_{11} & B_{12} \\ B_{21} & B_{22} \\ B_{31} & B_{32} \end{bmatrix}, \quad C = \begin{bmatrix} C_{11} & C_{12} & C_{13} \\ C_{21} & C_{22} & C_{23} \\ C_{31} & C_{32} & C_{33} \end{bmatrix}, \quad D = \begin{bmatrix} D_{11} & D_{12} \\ D_{21} & D_{22} \\ D_{31} & D_{32} \end{bmatrix} \]
  2. The vectors are: \[ \boldsymbol{x} = \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix}, \quad \boldsymbol{u} = \begin{bmatrix} u_1 \\ u_2 \end{bmatrix}, \quad \boldsymbol{y} = \begin{bmatrix} y_1 \\ y_2 \\ y_3 \end{bmatrix} \]
  3. The equations can be written as: \[ \begin{aligned} \frac{d}{dt} \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} &= \begin{bmatrix} A_{11} & A_{12} & A_{13} \\ A_{21} & A_{22} & A_{23} \\ A_{31} & A_{32} & A_{33} \end{bmatrix} \cdot \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} + \begin{bmatrix} B_{11} & B_{12} \\ B_{21} & B_{22} \\ B_{31} & B_{32} \end{bmatrix} \cdot \begin{bmatrix} u_1 \\ u_2 \end{bmatrix} \\ \begin{bmatrix} y_1 \\ y_2 \\ y_3 \end{bmatrix} &= \begin{bmatrix} C_{11} & C_{12} & C_{13} \\ C_{21} & C_{22} & C_{23} \\ C_{31} & C_{32} & C_{33} \end{bmatrix} \cdot \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} + \begin{bmatrix} D_{11} & D_{12} \\ D_{21} & D_{22} \\ D_{31} & D_{32} \end{bmatrix} \cdot \begin{bmatrix} u_1 \\ u_2 \end{bmatrix} \end{aligned} \]

3 A vibration isolation system

Consider the following system, which is a simplified representation of a vibration isolation apparatus.

Figure 2

Assume that \(x_1\) and \(x_2\) and \(x_0\) have been defined such that when all of them are zero, there is no force in any of the springs. The point A is ‘massless point’ that has position \(x_0\) but no inertia.

Tip

In this problemm,you do not need a free-body diagram for A

We will consider this system with one input, \(x_0(t)\), and two outputs that are of interest to us from an engineering perspective:

  1. The total force experienced by \(m_2\)
  2. The position of mass \(m_2\).

3.1 Deriving the state-space equations

Determine the state-space equations for this system by writing out the matrices and vectors. The state variables you should use are:

  1. \(x_1\)
  2. \(\dot{x}_1\)
  3. \(x_2\)
  4. \(\dot{x}_2\)

3.2 Step and Impulse Response

Use MATLAB to make plots of the step and impulse response of this system. Comment on the graphs by writing a short (two-to-three sentence) description of what the graphs show by referring to Figure 2. Use the following values for your parameters.

m1 = 10;
m2 = 4;
k1 = 5;
k2 = 5;
b  = 10;