Starting from:

$20

ME227-Assignment 6: Linearization and Project Reflection Solved

Problem 1 – Linearization
In the last homework, you used your intuition about vehicle dynamics to determine signs of feedback gains to stabilize around a drift equilibrium. This week, we are going to learn how we can compute a linearization and use linear control techniques to determine these gains, rather than by inspection.

For all the following problems, consider a drift equilibrium consisting of req = 0.7486 rad/s, Uy,eq = −8.661 m/s, Ux,eq = 10.3224 m/s, δeq = −0.5132 rad, and Fxr,eq = 7317 N.

(This is derived from drifting an 18 meter radius path (κ = 1/18) with constant sideslip of −40°)

Question 1.A – Linearization of our Velocity Dynamics (MATLAB Grader)
Up until now, we have linearized our dynamics via linear assumptions, such as small angle approximations and linear tires. We will now directly linearize our dynamics (which allows analysis and control of cool vehicle behavior such as drifting).

Consider just our velocity states, so x = [r,Uy]T. We can write our dynamics as being a nonlinear function of our state and steering input (forget Fxr for now - assume we are using the same longitudinal controller from HW5): x˙ = f(x,δ)

We can linearize the dynamics and write our system as:

x˙ = f(xeq) + A(x − xeq) + B(δ − δeq) = A(x − xeq) + B(δ − δeq)

x¯˙ = Ax¯ + Bδ¯

                                                                                                                                                             (6.1)

                                                                                                                                                                        (6.2)

To calculate the partial derivatives, we need to carefully consider what each term in our dynamics is a function of. Based on the Fiala lateral tire model:

Fyf = f(αf) = f(Uy,r,δ)

Generally while drifting, αr αsl so:

Fyr = f(Fxr)

So to calculate the first entry in the A matrix:

 

To calculate  , we then need to take the derivative of each term in the Fiala model with respect to r. The rest of the derivatives can be computed similarly.

For this two state model we have computed the A & B matrices for you (so you won’t need to take the derivative of the Fiala model). However, make sure you understand how one could compute each term in A & B, as you will be finding some of the derivatives in the next problem.

                                                                                                                                                     (6.3)

                                                                                                                                                                            (6.4)

Finally, lets use the control law δ¯ = −Kx¯ (full state feedback).

Find the gain vector K that puts the poles of the closed loop system at -4 and -8. Compute this by hand and show your work. Submit your gain vector to MATLAB Grader.

Question 1.B – Incorporating Path Tracking (MATLAB Grader)
Drifting by itself is pretty cool, but what if we wanted to incorporate a reference path? Let’s define a new state x = [r,Uy,e,∆ψ]T.

Find a value for ∆ψeq given the drift equilibrium we are using in this problem. Do not make any small angle assumptions.

Let’s linearize these dynamics as before and then try to find gains that stabilize the system. This time, our linearized matrices are:

                                                                                                                                (6.5)

                                                                                                                                                                       (6.6)

Find ∆ψss and the new linearized dynamics matrices. Using full state feedback as before, place the poles at [-4 +/- 4.5j, -0.15 +/- 0.75j]. You are encouraged to use the ’place’ function in

MATLAB. Report your gain vector and ∆ψss on MATLAB Grader

Question 1.C – Simulation (MATLAB Online / Gradescope)
Let’s see if the gains for combined drifting and path tracking work. Implement our new controller using the provided simulator framework.

We have provided the 18m radius reference path, as well as the lower level functions that you have implemented several times by now. You only need to edit the file called mainproblem  1c.

Provide two plots, one of the velocity states (Ux, Uy, r) and one of our path tracking errors (Fig’s 2 &4 in provided plotting script). Do the results match what you expected, based on our closed loop pole locations? Why or why not.


Problem 2 – Reflection
You’ve completed your project. You’ve watched your lookahead and group controller executed on a real vehicle. You’re officially a vehicle dynamicist!

In the project, you developed feedforward and feedback controllers for steering Niki along a defined path. Having had a chance to try those controllers on the actual car, you now have additional information about the appropriateness of your design choices beyond what you could gain from simulation. We want you to reflect on your project experience in light of this new information. This should be an individual response, not a team response. If you do find something wrong in your code when answering the first question, however, you can (and should) point this out to your teammates.

With the data and video from your vehicle testing, let’s take a closer look at how your simulated performance compares to the actual performance on the vehicle.

Question 2.A – Reflection of Lookahead Controller (Gradescope)
We’ll start with a reflection on your lookahead controller. Let’s take a look at your code and make sure that everything was actually implemented correctly. A couple of teams had some implementation issues so, if your results seemed strange, check again that your code was written correctly.

Next, consider whether you think the amount of feedback and feedforward was appropriate. Feedforward enables you to lower feedback gains by adjusting the steering to the value you expect you need for a turn. It can, however, lead to errors if the feedforward steering is not exact (which is very possible if there is even a slight misalignment of the steering). Feedback – particularly proportional feedback – reduces the steady-state error but also makes the system response faster, potentially amplifying noise or the effects of delay.

(1)               Was everything implemented correctly? If not, what implementation challenges did your team run into?

(2)               Did each of your controllers effectively use feedback and feedforward? Support your conclusion with plots of your performance.

Question 2.B – Reflection of Group Controller (Gradescope)
Now let’s move on to your group’s controller. Let’s take a look at your code once more to make sure that everything was actually implemented correctly. Let’s again consider whether you think the amount of feedback and feedforward was appropriate in this case.

(1)               Was everything implemented correctly? If not, what implementation challenges did your team run into?

(2)               Did each of your controllers effectively use feedback and feedforward? Support your conclusion with plots of your performance.

Question 2.C – Reflection of Project (Gradescope)
Now that we’ve reflected on both the lookahead controller and your group’s controller, let’s reflect on what we’ve learned from the design, analysis, and testing of these controllers.

(1)   What did you take away from the project?

(2)   What, if anything, is still unclear to you about the controllers you used or linear vehicle dynamics after this project?

More products