|
親測可用
- %%線性調(diào)頻信號經(jīng)過匹配濾波
- T=10e-6; %脈沖持續(xù)時間10us
- B=30e6; %線性調(diào)頻信號的帶寬30MHz
- K=B/T; %調(diào)頻斜率
- Fs=10*B;Ts=1/Fs; %采樣頻率和采樣間隔
- N=T/Ts;
- t=linspace(-T/2,T/2,N);
- St=exp(j*pi*K*t.^2); %線性調(diào)頻信號
- Ht=exp(-j*pi*K*t.^2); %匹配濾波
- Sot=conv(St,Ht); %線性調(diào)頻信號經(jīng)過匹配濾波
- subplot(411)
- L=2*N-1;
- t1=linspace(-T,T,L);
- Z=abs(Sot);
- Z=Z/max(Z); %歸一化
- Z=20*log10(Z+1e-6);
- Z1=abs(sinc(B.*t1)); %辛格函數(shù)
- Z1=20*log10(Z1+1e-6);
- t1=t1*B;
- plot(t1,Z,t1,Z1,'r.');
- axis([-15,15,-50,inf]);grid on;
- legend('匹配濾波','辛格');
- xlabel('時間/s ');
- ylabel('幅值/dB');
- title('線性調(diào)頻信號經(jīng)過匹配濾波');
- subplot(412) %展開
- N0=3*Fs/B;
- t2=-N0*Ts:Ts:N0*Ts;
- t2=B*t2;
- plot(t2,Z(N-N0:N+N0),t2,Z1(N-N0:N+N0),'r.');
- axis([-inf,inf,-50,inf]);grid on;
- set(gca,'Ytick',[-13.4,-4,0],'Xtick',[-3,-2,-1,-0.5,0,0.5,1,2,3]);
- xlabel('時間/s');
- ylabel('幅度/dB');
- title('線性調(diào)頻信號經(jīng)過匹配濾波(補(bǔ)零展開之后)');
- Z_value = Z(2950:3050)
- subplot(413)
- plot(Z_value);
- grid on;
- [value, locmax ] = max( Z_value(1:40));
- locmax
- value
- subplot(414)
- plot(Z);
- sum = 0;
- for mm = 1:length(Z)
- sum = sum +Z(mm)
-
- end
- sum = -sum;
- sum
復(fù)制代碼
|
|