File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -241,19 +241,20 @@ U(s) = k (1 + \\dfrac{1}{sT}) E(S)
241241
242242See also [`LimPI`](@ref)
243243"""
244- @component function PI(; name, k = 1.0 , T = 1.0 )
244+ @component function PI(; name, k = 1.0 , T = 1.0 , gainPI__k = nothing )
245245 @symcheck T > 0 ||
246246 throw(ArgumentError(" Time constant `T` has to be strictly positive" ))
247247
248248 pars = @parameters begin
249249 k = k, [description = " Proportional gain" ]
250250 T = T, [description = " Integrator time constant" ]
251251 end
252-
252+
253+ gainPI__k = @something(gainPI__k, k)
253254 systems = @named begin
254255 err_input = RealInput() # control error
255256 ctr_output = RealOutput() # control signal
256- gainPI = Gain(; k)
257+ gainPI = Gain(; k = gainPI__k )
257258 addPI = Add()
258259 int = Integrator(k = 1 / T, x = 0.0 )
259260 end
You can’t perform that action at this time.
0 commit comments