DynamicSystems - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Science and Engineering : Dynamic Systems : System Object : DynamicSystems/Resample

DynamicSystems

  

Resample

  

resample a discrete-time system object

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

Resample(sys, T, opts)

Parameters

sys

-

System; system object (discrete)

T

-

algebraic; new sampling time

opts

-

(optional) equation(s) of the form option = value; specify options for the Resample command

Options

• 

method = forward, backward, bilinear, prewarp, matched, zoh, or foh

Specifies the resampling method.

• 

frequency = realcons

Specifies the warping or critical frequency in rad/s. This is used only if method = prewarp, otherwise it is ignored.

Description

• 

The Resample command resamples a discrete-time system sys, discretized with sampling time sys:-sampletime, to create an equivalent discrete-time system with new sampling time T.

• 

The method option specifies the resampling method. The following methods are supported: forward rectangle rule (forward), backward rectangle rule (backward), bilinear rule (bilinear), bilinear with prewarping (prewarp), matched poles and zeros (matched), zero-order hold (zoh), and first-order hold or non-causal triangle-hold (foh).

• 

The bilinear rule is also known as the Tustin or Trapezoid rule.

• 

Not all resampling methods can be applied to all system types. The following table describes the usage. An x indicates that the method can be used by the system type. A D indicates that the method is the default for the system type.

System Type

forward

backward

bilinear

prewarp

matched

zoh

foh

 

 

 

 

 

 

 

 

State-Space

   x

   x

   D

 

 

 x

 x

Transfer-Function

   x

   x

   D

   x

 

 x

 x

Coefficients

   x

   x

   D

   x

 

 x

 x

Zero-Pole-Gain

 

 

 

 

   D

 

 

• 

For details on the transformation methods, see the sections Frequency Domain Transformations and Time Domain Transformations in DynamicSystems[ToContinuous] and DynamicSystems[ToDiscrete].

Examples

withDynamicSystems:

Resample a discrete-time transfer function with new sampling time 0.001 s

sysZeroPoleGain0.7,0.5,1,discrete,sampletime=0.01:

sysTransferFunctionsys:PrintSystemsys

Transfer Functiondiscrete; sampletime = .1e-11 output(s); 1 input(s)inputvariable=u1zoutputvariable=y1ztf1,1=z0.7000000000z0.5000000000

(1)

New sampling time T

T0.001

T:=0.001

(2)

The default method is bilinear when no method is specified.

sys_1Resamplesys,T:PrintSystemsys_1

Transfer Functiondiscrete; sampletime = .1e-21 output(s); 1 input(s)inputvariable=u1zoutputvariable=y1ztf1,1=1.116129032z0.9653179191z0.9354838710

(3)

Resampling with the original sampling time, we obtain the original discrete-time system.

sys_origResamplesys_1,0.01:PrintSystemsys_orig

Transfer Functiondiscrete; sampletime = .1e-11 output(s); 1 input(s)inputvariable=u1zoutputvariable=y1ztf1,1=z0.7000000000z0.5000000000

(4)

sys_2Resamplesys,T,method=forward:PrintSystemsys_2

Transfer Functiondiscrete; sampletime = .1e-21 output(s); 1 input(s)inputvariable=u1zoutputvariable=y1ztf1,1=z0.9700000000z0.9500000000

(5)

sys_3Resamplesys,T,method=backward:PrintSystemsys_3

Transfer Functiondiscrete; sampletime = .1e-21 output(s); 1 input(s)inputvariable=u1zoutputvariable=y1ztf1,1=1.327272727z0.9589041096z0.9090909091

(6)

sys_4Resamplesys,T,method=prewarp,frequency=2:PrintSystemsys_4

Transfer Functiondiscrete; sampletime = .1e-21 output(s); 1 input(s)inputvariable=u1zoutputvariable=y1ztf1,1=1.116129582z0.9653190438z0.9354859315

(7)

sys_5Resamplesys,T,method=zoh:PrintSystemsys_5

Transfer Functiondiscrete; sampletime = .1e-21 output(s); 1 input(s)inputvariable=u1zoutputvariable=y1ztf1,1=z0.9598197951z0.9330329923

(8)

sys_6Resamplesys,T,method=foh:PrintSystemsys_6

Transfer Functiondiscrete; sampletime = .1e-21 output(s); 1 input(s)inputvariable=u1zoutputvariable=y1ztf1,1=1.135736061z0.9646218847z0.9330329923

(9)

Compare the frequency responses of all the systems.

p0MagnitudePlotsys,range=0.1..10,color=red,thickness=2,legend=discrete:

p1MagnitudePlotsys_1,range=0.1..100,color=blue,legend=bilinear:

p2MagnitudePlotsys_2,range=0.1..100,color=green,legend=forward:

p3MagnitudePlotsys_3,range=0.1..100,color=cyan,legend=backward:

p4MagnitudePlotsys_4,range=0.1..100,color=grey,legend=prewarp:

p5MagnitudePlotsys_5,range=0.1..100,color=magenta,legend=zoh:

p6MagnitudePlotsys_6,range=0.1..100,color=black,legend=foh:

plots[display]p0,p1,p2,p3,p4,p5,p6

Compatibility

• 

The DynamicSystems[Resample] command was introduced in Maple 18.

• 

For more information on Maple 18 changes, see Updates in Maple 18.

See Also

DynamicSystems

DynamicSystems[SystemOptions]

DynamicSystems[ToContinuous]

DynamicSystems[ToDiscrete]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam