Optimize Transistor Sizes Of Low Dropout Regulator
This example shows how to use msbOptimizer
from Mixed-Signal Blockset™ to optimize transistor sizes of opamp and MOSFET of the Low Dropout Regulator (LDO) for given performance specification. LDOs are widely used in power supply systems and they track a reference voltage with varying load currents.
Setup
The design database is contained in optimizeLDO.zip
and is a supporting file with this example. The maestro view used in this example The maestro view used in this example is under the hierarchy: optimDesigns library, RegulatorOptim cell, maestro view. Follow the steps below in Cadence to setup the PDK and the required libraries:
Download the generic pdk GPDK045 from the Cadence support page and place it in the same location as the project folder optimDesigns.
Edit cds.lib file to update the library paths as needed.
The design database is already setup with the pre-requisite steps to start optimization. Run a nominal simulation by disabling the Parameters. If you see an error due to netlisting issues, create the netlist first before running simulation. The next step is to launch MATLAB® from the Results tab on maestro view. This makes the adeInfo object available in the workspace which lets you launch Cadence® simulations from MATLAB.
Optimizer
Enable the parameters in Cadence maestro environment and instatiate an object of msbOptimizer
class. An optimization solver called surrogateopt
from the Global Optimization Toolbox™ is used for optimization.
msblks.internal.cadence2matlab.loadMaestroState(adeInfo.adeSession,"initialParamSetting","All","overwrite"); % This works only with the project included in this example to load the state called "initialParamSetting". On custom designs, enable the parameters manually. m = msbOptimizer();
You can verify that the output specifications are correctly imported by viewing OutputsSetup
property.
m.OutputsSetup
You can also verify the parameters by viewing the ParametersSetup
property.
m.ParametersSetup
Run Optimization
Run optimization by calling optimizeDesign
method of msbOptimizer
class. This launches multiple simulations in Cadence simulation environment whose results are processed in MATLAB. You can specify the maximum number of simulations to run using MaxNumberSims
. You can specify the number of simulations per iteration using NumParallelSims
. Optimization stops when the performance metrics are met or when the number of simulations hit MaxNumberSims
. You can access the variable bestSolution
for the set of parameters that result in best performance metrics. Access bestMetrics
for the best performance metrics of the design.
[bestSolution1, bestMetrics1] = m.optimizeDesign('MaxNumberSims',48,'NumParallelSims',16)
Using Checkpoint
If the optimization routine does not meet all the specifications, you can restart optimization from a checkpoint. Set the option UseCheckPoint
to true
while calling optimizeDesign
. You can use checkpoint only when optimizeDesign
is run at least once to create the checkpoint.
[bestSolution2, bestMetrics2] = m.optimizeDesign('UseCheckPoint',true)
Using Custom Design
You can use the steps in this example to run optimization on your own design. If you want to use your custom design, see - Optimization of an operational amplifier. You need to do the following steps before instantiating msbOptimizer
.
Setup optimization specifications in the Outputs Setup of Cadence maestro view.
Declare optimization variables to be the transistor device parameters in the Cadence maestro view. Also define the range of values that the parameters can take.