代码:

%% ------------------------------------------------------------------------
%% Output Info about this m-file
fprintf('\n***********************************************************\n');
fprintf(' <DSP using MATLAB> Problem 8.12 \n\n'); banner();
%% ------------------------------------------------------------------------ Wp = 500; Ws = 2000; Rp = 0.25; As = 50;
Fp = Wp/(2*pi);
Fs = Ws/(2*pi); Ripple = 10 ^ (-Rp/20)
Attn = 10 ^ (-As/20) % Analog filter design:
[b, a] = afd('butter', Fp, Fs, Rp, As);
%[b, a] = afd_butt(Wp, Ws, Rp, As); % Calculation of second-order sections:
[C, B, A] = sdir2cas(b, a); % Calculation of Frequency Response:
[db, mag, pha, ww] = freqs_m(b, a, 2500); % Calculation of Impulse Response:
[ha, x, t] = impulse(b, a); %% -------------------------------------------------
%% Plot
%% ------------------------------------------------- figure('NumberTitle', 'off', 'Name', 'Problem 8.12 Analog Butterworth lowpass')
set(gcf,'Color','white');
M = 1.0; % Omega max subplot(2,2,1); plot(ww, mag); grid on; axis([-2100, 2100, 0, 1.2]);
xlabel(' Analog frequency in rad/sec units'); ylabel('|H|'); title('Magnitude in Absolute');
set(gca, 'XTickMode', 'manual', 'XTick', [-500, 0, 500, 2000]);
set(gca, 'YTickMode', 'manual', 'YTick', [0, 0.003, 0.97, 1]); subplot(2,2,2); plot(ww, db); grid on; %axis([0, M, -50, 10]);
xlabel('Analog frequency in rad/sec units'); ylabel('Decibels'); title('Magnitude in dB ');
set(gca, 'XTickMode', 'manual', 'XTick', [-500, 0, 500, 2000]);
set(gca, 'YTickMode', 'manual', 'YTick', [-50, -1, 0]);
set(gca,'YTickLabelMode','manual','YTickLabel',['50';' 1';' 0']); subplot(2,2,3); plot(ww, pha/pi); grid on; axis([-2100, 2100, -1.2, 1.2]);
xlabel('Analog frequency in rad/sec nuits'); ylabel('radians'); title('Phase Response');
set(gca, 'XTickMode', 'manual', 'XTick', [-500, 0, 500, 2000]);
set(gca, 'YTickMode', 'manual', 'YTick', [-1:0.5:1]); subplot(2,2,4); plot(t, ha); grid on; %axis([0, 30, -0.05, 0.25]);
xlabel('time in seconds'); ylabel('ha(t)'); title('Impulse Response');

  运行结果:

通带ripple和阻带衰减,将题中的dB单位转换为以绝对值为单位。

非归一化模拟Butterworth低通滤波器,直接形式(有理函数)的系数,

将H(s)转换成串联形式,即一系列二阶子滤波器的乘积形式

模拟滤波器的幅度谱、相位谱和脉冲响应序列。

最新文章

  1. sessionid如何产生?由谁产生?保存在哪里?
  2. Android Studio :enable vt-x in your bios security,已经打开还是报错的解决方法
  3. r-cnn学习(四):train_faster_rcnn_alt_opt.py源码学习
  4. 原生js完成拼图小游戏
  5. Python开发入门与实战13-基于模板的界面
  6. Flex各类型坐标转换(全局、本地、内容坐标间转换)
  7. 用Access作为后台数据库支撑,书写一个用C#写入记录的案例
  8. spring mvc 传参数
  9. JQuery blockUI
  10. HTML textarea输入框限制长度 (引)
  11. softlayer
  12. class A&lt;T&gt;where T
  13. iSlider手机平台JS滑动组件
  14. CentOS rc.local 不执行的问题
  15. 黄聪:Microsoft Enterprise Library 5.0 系列教程(十) Configuration Application Block
  16. HttpActionDescriptor,ASP.NET Web API又一个重要的描述对象
  17. dp资源分配问题
  18. C/C++中__builtin_popcount()的使用及原理
  19. 安装Docker和配置加速器(二)
  20. jsp无法访问

热门文章

  1. windows下怎么给ubantu虚拟机全屏的处理
  2. Git 获取项目git clone
  3. css----7渐变
  4. Altera FPGA&ndash; Bit Slip
  5. VC++ MFC文件的移动复制删除更名遍历操作
  6. duilib教程之duilib入门简明教程14.部分bug 2
  7. Delphi编写后台监控软件
  8. java接口的意义,为什么接口可以多继承,而类不可以?
  9. CSS 常用的兼容性调试技巧
  10. Spring 事务传播行为(12)