フィルターのクリア

impulse response of frequency shifted complex rational fit

10 ビュー (過去 30 日間)
Robert Morawski
Robert Morawski 2023 年 9 月 27 日
回答済み: Balavignesh 2024 年 1 月 15 日
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.

回答 (1 件)

Balavignesh
Balavignesh 2024 年 1 月 15 日
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)
rat_fit =
rational with properties: NumPorts: 1 NumPoles: 10 Poles: [10×1 double] Residues: [1×1×10 double] DirectTerm: 0 ErrDB: -172.2180
% 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);
1.0e-03 * Columns 1 through 10 -0.0585 + 0.1020i 0.0581 - 0.0786i -0.0571 + 0.0543i 0.0555 - 0.0296i -0.0534 + 0.0050i 0.0509 + 0.0192i -0.0480 - 0.0424i 0.0448 + 0.0644i -0.0412 - 0.0848i 0.0374 + 0.1032i Columns 11 through 20 -0.0334 - 0.1193i 0.0292 + 0.1330i -0.0249 - 0.1440i 0.0204 + 0.1522i -0.0158 - 0.1575i 0.0112 + 0.1600i -0.0065 - 0.1595i 0.0019 + 0.1563i 0.0028 - 0.1504i -0.0074 + 0.1420i Columns 21 through 30 0.0119 - 0.1313i -0.0162 + 0.1186i 0.0204 - 0.1042i -0.0244 + 0.0883i 0.0282 - 0.0712i -0.0317 + 0.0533i 0.0349 - 0.0350i -0.0377 + 0.0166i 0.0402 + 0.0017i -0.0422 - 0.0194i Columns 31 through 40 0.0437 + 0.0363i -0.0447 - 0.0521i 0.0452 + 0.0665i -0.0452 - 0.0794i 0.0446 + 0.0905i -0.0434 - 0.0997i 0.0417 + 0.1069i -0.0394 - 0.1121i 0.0365 + 0.1151i -0.0331 - 0.1160i Columns 41 through 50 0.0292 + 0.1148i -0.0249 - 0.1117i 0.0202 + 0.1067i -0.0151 - 0.0999i 0.0097 + 0.0917i -0.0042 - 0.0820i -0.0015 + 0.0712i 0.0072 - 0.0595i -0.0129 + 0.0472i 0.0184 - 0.0343i Columns 51 through 60 -0.0238 + 0.0213i 0.0288 - 0.0083i -0.0334 - 0.0044i 0.0375 + 0.0167i -0.0411 - 0.0282i 0.0442 + 0.0389i -0.0465 - 0.0486i 0.0481 + 0.0571i -0.0490 - 0.0643i 0.0491 + 0.0702i Columns 61 through 70 -0.0485 - 0.0747i 0.0471 + 0.0777i -0.0449 - 0.0792i 0.0420 + 0.0793i -0.0384 - 0.0780i 0.0341 + 0.0754i -0.0294 - 0.0716i 0.0241 + 0.0667i -0.0184 - 0.0607i 0.0124 + 0.0540i Columns 71 through 80 -0.0063 - 0.0465i -0.0000 + 0.0385i 0.0063 - 0.0301i -0.0125 + 0.0215i 0.0185 - 0.0128i -0.0242 + 0.0042i 0.0294 + 0.0041i -0.0342 - 0.0120i 0.0384 + 0.0195i -0.0419 - 0.0263i Columns 81 through 90 0.0447 + 0.0324i -0.0468 - 0.0377i 0.0480 + 0.0422i -0.0485 - 0.0458i 0.0481 + 0.0484i -0.0469 - 0.0501i 0.0450 + 0.0508i -0.0423 - 0.0507i 0.0389 + 0.0497i -0.0348 - 0.0479i Columns 91 through 100 0.0302 + 0.0453i -0.0251 - 0.0421i 0.0196 + 0.0383i -0.0138 - 0.0339i 0.0078 + 0.0292i -0.0018 - 0.0242i -0.0043 + 0.0190i 0.0102 - 0.0137i -0.0159 + 0.0083i 0.0213 - 0.0031i Column 101 -0.0262 - 0.0019i
Kindly refer to the following documentation links to have more information on:
Hope that helps!

カテゴリ

Help Center および File ExchangeTransmitters and Receivers についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by