How to convert S-parameters (MA format) to transfer function or impulse response?

11 ビュー (過去 30 日間)
a
a 2021 年 1 月 4 日
回答済み: Mathieu NOE 2021 年 1 月 5 日
Dear all,
I am trying to convert S-parameters provided by a VNA (Magnitude and phase format) into transfer function or impulse response. I would like to do this in order to filter arbitrary signals generated in MATLAB with this data measured. I would very grateful if you can provide me any information in order to do this.

回答 (1 件)

Mathieu NOE
Mathieu NOE 2021 年 1 月 5 日
hello
IMHO, the best way is to find a FIR or IIR filter that mimics the magnitude / phase plot of the FRF - see invfreqz
once the filter is designed , you can do waht you want (filter a signal, generate the impulse response)
below one example :
data = importdata ('beam_experiment.mat');
x = transpose(data.x); %input
y = transpose(data.y); %output
fs = data.fs; % sampling frequency
NFFT = 2048;
NOVERLAP = 0.75*NFFT;
[Txy,F] = tfestimate(x,y,hanning(NFFT),NOVERLAP,NFFT,fs);
% IIR model
W = linspace(0,pi,length(F));
ind = find(F>5 & F <80); % frequency weighting ; data reliable between 5 and 80 Hz
WT = zeros(size(W));
WT(ind) = 1;
NB = 6;
NA = NB+2;
[B,A] = invfreqz(Txy,W,NB,NA,WT,1e4);
% check bode plots
[H,WW] = freqz(B,A,length(F));
figure(1),
subplot(2,1,1),plot(F,20*log10(abs(Txy)),'b',F,20*log10(abs(H)),'r');grid
subplot(2,1,2),plot(F,180/pi*(angle(Txy)),'b',F,180/pi*(angle(H)),'r');grid
% Impulse response
[IR,X] = dimpulse(B,A);
samples = length(IR);
time = 1/fs*(1:samples);
figure(2),
plot(time,IR,'r');grid
title('Impulse response')
xlabel('Time (s)');
ylabel('Amplitude')

カテゴリ

Help Center および File ExchangeAnalog Filters についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by