Getting a higher resolution bode plot
50 views (last 30 days)
Show older comments
Hi,
I am drawing a bode diagram and trying to find the frequency with the peak magnitude. My low resolution bode plot gives me an inaccurate answer, how can I plot more points (smaller step size) so I can see the correct answer?
My code is
[num400, den400]=feedback([0 0 10], [1 11 10], [0 400],[0 1]);
bode(num400, den400)
and I am trying to prove the peak is not at 62.8rads.
Thanks
Will
0 Comments
Answers (1)
Fangjun Jiang
on 2 Jan 2012
You can specify the frequency vector for the bode plot. But more seriously, you are not using feedback() and bode() correctly. You probably mean:
Sys=feedback(tf([0 0 10], [1 11 10]), tf([0 400],[0 1]));
bode(Sys);
If you want to specify the frequency vector, use
W=logspace(f1,f2,N_Of_Points);
bode(Sys,W);
See document for the correct usage of feedback and bode
help feedback
help bode
BODE(SYS,W) uses the user-supplied vector W of frequencies, in
radian/second, at which the Bode response is to be evaluated.
See LOGSPACE to generate logarithmically spaced frequency vectors.
Update:
Surprisingly, the OP's syntax works too! It recognizes the numerator and denominator and construct them as a LTI system using tf().
[num400, den400]=feedback([0 0 10], [1 11 10], [0 400],[0 1]);
bode(num400, den400)
To be honest, I don't like this sneak feature at all, especially when it is not documented. Neither can be found in doc feedback or doc bode. I can see that in bode.m which deal with the different case for input arguments. There is a warning in the obsoleted comment text.
Any Mathworker has any comment?
0 Comments
See Also
Categories
Find more on Time and Frequency Domain Analysis 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!