Calculate efficiency as a function of dissipated power losses

`efficiency = pe_getEfficiency('loadIdentifier',node)`

`efficiency = pe_getEfficiency('loadIdentifier',node,startTime,endTime)`

```
[efficiency,lossesTable]
= pe_getEfficiency('loadIdentifier',node)
```

returns
the efficiency of a circuit based on the data extracted from a Simscape™ logging
node.`efficiency`

= pe_getEfficiency(`'loadIdentifier'`

,`node`

)

Before you call this function, generate or load the simulation
log variable to 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 efficiency allows you to determine if circuit components
are operating within their requirements. Blocks in the Semiconductor
> Fundamental Components library and the Delta-Connected
Load, Wye-Connected Load, and RLC blocks
have an internal block 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.

The `pe_getEfficiency`

function calculates
the efficiency of the circuit based on the losses for blocks that
have a *power_dissipated* variable and that you identify
as a load block. The equation for efficiency is

$$Eff=100*\frac{{P}_{load}}{{P}_{loss}+{P}_{load}},$$

*Eff*is the efficiency of the circuit.*P*is the output power, that is, the power dissipated by load blocks._{load}*P*is the power dissipated by nonload blocks._{loss}

This equation assumes that all loss mechanisms are captured
by blocks containing at least one *power_dissipated* variable.
If the model contains any lossy blocks that do not have this variable,
the efficiency calculation gives incorrect results.

Some blocks have more than one *power_dissipated* variable,
depending on their configuration. For example, for the MOSFET 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 function uses the
loss data to calculate the efficiency of the circuit.

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 and efficiencies 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 and efficiencies based on the electrical parameters that you specify, such as on-state resistance and off-state conductance.

`efficiency = pe_getEfficiency(`

returns
the efficiency of a circuit based on the `'loadIdentifier'`

,`node`

,`startTime`

,`endTime`

)*power_dissipated* data
extracted from a Simscape logging node within a time interval. `startTime`

and `endTime`

represent
the start and end of the time interval for calculating the efficiency.
If you omit these two input arguments, the function calculates the
efficiency over the whole simulation time.

`[`

returns
the efficiency of a circuit and the power loss contributions of the
nonload blocks in a circuit based on the data extracted from a Simscape logging
node.`efficiency`

,`lossesTable`

]
= pe_getEfficiency(`'loadIdentifier'`

,`node`

)

The output power equals the total power dissipated by blocks that you identify as load blocks.

The input power equals the output power plus the total power dissipated by blocks that you do not identify as load blocks.

The

*power_dissipated*variables capture all loss contributions.

`pe_getPowerLossSummary`

| `pe_getPowerLossTimeSeries`

| `sscexplore`

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

Was this topic helpful?