LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

waveform graph be animated like lorenz attractor

Dear Sir

 

I attached here an example of Lorenz attractor for solving three diffrerential equations and displaying the results in xy graph and waveform graph. 

 

In my program I solved two differential equations but I hope to make my wavform graph to be animated like the lorenz waveform example, Can anyone help me to modify my program to be like lorenz attractor for solving my two differential equations?

 

I attached here my program and the desired lorenz example

 

I'm waiting any help

 

Ahmad

 

Download All
0 Kudos
Message 1 of 42
(6,140 Views)

Hello Ahmad,

 

There are a lot of differences between your VI and the Lorentz Attractor VI. In the Lorentz Attractor VI, the values in the graph are being calculated and displayed iteratively. This is made possible through the use of shift registers in the while loop. In your VI, on the other hand, there are no shift registers being used and the same values are being calculated and displayed on every iteration of the while loop. This, therefore, results in no change in the graph. 

 

The only way to get changing values in the graph is by updating the inputs to your ODE solver in the while loop. I hope this helps. 
Vivek Nath
National Instruments
Applications Engineer
Machine Vision
0 Kudos
Message 2 of 42
(6,077 Views)

Dear Sir

I have some parameters have to be changed. for example in the first D.E FOR X:

(G-K*x)/v

 

I put the value of G for example to be 7.8 and K to be 2.2 but they are controls and their values can be chaned.

 

Also in the second D.E FOR V:

 

(1/((1-(((G-x*(K-U))/(G-Xo*(K-U)))^((U/(K-U)))))-1))*U

 

Also, I put the values of xo which is the initial valu of x to be 132 (range 80-250), U to be 0.199 (range from 0-0.3), K to be 2.2 (range from 1.2 to 2.5) and G to be 7.8 (range from 6 to 13). All these parameters can be changed during the simulation to display the graph of x and v iteratively.

 

So that Could you help me after indicating the values of my model parameters to let my model like Lorenz Attractor. I need the time strats at 0 and ends at 240 without stoping the while loop just stop animating the graph and then restarting animating again from time 0. Could please help me about solving this problem.

 

Thanks and I'm waiting your help

 

Ahmad

0 Kudos
Message 3 of 42
(6,061 Views)
why no one replied to me and solve my problem??
0 Kudos
Message 4 of 42
(6,038 Views)
Hello Ahmad, I may not have understood what exactly you are trying to do in this VI. As you mentioned, you can see the graph change when you update values on the front panel such as the ODE and the initial variable values. In your VI, the graph will change only when the front panel values are modified. So, what exactly would you like to change? In the Lorentz Attractor example, X-Y graphs are used. If you use a waveform chart instead of a waveform graph, you can choose to update the chart as a stip chart, sweep chart or scope chart. This can be configured by right-clicking on the waveform chart on the front panel and then choosing Advanced >> Update Mode. I hope this information helps. If not, please describe what exactly you would like modified in your VI.
Vivek Nath
National Instruments
Applications Engineer
Machine Vision
0 Kudos
Message 5 of 42
(6,017 Views)

Dear Sir

 

Thanks for help

 

I know that my graph changes only when the front panel is modified. But as you can see when starting the simulation that the graph of x and v reached its final value when starting the simulation but I want to make it very slowly to reach its final value. when I put a delay there is no changes happened. this is my problem, slowing the reduction time.

0 Kudos
Message 6 of 42
(6,003 Views)

Hello Ahmad,

 

As you are sending a complete array of values to the waveform graph, you do not see it update one value at a time. I have modified your VI to show you how this could possibly be done. If this is not what you were looking for, let me know.

Vivek Nath
National Instruments
Applications Engineer
Machine Vision
Message 7 of 42
(5,959 Views)

Yes this what I want but why the graph of v doesn't update its values also at a time. when I tried to do the same for v graph, it didn't update its value at a time, why??

 

 

Also, could you help me to make some modifications, I want the graph of v and x when reaching at time 240 restarts again from time zero.

 

Thanks very very much for helping me

 

 

 

0 Kudos
Message 8 of 42
(5,955 Views)
I'm waiting your help and your modification for my problem
0 Kudos
Message 9 of 42
(5,934 Views)

Hello Ahmad,

 

I have applied the same concept to your second graph in order to view the waveform chart plot point by point I used property nodes to clear the chart after every iteration of the while loop. Maybe this will give you more direction in your application. I would strongly recommend going through all the properties available for waveform graphs and charts. You can use property nodes like I did if there are programmatic changes you would like to make to the graph or chart during run time.

 

 

Vivek Nath
National Instruments
Applications Engineer
Machine Vision
Message 10 of 42
(5,914 Views)