The principle of selective Fourier transform you can read a book. The approximate steps are
- Frequency shift (moves the center frequency of the selection to zero frequency)
- Digital low-pass filter (prevents frequency aliasing)
- Resampling (sampling data is sampled again, interval data depends on the bandwidth of the analysis, which is the magnification)
- Complex FFT (the data is not a real number since it has been shifted frequency)
- Frequency adjustment (Shift the frequency component of the negative half axis to the positive half axis)
The procedure is as follows:
function [f, y] = Zfft (x, FI, FA, FS)% x for the collected data% fi for the analysis of the starting frequency% FA for the analysis of the cutoff frequency% FS for the sampling frequency of the acquisition data% F for the output frequency sequence% y for the output amplitude sequence (real number) F0 = (fi + F a)/2; % Center Frequency n = length (x); % data Length r = 0:n-1;b = 2*pi*f0.*r./fs; X1 = x. * EXP ( -1j. * b); % frequency shift bw = FA-FI; B = Fir1 (+, bw/fs); % filter cutoff frequency is 0.5bwx2 = Filter (B, 1, x1); c = X2 (1:floor (FS/BW): N); % resampling N1 = Length (c), F = linspace (FI, FA, N1), y = ABS (FFT (c))./N1 * 2; y = Circshift (y, [0, Floor (N1/2)]); % moves the amplitude of the negative half axis over the end
Application Examples:
FS = 2048; T = 100;t = 0:1/fs:t;x = * COS (2*pi*110.*t) + (2*pi*111.45.*t) + 25*cos (2*pi*112.3*t) + 48*cos (2*pi*113.8.*t) +5 0*cos (2*pi*114.5.*t); [F, Y] = Zfft (x, 109, $, FS);p lot (f, y);
Effect:
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Selective Fourier transform (ZOOM-FFT)