Create state-space models with delayed inputs, outputs, and states

`sys=delayss(A,B,C,D,delayterms)`

sys=delayss(A,B,C,D,ts,delayterms)

`sys=delayss(A,B,C,D,delayterms)`

constructs
a continuous-time state-space model of the form:

$$\begin{array}{l}\frac{dx}{dt}=Ax(t)+Bu(t)+{\displaystyle \sum _{j=1}^{N}(Ajx(t-tj)+Bju(t-tj))}\\ y(t)=Cx(t)+Du(t)+{\displaystyle \sum _{j=1}^{N}(Cjx(t-tj)+Dju(t-tj))}\end{array}$$

where t_{j}, j=1,..,N are time delays
expressed in seconds. `delayterms`

is a struct array
with fields `delay`

, `a`

, `b`

, `c`

, `d`

where the fields of `delayterms(j)`

contain the values
of `tj`

, `Aj`

, `Bj`

, `Cj`

,
and `Dj`

, respectively. The resulting model `sys`

is
a state-space (`SS`

) model with internal delays.

`sys=delayss(A,B,C,D,ts,delayterms)`

constructs
the discrete-time counterpart:

$$\begin{array}{l}x[k+1]=Ax[k]+Bu[k]+{\displaystyle \sum _{j=1}^{N}\{Ajx[k-nj]+Bju[k-nj]\}}\\ y[k]=Cx[k]+Du[k]+{\displaystyle \sum _{j=1}^{N}\{Cjx[k-nj]+Dju[k-nj]\}}\end{array}$$

where Nj, j=1,..,N are time delays expressed as integer multiples
of the sample time `ts`

.

To create the model:

$$\begin{array}{l}\frac{dx}{dt}=x(t)-x(t-1.2)+2u(t-0.5)\\ y(t)=x(t-0.5)+u(t)\end{array}$$

type

DelayT(1) = struct('delay',0.5,'a',0,'b',2,'c',1,'d',0); DelayT(2) = struct('delay',1.2,'a',-1,'b',0,'c',0,'d',0); sys = delayss(1,0,0,1,DelayT) a = x1 x1 0 b = u1 x1 2 c = x1 y1 1 d = u1 y1 1 (values computed with all internal delays set to zero) Internal delays: 0.5 0.5 1.2 Continuous-time model.