2
\$\begingroup\$

I have a question related to the superposition in state space equation. Suppose I have a state space equation below \begin{equation} \frac{d}{dt}X = AX + B\begin{bmatrix} u_1(t)\\ u_2(t) \\ \end{bmatrix} \end{equation} where X is the state vector, A, B are constant matrixes. u is the input time varying signals.

Now assume u can be expressed as \begin{equation} u_1(t) = c_1\cos(w_1t)+c_2\cos(w_2t)\\ u_2(t) = d_1\cos(w_1t)+d_2\cos(w_2t)\\ \end{equation} where c1, c2, d1, d2 are constant coefficients, and w1 and w2 are different.

Can I rewrite the state space equation into the following two equations: \begin{equation} \frac{d}{dt}X_1 = AX_1 + B\begin{bmatrix} c_1\cos(w_1t)\\ d_1\cos(w_1t) \\ \end{bmatrix} \end{equation} and \begin{equation} \frac{d}{dt}X_2 = AX_2 + B\begin{bmatrix} c_2\cos(w_2t)\\ d_2\cos(w_2t) \\ \end{bmatrix} \end{equation}

And then I solve for time-domain steady state expression for X1 and X2. The final time domain expression for X would be \begin{equation} X = X_1+X_2 \end{equation}

Is there anything wrong with this method?

\$\endgroup\$

2 Answers 2

1
\$\begingroup\$

This approach is completely reasonable, and is the obvious way of analyzing such a system. The equivalency can be show algebraically by expanding out the equation.

The simplest way of showing this is to use a Laplace-transform. If you are unfamiliar with this transform, the only thing you need to to follow this is that it is linear, it is written as $$\mathcal{L}\{u(t)\},$$ and it transforms derivation to multiplication with the variable s.

You have the equation

\begin{equation} \frac{d}{dt}X = AX + B \begin{bmatrix} u_1(t)\\ u_2(t) \\ \end{bmatrix} \end{equation}

Taking the Laplace-transform of each side yields

\begin{equation} sX = AX + B \begin{bmatrix} \mathcal{L}\{u_1(t)\}\\ \mathcal{L}\{u_2(t)\} \\ \end{bmatrix} \end{equation}

Manipulating this algebraically, we can show that \begin{equation} X = (s\mathbb{I}-A)^{-1}B \begin{bmatrix} \mathcal{L}\{u_1(t)\}\\ \mathcal{L}\{u_2(t)\} \\ \end{bmatrix} = h(s)\begin{bmatrix} \mathcal{L}\{u_1(t)\}\\ \mathcal{L}\{u_2(t)\} \\ \end{bmatrix} \end{equation}

(where the funky "I" represents the identity matrix,and I have collected all the matrices into one function, h(s), which is called the transfer-function).

From here, we can separate the input signals into their two frequency-components: \begin{equation} X = h(s)\begin{bmatrix} \mathcal{L}\{c_1 \cos(w_1 t) + c_2 \cos(w_2 t)\} \\ \mathcal{L}\{d_2 \cos(w_1 t) + d_2 \ cos(w_2 t)\} \\ \end{bmatrix} = \end{equation} \begin{equation} h(s)\begin{bmatrix} \mathcal{L}\{c_1 \cos(w_1 t)\} \\ \mathcal{L}\{d_2 \cos(w_1 t)\} \\ \end{bmatrix}+ h(s)\begin{bmatrix} \mathcal{L}\{c_2 \cos(w_2 t)\} \\ \mathcal{L}\{d_2 \ cos(w_2 t)\} \\ \end{bmatrix} \end{equation}

Here we can see that X is now written as the sum of two parts:

\begin{equation} X_1 = h(s)\begin{bmatrix} \mathcal{L}\{c_1 \cos(w_1 t)\} \\ \mathcal{L}\{d_1 \ cos(w_1 t)\} \\ \end{bmatrix} \end{equation}

\begin{equation} X_2 = h(s)\begin{bmatrix} \mathcal{L}\{c_2 \cos(w_2 t)\} \\ \mathcal{L}\{d_2 \ cos(w_2 t)\} \\ \end{bmatrix} \end{equation}

Each of these can now be reverse-transformed back into the time-domain to give two systems that you can analyze separately:

\begin{equation} X_n = h(s) \begin{bmatrix} \mathcal{L}\{c_n \cos(w_n t)\} \\ \mathcal{L}\{d_n \ cos(w_n t)\} \\ \end{bmatrix} = (s\mathbb{I}-A)^{-1}B \begin{bmatrix} \mathcal{L}\{c_n \cos(w_n t)\} \\ \mathcal{L}\{d_n \ cos(w_n t)\} \\ \end{bmatrix} \end{equation}

\begin{equation} \implies sX_n = AX_n + B \begin{bmatrix} \mathcal{L}\{c_n \cos(w_n t)\} \\ \mathcal{L}\{d_n \ cos(w_n t)\} \\ \end{bmatrix} \end{equation}

\begin{equation} \implies \frac{d}{dt}X_n = AX_n + B \begin{bmatrix} c_n \cos(w_n t) \\ d_n \ cos(w_n t) \\ \end{bmatrix}, \end{equation}

and we can see that this is identical to your proposed partitioning.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ How does \$cos(\omega t)\$ become \$cos(\omega s)\$? And how can two matrices be divided? \$\endgroup\$
    – Chu
    Commented Jun 7, 2022 at 11:11
  • 1
    \$\begingroup\$ It doesn't, and they can't (in general). I made a couple of pretty big errors initially, so thanks for pointing this out. I've edited the answer to correct these errors. 1) I wrote the time-domain expression for the input and just replaced t with s, which is very wrong. I've now simply included the Laplace-operator throughout. 2) I used a fraction as a shorthand for multiplying by the inverse of a matrix. This disregards the non-commutative nature of matrix-multiplication, so it isn't a good way of writing it. I've corrected this to the accurate inverse-multiplication. \$\endgroup\$
    – sondre99v
    Commented Jun 7, 2022 at 11:52
0
\$\begingroup\$

Yes, you are totally fine for going that way. To prove the correctness, instead of going through messy computations like the other answer, you only need to keep in mind a very fundamental math concept that both differential and linear transform (matrix multiplication in your case) are linear operators. Using either concept will lead you the path.

With the fact that linear transformation is a linear operator, you will have the followings \begin{align} \frac{d}{dt}X_1+\frac{d}{dt}X_2 &=\left(AX_1+B\begin{bmatrix}c_1\cos{\omega_1t}\\ d_1\cos{\omega_1t}\end{bmatrix}\right)+ \left(AX_2+B\begin{bmatrix}c_2\cos{\omega_2t}\\ d_2\cos{\omega_2t}\end{bmatrix}\right) \\ &=AX_1+AX_2+B\begin{bmatrix}c_1\cos{\omega_1t}\\ d_1\cos{\omega_1t}\end{bmatrix}+B\begin{bmatrix}c_2\cos{\omega_2t}\\ d_2\cos{\omega_2t}\end{bmatrix} \\ &= A(X_1+X_2) + B\left(\begin{bmatrix}c_1\cos{\omega_1t}\\ d_1\cos{\omega_1t}\end{bmatrix}+\begin{bmatrix}c_2\cos{\omega_2t}\\ d_2\cos{\omega_2t}\end{bmatrix}\right) \\ &= AX+B\begin{bmatrix}u_1(t) \\ u_2(t)\end{bmatrix} \\ &=\frac{d}{dt}X. \end{align}

Or a much easier way, using the fact that differential operator is linear, you will get $$\frac{d}{dt}X_1+\frac{d}{dt}X_2 = \frac{d}{dt}(X_1+X_2) = \frac{d}{dt}X.$$

And of course

  1. The input signal doesn't have to be harmonic
  2. You can sum up as many components as you want, it doesn't necessarily have to be 2
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.