aligning s parameters with fft with arbitrary frequency domain
1 view (last 30 days)
Show older comments
Background:
I am working to dembed an arbitrary time domain signal with s2p files.
Problem Statement:
I am getting incorrect time domain signal when getting the de-embedded signal in the time domain, which I believe is a misalligned frequncy domain.
Best Attempt:
If I have sparameters that are over a different frequency range than the fft of a signal is interpl the best way to allign the S12 before multiplying?
%%setup of frequency variables
dt = time(2)-time(1); % Sampling period
df = 1/dt; % Sampling frequency
L_of_t = length(time); % Length of signal
t = (0:L_of_t-1)*dt; % Time vector
n = 2^nextpow2(L_of_t);
%f = dFs*(0:(n/2))/n;
f = df*(0:(L_of_t/2)-1)/L_of_t; %frequency range
f_length = length(f); %length of the frequency range
%% allignment of S parameters
alligned_S12 = interp1(s_param_inv.Frequencies(k),s_param_inv.Parameters(2,1,k),f);
parfor k=1:lengthofmatritime %can be a parforloop
fd_final_sig(k) = s_param_inv.Parameters(2,1,k) * fd_sparam_simcircuit(k);%fd_sparam_simcircuit(k);
end
%% converting the dembedding frequency domain signal back to the time domain
td_final_sig = ifft(fd_final_sig,'symmetric');
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!