This is machine translation

Translated by Microsoft


Initialize Model Using Operating Point from Logged Simulation Data

This example shows how you can create an OperatingPoint object from logged simulation data and then use this operating point to initialize the model for a subsequent simulation run.

  1. Open the Permanent Magnet DC Motor example model by typing ssc_dcmotor in the MATLAB® Command Window. This model has data logging enabled for the whole model, with the Workspace variable name parameter set to simlog_ssc_dcmotor.

  2. Simulate the model to log the simulation data.

  3. Examine the simulation results in the Motor RPM scope window.

    For the first 0.1 seconds, the motor has no external load, and the speed builds up to the no-load value. Then at 0.1 seconds, the stall torque is applied as a load to the motor shaft.

  4. Create an operating point from logged simulation data at 0.1 seconds after the start of simulation:

    op = simscape.op.create(simlog_ssc_dcmotor, 0.1)
    op = 
      OperatingPoint with children:
       DC Motor
       DC Voltage
       Load Torque
       MRRef Motor
       MRRef Torque
  5. Enable model initialization from operating point:


    This command is equivalent to selecting the Enable operating point initialization check box in the Simscape pane of the Configuration Parameters dialog box.

  6. Specify the name of operating point:


    This command is equivalent to entering op in the Model operating point textbox.

  7. Simulate the model. The simulation now starts with the full no-load speed.

Related Topics