# ee_getPowerLossTimeSeries

Calculate dissipated power losses and switching losses, and return time series data

## Syntax

## Description

calculates dissipated power losses for blocks in a model, based on logged simulation data,
and returns the time series data for each block. `lossesCell`

= ee_getPowerLossTimeSeries(`node`

)

Before you call this function, you must have the simulation log variable in your current workspace. Create the simulation log variable by simulating the model with data logging turned on, or load a previously saved variable from a file.

The `ee_getPowerLossTimeSeries`

function calculates dissipated power
losses for each block that has a `power_dissipated`

variable. All blocks in
the Semiconductor Devices library, as well as some other blocks, have an internal variable
called `power_dissipated`

, which represents the instantaneous power
dissipated by the block. Some blocks have more than one `power_dissipated`

variable, depending on their configuration. For example, the N-Channel MOSFET
block has separate `power_dissipated`

logging nodes for the MOSFET, the
gate resistor, and for the source and drain resistors if they have nonzero resistance
values. The function sums all these losses and provides the power loss value for all of the
blocks as functions of time.

**Note**

The `power_dissipated`

internal variable does not report dynamic
losses incurred from semiconductor switching or magnetic hysteresis.

Two different variables, `lastTurnOnLoss`

and
`lastTurnOffLoss`

report the switching losses.

Switching losses are losses associated with the transition of the semiconductor switch
from its on-state to its off-state and viceversa. They are frequency dependent. The
`ee_getPowerLossTimeSeries`

function returns the switching losses at
each switching event and expresses them in joules.

If `node`

is the name of the simulation log variable, then the table
contains the data for all the blocks in the model that dissipate power (that is, contain at
least one `power_dissipated`

variable). If `node`

is the
name of a node in the simulation data tree, then the table contains the data only for the
blocks within that node.

calculates dissipated power losses and returns the time series data for time steps from
`lossesCell`

= ee_getPowerLossTimeSeries(`node`

,`startTime`

,`endTime`

)`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. If you omit these two input arguments, the function returns data over
the whole simulation time.

calculates dissipated power losses and returns the time series data for time steps from
`lossesCell`

= ee_getPowerLossTimeSeries(`node`

,`startTime`

,...

`endTime`

,`intervalWidth`

)`startTime`

to `endTime`

, averaged over the time
`intervalWidth`

. If you omit the `intervalWidth`

, or
set it to 0, the function returns the instantaneous data, without averaging. If you omit all
three optional arguments, the function returns the instantaneous data over the whole
simulation time.

`[`

calculates dissipated power losses for blocks in a model, based on logged simulation data,
and returns the time series data, `lossesCell`

, `switchingLosses`

] = ee_getPowerLossTimeSeries(`node`

)`lossesCell`

, for each block and
a cell array, `switchingLosses`

, with the switching losses of each
device.

If there are no switching losses appear, the `switchingLosses`

output is an empty cell array.

## Examples

## Input Arguments

## Output Arguments

## See Also

**Introduced in R2017a**