Main Content

pe_getPowerLossTimeSeries

Calculate dissipated power losses and return the time series data

Description

lossesCell = pe_getPowerLossTimeSeries(node) calculates dissipated power losses for blocks, based on logged Simscape™ simulation data, and returns the time series data for each block.

Before you call this function, generate or load the simulation log variable into your workspace. To generate the variable, simulate the model with simulation data logging enabled. For more information, see About Simscape Data Logging. To load a previously saved variable from a file, right-click on the file and select Load.

Checking dissipated power allows you to determine if circuit components are operating within their efficiency requirements. Blocks in the Semiconductor > Fundamental Components library have an internal variable called power_dissipated. This variable represents the instantaneous dissipated power, which includes only the real power (not the reactive or apparent power) that the block dissipates. When you log simulation data, the time-value series for this variable represents the power dissipated by the block over time. You can view and plot this data using the Simscape Results Explorer. The pe_getPowerLossTimeSeries function also allows you to access this data from a cell array.

The pe_getPowerLossTimeSeries function calculates losses for each block that has a power_dissipated variable. Some blocks have more than one power_dissipated variable, depending on their configuration. For example, for the MOSFET (Ideal, Switching) block, both the diode node and the ideal_switch node have a power_dissipated logging node. The function sums the power losses for both nodes to provide the total power loss for the block.

The nonideal semiconductor blocks also have thermal modeling options. Thermal modeling options have thermal ports that allow you to model the heat that is generated due to switching events and conduction losses. If you use a thermal modeling option, the function calculates power losses based on the thermal parameters that you specify. Essentially, the power dissipated is equal to the heat generated.

If you use a modeling option without a thermal port, the function calculates power losses based on the electrical parameters that you specify, such as on-state resistance and off-state conductance.

lossesCell = pe_getPowerLossTimeSeries(node,startTime,endTime) calculates dissipated power losses for blocks in a model, based on logged Simscape simulation data, and returns the time series data for each block for time steps from startTime to endTime. If startTime is equal to endTime, the interval is effectively zero and the function returns the instantaneous power for the time step that occurs at that moment.

lossesCell = pe_getPowerLossTimeSeries(node,startTime,...
endTime,intervalWidth)
calculates dissipated power losses for blocks in a model, based on logged Simscape simulation data, and returns the time series data for each block for time steps from startTime to endTime, with averaging applied over intervals equal to intervalWidth. If intervalWidth is 0, the function returns the instantaneous power dissipation.

Input Arguments

collapse all

Simulation log workspace variable, or a node within this variable, that contains the logged model simulation data, specified as a Node object. You specify the name of the simulation log variable by using the Workspace variable name parameter on the Simscape pane of the Configuration Parameters dialog box. To specify a node within the simulation log variable, provide the complete path to that node through the simulation data tree, starting with the top-level variable name.

If node is the name of the simulation log variable, then the table contains the data for all blocks in the model that contain power_dissipated variables. If node is the name of a node in the simulation data tree, then the table contains the data only for:

  • Blocks or variables within that node

  • Blocks or variables within subnodes at all levels of the hierarchy beneath that node

Example: simlog_ee_push_pull_converter_ccm

Start of the time interval for calculating the power loss time series, specified as a real number, in seconds. startTime must be greater than or equal to the simulation Start time and less than endTime.

Data Types: double

End of the time interval for calculating the power loss time series, specified as a real number, in seconds. endTime must be greater than startTime and less than or equal to the simulation Stop time.

Data Types: double

If the time between the specified startTime and endTime is not an integer multiple of intervalWidth, the function adjusts the start time. The figure shows how the function adjusts the start time to ensure that width of each time interval that the dissipated power is averaged over is equal to the specified intervalWidth.

The black line is an example of the instantaneous power_dissipated variables summed over all elements in an individual block. The simulation runs for 6 seconds. The startTime and endTime are indicated by the solid blue lines. The intervalWidth is set to 1 second. There are five intervals as indicated by the red dashed lines. The right-most edge of the last interval coincides with endTime. The left-most edge of the first interval is always greater than or equal to startTime. The edge is equal to startTime only if (endTime -startTime)/intervalWidth is an integer. The output in this case consists of five values for the averaged power dissipation, one point for each time period. The function outputs the actual start and stop times in the tabulated output data.

Example: 1.1e-3

Data Types: double

Output Arguments

collapse all

Cell array that contains the names of the blocks in the nodes that contain power_dissipated variables and, for each block, a three-column array:

  • Column one contains the interval start time.

  • Column two contains the interval end time.

  • Column three contains the dissipated power for the time interval.

If the interval width is 0 seconds, that is, the start time is equal to the end time, then the dissipated power is the instantaneous power loss. If the interval is greater than 0 seconds, the dissipated power is the average power loss for the time of the interval.

Version History

Introduced in R2017a

expand all