LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Lyapunov exponent of ODE

Hello,

Is there any way to calculate or estimate the Lypunov exponent fir an ordinary differential equation in Labview. It gives an idea about the chaotic behaviour of a dynamic system. I think it is possible in Matlab but I am trying to use only Labview.

Cheers,

Zied

0 Kudos
Message 1 of 15
(4,451 Views)

This is more a "hairy Mathematics" question than a LabVIEW question.  If you are up on the "hairy math" and know LabVIEW, it shouldn't be much of an issue to code up.  If the math seems at all challenging (and you're not very familiar with dynamical systems, chaos theory, phase spaces, etc.), you should probably pass ...

 

Bob Schor

0 Kudos
Message 2 of 15
(4,430 Views)

Hi again, I found in Labview under linear algebra the function for Lyapunov equation which requires 2 matrices.

Do you know how I can fill them knowing I have the phase space and the set of the differential equations.

My objective is to assess how chaotic is the system. I need a simple value if possible. I think the unit of the Lyapunov exponent is bits/s.

Thanks,

Zied

 

0 Kudos
Message 3 of 15
(4,399 Views)

Hi again,

Unfortunately, there is no answer. Does anyone have an example that contains the function of lyapunov equations.lyapunov.png

0 Kudos
Message 4 of 15
(4,376 Views)

Patience, Grasshopper ...

 

As it happens, I needed to re-install LabVIEW (4 versions) on my Work PC, but said "Fortunately I have a working VM with LabVIEW ..." which, as luck would have it, has also just failed.  So I can't take a look (yet).  And even if I could, I've never gone very deeply into this type of problem, but when I get LabVIEW back up, I'll see if I can shed some insight.

 

Do you understand the math underlying dynamical systems?  Do you know what is meant by Lyapunov Stability?

 

Bob Schor

0 Kudos
Message 5 of 15
(4,366 Views)

Hi again,

I am chemist, so my knowledge in dynamic systems is not great. But I am trying to learn.

All what I need, is to integrate the differential equations and to use a physical and quantifiable parameter like the  Lyapunov exponent to assess how chaotic or periodic is the integrated signal.

In several papers, this Lyapunov exponent is the best candidate to chech the chaos and I found in Labview paplette something that can help but I did not find any guidance to use it.

I found something similar in Matlab that needs investigation but I am keeping it as a plan B.

Cheers,

Zied

0 Kudos
Message 6 of 15
(4,348 Views)

While I can (probably) follow the math, this is not something that I normally think about, so I'm going to leave you with some final advice.  You understand the questions you are asking, and have also mentioned some differential equations that you are studying.  If you go on the Web and do a search for "Algorithm to determine Lyapunov Exponent", you will find a number of papers, algorithms, and discussions of this topic, and can pick and choose those that seem most appropriate to your question.  Don't hesitate to ask your colleagues in the Math and Chemistry Departments for advice.  If you have an algorithm in mind and are stuck on how to implement it in LabVIEW, come back here with specific questions ...  If you've got code, be sure to attach it (as a VI, not as a picture of the Block Diagram, please).

 

Bob Schor

0 Kudos
Message 7 of 15
(4,339 Views)

Hi again Bob,

 I prepared a Vi that contains 2 Matlab nodes. The first is for the integration of  6 differential equations that are called from the function Eq_CSTR7R and plot the 6 variables over time and aldo the phase space of the 3rd variable. This part is working well in Matlab and Labview.

Then this VI uses the second Matlab node to calculate the Lyapunov exponents. I tried it with the Lorentz system with 3 variables in matlab and it is working perfectly and plots 3 variables over time. But when I tried to change the Lorentz system with mine that has 6 variables, I get the following error.

In an assignment  A(I) = B, the number of elements in B and I must be the
same.

Error in lyapunov (line 99)
y(1:n)=ystart(:);

Error in run_lyap (line 1)
[T,Res]=lyapunov(6,@Eq_CSTR7R,@ode45,0,0.5,200,[0 1 0],10);

 

So, I have 3 questions:

1- Is the Lyapunov exponent a parameter that describes each time and I have to pick the value at a specific time.

2- And has the maximum or the minimum or the negative values a meaning knowing tht I found that the Lyapunov exponent unit is the bits/s.?

3- By trying to analyse the Lorentz function that is working well with the matlab Lypunov exponent function, I found that in addition of the 3ODE, there are a linearised system and a variational equation that I don't have for my system. Are they need for the Lyapunov calculation? If yes, how can I get them for my system?

 

Thanks,

Zied

 

0 Kudos
Message 8 of 15
(4,333 Views)

Oh, boy, the Control and Simulation Toolkit, LabVIEW's answer to Simulink!  Wow, you really do have a "strange and not-so-wonderful" mixture of the two Languages here!  I'll try to take a look at this (it's always good to "stretch your brain" a bit), but, colleagues (Christian?), feel free to jump in if you have relevant experience ...

 

Bob Schor

0 Kudos
Message 9 of 15
(4,328 Views)

I look forward to hearing from you when you have the time.  Be sure I will not stop stretching my mind to understand the Lyapunov exponents properly in themeantime .Smiley Very Happy

0 Kudos
Message 10 of 15
(4,324 Views)