‫Welcome back.
‫So now that you know how the NPC controller works, we have to cover one final thing in our control
‫architecture.
‫We have to fully understand how the feedback lionization controller computes you, one that goes directly
‫into the plant and how it computes fire and Seeta are that go into the NPC controller as reference values.
‫And in this section you will fully understand how it all happens.
‫First and foremost, we have to realize that this is a position controller.
‫Therefore, we don't need the equations that relate control moments you to you three and four with the
‫angular accelerations.
‫The last three equations here, we don't need them.
‫In fact, we don't even need the first three equations.
‫Yes, they relate Phi Theta and you won with translational accelerations.
‫However, these equations are in the body frame.
‫It is much easier to perform feedback penalization when your equations for position control are in the
‫inertial frame.
‫And so that will be our first order of business to obtain the equations of motion for position control
‫in the inertial frame.
‫In fact, I'm going to leave it for you as an exercise.
‫Your task now is to obtain the equations of motion in the inertia frame, but only for the position
‫control.
‫In other words, you need to have this X double that equals something Y double dot equals something
‫and then the Z double dot equals something.
‫You have to find what they equal to in the equation form.
‫So when you obtained you that equals something.
‫V dot equals something and then W dot equals something.
‫Then those where your state base equations in the body frame that related the body frame translational
‫accelerations with the control input you one and also the angles, Fi and Seeta.
‫And if you remember from the second section, then your starting point for deriving these equations
‫was the Newton's second law of motion.
‫So the net force vector equals the time derivative of the linear momentum and the linear momentum was
‫M times the velocity vector, so mass times the velocity vector.
‫Now since your mass was constant, then this term here became zero and your force vector, which was
‫a net force vector composed of individual forces, it was mass times acceleration.
‫That was your starting point.
‫And this is a screenshot from the previous videos in the second section, since you were in the body
‫frame, you had to take the rotation of the body frame with respect to the initial frame into account.
‫It meant that the unit vector time derivatives ie that Jadot and K that were not zero.
‫They equal this.
‫You see, you have the cross product here.
‫And so in the end you're Newton oilor equations for describing the relationship between net forces and
‫translational accelerations in the body frame which are here.
‫They looked like this.
‫So that was your equation of motion.
‫And from there you went into the state based form.
‫The cross product here comes from the fact that we were working in the body frame and not in the fixed
‫frame.
‫And then you went from the equations of motion form to the equation form like this.
‫That was your procedure here and this is your space form here.
‫And remember, you had to rewrite your net force vector in terms of individual forces.
‫And we had this gravity force moment vector, then the gyroscopic force moment vector and then the input
‫force moment vector here.
‫They also included the three dimensions for the moments, but now we only need the dimensions for the
‫forces.
‫So the first three elements in these vectors here.
‫So that's the stuff from Section two and three.
‫And now in order to find X double that Y double dot and Z double dot and what they equal to you start
‫from the same starting point, the Newton's second law of Motion.
‫You followed the same derivation procedure.
‫However, now you have to remember that you will be working in the inertia frame, not in the body frame.
‫Your position vector is Gunma.
‫In the inertia frame, which is X, Y and Z meters, then that's your rotation matrix here in case you
‫need it after all.
‫Now you're working in the inertia frame, so maybe you don't need it, but maybe you do.
‫I will let you decide that yourself.
‫I'm going to give you the final answer now.
‫However, your job is to get from the Newton's second law to that answer.
‫So that's your final answer.
‫This is what you need to get in the end.
‫That is your end result.
‫So you have to get from here.
‫To hear using this derivation procedure that we had in Section two, but now remember, you are in the
‫initial frame, not in the body frame.
‫So make your decisions accordingly.
‫Take your position vector here in the inertia frame and apply the second Newton's law to it.
‫Think of the different forces that the drone experiences.
‫We covered them in Section three and then remember that now again, you are in the initial frame.
‫Don't forget that.
‫Not in the body frame.
‫So try out this exercise and I will show it to you in the next video.
‫Thank you very much.