+ Post New Thread
Results 1 to 5 of 5

1st December 2009, 17:01 #1
 Join Date
 Dec 2009
 Posts
 78
 Helped
 0 / 0
 Points
 1,585
 Level
 9
How to plot the magnitude spectrum against its frequency (bode plot)?
Hi
I am new to study DSP, and I would like to ask the following questions:
I have a test wav file, i use wavread to read the file as well as getting its sampling frequency, however I don't know how to plot the wav in FFT, the annoying thing is the frequency axis, I already know the sampling frequency is 8kHz, but I have no idea how can I plot the magnitude spectrum against its frequency.
Hope someone can explain to me the steps.
Many thanks

Advertisment

1st December 2009, 17:30 #2
 Join Date
 Oct 2009
 Location
 Soenderborg
 Posts
 66
 Helped
 2 / 2
 Points
 1,839
 Level
 9
Plot a bode plot
Bode plots are both Magnitude and Phase Shift values vs. frequency.
Are you using MATLAB?there is very nice example howto use and plot FFT on base of Wolf number ( number of stains at the sun).

Advertisment

2nd December 2009, 12:29 #3
 Join Date
 Dec 2009
 Posts
 78
 Helped
 0 / 0
 Points
 1,585
 Level
 9
Plot a bode plot
yes, i m using matlab, i just don't know how to get the right frequency axis. I only know the sampling frequency of the signal, and I capture only a 8ms duration of the signal using a 128 points hamming windows.

Advertisment

3rd December 2009, 04:51 #4
 Join Date
 Mar 2008
 Location
 USA
 Posts
 773
 Helped
 233 / 233
 Points
 7,235
 Level
 20
Plot a bode plot
So, you have 8ms of data and you are sampling at 16kHz (128 points captured in 8ms).
The FFT resolution is then 125Hz and the highest frequency is 8kHz (16kHz/2, Nyquist theorem).
In matlab language: f=0:125:8000; is your frequency axis. Keep in mind that matlab will show both sides of your FFT, so you will need to half the FFT result length...

3rd December 2009, 13:03 #5
 Join Date
 Dec 2009
 Posts
 78
 Helped
 0 / 0
 Points
 1,585
 Level
 9
Plot a bode plot
I think I sort out understand your explainsion, because the highest frequency in the signal is 8kHz, this is why my sampling frequency is 16kHz, therefore the last point corresponding the highest (last) frequency component in my signal, and because my sampling frequency is 16kHz, and I have 128 points, so resolution is 125Hz. Am I explaining correctly?
I now have 3questions wanna ask you experts, as in this case, I have to use a filter to suppress the tonal interference, I used FIR1 but have no idea for the following terms:
1. What is tonal interference?
2.what is normalized frequency? How to calculate it?
3.When I use filter function in Matlab, how should I determine the order parameter please?
+ Post New Thread
Please login