How to do FFT on I,Q data
82 views (last 30 days)
Show older comments
I am Working on a climate orbiter satellite data, from there i have extracted the In_Phase and Quadrature_Phase in decimal form now wanted to do further processing such as FFT , PSD etc.
Can Someone help how to do FFT on that type of data?
Note: I have Very large dataset which is about 144crores but i have divided it into chuncks of files which is about 8 lakh each.
0 Comments
Answers (1)
William Rose
on 16 Oct 2023
Let's assume you have read in data from a two-column file. Column 1 is in-phase, column 2 is quadrature.
N=256;
fs=100e6; % sampling rate (Hz)
t=(0:N-1)/fs;
data=randn(N,2);
Combine the ccolumns to make a single vector of complex numbers
The second column is multiplied by 1i, which is pre-defined as sqrt(-1).
x=data(:,1)+1i*data(:,2);
Now do FFTs or compute power spectra in the usual way. The only difference is that, since x(t) is complex, the FFTs and spectra will not be conjugate-symmetric around the Nyquist frequency. (If you prefer to think of positive and negative frequencies, then the spectra will not be conjugate-symmetric around f=0.)
X=fft(x);
f=(0:N-1)*fs/N;
Plot results
figure; subplot(311)
plot(t,data(:,1),'-r.',t,data(:,2),'-b.'); grid on; xlabel('Time (s)')
legend('In-phase','Quadrature'); title('Time domain');
subplot(312);
plot(f,abs(X),'-g.'); grid on; xlabel('Frequency (Hz)')
ylabel('|X(f)|'); title('FFT')
subplot(313);
plot(f,unwrap(phase(X))*180/pi,'-g.'); grid on; xlabel('Frequency (Hz)')
ylabel('phase(X) (deg)'); title('FFT')
Good luck.
13 Comments
William Rose
on 15 Feb 2024
@silvia cano, since you are asking a new question,
I recommend that you post your question as a new quesiton on Matlab Answers. Include the data that you have that relates to range.
See Also
Categories
Find more on Multirate Signal Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
