Developer
I just finished up some initial flight tests using the ArduIMU+ V2 in my Skywalker airframe.
This was my first flight tests using IMU stabilization insteed of thermopile sensors. After some PID adjustment I have nice and stable stabilization of the airplane. But... Whenever I accelerate quickly the plane goes into a dive. Or if I decelerate it pulls up. The plane is trimmed and motor mounting angle is good, so it is not that. It does not seem to be a problem with vibrations. I have mounted the IMU using vibration pads, and if I slowly accelerate the IMU maintain the correct pitch at any throttle setting. Same with deceleration. But punch the throttle and the plane goes into a steep dive. Or sharply pulls up if I let go of the throttle quickly.

My setup is the ArduIMU+ V2 with unmodified v1.7 firmware and the ublox gps.
I am currently focusing on stabilization so the only autopilot logic in use, are PID loops for elevator and ailerons using roll and pitch from the IMU as input.

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

Join diydrones

Email me when people reply –

Replies

  • Developer
    No time to really work on the problem, but after reading your posts I am convinced the IMU is the problem.

    So my conclusion is:
    - Using lower gains the pitch problem becomes manageable combined with slower throttle changes.
    - Let the autopilot control throttle to make sure ground speed never approach zero.
  • T3
    Just wanted to let you know when to hunt for the issue. All is about IMU tuning and extra math.
  • Is it possible to calculate the linear acceleration/deceleration by using the SOG info from the GPS and substract it from the DCM acceleration vector? Will the GPS update rate and latency simply too slow for this purpose?
  • Developer
    John,

    The simple navigation PID control loops we are using will not be able to handle the case where ground speed approaches zero. We do a gain weighting/de-weighting based on tailwind/headwind but it will work over a limited % range from nominal speed.

    You need to either (1) Fly at a faster airspeed, (2) Fly in less wind, or (3) rewrite the navigation algorithm to handle this extreme case. We did not anticipate anyone trying to navigate waypoints with zero ground speed.
  • I believe that is inherant in the underlying human pilot control philosophy of this AP that airspeed is controlled PRIMARILY by pitch and altitude is controlled PRIMARILY by throttle. Unfortunately this doesn't apply completely when trying to maintain flight equilibrium. For example, a human pilot reverses this philosophy when trying to stay on the glideslope centerline when flying an ILS approach.
  • Developer
    Just a quick update:
    I played with the Kp/Ki_ROLLPITCH gains yesterday with some interesting (and some a bit scary) results.

    To simplify gain changes I made the following code modifications.
    #define ROLLPITCH_GAIN 0.5
    #define Kp_ROLLPITCH 0.015*ROLLPITCH_GAIN
    #define Ki_ROLLPITCH 0.000010*ROLLPITCH_GAIN


    Some controlled indoor tests showed ROLLPITCH_GAIN 0.1 is the minimum gain that will compensate for gyro drift with the IMU lying flat on a table. With this in mind I decided to go with ROLLPITCH_GAIN 0.25 for my first flight.
    In flight everything seemed fine and pitch hold was much better when accelerating/decelerating. Just some minor dips when trying to provoke the problem. So the pitch problem seemed to be solved.

    But now for the scary part. I live by the coast, so you get used to flying in windy conditions. Yesterday I was flying in approx 6m/s. I was doing a long slow turn into the wind and as the plane banked into the wind (ground speed approaching zero or maybe even negative) the plane went nuts and started oscillating up and down and sideways in a self feeding loop that just got worse and worse. I tried applying throttle but the oscillating continued. So after watching the plane doing Red Bull air racing for a while, I switched to manual and leveled the plane. I then flipped back to auto and everything was fine. I repeated the slow turns into the wind and was able to provoke the problem in about 1 of 5 tries. The problem seem to occur when the plane because of the wind, turns around it's own axis at one spot with little or no ground speed (hanging on the wind).
    Now before I go and place the blame on the IMU this might be related to the PID control loops. The strong sideway winds when turning can result in large aileron and elevator movements for long periods of time to keep the plane level. This might make the PID generate high D values to "rein" in the airplane. And when the sideway force suddenly disappear as the plane turns into the wind, the D's are so off that the PID is no longer in 'sync' with IMU. I have not had time to test this by flying with D set to zero yet, but doing so should confirm if the problem is PID or IMU related.. I will come back with more data when I get the chance.
    results.to
    The domain name 'results.to' is parked at Register.TO Domain Registrar
  • Developer
    Doug:
    Thanks for the info. I will try adjusting the gains and post my findings. But I am still worried about hand launch and catapult takeoffs. Can the accelerometer gains be lowered enough to allow for that kind of acceleration and still remove gyro drift? Also there would be situations when flying in windy conditions where gusts of wind will quickly decelerate the plane. If the IMU pulls up the nose at that moment it leads to even more deceleration and could cause a stall.
  • Developer
    Mike:
    I appreciate your input, but it sounds like you solution is a fix for the symptoms and does not address the source of the problem. Limiting the elevator movement dampens the effect so that the IMU is not able to send the plane into a dive before it stabilize after an acceleration. But the problem is still there, and is most likely related to the DCM. I would like the autopilot to be able to use large elevator movements for flying in windy conditions, stall recovery , automated low speed landings, etc. And what about automated takeoffs? As it looks now, I suspect the IMU will steer the plane into the ground if I hand launch or catapult the airplane with stabilization active.
  • Developer
    Most airframes will not experience this problem. If you are then the correct fix is to turn down the pitch/roll drift compensation gains in ArduIMU. They are not user parameters - you will have to look in the code for them. Decreasing those gains will allow a bit more pitch and roll error due to gyro drift but will reduce the effects of linear acceleration on the pitch.
  • Hi John,

    I have encountered the same thing, my personal fix was to turn down the roll comp (i know that sounds nuts and not sure that is the result)

    and also the elevator commanded movement up to 8deg and down 8deg from 15..

    now i see a little down attitude, but it rockets off and keeps alt...im wondering if some of it is perception..but mine did do exactly that to start with....

    The pitching up as it slows was pronounced to start with, but now its pretty good..(also increase your lowest point throttle setting, it stops it trying to stall at wp`s)

    of course this is just my results..mayeb others want to chirp in on this.

    hope this helps.


    Mike.
This reply was deleted.

Activity

Liam left a comment on Agricultural UAVs
"Hi
I'm Liam from T-MOTOR. I would like to reach out to see if there is any possibility for us to work together.
We are a propulsion system manufacturer who offers motors, propellers and ESCs for all kinds of drone applications which vary from secur…"
Jun 30
Richard Cox left a comment on Australia
"Anyone in the DIYDRONES Australian subgroup based in Alice Springs, NT?
I am experimenting with Ardupilot (standard Arduplane), Pixhawk 4 FC in a 4-ch
RC "AXN Floater Jet" foamy plane..."
Jun 29
Omar Sykes left a comment on Australia
"Hi everyone, I am looking for someone who is good at drone building, repair and software in Adelaide. Please give me a call on 0477 319 219."
Jun 29
More…