How to use rate limiter with square signal and variable step size in Simulink?
Here's a screenshot of the model I'd like to set up:
I feed a customized rectangular signal to a rate limiter to avoid vertical slopes.
Unfortunately that doesn't seem to work. I'm using ode15s, it's a requirement. Here's the error message Simulink throws:
Error: Input signals to Rate Limiter '.../Rate Limiter' are neither discrete nor continuous sample time signals. Only discrete or continuous input signals are supported
Quite surprisingly I found a workaroud by adding an integrator directly followed by a derivative. This works:
But it's ugly and I'm getting some very annoying stability issues in some cases. And I doubt very much that it is considered "good practice".
So how is one supposed to use this rate limiter block in such a situation?
John
t=0
- but ode15s needs a value in advance for the rate limiter. Try to start the step a little later. Maybe also this question gives you some inspiration for alternatives. – Robert Seifert