Does the bode function automatically converts the vector points into decibels?

10 ビュー (過去 30 日間)
Jennifer
Jennifer 2013 年 10 月 15 日
コメント済み: Azzi Abdelmalek 2013 年 10 月 15 日
I already calculated the transfer function (Vout/Vin) and I need to plot it on in a bode plot. Would I have to do the manual calculations to change it to decibels or does the bode function automatically do that?

回答 (1 件)

Carla
Carla 2013 年 10 月 15 日
編集済み: Carla 2013 年 10 月 15 日
The bode function of Control System Toolbox will plot the frequency response of a transfer function in dB. The function can also return numerical data of the magnitude of the response, and that it returns in absolute units, not dB. So, for example:
% create transfer function
H = tf([1 0.1 7.5],[1 0.12 9 0 0]);
% plot the frequency response - not the magnitude is in dB
bode(H)
% extract the magnitude data
[mag,phase,freqs]= bode(H);
% mag contains the responses at freqs, expressed in absolute units.
% convert to dB
magdb = 20*log10(mag);
See the reference page for more details.
doc bode
  1 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 10 月 15 日
H = tf(100,[1 10]);
[mag,phase,freqs]= bode(H)
figure
subplot(2,1,1),plot(log10(freqs),20*log10(squeeze(mag)))
subplot(2,1,2),plot(log10(freqs),squeeze(phase))

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGet Started with Control System Toolbox についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by