Why is the phase that is returned by the BODE function wrapping in the Control System Toolbox 5.1 (R12.1)?

9 views (last 30 days)
Why is the phase that is returned by the BODE function wrapping in the Control System Toolbox 5.1 (R12.1)?
If the resulting phase of the BODE function is greater than 180 degrees or less than -180 degrees, then phase wrapping occurs. Is there a way that I can have the BODE function return an unwrapped phase? Try the following in MATLAB to see the problem:
%right answer(I expect to see +180):
freq =logspace(-3,1);
sys=tf([1 0 0],[1]);
bode(sys,freq);
%wrong answer (I expect to see +270, not -90):
freq =logspace(-3,1);
sys=tf([1 0 0 0],[1]);
bode(sys,freq);

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This issue has been addressed in the Control System Toolbox version 5.2 (R13) when the frequency vector is not defined.
It is now the expected behavior when a frequency vector is supplied, BODE will compute the response at these points and does not have access to the pole/zero information needed to correct the phase. The user-defined grid case is optimized for speed, while the auto-grid cases are optimized to produce as "hi-fidelity" (ie: no frequency specified) a plot as possible.

More Answers (0)

Categories

Find more on Get Started with Control System Toolbox in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!