Electric Powertrain: Simscape Essentials for Automotive Student Teams - MATLAB & Simulink
Video Player is loading.
Current Time 0:00
Duration 8:38
Loaded: 1.93%
Stream Type LIVE
Remaining Time 8:38
 
1x
  • Chapters
  • descriptions off, selected
  • en (Main), selected
    Video length is 8:38

    Electric Powertrain: Simscape Essentials for Automotive Student Teams

    From the series: Simscape Essentials for Automotive Student Teams

    In this second video in our series on Simscape™ for automotive student teams, we discuss how a simplified electric powertrain model can be represented. This includes a battery model, a motor, and a differential.

    Published: 5 Mar 2024

    In the last video, Nobu showed how you could build a vehicle glider model with aerodynamics and tire models in Simscape. He then showed you could take that model and roll it down a hill and prove that our brake model allowed us to stop the vehicle.

    In this video, as part two what we're going to do is show how we add a powertrain to this so we can start simulating drive cycles or lap simulation. To do this, we need a couple of things. First, we need a model of our differential so that we can split power between our rear wheels. Then to power that differential and actually provide torque to our mechanical system, we need a model of our motor.

    And then to provide the energy that we need to spin that motor, on the electrical side we need some sort of battery model. Once we have these hooked up, the last thing we're going to need is some sort of model of our driver. We're going to take the velocity that we're trying to reach, provide some control signals to our motor, and look at vehicle feedback in order to drive the vehicle over that .

    In the Simscape Essentials repository, we have a vehicle model that's built up to add all of these components. In our vehicle model, we bring in the same brake and chassis models that we used in the first video. We have our vehicle body as well as four tire model. The only addition we need to make is the Simscape driveline differential block because we need to take power from our motor, which has a single shaft, and split it between our left and right rear wheels.

    Once we've added that, we need to add the rest of our powertrain model. There's only a single connection between our powertrain, mechanically, to the rest of the vehicle. And that is the drive shaft for our differential. If we look in our powertrain model, we have a couple of different components. Let's break those down first.

    We include a motor reducer model because some motors may not have a direct connection between the rotor and the motor output. Right now, we have this set to a ratio of 1 with no losses. So it's just a placeholder in case a motor you want to model has a reducer. The core of our powertrain here is this motor model.

    As you can see, it takes an input of positive and negative voltage. It takes a motor torque command in the form of a physical signal. And right now, although we model a heat output, we have it capped off with a perfect insulator because we don't have any model of how we're dissipating that heat. So right now, it's not impacting any of our vehicle behavior.

    We also have a mechanical connection for the case and rotor, which are the C and R ports, respectively, on the motor. Since we don't want the stator or the case to move, we connect it to a mechanical reference.

    Now, driving our motor is actually this DC to DC converter. What this is doing is ensuring that if the voltage of our battery sags, the DC voltage going to our motor doesn't change. Not all motors have a system like this. In This case, we're actually implementing the motor and the inverter for the motor and the control system into a single block.

    If you're interested in modeling something more specific like a permanent magnet motor or an induction motor that you have parameters for, there are a variety of blocks that represent different types of motors in the Simscape electronics toolbox. And you could replace this with a model that represents your exact type of motor.

    Feeding that DC-DC converter that's maintaining our input voltage is a very simple battery model. Again, we could take this battery model-- in this case, it's just a couple of parameters about how our battery behaves-- and replace it with a very complicated one. With Simscape battery, we could take models of our individual battery cells and build an entire pack model that has its own thermals as well as monitoring individual cell voltages. However, as a starting point, this simplified battery lets us get up and running with the ability to increase complexity of the model later.

    Because Simscape will handle how our components are connected in our schematic for us, all we would have to do is remove this battery model and place a new block that represents our more complex model in its place.

    Now, in order to actually drive our vehicle along some sort of drive cycle, we need a controller that's going to represent our driver, in this case, where it has some desired vehicle speed and is reading back some motor speed and then commands the brake pressure and the torque command to the motor and the brakes, respectively. The way that we have that implemented here, first we convert our reference vehicle speed into a reference motor speed so we can compare them directly. And then we have a simplified PI controller to determine how much brake force and how much torque from our motor we actually need.

    In addition to providing propulsion and torque when accelerating, during deceleration, we can get some regenerative braking effect from our motor. When we're doing that, we need to make sure that we're not actually producing more braking than intended. So we take our motor torque and subtract it from the output of our PI controller to make sure the brakes are making up the rest of that braking.

    In terms of the reference vehicle speed, on the track a driver might be determining that based on practice laps or may have some specific targets in mind. In our case, we have a velocity trace from a Formula Student Vehicle on a lap that we're going to use as our target speed. When we run this, we're going to take that reference speed convert it into brake and torque commands for our vehicle, which will eventually drive the glider model from the previous video forward.

    Once we run our simulation, we can look at our reference vehicle speed and our actual vehicle speed next to each other as well as how much braking pressure was applied as well as the motor torque produced.

    Now, what we might want to look at based on this is how much energy we dissipated over the course of a lap from our battery so that we can determine how much onboard energy we really need given our current vehicle parameters to complete something like an endurance event. However, another important factor in our vehicle design that we haven't covered is how to handle the fact that we need to cool our power electronics.

    In the next video, Veer will go over how we can take this heat output from our motor and dissipate that heat through a cooling system built using Simscape. If you'd like to check out the files used in this video, you can find a link to them in the description. And if you have any questions, feel free to reach out to the team at racinglounge@mathworks.com.