08-28-2008 07:58 PM
I keep getting Error 2324: Labview Simulation Module: The ODE solver cannot meet the error tolerance using the minimum step size. I've broken my code down and my signal multiplication function seems to be the cause. If I don't multiply things it works fine. If I do, I get the error. Any ideas?
Thanks,
Brian
Solved! Go to Solution.
08-29-2008 02:15 AM
Hey,
Did you try to debug the VI and probe your signals, maybe you have an NaN value somewhere.
Christian
08-29-2008 11:00 AM
Brian,
The Simulation Loop has some parameters that needed to be changed. In general, you can try to reduce the stepsize (double-click on the terminal on the left of the Simulation Loop) and change the minimal step size. Also, it is worth to change the relative and absolute tolerance to relax the values. If you increase, you can have some results.
Additional to that, in general, if you try to use a "pure" PID, you run into some numerical issues because of the transfer function has no limits and, also, if you try to have "KD" different than zero, it won't even run the simulation. To avoid this problem, use a value for the high frequency time constant higher than zero. This way, you won't run into this problem.
If you still have questions, please feel free to reply with you actual code and version of LabVIEW that you use.
Cheers!
08-29-2008 04:11 PM
09-02-2008 08:46 AM
Well, your simulation has a numerical problem in your configuration. If you see your block diagram, you are trying to divide a sinewave by the output of the system and, as you know, division by zero is not very appreciated by the simulation node.
Is it possible to remove this singularity by adding 2 to the sinewave or change the waveform to something that doesn't go to zero? If you do that, you just need to change the max stepsize to reduce a bit since it will do a longer step than it was supposed to be.
Hope this makes sense. Please feel free to reply if you have more questions!
09-11-2008 06:16 PM
Hi Barp.
It's me again. Your suggestions worked like a charm. However, I've run into some more problems as I try to tune the system. If I set the proportional gain to 11, the system runs wonderfully and I get great asymptopically stable graphs like I would expect for the system. However, if I set the proportional gain to 12, the program behaves strangely and won't give me full graphs. But once I step the grain up to 14, it's back to normal again. What is going on?
Thanks,
Brian
09-12-2008 07:45 AM
In general, the problem you are running into is because there is some parameters for the solver that is not correctly set. I noticed that you have a Runge-Kutta 23 with 1 as maximum stepsize. Try to change to Runge-Kutta 45 with smaller stepsize 45. To change the solver, you just need to double click at the left node of the Simulation Loop. This should bring the configuration for the solver.
If you can't make it work, feel free to post your VI again with the parameters in place that gives you the incorrect result. To do that, you just need to put all parameters that gives you problem on the controls and go to the "Edit" menu and select "Make Current Values Default" and save the VIs. This way, when I open your example I can see what you have.
Cheers!
03-19-2009 01:00 PM
Hi Barp,
I'm trying to implement a physical current controller within a simulation loop and I'm running into the same ODE solver problems. Any suggestions for parameters?
Thanks,
Brian
03-22-2009 09:35 PM
03-23-2009 11:01 AM
The folders are because there are drivers for my servo controller included (otherwise you won't have some of the .vis in my code). You can find the actual code here:
EPOS Take 5 Folder/Documents and Settings/User/My Documents/UW/Research/Control System/EPOS Take 5.vi
Thanks!
Brian