Getting start with PID...

I have a helicopter and an IMU (a device that shows altitude [namely Roll Pitch Yaw], XYZ angular velocities and XYZ linear accelerations), and a GPS.And now is trying to hover the helicopter with these sensor by using PID.The problem is that I don't know what altitude angles to track (aka desired angles). I think the stable configuration when the helicopter "on the ground", is not the same one "on the air". Any ideas?Thanks.-nick

444428.png

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

Join diydrones

Email me when people reply –

Replies

  • Developer
    BTW i have another two thesis that i extracted from the University here in Swiss, about UAV helicopters, very well explained, but is a real book, hehe so i need to scan it.. But i can scan only the math, and a very interesting part that explain the process (MCU) prioritys of the data...
  • From my experience there are a number of issues that need to be taken into consideration before you can use raw data from an IMU. Firstly you will need to do some type of sensor fusion to combine the output signals from the accelerometers and gyros. The reason both devices are usually included in an IMU is that accelerometers are subject to a lot of high frequency noise where as gyros generally provide good high frequency signals but less accurate low frequency signals. By combining the two sensors it is possible to take advantage of the good low frequency characteristics of the accelerometers and high frequency characteristics of the gyroscopes.

    The easiest solution to this problem is to run the accelerometer output through a low pass filter to remove the high frequency noise associated with vibrations and turbulence. At the same time pass the gyroscope signal through a high pass filter to remove the low frequency noise associate with gyroscope drift. The two signals can then be combined to produce a relatively accurate output signal. The other option is to design a much more advanced Kalman filter which i have read provides slightly better results.

    You might find the following PDF useful
    http://www.google.ca/url?sa=t&ct=res&cd=1&url=http%3A%2...

    Once you have cleaned up your input signals the next step is to design you PID controller. Jordi's suggestion of using the Ziegler Nichols Tuning rules is likely the best option. When turing my PID loops I generally set Ki and Kd to 0 and work on getting an approximate value for Kp. Without Ki and Kd you will likely have a lot of overshoot but overall the system should be easier to tune.

    Once you have your IMU set up and filtered properly I strongly recommend doing a number of manual flights to collect data. From this data you will also be able to determine the desired angles necessary for stable flight.

    Thanks,

    Neal
  • Developer
    Just to be sure, your IMU just give you the raw data, i mean only the angular rate (gyro) and the acceleration (accelerometers)??? If yes you should look for kalman filters first... The problem is that you cant use just accelerometers to detect the attitude of you helicopter.. And another question... includes magnetometers???.. Can you give me the IMU name, version, etc..? pleasee
  • Developer
    They are a rules called "Ziegler Nichols Tuning rules" maybe that will give you an idea how to start (google it)...
This reply was deleted.

Activity