Version: 11.0

    Show / Hide Table of Contents

    Example - EV Drivetrain

    A script executed in MATLAB® will use the MASTA API to:

    • Load 2 MASTA models (a baseline model and a modified model)

    • Run gear whine analysis for a specified load case

    • Obtain bearing force response to a specified harmonic of a specified harmonic for both designs

    • Plot and compare the results from both designs

    EV Drivetrain Model in MASTA

    The model can be found on the Examples menu.

    Drivetrain Model

    • Save the model as 'EV Drivetrain Baseline' EV Drivetrain Baseline

    • Make a copy and save as 'EV Drivetrain Modified' EV Drivetrain Modified

    • Modify the inner profile of the Input Shaft as shown and save.

    This will add some mass and stiffness to the shaft.

    Adding MASTA API to MATLAB®

    • Start MATLAB®

    • Add the .m file 'Add_MASTA_API' to your working directory

    • Change the mastaDirectory to be the MASTA installation folder on your machine

    • Run the script

    This will load the MASTA API .NET assembly into MATLAB®. MATLAB® Setup

    MATLAB® Script

    • Add ‘EV_Drivetrain_Example.m’ to your working directory

    • In the setup part of the script, change the pathnames to point to where you have saved the MASTA models

      MATLAB® Setup

    Setup

    This part of the script defines the MASTA model pathnames, load case (in design state) to run, which harmonic of which excitation to get results for and for which node of which accelerometers to extract data

    Script Setup

    Execute Analysis

    This part of the script identifies which load case to run, and performs gear whine analysis on that load case

    Script Execute

    Obtain Results

    This part of the script uses harmonic and excitation information to find the accelerations for the specified node of the specified accelerometers

    This contains a workaround for accessing the point loads that represent the accelerometers

    Plot Results

    This part of the script plots all accelerometer accelerations for design 1, all accelerometer accelerations for design 2 and the accelerometer acceleration of the third accelerometer in the list for design 1 and design 2 on the same chart.

    Plot Results

    Results

    • Run the script

    The entire script takes approximately 3 minutes to run. The results can be compared between the MASTA and MATLAB® plots:

    Results

    Results Comparison
    Figure 2 - All specified accelerometer accelerations for design 1 (baseline)

    Results Comparison
    Figure 3 - All specified accelerometer accelerations for design 2 (modified).

    The modified design shows a slight reduction in peak acceleration at 5500 Hz, but an increase at 6000 Hz.

    Results Comparison
    Figure 4 - Direct comparison of a selected accelerometer for design 1 and design 2.

    Modify Script

    The script can be modified to look at the 2nd harmonic results.

    Modified Script

    Conclusions

    The MASTA API has successfully been loaded and used by MATLAB®.

    Results from two different MASTA models have been obtained and compared in a single process, with no manual intervention by the user.

    In This Article
    • EV Drivetrain Model in MASTA
    • Adding MASTA API to MATLAB®
    • MATLAB® Script
      • Setup
      • Execute Analysis
      • Obtain Results
      • Plot Results
    • Results
      • Modify Script
    • Conclusions
    Back to top