You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/ControlSystemsBase/src/plotting.jl
+20-3Lines changed: 20 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -293,6 +293,9 @@ end
293
293
else
294
294
sbal = s
295
295
end
296
+
if plotphase && adjust_phase_start &&isrational(sbal)
297
+
intexcess =integrator_excess(sbal)
298
+
end
296
299
mag, phase =bode(sbal, w; unwrap=false)
297
300
if _PlotScale =="dB"# Set by setPlotScale(str) globally
298
301
mag =20*log10.(mag)
@@ -330,7 +333,6 @@ end
330
333
plotphase ||continue
331
334
332
335
if adjust_phase_start ==true&&isrational(sbal)
333
-
intexcess =integrator_excess(sbal)
334
336
if intexcess !=0
335
337
# Snap phase so that it starts at -90*intexcess
336
338
nineties =round(Int, phasedata[1] /90)
@@ -725,11 +727,12 @@ Plot all the amplitude and phase margins of the system(s) `sys`.
725
727
726
728
- A frequency vector `w` can be optionally provided.
727
729
- `balance`: Call [`balance_statespace`](@ref) on the system before plotting.
730
+
- `adjust_phase_start`: If true, the phase will be adjusted so that it starts at -90*intexcess degrees, where `intexcess` is the integrator excess of the system.
0 commit comments