LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why outputs that are bundled into a waveform chart in a Simulation Loop show distortion?

Solved!
Go to solution
Does anyone knows why outputs which are bundled into a waveform chart in a Simulation Loop show distortion unlike those output waveforms which are placed individually in each waveform graph chart?
0 Kudos
Message 1 of 8
(3,717 Views)

wer12 wrote:
....each waveform graph chart?

It would really help if you cound attach an image on what you mean by "distortion" or even attach a small VI example.

 

What do you mean by "outputs" in your case (scalars, waveforms, arrays, etc.)?

 

There is no "waveform graph chart". There are "waveform graphs" and "waveform charts", and they are quite different. What do you use?

Message 2 of 8
(3,701 Views)

I had tried using a simulation loop (shown in the attachment) to hold 2 different kinds of control system and made a comparison between them. But these 2 control systems produced distorted output step responses, thus causing a problem for me to make a good comparison. Can you please tell me why this occur?

0 Kudos
Message 3 of 8
(3,688 Views)

wer12,

 

Can you please attach your fuzzy controller(.fc) file that is required when this VI runs.   You may want to use a fixed-step solver in the simulation loop to give a comparison between the two methods.

 

Chris M 

0 Kudos
Message 4 of 8
(3,674 Views)

Here is the fuzzy toolkit file.

Hope you can give me advice on solving this problem.

Thank you.

0 Kudos
Message 5 of 8
(3,655 Views)
Solution
Accepted by topic author wer12

wer12,

 

If you change the solver of the Simulation Loop to a fixed-step method, the outputs will be much smoother.  I'm assuming this is what you mean by "distortion".  To set the solver, double-click the input node of the loop, then select "Runge-Kutta 1 (Euler)" for ODE Solver.  There are other fixed-step solvers that are more advanced as well, such as "Runge-Kutta 4".  If you choose any of the variable-step solvers, you will likely see the "distortion" again.

 

-Chris M 

0 Kudos
Message 6 of 8
(3,640 Views)
Thank you very much for the solution. It instantly solve the problem of distortion in the waveform. But I would also like to ask if the problem of inability to use derivative in the Simulation program code, unlike Control Design, can be solved. In addition, another problem I had faced is the fact that a fuzzy logic used in two different Simulation program code had produced different kinds of output waveforms. They were expected to show similar waveforms. The first simulation program code is the attachment provided in one of the previous few forum posts and the other simulation program code together with fuzzy logic are provided below.
0 Kudos
Message 7 of 8
(3,622 Views)

Hi. Solution: In the VI you attached in a later message you must use Build Array to "bundle" the signals to be plotted in the same chart, and you must use the SimTime Waveform + Chart block(s) which are on the Simulation / Graph Utilities palette. If you are in doubt what I mean, please take a look at

 http://techteach.no/labview/lv85/sim_module/index.htm

Finn

0 Kudos
Message 8 of 8
(3,489 Views)