标题: 线性调频LFM信号脉冲压缩matlab代码 [打印本页]

作者: exp(jpai)+1=0    时间: 2022-12-1 15:52
标题: 线性调频LFM信号脉冲压缩matlab代码
亲测可用
  1. %%线性调频信号经过匹配滤波
  2. T=10e-6;                                   %脉冲持续时间10us
  3. B=30e6;                                    %线性调频信号的带宽30MHz
  4. K=B/T;                                     %调频斜率
  5. Fs=10*B;Ts=1/Fs;                     %采样频率和采样间隔
  6. N=T/Ts;
  7. t=linspace(-T/2,T/2,N);
  8. St=exp(j*pi*K*t.^2);                     %线性调频信号
  9. Ht=exp(-j*pi*K*t.^2);                    %匹配滤波
  10. Sot=conv(St,Ht);                         %线性调频信号经过匹配滤波

  11. subplot(411)
  12. L=2*N-1;
  13. t1=linspace(-T,T,L);
  14. Z=abs(Sot);
  15. Z=Z/max(Z);             %归一化
  16. Z=20*log10(Z+1e-6);
  17. Z1=abs(sinc(B.*t1));                   %辛格函数
  18. Z1=20*log10(Z1+1e-6);
  19. t1=t1*B;                                         
  20. plot(t1,Z,t1,Z1,'r.');
  21. axis([-15,15,-50,inf]);grid on;
  22. legend('匹配滤波','辛格');
  23. xlabel('时间/s ');
  24. ylabel('幅值/dB');
  25. title('线性调频信号经过匹配滤波');

  26. subplot(412)                              %展开
  27. N0=3*Fs/B;
  28. t2=-N0*Ts:Ts:N0*Ts;
  29. t2=B*t2;
  30. plot(t2,Z(N-N0:N+N0),t2,Z1(N-N0:N+N0),'r.');
  31. axis([-inf,inf,-50,inf]);grid on;
  32. set(gca,'Ytick',[-13.4,-4,0],'Xtick',[-3,-2,-1,-0.5,0,0.5,1,2,3]);
  33. xlabel('时间/s');
  34. ylabel('幅度/dB');
  35. title('线性调频信号经过匹配滤波(补零展开之后)');


  36. Z_value = Z(2950:3050)
  37. subplot(413)
  38. plot(Z_value);
  39. grid on;
  40. [value, locmax ] = max( Z_value(1:40));
  41. locmax
  42. value

  43. subplot(414)
  44. plot(Z);
  45. sum = 0;
  46. for mm = 1:length(Z)
  47.     sum = sum +Z(mm)
  48.    
  49. end

  50. sum = -sum;
  51. sum
复制代码







欢迎光临 (http://www.51hei.com/bbs/) Powered by Discuz! X3.1