Im trying to create an xcos model to simulate a piecewise velocity over time similar to that of a trapezium. I know for the first part to depict the initial acceleration a ramp block which will be connect to an integral then to a gain to show constant velocity but i am confused on how to continue for the deceleration process please help. Thank you
Hello, welcome to Scilabâs Discourse!
You can to it with a combination of ramps. In the following example, from top to bottom, ramps have the following parameters:
Slope 1, start time 0, initial value 0
Slope 1, start time 5, initial value 0
Slope 1, start time 10, initial value 0
Slope 1, start time 15, initial value 0
trapezoidal.zcos (3.1 KB)
You just have to adjust slopes and start times for your example.
Thank you very much for your help. I didnt think of using multiple ramps. I was working on automatically switching between ramp to constant velocity after the velocity reached 5m/s but I think I may have skipped a few steps.
The setup is
Ramp to Integrator
Integrator to RelationalOP(Compare)
Constant to RelationalOP
RelationalOP to Switch
Constant2 to Switch
Switch to CScope
CLock to Cscope
Sorry, I cant send a pic or the file since i am a new user
Automatic switch ramp to constant velocity.zcos (3.2 KB)
This is what I have been working on, the idea is to switch between ramp to constant velocity after reaching a velocity of 5m/s, and then decellerate, but after testing it doesnt seem to work.
which event does trigger the decceleration ? A given duration of constant velocity profile or something else ?
S.
Ahh thank you for the info, I havent added the deceleration yet. I wanted to make sure that the system accelerate and then reach const velocity first. After that succedes then I will try adding the decceöeration
Ahh thank you very much for the help. I have tried replicating it and worked. If I may ask, regarding the deceleration process, that would require another relational block, and another multiplication block yes?
As I already said, it depends on the type of condition which triggers decceleration. Anyway my very first proposition will we the less complex.
S.
Hi, thank you ver much for the help. After discussions with my teacher, the deceleration happens after 250mm.
what is the unit and the variable ?
S.