Hi!
I have been using XCOS for several days. I came across a strange problem with the RATELIMITER block. The limiter malfunctions when used with the STEP_FUNCTION block. It behaves like the Saturation block.
My test diagram and the response:
My Scilab version is “scilab-2024.1.0”.
Am I doing something wrong? Can anybode help?
Robert
Adding simple static switch fixes the problem:
Can someone explain what is going on?
Robert
When the scheme became more complicated, the trick of adding a static switch stopped working. Please help.
Hello,
The solver misses the discontinuity hence the thresholds on the derivative have no effect. You already found the solution on your diagram by using the signal builder to generate a step. The doc says:
the Signal Builder block is a superblock containing a block whose output event port is connected to its input event port. This event feedback gives the possibility to generate events at discontinuous point of the signal. The generated events automatically restart the numerical solver and avoids numerical problems).
ratelim.zcos (3.7 KB)
S.
Hi!
Thank you for your quick response. Now it’s clear how the RATELIMTER works. It’s pitty, because RATELIMITER is more convenient to use than a signal generator.
Robert
Hello again!
When the scheme is more complicated, RATELIMITER in combination with the generator does not work either:
Does this mean that slope steepness controls must always be done manually in the signal generator block?
Robert
They have nothing in common. Please rather compare the step block and the signal generator. Moreover, I would say that using the signal generator to generate discontinuous signal is even simpler in your case (you had to use two delayed steps). And please do not say it’s a pitty, it’s just the way ode solvers work: if you already know that a discontinuity will occur at a given time, then it is better when the solver knows it.
S.
No the signal generator is just used to generate the discontinuous signal (hence leave Spline method equal to 0) + the events.
Please confirm if I have understood correctly:
In my case I should not use rate limiter. Instead, the required edge slope should be done in the signal generator. Is that what you meant?
Unfortunately, as a new forum user, I cannot attach my *.zcos schematic.
Please understand my ignorance - I am using xcos for only the second day.
Thank you in advance!
You should rather explain what you wanted to do from the beginning. If you just need to generate a continuous piecewise affine signal then the signal builder is fine for that (with spline Method set to 1). However you won’t be able to control the slope as it will be completely determined by the successive x and y field of the block.
You are doing it fine anyway, welcome to Scilab’s Discourse ! (I have granted you level 1 so that you can upload zcos files).
S.
I am an electrical engineer. I am trying to replicate the operation of a photovoltaic farm controller. Setpoint is entered by the user, in a stepwise manner, e.g. 0% → 100%, etc. But for PV inverters, due to current regulations, the setpoints must be transmitted through a ramp. Therefore, I wanted to use a rate limiter to control this ramp, so that it corresponds to the controller’s software design. The slope of the ramp is a parameter that can be changed, so the rate limiter seemed appropriate for this purpose.
Please find atteched my zcos file.
PI anti-windup RP v03.zcos (9.5 KB)
Robert
Sure, and generating the constant setpoints (using spline method “0” mode) seems rather convenient as you just have to define the starting times and associated values, anyway the signal builder is a must for making the solver work OK with the discontinuities.
S.