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.

ss

Convert digital filter to state-space representation

Syntax

Description

example

[A,B,C,D] = ss(d) converts a digital filter, d, to its state-space representation.

The state-space representation of a filter is given by

x(k+1)=Ax(k)+Bu(k),y(k)=Cx(k)+Du(k),

where x is the state vector, u is the input vector, and y is the output vector.

Examples

collapse all

Design a lowpass IIR filter of order 6. Specify a normalized passband frequency of $0.2\pi$ rad/sample. Compute the state-space representation of the filter.

d = designfilt('lowpassiir','FilterOrder',6,'PassbandFrequency',0.2);
[A,B,C,D] = ss(d)
A =

    1.5640   -0.9294         0         0         0         0
    1.0000         0         0         0         0         0
    0.1795    0.0036    1.6097   -0.8112         0         0
         0         0    1.0000         0         0         0
    0.0020    0.0000    0.0408    0.0021    1.6956   -0.7409
         0         0         0         0    1.0000         0


B =

    0.0913
         0
    0.0046
         0
    0.0001
         0


C =

    0.0020    0.0000    0.0408    0.0021    3.6956    0.2591


D =

   5.2030e-05

Input Arguments

collapse all

Digital filter, specified as a digitalFilter object. Use designfilt to generate a digital filter based on frequency-response specifications.

Example: d = designfilt('lowpassiir','FilterOrder',3,'HalfPowerFrequency',0.5) specifies a third-order Butterworth filter with normalized 3-dB frequency 0.5π rad/sample.

Output Arguments

collapse all

State matrix, returned as a matrix.

Data Types: double

Input-to-state matrix, returned as a matrix.

Data Types: double

State-to-output matrix, returned as a matrix.

Data Types: double

Feedthrough matrix, returned as a matrix.

Data Types: double

See Also

| | |

Introduced in R2014a

Was this topic helpful?