IN ------MATLAB----- Fs = 8192; % Sampling frequency For any signal our sampling frequency is 8192 hz
Question:
IN ------MATLAB-----Fs = 8192; % Sampling frequency
For any signal our sampling frequency is 8192 hz
1. How to compute the discrete Fourier transform (DFT) of the signal using a fast Fourier transform (FFT) algorithm.
2. How to use fftshift to shift zero-frequency componentto center of spectrum
3. How to calculate the magnitude and phase of DFTcomponents. Plot the double-side amplitude and phase spectrum withrespect to frequency (Use Nyquist criteria to define frequencyrange).
4. How to store the frequency, amplitude and phaseparameters in ASCII file (text, excel, csv, etc.)
Hint: audioread, audiowrite, sound, fft,fftshift, stem, save, load, subplot.
Number of Samples
The sampled time waveform input to an FFT determines thecomputed spectrum. If an arbitrary signal is sampled at a rateequal to fs over an acquisition timeT, N samples are acquired. Compute Twith the following equation:
T=N/fs
where
T is the acquisition time
N is the number of samples acquired
fs is the sampling frequency
Maximum Resolvable Frequency
The sampling rate of a time waveform determines the maximumresolvable frequency. According to the Shannon Sampling Theorem,the maximum resolvable frequency must be half the samplingfrequency. To calculate the maximum resolvable frequency, use thefollowing equation:
fmax=fNyquist=fs/2
where
fmax is the maximum resolvable frequency
fNyquist is the Nyquist frequency
fs is the sampling frequency