南理工数字信号处理matlab题库

更新时间:2023-07-07 05:49:52 阅读: 评论:0

DSP题库详解
1已知3阶椭圆IIR数字低通滤波器的性能指标为:通带截止频率0.4π,通带波纹为0.6dB,最小阻带衰减为32dB。设计一个6阶全通滤波器对其通带的群延时进行均衡。绘制低通滤波器和级联滤波器的群延时。
%Progranm 1
% Group-delay equalization of an IIR filter.
%
[n,d] = ellip(3,0.6,32,0.4);
[GdH,w] = grpdelay(n,d,512);
纸尿裤和拉拉裤的区别plot(w/pi,GdH); grid
xlabel('\omega/\pi'); ylabel('Group delay, samples');
title('Original Filter');
F = 0:0.001:0.4;
g = grpdelay(n,d,F,2);  % Equalize the passband
Gd = max(g)-g;
% Design the allpass delay equalizer
[num,den,tau] = iirgrpdelay(6, F, [0 0.4], Gd);                  %设计六阶的全通滤波器
[b,a]=iirgrpdelay(6,F,[0 0.4],Gd);
He1=dfilt.df2(b,a);
He=dfilt.df2(n,d);
He_all=dfilt.cascade(He,He1);
grpdelay(He_all)                                            %DFILT:Digital Filter Implementation.
%[GdA,w] = grpdelay(num,den,512);
%figure(2);
%plot(w/pi,GdH+GdA); grid
%xlabel('\omega/\pi');ylabel('Group delay, samples');
%title('Group Delay Equalized Filter');
2设计巴特沃兹模拟低通滤波器,其滤波器的阶数和3-dB截止频率由键盘输入,程序能根据输入的参数,绘制滤波器的增益响应。
% Program 2
% Program to Design Butterworth Analog Lowpass Filter
% Type in the filter order and passband edge frequency设计边缘频率
N = input('Type in filter order = ');
Wn = input('3-dB cutoff angular frequency = ');
% Determine the transfer function
[num,den] = butter(N,Wn,'s');                                          %计算滤波器的分子和分母
%  Compute and plot the frequency respon
[h,w]=freqz(num,den);
plot (w/pi,20*log10(abs(h)));
氨溴索怎么读
xlabel('\omega/\pi'); ylabel('Magnitude, dB');
title('The magnitude resppon of the system')
axis([0 3 -80 5])
3%%%%%%%%%%
% To u the residue
num=[1,-0.2,0.5,0,0];
den=[1,3.2,1.5,-0.8,1.4];
[r,p,k]=residue(num,den)
月经前褐色分泌物4% Program 4
% Cheby1 analog highpass filter design
%
Wp=0.75;Ws=0.35;Rs=43;Rp=0.5;
[N,Wn]=cheb1ord(Wp,Ws,Rp,Rs,'s');
% Determine the coefficients of the transfer function
[num,den]=cheby1(N,Rp,Wn,'high','s');
% Compute and plot the frequency respon
omega=[0:1:30*pi];                                              %w=0:0.01:pi;
h=freqs(num,den,omega);                          %plot(w/pi,20*log10(abs(h))) plot(omega/(2*pi),20*log10(abs(h)));
xlabel('\omega/\pi');ylabel('Magnitude,dB');
title('IIR Chebyshev1 Highpass Filter/digital')
5.
% Program to 绘制30点序列的实部与虚部
什么的脚步声%
n=0:29;
x=0.2*exp((0.4+0.5*j).*n);
subplot(1,2,1)
stem(n,real(x))
title('The real part ');
xlabel('n');ylabel('magnitude')
subplot(1,2,2)
stem(n,imag(x))
title('The imagine part')
xlabel('n');ylabel('magnitude')
6.
% Program to Design Type 1 Chebyshev analog Lowpass Filter
%
% Read in the filter order, passband edge frequency
% and passband ripple in dB
N = input('Order = ');
Wc = input('type in the 3 dB cutoff frequency=');
Rp = input(' Type in the peak ripple value in passband: ');
% Determine the coefficients of the transfer function
[num,den] = cheby1(N,Rp,Wc,'s');
% Compute and plot the frequency respon
[h,w]=freqs(num,den);
plot (w/pi,20*log10(abs(h)));
xlabel('Frequency, Hz'); ylabel('magnitude, dB');
title('IIR Chebyshev1 Lowpass Filter/analog')
grid on
7.
% Determination of the Factored Form
% of a Rational z-Transform
%熟悉命令[num,den]=residuez(r,p,k);[r,p,k]=residuez(num,den) clear all
r = [1 0.6 1.8];
p =[-3.2 2.4 2.4];
k =0.2;
[num, den] = residuez(r,p,k);
disp('Numerator polynomial coefficients'); disp(num)
disp('Denominator polynomial coefficients'); disp(den)
8,  设计IIR数字带通滤波器
% Program to Design iir digital bandpass Filter
clear all
Wp = [0.4 0.6];                                                        %Wp and Ws 都是向量组,带通的性质
Ws = [0.3 0.7];
Rp = 0.6;
Rs = 35;
[N,Wn] = buttord(Wp, Ws, Rp, Rs);
[b,a] = butter(N,Wn);                                  %巴特卧兹滤波器的分子和分母
[h,w] = freqz(b,a,256);                                %求出在频域的画图点,256,即要花的点数
gain = 20*log10(abs(h));对自己狠一点
plot (w/pi,gain);grid on
台湾键盘
xlabel('\omega/\pi'); ylabel('magnitude, dB');
title('IIR Butterworth Bandpass Filter');
前鼻音音节有哪些
9%draw the requested quence
clear
如何垃圾分类
n=0:23;
x=2*0.9.^n;
stem(n,x)
title('x[n]')
xlabel('n');ylabel('magnitude')
grid on
10%
% Program to Design Elliptic analog Lowpass Filter                  %椭圆模拟低通滤波器设计
% Read in the filter order, passband edge frequency,
% passband ripple in dB and minimum stopband
% attenuation in dB

本文发布于:2023-07-07 05:49:52,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/82/1083110.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:设计   低通滤波器   绘制   分子   椭圆   带通   数字   模拟
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图