Linear algebra of state space representation won't be linear (superposition theorem)...

693 Views Asked by At

After answering a question about calculating the state space representation of a circuit with 3 sources in it (the circuit is there), I had a doubt - while checking, it became clear there is something wrong somewhere.

What has been done

So I solved the circuit for each one of the sources powered ON at a time. I ended up with 3 differential equations (numbered with $i=1...3$): $$\alpha_{i}\ddot{V_o}+\beta_{i}\dot{V_o}+\gamma_i{V_o}=\delta_iU_i$$ Where $U_i$ is the powered source value.

The superposition theorem should enable me to sum these differential equations together, such that: $$\ddot{V_o}+a_{1}\dot{V_o}+a_2{V_o}=b_{1}I_i+b_2V_1+b_3V_2$$ With $$a_2=\frac{\gamma_1}{\alpha_1}+\frac{\gamma_2}{\alpha_2}+\frac{\gamma_3}{\alpha_3}$$ $$a_1=\frac{\beta_1}{\alpha_1}+\frac{\beta_2}{\alpha_2}+\frac{\beta_3}{\alpha_3}$$ $$b_i=\frac{\delta_i}{\alpha_i}$$ Which is represented in state space $$\dot{X}=AX+BU$$ $$V_o=CX+DU$$ By $$A=\begin{bmatrix} 0 & 1\\ -a_2 & -a_1 \end{bmatrix}$$ $$B=\begin{bmatrix} 0 & 0 & 0\\ b_{1} & b_{2} & b_{3} \end{bmatrix}$$ $$C=[1, 0]$$ $$D=[0,0,0]$$ For a state vector $$X=\begin{bmatrix} V_o\\ \dot{V_o} \end{bmatrix}$$ And input vector $$U=\begin{bmatrix} I_i\\ V_1\\ V_2 \end{bmatrix}$$

I've made a sanity-check of each of my elementary differential equations in steady state ($V_o=\delta_i/\gamma_i*U_i$) and they're all right. Then tested each one of them in their own state space Simulink block, which looked good.

Question

The total state space block though, filled in the same way as the elementary differential equations but based on the sum of the differential equations instead, is totally wrong: e.g. if I'm supposed to get 100 out for 100 in in steady state, I end up with 32.

There must be an error somewher, and from those clues I would lean towards transforming to state space. But where?

This should be enough to tell me if it's something fundamental - if all seems good though, I can upload pictures of my notes.

Here is to illustrate: the upper state space model contains the total differential equation, and the 3 others are the differential equations of the cricuit for each power source.

enter image description here

1

There are 1 best solutions below

9
On BEST ANSWER

By your logic the total differential equation should start with $3 \ddot{V}_0$. But I think you misinterpreted the Superposition Theorem. It states that if you have $y_i$ output for $u_i$ input, then you will have $\sum_i y_i$ output for $\sum_i u_i$ input, for a given system, i.e. for a single differential equation. What you have is 3 independent differential equations and you can't just "sum" them. You need to see that these are different equations and each of them has 2 states like following:

$$\begin{bmatrix}\dot{V}_{01} \\ \ddot{V}_{01} \\ \dot{V}_{02} \\ \ddot{V}_{02} \\ \dot{V}_{03} \\ \ddot{V}_{03} \end{bmatrix} = \begin{bmatrix} 0 & 1 & 0 & 0 & 0 & 0 \\ -\gamma_1/\alpha_1 & -\beta_1/\alpha_1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & -\gamma_2/\alpha_2 & -\beta_2/\alpha_2 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 & -\gamma_3/\alpha_3 & -\beta_3/\alpha_3 \end{bmatrix} \begin{bmatrix}{V}_{01} \\ \dot{V}_{01} \\ {V}_{02} \\ \dot{V}_{02} \\ {V}_{03} \\ \dot{V}_{03} \end{bmatrix} + \begin{bmatrix} 0 & 0 & 0 \\ \delta_1/\alpha_1 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & \delta_2/\alpha_2 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & \delta_3/\alpha_3 \end{bmatrix} \begin{bmatrix}I_1 \\ V_1 \\ V_2 \end{bmatrix}$$

$$ y = \begin{bmatrix}1 & 0 & 1 & 0 & 1 & 0\end{bmatrix}\begin{bmatrix}{V}_{01} \\ \dot{V}_{01} \\ {V}_{02} \\ \dot{V}_{02} \\ {V}_{03} \\ \dot{V}_{03} \end{bmatrix}$$

To see why summing up the differential equations won't work, consider these equations:

$$\dot{x}(t) + 2x(t) = u(t) \\ \dot{x}(t) + 3x(t) = u(t)$$

where $u(t)$ is the step function and $x(0)=0$. These equations have the solutions $(1-e^{-2t})/2$ and $(1-e^{-3t})/3$ respectively. Summing these equations yields the following equation

$$2\dot{x}(t) + 5x(t) = 2u(t)$$

which has the solution $2(1-e^{-5t/2})/5$, which is not the sum of the solutions of the above equations.