02-28-2011 09:32 AM
Hi I want to solve an ordinary differential equation describing an output of a simple
RC-lowpassfilter with variable inputvoltage, but I don't want to use the Control Design and Simulation Module, but
the odesolvers like Euler.
The differential equation describing the output voltage is in thís case R*C*u' + u = E(t), where E(t) is the appplied voltage.
In the help section, it says that I can use variables but I don't know how to put it in.
greatful for some help.
Kindest regards,
Lasse
03-01-2011 02:20 AM
Hi again this is what I've done so far.
I've put in x´= Slide -x,
I've also tried to replace the Slide-variable with a constant. it doesn't work either.
Hoping for some help.
Kindest regards,
Lasse
03-01-2011 04:09 AM
Hi Lasse,
there's an example for yur function. Have you looked at it?
Try something like this:
For two variables you need two formulas and 2 startpoints in the X0-array.
Why did you wire the slide to it's local variable? How should the Euler function know about it? LabVIEW isn't a symbolic formula solver, so writing "Slide" in the formula array is nonsense...
03-01-2011 05:37 AM
What kind of array-function do you have there?
Can I exchange the slider to a signal generator?It looks like you have the slider together with initial conditions. This is not
want I want really.
I would like to have x' = Arbitrary signal - x
regards,
Lasse
03-01-2011 06:25 AM
Hi again, I think I am on my way to implement your solution though it is not what I want.
The equation x´= Slider -x describes the responce of an RC-filter, where the slide is the source voltage,and I would like it to have an timevarying arbitray waveform, that's why I've put a slider hoping to be able to set the stop time to infinity, so that I can vary the slider during execution.
I have problems experimenting with the one you suggested GerdW. I don't know what I am doing wrong.
Kindest regards,
Lasse
03-01-2011 09:38 AM
Lasse,
Errors are your friend, but only if you use them and learn from them.
Connect an indicator to the error terminal of the ODE Euler Method.vi and you will get an error. When you check the help for that error, it will tell you that an input was bad. Then you read the detailed help for the ODE VI you find that the X, F(x,t) and X0 arrays must all be of the same length. The way you have the Insert into Array wired, the X0 array is longer than the other two, generating the error.
Replace the Insert into Array (which causes the array to grow) with Replace Array Subset (which keeps the array the same size) and the error goes away.
To see what happens as you move the slide, the whole thing needs to be inside a loop.
To see meaningful results on the graph, transpose the data. The Euler data comes out in two columns and many rows. The graph is looking for data in two rows. Actually, an XY graph might be better since you have a Times array as well as the X(t) and Y(t) outputs from the solver.
Lynn
08-12-2014 07:15 AM
Can someone save last vi in labview 9.0f3, because I have the same problem but I can't see the solution. Thanks in advance
08-12-2014 07:20 AM - edited 08-12-2014 07:20 AM