03-12-2015 05:38 AM
I am trying to position control my quadcopter so that would require control of vertical speed, pitch and yaw. I have tried controlling vertical speed alone but when i try to use pid dbl instance array funtion to control all control signals, the quadcopter behaves randomly and crashes.
I am assuming that this is happening because i am inputting all control signal at once to the quadcopter which at once govern its four rotors. Can anyone suggest how to modify this for position control.
03-12-2015 07:46 AM
03-12-2015 08:45 AM
The drone has only four input signals ie pitch, roll, yaw and altitude, which are obviously dependent on one another so when one control executes the other shouldn't , i think so :P. Please help me, how i can proceed with this. some reference or if any one has done this.
03-12-2015 09:34 AM
What Mike was suggesting is that you need to do the mathemathics or at least find and understand how it works. The device can move in six ways, each of which can be independent of all the others but it only has 4 control inputs. So you need to determine, either from the manual for the device or from the geometery and vector math, how those four inputs relate to the six degrees of freedom of motion.
From your description of the input names ("pitch, roll, yaw and altitude") it seems that perhaps the device does some of the math internally. On the other hand it is unclear how those four inputs would allow you to move laterally from point A to point B. There does not seem to be any command for horizontal motion.
Lynn
03-12-2015 09:45 AM
Pitch and roll commands actually tilt the drone by certain amount depending on the given velocity and the drone start moving in that direction so typically pitch and roll are motion along x and y axis and altitude along z axis while the yaw is rotation along z axis. So in all there are 3 translation and 1 rotation. I have not yet considered the yaw in my control. I have tried controlling other 3 control using a dbl array instance of pid to control simultaneously and also tried using 3 different pid for each control but that too doesnt seem to work. So i think the code requires some sort of synchronization between output signals or an algorithm that somehow manage these output signal.
03-12-2015 10:07 AM
Let me see if I understand. You have three rotations (pitch, roll, and yaw) with respect to the to aircraft coordinate system. You can control translation (position or velocity) in one direction - the aircraft z-axis. To move the aircraft with respect to a fixed reference frame attached to the earth you first fly it straight up (aircraft z-axis), then use pitch and roll to get a horizontal component of velocity with respect to the fixed reference frame.
Is this correct?
If you give the aircraft inputs pitch, roll, yaw all = 0 (no rotation) and altitude = 50% of full scale, does the aircraft rise straight up in a stable manner (assuming still air)? What I am trying to figure out for you is how much feedback control the aircraft has in its internal systems.
Other than the operator's visual observation of the aircraft, what sensors or feedback are available?
Lynn
03-12-2015 10:16 AM
Yes what you said is correct.
And giving 50% of upward velocity will cause the drone to fly upward with that velocity when pitch, roll and yaw=0.
You can look up "Ar drone" for better understanding.
All these controls are controlled by the speed of its four rotors so giving two different control comand at the same time will not be optimal (lookup quadcopter motion)