MATLAB: Can I use discrete valued parameters with response optimization or parameter estimation in Simulink Design Optimization

discreteoptimizationsimulinkSimulink Design OptimizationSimulink Parameter EstimationSimulink Response Optimization

Can I use discrete valued parameters with response optimization or parameter estimation in Simulink Design Optimization? For instance I have a parameter "D" which can either be 0 or 1, but not 0.5. I can set the upper and lower bound for these parameters in Simulink Design Optimization but I cannot force them to be discrete.

Best Answer

Unfortunately discrete valued parameters are not supported for response optimization or parameter estimation in the Simulink Design Optimization tool. The developers are aware of this issue and they may consider including this functionality in a future release.
For now, here are some suggested workarounds:
1. If you have one or two discrete variables each with a small number of possible states, you can run an optimization or parameter estimation session for each of the possible states separately. Then at the end pick the run result which is the most optimal compared to the rest. For instance if you have a discrete variable "D" with possible values 0 and 1, you can run one session with the value of D set to 0, and another session with the value of D set to 1. Then select the result that provides the best response or estimation from both of these runs.
2. You can allow the parameters to be continuous for the response optimization or parameter estimation session, then at the end round the result to the nearest discrete value. There is no guarantee that the closest discrete value will be the optimum, but is very likely to be for simple systems .
3. Use the Genetic Algorithm from the Global Optimization Toolbox in a MATLAB script. Set up the optimization problem using the Design Optimization Tool. Generate MATLAB code for the Optimization problem that has been posed. Edit the generated MATLAB code to perform Mixed Integer Optimization using the Genetic Algorithm Optimization function GA from the Global Optimization toolbox
More information about generating MATLAB code from the Design Optimization Tool can be found here:
More information about performing Mixed Integer Optimization using the GA function can be found here: