Main Content

sdo.OperatingPointSetup class

Package:sdo

Set up steady-state operating point computation

Syntax

OpPointSetup= sdo.OperatingPointSetup(opSpec,inputsToUse,statesToUse)
OpPointSetup= sdo.OperatingPointSetup(___,[findopOpts])

Description

Anoperating pointof a dynamic system defines the states and root-level input signals of the model at a specific time. For example, in a car engine model, variables such as engine speed, throttle position, engine temperature, and surrounding atmospheric conditions typically describe the operating point.

Asteady-state operating pointof a model, also called an equilibrium ortrimcondition, includes state variables that do not change with time. A model can have several steady-state operating points. For example, a simple, damped pendulum has two steady-state operating points at which the pendulum position does not change with time.

Usesdo.OperatingPointSetupto set a model to steady-state as part of model optimization or evaluation. This step is useful when you are performing optimization or estimation using data measured when the system was at a non-zero steady state. Matching the model state to the system state, used for data collection, helps reduce model transients and improves results.

You need the金宝app®Control Design™toolbox to usesdo.OperatingPointSetup.

Construction

OpPointSetup= sdo.OperatingPointSetup(opSpec,inputsToUse,statesToUse)creates ansdo.OperatingPointSetupobject using the operating point specificationsopSpec, inputsinputsToUse, and statesstatesToUse.

OpPointSetup= sdo.OperatingPointSetup(___,[findopOpts])creates ansdo.OperatingPointSetupobject using additional arguments specified usingfindopOpts.

Input Arguments

expand all

Operating point specifications, specified as an operating point specification object, or empty[]. Useoperspec(Simulink Control Design)to create theopSpecobject.

Also a property of thesdo.operatingPointSetupobject. For more information, seeOperatingPointSpec.

Inputs to use for operating point setup, specified as a vector of indices, a cell array of block paths, or empty[].

You can specify the inputs to use as:

  • A vector of indices. For example, you can use the input argumentinputsToUseas:

    inputsToUse = [2 3]

  • A cell array of block paths. For example, you can use the input argumentinputsToUseas:

    inputsToUse = {'modelname/in2','modelname/in3'}

  • An empty array[]if you do not want to use any of the inputs.

When an input is supplied by experiment data in parameter estimation, that input should not be included amonginputsToUse.

Also a property of thesdo.operatingPointSetupobject. For more information, seeUseOperatingPointInputs.

States to use for operating point setup, specified as a vector of indices, a cell array of block paths, or empty[].

You can specify the states to use as:

  • A vector of indices. If you specifystatesToUseas a vector of indices, the states should be in the same order as the states inopSpec. For example, you can use the input argumentstatesToUseas:

    statesToUse = [2 3]

  • A cell array of block paths. For example, you can use the input argumentstatesToUseas:

    statesToUse = {'modelname/in2','modelname/in3'}

  • An empty array[]if you do not use any of the states.

Also a property of thesdo.OperatingPointSetupobject. For more information, seeUseOperatingPointStates.

Trimming options to find operating point from specification, specified as afindopOptionsoption set. Use thefindopOptions(Simulink Control Design)command to create thefindopOptsoption set.

Also a property of thesdo.OperatingPointSetupobject. For more information, seeFindopOptions.

Properties

expand all

Operating point specification for Simulink model, specified as an operating point specification object, or empty[].

Useoperspec(Simulink Control Design)to create operating point specifications for your Simulink model, and create an operating point specification object,opSpec. For example, for components of the specification related to the states, you can changeKnown,SteadyState,Min,Max,dxMin, anddxMax.

You can modify the operating point specifications using dot notation. For example, ifopSpecis the operating point specification object,opSpec.States(1)方式accesses the state values of the first model state.

For more information on operating point specifications, seeoperspec(Simulink Control Design).

Inputs to use for operating point setup, specified as a vector of indices, a cell array of block paths, or empty[].

UseUseOperatingPointInputsto specify the inputs in the operating point to be applied to the model. When an input is supplied by experiment data, that input should not be included amongUseOperatingPointInputs.

You can specify the inputs to use as:

  • A vector of indices. For example, you can use the propertyUseOperatingPointInputsto specify the inputs to use as:

    OpPointSetup.UseOperatingPointInputs = [2 3]
    whereOpPointSetupis thesdo.OperatingPointSetupobject.

  • A cell array of block paths. For example, you can use the propertyUseOperatingPointInputsto specify the inputs to use as:

    OpPointSetup.UseOperatingPointInputs = {'modelname/in2','modelname/in3'}
    whereOpPointSetupis thesdo.OperatingPointSetupobject.

  • An empty array[]if you do not want to use any of the inputs.

States to use for operating point setup, specified as a vector of indices, a cell array of block paths, or empty[].

UseUseOperatingPointStatesto specify the states in the operating point to be applied to the model.

You can specify the states to use as:

  • A vector of indices. If you specifyUseOperatingPointStatesas a vector of indices, the states should be in the same order as the states inOperatingPointSpec.For example, you can use the propertyUseOperatingPointStatesto specify the states to use as:

    OpPointSetup.UseOperatingPointStates = [2 3]
    where,OpPointSetupis thesdo.OperatingPointSetupobject.

  • A cell array of block paths. For example, you can use the propertyUseOperatingPointStatesto specify the states to use as:

    OpPointSetup.UseOperatingPointStates = {'modelname/in2','modelname/in3'}
    where,OpPointSetupis thesdo.OperatingPointSetupobject.

  • An empty array[]if you do not use any of the states.

Trimming options to find operating point from specification, specified as afindopOptionsoption set.

Use thefindopOptions(Simulink Control Design)命令来创建一个FindopOptionsoption set for operating point computation. For more information, seefindopOptions(Simulink Control Design).

Copy Semantics

Handle. To learn how handle classes affect copy operations, seeCopying Objects.

Examples

collapse all

For this example, consider a Simulink model'PopulationModel'which models a simple ecology where an organism population growth is limited by the carrying capacity of the environment.

Set up your requirement or experiment, and then define a steady-state operating point objectOpPointSetup. The operating point specification object is created usingoperspec. Usesdo.OperatingPointSetupto create the operating point object.

opSpec = operspec('PopulationModel');inputsToUse = [];statesToUse = 1;OpPointSetup= sdo.OperatingPointSetup(opSpec,inputsToUse,statesToUse)
OpPointSetup= OperatingPointSetup with properties: OperatingPointSpec: [1x1 opcond.OperatingSpec] UseOperatingPointInputs: [] UseOperatingPointStates: 1 FindopOptions: []

Pass the operating point objectOpPointSetupto your objective function, and includeOpPointSetupin the call function to thesimmethod of thesdo.SimulationTestobject. Thesimmethod computes a steady-state operating point and applies it to the model. Specifically, it applies the operating point inputs specified inUseOperatingPointInputs, and applies the operating point states specified inUseOperatingPointStates. Then perform estimation or optimization per your requirement.

Version History

Introduced in R2018a

See Also

(Simulink Control Design)|(Simulink Control Design)||