メインコンテンツ

addComponentTiltTuning

R2026b

Add tuning parameters for component tilt

Since R2026b

    Description

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

    compSet = addComponentTiltTuning(compSet,propertyName,bound) adds tuning parameters for the component tilt property specified by propertyName to the optimization set compSet, with bounds defined by bound. The tuning parameters apply to all top-level components. The tuning set, compSet, is an opticalOptimizationSet object. This function adds a ComponentTiltTuning object to the Tunings property of compSet and appends the details of the tuning parameter to the TuningTable property of compSet.

    compSet = addComponentTiltTuning(compSet,propertyName,bound,TargetIndex=targetIdx) applies the tuning to only the components specified by targetIdx.

    Note

    This functionality requires Optimization Toolbox™.

    example

    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);

    Input Arguments

    collapse all

    Optimization set to which to add the tuning parameters, specified as an opticalOptimizationSet object.

    Component tilt property to tune, specified as "TiltX", "TiltY", or "TiltZ".

    Data Types: char | string

    Tuning bounds, specified as a numeric scalar or a 1-by-2 numeric vector of the form [min max].

    • Scalar — Specifies a percentage bound relative to the nominal value. Percentage bounds have no effect when the nominal value is zero.

    • 1-by-2 vector — Specifies offset bounds [min max] relative to the nominal value.

    Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

    Component indices to target, specified as a vector of positive integers. By default, the tuning parameters apply to all top-level components. This function does not support tuning for nested components.

    Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

    Output Arguments

    collapse all

    Updated optimization set, returned as an opticalOptimizationSet object with the component tilt tuning parameters appended. This function adds a ComponentTiltTuning object to the Tunings property of compSet and appends the details of the tuning parameter to the TuningTable property of compSet.

    Version History

    Introduced in R2026b