09-09-2014 11:17 AM
I am working on a regulation in a Control & Simulation Loop. I have created a state space model and an observer in it.
Now i have implemented nearlly everything but now the simulation doesn't stop.
At first here is an image of the .vi when it still works:
But this isn't the final result i want to have.
I want to connect the output of the subtrahation (x-y 2) to the input of the outer product.
You can see it on the following picture:
If i do so, my simulation continious and never stops. The simulation time is still set to 10 sec.
Attached is the .vi. I hope someone can help me.
Solved! Go to Solution.
09-10-2014 04:21 AM
Hi!
Did you try to use the "Halt Simulation Function"?
Stopping a Simulation Programmatically (Control Design and Simulation Module) - LabVIEW 2014 Control Design and Simulation Module Help - National Instruments
http://zone.ni.com/reference/en-XX/help/371894H-01/lvsimhowto/sim_h_stopprog/
Regards,
Julika Spitz
09-10-2014 04:59 AM - edited 09-10-2014 05:00 AM
I didn't use the halt funktion.
I just set the simulation time to 10 seconds. If the blocks are wired like the first picture shows then the vi works well and stops after this 10 seconds.
The confusing thing for me is, that the simulation doesn't stop automatically if the blocks are wired like the second picture shows.
09-10-2014 05:45 AM
I understand your problem.
I just think that it can work, when you use the halt simulation function (probably in combination with the express vi "Elapsed time") instead of the simulation time implementation.
09-10-2014 07:48 AM
I tried the "halt function" togehter with the "elapsed time.vi".
Now the Simulation stops after arround 10 seconds but the simulation still doesn't work correct. I can see it on the Waveform Chart.
In the first case, there were build waves along the ten seconds and in the second case, there is nearly nothing happening.
So any other suggestions?
I've edited my vi, so here is teh new version.
09-11-2014 03:21 AM
Hi,
i tried a few things in your vi. There is a thing that is really suprising me. When i delete everything which is connected to the output y(t) nothing changes and you can still run the vi with the result of the first case (see attached file). But I don't know why the reaction is changed in the second case with the back coupling, because y(t) is still the same output. Are you sure that the calculation in the state space is correct?
09-11-2014 03:56 AM
I can't run your .vi because it is from version 14.0 and i am using 13.0.1f2 😞
But i agree. What you are describing sounds curious.
I am sure that the state space is correct. I have already used it in Matlab/Simulink and there the regulation works well...
09-11-2014 07:29 AM
Hi,
as you can see in the attached image i tried to use a feedback node. I choosed constant 1 but you have to select a proper value. I think the first value wasn't defined and could cause an error.
09-12-2014 04:01 AM
I don't understand your suggestion. I've implemented a feedback node but this doesn't fix the problem.
But i have found an other solution for the problem. I have build the .vi completly new and used the Signal Arithmetics from Control Design And Simulation group. The gain block and the summation block works better in my case than the numeric add and multiply blocks. Now the simulation runs and the regulation works well.