Main Content

Time response of sampled-data feedback system

sdlsim(p,k,w,t,tf) sdlsim(p,k,w,t,tf,x0,z0) sdlsim(p,k,w,t,tf,x0,z0,int) [vt,yt,ut,t] = sdlsim(p,k,w,t,tf) [vt,yt,ut,t] = sdlsim(p,k,w,t,tf,x0,z0,int)

`sdlsim(p,k,w,t,tf) `

plots the time response of the hybrid feedback system. `lft(p,k)`

, is forced by the continuous input signal described by `w`

and `t`

(values and times, as in `lsim`

). `p`

must be a continuous-time LTI system, and `k`

must be discrete-time LTI system with a specified sample time (the unspecified sample time –1 is not allowed). The final time is specified with `tf`

.

`sdlsim(p,k,w,t,tf,x0,z0) `

specifies the initial state vector `x0`

of `p`

, and `z0`

of `k`

, at time` t(1)`

.

`sdlsim(p,k,w,t,tf,x0,z0,int) `

specifies the continuous-time integration step size `int`

. `sdlsim`

forces `int = (k.Ts)/N int`

where *N*>4 is an integer. If any of these optional arguments is omitted, or passed as empty matrices, then default values are used. The default value for `x0`

and `z0`

is zero. Nonzero initial conditions are allowed for `p`

(and/or` k`

) only if` p`

(and/or `k`

) is an `ss`

object.

If `p`

and/or `k`

is an LTI array with consistent array dimensions, then the time simulation is performed pointwise across the array dimensions.

`[vt,yt,ut,t] = sdlsim(p,k,w,t,tf) `

computes the continuous-time response of the hybrid feedback system `lft(p,k)`

forced by the continuous input signal defined by `w`

and `t`

(values and times, as in `lsim`

). `p`

must be a continuous-time system, and `k`

must be discrete-time, with a specified sample time (the unspecified sample time –1 is not allowed). The final time is specified with `tf`

. The outputs `vt, yt`

and `ut`

are 2-by-1 cell arrays: in each the first entry is a time vector, and the second entry is the signal values. Stored in this manner, the signal `vt`

is plotted by using one of the following commands:

plot(vt{1},vt{2}) plot(vt{:})

Signals `yt`

and `ut`

are respectively the input to `k`

and output of `k`

.

If `p`

and/or` k`

are LTI arrays with consistent array dimensions, then the time simulation is performed pointwise across the array dimensions. The outputs are 2-by-1-by-array dimension cell arrays. All responses can be plotted simultaneously, for example, `plot(vt)`

.

`[vt,yt,ut,t] = sdlsim(p,k,w,t,tf,x0,z0,int)`

The optional arguments are `int`

(integration step size), `x0`

(initial condition for `p`

), and `z0`

(initial condition for `k`

). `sdlsim`

forces `int = (k.Ts)/N`

, where *N*>4 is an integer. If any of these arguments is omitted, or passed as empty matrices, then default values are used. The default value for `x0`

and `z0`

is zero. Nonzero initial conditions are allowed for `p`

(and/or `k`

) only if `p`

(and/or `k`

) is an `ss`

object.

`sdlsim`

oversamples the continuous-time, *N* times the sample rate of the controller *k*.