Contenuto principale

Tuning

R2026b

Optical tuning parameters

Since R2026b

    Description

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

    Tuning parameters for optimization of optical system.

    Creation

    Create a collection of optical tuning parameters using the opticalOptimizationSet function. The opticalOptimizationSet function creates a 1-by-n array of Tuning objects. Each element in the array is an object of one of these types of tuning classes.

    Note

    This functionality requires Optimization Toolbox™.

    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