What Magnitude(db) and Phase(deg) represent on Bode Diagram?

What Magnitude(db) and Phase(deg) represent on Bode Diagram?
I am working on 2 DOF System and I want to understand some basic things.
%%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); % G1(s) = (x1(s)-x2(s))/w(s)
Below you can see the Transfer Function and Bode Diagram results.
G1(s) = (x1(s)-x2(s))/w(s)
Magnitude 26.4269 (dB) - Resonant Frequency 5.2493 (rad/s)
Magnitude 2.2837 (dB) - Resonant Frequency 37.8886 (rad/s)
I can't understand what exactly these values mean.
For instance the first peak represent the vibration of the numerator x1(s)-x2(s) and the second peak the vibration of the denominator w(s)?
Magnitude(db) is the volume? the high level of vibration of my system?
Aim is possitive or negative Magnitude(db) for my system?
and what about Phase (deg)?
%%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); % G1(s) = (x1(s)-x2(s))/w(s)
%%Bode Plot (Magnitude dB - Frequency rad/s)
bode(G1)
grid on;

 Accepted Answer

Both peaks represent complex zeros (roots) of the denominator polynomial (in a transfer function), called poles. (The amplitude will go toward zero in the region of the complex roots of the numerator polynomial, called zeros.) Those roots occur at a particular complex resonant frequency, so looking at them projected on the complex frequency axis (and not the rest of the complex plane), they will have particular magnitudes (here, amplitudes of oscillation of the two masses) at the associated frequencies (frequencies of oscillation of the two masses).

16 Comments

Thanks for your answer and sorry for not responding immediately.
I am confused.
The first pick represent is the highest vibration of Numerator (Magnitude 26.4269 (dB) - Resonant Frequency 5.2493 (rad/s))?
The second pick represent is the highest vibration of Denominator (Magnitude 2.2837 (dB) - Resonant Frequency 37.8886 (rad/s))?
So Magnitude (db) is equal to Amplitude (m)?
If no, can I use these equations below to get the Amplitude (m) - Frequency (rad/s)
Zeros:
roots(num1)
0
0
-33.288948069241
Poles:
roots(den1)
-23.9757817859989 + 35.1869235307216i
-23.9757817859989 - 35.1869235307216i
-0.109843214001069 + 5.25044540428717i
-0.109843214001069 - 5.25044540428717i
You have the poles and zeros reversed. The roots of ‘num1’ are the zeros of the transfer function, and the roots of ‘den1’ are the poles of the transfer function.
As you can see from the Bode magnitude plot, there is a multiple zero at the origin.
The pole frequencies (in radians) are the imaginary parts of the roots of ‘den1’: 5.2, 35.2.
So from roots of denominator I get the poles (imag numbers) which is the:
Resonant Frequency 5.2493 (rad/s)
Resonant Frequency 37.8886 (rad/s)?
So Magnitude (db) is not equal to Amplitude (m), right? it's two different terms?
That is correct for the resonant frequencies.
‘Magnitude (dB)’ is a logarithmically-scaled measure of ‘Amplitude (m)’. They are not equal, but you can calculate one from the other.
So I can change the Magnitude (db) units to Amplitude (m)?
If yes how? from these equations below?
Amplitude = sqrt(Real^2+Imag^2)
To change magnitude (power) in dB to amplitude, this little ‘amp’ anonymous function will do what you want:
amp = @(dB) 10.^(dB/20); % Power (dB) —> Amplitude
hpp = amp(-6)
hpp =
0.50119
The test line demonstrates that the -6 dB point is the half-power point in a transfer function, filter passband, and the like.
Ok thanks , and if I want to convert the whole diagram from magnitude vs frequency to amplitude vs frequency?
My pleasure.
All you need to do is to pass the entire vector of values to the function:
dB2amp = @(dB) 10.^(dB/20); % Power (dB) —> Amplitude
magnitude_vector = [-6:6]';
amplitude_vector = dB2amp(magnitude_vector)
I changed the name of the function to make its use a bit more obvious, but it’s otherwise the same.
Ok sorry for bothering again but because I miss understood about the function you gave me, can you tell me how can I apply it to my code and then plot it with frequencies?
[mag,phase,wout] = bode(G1);
dB2amp = @(dB) 10.^(dB/20); % Power (dB) —> Amplitude
Function
magnitude_vector = [-6:6]';
amplitude_vector = dB2amp(magnitude_vector)
In this instance, it would be:
amplitude_vector = dB2amp(mag)
Script
%%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); % G1(s) = (x1(s)-x2(s))/w(s)
%%Bode Plot (Magnitude dB - Frequency rad/s)
bode(G1)
grid on;
%%Bode Plot (Amplitude m - Frequency rad/s)
[mag,phase,wout] = bode(G1);
dB2amp = @(dB) 10.^(dB/20); % Power (dB) —> Amplitude
Function
function (amplitude_vector) = dB(mag)
amplitude_vector = dB2amp(mag)
end
I have got nothing as result, I don't know what I am doing wrong.
When I jut now looked at the documentation for bode, it says:
  • mag Bode magnitude of the system response in absolute units ...
  • You can convert the magnitude from absolute units to decibels using: magdb = 20*log10(mag)
So, since they are already in absolute units, not decibels, there is no reason to convert them.
So with this command:
% returns magnitudes, phase values,
% and frequency values wout corresponding to bode(G1)
[mag,phase,wout] = bode(G1)
I got:
mag: 1x1x66
phase: 1x1x66
wout: 66x1
And the units are (m), (deg) and (rad/s) respectively?
To the best of my knowledge, yes.
Note that you will have to use the squeeze function on ‘mag’ and phase.
I found the command bodeplot that convert the units from db to abs. The abs units are meter (m)? If yes then this is what I want to. To be honest this looks like a FFT diagram? I have confused since my knowledge is limited. Anyway, thanks for your help and sorry for bothering you all the time.
P = bodeoptions;
P.MagScale = 'linear';
P.MagUnits = 'abs';
bodeplot(G1,P)
grid on;
My pleasure.
No worries — I needed to review some of these functions, and you gave me the opportunity. This is obviously a homework assignment, so I was reluctant to offer too much help. That would give you an unfair advantage.
The bodeplot function lets you change some of the parameters of the plot that the bode function does not.

Sign in to comment.

More Answers (0)

Asked:

Bob
on 31 Mar 2016

Commented:

on 4 Apr 2016

Community Treasure Hunt

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

Start Hunting!