Contenido principal

mbcboundary.TwoStage

Two-stage boundary model class

    Description

    The mbcboundary.TwoStage class is a subclass of the mbcboundary.AbstractBoundary class. The mbcboundary.AbstractBoundary class is the base class for all boundary model classes in the Model-Based Calibration Toolbox™.

    Creation

    You can only create and fit two-stage boundary models in the local boundary tree. You cannot create or fit two-stage boundary models outside of a project. Fit one of these boundary models by adding the boundary model to the boundary tree.

    Local boundary model parameters are fitted using interpolating radial basis functions (RBFs) for global inputs. Two-stage boundary models are valid at any operating point.

    For an example, see Create Two-Stage Boundary Model.

    Properties

    expand all

    Fit algorithm for model or boundary model, specified as an mbcmodel.FitAlgorithm object.

    An mbcmodel.FitAlgorithm object is contained within the FitAlgorithm property of an mbcmodel.model object or mbcboundary.Model object.

    Parameters available to modify a boundary model fit vary depending on the boundary type selected. See Editing Boundary Model Fit Options for more information.

    This property is read-only.

    Whether boundary is fitted, specified as logical 0 or logical 1.

    B.Fitted indicates whether boundary model B has been fitted. You cannot evaluate the boundary model unless Fitted equals logical 1.

    Data Types: logical

    This property is read-only. You cannot change the GlobalModel, however, you can change the model properties or fit algorithm.

    Interpolating global boundary model definition, specified as a mbcmodel.linearmodel object. B.GlobalModel returns the definition of global boundary model. GlobalModel requires the type Interpolating RBF.

    Local boundary model definition, specified as a mbcboundary.Model object. B.LocalModel returns the boundary model that fits each operating point. You can modify the FitAlgorithm property of LocalModel. See mbcboundary.Model for more information.

    Use CreateBoundary to change the local boundary model.

    b.LocalModel = CreateBoundary(b.LocalModel,'Range')

    Note

    Ellipsoid, Convex hull, and Star-shaped require two inputs.

    This property is read-only.

    Boundary model input, specified as an mbcmodel.modelinput object.

    For mbcboundary.TwoStage objects, this property returns an mbcmodel.modelinput object. You cannot edit this object when it is attached to a boundary tree. You cannot change the number of inputs after creation.

    This property is read-only.

    Boundary model object name, specified as a character vector. Names of boundary models are read-only and provide a description of the boundary model type and active inputs.

    This property is read-only.

    Number of boundary model object inputs, specified as a real positive scalar.

    Type of boundary model, specified as a character vector. Type is a property of the mbcboundary.AbstractBoundary class and all subclasses.

    B.Type returns the boundary model type.

    Use the getAlternativeTypes method to find out what types are available for the specified boundary model.

    Available types depend on the boundary model.

    • For mbcboundary.TwoStage, the LocalModel requires a type of either Range or Ellipsoid. GlobalModel requires a type of Interpolating RBF only.

    • For mbcboundary.PointByPoint, the LocalModel type can be any valid type for mbcboundary.Model.

    Note

    You can only create boundaries of type 'Point-by-point' or 'Two-stage' from a local boundary tree or from an existing boundary of type 'Point-by-point' or 'Two-stage'. You cannot create or fit these types of boundary models outside of a project. Fit them by adding the boundary model to the boundary tree. See example below.

    Object Functions

    CreateBoundaryCreate boundary model
    designconstraintConvert boundary model to design constraint
    EvaluateEvaluate model, boundary model, or design constraint
    getAlternativeTypesAlternative boundary models
    getLocalBoundaryGet local boundary model at operating point

    Examples

    collapse all

    1. Open a project with a test plan.

      proj = mbcmodel.LoadProject(fullfile(mbcpath,'mbctraining','Gasoline_project.mat'));
      testPlan = proj.Testplans(1);
      tree = testPlan.Boundary
      
      tree = 
      
        TwoStageTree with properties:
      
              Local: [1×1 mbcboundary.Tree]
             Global: [1×1 mbcboundary.Tree]
           Response: [1×1 mbcboundary.Tree]
          BestModel: [1×1 mbcboundary.Boolean]
             InBest: [1 1 1]
           TestPlan: [1×1 mbcmodel.testplan]
    2. Crete a two-stage local boundary model.

      twostageBoundary = CreateBoundary(tree.Local,'Two-stage');
    3. You can modify the twostageBoundary boundary model properties. However, the twostageBoundary boundary model is not fitted until it is added to the Local part of the two-stage tree. Use Add or Update to add twostageBoundary to the two-stage tree.

      twostageBoundary = Add(tree.Local,twostageBoundary);
    4. Extract the local boundary at an operating point with values Speed 3000, load 0.7, ICP 0, and ECP 50. The result is a Range boundary model.

      localBoundary = getLocalBoundary(twostageBoundary,[3000,0.7,0,50]) 
      localBoundary = 
      
        Model with properties:
      
          ActiveInputs: 1
                  Name: '8.55<=S<=50'
             NumInputs: 1
                  Type: 'Range'
                Inputs: [1×1 mbcmodel.modelinput]
          FitAlgorithm: [1×1 mbcmodel.fitalgorithm]

    More About

    expand all

    Version History

    Introduced in R2009b