doppler_shifts.m
来自「多径多普勒信道模型」· M 代码 · 共 71 行
M
71 行
clear all;
N=20 ;% number of multipath arrivals
a=rand(1,N); %amplitude
tau=rand(1,N); %arrival time
f_d=0.01
shift=rand(1,N)*2*f_d-f_d; %Doppler shifts
f=10; % the frequency of the transmitted time harmonic signal
f_shift=f+shift;
t=[0:0.01:50];
n=1;
y_d_t=sum(a(n)*exp(-j*2*pi*f*tau(n)))*exp(j*2*pi*(f_shift(n))*t);
for n=2:N
y_d_t=y_d_t+a(n)*exp(-j*2*pi*f*tau(n))*exp(j*2*pi*(f_shift(n))*t); %received signal
end
subplot(2,2,1)
plot(t,y_d_t)
xlabel('time, sec')
ylabel('f_D=0.01')
N=20 ;% number of multipath arrivals
a=rand(1,N); %amplitude
tau=rand(1,N); %arrival time
f_d=0.05
shift=rand(1,N)*2*f_d-f_d; %Doppler shifts
f=10; % the frequency of the transmitted time harmonic signal
f_shift=f+shift;
t=[0:0.01:50];
n=1;
y_d_t=sum(a(n)*exp(-j*2*pi*f*tau(n)))*exp(j*2*pi*(f_shift(n))*t);
for n=2:N
y_d_t=y_d_t+a(n)*exp(-j*2*pi*f*tau(n))*exp(j*2*pi*(f_shift(n))*t); %received signal
end
subplot(2,2,2)
plot(t,y_d_t)
xlabel('time, sec')
ylabel('f_D=0.05')
N=20 ;% number of multipath arrivals
a=rand(1,N); %amplitude
tau=rand(1,N); %arrival time
f_d=0.1
shift=rand(1,N)*2*f_d-f_d; %Doppler shifts
f=10; % the frequency of the transmitted time harmonic signal
f_shift=f+shift;
t=[0:0.01:50];
n=1;
y_d_t=sum(a(n)*exp(-j*2*pi*f*tau(n)))*exp(j*2*pi*(f_shift(n))*t);
for n=2:N
y_d_t=y_d_t+a(n)*exp(-j*2*pi*f*tau(n))*exp(j*2*pi*(f_shift(n))*t); %received signal
end
subplot(2,2,3)
plot(t,y_d_t)
xlabel('time, sec')
ylabel('f_D=0.1')
N=20 ;% number of multipath arrivals
a=rand(1,N); %amplitude
tau=rand(1,N); %arrival time
f_d=0.5
shift=rand(1,N)*2*f_d-f_d; %Doppler shifts
f=10; % the frequency of the transmitted time harmonic signal
f_shift=f+shift;
t=[0:0.01:50];
n=1;
y_d_t=sum(a(n)*exp(-j*2*pi*f*tau(n)))*exp(j*2*pi*(f_shift(n))*t);
for n=2:N
y_d_t=y_d_t+a(n)*exp(-j*2*pi*f*tau(n))*exp(j*2*pi*(f_shift(n))*t); %received signal
end
subplot(2,2,4)
plot(t,y_d_t)
xlabel('time, sec')
ylabel('f_D=0.5')
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?