.Modelica_Synchronous.RealSignals.Sampler.SubSample

Information

This block sub-samples the clocked Real input signal u and provides it as clocked output signal y.

To be more precise: The clock of y is factor-times slower than the clock of u. At every factor ticks of the clock of u, the output y returns the value of u. The first activation of the clock of y coincides with the first activation of the clock of u. By default, the sub-sampling factor is inferred, that is, it must be defined somewhere else. If parameter inferFactor = false, then the sub-sampling factor is defined by Integer parameter factor.

Example

The following example samples a sine signal with a periodic clock of 20 ms period, and then sub-samples the resulting clocked signal with a factor of 3:

   
model simulation result

As can be seen, subSample.y picks every third-value of sample.y due to the sub-sampling, and the sub-sampling factor = 3 is displayed in the icon of the subSample block. Note the down-arrow in the icon of the subSample block indicates that the clock of subSample.y is slower as the clock of subSample.u.


Generated at 2024-12-17T19:26:02Z by OpenModelicaOpenModelica 1.24.3 using GenerateDoc.mos