$20
Purpose
In this assignment, we will add longitudinal and lateral weight transfer to our bicycle model and see how handling at the limits of tire friction can be influenced by load transfer. We’ll consider load transfer caused by braking, acceleration, and suspension roll stiffness.
We’ll explore these concepts while using a new tire model, the Pacejka Magic Formula (MF). The MF tire model is a semi-empirical model that has stood as a reference point in tire modelling since its introduction in the late 1980s.
Download the source code zip folder hw7.zip from Canvas. In it you’ll find the code you’ll need for Problems 1, 3 and 4.
Additionally, some problems will make use of MATLAB Online or a normal MATLAB desktop installation. For these problems we will give you most of the source code needed for the problem. See our Piazza post for more information about how to setup MATLAB Online.
When writing functions and running simulations, use the set of parameters given to you for Niki. These will be available in each MATLAB Grader problem where they are appropriate. The values of these paramters for Niki are also given in Appendix A and B at the end of this document.
1
Exploring the Magic Formula
In this assignment, we will move away from the Modified Fiala Tire Model that we’ve been using and explore the Pacejka Magic Formula tire model. The Modified Fiala Model is a good, simple way to represent tire force generation, and we can derive it nicely from physical observations. However, the Magic Formula is able to represent some more complex tire characteristics that often interest manufacturers and racing teams so it has evolved into the industry standard since its inception in the late 1980s. In its more complex form, we can use it to calculate Fx and Fy using longitudinal slip, lateral slip, tire load, friction coefficient and wheel camber. We’ve decided to introduce it here to give you exposure to what you may see in industry, not because the Fiala Model is flawed. Quite the opposite, The Fiala Model does a very good job of representing our tire dynamics given its simplicity.
If you’d like to read more about the Magic Formula, we recommend checking out Pacejka’s Tire and Vehicle
Dynamics (https://www.sciencedirect.com/science/article/pii/B9780080970165000048). For the context of this homework, we will use a simplified Magic Formula of the form Fy = f(µ,Fz,Fx,α) to calculate lateral force analogously to the simplified Fiala Model.
Let’s compare Fyf and Fyr from the two models:
If you’re looking at the plots and saying, ”these two models look pretty much the same,” that is the point. We’ve simply substituted one mathematical representation for our tires for another, both tuned for the same set of tires. We can notice some difference between the curves in the slip range between the linear and saturated regions, and that is where these models tend to differ slightly with the Magic Formula more closely matching recorded data.
The Teaching Team has taken care of implementation of the Magic Formula in MF_tire.m. Nonetheless, we do recommend checking out the magic behind the Magic Formula in some of Pacejka’s papers.
Problem 1 – How to Race Through the Hairpin Corner
In this problem we’ll gain some intuition about how we’ll manuever through the hairpin corner described below:
hairpin_corner.mat contains path information about a 180 degree hairpin turn in the same format we used in the project. The path consists of a straight of 40m, a clothoid segment 100m long, a 75m radius arc segment with a length of 135m, another 100m clothoid, and finally another 40m straight.
The file also contains the desired acceleration and velocity profiles for the corner. These were calculated using a simple friction circle model, so they aren’t necessarily what the vehicle will be able to achieve.
Download and unzip the hw7.zip file from Canvas. Open up the viewPathAndSpeedProfile.m script in the Problem1/ directory. Run this script in MATLAB Online or MATLAB Desktop to plot the path and speed profile described in the problem info. You don’t need to add or modify any code here, you just need the plots to answer the following question.
Question 1.A – Understanding the Hairpin Corner (Gradescope)
Refer to the plots generated in viewPathAndSpeedProfile.m and answer the following questions:
1. At what speed does the car travel on the constant radius arc?
2. What lateral acceleration (in g’s) does this correspond to?
3. At what level of acceleration (in g’s) is the car braking on the initial straight?
4. At what level of acceleration (in g’s) is the car accelerating on the final straight?
Answer the questions based on the plots of the path and speed profile for the hairpin corner.
Problem 2 – Calculating Weight Transfer and Effective Friction Coefficient
When modeling vehicle behavior at the limits, there are three new phenomena we need to account for which we have not simulated previously. These are:
• Longitudinal load transfer
• Lateral load transfer
• Friction as a function of tire normal load
In class we derived equations for lateral and longitudinal weight transfer. To combine them, simply calculate the longitudinal weight transfer from the longitudinal acceleration and the lateral weight transfer from the lateral accleration and sum the effects on each wheel.
Be careful when calculating the lateral load transfer term proportional to the roll center height. Think about what the proper weight or normal force is to use for this term. If you understand the static roll model and its underlying assumptions, there is a clear answer here.
Question 2.A – Calculating Weight Transfer (MATLAB Grader)
Follow the prompts on MATLAB Grader to create a function to calculate the normal load on each tire and the body roll angle given longitudinal and lateral accelerations.
Question 2.B – Calculating Effective Friction (MATLAB Grader)
Follow the prompts on MATLAB Grader to create a function to calculate the effective friction available at each axle.
You should use the following relationship for friction coefficient as a function of normal load to get the friction at each tire:
µ = 1.25 − (4.0 × 10−5)Fz
You can then find the effective friction coefficient for each axle by taking a weighted sum of the left and right tires:
Question 2.C – How Does Weight Transfer Affect Friction (Gradescope)
In the ”Run Function” section of the MATLAB Grader assignment Question 2.B, there are three combinations of roll stiffness as listed in Table 7.1 below.
Combination
Parameter
Value
Combination A
Front Roll Stiffness Kφf
40,000 Nm/rad
Rear Roll Stiffness Kφr
80,000 Nm/rad
Combination B
Front Roll Stiffness Kφf
90,000 Nm/rad
Rear Roll Stiffness Kφr
30,000 Nm/rad
Combination C
Front Roll Stiffness Kφf
70,000 Nm/rad
Rear Roll Stiffness Kφr
50,000 Nm/rad
Table 7.1: Roll Stiffness Combinations
A quick way to gain intuition about the effects of roll stiffness is to see how the car behaves at a constant lateral acceleration. Here we’ve set up a scenario where the vehicle is cornering at 0.9g. Run your function and answer the following questions for each combination of roll stiffnesses:
1. What is the roll angle at 0.9g lateral acceleration?
2. How much load is on each tire when the vehicle is cornering at 0.9g?
3. What are the front and rear friction coefficients when the vehicle is cornering at 0.9g?
Answer the questions about the vehicle’s behavior for each combination of roll stiffnesses.
Problem 3 – Simulating and Tuning Vehicle Setup
Through previous homeworks, you’ve built up a nonlinear vehicle simulator to analyze vehicle behavior and design autonomous controllers. As you saw in the project, this simulator captures a good amount of detail of the vehicle’s real behavior, but not all of it. In this question we will add one more level of complexity by accounting for weight transfer and roll effects. We have supplied all of the code you need for this Problem in the Problem3/ directory included in the hw7.zip file on Canvas.
In this problem we will simulate Niki racing through the hairpin corner you saw in Problem 1. It is important to note that Niki is front wheel drive; this will frame your analysis of Niki’s behavior through the manuever. The simulation will run for 14 seconds. By keeping the simulation time the same, we can compare the value of s reached when the simulation ends. A higher value of s means we made greater progress through the corner, and consequently did a better job navigating the corner.
The simulator included here is essentially your nonlinear vehicle simulator with the weight transfer and effective friction calculation functions you wrote in Problem 2. This is all conducted using the MF tire model, not the modified Fiala Model we’ve used in previous assignments.
When asked you will just need to comment/uncomment different roll stiffness and brake distribution combinations in the simulator.m script and run the simulation to see how a different setup affects you performance through the corner. You will then need to implement aerodynamic effects in aero_effects.m from a splitter and wing that we’ll mount on Niki.
Question 3.A – Benchmarking Our Setup (MATLAB Online / Gradescope)
Begin with a brake distribution of 64%/36% between the front and rear axle, and roll stiffness Combination A (from Table 7.1). If we want to be able to follow the path within 2m of the desired path, how are we doing at this point? Which tire saturates at the start of the turn? Is this limit understeer or limit oversteer behavior? What evidence do we have that this is the case?
Run the simulation and answer the questions about the vehicle’s behavior. Include the tire force plots.
Question 3.B – Tuning Roll Stiffness (MATLAB Online / Gradescope)
Let’s try to address our handling problems by adjusting roll stiffness. Combination A has the majority of the stiffness on the rear axle which is not common for passenger vehicles. Let’s try the simulation again with Combination B to see if we do any better.
Did this correct the problem we saw with Combination A? Did it create another issue, and if so, what was it? Did we make better progress through the corner (in other words, is our final distance along the path greater at the end of our 14 second simulation time)?
Run the simulation and answer the questions about the vehicle’s behavior. Include the tire force plots.
Question 3.C – Tuning Roll Stiffness – Continued (MATLAB Online / Gradescope)
Finally, try roll stiffness Combination C in the simulation. This combination is closest to what you would see on the production vehicle. Describe what is happening to the car through the corner and why that is different from Combination A or Combination B. Which combination allows us to cover the greatest distance in our 14 second simulation period? What is the maximum absolute lateral error?
Run the simulation and answer the questions about the vehicle’s behavior. Include the tire force plots.
Question 3.D – Tuning Brake Proportioning (MATLAB Online / Gradescope)
Now that we have an idea of how to best setup our roll stiffness from Question 3.C, let’s take a look at changing the brake setup. Set up the simulation with roll stiffness Combination C.
Change the brake proportioning to 36%/64% between the front and rear axle. Describe what is happening to the vehicle with this setup, and what problems we’ve created by reversing the brake proportioning.
NOTE: You will get warnings about tire forces when running this setup. Why do these warnings crop up? This should give you a hint as to what is happening.
Run the simulation and answer the questions about the vehicle’s behavior. Include the tire force plots.
Problem 4 – Tricking Out Niki
We’ve decided that Niki needs an upgrade. You are to mount a full aerodynamic-enhancing body kit on Niki. Let’s envision Niki looking something like this:
https://www.rtheorymotorsports.com/shop/mk7-golf-tsigtir-rear-wing-kit
We added a front splitter and a rear wing. The additional downforce for each of these can be modelled as:
CLA is the coefficient of lift for that wing. ρ is the air density.
This may look familiar to one of the feedforward components of the longitudinal controller you implemented in the project. And in fact, we can use the same equation with different coefficients (where CDA is the coefficient of drag) to model the additional drag caused by the new wings:
Question 4.A – Adding Aerodynamics (MATLAB Online / Gradescope)
Modify aero_effects.m to implement the added downforce and drag from the wing. We can assume that the front wing aero forces act at the center of the front wheel and that the rear wing aero forces act at a distance veh.hRwing directly above the rear wheel. We can also assume that the front wing acts equally on the left and right front wheels and that the rear wing acts equally on the left and right rear wheels. Here is a free body diagram of the GTI with the forces we added with the two wings.
https://www.vw.com/en/models/golf-gti.html
Note: The drag on the rear wing will have an impact on the downforce on the front axle. Be sure to account for this.
Restore Niki’s brake distribution to the original 64/36. Now, simulate the same curve as in the previous problem. How does the distance covered compare to Question 3C? How does the maximum lateral error compare to 3C? Plot the front and rear tire forces. Provide the plots and describe what is happening. Does it make sense to add an aero kit to Niki?
Run the simulation and answer the questions about the vehicle’s behavior. Was it a good idea to upgrade Niki? Include the tire force plots.
Appendix A – Vehicle Parameters
Variable Name
Value
Units
Description
veh.m
1926.2
kg
Mass (Includes 4 passengers)
veh.Iz
2763.49
kgm2
Yaw Moment of Inertia
veh.a
1.264
m
Distance from Center of Mass to Front Axle
veh.b
1.367
m
Distance from Center of Mass to Rear Axle
veh.L
2.631
m
Wheelbase
veh.Wf
9817.9
N
Static front axle weight
veh.Wr
9078.1
N
Static rear axle weight
Table 7.2: Vehicle Parameters and Values
Appendix B – Tire Parameters
Linear Tire Model
Variable Name
Value
Units
Description
f_tire.ca_lin
80,000
N/rad
Front Cornering Stiffness
r_tire.ca_lin
120,000
N/rad
Rear Cornering Stiffness
Table 7.3: Linear Tire Model Parameters
Appendix C – Aero Parameters
Variable Name
Value
Units
Description
veh.hRwing
1.5480
m
Distance from rear wheel center to rear wing
veh.cdAf
0.0180
m2
Drag coefficient of the front wing
veh.cdAr
0.0315
m2
Drag coefficient of rear wing
veh.clAf
0.1080
m2
Lift coefficient of front wing
veh.clAr
0.2331
m2
Lift coefficient of rear wing