run

Run powertrain energy and power analysis

Description

example

Use the run(PlantInfoObj) method to turn signal logging on, run a powertrain energy and power analysis, and add data to the 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

collapse all

Analyze the power and energy in the conventional vehicle reference application. To use the run method for the analysis, see step 3.

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

  2. Set the system name to SiCiPtReferenceApplication.

    Create the autoblks.pwr.PlantInfo object.

    Use the PwrUnits and EnrgyUnits properties to specify the units.

    SysName = 'SiCiPtReferenceApplication';
    VehPwrAnalysis = autoblks.pwr.PlantInfo(SysName);
    VehPwrAnalysis.PwrUnits = 'kW';
    VehPwrAnalysis.EnrgyUnits = 'MJ';
  3. Use the run method to turn on logging, run simulation, and add logged data to the object.

    run(VehPwrAnalysis);
  4. Use the dispSysSummary method to display the results.

    dispSysSummary(VehPwrAnalysis);
  5. Use the xlsSysSummary method to write the results to a spreadsheet.

    xlsSysSummary(VehPwrAnalysis,'EnergySummary.xlsx');
  6. 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 = 'SiCiPtReferenceApplication/Passenger Car/Engine';
    EngPwrAnalysis = findChildSys(VehPwrAnalysis,EngSysName);
    dispSignalSummary(EngPwrAnalysis);
    histogramEff(EngPwrAnalysis);
  7. Use the findChildSys method to retrieve the autoblks.pwr.PlantInfo object for the Drivetrain subsystem.

    To display the results, use the dispSignalSummary method.

    DrvtrnSysName = 'SiCiPtReferenceApplication/Passenger Car/Drivetrain';
    DrvtrnPwrAnalysis = findChildSys(VehPwrAnalysis,DrvtrnSysName);
    dispSignalSummary(DrvtrnPwrAnalysis);
  8. To plot the results, use the sdiSummary method.

    sdiSummary(VehPwrAnalysis,{EngSysName,DrvtrnSysName})

Input Arguments

collapse all

autoblks.pwr.PlantInfo object for the system that you want to analyze.

Introduced in R2019a