已阅读5页,还剩4页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Experiment guide book of Measurement Technology & Digital Signal Processing姓名:付 伟 明 学号:SQ10058022055专业:机械电子工程上课时间:2011-32011-61、A finite-duration sequence of length L is given as ,Determine the N-point DFT of this sequence for NL using MATLAB. (L=10, N=100)Solution:代码 幅频、相频特性曲线图:x=ones(1,10); clear;Len = 10;Num = 100;for i=1:100 x(i)=2*pi*i/Num; y(i)=(1-exp(-j*x(i)*Len)/(1-exp(-j*x(i);endMag=abs(y);Ang=angle(y);subplot(2,1,1),plot(x,Mag,.-);%subplot(2,1,1),stem(w,Mag);xlabel();ylabel(Magnitude);title(Num=100);%grid on;subplot(2,1,2),plot(x,Ang,.-);%subplot(2,1,2),stem(w,Ang);xlabel();ylabel(Phase);title(Num=100);2、, Determine the 8 and 16-point DFT using MATLAB.Solution:代码clear;Len = 4; N1 = 8;N2 = 16;for i=1:8 w1(i)=2*pi*i/N1; X1(i)=(1-exp(-j*w1(i)*Len)/(1-exp(-j*w1(i);endfor k=1:16 w2(k)=2*pi*k/N2; X2(k)=(1-exp(-j*w2(k)*Len)/(1-exp(-j*w2(k);endMag1=abs(X1);Ang1=angle(X1);Mag2=abs(X2);Ang2=angle(X2);subplot(2,2,1),stem(w1,Mag1,.-);xlabel();ylabel(Magnitude);title(N=8);grid on;subplot(2,2,3),stem(w1,Ang1,.-);xlabel();ylabel(Phase);title(N=8);grid on;subplot(2,2,2),stem(w2,Mag2,.-);xlabel();ylabel(Magnitude);title(N=16);grid on;subplot(2,2,4),stem(w2,Ang2,.-);xlabel();ylabel(Phase);title(N=16);grid on;8 and 16-point DFT3、, Determine the 8, 32 and 64-point FFT using MATLAB.Solution:代码: clear; 8, 32 and 64-point FFT 相频与幅频特性:x=1 1 1 1 1 1;N1 = 8;N2 = 32;N3 = 64;for i=1:8 w1(i)=2*pi*i/N1;endfor j=1:32 w2(j)=2*pi*j/N2;endfor k=1:64 w3(k)=2*pi*k/N2;endX1=fft(x,N1);X2=fft(x,N2);X3=fft(x,N3);Mag1=abs(X1);Ang1=angle(X1);Mag2=abs(X2);Ang2=angle(X2);Mag3=abs(X3);Ang3=angle(X3);subplot(2,3,1),plot(w1,Mag1,.-);xlabel();ylabel(Magnitude);title(N=8);grid on;subplot(2,3,4),plot(w1,Ang1,.-);xlabel();ylabel(Phase);title(N=8);grid on;subplot(2,3,2),plot(w2,Mag2,.-);xlabel();ylabel(Magnitude);title(N=32);grid on;subplot(2,3,5),plot(w2,Ang2,.-);xlabel();ylabel(Phase);title(N=32);grid on;subplot(2,3,3),plot(w3,Mag3,.-);xlabel();ylabel(Magnitude);title(N=64);grid on;subplot(2,3,6),plot(w3,Ang3,.-);xlabel();ylabel(Phase);title(N=64);grid on;4、Determine a FIR lowpass filter with N=21 by rectangular and Hamming window using MATLAB. The passband edge frequency is 0.3. Solution:代码 clear;wp=0.3*pi;N=21;win1=boxcar(N+1); % rectangularwin2=hamming(N+1); % Hammingq1=fir1(N,wp/pi,win1);q2=fir1(N,wp/pi,win2);%plot(q1);h1=freqz(q1);h2=freqz(q2);mag1=abs(h1); % Magnitudemag2=abs(h2); %w=linspace(0,wp,512);subplot(2,1,1);plot(w,mag1);grid on;title(Rectanglar);xlabel(/);ylabel(Magnitude);subplot(2,1,2);plot(w,mag2);grid on;title(Hamming);xlabel(/);ylabel(Magnitude); 5、Determine a FIR lowpass filter with N=8 and 12 by rectangular window and frequency-sampling method using MATLAB. The passband edge frequency is 0.35.Solution:代码clear;wp = 0.35*pi;N1 = 8;N2 = 12;%= rectangular =win1 = boxcar(N1+1); % rectangularwin2 = boxcar(N2+1); % rectangularq1 = fir1(N1,wp/pi,win1);q2 = fir1(N2,wp/pi,win2);%plot(q1);h1 = freqz(q1);h2 = freqz(q2);mag1 = abs(h1); % Magnitudemag2 = abs(h2); %=%= frequency sampling =%=w = linspace(0,wp,512);subplot(2,1,1);plot(w,mag1);grid on;title(N = 8);xlabel(/);ylabel(Magnitude);subplot(2,1,2);plot(w,mag2);grid on;title(N = 12);xlabel(/);ylabel(Magnitude);6、Determine a FIR Chebyshew lowpass filter that the passband edge frequency is 500Hz and the stopband edge frequency is 600Hz using MATLAB. The sampling frequency is 2000Hz, its minimum passband attenuation is 3dB and minimum stopband attenuation is 40dB.Solution:代码%Windows-based %FIR filter designa = 1;F = 500 600;Fs = 2000;Rp = 3;Rs = 40;A = 1 0; Dev = (10(Rp/20)-1)/(10(Rp/20)+1) 10(-Rs/20);n,fo,ao,w = firpmord(F,A,Dev,Fs);h = firpm(n,fo,ao,w);freqz(h,a,512,Fs);7、Determine a IIR lowpass filter using MATLAB. The passband edge frequency is 1000Hz and the stopband edge frequency is 300Hz. The sampling frequency is 1000Hz, its minimum passband attenuation is 3dB and minimum stopband attenuation is 20dB.Solution:代码clear; fp = 1000;fs = 300;F_S = 10000;T = 1/F_S;Rp = 3;Rs = 20;W1p = fp/F_S*2;W1s = fs/F_S*2;N,Wn = buttord(W1p,W1s,Rp,Rs,s);b,a = butter(N,Wn);H,w =freqz(b,a,512,F_S);plot(w,abs(H);title(Butterworth Lowpass Filter, Magnitude,order=,num2str(N);8、Determine a IIR Chebyshew I lowpass filter that the passband edge frequency is 0.2rad/s and the stopband edge frequency is 0.3rad/s using MATLAB. The passband ripple is 1dB and stopband attenuation is 16dB.Solution: 代码:% Window-based IIR DF design IIR Chebyshew I lowpass filter:% Chebyshev I lowpass filter% dsired performentswp=0.2*pi;ws=0.3*
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年江西省上饶市公务员人员招聘考试参考题库与答案详解
- 2026年武威市凉州区公务员人员招聘考试参考题库与答案详解
- 2026厦门工学院工程坊实验员招聘1人考试模拟试题及答案解析
- 2026年云南省昭通市事业单位人员招聘笔试备考题库与答案详解
- 2026年郑州市金水区公务员人员招聘笔试参考试题与答案详解
- 2026年下半年华侨大学招聘项目制人员19人笔试备考试题及答案解析
- 凉山州交城建设项目管理有限责任公司公开招聘工作人员(4人)笔试备考题库及答案解析
- 苏州市吴江区农业发展集团有限公司下属公司招聘工作人员2人考试模拟试题及答案解析
- 2026年黄冈市黄州区公务员人员招聘笔试参考题库与答案详解
- 2026年安庆市郊区事业单位人员招聘笔试试题与答案详解
- 浙江省金华十校2026年11月高三模拟考试化学+答案
- 高中二年级主题班会与家长会融合课教学设计-奋斗征程中的习惯、心态与家校同行
- 2026年教师资格考试小学面试音乐试题与参考答案
- 老年病科用药安全管控指南(2026版)
- 人工智能赋能课堂教学设计方案
- QC/T 783-2026摩托车用车速传感器
- 动物疫病防治员考试题库及答案
- (2026年秋)语文人教版七年级上册知识点大全
- 2026年广西高考物理真题含答案
- 临床提高临床护理文书书写规范率品管圈
- 2026年高考全国1卷语文高考真题含答案
评论
0/150
提交评论