Building periodic systems

  • PeriodicStateSpace Periodic state space system representation.
  • ps Construction of periodic state-space models.
  • psmrc2d Discretization/resampling of a multirate LTI system.
PeriodicSystems.PeriodicStateSpaceType
PeriodicStateSpace(A::PM, B::PM, C::PM, D::PM) -> psys::PeriodicStateSpace{PM}

Construct a PeriodicStateSpace object from a quadruple of periodic matrix objects.

The periodic matrix objects A, B, C, D specifies the periodic matrices A(t), B(t), C(t) and D(t) of a linear periodic time-varying state space model in the continuous-time form

 dx(t)/dt = A(t)x(t) + B(t)u(t) ,
 y(t)     = C(t)x(t) + D(t)u(t) ,

or in the discrete-time form

 x(t+1)  = A(t)x(t) + B(t)u(t) ,
 y(t)    = C(t)x(t) + D(t)u(t) ,

where x(t), u(t) and y(t) are the system state vector, system input vector and system output vector, respectively, and t is the continuous or discrete time variable. The system matrices satisfy A(t) = A(t+T₁), B(t) = B(t+T₂), C(t) = C(t+T₃), D(t) = D(t+T₄), i.e., are periodic with periods T₁, T₂, T₃ and T₄, respectively. The different periods must be commensurate (i.e., their ratios must be rational numbers with numerators and denominators up to at most 4 decimal digits). All periodic matrix objects must have the same type PM, where PM stays for one of the supported periodic matrix types, i.e., PeriodicMatrix, SwitchingPeriodicMatrix, PeriodicArray, SwitchingPeriodicArray, PeriodicFunctionMatrix, PeriodicSymbolicMatrix, HarmonicArray, FourierFunctionMatrix, PeriodicTimeSeriesMatrix or PeriodicSwitchingMatrix.

source
PeriodicSystems.psFunction
ps([PMT::Type,] A::PM1, B::PM2, C::PM3, D::PM4) -> psys::PeriodicStateSpace

Construct a PeriodicStateSpace object from a quadruple of periodic matrix objects.

The periodic matrix objects A, B, C, D specifies the periodic matrices A(t), B(t), C(t) and D(t) of a linear periodic time-varying state space model in the continuous-time form

 dx(t)/dt = A(t)x(t) + B(t)u(t) ,
 y(t)     = C(t)x(t) + D(t)u(t) ,

or in the discrete-time form

 x(t+1)  = A(t)x(t) + B(t)u(t) ,
 y(t)    = C(t)x(t) + D(t)u(t) ,

where x(t), u(t) and y(t) are the system state vector, system input vector and system output vector, respectively, and t is the continuous or discrete time variable. The system matrices satisfy A(t) = A(t+T₁), B(t) = B(t+T₂), C(t) = C(t+T₃), D(t) = D(t+T₄), i.e., are periodic with periods T₁, T₂, T₃ and T₄, respectively. The different periods must be commensurate (i.e., their ratios must be rational numbers with numerators and denominators up to at most 4 decimal digits). The periodic matrix objects A, B, C, D can have different types PM1, PM2, PM3, PM4, respectively, where for a contiuous-time system PM1, PM2, PM3, PM4 must be one of the supported continuous-time periodic matrix types, i.e., PeriodicFunctionMatrix, PeriodicSymbolicMatrix, HarmonicArray, FourierFunctionMatrix or PeriodicTimeSeriesMatrix, while for a discrete-time system PM1, PM2, PM3, PM4 must be one of the supported discrete-time periodic matrix types, i.e., PeriodicMatrix or PeriodicArray. Any of the objects A, B, C, D can be also specified as a real matrix or vector of appropriate size.

If PMT is not specified, the resulting psys has periodic matrices of the same type PT, such that PT is either the common type of all matrix objects or PT = PeriodicFunctionMatrix for a continuous-time system or PT = PeriodicMatrix for a discrete-time system. If PMT is specified, the resulting psys has periodic matrices of the same type PMT.

Other convenience constructors are implemented as follows:

ps([PMT::Type,] A, B, C) -> psys::PeriodicStateSpace

to construct a PeriodicStateSpace object for a quadruple of the form (A,B,C,0);

ps(D) -> psys::PeriodicStateSpace

to construct a PeriodicStateSpace object for a quadruple of the form ([],[],[],D);

ps([PMT::Type,] A, B, C, D, period) -> psys::PeriodicStateSpace

to construct a PeriodicStateSpace object with a desired period for a quadruple (A,B,C,D); all objects A, B, C, D can be also specified as real matrices or vectors of appropriate sizes.

ps([PMT::Type,] A, B, C, period) -> psys::PeriodicStateSpace

to construct a PeriodicStateSpace object with a desired period for a quadruple (A,B,C,0); all objects A, B, C can be also specified as real matrices or vectors of appropriate sizes.

ps(sys::DescriptorStateSpace, period) -> psys::PeriodicStateSpace

to construct a PeriodicStateSpace object with a desired period for a quadruple (sys.A,sys.B,sys.C,sys.D) (sys.E = I is assumed).

source
PeriodicSystems.psmrc2dFunction
 psmrc2d(sys, Ts; ki, ko) -> psys::PeriodicStateSpace{PeriodicMatrix}

Perform the multirate discretization of a linear time-invariant system.

For a continuous-time state-space system sys = (A,B,C,D), a basic sampling time Ts, and the integer vectors ki and ko containing, respectively, the numbers of input and output sampling subperiods, the corresponding discretized periodic system psys = (Ap,Bp,Cp,Dp) of period T = n*Ts is determined, where n is the least common multiple of the integers contained in ki and ko. For a continuous-time system sys a zero-order hold based discretization method is used, such that the i-th input is constant during intervals of length ki[i]*Ts. An output hold device is used to provide constant intersample outputs, such that the i-th output is constant during intervals of length ko[i]*Ts. For a discrete-time system with a defined sample time Δ, an input and output resampling is performed using Δ as basic sample time and the value of Ts is ignored. If the system sample time is not defined, then the value of Ts is used as the basic sample time.

source