Zero-phase response of digital filter (2024)

Zero-phase response of digital filter

collapse all in page

Syntax

[Hr,w] = zerophase(b,a)

[Hr,w] = zerophase(sos)

[Hr,w] = zerophase(d)

[Hr,w] = zerophase(___,nfft)

[Hr,w] = zerophase(___,nfft,"whole")

[Hr,f] = zerophase(___,fs)

[Hr,f] = zerophase(___,"whole",fs)

Hr = zerophase(___,w)

Hr = zerophase(___,f,fs)

[Hr,w,phi] = zerophase(___)

zerophase(___)

Description

example

[Hr,w] = zerophase(b,a) returns the zero-phase response Hr and the angular frequencies w at which the zero-phase response is computed, given a filter defined by numerator coefficients b and denominator coefficients a. The function evaluates the zero-phase response at 512 equally spaced points on the upper half of the unit circle.

[Hr,w] = zerophase(sos) returns the zero-phase response for the second order sections matrix sos.

example

[Hr,w] = zerophase(d) returns the zero-phase response for the digital filter d. Use designfilt to generate d based on frequency-response specifications.

example

[Hr,w] = zerophase(___,nfft) uses nfft frequency points on the upper half of the unit circle to compute the zero-phase response. You can use an input combination from any of the previous syntaxes.

example

[Hr,w] = zerophase(___,nfft,"whole") uses nfft frequency points around the whole unit circle to compute the zero-phase response.

example

[Hr,f] = zerophase(___,fs) uses the sample rate fs to determine the frequencies f at which the zero-phase response is computed.

Hr = zerophase(___,w) returns the zero-phase response Hr evaluated at the angular frequencies specified in w.

Hr = zerophase(___,f,fs) returns the zero-phase response Hr evaluated at the frequencies specified in f.

[Hr,w,phi] = zerophase(___) returns the zero-phase response Hr, angular frequencies w, and continuous phase component phi.

zerophase(___) plots the zero-phase response versus frequency. If you input the filter coefficients or second order sections matrix, the function plots in the current figure window.

Note

If the input to zerophase is single precision, the function calculates the zero-phase response using single-precision arithmetic. The output Hr is single precision.

Examples

collapse all

Zero-Phase Response of FIR Filter

Open Live Script

Use designfilt to design a 54th-order FIR filter with a normalized cutoff frequency of 0.3π rad/sample, a passband ripple of 0.7 dB, and a stopband attenuation of 42 dB. Use the method of constrained least squares. Display the zero-phase response.

Nf = 54;Fc = 0.3;Ap = 0.7;As = 42;d = designfilt("lowpassfir",FilterOrder=Nf,CutoffFrequency=Fc, ... PassbandRipple=Ap,StopbandAttenuation=As,DesignMethod="cls");zerophase(d)

Zero-phase response of digital filter (1)

Design the same filter using fircls1, which uses linear units to measure the ripple and attenuation. Display the zero-phase response.

pAp = 10^(Ap/40); Apl = (pAp-1)/(pAp+1);pAs = 10^(As/20);Asl = 1/pAs;b = fircls1(Nf,Fc,Apl,Asl);zerophase(b)

Zero-phase response of digital filter (2)

Zero-Phase Response of Elliptic Filter

Open Live Script

Design a 10th-order elliptic lowpass IIR filter with a normalized passband frequency of 0.4π rad/sample, a passband ripple of 0.5 dB, and a stopband attenuation of 20 dB. Display the zero-phase response of the filter on 512 frequency points around the whole unit circle.

d = designfilt("lowpassiir",FilterOrder=10,PassbandFrequency=0.4, ... PassbandRipple=0.5,StopbandAttenuation=20,DesignMethod="ellip");zerophase(d,512,"whole")

Zero-phase response of digital filter (3)

Create the same filter using ellip. Plot its zero-phase response.

[b,a] = ellip(10,0.5,20,0.4);zerophase(b,a,512,"whole")

Zero-phase response of digital filter (4)

Input Arguments

collapse all

b, aFilter coefficients
vectors

Filter coefficients, specified as vectors. For FIR filters where a=1, you can omit the value a from the command.

Data Types: single | double

sosSecond order sections
k-by-6 matrix

Second order sections, specified as a k-by-6 matrix where the number of sections k must be greater than or equal to 2. If the number of sections is less than 2, the function considers the input to be the numerator vector b. Each row of sos corresponds to the coefficients of a second order (biquad) filter. The ith row of the sos matrix corresponds to [bi(1) bi(2) bi(3) ai(1) ai(2) ai(3)].

Data Types: single | double

dDigital filter
digitalFilter object

Digital filter, specified as a digitalFilter object.

nfftNumber of frequency points
512 (default) | positive integer scalar

Number of frequency points used to compute the zero-phase response, specified as a positive integer scalar. For best results, set nfft to a value greater than the filter order.

Data Types: double

wAngular frequencies
vector

Angular frequencies at which the zero-phase response is computed, specified as a vector and expressed in radians/sample. w must have at least two elements.

Data Types: double

fFrequencies
vector

Frequencies at which the zero-phase response is computed, specified as a vector and expressed in hertz. f must have at least two elements.

Data Types: double

fsSample rate
positive scalar

Sample rate, specified as a positive scalar.

Data Types: double

Output Arguments

collapse all

Hr — Zero-phase response
vector

Zero-phase response, returned as a vector.

The zero-phase response, Hr(ω), is related to the frequency response, H(e), by

H(ejω)=Hr(ω)ejφ(ω),

where φ(ω) is the continuous phase.

Note

The zero-phase response is always real, but it is not the equivalent of the magnitude response. The former can be negative while the latter cannot be negative.

w — Angular frequencies
vector

Angular frequencies at which the zero-phase response is computed, returned as a vector.

f — Frequencies
vector

Frequencies at which the zero-phase response is computed, returned as a vector.

phi — Continuous phase component
vector

Continuous phase component, returned as a vector. This quantity is not equivalent to the phase response of the filter when the zero-phase response is negative.

References

[1] Antoniou, Andreas. Digital Filters. New York: McGraw-Hill, Inc., 1993.

Version History

Introduced before R2006a

See Also

Apps

  • Filter Analyzer | Filter Designer

Functions

  • designfilt | digitalFilter | freqs | freqz | grpdelay | invfreqz | phasedelay | phasez

MATLAB 命令

您点击的链接对应于以下 MATLAB 命令:

 

请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。

Zero-phase response of digital filter (5)

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list:

Americas

Europe

Asia Pacific

Contact your local office

Zero-phase response of digital filter (2024)

References

Top Articles
A deep learning framework for automated and generalized synaptic event analysis
For the small signal model of the forward-biased pn junction, shown in Figure 10.15, RS=5 Ω, rd=10 Ω, Cd=110 pF at ID F of 1 mA. Use MATLAB to plot the equivalent input impedance (magnitude and phase) for frequencies from 10^4 to 10^10  Hz. | Numerade
Katie Pavlich Bikini Photos
Pga Scores Cbs
50 Meowbahh Fun Facts: Net Worth, Age, Birthday, Face Reveal, YouTube Earnings, Girlfriend, Doxxed, Discord, Fanart, TikTok, Instagram, Etc
Costco in Hawthorne (14501 Hindry Ave)
Deshret's Spirit
Tv Schedule Today No Cable
Bubbles Hair Salon Woodbridge Va
Robot or human?
Walgreens On Nacogdoches And O'connor
Craigslist Chautauqua Ny
Superhot Unblocked Games
Summoners War Update Notes
Job Shop Hearthside Schedule
Games Like Mythic Manor
Vanessa West Tripod Jeffrey Dahmer
Velocity. The Revolutionary Way to Measure in Scrum
Loves Employee Pay Stub
Recap: Noah Syndergaard earns his first L.A. win as Dodgers sweep Cardinals
Caledonia - a simple love song to Scotland
1989 Chevy Caprice For Sale Craigslist
Cbssports Rankings
How To Tighten Lug Nuts Properly (Torque Specs) | TireGrades
Albert Einstein Sdn 2023
Page 2383 – Christianity Today
Weathervane Broken Monorail
11526 Lake Ave Cleveland Oh 44102
Anesthesia Simstat Answers
Tu Housing Portal
Otis Inmate Locator
Kempsville Recreation Center Pool Schedule
Helloid Worthington Login
Que Si Que Si Que No Que No Lyrics
Song That Goes Yeah Yeah Yeah Yeah Sounds Like Mgmt
24 slang words teens and Gen Zers are using in 2020, and what they really mean
Upstate Ny Craigslist Pets
Orangetheory Northville Michigan
Craigslist Jobs Brownsville Tx
Barber Gym Quantico Hours
Metro Pcs Forest City Iowa
Hireright Applicant Center Login
RECAP: Resilient Football rallies to claim rollercoaster 24-21 victory over Clarion - Shippensburg University Athletics
boston furniture "patio" - craigslist
Hampton In And Suites Near Me
Syrie Funeral Home Obituary
Tanger Outlets Sevierville Directory Map
Sam's Club Fountain Valley Gas Prices
Is Chanel West Coast Pregnant Due Date
Besoldungstabellen | Niedersächsisches Landesamt für Bezüge und Versorgung (NLBV)
Bones And All Showtimes Near Emagine Canton
Skybird_06
Latest Posts
Article information

Author: Wyatt Volkman LLD

Last Updated:

Views: 5317

Rating: 4.6 / 5 (46 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Wyatt Volkman LLD

Birthday: 1992-02-16

Address: Suite 851 78549 Lubowitz Well, Wardside, TX 98080-8615

Phone: +67618977178100

Job: Manufacturing Director

Hobby: Running, Mountaineering, Inline skating, Writing, Baton twirling, Computer programming, Stone skipping

Introduction: My name is Wyatt Volkman LLD, I am a handsome, rich, comfortable, lively, zealous, graceful, gifted person who loves writing and wants to share my knowledge and understanding with you.