I want to use state space modeling for representing the following circuit system. However, I am unable to decide the number of states. I am able to describe the system with a set of three equations. However, I am unable to form the matrix A with three states. Is the number of states three or more and how do I determine the number of states for circuits in general? (By the way, my outputs are currents through inductors and the voltage across the capacitor.)


simulate this circuit – Schematic created using CircuitLab

  • \$\begingroup\$ this is not a discrete system, there's no discrete states. This circuit has uncountably infinite states. \$\endgroup\$ – Marcus Müller Jan 25 '19 at 13:26
  • \$\begingroup\$ Three states is correct. Show your attempt. \$\endgroup\$ – Chu Jan 25 '19 at 14:02
  • \$\begingroup\$ @MarcusMüller "states" can often refer to state variables in this context. I agree it's not the best term to use, but that seems to be what the asker means. \$\endgroup\$ – Hearth Jan 25 '19 at 15:53
  • \$\begingroup\$ @Hearth I'd say that the full state of this circuit, seeing it has only one voltage source, can be given by a single state variable, for example Vo, which defines all the currents and voltages in the circuit? \$\endgroup\$ – Marcus Müller Jan 25 '19 at 16:06
  • 3
    \$\begingroup\$ @MarcusMüller 'State' in this context refers to the state-space representation of circuits that are defined by systems of differential equations. The states are often taken as the voltage or current at each of the energy storage components in a system (i.e. inductor or capacitor). State space analysis is also widely used in MIMO control systems. \$\endgroup\$ – Chu Jan 25 '19 at 18:53

The answer to the question is already provided by other users in the comments, but I think that solved questions should not be marked as unanswered (https://meta.stackoverflow.com/q/251597). I didn't see how to turn this answer into a Community Wiki as suggested on StackOverflowMeta: https://meta.stackoverflow.com/a/251598. I guess I don't have enough reputation (according to https://math.stackexchange.com/help/privileges/community-wiki I need 10, while I only have 1 (this is my first answer)). If someone can make this answer into a Community Wiki, please go ahead. I don't want to take credit that other users deserve.

As mentioned in TimWescott's comment, the number of state variables is equal to the number of independent energy-storage elements, so 3 in this case. That's the answer to the question.

Here is how to form a state-space model for this particular circuit (with matrix \$A\$ and three state variables):

As mentioned in one of Chu's comments, the state variables are often taken as the voltage or current at each of the energy storage components. In this circuit, you can choose the three state variables equal to the currents through the inductors \$L_1\$ and \$L_2\$ and the voltage across the capacitor \$C_1\$ (so the state variables are the same as your outputs). I assume that the input is the voltage source \$V_1\$. Your state-space model then looks like this: $$ \frac{\mathrm{d}}{\mathrm{d}t} \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} = A \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} + B u $$ $$ y = \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} $$ where \$x_1\$ is the current through inductor \$L_1\$, \$x_2\$ is the current through inductor \$L_2\$, \$x_3\$ is the voltage across capacitor \$C_1\$, and \$u\$ is the voltage \$V_1\$:

Circuit with states, input, and loops

Denote a time-derivative with a dot on top of the variable (e.g. \$\dot{x}_1 = \frac{\mathrm{d}}{\mathrm{d}t}x_1\$). Then the voltage across inductor \$L_1\$ is equal to \$L_1 \dot{x}_1\$. Similarly, the voltage across inductor \$L_2\$ is equal to \$L_2 \dot{x}_2\$. The current through capacitor \$C_1\$ is equal to \$C_1 \dot{x}_3\$. Using Kirchhoff's current law and then writing out Kirchhoff's voltage law in each of the three loops (in blue in the picture) results in $$ L_1 \dot{x}_1 = R_1 (x_1 + x_2 + C_1 \dot{x}_3) + u $$ $$ L_2 \dot{x}_2 = L_1 \dot{x}_1 + R_2 (x_2 + C_1 \dot{x}_3) $$ $$ L_2 \dot{x}_2 = x_3 + R_3 C_1 \dot{x}_3 $$ You can interpret this as a set of three equations in the three unknowns \$\dot{x}_1\$, \$\dot{x}_2\$, and \$\dot{x}_3\$. Solving for them while assuming \$R_3 - R_1 - R_2 \ne 0\$ results in $$ \dot{x}_1=\frac{1}{(R_3-R_1-R_2)L_1}((R_3-R_2)R_1 x_1 + R_1R_3 x_2 - R_1 x_3 + (R_3-R_2) u) $$ $$ \dot{x}_2=\frac{1}{(R_3-R_1-R_2)L_2}(R_1R_3 x_1 + R_3(R_1+R_2) x_2 - (R_1+R_2) x_3 + R_3 u) $$ $$ \dot{x}_3=\frac{1}{(R_3-R_1-R_2)C_1}(R_1 x_1 + (R_1+R_2) x_2 - x_3 + u) $$ Putting these equations in matrix form results in the state-space model with $$ A = \frac{1}{K} \begin{bmatrix} (R_3-R_2)R_1L_2C_1 & R_1R_3L_2C_1 & -R_1L_2C_1 \\ R_1R_3L_1C_1 & R_3(R_1+R_2)L_1C_1 & -(R_1+R_2)L_1C_1 \\ R_1L_1L_2 & (R_1+R_2)L_1L_2 & -L_1L_2 \end{bmatrix} $$ and $$ B = \frac{1}{K} \begin{bmatrix} (R_3-R_2)L_2C_1 \\ R_3L_1C_1 \\ L_1L_2 \end{bmatrix} $$ where \$K=(R_3-R_1-R_2)L_1L_2C_1\$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy