I made a previous post about what I am trying to do

Previous Post

I have band-limited data in the frequency domain from a VNA and I am trying to convert it into the time domain. VNA data saved in .s2p in Real/Imaginary format

VNA settings:

enter image description here

I extend the data to create a complete FFT. Zero padding is used for this procedure For sampling frequency, I use Nyquist

enter image description here

I make the number of points to be a power of 2

enter image description here

Zero padding Matlab Pseudo_code as follows:

Data_ext=[zeros(3200,1); Data_raw;  zeros(79871,1)]

I take this extended data, copy it without the DC point, conjugate it, flip it, and append it. Pseudo_code as follows:

Data_copy=Data_ext (2:end)
Data_copy=flip(conj(Data_ext (2:end)))
Data_total=[Data_ext  ;   Data_copy ]

enter image description here

The plot above shows the extended data (single Sided). Top is real, and bottom is imaginary I can now perform the IFFT on Data_total From here we can window and filter the data. To match the VNA, we use a Kaiser window (beta=6), and an FIR bandpass filter.

enter image description here

The plot above shows IFFT results. The black trace is the time domain from the VNA, the blue is the raw IFFT results, and the red is the IFFT windowed and filtered.

MY ISSUE I cannot get the time signal to qualitatively match the VNA. Obviously the VNA probably has some proprietary algorithm, but I should be able to get close. I think that my issue is a lack of understanding of number of points and sample frequency. I have already tried creating my own time domain waveforms, and performing FFT and going back with IFFT. I am hoping that someone is like "Hey dummy, your points need to be XXXX and your Fs should be XXXX"

  • $\begingroup$ Are you 100% sure the time domain VNA matches the frequency domain data you have? $\endgroup$
    – Jdip
    Mar 9 at 17:24
  • $\begingroup$ I am not sure what you mean. I pulled the s2p file and corresponding time domain data $\endgroup$
    – Frank
    Mar 9 at 17:36
  • $\begingroup$ My question is, when you do your own FFT on the time domain data do you get a match with the frequency data stored in the .s2p files? The reason I’m asking is there’s no point comparing if that’s not the case. In other words, have you tried going the opposite way? As in, take the time domain data, filter it, take the FFT and compare with the .s2p file $\endgroup$
    – Jdip
    Mar 9 at 17:57
  • $\begingroup$ Also, can you share both the .s2p and corresponding time domain data so others can take a crack at it? $\endgroup$
    – Jdip
    Mar 9 at 17:57
  • $\begingroup$ Ah I see what you are saying. My time data is Lin/Mag, so I will need to take some more measurements to get all the mag and phase info. $\endgroup$
    – Frank
    Mar 9 at 20:19


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.