Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

frestimateOptions

Options for frequency response estimation

Syntax

options = frestimateOptions
options = frestimateOptions('OptionName',OptionValue)

Description

options = frestimateOptions creates a frequency response estimation options object, options, with default settings. Pass this object to the function frestimate to use these options for frequency response estimation.

options = frestimateOptions('OptionName',OptionValue) creates a frequency response estimation options object options using the options specified by comma-separated name/value pairs.

Input Arguments

'OptionName',OptionValue

Estimation options, specified as comma-separated option name and option value pairs.

Option NameOption Value
'BlocksToHoldConstant'

Block paths of time-varying source blocks to hold constant during frequency response estimation. specified as a cell array of character vectors or a string array. Use frest.findSources to identify time-varying source blocks that can interfere with frequency response estimation.

Default: empty
'UseParallel'Set to 'on' to enable parallel computing for estimations with the frestimate command.

Default: 'off'
'ParallelPathDependencies'A cell array of character vectors or string array that specifies the path dependencies required to execute the model to estimate. All the workers in the parallel pool must have access to the folders listed in 'ParallelPathDependencies'.

Default: empty

Examples

Identify and disable time-varying source blocks for frequency response estimation.

% Open Simulink model.
mdl = 'scdspeed_ctrlloop';
open_system(mdl)

% Convert referenced subsystem to normal mode.
set_param('scdspeed_ctrlloop/Engine Model','SimulationMode','Normal');

% Get I/O points and create sinestream.
io = getlinio(mdl)
in = frest.Sinestream('Frequency',logspace(1,2,10),'NumPeriods',30,...
              'SettlingPeriods',25);

% Identify time-varying source blocks.
srcblks = frest.findSources(mdl)

% Create options set specifying blocks to hold constant
opts = frestimateOptions
opts.BlocksToHoldConstant = srcblks

% Run frestimate 
[sysest,simout] = frestimate(mdl,io,in,opts)

Enable parallel computing and specify the model path dependencies.

% Copy referenced model to temporary folder.
pathToLib = scdpathdep_setup;   

% Add folder to search path.
addpath(pathToLib);

% Open Simulink model.
mdl = 'scdpathdep';
open_system(mdl);

% Get model dependency paths.
dirs = frest.findDepend(mdl)

% The resulting path is on a local drive, C:/.
% Replace C:/ with valid network path accessible to remote workers.
dirs = regexprep(dirs,'C:/','\\\\hostname\\C$\\')

% Enable parallel computing and specify the model path dependencies.
options = frestimateOptions('UseParallel','on','ParallelPathDependencies',dirs)

Alternatives

You can enable parallel computing for all models with no path dependencies. To do so, select the Use the parallel pool when you use the "frestimate" command check box in the MATLAB® preferences. When you select this check box and use the frestimate command, you do not need to provide a frequency response options object.

If your model has path dependencies, you must create your own frequency response options object that specifies the path dependencies. Use the ParallelPathDependencies option before beginning the estimation.

Introduced in R2010a

Was this topic helpful?