MATLAB: Bode Diagram

bodeControl System Toolboxplotplotting

When I plot a bode diagram from a FRD sys (obtained by a measurement data), I encounter phases beyond [-180,180]; actually, their order is about 2000 degrees! What should I do in order to have them inside [-180,180] degree?

Best Answer

You need to use bodeoptions command and set PhaseWrapping to on. Here is an example showing how to do it:
>>s=tf('s'); %define Laplace variable
>>freq=logspace(-1,2,1000); %define frequency vector
>>sys=1/(s^3+2*s^2+3*s+1); %some tf with phase <-180
>>bode(sys,freq) %phase is not within -180:180
>>p=bodeoptions
>>p.PhaseWrapping='on'
>>bode(sys,freq,p) %phase is wrapped inside -180:180
HTH, Arkadiy