User Tools

Site Tools


eeros_architecture:control_system:available_blocks:transition

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
eeros_architecture:control_system:available_blocks:transition [2017/10/20 17:13] – [Filter] grafeeros_architecture:control_system:available_blocks:transition [2021/02/10 15:40] (current) – [Interpolator] ursgraf
Line 17: Line 17:
 </code> </code>
  
 +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 without any interpolation. You can choose this behavior with setting the ''steady'' parameter to ''true''.
 +<code cpp>
 +  Transition<Vector2> tInterpolator(10, true);
 +</code>
 +
 +IMPORTANT When interpolating it is very important that the slow and the fast block of the transition block run in harmonic tasks with their periods having the same ratio as the transition block itself. For the example above, that means, that the fast part runs exactly 10 times while the slow part runs once. Time domains which run concurrently always have some timing jitter, which could lead to the ratio being sporadically 9 or 11 instead of 10. Therefore, you have to make sure to run the slow time domain only after the fast time domain has finished. This can be achieved as described in [[eeros_architecture:control_system:executor|]]. For our example this leads to
 +<code cpp>
 +  Transition<Vector2> tInterpolator(10);
 +  TimeDomain tdSlow("td slow", 0.1, false);
 +  Periodic perSlow("perSlow", 0.1, tdSlow);
 +  Timedomain tdFast("td fast", 0.01, true);
 +  Periodic perFast("perFast", 0.1, tdFast);
 +  tdSlow.add(tInterpolator.inBlock);
 +  tdFast.add(tInterpolator.outBlock);
 +  perFast.after.push_back(perSlow);
 +  Executor.add(perFast);
 +</code>
 ===== Filter ===== ===== 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 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.
Line 33: Line 50:
 </code> </code>
  
 +You can configure the transition block in such a way, that it does not filter. In this case, each time the slower output block runs, it takes its signal directly from the actual input. The output signals follows the input signal without any filtering. You can choose this behavior with setting the ''steady'' parameter to ''true''.
 +<code cpp>
 +  Transition<Vector2> tFilter(0.1, true);
 +</code>
  
eeros_architecture/control_system/available_blocks/transition.1508512433.txt.gz · Last modified: 2017/10/20 17:13 (external edit)