I'm programming the controller for a drone and I've got a question that may be basic, but I need to understand this perfectly to continue with the most interesting part of the project.
The sensors of my drone give me the position (x,y,z) and orientation (quaternion: x,y,z,w) of the drone, and I need to control the altitude of the drone, so I need to control the velocity in the z coordinate because that velocity is send to a topic of my drone (for those who use ROS, to the cmd_vel topic) and changing the velocity I can control the altitude.
So, basically the input of the controller is the desired position of the drone, then I have a PID controller and the plant (unknown model, so I have to "guess" the parameters of the PID), and the feedback is the current position.
Which would be the output of the controller (I mean, the $u_k$, with the discrete model of the PID that is the input of the plant)? Is it a position or a velocity? If it is a position, then I can do something like: (position_current - position_before)/timestep. But I don't know what is theoretically correct, because maybe I can find some $k_p$, $k_i$ and $k_d$ to have the desired velocity as the output.
Thanks :D
Edit: this is basically the model I'm using