Frequency Selective Channel Coefficients in MATLAB

Hello all
How can I generate the following channel coefficients in MATLAB, where these coefficients correspond to a frequency selective channel:
f_m=sum_p h_p exp(-j*2*pi*fc*tau_p) g(mTs-tau_p), m=0,1,...,L-1
where g(t) is rectangular pulse of support duration Ts, and h_p, tau_p and fc are given.
Thanks in advance

1 件のコメント

Youssef  Khmou
Youssef Khmou 2014 年 3 月 18 日
編集済み: Youssef Khmou 2014 年 3 月 18 日
you have to change the title so that the specialists in the field will answer, put as example " radiation pattern" ," collected signals"..

サインインしてコメントする。

 採用された回答

Youssef  Khmou
Youssef Khmou 2014 年 3 月 18 日
編集済み: Youssef Khmou 2014 年 3 月 18 日

0 投票

here is a start :
Fs=800;
fc=300; % Hz
Ts=1/Fs;
L=400;
t=0:Ts:(L-1)*Ts;
d=4; % four signals per example,
tau is dependent on physical parameters, distance and coordinates, but i consider here a linear progressive phase, and the signals are sinusoidal :
tau=(0:d-1);
fm=0;
for p=1:d
fm=fm+exp(-j*2*pi*fc*tau(p))*sin(2*pi*t);
end
figure; plot(real(fm));
your assignment now is to replace the sin signals with the rectangular ones .

9 件のコメント

S. David
S. David 2014 年 3 月 19 日
編集済み: S. David 2014 年 3 月 19 日
That is funny, because my problem was how to deal with rectangular pulse. I will try though, and tell me if it is right.
The vector t as you defined is actually a train of rectangular pulses. So, I guess the following:
fm=0;
for p=1:d
fm=fm+exp(-j*2*pi*fc*tau(p))*(t-tau(p));
end
Is that right?
Youssef  Khmou
Youssef Khmou 2014 年 3 月 19 日
hi,
no, t is linear vector of time index, as for rectangular pulse, there is build-in function rectpuls(t,w), test this entire program :
Fs=800;
fc=300; % Hz
Ts=1/Fs;
L=400;
t=0:Ts:(L-1)*Ts;
d=4; % four signals per example,
tau=(0:d-1)/4; % width of rectangular puls <=1.
SIG=zeros(d,L);
for n=1:d
SIG(n,:)=rectpuls(t,tau(n));
end
fm=0;
for p=1:d
fm=fm+exp(-j*2*pi*fc*tau(p))*SIG(p,:);
end
plot the real part of fm, is it descending stair?
S. David
S. David 2014 年 3 月 20 日
Indeed it is.
I read "help rectpuls" and it says that rectpuls(T,W) finds the amplitude value of the rectangular pulse (of unity value) at the points specified by the vector T with width W (which is one by default). Based on this information, I wrote the following code with actual parameters I am using for my communication system, and use some ideas from your codes. Note: fm should be a point not a vector, so I wrote another for loop of it.
fc=30*10^3; %Carrier frequency
B=1000; %The bandwidth
Ts=1/(2*B); %Sample time (Nyquist rate)
tau=[0 12 20].*10^-3; %Path delays
h=[1 1 1]; %Channel gains
Np=length(h); %Number of distinct paths
L=round(tau(end)/Ts)+1; %Channel length
fm=0;
for pp=1:Np
for ll=1:L
fm=fm+h(pp)*exp(-1i*2*pi*fc*tau(pp)).*rectpuls(ll*Ts-tau(pp),Ts);
end
end
Is that correct?
Youssef  Khmou
Youssef Khmou 2014 年 3 月 20 日
There is a problem with sample time, is fc the central frequency ([f1 fc f2]) or the lower frequency, anyway for wideband signals with spectrum ([f1 f2]) the sample time is T=1/(2*max(f1,f2)), in your case you only took B while signals contains fc>>B.
Ts=1/(2*(B+fc));
there must a be meaning why fm is 1x1 rather than vector, are you trying to integrate fm? these are the issues you have to explore more.
S. David
S. David 2014 年 3 月 20 日
I am working in baseband not bandpass, i.e.,: f1=0 and f2= 1 KHz. In this case T=1/(2*max(f1,f2))=1/(2*B). Right?
Yes, right, I was wrong. In this case fm is vector. So, the code becomes:
fc=30*10^3; %Carrier frequency
B=1000; %The bandwidth
Ts=1/(2*B); %Sample time (Nyquist rate)
tau=[0 12 20].*10^-3; %Path delays
h=[1 1 1]; %Channel gains
Np=length(h); %Number of distinct paths
L=round(tau(end)/Ts)+1; %Channel length
t=0:Ts:(L-1)*Ts;
fm=0;
for pp=1:Np
fm=fm+h(pp)*exp(-1i*2*pi*fc*tau(pp)).*rectpuls(t-tau(pp),Ts);
end
Is it right now?
S. David
S. David 2014 年 3 月 20 日
I am sorry, I don't understand. The sampling rate must be at least twice the highest frequency component, and I am working in baseband. So, why it is 2*(B+fc) and not 2*B? Am I missing something here?
Thanks
Youssef  Khmou
Youssef Khmou 2014 年 3 月 20 日
you are right :
Youssef  Khmou
Youssef Khmou 2014 年 3 月 20 日
if the problem is solved, accept the answer.
S. David
S. David 2014 年 3 月 20 日
Thanks

サインインしてコメントする。

その他の回答 (0 件)

質問済み:

2014 年 3 月 18 日

コメント済み:

2014 年 3 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by