Discrete State Space

Description of the Discrete State Space component in Schematic Editor, which implements a discrete state-space system where coefficient matrices can be specified in either the Z-domain or S-domain.

Component Icon

Figure 1. Discrete State Space icon

Description

The Discrete State Space component implements a discrete state-space system where coefficient matrices can be specified in either the Z-domain or S-domain.

Continuous state space (S-domain) implements a system described by the following:

x ' = A x + B u

y = C x + D u

x t 0 = x 0

where:

  • x is a state vector, dimensions n × 1
  • u is an input vector, dimensions m × 1
  • y is the output vector, dimensions r × 1
  • A is an n × n matrix, where n is the number of states
  • B is an n × m matrix, where m is the number of inputs
  • C is an r × n matrix, where r is the number of outputs
  • D is an r × m matrix

By transformation of continuous differential equations into discrete difference equations we have a system described by the following:

x [ k + 1 ] = A d x [ k ] + B d u [ k ]

y [ k ] = C d x [ k ] + D d u [ k ]

The discrete state space is obtained from the continuous state space by discretization of coefficient matrices, with one of the following methods:

  • Euler method

Calculates an approximate discrete model, based on the appoximation for small timesteps.

s =   1 T ( z - 1 )

A d = I + T A

B d = T B

C d = C

D d = D

  • Backward differencing method

s =   1 T ( 1 -   z - 1 )

A d = ( I - T A ) - 1

B d = T ( I - T A ) - 1 B

C d = C ( I - T A ) - 1

D d = D + ( I - T A ) - 1 B T

  • Bilinear method

A method which yields the best frequency-domain match between continuous and discrete systems.The bilinear method is useful if your system has important dynamics that you want to preserve.

s =   2 T z - 1 z + 1

A d = ( I + A T 2 ) ( I - A T 2 ) - 1

B d = ( I - A T 2 ) - 1 B T

C d = T C ( I - A T 2 ) - 1

D d = D + C ( I - A T 2 ) - 1 B T 2

  • Zero-hold method

This method provides an exact match between the continuous- and discrete-time systems in the time domain for staircase inputs. The method assumes zero-order hold for the input u , where T is the sample time:

A d =   L - 1 { ( S I - A ) - 1 } t - T

B d = A - 1 ( A d - I ) B

C d = C

D d = D

Ports

  • Input (in)
    • Input signal.
      • Supported types: uint, int, and real.
      • Vector support: yes.
      • The width equals the number of columns in the B and D matrices.
  • Output (out)
    • The derivative of the input signal.
      • Supported types: uint, int, and real.
      • Vector support: yes.
        • The vector length is inherited from the input signal.
      • The width equals the number of rows in the C and D matrices.

Properties

  • Coefficients domain
    • Select either the S-domain or the Z-domain of coefficient matrices.
  • Discretization method
    • Select the discretization method of the component if the S-domain is chosen. The available options are: Euler, Backward differencing, Bilinear, or Zero-order hold method.
  • A matrix
    • Specify the n × n matrix , where n is the number of states .
  • B matrix
    • Specify the n × m matrix , where n is the number of states and m is the number of inputs.
  • C matrix
    • Specify the r × n matrix , where r is the number of outputs and n is the number of states.
  • D matrix
    • Specify the r × m matrix , where r is the number of outputs and m is the number of inputs.
  • Execution rate
    • Type in the desired signal processing execution rate. This value must be compatible with other signal processing components of the same circuit: the value must be a multiple of the fastest execution rate in the circuit. There can be up to four different execution rates, but they must all be multiple of the basic simulation timestep. To specify the execution rate, you can use either decimal (e.g. 0.001) or exponential values (e.g. 1e-3) in seconds. Alternatively, you can type in ‘inherit’ in which case the component will be assigned execution rate based on the execution rate of the components it is receiving input from.

References

[1] Åström, K.J. and B. Wittenmark,® Computer-Controlled Systems: Theory and Design, Prentice-Hall, 1990, pp. 48-52.

[2] Franklin, G.F., Powell, D.J., and Workman, M.L.,® Digital Control of Dynamic Systems (3rd Edition), , Prentice-Hall, 1997

[3] T. Laakso, V. Valimaki, "Splitting the Unit Delay",® IEEE Signal Processing Magazine, Vol. 13, No. 1, p.30-60, 1996.