PDA

View Full Version : JJ-copter Mk4.1 - True Altitude Hold



ziojos
02-14-2012, 09:48 PM
Hi,
I moved to MWii :D porting on JJ-copter Mk4.1 my Aeroquad Know How and adding new features however I follow costantly amazing Aeroquad development.

I have changed from WMP and NK to a 10 DOF (ITG3200,BMA180,HM5883,MS5611) + GPS MTK3329 + SR04.

Now I have a True Altitude Hold:

Sonar(SR04 interrup driven) complementary Filter on zSpeed
and Baro (MS5611) double Complementary Filter

This video show Baro Altitude Hold:



http://www.youtube.com/watch?v=D4Eq0mZkvwA



We have a lot of snow this year:


http://www.youtube.com/watch?v=yqlb5-2u3Dg

Ciao

Scotth
02-14-2012, 10:03 PM
Looks great. Are you using any Z axis accel for altitude hold, or just baro?

ziojos
02-14-2012, 10:56 PM
Ciao Scott:

I use the zAcc and baro in the double complementary filter for altitude and vertical speed control
For the Sonar (no in the video) I use zAcc only to have a more accurate vertical speed control.

BTW the integration of acc require a good vibration smoothing.

Ciao

P.S. I see almost all your amazing mountanbike videos. I was an MB entusiast many Kilos ago ;)

Kenny9999
02-15-2012, 06:36 AM
Prego Ziojos

Long time no see! Impressive work as usual.

I bet that the MS5611 is quite more precise than the BMP085! Still, I'm really interesting on how you handle accel data to help altitude oscillation and I wonder if you could share your work with me so I can add see if it can be add in AQ.

If you could share your math and algorithm from the accel sample to the convertion to z acceleration to the double complementaty filter to the alt hold algorighm :)

That make a couple of month I work on this without real good result for long time


http://www.youtube.com/watch?v=IUvljcL3ESo

Even if I find this quite impressive, my calculation are too imprecise giving really bad result depending of the situation, and this is with sonar... I'm thinking to try to correct the zvelocity with the altitude sensors altitude velocity calculation, that can be really imprecise as well with baro,,, but I believe with some sampling I could have an improvement...

So, no math guy need help... feel free to PM me if you don't want to share your code here :)

P.S.: how can you have some snow in Italy when we have none here in Germany?

ziojos
02-15-2012, 09:28 AM
Prego Ziojos

Long time no see! Impressive work as usual.

I bet that the MS5611 is quite more precise than the BMP085! Still, I'm really interesting on how you handle accel data to help altitude oscillation and I wonder if you could share your work with me so I can add see if it can be add in AQ.

If you could share your math and algorithm from the accel sample to the convertion to z acceleration to the double complementaty filter to the alt hold algorighm :)

That make a couple of month I work on this without real good result for long time


http://www.youtube.com/watch?v=IUvljcL3ESo

Even if I find this quite impressive, my calculation are too imprecise giving really bad result depending of the situation, and this is with sonar... I'm thinking to try to correct the zvelocity with the altitude sensors altitude velocity calculation, that can be really imprecise as well with baro,,, but I believe with some sampling I could have an improvement...

So, no math guy need help... feel free to PM me if you don't want to share your code here :)

P.S.: how can you have some snow in Italy when we have none here in Germany?
Ciao Kenny

Your works are awesome, too !

Yes the MS5611 seems little better than BMP85 for our targets.

Looking at your video, I seen that you have a very good speed control. This suggest me that your accZ datas aren't the problem :) You have to work on altitude's Integration strategy and/or on errors cancellation.
BTW with sonar you can have good results without accZ.

We had "Buran" from Syberia !!!!! all Italy is under the snow and the square of my village is 765 m high.
Baro says my living room (1st floor) is at 770 m when pressure is calibrated ;)

Honk
02-15-2012, 08:09 PM
Very very nice Ziojos! Both the regulation and the video's!

ziojos
02-15-2012, 08:59 PM
Very very nice Ziojos! Both the regulation and the video's!
Thank a lot Honk, all your works on altitude control was very helpfull.

Last year you asked me for a snow video from my village, last year we hadn't snow but now we have too much :p.

Ciao

Mikro
02-16-2012, 01:47 AM
Beautiful work Ziojos!!! How do you feel about the performance of the MS5611 over the BMP085?

ziojos
02-16-2012, 04:43 PM
Hi Ted,
The accuracy of the two sensors isn't too different, the BMP085 is more noisy but its problem seem the hysteresis/delay on the response (at lest in my desk tests).
In my tests the only way to use the BMP to have an altitude control (within +/- 25 cm) was a dinamic reference of altitude (difficult to tune), I never used it in fly
the MS5611 seems more sharp and its dynamic response is more accurate.
BTW to have a good dynamic (Speed Control) with high PID, zAcc integration is a must ;)

Ciao

ala42
02-16-2012, 10:53 PM
My impression of these sensors is different. The accuracy of the two sensors is very different.
The BMP085 drifts like it wants in a +-30cm range. This is no white noise you can filter, it simply drifts over some seconds with changing periode.
The MS5611 correctly detects even a 10cm height change and has a small white noise, which can be filtered. It drifts in the first minutes after poweron.

Issus
02-17-2012, 03:36 AM
Very impressive work, i'm wondering if using an accelerometer with a smaller range just for altitude hold would be worth adding in? If it responds fast enough, and you have enough clock cycles to read it fast you could end up with some reasonably accurate measurement so distance from it to work with the MS5611.

ziojos
02-17-2012, 06:20 AM
@ala42
It's very difficult to make accurate tests of the baro at home ,as example,if you just covering the sensor with foam it makes a measurable difference, Opening a door in the room may give a jump of 2-3 m. The wind outside the house may drift +/- more tha 50 cm, also the light make changes in reading.
I said that BMP085 with dinamic bias have +/- 25 cm (a little better than +/-30 you wrote) with this value and a good zAcc I think you may have a valid altitude hold, the MS5611 is definitively better. The MS5611 may be correct with better termal calibration (BTW I have re - writen the lib on some casting and compensation problems found in the web found SW)
My video was shoot just going out in front of my house (20 °C to -2 °C) power on and fly than it seems tha termal drif isn't a issue.
@Issus
Better Acc data -> Better Control. The problem is limit the drifts of Speed and Space in the ACC integration). The Baro works to do this :),
IMHO the ACC on our quad are good (on my I use BMA180 at +/- 8g). To have little drift the accurate zeroAcc evaluation is very important.
Ciao

Kenny9999
02-17-2012, 07:43 AM
Still, you did not share any code with us :(

tevada2010
11-26-2013, 03:25 AM
Prego Ziojos

Long time no see! Impressive work as usual.

I bet that the MS5611 is quite more precise than the BMP085! Still, I'm really interesting on how you handle accel data to help altitude oscillation and I wonder if you could share your work with me so I can add see if it can be add in AQ.

If you could share your math and algorithm from the accel sample to the convertion to z acceleration to the double complementaty filter to the alt hold algorighm :)

That make a couple of month I work on this without real good result for long time


http://www.youtube.com/watch?v=IUvljcL3ESo

Even if I find this quite impressive, my calculation are too imprecise giving really bad result depending of the situation, and this is with sonar... I'm thinking to try to correct the zvelocity with the altitude sensors altitude velocity calculation, that can be really imprecise as well with baro,,, but I believe with some sampling I could have an improvement...

So, no math guy need help... feel free to PM me if you don't want to share your code here :)

P.S.: how can you have some snow in Italy when we have none here in Germany?

I interrest altitude hold.Can you share your code?

wooden
11-28-2013, 04:28 PM
Tevada2010 - everything Kenny shows in that video is in the current AQ code. As he said, it works in some situations but not most.

tevada2010
12-06-2013, 09:35 AM
Tevada2010 - everything Kenny shows in that video is in the current AQ code. As he said, it works in some situations but not most.

Yes..I want to make altitude hold with accel z on Aeroquad 3.2.

wooden
12-08-2013, 08:04 PM
The altitude hold PID screen in Configurator has some settings that use the accelerometer for altitude hold.

Again, though, it doesn't work perfectly. Use at your own risk.

tevada2010
12-11-2013, 08:20 AM
Hi wooden.....I can make it. This is my code (QuadTevada v2.0.1). It can altitude hold with barometer BMP085 and accelz.
Download my code at http://www.quadrotorthai.com


http://www.youtube.com/watch?v=zDCZZXDMsYY


http://www.youtube.com/watch?v=ztAlZpl67fs