This example shows how to speed up the tuning of fixed-structure control systems if you have the Parallel Computing Toolbox™ software installed. When you run multiple randomized optimization starts, parallel computing speeds up tuning by distributing the optimization runs among workers.
To distribute randomized optimization runs among workers:
If Automatically create a parallel
pool is not selected in your Parallel Computing Toolbox preferences,
manually start a parallel pool using
If Automatically create a parallel pool is selected in your preferences, you do not need to manually start a pool.
hinfstructOptions set that specifies multiple
random starts. For example, the following options set specifies 20
random restarts to run in parallel for tuning with
options = systuneOptions('RandomStart',20,'UseParallel',true);
parallel processing by distributing the randomized starts among available
workers in the parallel pool.
Use the options set when you call
For example, if you have already created a tunable control system
CL0, and tunable controller, and tuning
the following command uses parallel computing to tune the control
[CL,fSoft,gHard,info] = systune(CL0,SoftReq,Hardreq,options);
To learn more about configuring a parallel pool, see the Parallel Computing Toolbox documentation.