1

freqz uses an FFT-basedalgorithm to calculate the Z-transform frequency response of a digitalfilter. Specifically, the statement

[h,w] = freqz(b,a,p)

returns the p-point complex frequency response, H(ejω),of the digital filter.

H(ejω)=b(1)+b(2)e−jω+...+b(n+1)e−jωna(1)+a(2)e−jω+...+a(m+1)e−jωm

In its simplest form, freqz accepts the filtercoefficient vectors b and a,and an integer p specifying the number of pointsat which to calculate the frequency response. freqz returnsthe complex frequency response in vector h, andthe actual frequency points in vector w in rad/s.

[h,w]= freqz(b,a,n)
[h,w] = freqz(sos,n)
[h,w] = freqz(d,n)
[h,w]= freqz(___,n,'whole')

[h,f]= freqz(___,n,fs)
[h,f]= freqz(___,n,'whole',fs)

h = freqz(___,w)
h = freqz(___,f,fs)

freqz(___)

Description

example

[h,w]= freqz(b,a,n) returnsthe n-point frequency response vector, h, and the corresponding angularfrequency vector, w, forthe digital filter with numerator and denominator polynomial coefficientsstored in b and a, respectively.

example

[h,w] = freqz(sos,n) returnsthe n-point complex frequency response correspondingto the second-order sections matrix, sos.

example

[h,w] = freqz(d,n) returnsthe n-point complex frequency response for thedigital filter, d.

[h,w]= freqz(___,n,'whole') returnsthe frequency response at n sample points aroundthe entire unit circle.

[h,f]= freqz(___,n,fs) returnsthe frequency response vector, h,and the corresponding physical frequency vector, f, for the digital filter with numeratorand denominator polynomial coefficients stored in b and a,respectively, given the sampling frequency, fs.

[h,f]= freqz(___,n,'whole',fs) returnsthe frequency at n points ranging between 0 and fs.

h = freqz(___,w) returnsthe frequency response vector, h, at the normalizedfrequencies supplied in w.

h = freqz(___,f,fs) returnsthe frequency response vector, h, at the physicalfrequencies supplied in f.

example

freqz(___) withno output arguments plots the frequency response of the filter.

Note:   If the input to freqz issingle precision, the frequency response is calculated using single-precisionarithmetic. The output, h, is single precision.

2

FREQZ 是计算数字滤波器的频率响应的函数

[H,W] = FREQZ(B,A,N) returns the N-point complex frequency response

vector H and the N-point frequency vector W in radians/sample of

the filter:

函数的输出:a.滤波器的频率响应H(N点)  b.频率向量W(N点,且单位为弧度)

其中,滤波器形式如下:

given numerator and denominator coefficients in vectors B and A. The

frequency response is evaluated at N points equally spaced around the

upper half of the unit circle. If N isn't specified, it defaults to    512.

滤波器的系数:

分子为B,分母为A

频率向量W,是均匀分布在滤波器的上半区,即:0:pi,这些点上的频率响应都将通过此函数计算出来。

举例:

假设滤波器的系数A=1,B=【1 1/2 1/3 1/4】;通过FREQZ函数便可以得到此滤波器的频率特性

其中,需要考察的是H和W的长度,看是否符合我们设置的N。

[H,W] = FREQZ(B,A,N,'whole') uses N points around the whole unit circle.

函数给出了滤波器的双边频率特性,是N点的

H = FREQZ(B,A,W) returns the frequency response at frequencies

designated in vector W, in radians/sample (normally between 0 and pi).

函数的输出依然是滤波器的频率响应H,只不过这个H是限定了范围的,不再是全频率(0:pi)上的了,这个范围由W来指定,单位是弧度。

举例:W=【0.5pi----pi】,下图中,红线部分便是此函数的输出,可见,只描述了【0.5pi----pi】之间的频率响应。

[H,F] = FREQZ(B,A,N,Fs) and [H,F] = FREQZ(B,A,N,'whole',Fs) return

frequency vector F (in Hz), where Fs is the sampling frequency (in Hz).

注意下图的横坐标与程序中fs的关系

H = FREQZ(B,A,F,Fs) returns the complex frequency response at the

frequencies designated in vector F (in Hz), where Fs is the sampling

frequency (in Hz).

FREQZ(B,A,...) with no output arguments plots the magnitude and

unwrapped phase of the filter in the current figure window.

3

MATLAB提供了专门用于求离散系统频响特性的函数freqz(),调用freqz()的格式有以下两种:

(1)[H,w]=freqz(B,A,N)

(2)[H,w]=freqz(B,A,N,’whole’)

(1)中B和A分别为离散系统的系统函数分子、分母多项式的系数向量,返回量H则包含了离散系统频响在0~pi范围内N个频率等分点的值(其中N为正整数),w则包含了范围内N个频率等分点。调用默认的N时,其值是512。

(2)中调用格式将计算离散系统在0~pi范内的N个频率等分店的频率响应的值。

因此,可以先调用freqz()函数计算系统的频率响应,然后利用abs()和angle()函数及plot()函数,即可绘制出系统在或 范围内的频响曲线。

绘制如下系统的频响曲线

H(z)=(z-0.5)/z

MATLAB命令如下:

B=[1-0.5];

A =[10];

[H,w]=freqz(B,A,400,'whole');

Hf=abs(H);

Hx=angle(H);

clf

figure(1)

plot(w,Hf)

title('离散系统幅频特性曲线')

figure(2)

plot(w,Hx)

title('离散系统相频特性曲线')

matlab计算数字滤波器的幅频响应相关推荐

  1. 数字滤波器的幅频响应

    幅频特性就是指系统频率响应的幅度随频率变化的曲线,幅度大的地方对应通带,也就是对应频率成分通过系统有较小衰减,幅 度小的地方对应阻带,也就是对应频率成分通过系统有较大衰减, 理想滤波器是分段常数型的, ...

  2. 幅频响应 matlab画法,matlab绘制数字滤波器的幅频响应曲线

    FREQZ 是计算数字滤波器的频率响应的函数    [H,W] = FREQZ(B,A,N) 可以先调用freqz()函数计算系统的频率响应,然后利用abs()和angle()函数及plot()函数, ...

  3. 【STM32F407的DSP教程】第28章 FFT和IFFT的Matlab实现(幅频响应和相频响应)

    完整版教程下载地址:http://www.armbbs.cn/forum.php?mod=viewthread&tid=94547 第28章       FFT和IFFT的Matlab实现(幅 ...

  4. 画出该lti系统的幅频特性响应曲线_一文带你通俗理解幅频响应和相频响应

    ​引言 好多人学习数字信号处理学了很久都没有明白这两个概念的真实含义,或者说很多人在设计滤波器的时候,根本就没有考虑什么是幅频响应和相频响应.只是一昧地把滤波器设计出来然后把不要的频率滤除掉,这样是要 ...

  5. MATLAB——IIR数字滤波器的设计

    1.基础知识 1.1.数字滤波器设计的基本步骤 我们知道模拟滤波器的设计是数字滤波器的设计的基础.在学习数字信号处理的过程中,IIR数字滤波器的设计的步骤是 (1)确定采样间隔Ts或者采样频率fs. ...

  6. 带通 带阻滤波器 幅频响应_一文带你通俗理解幅频响应和相频响应

    引言 好多人学习数字信号处理学了很久都没有明白这两个概念的真实含义,或者说很多人在设计滤波器的时候,根本就没有考虑什么是幅频响应和相频响应.只是一昧地把滤波器设计出来然后把不要的频率滤除掉,这样是要吃 ...

  7. 带通 带阻滤波器 幅频响应_微波介质陶瓷滤波器简介

    一直想写一篇介绍微波介质陶瓷的文章,却发现每每难以面面俱到,也许只有从滤波器基础知识入手,才能更好的了解它吧. 本文从网络上搜索汇总了滤波器.陶瓷滤波器.微波滤波器.介质滤波器的基本知识,希望能让大家 ...

  8. matlab设计长度为50的滤波器,实验5 基于Matlab的数字滤波器设计

    实验五 基于Matlab 的数字滤波器设计 实验目的:加深对数字滤波器的常用指标和设计过程的理解. 实验原理:低通滤波器的常用指标如下所述,其典型规格如下: ?? ????????≤≤≤≤+≤≤-πδ ...

  9. 5.2 FIR滤波器的卷积(脉冲响应、频率响应,幅频响应,暂态-搞不清楚的有救了啊)

    -5.2 FIR滤波器的卷积 如果将抽头系数的个数用M表示:卷积公式如下: 上述困扰大多大学生的卷积公式如何理解呢? h(k)就是滤波器的信道系数,x(n-k)是所谓经过延迟k个器件后的数据. 这句话 ...

最新文章

  1. 接Window服务(二)
  2. 深入浅出SharePoint2013——获取Application Pool的id和name对照表
  3. 是不是用博客园编辑器插入修改图片好困难?怀念Word吧,看看用Word2010发博客教程吧~...
  4. 312. Burst Balloons 戳气球
  5. Vue + Nodejs + Express 解决跨域的问题
  6. 数据结构-二叉树层次遍历
  7. 不刷新改变URL: pushState + Ajax
  8. 中教云教师备课云平台获北京市新技术新产品(服务)认定
  9. PSD分层电商促销模板|换季大促销,不怕老板催你做海报了
  10. laravel5.6 邮件队列database驱动简单demo
  11. HQL (五) 外置命名查询(sql语句单独保存起来)
  12. arc科学计算机在线应用使用,ArcMap字段计算器(Field Calculator)的妙用
  13. 剑指 Offer 06. 从尾到头打印链表-力扣
  14. java中String类和StringBuffer类实例详解
  15. 【系列二之图像处理系列】波形处理(3)
  16. 工艺仿真Process Simulate新亮点
  17. 茶饮门店如何通过企业微信做好用户运营
  18. 如何将win7电脑变身WIFI热点,让手机、笔记本共享上网?
  19. 电脑默认字体如何进行替换教学
  20. Emerging Threats rules suricata规则功能介绍

热门文章

  1. 如果在CSDN博文编辑状态下获得博文最终网络链接?
  2. php $this self,php this self 用法与区别
  3. linux的sort如何对时间排序,Linux中用Sort和Tsort对文件进行排序
  4. go 基准测试 找不到函数_Go 中的内联优化 | Linux 中国
  5. c语言节点导入数据编程,编程小白。用C语言计算SR E2E ARQ模式下节点的数据分析...
  6. mysql进程内存不足_故障排除指南:MySQL的运行内存不足怎么办?
  7. 不同品牌android手机ui,各大安卓手机品牌里,系统UI设计对比,谁赢了?
  8. mysql session 最大值_session 存储最大值
  9. linux tomcat7怎么安装,centos7安装Tomcat7,
  10. python怎么输出结果_如何在python中打印SQLite查询的结果?