Main Content

pe_getEfficiency

Calculate efficiency as a function of dissipated power losses

Description

efficiency = pe_getEfficiency('loadIdentifier',node) returns the efficiency of a circuit based on the data extracted from a Simscape™ logging 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 Simscape Data Logging. 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 (Three-Phase) 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 ee_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*PloadPloss+Pload,

where:

  • Eff is the efficiency of the circuit.

  • Pload is the output power, that is, the power dissipated by load blocks.

  • Ploss is the power dissipated by nonload blocks.

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 (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 function uses the loss data to calculate the efficiency of the circuit.

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

efficiency = pe_getEfficiency('loadIdentifier',node,...
startTime,endTime)
returns the efficiency of a circuit based on the 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.

[efficiency,lossesTable] = pe_getEfficiency('loadIdentifier',node) 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.

Input Arguments

collapse all

String that is a complete or partial match for the names of load blocks in the circuit. For example, consider a circuit that contains the blocks shown in the table.

Block Name in the ModelDC ImpedanceAC ImpedanceY-Ld
Block TypeRLC (Three-Phase)RLC (Three-Phase)Wye-Connected Load
Block Role in the ModelSource ImpedanceLoad ImpedanceLoad
'loadIdentifier''d'YesYesYes
'Load'NoNoNo
'D'YesNoNo

The pe_getEfficiency function does not return the correct data for any of these 'loadIdentifier' values.

A load-block naming schema that gives you better control over the output of the pe_getEfficiency function is shown in this table.

Block Name in the ModelDC ImpedanceAC Impedance_Load_1Y-Load_2
Block TypeRLC (Three-Phase)RLC (Three-Phase)Wye-Connected Load
Block Role in the ModelSource ImpedanceLoad ImpedanceLoad
'loadIdentifier''1'NoYesNo
'2'NoNoYes
'Load'NoYesYes

Example: 'Load'

Data Types: string

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_pwm_two_level

Start of the time interval for calculating the efficiency, 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 efficiency, 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

Output Arguments

collapse all

Efficiency of the circuit based on data extracted from a Simscape logging node.

Dissipated power losses for each nonload block, returned as a table. The first column lists logging nodes for all blocks that have at least one power_dissipated variable. The second column lists the corresponding losses in watts.

Assumptions

  • 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.

Version History

Introduced in R2017a

expand all