Learn R Programming

TDD (version 0.4)

ButterPZ: Calculate Butterworth Filter Poles and Zeros

Description

Calculates continuous poles and zeros (of the Laplace transform) of Butterworth filters.

Usage

ButterPZ(fl = NaN, nl = NaN, fh = NaN, nh = NaN, g = 1)

Arguments

fl
Low corner frequency (Hz)
nl
Order of high-pass filter
fh
High corner frequency (Hz)
nh
Order of low-pass filter
g
gain (unitless)

Value

poles
Vector of poles (rad/s)
zeros
Vector of zeros (rad/s)
np
Number of poles
nz
Number of zeros
Knorm
Normalization constant
Sense
Sensitivity (V * s/m)

Details

For a bandpass filter, all inputs should be non-NaN. For high pass, fh and nh should be NaN; for low pass, fl and nl should be NaN. Input corner frequencies are in cycles/second, not radians/second.

Examples

Run this code
# Calculate poles and zeros of Butterworth filter with a second-order
# high-pass above 1 Hz, and a fourth-order low-pass below 10 Hz
ButterPZ(1, 2, 10, 4) 

Run the code above in your browser using DataLab