Getting a higher resolution bode plot

50 次查看(过去 30 天)
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

回答(1 个)

Fangjun Jiang
Fangjun Jiang 2012-1-2
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?

类别

Help CenterFile Exchange 中查找有关 Time and Frequency Domain Analysis 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by