Why I get the wrong peak from bode plot?

조회 수: 22 (최근 30일)
Bob
Bob 2016년 3월 20일
편집: Bob 2016년 3월 21일
%%Parameters
m1 = 2500; % (kg)
m2 = 320; % (kg)
k1 = 80000; % (N/m)
k2 = 500000; % (N/m)
b1 = 350; % (N*s/m)
b2 = 15020; % (N*s/m)
%%Transfer Function
num1 = [(0) (-m1*b2) (-m1*k2) (0) (0)];
den1 = [(m1*m2) (m1*b1+m1*b2+m2*b1) (m1*k1+m1*k2+m2*k1+b1*b2) (b1*k2+k1*b2) (k1*k2)];
G1 = tf(num1,den1);
%%Resonant Frequency of Dynamic Model
bode(G1)
grid on;
[gpeak,fpeak] = getPeakGain(G1)
My resault is wrong according to the zoomed diagram.
gpeak =
20.9719
fpeak =
5.2516
According to the picture below I should get:
gpeak = 25 ~ 27
ZOOMED

채택된 답변

Rick Rosson
Rick Rosson 2016년 3월 20일
The function getPeakGain returns the peak gain on an absolute scale, whereas the Bode plot displays the gain on a decibel scale.
Please try:
gpeak_dB = 20*log10(gpeak);
and check the value. It should be approx 26.4, which is consistent with the Bode plot.
  댓글 수: 1
Bob
Bob 2016년 3월 21일
편집: Bob 2016년 3월 21일
Thank you, it works.
I have 2 Questions, I would appreciate it if you could answer me.
1) Can I change the units from Magnitude (dB) to Amplitude (m)?
2) How can I get the 2 peaks from the picture below? Because these commands gives me the only the highest.
[gpeak,fpeak] = getPeakGain(G1)
gpeak_dB = 20*log10(gpeak);

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Plot Customization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by