Hey. I have a quadrotor with Pixhawk, APM:Copter V3.3.3 (acf2e10c). I have tested it in Stabilize & AltHold modes, works fine. Also tried switching to Land mode from Stabilize & AltHold, and the drone lands perfectly.

I wanted to try AUTO mode, as a first test I defined this mission based on the tutorials here:

1. Takeoff to 10 meters

2. Loiter there for 5 seconds

3. Land

I went out for a test, as soon as I raised the throttle in AUTO mode, the copter started climbing VERY quickly, and it kept climbing up until it was about 60 meters above the ground. I waited for like 10 seconds and it kept climbing, so I panicked & switched to AltHold mode. I'm a newbie pilot so I could not control it properly at that altitude and...crash!

I thought maybe it was a bug in my planned mission or a gps glitch or something, so I fixed the copter and tried agian. This time with this mission:

1. Takeoff to 3 meters

2. Land

Again, same thing happened. This time, I switched to Land mode, but it kept climbing like crazy. Switched to stabilize and eventually...another crash.

I reviewed the logs, DAlt (desired altitude) does not match my planned mission altitude (figure below). I have attached the log, can someone please help me with this?

DAlt Plot:

3691281226?profile=original

2016-03-10 08-28-02.bin

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

Join diydrones

Replies

        • Before you try auto mode, make sure that Stabilise->Alt-Hold->Loiter modes work in that order, so you've done well with the first two.  But now make sure Loiter works well, so go from Alt-Hold to Loiter and make sure it sits there quietly, then fly it about and make sure it behaves as expected.

          Wise suggestion, I will do this. Thanks!

          • That's the key thing I was going to write in with.  Make sure you test the copter one system at a time, and take time to learn which sensors contribute to which types of motion, and learn to set them one at a time.

            In Stabilize mode, you're using the basic accelerometers and gyros, plus your PID loops to stabilize the aircraft against unsteadiness or oscillation in the airframe.  If you let go of the sticks, it should be perfectly level without wobbling, although it will drift across the ground since there's no position control.

            It AltHold mode you're using all of the Stabilize systems, plus you're adding the height controller, which uses the barometer and more PID loops.

            In Loiter or PosHold mode, you're using all of the above systems, plus the GPS and magnetometer, and yet again more PID loops.

            • Yeah you're right. I had indeed tested Stabilize & AltHold as I said earlier, and they were not bad (except that AltHold sometimes behaved strange briefly, nothing serious though).

              But I'm a novice with zero experience in piloting, and I was having trouble controlling the drone in manual modes. I'm particularly terrible at taking off and landing...and that's why I wanted to use Auto mode to make sure everything else was alright & it's just my lack of skill.

              Thanks for the advice, Andy!

              • That's totally understandable.  Although it's a bit frustrating not to go full-auto right away when you bought this flight controller that does all this cool stuff, it's going to save you a lot of money and headache in the long run by being able to take over manual control of the copter whenever you need to.

  • @Alireza,

    could you attach charts like throttle + DAlt + GPS alt + bar Alt 

    and name every sensor installed and verified or not by you to work properly.

    In case of the classic Drone Fly away Syndrome due to airframe vibrations

    your Pixhawk can read bad alt value from GPS, barometer, calculated from IMU,

    if in FFT phase shifted resonance, so the sensor's clock or Pixhawk, make Pixhawk to read sin wave modulated Alt value (due to resonant vibrations of airframe) at minimum of sin wave, making Pixhawk software intelligence to think your drone is falling.

    So just attach more charts to let me detect resonant vibrations of your airframe

    Accel, Gyro, Compass, GPS alt, barometer if installed in a single window.

    Open Technology Park

    OpenFabLab

    Peer to Drone Crash Investigators

    manta103g@gmail.com

    • Attached are the charts you wanted. The first one includes DAlt, GPS Alt & Bar Alt (on the left axis) & ThrOut (on the right axis). The second is AccelX & AccelZ of IMU & IMU2, and the 3rd is GyrX & GyrZ of IMU & IMU2.

      My sensors are Pixhawk internal sensors (listed here) plus an external Neo-8M GPS & Compass module. The sensors are apparently working well, I have calibrated the accelerometer & compasses without any problem. The artificial horizon in Mission Planner seems alright at least when the copter is disarmed and I move it around with my hand.

      Thanks

      Alts&ThrIn.PNG

      GyrX & GyrZ.PNG

      AccelX&AccelZ.PNG

      • @Alireza,

        it's clear you should autotune and calibrate  IMU first, especially 

        IMU1.  IMU2.AccZ mean value is around -9

        and Kalman filter failed to reject apparently incorrect IMU1. IMU.AccZ

        negative data value input, pushing Throttle on and on

        to prevent your drone to "fall down",  since AccZ value read is negative (around -9)

        Since your airframe vibrates in Z axis at resonant frequency, which I can calculate

        if necessary, try to damp your Pixhawk controller board to damp IMU generated data

        and autotune, calibrate IMU1. IMU2.AccZ to set -9 offset to 0.

        "

        Test: IMU Mismatch = FAIL - Check vibration or accelerometer calibration. (Mismatch: 2.10, WARN: 0.75, FAIL: 1.50)

        Autotune = NA - 

        "

        Could you attach GPS charts ?

        Pixhawk is highly intelligent machine, running really fast processor.Due to hypersensitivity to IMU Acc data sine wave modulated, control over your drone can easily get lost in case airframe starts to vibrate at resonant frequency.

        Manual control is smart, flexible and fuzzy logic based, since IMU Acc data are not real-time processed by an operator.

        Wish you happy flying.

        • I have attached the GPS charts.

          About the IMU.AccZ, I think the correct value is around -9.8, which is the acceleration of gravity, and negative because it's downward. So the mean value being -9 does not look so bad, does it? An accelerometer showing 0 acceleration in Z direction means free-falling.

          But I had calibrated the acceletometer several times before, it was calibrated & working well. I don't think re-calibration is going to fix anything here.

          I am definitely gonna damp the vibrations first before trying to autotune or change the controller gains. Thanks so much for your suggestions Darius!

          GPS.PNG

          https://storage.ning.com/topology/rest/1.0/file/get/3702809693?profile=original
          • @Alireza,

            there are misconceptions about IMU accelerometer.

            For a static object, your drone put on your desk,  acceleration due to gravity is exactly 1g.

            But this a gravitational force  g = -9.8

            At the same time, we calculate accelaration of an object as the rate of change of velocity of an object.

            So if your drone stays still on your desk, so what is its acceleration

            in X, Y, Z axis ?

            You can apply equation for acceleration:

            a = deltaV/deltaT

            a = (final velocity - initial velocity) / (ending time - starting time)
            a = ( V1 - V0) / (T1 - T0)

             so what is the acceleration of your drone put on your desk and kept still ?

            since its speed in X, Y, Z axis is always 0 m/s

            so a = (0 - 0 ) / delta T = 0 m/s2

            If your drone is climbing in Z axis at fixed speed, so what is its acceleration

            in Z axis ?

            a = (V1 - V0) / (t1 - t0) 

            since V1 = V0 ( speed is constant)

            a = (V1 - V1)/ delta t = 0/delta T = 0

            Since your fixed wing , copter flies in mid air and g force is exerted on it

            so its potential energy is calculated as 

            Ep = mgh    (potential energy Ep = m x g = weight   x height)

            To keep your FW afloat in AltHold mode motors + propellers need to

            supply energy to counteract Earth's gravity force acting permanently on your drone.

            But if you put your drone on your desk, you can safely set motors off,

            since your drone is protected against free fall at g force, since it is supported

            by your desk against free fall.

            So I prefer to calculate acceleration from the equation 

            a = (V1 - V0)/ (t1 - t0)

            since in AltHold mode I get a  value calculated as 0 m/s2

            as opposite to 1g by IMU.AccZ

            Pls attach GPS.Alt against  Baro.Alt

            since GPS.lat, GPS.long don't matter

            Acceleration, in physics, is the rate of change of velocity of an object. 

            So I offset  IMU.AccZ data against g to get  real +- a data, calculated as above.

            If initial speed is known, starting time is known, g offset a is known

            I can calculate drone's climbing speed and potential energy can be measured to match mechanical energy of motor + propeller spent ( energy consumption

            current x voltage).

            I you know power drawn from battery in AltHold  at 0 Z-axis acceleration

            (a + g) and set as constant,

            you can be assured your drone stays at the same Alt if there is no

            change in energy consumption, power drawn from battery.

            If energy consumption sinks, you can be assured in advance of

            the change in altitude to a lower one and the opposite.

            • Um, the accelerometers DO measure gravity.  Z should be about -9.8 when at rest.  They couldn't separate acceleration due to gravity from acceleration due to motion, even if they wanted to.

This reply was deleted.

Activity

Jose Araujo liked Jose Araujo's profile
Aug 29
spencer harvey liked spencer harvey's profile
Jul 9
More…