Frequency Response Function
zvalues.Rd
This function evaluates a rational matrix at given (complex) arguments. If the rational matrix corresponds to a linear, dynamic filter, then this rational function is also called transfer function of the filter and the values of the function on the complex unit circle are called frequency response of the filter.
Usage
zvalues(obj, z, f, n.f, sort.frequencies, ...)
# S3 method for default
zvalues(obj, z = NULL, f = NULL, n.f = NULL, sort.frequencies = FALSE, ...)
# S3 method for polm
zvalues(obj, z = NULL, f = NULL, n.f = 5, sort.frequencies = FALSE, ...)
# S3 method for lpolm
zvalues(obj, z = NULL, f = NULL, n.f = 5, sort.frequencies = FALSE, ...)
# S3 method for lmfd
zvalues(obj, z = NULL, f = NULL, n.f = 5, sort.frequencies = FALSE, ...)
# S3 method for rmfd
zvalues(obj, z = NULL, f = NULL, n.f = 5, sort.frequencies = FALSE, ...)
# S3 method for stsp
zvalues(obj, z = NULL, f = NULL, n.f = 5, sort.frequencies = FALSE, ...)
Arguments
- obj
(rational) matrix object, i.e. a
polm
,lpolm
,lmfd
,rmfd
,stsp
object. or an object which may be coerced to a polynomial matrix withpolm(obj)
. The defaultS3
method acts as a constructor for zvalues objects: and array object andz
are supplied, corresponding to the evaluated object at the values ofz
. (Numeric or complex) vectors or matrices are coerced arrays. Iff
is supplied instead ofz
, thenz
is considered to beexp(complex(imaginary = (-2*pi)*f))
.- z
(numeric or complex) vector, points at which to evaluate the rational matrix. Theses values are stored as attribute and can be accessed through
zvalues_obj$z
.- f
(numeric) vector of frequencies. If
z = NULL
thenz
is set toz = exp(complex(imaginary = (-2*pi)*f))
. Ifz
is nonNULL
, thenf
is set tof = -Arg(z)/(2*pi)
. Theses values can be accessed throughzvalues_obj$f
.- n.f
(integer) number of frequencies. If
z = f = NULL
then a grid of frequenciesf = (0:(n.f-1))/n.f
is used (andz
is generated as explained above).- sort.frequencies
boolean, sort frequencies
- ...
optional additional parameters
Details
A zvalues
object is simply a (complex valued) 3-dimensional array of dimension \((m,n,n.f)\)
with attribute z
and class attribute c('zvalues','ratm')
.
The dimensions \((m,n,n.f)\) may also be zero, where n.f
is the length of z
.
z
and f
can be accessed through zvalues_obj$z
and zvalues_obj$z
, respectively.
If you only need the value of the matrix evaluated at one point, then use
zvalue(obj, z)
.
Examples
(vv = zvalues(1:3, z = 4:6))
#> ( 1 x 1 ) frequency response
#> z[1] [,1] z[2] [,1] z[3] [,1]
#> [1,] 1 2 3
(mm = zvalues(matrix(1:4, 2, 2), z = 1))
#> ( 2 x 2 ) frequency response
#> z[1] [,1] [,2]
#> [1,] 1 3
#> [2,] 2 4
(aa = zvalues(array(1:8, dim = c(2,2,2)), f = c(0.2, 0.8)))
#> ( 2 x 2 ) frequency response
#> z[1] [,1] [,2] z[2] [,1] [,2]
#> [1,] 1 3 5 7
#> [2,] 2 4 6 8
(ll = test_lmfd(dim = c(2,2), bpoles = 1, bzeroes = 1))
#> ( 2 x 2 ) left matrix fraction description a^(-1)(z) b(z) with degrees (p = 1, q = 1)
#> left factor a(z):
#> z^0 [,1] [,2] z^1 [,1] [,2]
#> [1,] 1 0 -0.5713466 -0.7654262
#> [2,] 0 1 -0.5666530 0.4836197
#> right factor b(z):
#> z^0 [,1] [,2] z^1 [,1] [,2]
#> [1,] -0.1517956 -0.8511016 0.4050516 0.19158946
#> [2,] 0.7227983 0.2260162 -0.4814751 -0.03886025
zvalues(ll)
#> ( 2 x 2 ) frequency response
#> z[1] [,1] [,2] z[2] [,1] [,2]
#> [1,] 2.771387+0i -4.130057+0i 0.0127468-0.482435i -0.5347017+0.1780572i
#> [2,] 1.221160+0i -1.451284+0i 0.1271643+0.369789i 0.0553169+0.3321085i
#> z[3] [,1] [,2] z[4] [,1]
#> [1,] -0.320849-1.038616i -0.6555192-0.3774208i -0.320849+1.038616i
#> [2,] 0.686564+1.743213i 0.3221108+0.8308292i 0.686564-1.743213i
#> [,2] z[5] [,1] [,2]
#> [1,] -0.6555192+0.3774208i 0.0127468+0.482435i -0.5347017-0.1780572i
#> [2,] 0.3221108-0.8308292i 0.1271643-0.369789i 0.0553169-0.3321085i