Skip to Main Content Skip to Search
Product Documentation

d2d - Resample discrete-time model

Syntax

sys1 = d2d(sys, Ts)
sys1 = d2d(sys, Ts, 'method')
sys1 = d2d(sys, Ts, opts)

Description

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':

sys1 = d2d(sys, Ts, opts) resamples sys using the option set with d2dOptions.

Tips

Examples

Example 1

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

Example 2

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)

See Also

c2d | d2c | d2dOptions | upsample

  


Free Control Systems Interactive Kit

Learn more about resources for designing, testing, and implementing control systems.

Get free kit

Trials Available

Try the latest control systems products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS