David
May 22 2007, 07:45 PM
Hello,
I have a simple question (but not simple for me):
I would like to create a new component whose output signal follows the input signal with a constant slope (not like the PT1 with exponential characteristics).
For example: the input signal is a step or a ramp from 2 to 7 and the output signal which is supposed to also start at 2 should now move to 7 with e.g. 0.2/sec. As a consequence of course different steps take different time.
Is it possible to model this using standard components from Modelica.Blocks.Continious?
Thank you very much for your help.
david.
wagner
May 22 2007, 09:42 PM
Hello David,
a possible solution is to combine a two point static controller with an integrator in a feedback control loop. An example is shown in the attached file.
I had to use a trick. Instead using a two point static controller I used a three point static controller with a very narrow area around zero. This is necessery because when the control error is around zero there occur a lot of events when switching from negativ value to positive value. This results in a dramatic slow down of the simulation.
Regards
Florian
David
May 23 2007, 09:16 AM
Thank you, Florian.
I tested the model and it works fine if the slope of the output signal is smaller than the slope of the input signal. But when I use a ramp (attached)
offset = 2
height = 7
duration = 10 (>height)
instead of the step this generates too many events, because the
if (u < 1e-4 and u > -1e-4) then
expression chatters.
Do you have any idea how to avoid this?
What I want to do is: the constant-slope-model should represent a motor of a valve with constant speed.
The valve is conntrollesd by a PI-controller. Till now I use a PT1 for the motor delay.
Thank you again,
david.
wagner
May 23 2007, 10:16 AM
Hello David,
this is a tricky problem. I think it's quite difficult to a get purely time continous solution for your probelm. I would suggest to use a sampled three point model. I tested it and it seems to work with a ramp. Attached to this post you'll find the package.
Regards
Florian
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.