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.
18
18
"""
19
19
@component function Limiter (; name, y_max, y_min = y_max > 0 ? - y_max : - Inf )
20
20
@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.
22
23
@unpack u, y = siso
23
24
pars = @parameters y_max= y_max [description = " Maximum allowed output of Limiter $name " ] y_min= y_min [
24
25
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.
74
74
y (t) = y_start, [description = " Output of SISO system" ]
75
75
end
76
76
@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 )
79
79
end
80
80
@equations begin
81
81
u ~ input. u
You can’t perform that action at this time.
0 commit comments