一.实验目的和任务
1.了解窄带系统的特性
2. 了解信号和噪声经过窄带系统前后的统计特性
二.实验原理介绍
三、实验内容与步骤
1.
close all
clear all
f01=30e+6;
fs=123.457e+6;
bb=2e+6;
[b0 a0]=butter(2,[(f01-bb/2)/(fs/2) (f01+bb/2)/(fs/2)]);
[bv av]=butter(2,bb/2/(fs/2));
subplot(2,1,1);
[h ff]=freqz(b0,a0,100,fs);
plot(ff,abs(h));
title('BPFƵÂÊÏìÓ¦');
grid on
subplot(2,1,2);
[h ff]=freqz(bv,av,100,fs);
plot(ff,abs(h));
title('LPFƵÂÊÏìÓ¦');
grid on
2.
figure
f02=30e+6;
tt=10e-6;
t=0:1/fs:tt;
ss=sin(2*pi*f02*t);
subplot(2,3,1);
plot(t,ss)
title('ÊäÈëÐźÅ');
grid on
subplot(2,3,4);
nn=length(ss);
f1=(0:(nn-1)/2)/nn*fs;
n1=length(f1);
fss=abs(fft(ss));
plot(f1,fss(1:n1));
title('ÊäÈëÐźÅƵÆ×');
grid on;
ys=filter(b0,a0,ss);
subplot(2,3,2)
plot(t,ys)
title('ÐźÅBPFÊä³ö');
grid on
subplot(2,3,5);
fys=abs(fft(ys));
plot(f1,fys(1:n1));
title('BPFÊä³öÐźÅƵÆ×');
grid on;
subplot(2,3,3);
hist(ss,20);
grid on
title('BPFÇ°ÐźÅÖ±·½Í¼');
subplot(2,3,6);
hist(ys,20);
grid on
title('BPFºóÐźÅÖ±·½Í¼')
3.
figure;
sn=rand(1,nn)*2-1;
subplot(2,3,1)
plot(t,sn);
title('输入噪声U(-1,1)');
grid on;
subplot(2,3,4);
rn=xcorr(sn,sn,'biased');
fn=abs(fft(rn));
f2=(0:nn-1)/(2*nn+1)*fs;
plot(f2,fn(1:nn));
title('输入噪声功率谱');
grid on;
%噪声经过BPF
yn=filter(b0,a0,sn);
subplot(2,3,2)
plot(t,yn);
title('噪声BPF输出');
grid on
subplot(2,3,5)
rn=xcorr(yn,yn,'biased');
fn=abs(fft(rn));
plot(f2,fn(1:nn));
title('噪声BPF输出功率谱');
grid on;
subplot(2,3,3);
hist(yn,20);
grid on
title('BPF后噪声直方图')
subplot(2,3,6);
hs=yn;
i=find(hs<0);
hs(i)=0;
hs=filter(bv,av,hs);
hist(hs,20);
grid on
title('检波后噪声直方图')
4.
figure;
sx=ss+sn;
subplot(2,3,1)
plot(t,sx);
title('BPF前信号+噪声');
grid on;
rn=xcorr(sx,sx,'biased');
fn=abs(fft(rn));
subplot(2,3,4);
plot(f2,fn(1:nn));
title('BPF前信号+噪声功率谱');
grid on;
yx=filter(b0,a0,sx);
subplot(2,3,2)
plot(t,yx);
title('BRF后信号+噪声');
grid on
subplot(2,3,5)
fy=xcorr(yx,yx,'biased');
fy=abs(fft(fy));
plot(f2,fy(1:nn));
title('BRF后信号+噪声功率谱');
grid on;
subplot(2,3,3);
hist(sx,20);
grid on
title('BPF前信噪直方图')
subplot(2,3,6);
hs=yx;
i=find(hs<0);
hs(i)=0;
hs=filter(bv,av,hs);
hist(hs,20);
grid on
title('检波后信噪直方图')
5.
fs=115.321e+6;
bb=4e+6;