Receiver filter matching loss
Calculate Matching Loss
Compute the matching loss for a rectangular pulse and a mismatched second-order Butterworth filter.
Define sampling frequency, pulsewidth, and filter bandwidth.
Fs = 10; % Sampling frequency (Hz) tau = 1.2; % Pulsewidth (s) B = 1.0; % Filter bandwidth (Hz)
Calculate the rectangular pulse in the time domain.
s = ones(1,Fs*tau);
Calculate the spectrum of the received pulse.
nfft = 2^(nextpow2(tau*Fs)+1); S = fft(s,nfft);
Calculate the frequency response of a second-order Butterworth filter with bandwidth
[b,a] = butter(2,B/Fs); [H,w] = freqz(b,a,nfft,'whole',Fs);
Compute the matching loss for the pulsewidth-bandwidth product,
tau*B = 1.2.
Lm = matchingloss(S,H.')
Lm = 0.9806
S — Spectrum of received signal
Spectrum of the received signal, specified as a J-by-N matrix with rows corresponding to spectra of J signals and columns corresponding to N frequency bins.
H — Frequency response of mismatch filter
Frequency response of the mismatch filter, specified as a
K-by-N matrix with rows corresponding to
frequency responses of
K filters and columns
corresponding to N frequency bins.
The columns of
H must correspond to the
same N frequency bins.
Lm — Matching loss
Matching loss, returned as a J-by-K matrix in dB. The matching loss matrix is computed for each combination of J signals and K filters.