autoblks.pwr.PlantInfo
Analyze powertrain power and energy
Description
To assess powertrain efficiencies, use the
autoblks.pwr.PlantInfo
object to evaluate and report power and energy for
component-level blocks and system-level reference applications.
Creation
Description
Input Arguments
SysName
— Model name
character vector
Model that you want to analyze.
Example: 'ConfiguredConventionalVirtualVehicle'
Data Types: char
Properties
AvgEff
— Average efficiency
double
This property is read-only.
Average efficiency, ηavg, dimensionless.
The AvgEff
property derives the average efficiency from the total
change in stored, input, and output energy using this equation.
After a simulation, the autoblks.pwr.PlantInfo
class calculates
changes in stored, input, and output energy for each signal using these equations.
The equation uses these variables.
Pstore | Stored power |
Pinput, Poutput | Input and output power logged by Power Accounting Bus Creator block |
ΔEstore, ΔEinput, ΔEoutput | Change in stored, input and output energy |
Eff
— Instantaneous efficiency
time series
This property is read-only.
Instantaneous efficiency, η, dimensionless. The
Eff
property derives the instantaneous efficiency from power using
this equation.
The equation uses these variables.
Pstore | Stored power |
Pinput, Poutput | Input and output power logged by Power Accounting Bus Creator block |
EnrgyBalanceAbsTol
— Energy balance absolute tolerance
0.0100
(default)
Energy balance absolute tolerance, EnrgyBalAbsTol.
To determine if the system conserves energy, the
isEnrgyBalanced
method checks the energy conservation at each time step.
Blocks change the input energy plus released stored energy to output energy plus stored energy. For example, a mapped engine block uses fuel (not transferred energy) to produce torque (transferred energy) and heat loss (not transferred energy). The total modified energy represents the average between the input fuel energy and the energy exiting the system (torque and heat loss). To calculate the total energy modified by the block, the method uses the integral of the average transferred, not transferred, and stored power.
If the energy conservation error is within an error tolerance, the method returns true. Specifically, if either condition is met, the method returns true.
Condition | ||
---|---|---|
| or |
|
The equations use these variables.
EErr | Energy conservation error |
Etotal | Total energy modified by block |
EnrgyBalRelTol, EnrgyBalAbsTol | Energy balance relative and absolute tolerance, respectively |
Ptrans, Etrans | Transferred power and energy, respectively |
Pnottrans, Enottrans | Not transferred power and energy, respectively |
Pstore, Estore | Stored power and energy, respectively |
Pinput, Poutput | Input and output power logged by Power Accounting Bus Creator block |
Data Types: double
EnrgyBalanceRelTol
— Energy balance relative tolerance
0.0100
(default)
Energy balance relative tolerance, EnrgyBalRelTol.
To determine if the system conserves energy, the
isEnrgyBalanced
method checks the energy conservation at each time step.
Blocks change the input energy plus released stored energy to output energy plus stored energy. For example, a mapped engine block uses fuel (not transferred energy) to produce torque (transferred energy) and heat loss (not transferred energy). The total modified energy represents the average between the input fuel energy and the energy exiting the system (torque and heat loss). To calculate the total energy modified by the block, the method uses the integral of the average transferred, not transferred, and stored power.
If the energy conservation error is within an error tolerance, the method returns true. Specifically, if either condition is met, the method returns true.
Condition | ||
---|---|---|
| or |
|
The equations use these variables.
EErr | Energy conservation error |
Etotal | Total energy modified by block |
EnrgyBalRelTol, EnrgyBalAbsTol | Energy balance relative and absolute tolerance, respectively |
Ptrans, Etrans | Transferred power and energy, respectively |
Pnottrans, Enottrans | Not transferred power and energy, respectively |
Pstore, Estore | Stored power and energy, respectively |
Pinput, Poutput | Input and output power logged by Power Accounting Bus Creator block |
Data Types: double
EnrgyUnits
— Energy units
MJ
(default) | J
Energy units.
Example: VehPwrAnalysis.EnrgyUnits = 'MJ';
Data Types: char
PwrUnits
— Power units
kW
(default) | W
Power units.
Example: VehPwrAnalysis.PwrUnits = 'kW';
Data Types: char
Object Functions
addLoggedData | Add logged data |
dispSignalSummary | Display powertrain subsystem energy analysis |
dispSysSummary | Display powertrain system efficiency |
findChildSys | Powertrain subsystem energy analysis |
histogramEff | Display powertrain subsystem efficiency histogram |
isEnrgyBalanced | Logical flag for energy conservation |
loggingOff | Turn signal logging off |
loggingOn | Turn signal logging on |
run | Run powertrain energy and power analysis |
sdiSummary | Display Simulation Data Inspector plots of powertrain energy and power |
xlsSysSummary | Write powertrain energy analysis to spreadsheet |
Examples
Create PlantInfo
Object for Powertrain Energy Analysis
Analyze the power and energy in the conventional vehicle reference
application. To create a PlantInfo
object, see step 2.
Open the conventional vehicle reference application. By default, the application has a mapped 1.5 L spark-ignition (SI) engine and a dual clutch transmission. Project files open in a writable location.
Set the system name to ConfiguredConventionalVirtualVehicle
.
Create the autoblks.pwr.PlantInfo
object.
Use the PwrUnits
and EnrgyUnits
properties to
specify the units.
SysName = 'ConfiguredConventionalVirtualVehicle'; VehPwrAnalysis = autoblks.pwr.PlantInfo(SysName); VehPwrAnalysis.PwrUnits = 'kW'; VehPwrAnalysis.EnrgyUnits = 'MJ';
Use the run
method to turn on logging, run simulation, and add
logged data to the object.
run(VehPwrAnalysis);
Use the dispSysSummary
method to display the results.
dispSysSummary(VehPwrAnalysis);
Use the xlsSysSummary
method to write the results to a
spreadsheet.
xlsSysSummary(VehPwrAnalysis,'EnergySummary.xlsx');
Use the findChildSys
method to retrieve the
autoblks.pwr.PlantInfo
object for the Engine subsystem.
To display the results, use the dispSignalSummary
method.
Use the histogramEff
method to display a histogram of the time
spent at each engine plant efficiency.
EngSysName = SysName+"/Vehicle/ConfiguredSimulinkPlantModel/Engine";
EngPwrAnalysis = VehPwrAnalysis.findChildSys(EngSysName);
dispSignalSummary(EngPwrAnalysis,EngSysName);
histogramEff(EngPwrAnalysis);
Use the findChildSys
method to retrieve the
autoblks.pwr.PlantInfo
object for the Transmission
subsystem.
To display the results, use the dispSignalSummary
method.
TransSysName = SysName+"/Vehicle/ConfiguredSimulinkPlantModel/Transmission";
TransPwrAnalysis = findChildSys(VehPwrAnalysis,TransSysName);
dispSignalSummary(TransPwrAnalysis,TransSysName);
To plot the results, use the sdiSummary
method.
sdiSummary(VehPwrAnalysis,{EngSysName,TransSysName})
Version History
Introduced in R2019a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)