Calculate dissipated power losses

`lossesTable = pe_getPowerLossSummary(node)`

`lossesTable = pe_getPowerLossSummary(node,startTime,endTime)`

calculates dissipated power losses for semiconductor blocks in a model, based on logged
simulation data, and returns the data for each block in a table. `lossesTable`

= pe_getPowerLossSummary(`node`

)

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 Simulation Data Logging (Simscape). 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 `ee_getPowerLossTimeSeries`

function also allows you to access this data from a
cell array.

The `pe_getPowerLossSummary`

function calculates average 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, averaged over simulation
time.

The nonideal semiconductor blocks also have thermal variants. Thermal variants 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 variant, 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 variant 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.

calculates
dissipated power losses within a time interval. `lossesTable`

= pe_getPowerLossSummary(`node`

,`startTime`

,`endTime`

)`startTime`

and `endTime`

represent
the start and end of the time interval for averaging the power losses.
If you omit these two input arguments, the function averages the power
losses over the total simulation time.

This example uses the Push-Pull Buck Converter in Continuous Conduction Mode model. Data logging is enabled for the whole model and the option to limit data points is off.

Open the example model. At the MATLAB

^{®}command prompt, enter`model = 'ee_push_pull_converter_ccm'; open_system(model)`

Run the simulation and create the simulation log variable.

sim(model)

The simulation log variable

`simlog_ee_push_pull_converter_ccm`

is saved in your workspace.Calculate average power losses for each semiconductor in the model and display the results in a table.

tabulatedLosses = pe_getPowerLossSummary(simlog_ee_push_pull_converter_ccm)

tabulatedLosses = 5×2 table LoggingNode Power _____________________________________________________________________________ ________ 'ee_push_pull_converter_ccm.Diode1' 0.30937 'ee_push_pull_converter_ccm.Diode' 0.3092 'ee_push_pull_converter_ccm.N_Channel_MOSFET_1.mosfet_equation' 0.24497 'ee_push_pull_converter_ccm.N_Channel_MOSFET_2.mosfet_equation' 0.2449 'ee_push_pull_converter_ccm.Step_Down_Center_Tapped_Transformer.Eddy_Current' 0.070198

The table shows dissipated power losses for each of the N-Channel MOSFET and Diode blocks, averaged over the entire simulation time.

This example uses the Push-Pull Buck Converter in Continuous Conduction Mode model. Data logging is enabled for the whole model and the option to limit data points is off.

Open the example model. At the MATLAB command prompt, enter

`model = 'ee_push_pull_converter_ccm'; open_system(model)`

Run the simulation and create the simulation log variable.

sim(model)

The simulation log variable

`simlog_ee_push_pull_converter_ccm`

is saved in your workspace.The model simulation time (

*t*) is 0.04 seconds. Calculate average power losses for the interval when*t*is 0.010–0.025 secondstabulatedLosses = pe_getPowerLossSummary(simlog_ee_push_pull_converter_ccm,0.010,0.025)

tabulatedLosses = 5×2 table LoggingNode Power _____________________________________________________________________________ _______ 'ee_push_pull_converter_ccm.Diode' 0.3703 'ee_push_pull_converter_ccm.Diode1' 0.37022 'ee_push_pull_converter_ccm.N_Channel_MOSFET_2.mosfet_equation' 0.26598 'ee_push_pull_converter_ccm.N_Channel_MOSFET_1.mosfet_equation' 0.26595 'ee_push_pull_converter_ccm.Step_Down_Center_Tapped_Transformer.Eddy_Current' 0.08443

The table shows dissipated power losses for each of the Diode and MOSFET blocks, averaged over the specified portion of simulation time.

`ee_getEfficiency`

| `ee_getPowerLossSummary`

| `ee_getPowerLossTimeSeries`

| `sscexplore`

- Perform a Power-Loss Analysis
- Data Logging (Simscape)
- About the Simscape Results Explorer (Simscape)