5
$\begingroup$

I have an exercise to linearize the following nonlinear system

$$\dot{x} = A - B x - x y^2$$ $$\dot{y} = A\cdot (x y^2 - y)$$

I tried it with

osz = NonlinearStateSpaceModel[{{A - B*x - x*y^2, A*(x*y^2 - y)}, {x, y}}, {x, y}, {A, B}]

for the input of this system.

How can I linearize this system now?

StateTransformationLinearize[osz] doesnt obviously work, because its not an affine system...

$\endgroup$
  • 1
    $\begingroup$ I think you should be able to just wrap your NonlinearStateSpaceModel in StateSpaceModel (which is always linear) and it will convert automatically. Or you just define the non-linear equations inside of StateSpaceModel. Look in the documentation of StateSpaceModel under "Scope" > "Basic Uses" for an example. $\endgroup$ – Sjoerd Smit Feb 28 '17 at 16:38
  • $\begingroup$ I'm a bit unclear on what you want to do. Is there a particular (x,y) point that you want to linearize around? Is the goal some kind of stability analysis? Of an equilibrium or of a limit cycle? $\endgroup$ – Chris K Feb 28 '17 at 16:58
  • $\begingroup$ @SjoerdSmit: I looked it up, but its very difficult to transform this system into a StateSpaceModel. There isnt a specific example which has something to do with my nonlinear system... @ChrisK: The exercise has three parts: a) find the stationary points b) linearize the system c) find a lyapunov-function I think you have to linearize this system with the stationary points, or at least with one of the two points. $\endgroup$ – Manu Feb 28 '17 at 17:55
11
$\begingroup$

a) To find equilibria, use Solve:

eq = Solve[{A - B*x - x*y^2, A*(x*y^2 - y)} == {0, 0}, {x, y}]

Mathematica graphics

b) Linearizing around the point $(\hat x,\hat y)$ means making a new, linear system $$\dot{\vec{z}}=J\vec{z}$$ where $\vec{z}=(x-\hat x,y-\hat y)$ and $J$ is the Jacobian matrix $$J=\begin{bmatrix}d\dot x\over dx & d\dot x\over dy \\ d\dot y\over dx & d\dot y\over dy\end{bmatrix}$$ evaluated at $(\hat x,\hat y)$.

It's easy to calculate the Jacobian:

j = D[{A - B*x - x*y^2, A*(x*y^2 - y)}, {{x, y}}]
(* {{-B - y^2, -2 x y}, {A y^2, A (-1 + 2 x y)}} *)

The only thing left is to evaluate $J$ at the different equilibria:

j /. eq[[1]]
(* {{-B, 0}, {0, -A}} *)

j /. eq[[2]]

Mathematica graphics

j /. eq[[3]]

Mathematica graphics

To check the stability of the equilibria, calculate the eigenvalues of the Jacobian. If all eigenvalues have negative real part, then the equilibrium is stable. j/.eq[[1]] is easy to understand: the eigenvalues are on the diagonal. j/.eq[[2]] and j/.eq[[3]] are uglier. For those you might want to try the Routh-Hurwitz stability criteria: stable if $Tr(J)<0$ and $Det(J)>0$.

Sorry, I don't know about c).

References

Strogatz SH. 2014. Nonlinear Dynamics and Chaos: With Applications to Physics, Biology, Chemistry, and Engineering.

Ellner SP, Guckenheimer J. 2006. Dynamic Models in Biology.

"Linear Stability Analysis" at Wolfram MathWorld

$\endgroup$
  • $\begingroup$ Thank you for this answer. Now I can send my students over to this very answer when I have to show them how to use Mathematica for simple stability analysis. btw, the graphics you have included, do not show. Best wishes. $\endgroup$ – dearN Mar 1 '17 at 13:50
  • $\begingroup$ Thank you very much for your answer :-) I have the same points in a) (I solved it with wolfram alpha) and the way how to solve b) is new for me, but its probably these solution which my professor wants to have from me. Can you tell me a source for the definition in b) please? $\endgroup$ – Manu Mar 1 '17 at 14:11
  • 1
    $\begingroup$ @Manu I added a few references off the top of my head, but you can find this in any book on nonlinear differential equations $\endgroup$ – Chris K Mar 1 '17 at 14:31

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.