Freq. to Time conversion of S-parameter with IFFT function (negative freq. and zero padding?)

27 views (last 30 days)
Dear all,
I want to convert Freq. Data(S-parameter) to time domain with IFFT function.
Here is my code. But, converted time signal is not concided with my thought.
I saw that negative freq. generation and zero padding are necessary from some documents.
How can I fix my code?
Thank you~!
--------------------
clear all;
close all;
% Define time and frequency axis variables
fs = 35*10^9; % samples/s, total BW : 75~110GHz -> 35GHz
N = 801; % number of points of measured S-parameter : 801
dt = 1 / fs; % time step
t = (0:N-1)*dt; % time axis
df = 1 / N / dt; % Hz, frequency step
f = (0:N-1)*df+75*10^9;
St=load('w-band_air-10mm_headerx.txt');
S21=St(:,4) + i*St(:,5);
S21t=S21';
figure(1)
plot(f,20*log10(abs(S21t))) % plot freq. domain signal
title('Frequency Domain Signal (S21, dB)')
xlabel('Freq. (Hz)')
ylabel('Mag. (dB)')
S21_TD = ifft(ifftshift(S21t));
figure(2)
plot(t,S21_TD)
title('Time Domain Signal (S21)')
xlabel('Time (s)')
  3 Comments
dhlee
dhlee on 20 Jul 2022
Frequency-amplitude data was measured value from test equipment(Vector network analyzer), so It could have a bias of one.
My expected IFFT signal looks like below.
Jeffrey Clark
Jeffrey Clark on 5 Aug 2022
Edited: Jeffrey Clark on 5 Aug 2022
@dhlee, have you worked this out for yourself? In w-band_air-10mm_headerx.txt there are 9 columns of data. The first is the frequency being scanned, then 4x2 columns of complex data. You use (4,5) as the value of readings for the presumed 75-110Ghz data. As I pointed out, the data in (4,5) seems odd for what should be frequency amplitudes; whereas (2,3) and (8,9) seem more like expected data.
If (4,5) is really where the frequency response should be taken, it appears to be encoded onto the 75-110Ghz chirp (the cosine picture I posted a while back). One would generally need to know the initial phase and rate of the chirp to remove its amplitude and phase from the (4,5) data, or fit a LS cosine function to the data to estimate its start phase and rate of change. In my case I eyballed it and extracted it from (4,5) to give a resonable response.
It is also curious that you didn't use the frequencies in (1) in your program. So how about working from the attached untitled.m; I'm in the process of adding the negative frequency and zero padding but don't know if it will help.

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!