Algorithms
To locate time-varying source blocks that can interfere with frequency response
estimation, frest.findSources begins at each linearization output point in the model.
From each output point, the algorithm traces every signal path backward block by block.
The algorithm reports any source block (a block with no input port) it discovers, unless
that source block is a Constant or Ground block.
The frest.findSources algorithm traces every signal path that can affect the signal
value at each linearization output point in the model. The paths traced include:
- Signal paths inside virtual and nonvirtual subsystems.
- Signal paths inside normal-mode referenced models. Set all referenced models to
normal simulation mode before using frest.findSources to ensure that the
algorithm identifies source blocks within the referenced models. - Signals routed through From and Goto blocks, or through Data Store Read and Data
Store Write blocks. - Signals routed through switches. The frest.findSources algorithm assumes that
any pole of a switch can be active during frequency response estimation. The
algorithm therefore follows the signal back through all switch inputs.
For example, consider the model scdspeed_ctrlloop. This model has one linearization
output point, located at the output of the Sum block labeled Speed Output. (The
frest.findSources algorithm ignores linearization input points.) Before running
frest.findSources, convert the referenced model to normal simulation mode:
set_param('scdspeed_ctrlloop/Engine Model',...
'SimulationMode','Normal');
You can now run frest.findSources to identify the time-varying source blocks using
the linearization output point defined in the model.
frest.findSources