‫Welcome back.
‫So what about this BPCI, our angle, how does it look like in this entire story here?
‫I have a reader on the axis here and this is your angle.
‫And even though the Passi are is provided by the planner and not by this feedback legalization controller,
‫it is still served to the NPC controller in the same way you have five data points from zero up until
‫zero point four seconds.
‫And these data points are equal.
‫So even though your BPCI are comes from the planner.
‫It is given to the NPC controller when the outer loop happens.
‫So this is your BPCI are one and then your side true, your true, your angle will adjust itself like
‫this.
‫And so when the next outer loop happens, then the planner will give another batch of information to
‫the NPC controller.
‫And the NPC will start working to produce a response like this, for example, and that would be your
‫BPCI are two and then a new outflux happens and you have your BPCI are three.
‫And the embassy will do its magic in zero point one second intervals, which would be the simple time
‫interval.
‫And so here you can see the drone in action trying to follow this trajectory.
‫And here you have the reference X dimension, then you have the reference Y dimension and then you have
‫the reference Z dimension.
‫You can see that the trajectory has some kind of initial height.
‫So even though your drone starts at the altitude of zero meters, then the trajectory starts at the
‫altitude of five meters.
‫So the drone needs to catch the altitude of the trajectory as well.
‫And then these are the angles here.
‫So sirtf the reference, your angle comes from the planner, but then fire off and then theatric.
‫They are calculated by the feedback lionization controller.
‫And so I want to zoom in on these angles here.
‫And so in blue you have the reference values and then in red you have the true values.
‫So essentially the red line is trying to catch the blue line.
‫In other words, your drone is trying to catch the blue reference values.
‫And so, for example, if you know, zoom in, let's take this section here.
‫So you see, this is what I have been talking about, the outer loop, the feedback mineralisation controller
‫gives you a reference value for zero point four seconds, which is a constant value here, a straight
‫line in this section.
‫But then the NPC controller is trying to catch up.
‫It's trying to reach this blue reference line in four iterations where one iteration lasts for zero
‫point one seconds.
‫So we can also try to zoom in this part here and here as well.
‫So this would be, for example, K plus one K plus two K plus three and then K plus four.
‫Now here I showed you that when you're outer loop finishes.
‫So this is your K plus four here.
‫Then from here you start with your K.
‫However, Python doesn't plot too values for the same time, so for zero point four seconds is just
‫going to plot this lower point.
‫And then the next point that it will plot, it will be here.
‫So it will skip this one here.
‫So you will have a line from this point here up until this point here.
‫All right.
‫And that's what you see here.
‫So this is keep us four and then here you would have your back.
‫But Python doesn't plot.
‫It is just going to put K plus one here and you have a line here and then the NPCs trying to catch up.
‫By moving the drone angles closer to the reference values.
‫And then the true drone angles are represented with these red lines here.
‫And then, of course, we have other trajectories here as well, like, for example, this spiral trajectory
‫and again, the spiral trajectory has an initial height of five meters.
‫And so here you have the angles.
‫And if we zoom them in, then you can see the same thing.
‫You see, for example, let's take this area here and that's how it looks like.
‫And then.
‫The same thing here, and let's take this area so you see for each outer loop here, you have one,
‫two, three and four inner loops.
‫All right.
‫So that's the story with the angle.
‫In addition, the feedback in ization controller will also need something else from the planner.
‫It will need the time derivative of X or Y and Z are so X, dot R, then Y, dot R and then Z dot R.
‫And even that is not all because it will also need the second derivative of the reference value.
‫So X double dot R then Y double dot R and then Z double dot R and you will see Y when we start covering
‫this feedback.
‫Lionization controller.
‫Now this bpci r it served as a reference value for the NPC controller.
‫Now the feedback lionization controller will also need BPCI are.
‫However, the difference now is that here the PCR is not a reference value.
‫The feedback lionization controller will not need to find some kind of input to reach this BPCI our
‫reference value.
‫That's the job of the NPC controller.
‫However, in order to find you one by ah and then theater, you will have equation's there in which
‫you will also have BPCI.
‫Ah so the feedback plenary session controller doesn't need PCEHR as a reference value.
‫However, it does need it because it needs this value in some of its equations in order to find you
‫one firer and Sittar.
‫And again, once we start covering this part, you will see exactly how it works.
‫And in order to find X or Y or Z that are and also the double dot values, the procedure is very easy.
‫Let's, for example, take a spiral in order to achieve a spiral in three D, the equations for the
‫X Dimension, Y dimension and Z dimension are the following.
‫X equals the radius of the spiral.
‫So if you look at the spiral from the top, then that would be your radius here times cosine and then
‫you have two pi, then the frequency of the rotation times time.
‫So this F here, this is in Hertz, two pi is in radians and then time is in seconds.
‫So the units would be like this, two pi would be radians and let's say radians per one round.
‫So two pi radians is one full circle.
‫Right then frequency would be rounds per second.
‫So cycles per second, which is Hertz so round per second and then time would be second.
‫So in the end, of course, you will cancel out the rounds and then the seconds, and that means that
‫inside this cosine parenthesis you will have radiance as you should.
‫However, the larger your F, the larger your frequency, the larger your rounds per second.
‫The faster you rotate, so here you can see the spiral and then you can see it's three dimensions here.
‫So the next dimension, why dimension and then the Z dimension.
‫And here you can see the X dimension.
‫It has an amplitude three two pi times zero point five hertz times.
‫So you can see that in 10 seconds it is able to do five rotations.
‫So this is third rotation.
‫This is the fourth rotation.
‫And then this is the fifth rotation.
‫But what happens if I increase this frequency, the zero point five, so I have a code here and then
‫I'm going to increase the frequency for the X dimension instead of zero point five hertz.
‫I'm going to put one hertz and I'm going to do the same thing for the Y dimension.
‫So I'm going to replace zero point five with one.
‫And now you can see that in 10 seconds it will make more rotations, 10 to be exact.
‫So you see in 10 seconds it is able to make more rotations because you have increased your frequency
‫in your equations here.
‫Now it's one hertz here and then here.
‫So this is the equation for the examination, for the Y dimension.
‫The equation is R times sine to pi frequency times time.
‫And then for the Z dimension, we want to have a straight line function.
‫So you will have the initial height of the trajectory plus the final height of the trajectory, minus
‫the initial height of the trajectory divided by the entire time that it takes you to perform the maneuver
‫and then you multiply that by time.
‫So you can see that here you have the Z dimension and you have a straight line function here.
‫However, the difference here is that here I didn't have an initial height.
‫I assumed that my initial height starts from zero meters.
‫However, in the drone case, we will have some kind of initial height.
‫And so again, these are the equations for the spiral for X or Y, R and R, and now to find their time
‫derivatives, you just take the derivatives of these equations with respect to time and then you will
‫also take the second derivative of those equations.
‫And so I will leave it to you as an exercise.
‫Try to find the derivatives of these equations the first and then the second derivatives, and then
‫you will see the solutions in the next video.
‫Thank you very much.