Zpg function

Zero pole gain model

Zero pole gain model

Create an zero pole gain model of an ARMA filter, or convert other forms to a Zpg model.

Zpg(z, p, g) as.Zpg(x, ...) ## S3 method for class 'Arma' as.Zpg(x, ...) ## S3 method for class 'Ma' as.Zpg(x, ...) ## S3 method for class 'Sos' as.Zpg(x, ...) ## S3 method for class 'Zpg' as.Zpg(x, ...)

Arguments

  • z: complex vector of the zeros of the model.
  • p: complex vector of the poles of the model.
  • g: overall gain of the model.
  • x: model to be converted.
  • ...: additional arguments (ignored).

Returns

A list of class Zpg with the following list elements:

  • z: complex vector of the zeros of the model
  • p: complex vector of the poles of the model
  • g: gain of the model

Details

as.Zpg converts from other forms, including Arma and Ma.

Examples

## design notch filter at pi/4 radians = 0.5/4 = 0.125 * fs w = pi/4 # 2 poles, 2 zeros # zeroes at r = 1 r <- 1 z1 <- r * exp(1i * w) z2 <- r * exp(1i * -w) # poles at r = 0.9 r = 0.9 p1 <- r * exp(1i * w) p2 <- r * exp(1i * -w) zpg <- Zpg(c(z1, z2), c(p1, p2), 1) zplane(zpg) freqz(zpg) ## Sharper edges: increase distance between zeros and poles r = 0.8 p1 <- r * exp(1i * w) p2 <- r * exp(1i * -w) zpg <- Zpg(c(z1, z2), c(p1, p2), 1) zplane(zpg) freqz(zpg)

See Also

See also Arma

Author(s)

Tom Short, tshort@eprisolutions.com ,

adapted by Geert van Boxtel, gjmvanboxtel@gmail.com .

  • Maintainer: Geert van Boxtel
  • License: GPL-3
  • Last published: 2024-09-11