- 'ifft' function: https://www.mathworks.com/help/matlab/ref/ifft.html
- 'conv' function: https://www.mathworks.com/help/matlab/ref/conv.html
impulse response of frequency shifted complex rational fit
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have performed a frequency-shifted pole-residue rational fit (8 poles) on a measured 20MHz S21 Channel response.
The complex pole-residue rational fit, results in a non-symmetrical magnitude and phase frequency response as expected, using freqresp(rat_fit,freq).
However, executing impulse(rat_fit,50e-9,100) does not yield a complex impulse response, and the results appear incorrect, strange.
used: rfmodel.rational()
The final objective is to convolute a baseband complex singal with the baseband equivalent channel response (modeled based on RF measured s2p parameters). I could also use timeresp(rat_fit,InputSignal,SampleTime), but the function does not accept complex InputSignal.
Thank you in advance for any comments or suggestions.
0 commentaires
Réponses (1)
Balavignesh
le 15 Jan 2024
Hi Robert,
As per my understanding, you would like to convolute a baseband complex signal with the baseband equivalent channel response based on RF-measured s2p parameters.
The function 'impulse(rat_fit, 50e-9,100)' doesn't yield a complex response because the 'impulse' function is typically used for linear time-invariant (LTI) systems, and it returns the response of the system to an impulse input. For a rational model created from S-parameter measurements, the impulse response should be real-valued because it represents the response to a delta function. I would suggest you try to manually compute the impulse response from the frequency response using an inverse Fourier transform. If 'timeresp' doesn't accept complex signals, you could handle the real and imaginary parts separately using the 'conv' function.
The following example code snippet may help you achieve this:
% I have used a sample data for explaining the method.
S = sparameters('defaultbandpass.s2p');
freq = S.Frequencies;
data = rfparam(S,2,1);
rat_fit = rational(freq,data)
% Now rat_fit is the rational function object that models the S21 response
% Compute frequency response
[H, f] = freqresp(rat_fit, freq);
% Obtain impulse response by inverse Fourier transform (if necessary)
impulseResponse = ifft(H);
% Sample Baseband signal
fs = 100e6; % sample rate of 100 MHz
t = 0:1/fs:1e-6; % time vector for 1 microsecond duration
% Generate a complex exponential signal with a frequency offset
f_offset = 5e6; % frequency offset of 5 MHz
basebandSignal = exp(1i*2*pi*f_offset*t);
% Add some noise to the signal
noise = 0.1*(randn(size(t)) + 1i*randn(size(t)));
basebandSignal = basebandSignal + noise;
% Separate baseband signal into real and imaginary parts
realSignal = real(basebandSignal);
imagSignal = imag(basebandSignal);
% Convolve each part with the impulse response
convReal = conv(realSignal, impulseResponse, 'same');
convImag = conv(imagSignal, impulseResponse, 'same');
% Combine the convolved signal parts into a complex signal
convolvedSignal = convReal + 1i * convImag;
disp(convolvedSignal);
Kindly refer to the following documentation links to have more information on:
Hope that helps!
0 commentaires
Voir également
Catégories
En savoir plus sur Transmitters and Receivers dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!