eeros_architecture:control_system:available_blocks:transition
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
eeros_architecture:control_system:available_blocks:transition [2017/10/20 15:28] – graf | eeros_architecture:control_system:available_blocks:transition [2017/12/07 17:41] – [Filter] graf | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Transition ====== | ====== Transition ====== | ||
+ | A transition block allows to connect two different time domains. It is basically a container holding two blocks. Each of the two time domains runs one of those two blocks. | ||
- | [{{ : | + | [{{ : |
- | \\ | + | |
+ | ===== Interpolator ===== | ||
+ | If a signal crosses from a slower time domain into a fast one, the transition block behaves as an interpolator. A change in the input signal is interpolated with small incremental steps (in amplitude as well as timestamps) on the output signal. | ||
+ | [{{ : | ||
+ | |||
+ | Such a block can be created by choosing a ratio greater then 1. The ratio must match the ratio of the periods of the two time domains. The figure above shows the resulting curve for a ratio of 10. | ||
<code cpp> | <code cpp> | ||
- | Transition< | + | Transition< |
- | | + | |
+ | Timedomain tdFast(" | ||
+ | tdSlow.add(tInterpolator.inBlock); | ||
+ | tdFast.add(tInterpolator.outBlock); | ||
</ | </ | ||
- | [{{ : | + | You can configure the transition block in such a way, that it does not interpolate. In this case, each time the slower input block runs, its signal is directly put through to the output. The output signals follows the input signal whithout any interpolation. You can choose this behavior with setting the '' |
+ | <code cpp> | ||
+ | Transition< | ||
+ | </ | ||
+ | ===== Filter ===== | ||
+ | A signal crossing from a fast time domain to a slower one, needs to behave like a filter. For this purpose the out block, which does the filtering, features an additional input signal. This input signal allows the filter to select a certain signal as next output signal. | ||
+ | |||
+ | [{{ : | ||
+ | |||
+ | A filter block is created by choosing a ratio smaller then 1. The ratio must match the ratio of the periods of the two time domains. The figure above shows the resulting curve for a ratio of 0.1. Every time the slow time domain runs the out block of the transition block (at t1, t2, t3), the input signal of the out block is sampled. The timestamp of this signal determines which of the buffered input signals is selected and brought to the output. The selection is done in such a way that the timestamp of the selected signals is as close as possible to the timestamp of the selection signal. | ||
+ | |||
+ | <code cpp> | ||
+ | Transition< | ||
+ | tFilter.outBlock.getIn().connect(// | ||
+ | Timedomain tdFast(" | ||
+ | TimeDomain tdSlow(" | ||
+ | tdFast.add(tInterpolator.inBlock); | ||
+ | tdSlow.add(tInterpolator.outBlock); | ||
+ | </ | ||
+ | |||
+ | You can configure the transition block in such a way, that it does not interpolate. In this case, each time the slower input block runs, its signal is directly put through to the output. The output signals follows the input signal whithout any interpolation. You can choose this behavior with setting the '' | ||
+ | <code cpp> | ||
+ | Transition< | ||
+ | </ | ||
eeros_architecture/control_system/available_blocks/transition.txt · Last modified: 2021/02/10 15:40 by ursgraf