. |
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 SubSampling Field below. To change the subsample code of a block, select the desired schedule from the drop-down. Matlab generates the appropriate number in the Subsample Code field as displayed in the table below:
The following diagram displays the subsampling field that specifies the schedule for the computation of that block.
ExampleFurther 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 compute each block's data. In the example below, each block is evaluated on a different sample.
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.
|
| | Copyright © 2001-2009 Motion Engineering |