My Math Forum  

Go Back   My Math Forum > Math Forums > Math Software

Math Software Math Software - Mathematica, Matlab, Calculators, Graphing Software

Reply
 
LinkBack Thread Tools Display Modes
January 12th, 2012, 04:27 AM   #1
 
Joined: Jun 2011

Posts: 6
Thanks: 0

Lyapunov in duffing and van der pol

I have to make a program to calculate the largest lyapunov exponent for lorenz, rossler, duffing and van der pol. I did for the first two but i can't do it for the rest of them

The code i use for lorenz is this one:
Code:
F[{x_, y_, z_}] := {? (y - x), x (r - z) - y, x y - b z};
JacobianMatrix[funs_List, vars_List] := Outer[D, funs, vars]; J = 
 JacobianMatrix[
  F[{Subscript[y, 1][t], Subscript[y, 2][t], 
    Subscript[y, 3][t]}], {Subscript[y, 1][t], Subscript[y, 2][t], 
   Subscript[y, 3][t]}]; Y = 
 Table[{Subscript[y, i][t], Subscript[y, i + 3][t], 
   Subscript[y, i + 6][t]}, {i, 4, 6}]; E1 = 
 Flatten[Transpose[J.Y]]; EQ3 = 
 Table[D[Subscript[y, i][t], {t, 1}] == 
   F[{Subscript[y, 1][t], Subscript[y, 2][t], Subscript[y, 3][t]}][[
    i]], {i, 1, 3}]; EQ9 = 
 Table[D[Subscript[y, i][t], {t, 1}] == E1[[i - 3]], {i, 4, 
   12}]; YI9 = 
 Table[{Subscript[y, i][0] == If[Mod[i, 4] == 0, 1, 0], 
   Subscript[y, i + 3][0] == If[Mod[i + 3, 4] == 0, 1, 0], 
   Subscript[y, i + 6][0] == If[Mod[i + 6, 4] == 0, 1, 0]}, {i, 4, 6}];
YI3 = {Subscript[y, 1][0] == 19, Subscript[y, 2][0] == 20, 
  Subscript[y, 3][0] == 50}; sol1 = 
 NDSolve[Join[EQ9, EQ3, YI3, YI9], 
  Table[Subscript[y, i][t], {i, 1, 12}], {t, 0, 30}, 
  MaxSteps -> Infinity];
u = Table[Random[], {3}];
T = 30;
PhiT = Transpose[
  Table[{Subscript[y, i][t], Subscript[y, i + 3][t], 
      Subscript[y, i + 6][t]}, {i, 4, 6}] /. sol1 /. t -> 30];
mle = Log[Norm[PhiT.u]]/T;
Lorenz and rossler have 3 equation so i don't have problem. Duffing and van der pol have only one equation and i don't know what to do. I try a lot of things with this code but anyone has results
dantekavala is offline  
 
Reply

  My Math Forum > Math Forums > Math Software

Tags
der, duffing, lyapunov, pol, van


Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Prove the Lyapunov equation jarvisyang Linear Algebra 0 April 20th, 2013 06:33 PM
When is this Lyapunov? Toddly53 Applied Math 1 March 6th, 2012 04:56 PM





Copyright © 2014 My Math Forum. All rights reserved.