问题
I am building a model of an elevator and want to simulate its motion from the start point to a settled destination in Dymola. After each simulation, e.g. the elevator has reached one destination. I would like to continue the motion to next position from the previous. In my model a PID-controller has been used, which has two inputs(position of destination and current position). I copy each time the "dsfinal" output file and define it as the "dsin" input file as starting conditions for next time. But the signal of the input, which receives the defined destination position, remembers always the one in the first simulation. It means, the defined value out of PID-controller has been changed, but the value, which eventually goes into the PID-controller remains unchanged. Could someone give a tip, how to solve this problem? Thanks. PID-controller
回答1:
I think I didn't fully understand the question, but would it be possible to change from the const
block to a block with a non-constant output? From your description I think it would make most sense to use a Modelica.Blocks.Sources.TimeTable
and specify the destination position over time.
This way you would not have to start a new simulation and you could get rid the file-copying etc. by just increasing the simulation time and specifying the desired trajectory.
来源:https://stackoverflow.com/questions/58855130/how-can-i-continue-simulating-a-motion-with-changing-parameters-in-dymola