Main Content

ss2zp

Convert state-space filter parameters to zero-pole-gain form

Description

example

[z,p,k] = ss2zp(A,B,C,D) converts a state-space representation

x˙=Ax+Buy=Cx+Du

of a given continuous-time or discrete-time system to an equivalent zero-pole-gain representation

H(s)=Z(s)P(s)=k(sz1)(sz2)(szn)(sp1)(sp2)(spn)

whose zeros, poles, and gains represent the transfer function in factored form.

[z,p,k] = ss2zp(A,B,C,D,ni) indicates that the system has multiple inputs and that the nith input has been excited by a unit impulse.

Examples

collapse all

Consider a discrete-time system defined by the transfer function

H(z)=2+3z-11+0.4z-1+z-2.

Determine its zeros, poles, and gain directly from the transfer function. Pad the numerator with zeros so it has the same length as the denominator.

b = [2 3 0];
a = [1 0.4 1];
[z,p,k] = tf2zp(b,a)
z = 2×1

         0
   -1.5000

p = 2×1 complex

  -0.2000 + 0.9798i
  -0.2000 - 0.9798i

k = 2

Express the system in state-space form and determine the zeros, poles, and gain using ss2zp.

[A,B,C,D] = tf2ss(b,a);
[z,p,k] = ss2zp(A,B,C,D,1)
z = 2×1

   -1.5000
   -0.0000

p = 2×1 complex

  -0.2000 + 0.9798i
  -0.2000 - 0.9798i

k = 2

Input Arguments

collapse all

State matrix. If the system has r inputs and q outputs and is described by n state variables, then A is n-by-n.

Data Types: single | double

Input-to-state matrix. If the system has r inputs and q outputs and is described by n state variables, then B is n-by-r.

Data Types: single | double

Input-to-state matrix. If the system has r inputs and q outputs and is described by n state variables, then C is q-by-n.

Data Types: single | double

Feedthrough matrix. If the system has r inputs and q outputs and is described by n state variables, then D is q-by-r.

Data Types: single | double

Input index, specified as an integer scalar. If the system has r inputs, use ss2zp with a trailing argument ni = 1, …, r to compute the response to a unit impulse applied to the nith input. Specifying this argument causes ss2zp to use the nith columns of B and D.

Data Types: single | double

Output Arguments

collapse all

Zeros of the system, returned as a matrix. z contains the numerator zeros in its columns. z has as many columns as there are outputs (rows in C).

Poles of the system, returned as a column vector. p contains the pole locations of the denominator coefficients of the transfer function.

Gains of the system, returned as a column vector. k contains the gains for each numerator transfer function.

Algorithms

ss2zp finds the poles from the eigenvalues of the A array. The zeros are the finite solutions to a generalized eigenvalue problem:

z = eig([A B;C D],diag([ones(1,n) 0]);

In many situations, this algorithm produces spurious large, but finite, zeros. ss2zp interprets these large zeros as infinite.

ss2zp finds the gains by solving for the first nonzero Markov parameters.

References

[1] Laub, A. J., and B. C. Moore. "Calculation of Transmission Zeros Using QZ Techniques." Automatica. Vol. 14, 1978, p. 557.

Extended Capabilities

Version History

Introduced before R2006a

See Also

| | | | |