MATLAB: Bode Plot – trasnfer function

bode plotmagnitudematlab functionphasepoless-functionzeros

I have the following transfer funciton : G(s) = ((1+s*10^(-3))/((s*10^(-2)*(1+s*10^(-1))*(1+s*10^(-5)))
I need to do the bode plot of magnitude and phase for this function.
So far, i've done the transformation s=jω :
G(jω) = ((1+jω*10^(-3))/((jω*10^(-2))*(1+jω*10^(-1))*(1+jω*10^(-5)))
I identified that it has :
  • one zero in ω0=1*10^(3).
  • pole in ω1= 0
  • pole in ω2= 1*10^(1)
  • pole in ω3 = 1*10^(5)
How do I do a bode plot of magnitude and phase for this function ?

Best Answer

Try this (your code slightly edited):
s = tf('s');
G = ((1+s*1E-3))/((s*1E-2)*(1+s*1E-1)*(1+s*1E-5));
bode(G) % Plot Only
[mag,phase,wout] = bode(G); % Information Only
See the documentation for the bode fucntion for details.