@@ -172,14 +172,19 @@ Initial value of the state `x` can be set with `x`, and of derivative state `xd`
172
172
end
173
173
174
174
"""
175
- PI(;name, gainPI. k = 1.0, T, int.x = 0.0)
175
+ PI(;name, k = 1.0, T = 1.0 , int.x = 0.0)
176
176
177
177
Textbook version of a PI-controller without actuator saturation and anti-windup measure.
178
- The proportional gain can be set with `gainPI. k`
178
+ The proportional gain can be set with `k`
179
179
Initial value of integrator state `x` can be set with `int.x`
180
180
181
- # Parameters:
181
+ The PI controller is implemented on standard form:
182
+ ```math
183
+ U(s) = k (1 + \\ dfrac{1}{sT}) E(S)
184
+ ```
182
185
186
+ # Parameters:
187
+ - `k`: Proportional gain
183
188
- `T`: [s] Integrator time constant (T>0 required)
184
189
185
190
# Connectors:
@@ -191,7 +196,8 @@ See also [`LimPI`](@ref)
191
196
"""
192
197
@mtkmodel PI begin
193
198
@parameters begin
194
- T, [description = " Integrator time constant" ]
199
+ k = 1.0 , [description = " Proportional gain" ]
200
+ T = 1.0 , [description = " Integrator time constant" ]
195
201
end
196
202
begin
197
203
@symcheck T > 0 ||
@@ -200,7 +206,7 @@ See also [`LimPI`](@ref)
200
206
@components begin
201
207
err_input = RealInput () # control error
202
208
ctr_output = RealOutput () # control signal
203
- gainPI = Gain (; k = 1.0 )
209
+ gainPI = Gain (; k)
204
210
addPI = Add ()
205
211
int = Integrator (k = 1 / T, x = 0.0 )
206
212
end
294
300
295
301
Text-book version of a PI-controller with actuator saturation and anti-windup measure.
296
302
303
+ The PI controller is implemented on standard form
304
+ ```math
305
+ u(t) = sat(k (e(t) + ∫\\ dfrac{1}{T}e(t) dt) )
306
+ ```
307
+ The simplified expression above is given without the anti-windup protection.
308
+
297
309
# Parameters:
298
310
299
311
- `k`: Proportional gain
0 commit comments