implementation of digital pulse compression using matlab

by

 

The Main Objective of the project is to Design the Pulse compression filter(Matched filter)

[YK1,t1,n1]=ovsav5(LFMD,lfm,N,ovr,n)
function [YK1,t1,n1]=ovsav5(LFMD,lfm,N,ovr,n)
j=0;

  y1=zeros(1,10001);
%  y1=awgn(y1,0.1);
 
  for i=2246:1:2758
    j=j+1;
    y1(i)=LFMD(j);
  end
%   j=0;
%    for i=3276:1:3788
%     j=j+1;
%     y1(i)=LFMD(j);
%    end
%  disp(y1);
  Q=length(lfm);
  disp(Q);
 
 %creating  4k FFt buffer for H(k)
for k=1:1:N
     if k<=Q
     h(k)=lfm(k);
      else
         h(k)=0;
     end
     
end
Hn=fftshift(fft(h,N));
Hnc=conj(Hn);
%creating  4k for buffer in  10k domain for x(k)
for k=1:1:N
     x(k)=y1(k);
    
end
 % FFT correlation processing for 1st buffer
  t14=linspace(0,10000,N);
  Xn1=fftshift(fft(x,N));
  Yn1=(Xn1).*(Hnc);
  yk1=ifftshift(ifft(Yn1,N));
 yk1(1:511)=0;
 n1=0;  
  for k=ovr+1:1:N+ovr
     n1=n1+1;
      x1(n1)=y1(k);
      
  end;
   t13=linspace(0,10000,n1);
   % FFT correlation processing for 2nd buffer
 Xn2=fftshift(fft(x1,N));
  Yn2=Xn2.*Hnc;
   disp(Yn2);
  yk2=ifftshift(ifft(Yn2,N));
  disp(yk2);
   yk2(1:511)=0;
  n1=0;  
  for k=(ovr*2)+1:1:N+(ovr*2)
     n1=n1+1;
     x2(n1)=y1(k);
     
  end;
  % FFT correlation processing for 3rd buffer
  Xn3=fftshift(fft(x2,N));
   
  Yn3=Xn3.*Hnc;
    disp(Yn3);
    
  yk3=ifftshift(ifft(Yn3,N));
 
   yk3(1:511)=0;
   t12=linspace(0,10000,n1);
   
   
   n1=0;
   
  for k=(ovr*3)+1:1:N+(ovr*3)
      n1=n1+1;
      x3(n1)=y1(k);
  end;
  % FFT correlation processing for 4th buffer
  Xn4=fftshift(fft(x3,N));
  
  
  Yn4=Xn4.*Hnc;
   disp(Yn4);
  yk4=ifftshift(ifft(Yn4,N));
   disp(yk4);
   yk4(1:511)=0;
   t11=linspace(0,10000,n1);
%    subplot(3,1,2)
%    plot(t14,x,'k',t13,x1,'k',t12,x2,'k',t11,x3,'k')
%    grid;


n1=0;
%combining sectional results

  for k=Q-1:1:N
      n1=n1+1;
      YK1(n1)=yk1(k);
  end;
  
  
  for k=0:1:N-Q+1
      n1=n1+1;
      YK1(n1)=yk2(k+Q-1);
  end
  
  
  
  for k=0:1:N-Q+1
      n1=n1+1;
      YK1(n1)=yk3(k+Q-1);
  end
  disp(YK1);
  

  for k=0:1:N-Q+1
      n1=n1+1;
      YK1(n1)=yk4(k+Q-1);
  end
 t1=linspace(0,1*10^-6,n1);
 %taking absloute value ie.,sqrt(i^2+q^2) 
  YK1=(abs(YK1));
end
 

Contact us