03-04-2008 03:08 AM
03-04-2008 03:26 AM
03-04-2008 07:56 AM
Peter,
First of all, notice that you are using a VI that is not supported anymore. Consider using "LabVIEW Control Design and Simulation Module" for future work.
Now, the issue you are experiencing has two effects happening: 1) the VI you sent has the number of points in the for-loop fixed to 100. Because of that, if you change the sampling time, you will see that graph will change. However, a close loop to it and you will see that final time changes with it. If you modify the number of samples (for example, use 10 divided by sampling time) for your for-loop, you will see that changing sampling time won't change the response. However, this is true until you get to 0.1s. This brings the next effect. 2) the VI you are using is implemented based on evaluation of an Euler Solver. Which means that, if you try to have a sampling time that is big, this will affect the response of the system. I think that, for your system, after 0.1, the sampling time will affect the response because the error accumulated for this sampling time is so big that will modify the response. To improve the response, you should use a better Ordinary Differential Equation (ODE) solver like Runga-Kutta 4 or variable step size.
Notice that both issues above are minimized if you use the "LabVIEW Contro Design and Simulation Module". You can define the final time, and the Simulation will calculate the number of samples to achieve this and you can select the several fixed-step and variable step size functions.
Hope this helps!
03-04-2008 01:33 PM
Hello BARP,
thank you for your expert comment on my problem. The variations I mentioned
were those above dt>0,1s (not the varying length of the sample packet due to
a fixed number of samples).
I used this function for quite some time and could never explain the
dependency of the output for longer sampling intervals. Since I am not a
specialist I did not care about the inside of the function, which I found just
too complicated for my understanding.
In future I will use the LabVIEW control design and simulation module 8.5.
Without knowing the details behind exactly I saw, that there is very few
dependency of dt when I used RUNGE-KUTTA 4.
Kind regards
Peter
03-05-2008 08:04 AM - edited 03-05-2008 08:06 AM
Peter,
Yes, the dT influence is present in any simulation accomplished by the computer and even RK4 would suffer because of it. However, the Euler (also know as RK1) has a peculiar characteristic: when the sampling time grows large, because it can only see the next step ahead, the error resulting from this will be too great and it actually will become unstable for dt bigger than 0.8 (for this problem). If you try to use RK 2 or 3, the dT until it gets unstable increases because it can correct with intermediate steps. between major time steps. It works like you increase the number of sampling for your problem. However, if you keep increasing dT, you will find a point were the sampling time will make the solution unstable. The interesting part about using higher order solvers is that the error doesn't affect much the response.
I created this example that shows what I said above. It you will need Control Design and Simulation to use it. The Screenshot shows the difference.
Hope this helps!
03-09-2008 03:43 AM