数字信号处理作业-DSP随堂测试_第1页
数字信号处理作业-DSP随堂测试_第2页
数字信号处理作业-DSP随堂测试_第3页
数字信号处理作业-DSP随堂测试_第4页
数字信号处理作业-DSP随堂测试_第5页
已阅读5页,还剩7页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

《数字信号处理》测试题

班级:20通信工程1班姓名:孟凡钧

学号:20434020109

1.读下列程序,填写输出结果。(9分)

cic输出结果:

x1=0:4;

y1=0:4;

a1=double(x1==2);a1=[0,0,1,0,01__________

b1=double(y1>2);b1=[0,0,0,1,11_________

c1=conv(a1,b1);c1=1000,00110,0]

2.画出A/=8点的基-2按时间抽选(DIT)FFT流图(L=3)。(15

分)

3.用DFT对非周期连续时间信号进行频谱分析的过程如下图所示,

请根据图中所示时域、频域波形,对每阶段操作的结构进行分析。(25

分)

,八抽样“、破短“、周期延拓周期延拓

&(〃)--x,v(n)

t=nT取•个周期

FTDTFTDTFTDFSDFT

周期延拓*卷枳*抽样周期延拓‘

依。)-------^为©,-刈漕)*0(")------------―・心纸)

Q,=2n/T口=。,乂取一个周期

x』")及

<=FT>

00

M”)也叫I

DTFT

00(0

DFS

IhTmIllmillL血血linnlb

0N-\oN-\k

XM”)

DFT

lnnil

0N-\n0N-\k

例:傅里叶变换,其时域为非周期连续信号,经过FT,其频谱为连

续函数,对时域信号进行抽样,导致时域信号变为离散时间信号;对

时间信号的抽样,造成其频谱*******,此时进行频谱分析使用DTFT;

②Rg©羚&拄咫f代珂?双川•汪成声钳风

//MW海

小叼2。叼”用女)笛当口近)D豺)为次⑸

।⑪湘灿)飒曲31:cPs的用/个?"

产寻国阳”内3.

“华』一伊期存刊"勿,过

4.试说明线性卷积与圆周卷积的异同点。(8分)

5.写出下图所示结构的系统函数和差分方程。(8分)

rH即®尊名)

=任我/f才2.

卜22"24&+22寸_彳婷-f守

二中”121

州二

而好曲y/N/'ey

6.一个不失真线性系统,其幅频响应和相频响应具有什么特点?并

运用FT/DFT变换的性质,对其进行解释说明。(10分)

7.(1)请解释栅栏效应,以及改进方法;

(2)请对波形分辨率、频率分辨率的区别进行说明。(15分)

8.查阅相关文献,总结数字滤波器开发的步骤。(从软件到硬件)(10

分)

Matlab仿真测试代码:

»Num

Num二

-0.032520274817651-0.038393343465240

0.0784267693069510.2874376383223380.398431099816101

0.2874376383223380.078426769306951-0.038393343465240

-0.032520274817651

取整:

»sprintf('%.4f1,Num)

Num二round(Num*400)%将系类攵放大并取整

ans=

-0.0325-0.03840.07840.28740.39840.28740.0784-0.0384

-0.0325

Num=

-13-153111515911531-15-13

»Num=Num+20%将系数符号变成正的,便于FPGA使用

Num=

75511351791355157

4,利用matIab进行仿真测试。

cIearall;

Fs=10000;%采样频率决定了两个正弦波点之间的间隔

N=4096;%采样点数

N1=0:1/Fs:N/Fs-1/Fs;

x1=sin(1000*2*pi*N1);

x2=sin(3000*2*pi*N1);

x3=sin(4000*2*pi*N1);

in=x1+x2+x3;

Fs=10000;%采样频率决定了两个正弦波点之间的间隔

N=4096;%采样点数

N1=0:1/Fs:N/Fs-1/Fs;

s=x1+x2+x3;%三种正弦波

fide=fopen('F:\FPGA\Iianxi\FIR\mem.txt','wt');%将结果写

入mem.txt文件,便于modesim使用

forx=1:N

fprintf(fide,'%x\n',round((s(x)+2.12)*58));

end

fclose(fide);

a=textread('F:\FPGA\Iianxi\FIR\mem.txt',"%s');

aIpha=hex2dec(a);

coeff=[7,5,51,135,179,135,51,5,7];

out=conv(aIpha,coeff);%卷积滤波

subpIot(3,1,1);

x4=round((x1+2.12)*58);

pIot(x4);

axis([02000256]);

subpIot(3,1,2);

plot(alpha);

xlabel(,滤波前’);

axis([02000256]);

subpIot(3,1,3);

plot(out);

xlabel('滤波后’);

axis([02000160000]);

FPGA滤波器设计代码:

moduIeFIR(

inputCLK,〃系统时钟50M

inputRSTn,//外部复位,Pin31引脚

input[7:0]FIR_IN,

outputreg[17:0]FIR_0UT

);

reg[7:0]delay_pipeline1;

reg[7:0]delay_pipeline2;

reg[7:0]delay_pipeline3;

reg[7:0]deIay_pipeIine4;

reg[7:0]delay_pipeline5;

reg[7:0]delay_pipeline6;

reg[7:0]delay_pipeline7;

reg[7:0]delay_pipeline8;

reg[7:0]deIay_pipeIine9;

aIways@(posedgeCLKornegedgeRSTn)begin

if(!RSTn)

begin

delay_pipelne1<=8'bO;

delay_pipelne2<=8'bO;

delay_pipelne3<=8'bO;

delay_pipelne4<二8'bO;

delay_pipelne5<=8'bO;

deIay_pipeIne6<=8'bO;

delay_pipelne7<=8'bO;

delay_pipelne88'bO;

delay_pipeline9〈二8'bO;

end

eIse

begin

deIay_pipeine1<=FIR_IN;

delay_pipeine2<=delay_pipeline1;

delay_pipeine3<=delaypipeline2;

delay_pipeine4<=deIay_pipeIine3;

delaypipeine5<二delay_pipeline4;

delay_pipeine6<=delay_pipeline5;

delay_pipeine7<=delay_pipeline6;

deIay_pipeine8<=deIay_pipeIine7;

delay_pipeine9<=deIay_pipeIine8;

end

end

wire[7:0]coeff18'd7;//滤波器系数

wire[7:0]coeff2=8'd5;

wire[7:0]coeff3二8'd51;

wire[7:0]coeff4=8'd135;

wire[7:0]coeff5=8,d179;

wire[7:0]coeff6二8,d135;

wire[7:0]coeff7=8'd51;

wire[7:0]coeff8=8'd5;

wire[7:0]coeff9=8'd7;

regsigned[16:0]multi_data1;〃乘积结果

regsigned[16:0]multi_data2;

regsigned[16:0]multi_data3;

regsigned[16:0]multi_data4;

regsigned[16:0]mu11i_data5;

regsigned[16:0]multi_data6;

regsigned[16:0]multi_data7;

regsigned[16:0]multi_data8;

regsigned[16:0]multi_data9;

aIways@(posedgeCLKornegedgeRSTn)begin//x(1)*h(1)

if(!RSTn)

multidatal<=17'bO;

multi_data1<=deIay_pipeIine1*coeff1;

end

aIways©(posedgeCLKornegedgeRSTn)begin//x(1)*h(1)

if(!RSTn)

multi_data2<=17'bO;

else

multi_data2<=deIay_pipeIine2*coeff2;

end

aIways@(posedgeCLKornegedgeRSTn)begin//x(1)*h(1)

if(!RSTn)

multi_data3<二171bO;

eIse

multi_data3<=deIay_pipeIine3*coeff3;

end

aIways@(posedgeCLKornegedgeRSTn)begin//x(1)*h(1)

if(!RSTn)

multidata4<=17'bO;

se

mu11i_data4<=deIay_pipeIine4*coeff4;

end

always®(posedgeCLKornegedgeRSTn)begin//x(1)*h(1)

if(!RSTn)

multi_data5<=17'bO;

eIse

multi_data5<=deIay_pipeIine5*coeff5;

end

aIways©(posedgeCLKornegedgeRSTn)begin//x(1)*h(1)

if(!RSTn)

multi_data6<=17'bO;

eIse

mu11i_data6<=deIay_pipeIine6*coeff6;

end

always©(posedgeCLKornegedgeRSTn)begin//x(1)*h(1)

if(!RSTn)

multi_data7<=17'bO;

eIse

multi_data7<=deIay_pipeIine7*coeff7;

end

aIways@(posedgeCLKornegedgeRSTn)begin//x(1)*h(1)

if(!RSTn)

multi_data8<=17'bO;

eIse

multi_data8<=deIay_pipeIine8*coeff8;

end

always@(posedgeCLKornegedgeRSTn)begin//x(1)*h(1)

if(!RSTn)

multidata?<=17'bO;

multidata?<=deIay_pipeIine9*coeff9;

end

//

//加法器

aIways@(posedgeCLKornegedgeRSTn)begin

if(!RSTn)

FIR_0UT<=18'bO;

eIse

FIR_0UT<二multi_data1+mu11i_data2+mu11i_data3+

multi_data4+muIti_data5+m

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论