| Contents | Index |
sys1 = d2d(sys, Ts)
sys1 = d2d(sys, Ts,
'method')
sys1 = d2d(sys, Ts, opts)
sys1 = d2d(sys, Ts) resamples the discrete-time dynamic system model sys to produce an equivalent discrete-time model sys1 with the new sample time Ts (in seconds), using zero-order hold on the inputs.
sys1 = d2d(sys, Ts, 'method') uses the specified resampling method 'method':
'zoh' — Zero-order hold on the inputs
'tustin' — Bilinear (Tustin) approximation
sys1 = d2d(sys, Ts, opts) resamples sys using the option set with d2dOptions.
Use the syntax sys1 = d2d(sys, Ts, 'method') to resample sys using the default options for'method'. To specify tustin resampling with a frequency prewarp (formerly the 'prewarp' method), use the syntax sys1 = d2d(sys, Ts, opts). See the d2dOptions reference page.
Consider the zero-pole-gain model
![]()
with sample time 0.1 s. You can resample this model at 0.05 s by typing
H = zpk(0.7,0.5,1,0.1) H2 = d2d(H,0.05) Zero/pole/gain: (z-0.8243) ---------- (z-0.7071) Sampling time: 0.05
The inverse resampling operation, performed by typing d2d(H2,0.1), yields back the initial model H(z).
Zero/pole/gain: (z-0.7) ------- (z-0.5) Sampling time: 0.1
Suppose you estimates a discrete-time model of a sample time commensurate with the estimation data (Ts = 0.1 seconds). However, your deployment application demands a faster sampling frequency (Ts = 0.01 seconds).
load iddata1 sys = oe(z1, [2 2 1]); sysFast = d2d(sys, 0.01, 'zoh') bode(sys, sysFast)
c2d | d2c | d2dOptions | upsample

Learn more about resources for designing, testing, and implementing control systems.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |