From: sakly on
hello
I have a problem in filtering the signal shifts in reception and is
not quite the same thank you for help is urgent
my code is :

clear all;
bits = [1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,-1,-1];
BT = 0.5;
R = 2000;
fc = 1200;
te = 5000;
T = 1/R;

%%%%%%%%%%%%%%%% impulsion gaussien

t = -T : T/te : T;
y1=2*pi*BT*((t-T/2)/(T*sqrt(log(2))));
y2=2*pi*BT*((t+T/2)/(T*sqrt(log(2))));
g=(1/(2*T*sqrt(pi)))*(erfc(y1/sqrt(2))-erfc(y2/sqrt(2)));

%%%%%%%%%%%%%%%% filtrage
b_t = zeros(1, (length(bits)+1)*te+1);
for n = 1 : length(bits)
t1 = zeros(1, (n-1)*te);
t2 = [t1 bits(n)*g];
t3 = zeros(1, length(b_t) - length(t2));
t4 = [t2 t3];
b_t = b_t + t4;

end
%%%%%%%%%%%% integration %%%%%%%%%%%%%
c_t = b_t;
for n = 2 : length(b_t)
c_t(n) = c_t(n - 1) + c_t(n);
end
%I_t=conv(c_t,g);
%%%%%%%%%%%%%%%%%%%%%%%%%%%

temp_t = g;
for n = 2 : length(temp_t)
temp_t(n) = temp_t(n - 1) + temp_t(n);
end
sf =pi/(temp_t(length(temp_t)));
I =cos(sf.*c_t);
Q = sin(sf.*c_t);
temp = length(bits)/R;
t = 0 : temp/length(c_t) : temp - temp/length(c_t);
mod_signal = cos(2*pi*fc*t) .* I - sin(2*pi*fc*t) .* Q;

%%%%% demodulation GMSK

temp = length(bits)/R;
t = 0 : temp/length(mod_signal) : temp - temp/length(mod_signal);
I1=mod_signal.*cos(2*pi*fc*t);
Q1=-mod_signal.*sin(2*pi*fc*t);


%%%%% filtrage de I et Q

I_t=zeros(1,length(I1)+length(g)-1);
Q_t=zeros(1,length(Q1)+length(g)-1);
I_t=conv(I1,g);
Q_t=conv(Q1,g);
plot(I_t);
hold on
plot(I);
 | 
Pages: 1
Prev: parfor
Next: NLINFIT question: call logncdf