`ControlSystems.covar`

`ControlSystems.ctrb`

`ControlSystems.damp`

`ControlSystems.dampreport`

`ControlSystems.dcgain`

`ControlSystems.delaymargin`

`ControlSystems.gangoffour`

`ControlSystems.gangofseven`

`ControlSystems.gram`

`ControlSystems.margin`

`ControlSystems.markovparam`

`ControlSystems.obsv`

`ControlSystems.pole`

`ControlSystems.sigma`

`ControlSystems.stabregionPID`

`ControlSystems.tzero`

`ControlSystems.zpkdata`

`LinearAlgebra.norm`

# Analysis

`ControlSystems.covar`

— Function.`P = covar(sys, W)`

Calculate the stationary covariance `P = E[y(t)y(t)']`

of an lti-model `sys`

, driven by gaussian white noise 'w' of covariance `E[w(t)w(τ)]=W*δ(t-τ)`

where δ is the dirac delta.

The ouput is if Inf if the system is unstable. Passing white noise directly to the output will result in infinite covariance in the corresponding outputs (D*W*D' .!= 0) for contunuous systems.

`covar(C,W)`

If `C`

is a matrix, return CWC'

`ControlSystems.ctrb`

— Function.`ctrb(A, B)`

or `ctrb(sys)`

Compute the controllability matrix for the system described by `(A, B)`

or `sys`

.

Note that checking for controllability by computing the rank from `ctrb`

is not the most numerically accurate way, a better method is checking if `gram(sys, :c)`

is positive definite.

`ControlSystems.damp`

— Function.`Wn, zeta, ps = damp(sys)`

Compute the natural frequencies, `Wn`

, and damping ratios, `zeta`

, of the poles, `ps`

, of `sys`

`ControlSystems.dampreport`

— Function.`dampreport(sys)`

Display a report of the poles, damping ratio, natural frequency, and time constant of the system `sys`

`ControlSystems.dcgain`

— Function.`dcgain(sys)`

Compute the dcgain of system `sys`

.

equal to G(0) for continuous-time systems and G(1) for discrete-time systems.

`ControlSystems.delaymargin`

— Function.`dₘ = delaymargin(G::LTISystem)`

Only supports SISO systems

`ControlSystems.gangoffour`

— Function.`S,D,N,T = gangoffour(P,C)`

, `gangoffour(P::AbstractVector,C::AbstractVector)`

Given a transfer function describing the Plant `P`

and a transferfunction describing the controller `C`

, computes the four transfer functions in the Gang-of-Four.

`S = 1/(1+PC)`

Sensitivity function

`D = P/(1+PC)`

`N = C/(1+PC)`

`T = PC/(1+PC)`

Complementary sensitivity function

Only supports SISO systems

`ControlSystems.gangofseven`

— Function.`S, D, N, T, RY, RU, RE = gangofseven(P,C,F)`

Given transfer functions describing the Plant `P`

, the controller `C`

and a feed forward block `F`

, computes the four transfer functions in the Gang-of-Four and the transferfunctions corresponding to the feed forward.

`S = 1/(1+PC)`

Sensitivity function

`D = P/(1+PC)`

`N = C/(1+PC)`

`T = PC/(1+PC)`

Complementary sensitivity function

`RY = PCF/(1+PC)`

`RU = CF/(1+P*C)`

`RE = F/(1+P*C)`

Only supports SISO systems

`ControlSystems.gram`

— Function.`gram(sys, opt)`

Compute the grammian of system `sys`

. If `opt`

is `:c`

, computes the controllability grammian. If `opt`

is `:o`

, computes the observability grammian.

`ControlSystems.margin`

— Function.`ωgₘ, gₘ, ωϕₘ, ϕₘ = margin{S<:Real}(sys::LTISystem, w::AbstractVector{S}; full=false, allMargins=false)`

returns frequencies for gain margins, gain margins, frequencies for phase margins, phase margins

If `!allMargins`

, return only the smallest margin

If `full`

return also `fullPhase`

`ControlSystems.markovparam`

— Function.`markovparam(sys, n)`

Compute the `n`

th markov parameter of state-space system `sys`

. This is defined as the following:

`h(0) = D`

`h(n) = C*A^(n-1)*B`

`LinearAlgebra.norm`

— Function.`.. norm(sys, p=2; tol=1e-6)`

`norm(sys)`

or `norm(sys,2)`

computes the H2 norm of the LTI system `sys`

.

`norm(sys, Inf)`

computes the L∞ norm of the LTI system `sys`

. The H∞ norm is the same as the L∞ for stable systems, and Inf for unstable systems. If the peak gain frequency is required as well, use the function `norminf`

instead.

`tol`

is an optional keyword argument, used only for the computation of L∞ norms. It represents the desired relative accuracy for the computed L∞ norm (this is not an absolute certificate however).

sys is first converted to a state space model if needed.

The L∞ norm computation implements the 'two-step algorithm' in: N.A. Bruinsma and M. Steinbuch, 'A fast algorithm to compute the H∞-norm of a transfer function matrix', Systems and Control Letters 14 (1990), pp. 287-293. For the discrete-time version, see, e.g.,: P. Bongers, O. Bosgra, M. Steinbuch, 'L∞-norm calculation for generalized state space systems in continuous and discrete time', American Control Conference, 1991.

`ControlSystems.obsv`

— Function.`obsv(A, C)`

or `obsv(sys)`

Compute the observability matrix for the system described by `(A, C)`

or `sys`

.

Note that checking for observability by computing the rank from `obsv`

is not the most numerically accurate way, a better method is checking if `gram(sys, :o)`

is positive definite.

`ControlSystems.pole`

— Function.`pole(sys)`

Compute the poles of system `sys`

.

`ControlSystems.sigma`

— Function.`sv, w = sigma(sys[, w])`

Compute the singular values of the frequency response of system `sys`

at frequencies `w`

`sv`

has size `(length(w), max(ny, nu))`

`ControlSystems.stabregionPID`

— Function.`fig, kp, ki = stabregionPID(P, [ω]; kd=0, doplot = true)`

Segments of the curve generated by this program is the boundary of the stability region for a process with transfer function P(s) The PID controller is assumed to be on the form kp +ki/s +kd s

The curve is found by analyzing P(s)*C(s) = -1 ⟹ |PC| = |P| |C| = 1 arg(P) + arg(C) = -π

If `P`

is a function (e.g. s -> exp(-sqrt(s)) ), the stability of feedback loops using PI-controllers can be analyzed for processes with models with arbitrary analytic functions

See also `stabregionPID`

, `loopshapingPI`

, `pidplots`

`ControlSystems.tzero`

— Function.`tzero(sys)`

Compute the invariant zeros of the system `sys`

. If `sys`

is a minimal realization, these are also the transmission zeros.

`ControlSystems.zpkdata`

— Function.`z, p, k = zpkdata(sys)`

Compute the zeros, poles, and gains of system `sys`

.

**Returns**

`z`

: Matrix{Vector{ComplexF64}}, (ny x nu)

`p`

: Matrix{Vector{ComplexF64}}, (ny x nu)

`k`

: Matrix{Float64}, (ny x nu)