In this video
it is explained how to plot the Bode diagram for a given transfer function. I included some snapshots from the video.
Here are the Bode diagrams, being drawn about 9 minutes into the video:
However, when I try to plot this same thing with the bode function in MatLab, the phase plot is different.
The phase function is given as
Here's a screenshot of the Bode diagrams that MatLab plots:
As you can see although the magnitude plot is the same as in the video, the phase plot is different. Although it's still showing zero degrees for low frequencies, for high frequencies it shows a phase shift of +90° instead of -90° like in the video. Why?
Here's my MatLab code:
As you can see I put in the value p1=-1 for the pole, same as in the video.
I think the video explains very well how to plot the Bode diagram. For the phase function given above, where φ=arctan(-ω/ω0), you can see the expession -ω/ω0 cannot be >0 since frequency is always positive, so the phase will be only be ≤0. It seems to me that the video shows a correct phase plot which is -90° for HF, while MatLab seems to plots it incorrectly, since it shows a positive phase, which should not be possible.
So why doesn't MatLab plot the phase correctly?
Here are the Bode diagrams, being drawn about 9 minutes into the video:
However, when I try to plot this same thing with the bode function in MatLab, the phase plot is different.
The phase function is given as
Here's a screenshot of the Bode diagrams that MatLab plots:
As you can see although the magnitude plot is the same as in the video, the phase plot is different. Although it's still showing zero degrees for low frequencies, for high frequencies it shows a phase shift of +90° instead of -90° like in the video. Why?
Here's my MatLab code:
Code:
s=zpk('s');
p1=-1;
Hs=1/(1+s/p1);
bode(Hs);
I think the video explains very well how to plot the Bode diagram. For the phase function given above, where φ=arctan(-ω/ω0), you can see the expession -ω/ω0 cannot be >0 since frequency is always positive, so the phase will be only be ≤0. It seems to me that the video shows a correct phase plot which is -90° for HF, while MatLab seems to plots it incorrectly, since it shows a positive phase, which should not be possible.
So why doesn't MatLab plot the phase correctly?
Attachments
-
64.5 KB Views: 38
-
14.5 KB Views: 38
-
61.3 KB Views: 38
-
28.1 KB Views: 37
-
36.2 KB Views: 36
Last edited: