Getting a higher resolution bode plot
46 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Fangjun Jiang
il 2 Gen 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 Commenti
Vedere anche
Categorie
Scopri di più su Time and Frequency Domain Analysis in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!