Skip to content

Commit 8fb54e6

Browse files
committed
add some checks
1 parent b546d96 commit 8fb54e6

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/analysis.jl

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ If a controller `C` is provided as the second argument, a check of the gain-cros
617617
618618
Ref: "Loop Shaping", Bo Bernhardsson and Karl Johan Åström 2016
619619
"""
620-
function fundamental_limitations(P::LTISystem{Continuous}, C=nothing; verbose=true)
620+
function fundamental_limitations(P::LTISystem{Continuous}, C=nothing; verbose=true, Ms = nothing)
621621

622622
ωgc_l = 0.0
623623
ωgc_u = Inf
@@ -642,6 +642,11 @@ function fundamental_limitations(P::LTISystem{Continuous}, C=nothing; verbose=tr
642642
elseif length(rhpp) == 1
643643
verbose && @info "ωgc lower bounded by RHP pole to 2*p = $(2p) rad/s"
644644
ωgc_l = 2p
645+
if Ms isa Number
646+
ωgc_l2 = p*√((Ms+1)/(Ms-1)) # https://www.control.lth.se/fileadmin/control/staff/KJ/200113FeedbackFundamentals.pdf slide 51
647+
verbose && @info "ωgc lower bounded by RHP pole and Ms to p*√((Ms+1)/(Ms-1)) = $(p*√((Ms+1)/(Ms-1))) rad/s"
648+
ωgc_l = max(ωgc_l, ωgc_l2)
649+
end
645650
end
646651

647652
z = maximum(abs, rhpz)
@@ -651,10 +656,18 @@ function fundamental_limitations(P::LTISystem{Continuous}, C=nothing; verbose=tr
651656
elseif length(rhpz) == 1
652657
verbose && @info "ωgc upper bounded by RHP zero to z/2 = $(z/2) rad/s"
653658
ωgc_u = z/2
659+
660+
if Ms isa Number
661+
ωgc_u2 = z*√((Ms-1)/(Ms+1)) # https://www.control.lth.se/fileadmin/control/staff/KJ/200113FeedbackFundamentals.pdf slide 51
662+
verbose && @info "ωgc lower bounded by RHP pole and Ms to z*√((Ms-1)/(Ms+1)) = $(z*√((Ms-1)/(Ms+1))) rad/s"
663+
ωgc_u = min(ωgc_u, ωgc_u2)
664+
end
665+
654666
end
655667

656668
if length(rhpp) > 1 && length(rhpz) > 1
657669
verbose && @info "RHP pole and zero requires z > 4p which is $(z > 4p)"
670+
verbose && @info "Ms and Mt are always larger than |(p+z) / (p-z)| = $(abs((p+z) / (p-z))) due to RHP pole and zero pair"
658671
end
659672

660673
if C !== nothing

0 commit comments

Comments
 (0)