xlsSysSummary
Write powertrain energy analysis to spreadsheet
Description
The
xlsSysSummary(
method exports the system energy and efficiency for the
PlantInfoObj,filename,sheet)autoblks.pwr.PlantInfo object. Use the autoblks.pwr.PlantInfo object to evaluate and report power and energy for
component-level blocks and system-level models.
After you use the run method to analyze the powertrain power and
energy, use the xlsSysSummary method to write the results to a
spreadsheet.
Examples
Analyze the power and energy in the conventional vehicle reference
application. Use the xlsSysSummary method to write the results to a
spreadsheet.
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 = 'kW*h';
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})To create a Sankey diagram, use the createSankeyPlot method.
VehOnlyAnalysis = VehPwrAnalysis.findChildSys(SysName + "/Vehicle");
SankeySubsystems = string({VehOnlyAnalysis.Children.SysName});
createSankeyPlot(VehPwrAnalysis,ChildSys=SankeySubsystems);Input Arguments
autoblks.pwr.PlantInfo object for the system that you want to
analyze.
Data Types: function_handle
File name, specified as a character vector or a string.
If filename does not exist, xlsSysSummary
creates a file, determining the format based on the specified extension. To create a
file compatible with Excel® 97–2003 software, specify an extension of .xls. To
create files in Excel 2007 formats, specify an extension of .xlsx,
.xlsb, or .xlsm. If you do not specify an
extension, xlsSysSummary uses the default,
.xls.
Example: 'myFile.xlsx' or
"myFile.xlsx"
Example: 'C:\myFolder\myFile.xlsx'
Example: 'myFile.csv'
Data Types: char | string
Worksheet name, specified as one of the following:
Character vector or string that contains the worksheet name. The name cannot contain a colon (
:). To determine the names of the sheets in a spreadsheet file, usexlsfinfo.Positive integer that indicates the worksheet index.
If sheet does not exist, xlswrite adds a sheet
at the end of the worksheet collection. If sheet is an index larger
than the number of worksheets, xlswrite appends empty sheets until
the number of worksheets in the workbook equals sheet. In either
case, xlswrite generates a warning indicating that it has added a
worksheet.
Data Types: char | string | single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64
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.
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.
América
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- 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)