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 * fsw = pi/4# 2 poles, 2 zeros# zeroes at r = 1r <-1z1 <- r * exp(1i* w)z2 <- r * exp(1i*-w)# poles at r = 0.9r =0.9p1 <- 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 polesr =0.8p1 <- r * exp(1i* w)p2 <- r * exp(1i*-w)zpg <- Zpg(c(z1, z2), c(p1, p2),1)zplane(zpg)freqz(zpg)