‫So this is the code here, and by the way, in the next section, I'm going to explain the code to you
‫in a more detailed way.
‫However, right now, I just want to show you how the drone behaves when I play around with my polls
‫so I can choose my polls here, polls for the extermination, polls for the why dimension and also polls
‫for the Z dimension.
‫And so my Lunda one is going to be minus one in my lamda.
‫Two is going to be minus two for all three dimensions.
‫And you can see that the drone is able to track the trajectory quite well.
‫So here you have the X dimension, Y dimension and then the Z dimension.
‫So the blue is the reference trajectory and then the red is the true value.
‫And then here you have the fly and then the Seeta and BPCI angles.
‫So, again, Blue is the reference trajectory and then the red is the true trajectory.
‫So you can see the drone is able to follow the trajectory quite well.
‫So this is the examination here.
‫You can see how the drone was able to follow specifically the X dimension and also the X dot dimension.
‫So this is the time derivative of the X dimension and you can see how it is able to follow that as well.
‫The same thing for why and why dot values.
‫You can see the tracking.
‫And here you have Z and then the Z dot values.
‫Here you have the angles and then here you have the control, he puts you one, you to you three and
‫then you four, and then here you have the Omega Omega one, omega two, omega three and Omega four.
‫And now let's look at a more complicated trajectory, but still with these polls, you can see that
‫the drone is able to track the trajectory quite well.
‫This is the X dimension here, the Y dimension and then the Z dimension.
‫And these are the angles.
‫So you can see that the feedback lionization controller is constantly feeding different angles to the
‫NPC controller as reference values, and then the NPC controller is trying to track that.
‫But those reference values, what the feedback lionization controller gives to the NPC controller,
‫they originate from the polls that we have chosen, Lunda one minus one and then Lunda two minus two.
‫And that will, of course, make your K one value in your differential equation.
‫This K one value for X, Y and Z dimension minus two, and then K two values will be minus three.
‫And so that's how it is.
‫So that's how it has been able to track the entire trajectory quite well.
‫That's your X dimension.
‫That's your y dimension.
‫That's your Z dimension, and these are your angles here.
‫You see, if you zoom in, then you will see that the inner loop is running at a faster rate at the
‫higher frequency, so the red line changes several times compared to the blue line, which is the reference
‫values given to the NPC controller by the feedback controller that originated from our choice with regards
‫to our polls.
‫And, of course, the Passi reference angle, well, that's generated by the planner, but the finance
‫and Seeta reference angles, they're generated by the feedback lionization controller.
‫And well, here you have your control inputs, you one year to Q3 and Q4, and here you have Omega's
‫radians per second.
‫But now let's do something else, let's take this poll in the X dimension and let's say that the two
‫still equals minus two, but let's make Lumb the one zero point zero one.
‫So a very small, positive poll and let's see what's going to happen so you can see that it is starting
‫to track the reference line.
‫Well, however.
‫The red line is getting further apart from the blue line in this dimension, you see, it's not doing
‫so well.
‫The Y dimension is doing well, the Z dimension is doing well, but not the X dimension.
‫And look at the result.
‫The difference is growing.
‫You see, that's your X dimension here.
‫And you can see that the error, which is the difference between the blue line and the red line, because
‫the blue line is the reference value and then the red line is the true value that belongs to the real
‫drawn.
‫You see that this error is growing.
‫So if you give it a lot more time, then this error is going to grow a lot.
‫You don't have that problem in the Y dimension nor in the Z dimension.
‫And the controller is also doing a good job in.
‫Tracking the reference values that the feedback Latinization controller gives it, however, when it
‫comes to the extent mentioned in the feedback, lionization controller gives bad reference values to
‫the NPC controller.
‫Those reference values are not enabling the drone to follow its trajectory in the X dimension.
‫And these are your control inputs and your omega's.
‫And the reason is what we have talked about before.
‫So if this is your general solution here, then, yes, you have a big negative Lunda, too, you have
‫it here.
‫That's your minus two here.
‫However, you have a small positive Lunda, one zero point zero one.
‫And because of that, when your time goes to infinity, then over time this term will approach zero.
‫But this term will approach infinity and so you will have infinity, plus zero will be infinity.
‫So your total error or the distance between the blue and the red line, that's your error here.
‫Error as a function of time from this equation, you see that it's going to grow up until infinity as
‫your time goes to infinity.
‫In other words, in real life, it means that this error is going to grow and it's going to grow until
‫your drone crashes.
‫So you see even a small positive lambda can mess up this big negative other Londa.
‫So both Londis need to be negative.