Pluto-Network/code/matlab/BPSK/receiver/rx_time_equalize.m

25 lines
648 B
Matlab
Raw Normal View History

2018-01-30 06:11:44 +00:00
function out_signal = rx_time_equalize(signal)
signal=[zeros(1,13) signal zeros(1,5)];
N=length(signal);
M=10; %<25><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD>
W=zeros(M+1,1); %<25><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>ͷϵ<CDB7><CFB5>
W(ceil(((M+1)/2)))=1; %<25><>ʼ<EFBFBD><CABC>
U=1e-3; %<25><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Y1=zeros(M+1,1);
e=zeros(1,(N-M)); %<25><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
R1=1;
R2=1;
for mmm=1:4
for n=1:(N-M)
Y1=signal(n+M:-1:n).';
YK(n)=W.'*Y1; %<25><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
YI=real(YK(n));
YQ=imag(YK(n));
EI=YI*(YI^2-R1);
EQ=YQ*(YQ^2-R2);
e(n)=EI+EQ*sqrt(-1);
W=W-U*e(n)*conj(Y1);%<25><><EFBFBD>ڳ<EFBFBD>ͷϵ<CDB7><CFB5>
end
end
out_signal=YK(9:end);
end