Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News Sign UpSign In
| Download
Project: LS 30B-2 S19
Views: 182
Kernel: SageMath (stable)

What is continuous time system?

x˙=ax,x(0)=x0\dot{x} = a x, x(0) = x_0

The solution is x(t)=x0eatx(t) = x_0 e^{at}

Continuous time system is written in the following way:

[x˙y˙]=[a11a12a21a22]A[xy]\begin{bmatrix}\dot{x}\\\dot{y}\end{bmatrix} =\underbrace{\begin{bmatrix}a_{11}&a_{12}\\a_{21}&a_{22}\end{bmatrix}}_{A}\begin{bmatrix}x\\y\end{bmatrix}

[x(0)y(0)]=X0\begin{bmatrix}x(0)\\y(0)\end{bmatrix} = X_0

The solution is still:

X(t)=eAtX0X(t) = e^{At}X_0 (yes, the power can be a matrix)

What is the criterion that x(t) to be stable?

for x(t)=x0eatx(t) = x_0e^{at}, if a<0a<0, as times goes on, this will decay to 0 (e.g., a=1000,t=100000,x0e1000000000a = -1000, t = 100000, x_0e^{-100000000} \rightarrow 0)

For matrix cases, the term A<0A<0 is about its "Eivenvalues' real parts <0

But this is a linear case!! What if the system is nonlinear?

[x˙y˙]=[g(x,y)h(x,y)]\begin{bmatrix}\dot{x}\\\dot{y}\end{bmatrix} =\begin{bmatrix}g(x,y)\\h(x,y)\end{bmatrix}

Can we still find the eigenvalues of it?

Yes, but no.........

All we want is to write: [x˙y˙]=[a11a12a21a22]A[xy]\begin{bmatrix}\dot{x}\\\dot{y}\end{bmatrix} =\underbrace{\begin{bmatrix}a_{11}&a_{12}\\a_{21}&a_{22}\end{bmatrix}}_{A}\begin{bmatrix}x\\y\end{bmatrix}

From: [x˙y˙]=[g(x,y)h(x,y)]\begin{bmatrix}\dot{x}\\\dot{y}\end{bmatrix} =\begin{bmatrix}g(x,y)\\h(x,y)\end{bmatrix}

In other words, we want to express x˙=\dot{x} = linear combination of x and y

But we can try to linearize it:

If we have two points, (x1,y1),(x2,y2)(x_1,y_1), (x_2,y_2)

We know x1˙=g(x1,y1)\dot{x_1} = g(x_1,y_1) and y1˙=h(x1,y1)\dot{y_1} = h(x_1,y_1)

So what is x2˙,y2˙\dot{x_2}, \dot{y_2} ????

Although we know it is x2˙=g(x2,y2),y2˙=h(x2,y2)\dot{x_2} = g(x_2,y_2), \dot{y_2} = h(x_2,y_2), this is not linear.

We can approximate as:

x^2˙=g(x1,y1)x(x2x1)+g(x1,y1)y(y2y1)+g(x1,y1)\dot{\hat{x}_2} = \frac{\partial g(x_1,y_1)}{\partial x}(x_2-x_1)+\frac{\partial g(x_1,y_1)}{\partial y}(y_2-y_1)+g(x_1,y_1)

y^2˙=h(x1,y1)x(x2x1)+h(x1,y1)y(y2y1)+h(x1,y1)\dot{\hat{y}_2} = \frac{\partial h(x_1,y_1)}{\partial x}(x_2-x_1)+\frac{\partial h(x_1,y_1)}{\partial y}(y_2-y_1)+h(x_1,y_1)

If (x1,y1)(x_1,y_1) is equilibrium point!

At equilibrium point, g(x1,y1)=0,h(x1,y1)=0g(x_1,y_1) =0, h(x_1,y_1)=0

we get:

x^2˙=g(x1,y1)x(x2x1)+g(x1,y1)y(y2y1)+g(x1,y1)=0\dot{\hat{x}_2} = \frac{\partial g(x_1,y_1)}{\partial x}(x_2-x_1)+\frac{\partial g(x_1,y_1)}{\partial y}(y_2-y_1)+\underbrace{g(x_1,y_1)}_{=0}

y^2˙=h(x1,y1)x(x2x1)+h(x1,y1)y(y2y1)+h(x1,y1)=0\dot{\hat{y}_2} = \frac{\partial h(x_1,y_1)}{\partial x}(x_2-x_1)+\frac{\partial h(x_1,y_1)}{\partial y}(y_2-y_1)+\underbrace{h(x_1,y_1)}_{=0}

    \implies

x^2˙=g(x1,y1)x(x2x1)+g(x1,y1)y(y2y1)\dot{\hat{x}_2} = \frac{\partial g(x_1,y_1)}{\partial x}(x_2-x_1)+\frac{\partial g(x_1,y_1)}{\partial y}(y_2-y_1)

y^2˙=h(x1,y1)x(x2x1)+h(x1,y1)y(y2y1)\dot{\hat{y}_2} = \frac{\partial h(x_1,y_1)}{\partial x}(x_2-x_1)+\frac{\partial h(x_1,y_1)}{\partial y}(y_2-y_1)

Let's define a new coordinate:

m=x2x1m = x_2-x_1, x1x_1 is a constant

n=y2y1n = y_2-y_1, y1y_1 is a constant

x^2˙x^1˙=0=g(x1,y1)x(x2x1)+g(x1,y1)y(y2y1)\dot{\hat{x}_2}-\underbrace{\dot{\hat{x}_1}}_{=0} = \frac{\partial g(x_1,y_1)}{\partial x}(x_2-x_1)+\frac{\partial g(x_1,y_1)}{\partial y}(y_2-y_1)

y^2˙y^1˙=0=h(x1,y1)x(x2x1)+h(x1,y1)y(y2y1)\dot{\hat{y}_2}-\underbrace{\dot{\hat{y}_1}}_{=0} = \frac{\partial h(x_1,y_1)}{\partial x}(x_2-x_1)+\frac{\partial h(x_1,y_1)}{\partial y}(y_2-y_1)

We can now rewrite the above equation as:

m^˙=g(x1,y1)xm+g(x1,y1)yn\dot{\hat{m}} = \frac{\partial g(x_1,y_1)}{\partial x}m+\frac{\partial g(x_1,y_1)}{\partial y}n

n^˙=h(x1,y1)xm+h(x1,y1)yn\dot{\hat{n}} = \frac{\partial h(x_1,y_1)}{\partial x}m+\frac{\partial h(x_1,y_1)}{\partial y}n

or we can use a linear function to represent it:

[m^˙n^˙]=[g(x1,y1)xg(x1,y1)yh(x1,y1)xh(x1,y1)y]jacobian[mn]\begin{bmatrix}\dot{\hat{m}}\\\dot{\hat{n}} \end{bmatrix} = \underbrace{\begin{bmatrix}\frac{\partial g(x_1,y_1)}{\partial x}&\frac{\partial g(x_1,y_1)}{\partial y}\\ \frac{\partial h(x_1,y_1)}{\partial x}&\frac{\partial h(x_1,y_1)}{\partial y}\end{bmatrix}}_{\text{jacobian}}\begin{bmatrix}m\\n\end{bmatrix}

Re(λ)>0Re(\lambda)>0Re(λ)=0Re(\lambda)=0Re(λ)<0Re(\lambda)<0
Imag(λ)=0Imag(\lambda)=0Unstable nodeLine of equilibriastable node
Imag(λ)0Imag(\lambda)\ne 0Unstable spiralCenterstable spiral

Example

X=3X2+2XY+3YX' = 3X^2+2XY+3Y

Y=X2+3X+6YY' = X^2+3X+6Y

plot_vector_field((3*x^2+2*x*y+3*y,x^2+3*x+6*y),(x,-4,4),(y,-4,4))+point((0,0))
Image in a Jupyter notebook
## Get the Jacobian x = var('x') y = var('y') J = jacobian([3*x^2+2*x*y+3*y,x^2+3*x+6*y],[x,y]) show(J)
(6x+2y2x+32x+36)\renewcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr} 6 \, x + 2 \, y & 2 \, x + 3 \\ 2 \, x + 3 & 6 \end{array}\right)

[g(X,Y)h(X,Y)]=[g(X,Y)Xg(X,Y)Yh(X,Y)Xh(X,Y)Y][dxdy]\begin{bmatrix}\triangle g(X,Y)\\\triangle h(X,Y)\end{bmatrix} = \begin{bmatrix}\frac{\partial g(X,Y)}{\partial X}&\frac{\partial g(X,Y)}{\partial Y}\\\frac{\partial h(X,Y)}{\partial X}&\frac{\partial h(X,Y)}{\partial Y}\end{bmatrix}\begin{bmatrix}dx\\dy\end{bmatrix}

Estimate slope of (x2,y2)(x_2,y_2) from (x1,y1)(x_1,y_1)

g(X2,Y2)=g(X1,Y1)Xdx+g(X1,Y1)Ydy+g(X1,Y1)g(X_2,Y_2) = \frac{\partial g(X_1,Y_1)}{\partial X}dx + \frac{\partial g(X_1,Y_1)}{\partial Y}dy+g(X_1,Y_1)

J_now00 = J_now[0,0] J_now01 = J_now[0,1] J_now10 = J_now[1,0] J_now11 = J_now[1,1] x_prime(x,y)= 3*x^2+2*x*y+3*y y_prime(x,y) = x^2+3*x+6*y x0=0 y0=0 plot_vector_field((J_now00*(x-x0)+J_now01*(y-y0),J_now10*(x-x0)+J_now11*(y-y0)),(x,-1,1),(y,-1,1))
Image in a Jupyter notebook