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" 1 sampling period "SignalCount" 1 number of inputs and outputs "TemporalVariable" t temporal 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 allBasic Examples (2)
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 the properties as an association:
Simulate the response of a sampler to a decaying sinusoid:
Applications (1)
Properties & Relations (4)
A sampler model is essentially a zero-order interpolation with zero initial values:
The response of the sampler model:
A sampler model is essentially a time-based action:
The response based on WhenEvent:
The response of the sampler model:
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 Nyquist–Shannon 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:
Text
Wolfram Research (2024), SamplerModel, Wolfram Language function, https://reference.wolfram.com/language/ref/SamplerModel.html.
CMS
Wolfram Language. 2024. "SamplerModel." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SamplerModel.html.
APA
Wolfram Language. (2024). SamplerModel. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SamplerModel.html