I want a very basic simulation of a linear axis that can be given a position demand, and it will move to that position at a constant speed. At this point, I do not care about acceleration, but if I can modify the TF to incorporate it that will be a bonus.
- I will program this simulation using scipy
- This is a discrete-time system
- The position the axis moves to is exactly the demand (no steady-state error, gain 1)
- The speed is constant. Ideally, I would like this to be configurable. But for the sake of this example, lets say it is 0.2m/s.
- There is no overshoot
- It is the same for both positive and negative steps, i.e increasing or decreasing the position demand
- I do not care about the delay between the demand change and when it starts to respond. Ideally, it would be 0 or 1 time steps, but this is a really simple simulation so I do not care that much.
- If it is given an impulse input then it will either move slightly or not at all, but I am not that interested in simulating this
- If it is given a ramp input, then it will behave similarly to the step input if the slope of the ramp is steeper than the velocity of the axis, and will still move at the constant velocity even if the demand ramp is less steep (hence it will stop and start to track the demand). But again, I do not really care about simulating this, and would rather have a simplified solution.
- A very rough approximation is fine, I do not need to identify the system to a realistic level.
So basically, the transfer function that represents the system is one that turns a step input into a ramp that goes between the start and end values of the step. If we also include acceleration, then it will turn a step input into a sigmoid looking signal.
What is this transfer function?
I could also represent this as ZerosPolesGain, or StateSpace within scipy, so either of those will also suffice as an answer.
Thanks