blockInterpolator
Extends from Icons.PartialBlockIcon (Icon for a discrete/continuous block).
Information
This block decreases the sampling time from the sampling time of the input signal (= inputSampleFactor*sampleClock.sampleTime) to the sampling time of the output signal (= outputSampleFactor*sampleClock.sampleTime). This is performed by linear interpolation between the current and the last sample leading to a delay of one input sampling period. Optionally, the resulting signal is filtered with a mean value FIR-filter, in order to remove undesired frequencies introduced by the linear interpolation. In most cases it is adviceable to utilize this filter. Note, the inputSampleFactor must be an integer multiple of the outputSampleFactor.
This block is demonstrated with example Examples.Interpolator leading to the following result when filtering a sine-signal with "continuous" (interpolator1.y), "discrete, unfiltered" (interpolator2.y) and "discrete, filtered" (interpolator3.y) Interpolator:
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Types.BlockTypeWithGlobalDefault | blockType | Modelica_LinearSystems2.Controller.Types.BlockTypeWithGlobalDefault.UseSampleClockOption | Type of block |
| Boolean | continuous | blockType == Types.BlockTypeWithGlobalDefault.Continuous or blockType == Types.BlockTypeWithGlobalDefault.UseSampleClockOption and sampleClock.blockType == Types.BlockType.Continuous | True, if continuous block, otherwise discrete block |
| Integer | inputSampleFactor | 1 | Input sample time = inputSampleFactor * sampleClock.sampleTime |
| Integer | outputSampleFactor | 1 | <html>Output sample time = outputSampleFactor * sampleClock.sampleTime<br>(inputSampleFactor must be an integer multiple of outputSampleFactor)</html> |
| Boolean | meanValueFilter | true | = true and discrete block, linearly interpolated signal is filtered by mean value filter |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.RealInput | u | Continuous or discrete input signal of block | |
| Modelica.Blocks.Interfaces.RealOutput | y | Continuous or discrete output signal of block |