functiontoDiscreteStateSpace

Transform a DiscreteZerosAndPoles object into a DiscreteStateSpace object

Information

Syntax

dss = DiscreteZerosAndPoles.ConversiontoDiscreteStateSpace(dzp)

Description

This function transforms a discrete zeros-poles-gain system representation into the corresponding discrete state space representation. To achieve well numerical condition the DiscreteZerosAndPoles transfer function is transformed into discrete state space form by creating first and second order blocks that are connected together in series. Every block is represented in controller canonical form and scaled such that the gain from the input of this block to its output is one (i.e. y(p=0) = u(p=0)), if this is possible.

The construction of the state space blocks is the same as of the corresponding continuous transformation ( ZerosAndPoles.Conversion.toStateSpace()), except for that the first order and second order systems are scaled by

       1 + n1
k_2 = --------
       1 + d1

and

       1 + n2 + n2
k_2 = -------------
       1 + d2 + d2

respectiively.

See ZerosAndPoles.Conversion.toStateSpace() for more information.

Example

  DiscreteZerosAndPoles q = Modelica_LinearSystems2.DiscreteZerosAndPoles.q();
  Modelica_LinearSystems2.DiscreteZerosAndPoles dzp=(q+1)/(q^2 + q + 1);

algorithm
  dss := Modelica_LinearSystems2.DiscreteZerosAndPoles.Conversion.toDiscreteStateSpace(dzp);
// dss.A = [0, 1; -1, -1],
// dss.B = [0; 3],
// dss.C = [0.333, 0.333],
// dss.D = [0],
// dss.B2 = [0; 0],

Inputs

TypeNameDefaultDescription
DiscreteZerosAndPolesdzpZerosAndPoles transfer function of a system

Outputs

TypeNameDefaultDescription
DiscreteStateSpacedssTransfer function in StateSpace SISO form