Main Content

Examine the Simulation Data Logging Configuration of a Model

Many analyses that you can perform using Simscape™ Electrical™ require a simulation log variable in your MATLAB® workspace. The model in this example is configured to log Simscape data for the whole model for the entire simulation time. To examine the data logging configuration of a model:

  1. Open the model. At the MATLAB Command Window, enter:

    openExample("simscapeelectrical/PowerLossAnalysisExample")

  2. Open the model configuration parameters and then, in the left pane, select Simscape. Relevant parameters are:

    • Log simulation data — Data logging is enabled for the whole model because this parameter is set to All so you can calculate the power dissipated by any of the semiconductors in the model.

    • Workspace variable name — This parameter, which is also referred to as the name of the simulation log variable, is specified as simlog_PowerLossAnalysis.

    • Limit data points — You can calculate the power dissipated for the entire simulation time because the option is not selected.

Alternatively, you can determine the Simscape data logging configuration without opening the model configuration parameters, by using the get_param function. For example, for the PowerLossAnalysis model, to determine:

  • If all, some, or no data is logged, at the MATLAB command prompt, enter

    get_param("PowerLossAnalysis",'SimscapeLogType')
    
    ans =
    
        'all'

  • The name of the Simscape logging variable

    get_param("PowerLossAnalysis",'SimscapeLogName')
    ans =
    
        'simlog_PowerLossAnalysis'

  • If the option to limit data-points is on or off

    get_param("PowerLossAnalysis",'SimscapeLogLimitData')
    ans =
    
        'on'

See Also

Functions

Related Topics