필터 지우기
필터 지우기

How to calculate the output signal from the Path gains and Channel filter coefficient?

조회 수: 20 (최근 30일)
in this link Impulse response i read about the construction of the impulse response from the channel filter coefficient, because the path gains of the channel may not be aligned with the input sampling time.
i tried to test it against constructing the a rayleigh channel as follow:
clear all;
rayChan = comm.RayleighChannel('SampleRate',100000,'MaximumDopplerShift',0,...
'PathDelays',[0 0]*1e-9,'AveragePathGains',[-23.9 -40],...
'NormalizePathGains',false,'PathGainsOutputPort',true, 'Visualization','Impulse response');
signal = 0.707+0.707i;
[chanOut1,pathGains1] = rayChan(signal);
chaninfo = info(rayChan);
coeff = chaninfo.ChannelFilterCoefficients;
and because the pathDelays are aligned with input sampling time, coeff values are 1s.
and we can prove that by comparing chanOut1 from the rayleigh channel with
chanOut2 = signal * (pathGains1(1) + pathGains1(2))
ChanOut2 equals ChanOut1...
Then i tried another example to see the effect of having a non aligned pathdelays with the input sampling rate
rayChan = comm.RayleighChannel('SampleRate',100000,'MaximumDopplerShift',0,...
'PathDelays',[0 5000]*1e-9,'AveragePathGains',[-23.9 -40],...
'NormalizePathGains',false,'PathGainsOutputPort',true, 'Visualization','Impulse response');
signal = 0.707+0.707i;
[chanOut1,pathGains1] = rayChan(signal);
chaninfo = info(rayChan);
coeff = chaninfo.ChannelFilterCoefficients;
and abs(chanOut1) is not the same when i tried
abs(signal * (pathGains1(1,1) + coeff(2,8)))
the coeff is 2*16 Matrix, and due to that the first PathDelay is aligned with input sampling rate we have coeff(1,8) = 1, but while the second pathDelay is not aligned with input sampling rate, we have a vector of coefficient coeff(2,:) has values.
so why i am getting the answer wrong.. is there something i am doing wrong with my calculation?

답변 (1개)

Milan Bansal
Milan Bansal 2024년 2월 2일
Hi Mohamed Essam,
I understand that you are trying to reconstruct the output signal from Path Gains and the Channel Filter Coefficients that you obtained from the multipath Rayleigh fading channel System object "comm.RayleighChannel" for aligned and non-aligned Path Delays, but your reconstructed output signal is not the same as the output signal that was calculated by the "comm.RayleighChannel" object for the non-aligned Path Delay.
The output signal can be reconstructed using the Path Gains and Channel Filter coefficients by following the steps given in the code snippet below.
% 1.) First, get the Path Gains and Channel Filter Coefficients for non-aligned Path Delay using the code given in the problem.
rayChan = comm.RayleighChannel('SampleRate',100000,'MaximumDopplerShift',0,...
'PathDelays',[0 5000]*1e-9,'AveragePathGains',[-23.9 -40],...
'NormalizePathGains',false,'PathGainsOutputPort',true);
signal = 0.707+0.707i;
[chanOut1,pathGains1] = rayChan(signal);
chaninfo = info(rayChan);
coeff = chaninfo.ChannelFilterCoefficients;
% 2.) Calculate the fractional delayed input signal at the path delay locations obtained from Channel Filter Coefficients.
Npaths = length(rayChan.PathDelays); % number of paths
state = zeros(size(coeff, 2)-1,size(coeff, 1)); % states
fracDelayInputSignal = zeros(size(signal, 1), Npaths); % Initialize
for ii = 1:Npaths
[fracDelayInputSignal(:, ii),state(:, ii)] = filter(coeff(ii,:), 1, signal, state(:, ii));
end
% 3.) Multiply the path gains to the fractional delayed input signals for all the paths.
appliedPathGainsInputSignal = pathGains1 .* fracDelayInputSignal;
% 4.) Add the results for all the paths to get reconstructed output signal.
chanOut2 = sum(appliedPathGainsInputSignal,2);
% 5.) Compare and verify that chanOut1 is equal to chanOut2
isequal(chanOut1, chanOut2)
ans = logical
1
Please note that the above solution is valid for both aligned as well as non-aligned Path Delay cases.
Please refer to the following documentation link to learn more about "comm.RayleighChannel" object.
Hope this helps!

카테고리

Help CenterFile Exchange에서 LTE Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by