how to shift time in impulse response?
Show older comments
At the end of this code, I want to have a time shift on h(i) by -T1 variable in the code. How to do it?
close all; clear; clc;
hS = 3;
hR = 3;
FOV = 90;
A_R = (1*10^-3)^2;
D_SR = 10^3;
p_ceiling = 0.93;
p = 0.67;
c = 299792458;
V_room = 300;
A_room = 300;
Rb=1e6; % Bit rate
Tb=1/Rb; % bit duration
nsamp=10; % samples per symbols
Tsamp=Tb/nsamp; % sampling time
K = 30*nsamp;
kk = 1 : 0.05 : K;
for i = 1:length(kk)
k = kk(i);
t = k*Tsamp;
angle_max = atan(D_SR/(hS+hR)); % assume angle mirror as max angle
path_mirror = sqrt(D_SR^2+(hS+hR)^2);
path_fast = (hS/cos(angle_max)) + sqrt((D_SR-hS*tan(angle_max))^2+hR^2);
path_slow = (hS/cos(angle_max)) + sqrt((D_SR+hS*tan(angle_max))^2+hR^2);
path_peak = hS + sqrt(D_SR^2 + hR^2);
T1 = path_mirror/c;
a = 4*(((path_peak-path_mirror)/(path_slow-path_fast))^2);
lamda = ((path_slow-path_fast)^2)/(4*c*(path_peak-path_mirror));
h1(i) = ((lamda^-a)/gamma(a))*t.^(a-1)*exp(-t./lamda);
T_reflection = (4*V_room)/(c*A_room);
delay_spread = -T_reflection/log(p);
n_high = (A_R/A_room)*((p_ceiling*p)/(1-p))*((sin(FOV))^2);
h_high(i) = (n_high /delay_spread)*exp(-t./delay_spread);
h(i) = h1(i);
end;
Answers (0)
Categories
Find more on Pole and Zero Locations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!