主要内容

opticalOptimizationSet

R2026b

Optical tuning parameters for compensator optimization

Since R2026b

    Description

    Add-On Required: This feature requires the Optical Design and Simulation Library for Image Processing Toolbox add-on.

    An opticalOptimizationSet object contains a set of tunable parameters (compensators) used to perform optimization after perturbations during sensitivity and tolerance analysis.

    Creation

    Description

    compSet = opticalOptimizationSet creates an empty optimization set with no tuning parameters. Add tuning parameters using the object functions.

    example

    Note

    This functionality requires Optimization Toolbox™.

    Properties

    expand all

    Tuning objects, specified as a 1-by-n array of Tuning objects.

    This property is read-only.

    Summary table of tuning parameters, represented as a table with these columns: TargetProperty, Bounds, and TargetIndex. The columns correspond to the properties of the tuning objects added to the optimization set, with each row representing those properties for a single tuning object..

    Object Functions

    addSurfacePositionTuningAdd tuning parameters for surface position
    addSurfaceTiltTuningAdd tuning parameters for surface tilt
    addComponentPositionTuningAdd tuning parameters for component position
    addComponentTiltTuningAdd tuning parameters for component tilt
    addCustomTuningAdd custom tuning parameter

    Examples

    collapse all

    Import an optical system into the workspace.

    opsys = zmximport("CookeTriplet.zmx");

    Create an optical tolerance set with tolerance for the radius of curvature of surfaces.

    tolSet = opticalToleranceSet;
    tolSet = addSurfaceRadiusTolerance(tolSet,0.05);

    Create a merit function object for evaluating system performance.

    meritFcn = opticalMeritFunction;
    meritFcn = addSpot(meritFcn);

    Create an empty optical optimization set.

    compSet = opticalOptimizationSet;

    Add tuning parameters to the optimization set.

    compSet = addSurfacePositionTuning(compSet,PositionZ=[5.25 5.65],TargetIndex=3);
    compSet = addSurfaceTiltTuning(compSet,TiltZ=[0.5 0.6],TargetIndex=4);
    compSet = addComponentPositionTuning(compSet,PositionZ=[5.25 5.65],TargetIndex=3);
    compSet = addComponentTiltTuning(compSet,TiltZ=[0.5 0.6],TargetIndex=4);

    Inspect the optimization set.

    compSet
    compSet = 
      opticalOptimizationSet with properties:
    
            Tunings: [1×4 optics.optimize.Tuning]
        TuningTable: [4×3 table]
    
    
    compSet.Tunings
    ans = 1×4 heterogeneous Tuning (SurfacePositionTuning, SurfaceTiltTuning, ComponentPositionTuning, ...) array with properties:
        Bounds
        BoundType
    
    
    compSet.TuningTable
    ans = 4×3 table
             TargetProperty       Bounds       TargetIndex
             ______________    ____________    ___________
    
        1     "PositionZ"      5.25    5.65       {[3]}   
        2     "TiltZ"           0.5     0.6       {[4]}   
        3     "PositionZ"      5.25    5.65       {[3]}   
        4     "TiltZ"           0.5     0.6       {[4]}   
    
    	Get insights using Copilot
    
    

    Run a sensitivity analysis on the optical system system using the merit function, tolerance, specifying the optimization set as the compensator.

    resultSensitivity = opticalSensitivity(opsys,meritFcn,tolSet,Compensator=compSet);

    Run a Monte Carlo tolerance analysis with 100 trials on the optical system using the same merit function, tolerance, and compensator settings.

    resultTolerance = opticalTolerance(opsys,meritFcn,tolSet,NumTrials=100,Compensator=compSet);

    Version History

    Introduced in R2026b