Constructors

# Constructing transfer functions

`append(systems::StateSpace...), append(systems::TransferFunction...)`

Append systems in block diagonal form

source

`[sysd, x0map] = c2d(sys, Ts, method=:zoh)`

Convert the continuous system `sys` into a discrete system with sample time `Ts`, using the provided method. Currently only `:zoh` and `:foh` are provided.

Returns the discrete system `sysd`, and a matrix `x0map` that transforms the initial conditions to the discrete domain by `x0_discrete = x0map*[x0; u0]`

source

`feedback(L)` Returns L/(1+L) `feedback(P1,P2)` Returns P1/(1+P1*P2)

source

`feedback(sys)`

`feedback(sys1,sys2)`

Forms the negative feedback interconnection

``````>-+ sys1 +-->
|      |
(-)sys2 +``````

If no second system is given, negative identity feedback is assumed

source

`feedback2dof(P,R,S,T)` Return `BT/(AR+ST)` where B and A are the numerator and denomenator polynomials of `P` respectively `feedback2dof(B,A,R,S,T)` Return `BT/(AR+ST)`

source

`tf = minreal(tf::TransferFunction, eps=sqrt(eps()))`

Create a minimial representation of each transfer function in `tf` by cancelling poles and zeros will promote system to an appropriate numeric type

source

`minsys = minreal(s::StateSpace, tol=sqrt(eps()))` is implemented via `baltrunc` and returns a system on diagonal form.

source

`series(sys1::LTISystem, sys2::LTISystem)`

Connect systems in parallel, equivalent to `sys2+sys1`

source

`series(sys1::LTISystem, sys2::LTISystem)`

Connect systems in series, equivalent to `sys2*sys1`

source

`sminreal(sys)`

Compute the structurally minimal realization of the state-space system `sys`. A structurally minimal realization is one where only states that can be determined to be uncontrollable and unobservable based on the location of 0s in `sys` are removed.

source
```sys = ss(A, B, C, D, Ts=0)```

Create a state-space model `sys::StateSpace{T, MT<:AbstractMatrix{T}}` where `MT` is the type of matrixes `A,B,C,D` and `T` the element type.

This is a continuous-time model if Ts is omitted or set to 0. Otherwise, this is a discrete-time model with sampling period Ts. Set Ts=-1 for a discrete-time model with unspecified sampling period.

`sys = ss(D[, Ts, ...])` specifies a static gain matrix D.

source

`sys = tf(num, den, Ts=0), sys = tf(gain, Ts=0)`

Create as a fraction of polynomials:

`sys::TransferFunction{SisoRational{T,TR}} = numerator/denominator` where T is the type of the coefficients in the polynomial.

`num`: the coefficients of the numerator polynomial. Either scalar or vector to create SISO systems or an array of vectors to create MIMO system.

`den`: the coefficients of the denominator polynomial. Either vector to create SISO systems or an array of vectors to create MIMO system.

`Ts`: Sample time or `0` for continuous system.

Other uses: `tf(sys)`: Convert `sys` to `tf` form. `tf("s")`, `tf("z")`: Create the continous transferfunction `s`.

See also: `zpk`, `ss`

source

`zpk(gain, Ts=0), zpk(num, den, k, Ts=0), zpk(sys)`

Create transfer function on zero pole gain form. The numerator and denominator are represented by their poles and zeros.

`sys::TransferFunction{SisoZpk{T,TR}} = k*numerator/denominator` where `T` is the type of `k` and `TR` the type of the zeros/poles, usually Float64 and Complex{Float64}.

`num`: the roots of the numerator polynomial. Either scalar or vector to create SISO systems or an array of vectors to create MIMO system.

`den`: the roots of the denominator polynomial. Either vector to create SISO systems or an array of vectors to create MIMO system.

`k`: The gain of the system. Obs, this is not the same as `dcgain`.

`Ts`: Sample time or `0` for continuous system.

Other uses:

`zpk(sys)`: Convert `sys` to `zpk` form.

`zpk("s")`: Create the transferfunction `s`.

source