Options for frequency response estimation
options = frestimateOptions
options = frestimateOptions('OptionName',OptionValue)
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.
|
Estimation options, specified as comma-separated option name and option value pairs.
|
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)
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.