run
Run powertrain energy and power analysis
Syntax
Description
Use the run(
method to turn
signal logging on, run a powertrain energy and power analysis, and add data to the
PlantInfoObj
)autoblks.pwr.PlantInfo
object. Use instances of the autoblks.pwr.PlantInfo
object to evaluate and report power an energy for
component-level blocks and system-level models.
Examples
Use run
Method for Powertrain Energy Analysis
Analyze the power and energy in the conventional vehicle reference
application. To use the run
method for the analysis, see step 3.
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})
Input Arguments
PlantInfoObj
— Instance of PlantInfo
object
autoblks.pwr.PlantInfo
object
autoblks.pwr.PlantInfo
object for the system that you want to
analyze.
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 (한국어)