# State Space Systems (applied to following circuit)

Discussion in 'Homework Help' started by u-will-neva-no, Dec 3, 2011.

1. ### u-will-neva-no Thread Starter Member

Mar 22, 2011
230
2
Hey everyone,

I have attached a diagram to show you what I am dealing with. My first question is:

Are the currents flowing the correct way for me to eventually solve the state space model of the circuit?

I have drawn in green(X and Y) where I would like to do my nodal current equations. They have to be where the capacitors are as they are storing devices (well that's what I was taught to do). I have also drawn in a black dot as I think this could be a possible place to do a current node equation.

Any help, as always, is much appreciated!

File size:
23.1 KB
Views:
68
2. ### Vahe Member

Mar 3, 2011
75
9
If you are trying to write the state space equations of this circuit, first you have to define your states. I see that you have marked $x_1$ and $x_2$ with arrows -- I guess this is the alternate way of marking voltage which I always get confused with. I always use the plus and minus signs -- it is always more clear to me. The capacitor voltages definitely need to be the state variables.

I think you should write nodal (KCL) equations at the inverting (-) terminals of all three opamps. Do not write any KCL equations at the output nodes of the opamps (since the output current of the opamp is unknown). I would mark the state variables (capacitor voltages), with the positive at the opamp output and the negative at the inverting terminal. This is because all non-inverting terminals are grounded ... and since $V_+=V_-=0$, the capacitor voltages will just be equal to the output of the two opamps with capacitors in the feedback loop.

Your state state expressions should look like this

$
\mathbf{\dot{x}} (t) = \mathbf{A} \mathbf{x} (t) + \mathbf{B} u(t)
y(t) = \mathbf{D} \mathbf{x} (t) + \mathbf{F} u(t)
$

A few things to point out ... the nodes that you have marked as A and B should be $x_1$ and $x_2$, so I think the arrow voltage notation denotes that the arrow points from + to - ... this is a guess. Also note that nodes that you have marked as X and Y are at ground potential. Also current marked as $I7$ is zero (open circuit).

I need to work this out and will post the results.

I hope this helps.

Best regards,
Vahe

u-will-neva-no likes this.
3. ### Vahe Member

Mar 3, 2011
75
9
Here is what I am getting by writing the KCL equations that I mentioned in my earlier post. First let me setup the state variables. The output of the top opamp (point B) is $x_2(t)$, the output of the lower left opamp is $x_1(t)$ and the output of the lower right opamp is $y(t)$. The signal $y(t)$ is an output and not a state variable. Also note that since all noninverting opamp terminals are grounded, the voltage at all inverting terminals are at 0V.

Let's start with the easiest opamp to deal with -- the lower right device, which is just an inverting amplifier with a gain of $-(2R/2R)=-1$. Writing the KCL equation at the inverting node gives (sum of currents in = 0)

$
\frac{x_1(t)}{2R} + \frac{y(t)}{2R} = 0 \Rightarrow y(t) = -x_1 (t)
$

This is the output equation ... it has to be a function of the state variables and the inputs ... and it is.

Consider the top opamp next. Writing the KCL equation at the inverting node gives (sum of currents in = 0)

$
C \frac{d x_2(t)}{dt} + \frac{y(t)}{2R} = 0 \Rightarrow \frac{d x_2(t)}{dt} = - \frac{1}{2RC} y(t) = - \frac{1}{2RC} (-x_1 (t)) \Rightarrow \frac{d x_2(t)}{dt} =\frac{1}{2RC} x_1 (t)
$

Lastly, consider the lower left opamp. Writing the KCL equation at the inverting node gives (sum of currents in = 0)

$
C \frac{d x_1(t)}{dt} + \frac{u(t)}{R} + \frac{x_1(t)}{R} + \frac{x_2(t)}{2R} = 0 \Rightarrow \frac{d x_1(t)}{dt} = -\frac{x_1(t)}{RC} - \frac{x_2(t)}{2RC} - \frac{u(t)}{RC}
$

Now you can put them in matrix form if you wish

$
\left[
\begin{array}[c] \frac{d x_1(t)}{dt}\\ \frac{d x_2(t)}{dt} \end{array} \right]= \left[ \begin{array}[cc] -\frac{1}{RC} & -\frac{1}{2RC}\\ \frac{1}{2RC} & 0 \end{array} \right] \left[ \begin{array}[c] x_1(t)\\
x_2(t) \end{array} \right] + \left[ \begin{array}[c] -\frac{1}{RC}\\ 0 \end{array} \right] u(t)
$

$
y(t)= \left[ \begin{array}[cc] -1 & 0 \end{array} \right] \left[ \begin{array}[c] x_1(t)\\ x_2(t) \end{array} \right] + \left[ 0 \right] u(t)
$

I hope this helps you out -- hope there are not typos.

Best regards,
Vahe

Last edited: Dec 4, 2011
u-will-neva-no likes this.
4. ### u-will-neva-no Thread Starter Member

Mar 22, 2011
230
2
wow, that helped me out so much! I really cannot thank you enough!! Thank you for writing everything out also as that must have taken a bit of time to work out and type (it would for me).

You explained it really well, thank you once again.

5. ### u-will-neva-no Thread Starter Member

Mar 22, 2011
230
2
I have one small question and it involves an easier circuit diagram attached. The equation that I am trying to get is:

$y(t)= -X_2(t)$

I tried to aply what you said before but the same analysis would not work in this instance as there is a capacitor across the op-amp (compared to the resistor previously). Don't worry about explaining the other equations at X and Y as I understand them.

• ###### image.png
File size:
11.1 KB
Views:
36
Last edited: Dec 4, 2011
6. ### steveb Senior Member

Jul 3, 2008
2,433
469
It looks to me that your choice of polarity on x_2 forces you to use the output equation $y(t)= X_2(t)$

If you change the polarity of x_2, then you can get $y(t)= -X_2(t)$.

u-will-neva-no likes this.