Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

zp2ss

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

Syntax

[A,B,C,D] = zp2ss(z,p,k)

Description

zp2ss converts a zero-pole-gain representation of a given system to an equivalent state-space representation.

[A,B,C,D] = zp2ss(z,p,k) finds a single input, multiple output, state-space representation

x˙=Ax+Buy=Cx+Du

given a system in factored transfer function form.

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

Column vector p specifies the pole locations, and matrix z the zero locations with as many columns as there are outputs. The gains for each numerator transfer function are in vector k. The A, B, C, and D matrices are returned in controller canonical form.

Inf values may be used as place holders in z if some columns have fewer zeros than others.

Examples

collapse all

Generate the state-space representation of a damped mass-spring system that obeys the differential equation

$$\ddot{w}+0.01\dot{w}+w=u(t).$$

The measurable quantity is the acceleration, $y=\ddot{w}$, and $u(t)$ is the driving force. In Laplace space, the system is represented by

$$Y(s)={{s^2\;U(s)}\over{s^2+0.01s+1}}.$$

The system has unit gain, a double zero at $s=0$, and two complex-conjugate poles.

z = [0 0];
p = roots([1 0.01 1])
k = 1;
p =

  -0.0050 + 1.0000i
  -0.0050 - 1.0000i

Use zp2ss to find the state-space matrices.

[A,B,C,D] = zp2ss(z,p,k)
A =

   -0.0100   -1.0000
    1.0000         0


B =

     1
     0


C =

   -0.0100   -1.0000


D =

     1

More About

collapse all

Algorithms

zp2ss, for single-input systems, groups complex pairs together into two-by-two blocks down the diagonal of the A matrix. This requires the zeros and poles to be real or complex conjugate pairs.

See Also

| | | |

Introduced before R2006a

Was this topic helpful?