The Saturation Block
Parameters:
vU |
upper saturation value |
vL |
lower saturation value |
Description:
This block basically just propagates the input signal to its output port, but - as its name suggests - truncates it if it takes values outside a certain region. The band where the signal is forwarded without any modification, is defined by the two parameters vL and vU.
Note that it makes no sense to interchange the upper and lower saturation value. Therefore, ModelicaDEVS guards against such a situation by using the assert() function to stop the compilation of the model and print out an error message for the user in case of vL > vU.
equation
assert(vU>vL, "Saturation block: vU should be bigger than vL");
...[usual instructions for block behaviour]...
The picture below shows a sine signal (blue) and its truncated version (red). The saturation values are vU=1 and vL=-1.
Generated at 2024-12-21T19:25:56Z
by OpenModelicaOpenModelica 1.24.3 using GenerateDoc.mos