Skip to content

Commit dfbe9d6

Browse files
committed
minor clarifications
1 parent acac4ff commit dfbe9d6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/ControlSystemsBase/src/sensitivity_functions.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ end
8181
G_PS(P, C)
8282
8383
The closed-loop transfer function from load disturbance to plant output.
84-
Technically, the transfer function is given by `(1 + PC)⁻¹P` so `SP` would be a better, but nonstandard name.
84+
Technically, the transfer function is given by `(1 + PC)⁻¹P = P(1 + CP)⁻¹`.
8585
$sensdoc
8686
"""
8787
G_PS(P, C) = feedback(P,C)#output_sensitivity(P, C)*P
@@ -90,7 +90,7 @@ G_PS(P, C) = feedback(P,C)#output_sensitivity(P, C)*P
9090
G_CS(P, C)
9191
9292
The closed-loop transfer function from (-) measurement noise or (+) reference to control signal.
93-
Technically, the transfer function is given by `(1 + CP)⁻¹C` so `SC` would be a better, but nonstandard name.
93+
Technically, the transfer function is given by `(1 + CP)⁻¹C = C(1 + PC)⁻¹`.
9494
$sensdoc
9595
"""
9696
G_CS(P, C) = feedback(C,P)#input_sensitivity(P, C)*C
@@ -192,14 +192,16 @@ The gang of four can be plotted like so
192192
Gcl = extended_gangoffour(G, C) # Form closed-loop system
193193
bodeplot(Gcl, lab=["S" "PS" "CS" "T"], plotphase=false) |> display # Plot gang of four
194194
```
195-
Note, the last input of Gcl is the negative of the `PS` and `T` transfer functions from `gangoffour2`. To get a transfer matrix with the same sign as [`G_PS`](@ref) and [`input_comp_sensitivity`](@ref), call `extended_gangoffour(P, C, pos=false)`.
195+
Note, the last input of Gcl is the negative of the `PS` and `T` transfer functions from `gangoffour`. To get a transfer matrix with the same sign as [`G_PS`](@ref) and [`input_comp_sensitivity`](@ref), call `extended_gangoffour(P, C, pos=false)`.
196196
See `glover_mcfarlane` from RobustAndOptimalControl.jl for an extended example. See also `ncfmargin` and `feedback_control` from RobustAndOptimalControl.jl.
197197
"""
198198
function extended_gangoffour(P, C, pos=true)
199199
ny,nu = size(P)
200200
te = timeevol(P)
201201
if pos
202-
S = feedback(ss(I(ny+nu), te), [ss(0*I(ny), te) -P; C ss(0*I(nu), te)], pos_feedback=true)
202+
Oy = ss(0*I(ny), te)
203+
Ou = ss(0*I(nu), te)
204+
S = feedback(ss(I(ny+nu), te), [Oy -P; C Ou], pos_feedback=true)
203205
return S + cat(0*I(ny), -I(nu), dims=(1,2))
204206
else
205207
Gtop = [I(ny); C] * [I(ny) P]

0 commit comments

Comments
 (0)