.

Subsampling

Subsampling allows the designer to specify the computation rate for blocks that do not need to be computed every sample. Reduce the computational load on the processor by specifying when to perform computation for specified blocks.

By default, MechaWare performs computation for each MechaWare block every sample period. In some cases, this may not be necessary and the computation could be performed with a lower frequency. By computing the block every other sample or every fourth sample, the computational load on the controller processor is reduced by 50% or 75% respectively.

Each MechaWare block has a SubSampling field that specifies the schedule for the computation of that block. See screenshot below.

To change the subsample code of a block, enter the appropriate number in the Subsample Code field. See table below.

 
Subsample
Code
Description Computation Pattern (counted samples are in bold)
0 Evaluate every sample (default) 1 2 3 4 1 2 3 4
5 Evaluate on odd samples only 1 2 3 4 1 2 3 4
7 Evaluate every fourth sample 1 2 3 4 1 2 3 4
10 Evaluate on even samples only 1 2 3 4 1 2 3 4
11 Evaluate every third sample of every four samples 1 2 3 4 1 2 3 4
13 Evaluate on second sample of every four samples 1 2 3 4 1 2 3 4
14 Evaluate on first sample of every four samples 1 2 3 4 1 2 3 4


differentiator

 

Example

Further optimize the computation by specifying which sample a particular block is counted. For example, if the Relation, Compare, and Differentiator blocks only need to be counted once every four samples, you can specify different samples counts to computate each block's data.

In the example below, each block is evaluated on a different sample.

 
Block Subsample
Code
Computation Pattern
(counted samples are in bold)
Relation 14 1 2 3 4 1 2 3 4
Compare 13 1 2 3 4 1 2 3 4
Differentiator 11 1 2 3 4 1 2 3 4

NOTE: Specifying the same subsample code for a number of blocks might be counterproductive by overloading the computational load on a specific sample count. For example, setting a subsample code of 13 for multiple blocks might overload the controller on the second sample of every four samples.

 

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2021 Motion Engineering