State Space Form: Difference between revisions

From Class Wiki
Jump to navigation Jump to search
(Created page with 'In my Signals and Systems II class at University of Idaho, we are learning about the state space form of representing a solution to a LTI differential equation. I'll add more her…')
 
No edit summary
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
In my Signals and Systems II class at University of Idaho, we are learning about the state space form of representing a solution to a LTI differential equation. I'll add more here soon.
In my Signals and Systems II class at University of Idaho, we are learning about the state space form of representing a solution to a LTI differential equation. I'll add more here soon.
Consider the differential equation
<math>\frac{d^2 y}{d t^2}+2\frac{xy}{dt}+3y=f(t)</math> <br>
or <br>
<math>\ddot y +2\dot y + 3y =f(t) </math> <br>
The state of this equation can be described using what is called state space form. State space form gives the blah blah more here.

let <math>x1 = y</math> <br>
let <math>x2=\dot y </math> <br>
so <math>\dot x2 = \ddot y </math> <br>


We can now re-write the equation above to be:<br>
<math>\dot x2 + 2x2 + 3 x1 = f(t)</math><br>
so <br><math>\dot x2 = -3x1 -2x2 + f(t)</math><br>
and from the definition above <br><math>\dot x1 = x2</math><br>



We can take this and put it into matrix form:
<math>
\begin{bmatrix}
\dot x1 \\
\dot x2 \\
\end{bmatrix}
=
\begin{bmatrix}
0 & 1 \\
-3 & -2 \\
\end{bmatrix}
\begin{bmatrix}
x1 \\
x2 \\
\end{bmatrix}
+
\begin{bmatrix}
0 \\
1 \\
\end{bmatrix}
f(t)
</math><br>
Or, more generally,<br>
<math>\mathbf{\dot x} = \mathbf{Ax+B}f</math><br>
Where the bold faced x is a matrix such that:<br>
<math>\mathbf{x}=
\begin{bmatrix}
x1 \\
x2 \\
\end{bmatrix}</math><br>
This is called the state space representation of the differential equation. This can be quite useful because the entire description of the differential equation is available in the matrix, and is easily manipulated using linear algebra.

-Example-

For the circuit below, find a set of state variable equations (there are several ways to do this, I will choose the one I feel is most intuitive.)<br>
[[Image:Circuit1.jpg]]

Start by using loop (also known as mesh or KVL) analysis.

Loop 1:<br>
<math>-Vin +i_{1}*R + L*\frac{di_{2}}{dt}=0</math><br>
Loop 2:<br>
<math>-Vin +i_{1}*R + i_{3}*R + L*\frac{di_{3}}{dt} = 0</math><br>

Lets let:<br> <math>x_{1}=i_{2}</math> and<br> <math> x_{2}=i_{3}</math><br>
So, <math>i_{1}=x_{1}+x_{2}</math>. Substituting into the equations above, we get:<br>
<math>-Vin +(x_{1}+x_{2})R + L\dot x_{1}=0</math> and<br>
<math>-Vin +(x_{1}+x_{2})R + x_{2}R + L\dot x_{2} = 0</math><br>
Where <math>\dot x_{1}</math> is the derivative of <math>x</math>.

Solving these equations for <math>\dot x_{1}</math> and <math>\dot x_{2}</math> We find:<br>
<math>\dot x_{1}=-\frac{R}{L}x_{1}-\frac{R}{L}x_{2}+\frac{1}{L}Vin</math><br>
and<br>
<math>\dot x_{1}=-\frac{R}{L}x_{1}-2\frac{R}{L}x_{2}+\frac{1}{L}Vin</math><br>
Now we can write these equations in stat space matrix form:<br>
<math>\mathbf{\dot x}=-\frac{R}{L}
\begin{bmatrix}
1 & 1 \\
1& 2 \\
\end{bmatrix}
\mathbf{x}+\frac{1}{L}
\begin{bmatrix}
1 \\
1 \\
\end{bmatrix}
Vin</math><br>
Where<br>
<math>\mathbf{x}=
\begin{bmatrix}
x_{1} \\
x_{2} \\
\end{bmatrix}</math><br>
and<br>
<math>\mathbf{\dot x}=
\begin{bmatrix}
\dot x_{1} \\
\dot x_{2} \\
\end{bmatrix}</math><br>
So then, since <math>Vin</math> is our forcing function <math>f</math>:<br>
<math>\mathbf{A}=-\frac{R}{L}
\begin{bmatrix}
1 & 1 \\
1& 2 \\
\end{bmatrix}</math>
,<math>\mathbf{B}=\frac{1}{L}
\begin{bmatrix}
1 \\
1 \\
\end{bmatrix}</math><br>
We now have our differential equations in state space form.<br>
Now, these equations aren't much use by themselves, we need to use them to find the output of the system y(t). y(t) in state space form is expressed as follows:<br>
<math>y(t)=\mathbf{C}\mathbf{x}+\mathbf{D}f(t)</math><br>
Lets suppose that y(t) is the voltage across the inductor that has i3 passing through it. That means that:<br>
<math>y(t)=L\frac{di_{3}}{dt}</math><br>
From this we can see that:<br>
<math>y(t)=
\begin{bmatrix}
0 \ L \\
\end{bmatrix}
\begin{bmatrix}
x1 \\
x2 \\
\end{bmatrix}+
\begin{bmatrix}
0 \\
\end{bmatrix}f(t)
</math><br>
So we can see that:<br>
<math>\mathbf{C}=
\begin{bmatrix}
0 \ L \\
\end{bmatrix}</math><br>
and<br>
<math>\mathbf{D}=[0]</math>.<br>



I'll be adding more on how to use state space form to solve these equations as I have time.

Latest revision as of 13:49, 8 March 2011

In my Signals and Systems II class at University of Idaho, we are learning about the state space form of representing a solution to a LTI differential equation. I'll add more here soon. Consider the differential equation
or

The state of this equation can be described using what is called state space form. State space form gives the blah blah more here.

let
let
so


We can now re-write the equation above to be:

so

and from the definition above


We can take this and put it into matrix form:
Or, more generally,

Where the bold faced x is a matrix such that:

This is called the state space representation of the differential equation. This can be quite useful because the entire description of the differential equation is available in the matrix, and is easily manipulated using linear algebra.

-Example-

For the circuit below, find a set of state variable equations (there are several ways to do this, I will choose the one I feel is most intuitive.)
Circuit1.jpg

Start by using loop (also known as mesh or KVL) analysis.

Loop 1:

Loop 2:

Lets let:
and

So, . Substituting into the equations above, we get:
and

Where is the derivative of .

Solving these equations for and We find:

and

Now we can write these equations in stat space matrix form:

Where

and

So then, since is our forcing function :
,
We now have our differential equations in state space form.
Now, these equations aren't much use by themselves, we need to use them to find the output of the system y(t). y(t) in state space form is expressed as follows:

Lets suppose that y(t) is the voltage across the inductor that has i3 passing through it. That means that:

From this we can see that:

So we can see that:

and
.


I'll be adding more on how to use state space form to solve these equations as I have time.