File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,8 @@ Limit the range of a signal.
1818"""
1919@component function Limiter (; name, y_max, y_min = y_max > 0 ? - y_max : - Inf )
2020 @symcheck y_max ≥ y_min || throw (ArgumentError (" `y_min` must be smaller than `y_max`" ))
21- @named siso = SISO ()
21+ m = (y_max + y_min) / 2
22+ @named siso = SISO (u_start = m, y_start = m) # Default signals to center of saturation to minimize risk of saturation while linearizing etc.
2223 @unpack u, y = siso
2324 pars = @parameters y_max= y_max [description = " Maximum allowed output of Limiter $name " ] y_min= y_min [
2425 description = " Minimum allowed output of Limiter $name " ,
Original file line number Diff line number Diff line change @@ -74,8 +74,8 @@ Single input single output (SISO) continuous system block.
7474 y (t) = y_start, [description = " Output of SISO system" ]
7575 end
7676 @components begin
77- input = RealInput (u_start = 0.0 )
78- output = RealOutput (u_start = 0.0 )
77+ input = RealInput (u_start = u_start )
78+ output = RealOutput (u_start = y_start )
7979 end
8080 @equations begin
8181 u ~ input. u
You can’t perform that action at this time.
0 commit comments