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

An operating point of 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.

A steady-state operating point of a model, also called an equilibrium or trim condition, 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.

Use sdo.OperatingPointSetup to 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 Simulink® Control Design™ toolbox to use sdo.OperatingPointSetup.

Construction

OpPointSetup = sdo.OperatingPointSetup(opSpec,inputsToUse,statesToUse) creates an sdo.OperatingPointSetup object using the operating point specifications opSpec, inputs inputsToUse, and states statesToUse.

OpPointSetup = sdo.OperatingPointSetup(___,[findopOpts]) creates an sdo.OperatingPointSetup object using additional arguments specified using findopOpts.

Input Arguments

expand all

Operating point specifications, specified as an operating point specification object, or empty []. Use operspec (Simulink Control Design) to create the opSpec object.

Also a property of the sdo.operatingPointSetup object. For more information, see OperatingPointSpec.

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 argument inputsToUse as:

    inputsToUse = [2 3]

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

    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 among inputsToUse.

Also a property of the sdo.operatingPointSetup object. For more information, see UseOperatingPointInputs.

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 specify statesToUse as a vector of indices, the states should be in the same order as the states in opSpec. For example, you can use the input argument statesToUse as:

    statesToUse = [2 3]

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

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

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

Also a property of the sdo.OperatingPointSetup object. For more information, see UseOperatingPointStates.

Trimming options to find operating point from specification, specified as a findopOptions option set. Use the findopOptions (Simulink Control Design) command to create the findopOpts option set.

Also a property of the sdo.OperatingPointSetup object. For more information, see FindopOptions.

Properties

expand all

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

Use operspec (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 change Known, SteadyState, Min, Max, dxMin, and dxMax.

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

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

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

Use UseOperatingPointInputs to 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 among UseOperatingPointInputs.

You can specify the inputs to use as:

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

    OpPointSetup.UseOperatingPointInputs = [2 3]
    where OpPointSetup is the sdo.OperatingPointSetup object.

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

    OpPointSetup.UseOperatingPointInputs = {'modelname/in2','modelname/in3'}
    where OpPointSetup is the sdo.OperatingPointSetup object.

  • 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 [].

Use UseOperatingPointStates to 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 specify UseOperatingPointStates as a vector of indices, the states should be in the same order as the states in OperatingPointSpec.For example, you can use the property UseOperatingPointStates to specify the states to use as:

    OpPointSetup.UseOperatingPointStates = [2 3]
    where, OpPointSetup is the sdo.OperatingPointSetup object.

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

    OpPointSetup.UseOperatingPointStates = {'modelname/in2','modelname/in3'}
    where, OpPointSetup is the sdo.OperatingPointSetup object.

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

Trimming options to find operating point from specification, specified as a findopOptions option set.

Use the findopOptions (Simulink Control Design) command to create a FindopOptions option set for operating point computation. For more information, see findopOptions (Simulink Control Design).

Copy Semantics

Handle. To learn how handle classes affect copy operations, see Copying 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 object OpPointSetup. The operating point specification object is created using operspec. Use sdo.OperatingPointSetup to 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 object OpPointSetup to your objective function, and include OpPointSetup in the call function to the sim method of the sdo.SimulationTest object. The sim method computes a steady-state operating point and applies it to the model. Specifically, it applies the operating point inputs specified in UseOperatingPointInputs, and applies the operating point states specified in UseOperatingPointStates. Then perform estimation or optimization per your requirement.

Version History

Introduced in R2018a

See Also

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