Main Content

msbOptimizer

Optimize device parameters to set up simulation environment

Since R2024b

Description

Use the msbOptimizer class to optimize the device parameters used in the simulation environment. This class supports Cadence® and Simulink® simulation environments. The class creates an msbOptimizer object using specified arguments. You can then use the optimizeDesign method to optimize the circuit parameters. You need a license to Global Optimization Toolbox to use this functionality.

Creation

Description

msbOptimzer(DesignName='pll') creates an msbOptimizer object with DesignName property set to pll.

msbOptimzer(SimulationEnvironment='simulink',OutputsSetup=outputTable,VariableSetup=variableTable,DesignName='pll') creates an msbOptimizer object using the specified DesignName, VariableSetup, and OutputsSetup arguments in the Simulink environment.

example

Input Arguments

expand all

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: moptimizer = msbOptimizer(SimulationEnvironment='simulink',VariableSetup=variableTable,DesignName='DSM2ndOrder') optimizes the variables of a second order DSM in the Simulink environment.

Simulation environment where you want to optimize the parameters, specified as cadence or simulink.

Note

If you set SimulationEnvironment as simulink, you must provide the DesignName argument.

Data Types: char

Performance specifications for design whose parameters are being optimized, specified as a table. The table requires five columns: Test, Name, Weight, Units, and Spec.

Note

If you set SimulationEnvironment as simulink, you must provide the OutputsSetup argument.

Note

If you set SimulationEnvironment as cadence, the class ignores the specified OutputsSetup and gets the data from the adeInfo object in the base workspace.

Variables or parameters to be optimized, specified as a table. The table requires two columns: parameters and values

Note

If you set SimulationEnvironment as simulink, you must provide the VariableSetup argument.

Note

If you set SimulationEnvironment as cadence, the class ignores the specified VariableSetup and gets the data from the adeInfo object in the base workspace.

Name of the Simulink model whose design parameters are optimized, specified as a string.

Note

If you set SimulationEnvironment as simulink, you must provide the DesignName argument.

Data Types: char

Object Functions

optimizeDesignOptimize circuit design in simulation environment

Examples

collapse all

Define the performance specifications of a second-order DSM.

outputTable=table();
outputTable.Test=["ACMeas";"ACMeas";"ACMeas";"ACMeas";"ACMeas"];
outputTable.Name={'SNR';'SFDR';'SINAD';'ENOB';'NoiseFloor'};
outputTable.Weight=[100;40;35;90;15];
outputTable.Units={'dB';'dB';'dB';'bits';'dB'};
outputTable.Spec={'> 72';'> 74';'> 72';'maximize 11.5';'< -78'}
outputTable=5×5 table
      Test           Name         Weight     Units            Spec       
    ________    ______________    ______    ________    _________________

    "ACMeas"    {'SNR'       }     100      {'dB'  }    {'> 72'         }
    "ACMeas"    {'SFDR'      }      40      {'dB'  }    {'> 74'         }
    "ACMeas"    {'SINAD'     }      35      {'dB'  }    {'> 72'         }
    "ACMeas"    {'ENOB'      }      90      {'bits'}    {'maximize 11.5'}
    "ACMeas"    {'NoiseFloor'}      15      {'dB'  }    {'< -78'        }

Define the variables to optimize.

variableTable=table();
variableTable.parameters={'a1';'a2';'b1';'b2'};
variableTable.values=["0.15:0.005:0.16";"0.55:0.005:0.7";"0.15:0.005:0.16";"0.55:0.005:0.7"]
variableTable=4×2 table
    parameters         values      
    __________    _________________

      {'a1'}      "0.15:0.005:0.16"
      {'a2'}      "0.55:0.005:0.7" 
      {'b1'}      "0.15:0.005:0.16"
      {'b2'}      "0.55:0.005:0.7" 

Create the msbOptimizer object.

moptimizer = msbOptimizer(SimulationEnvironment='simulink',OutputsSetup=outputTable,VariableSetup=variableTable,DesignName='DSM2ndOrder')
moptimizer = 
  msbOptimizer with properties:

               DesignName: 'DSM2ndOrder'
                   Solver: "surrogateopt"
    SimulationEnvironment: 'simulink'
             BestSolution: []
              BestMetrics: []
     FinalOptimizerStatus: []
             OutputsSetup: [5x5 table]
          ParametersSetup: [4x2 table]
           ParameterNames: ["a1"    "a2"    "b1"    "b2"]
          ParameterValues: ["0.15:0.005:0.16"    "0.55:0.005:0.7"    "0.15:0.005:0.16"    "0.55:0.005:0.7"]
                    Eflag: []
                   Trials: []
              Constraints: [5x11 table]
     ParameterScaleFactor: [0.0050 0.0050 0.0050 0.0050]

Optimize the parameters.

[sol,metric] = moptimizer.optimizeDesign
Maximum number of simulations: 64
Number of parallel simulations: 8

Running 8 simulations in Simulink...

Running 8 simulations in Simulink...

Running 8 simulations in Simulink...

Running 8 simulations in Simulink...

Running 8 simulations in Simulink...

Running 8 simulations in Simulink...

Running 8 simulations in Simulink...

Running 8 simulations in Simulink...

Optimizer was unable to meet some or all the specifications.
You can continue optimization from the current state by using the checkpoint file.
E.g., if your object is called 'optimizer', run the following command:
 [solution, bestMetrics] = optimizer.optimizeDesign('useCheckPoint',true)

Figure Optimization Plot Function contains an axes object. The axes object with title DSM2ndOrder Optimization, xlabel Number of simulations, ylabel ENOB contains a line object which displays its values using only markers. This object represents Infeasible Best.

sol=4×2 table
    Name    Value
    ____    _____

    "a1"    0.155
    "a2"      0.6
    "b1"    0.155
    "b2"     0.66

metric=5×4 table
         Name         FinalMetrics          Specs           Units  
    ______________    ____________    _________________    ________

    {'SNR'       }       70.699       {'> 72'         }    {'dB'  }
    {'SFDR'      }       80.248       {'> 74'         }    {'dB'  }
    {'SINAD'     }       70.699       {'> 72'         }    {'dB'  }
    {'NoiseFloor'}      -78.276       {'< -78'        }    {'dB'  }
    {'ENOB'      }       11.452       {'maximize 11.5'}    {'bits'}

As you can see, the function was not able to meet the required SNR amd SINAD specifications. You can use the check point file to continue optimizing from the current state.

Version History

Introduced in R2024b