文档详情

dsp课程设计..docx

发布:2016-12-27约2.8千字共5页下载文档
文本预览下载声明
DSP课程设计姓名: 马露 学号: 2010013020012 班级: 通信15班 教师: 潘晔[题目]:An analog signal has the following form:Where n(t) is a Gaussian noise process with zero mean and unit variance. A, B and C are real scalar constants; f0 and f1are the frequencies of two sinusoids. You sample the signal at 100Hz and take N. Choose N and adjust the values A, B and C and f0 and f1 to find cases where:The rectangular window is able to clearly resolve the two sinusoidal components while the Blackman window is not.The Blackman window is able to clearly show that there are two sinusoidal signals present while the rectangular window is not.Filtering the noise from x(t); to show spectral peaks of original x(t) and it’s noise-free version. (you can use pwelch function)[分析]:三个问题分别研究了矩形窗,布莱曼窗,以及滤出噪声的相关知识.通过对不同窗函数及FIR滤波器的分析,可知矩形窗的主瓣窄,旁瓣宽,而布莱克曼窗的主瓣宽,旁瓣窄.所以对不同的滤波表现,其频率位置不同.通过计算分别得到三个问题的三种不同的参数:A=1 B=0.25 C=0 f0=15 f1=16 N=111A=1 B=10 C=0 f0=10 f1=30 N=31A=1 B=1 C=1 f0=10 f1=31 N=61.(a)为矩形窗滤出正弦(b)为布莱曼窗滤出正弦,所以噪声常数C都设为0即可.窗函数构造MATLAB工具箱已经提供了各种窗函数的构造函数,因而窗函数的构造十分方便,下面给出几种常用窗函数的构造方法: 1.矩形窗:利用w=boxcar(n)的形式得到窗函数,其中n为窗函数的长度,而返回值w为一个n阶的向量,它的元素由窗函数的值组成。‘w=boxcar(n)’等价于‘w=ones(1,n)’. 2.三角窗:利用w=triang(n)的形式得到窗函数,其中n为窗函数的长度,而返回值w为一个n阶的向量,它的元素由窗函数的值组成。w=triang(N-2)等价于bartlett(N)。 3.汉宁窗:利用w=hanning(n)得到窗函数,其中n为窗函数的长度,而返回值w为一个n阶的向量,包含了窗函数的n个系数。 4.布莱曼窗:利用w=blackman(n)得到窗函数,其中n为窗函数的长度,而返回值w为一个n阶的向量,包含了窗函数的n个系数。它的主瓣宽度是矩形窗主瓣宽度的3倍,为12*pi/N,但是它的最大旁瓣值比主瓣值低57dB。 5.凯塞窗:利用w=kaiser(n,beta)的形式得到窗函数。[设计]:代码部分:%基本代码A = 1 ;B = 0.25; %在(b)中为10,(c)中为1C = 0 ; %在(b)中为0,(c)中为1f0 = 15 ; %在(b)中为10,(c)中为30f1 = 16 ; %在(b)中为10,(c)中为31Rt = 100 ;N = 111 ; %在(b)中为31,(c)中为61T = 1/Rt ;n = 0:T:10-T ;length = length(n) ;x0 = A*cos(2*pi*f0*n) ;x1 = B*cos(2*pi*f1*n) ;x = x0+x1+C*randn(1,length) ;omega_0 = 2*f0/Rt ;omega_1 = 2*f1/Rt ;omega_c = (omega_0+omega_1)/2 ;NFFT = 2^nextpow2(length);f = Rt/2*linspace(0,1,NFFT/2+1);X0 = fft(x0,NFFT)/length;X1 = fft(x1,NFFT)/length;X = fft(x,NFFT)/length;%窗函数部分(a)矩形窗N1 = N ;omega_ML_r
显示全部
相似文档