‫But, OK, you know that the solution that gives you your minimum cost function is zero and zero based
‫on the matrices and vectors that you have here, a double bar and small have transposed.
‫But we haven't considered the constraints yet.
‫Let's see if this solution.
‫Zero and zero, if it also satisfies all your constraints so you have your G Matrix and H Vector transposed,
‫the general form for the linear inequality constraints is G times, don't you?
‫Global less than or equal to and the H vector?
‫And so this is my G matrix.
‫This is my Delta Global.
‫And this is my h vector.
‫If I multiply g by Delta, you global, then I will have all that.
‫So this is my system of inequality equations.
‫So I have four equations.
‫And since my solution was there was a Delta zero equals zero radiance and Delta a zero equals zero meters
‫per second squared.
‫These equations, they will become these ones here.
‫So on the left side, everything will become zero because my delta a zero is zero.
‫Delta Delta zero zero.
‫And the same thing here and here.
‫So let's see if these statements are true.
‫You can see that the final one is true.
‫Zero is less than or equal to zero point zero eight o four.
‫Also, this one is true.
‫Also, this one is true, but this one is false.
‫It says that zero is less than or equal to minus zero point zero zero three.
‫But that's wrong.
‫Zero is not less than minus zero point zero zero three zero is greater than minus zero point zero zero
‫three.
‫So this solution here, Delta U.
‫Global, equals zero zero.
‫It does not satisfy all the constraints this constraint here.
‫It's not satisfied, but OK, can we find another combination of Delta Delta Zero and Delta A0 that
‫satisfies all these four constraints?
‫OK.
‫Your G would be, of course, bigger than its global minimum.
‫J Min.
‫So you're jamming with the constraints would be greater than G min without the constraints.
‫But that's OK.
‫Well, let's look at this first equation.
‫You have minus zero point zero two times Delta zero less than or equal to minus zero point zero zero
‫three.
‫If we solve this inequality equation, then you will have Delta a zero greater than or equal to minus
‫zero point zero zero three, divided by minus 0.02.
‫The reason why the sine changed its direction is because I divided this side by a negative number,
‫and I divided this side by a negative number, the same number, actually.
‫And if I do that, then this sine it changes its direction.
‫That's why this sine points to the right now.
‫And so you will get 0.15 so your delta a zero is greater than or equal to 0.15.
‫That means that in order to make this statement true, your Delta A0 can only range from 0.15 to + infinity.
‫So your Delta A0 is included in the set 0.15 and plus infinity if it ranges between 0.15 and plus infinity.
‫Then this statement is true.
‫If my Delta A0 is less than 0.15, then it will make this statement false.
‫You can try it out.
‫Take a random number between 0.15 and + infinity for Delta A0 and then put it here and see if this statement
‫is true and then take a random number that is less than 0.15.
‫Put it here and see if it's true or false.
‫So maybe then I can have a solid.
‫Russian Delta, You Global equals zero for my Delta Delta zero and 0.15 for my Delta A0.
‫Maybe there would be a good solution in that case, my j minimum.
‫With the constraints, it would be 50 times Delta Delta zero squared plus one half Delta A0 squared.
‫The first term would be 50 times zero squared.
‫The second term would be zero point fifteen squared and that would be zero point zero one one two five.
‫So you can see that my g min with the constraints is greater than my German without the constraints
‫because that one was zero.
‫But that's okay, right?
‫I mean, our cost function is slightly bigger than is a global minimum, but we have still minimized
‫it while respecting our constraints, right?
‫Wrong.
‫Yes.
‫We have satisfied this constraint.
‫And also, this one is OK and this one is OK, but what about the fourth constraint?
‫Now this one is not satisfied.
‫In order to satisfy this constraint, your delta A0 must be less than or equal to zero point zero eight
‫04.
‫In other words, Delta A0 can range between minus infinity and zero point zero eight 04.
‫That's what it says.
‫You don't even have to solve this equation.
‫It's already in the solved form, and he tells you that it cannot be greater than zero point zero eight
‫or four.
‫So for the first constraint, your Delta A0 could vary between 0.15 and plus infinity.
‫For the fourth constraint, your Delta A0 could vary from minus infinity to 0.08 or four.
‫So if I draw a number line here, I have minus infinity on one side, plus infinity on another side.
‫This number line is, of course, for Delta A0, and then I'm going to have here zero point zero, eight
‫or four and then 0.15.
‫And so if my Delta A0 goes from 0.15 to plus infinity, then my first constraint is satisfied.
‫And then if I go from zero point zero eight or for to minus infinity, then my fourth constraint is
‫satisfied.
‫And now, can you see the problem?
‫You can clearly see that you can never satisfy both constraints.
‫You either satisfy one constraint if you're in this region or you satisfy the fourth constraint.
‫If you're in this region and if you're in this region, well, then you violate both constraints.
‫If instead of this constraint, I had, for example, Delta A0 less than or equal to zero point eight
‫oh four knots zero point zero eight or four, but zero point eight or four.
‫Then if this is my delta easier no line, then my zero point eight or four, it would be here.
‫0.15 would be here.
‫And so for the first constraint, I would go like this for the fourth constraint, I would go like this.
‫Then you can see that in this region, when you're Delta Zero ranges from 0.15 and zero, eight or four,
‫that's where you satisfy both constraints.
‫And then it would be OK.
‫All the constraints with your Delta Delta Zero are already satisfied when you're Delta Delta zero equals
‫zero.
‫And in this case, if you had this constraint for your fourth one, then for as long as your Delta A0
‫is between this interval, then you would also satisfy your first and your fourth constraint.
‫And then you would simply need to find the Delta A0 inside this interval that would minimize your cost
‫function.
‫The most?
‫However, that's not our case, in our case, your Delta A0 is less than or equal to zero point zero,
‫eight or four.
‫And as you can see from the no line, there is simply no way for you to satisfy all the constraints.
‫And that's when the solver will give you an error, or it will simply tell you that you have a value
‫error.
‫Your constraints are inconsistent and you have no solution.
‫Or what I have seen is that in MATLAB, your quattro proc, it will simply give you an empty array.
‫It just means that there are no solutions out there that can minimize your cost function and satisfy
‫all the constraints.
‫So this has been a small numerical example to give you a feel for what it means when the solver tells
‫you that there are no solutions found for your optimization problem, and this problem is something
‫that you will have to deal with a lot.
‫In fact, that's what happened here in trajectory to the solver simply did not find a solution that
‫can satisfy all the constraints.
‫As a result, you see this kind of behavior.
‫Everything just goes to zero.
‫Your CI X and Y values also your body frame ex dot your body frame y dot your side, dot your net longitudinal
‫acceleration, your lateral acceleration and your angular acceleration.
‫So what can caused this problem?
‫Well, in Trajectory two, it was caused by this big jump in your longitudinal velocity reference values,
‫but it can also happen if you don't have that discontinuity.
‫It can happen if, for example, your NPC weights are tuned in a bad way or you ask the car to do unrealistic
‫things, maybe in your trajectory your turns are too sharp.
‫Maybe you want to perform your turn at very high speeds, or maybe you have both of these problems,
‫maybe your constraints.
‫Maybe they are too strict.
‫If you only allow your steering wheel angle to turn one degree to the left and one degree to the right,
‫then that could be a problem in those cases.
‫Try adjusting your NPC weights or try to loosen up your constraints as much as possible or make your
‫trajectory smoother and make sure that you turn at realistic speeds.
‫Try to avoid sharp turns, etc. In.
‫Of course, the controller works best for smooth trajectories without terms that are too sharp.
‫Thank you very much.