Hover Control of Quadcopter (Gaui 330x)

Hello guys,

I have a Gaui 330x, and I am required to implement on it a hover control algorithm. I am quite new to quadrotors, but i'm willing to try. My objective is to make it hover at a constant height from ground when the hover control switch is turned on, and still be able to move it along the x-y plane (back/forth/left/right). When the hover control switch is off, control is manual using the radio controller. 

What I have done so far is, I placed a microcontroller between the receiver module and the gyroscope. By doing so, I wish to manipulate the signal that is being communicated between the receiver and the gyro. I notice that the speed of the propellers changes with the pulse width of this signal. On manual control, the signal goes in and out of the microcontroller unchanged. On hover control mode, the signal gets manipulated before it is communicated to the gyroscope. Manipulation is simply changing the pulse  width of the PWM, to either increase the speed (when below desired height) or decrease the speed (when above desired height) of the propellers. 

In addition to this, I have a set of Parallax Ultrasonic Sensors to measure the height. The sensors are interfaced with the microcontroller. 

More technical details:

The range of the signal pulse width is 1.2 - 1.92 ms. 

The period of the signal is 14.32 ms. (Frequency : roughly 70.4 Hz)

Progress so far:

  • I have mounted everything onto the quadrotor (the microcontroller and sensors) with proper connections. 
  • I managed to get the microcontroller to imitate the signal that is being communicated between the receiver and gyro ( this is for manual control), but the frequency is slightly different than that of the original (Is this going to give me problems?). Oh, and the voltage level for 'high' is also different (7V, compared to the original at 3.23V, will it matter?)

Problems:

  • I couldn't control the quadrotor properly after start up. The blades jerked randomly, as though the command goes on and off repeatedly. Is it because of the difference in frequency, like I have mentioned above in red? Does the frequency matter? Or does the voltage level matter, as mentioned in blue above?)
  • Apart from the hardware part, I need to produce a simulation for the hover control. My problem is, I cannot find a relationship between the pulse width of the signal and the propeller speeds (or the flight altitude) to perform system identification. Can someone help?

My project shouldn't be too difficult as it is a one dimensional problem. But i can't seem to get anything to work. I'd really appreciate it if someone can help me out at this. I am not too ambitious with this project, I only aim for it to hover at 1.5 - 2 meters from ground. 

Thanks a lot in advance!!

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • For hover control, you should only need to manipulate the Throttle signal - Channel 3 - between the Receiver and Gyro Unit.

    What I would do is pass the Throttle signal through the micro, only adjusting the ending time as required.  So, the start of the output pulse to the Gyro happens when the start of the input pulse from the Receiver is detected.  Then you can set the output low again after a time period determined by your algorithm.  That way, the frequencies will remain the same.

    To initialise, I'd think you would fly the Quad in a hover manually first.  So, your micro would pass the Throttle signal through without change, but would measure the duration with a timer.  Then when you switch to Hover, the micro would start with that measured duration and then on successive updates, adjust the duration according to whether the quad is rising or falling.  Longer duration = greater Throttle, within the range of pulse width that you've already determined.

    Of course, you're controlling vertical acceleration to maintain a position, so a bit of thought is required ...

This reply was deleted.

Activity