SamplerModel

SamplerModel[]

represents the single-input, single-output model of a sampler.

SamplerModel[specs]

represents a sampler with specification specs.

Details

  • SamplerModel is also known as a sampler or regular sampling.
  • SamplerModel is typically used to convert a continuous-time signal coming from sensors to a discrete-time signal used by a digital microcontroller or digital signal processor.
  • A sampler is the model of an operation that takes a continuous-time signal and samples it at periodic intervals to generate a discrete-time signal , where is the sampling period.
  • When simulating a system using InputOutputResponse that includes a SamplerModel, it will be a mixed continuous-time and discrete-time system. In that case, all discrete-time signals are treated as piecewise constant value and continuous-time signals.
  • The specification spec is an association and can have the following keys:
  • "InputVariables"{u[t]}input variables
    "OutputVariables"{y[t]}output variables
    "SamplingPeriod"1sampling period
    "SignalCount"1number of inputs and outputs
    "TemporalVariable"ttemporal variable
  • SamplerModel[]["prop"] can be used to obtain various properties of the model.
  • The value of "prop" can be any of the keys in spec and the following:
  • "Properties"list of property names
    "PropertyAssociation"property names and values as an association
    "PropertyDataset"property names and values as a dataset
    {p1,p2,}
  • values of properties pi

Examples

open allclose all

Basic Examples  (2)

A sampler model:

Its properties:

Simulate the response of a sampler to a sinusoidal input:

Plot the input signal and the sampler's response:

Scope  (9)

A single-input, single-output sampler model:

A sampler with 2 inputs and outputs:

A sampler with custom properties:

List all available properties:

Obtain a specific property:

Obtain several properties:

Obtain the properties as an association:

As a dataset:

Simulate the response of a sampler to a decaying sinusoid:

Decrease the sampling period to obtain better sampling:

The lower sampling period results in better sampling:

Applications  (1)

A sampler model is a subsystem of a sampled data system:

Simulate the system:

Plot the response:

Properties & Relations  (4)

A sampler model is essentially a zero-order interpolation with zero initial values:

The interpolation:

The response of the sampler model:

They are the same:

A sampler model is essentially a time-based action:

The response based on WhenEvent:

The response of the sampler model:

They are the same:

A holder model inverses the operation of a sampler model:

A sampler model in series with a holder model:

The output signal is the same as the input signal:

The NyquistShannon sampling theorem says that the sampling frequency must be at least twice that of the input signal frequency to reconstruct the input signal from the sampled signal:

A function that connects a sampler model and a holder model in series:

The output signal when the input is sampled at 10 times the frequency of the input signal:

Sampling at 0.5 times the input frequency results in a poor reconstruction of the signal:

Wolfram Research (2023), SamplerModel, Wolfram Language function, https://reference.wolfram.com/language/ref/SamplerModel.html.

Text

Wolfram Research (2023), SamplerModel, Wolfram Language function, https://reference.wolfram.com/language/ref/SamplerModel.html.

CMS

Wolfram Language. 2023. "SamplerModel." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SamplerModel.html.

APA

Wolfram Language. (2023). SamplerModel. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SamplerModel.html

BibTeX

@misc{reference.wolfram_2024_samplermodel, author="Wolfram Research", title="{SamplerModel}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/SamplerModel.html}", note=[Accessed: 02-May-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_samplermodel, organization={Wolfram Research}, title={SamplerModel}, year={2023}, url={https://reference.wolfram.com/language/ref/SamplerModel.html}, note=[Accessed: 02-May-2024 ]}