Pitch oscillation on Auto

I get significant pitch oscillations on auto once it reaches the desired altitude. It's about a 5-6m drop with a period of 5-6 seconds.  Below you can see a climb (baro is in green at the bottom) at which point it oscillates as it starts approaching it's desired altitude (red is desired pitch, blue is actual).  

The requested altitude should be about 61m, so it looks like it's undershooting a bit.  

3691298455?profile=original

My PID settings are below:

3691298416?profile=original

I've attached a bin.  The piece I'm looking at is the auto flight from 230-270 on the Curr TimeUS.  Any suggestions on how to start trying to stabilize this? Bin file is here:  www.aiforecasting.com/last.bin

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

Join diydrones

Email me when people reply –

Replies

  • Hi,Andrew Tridgell ,I also have a serious problem ablout the altitude maintaining,Hoping your help!

    My plane is about 5.5kg, wingspan 1.8m.Firmware 3.5
    As below 

    614a8286a45b9d2fbe893d3fab445ba20ef67ef3.jpg

    The altitude fluctuating more than 10m .Here is my test,the designed altitude below was 100m.

    9c5eda5371cae56855ff2dfc0ef8b497390b4df4.jpg

    It flies well in FBWA mode, maintain the airspeed well, hit the flight course well.
    And i try to do the TECS tuning ,including adjusting TRIM_ARSPD_CM,TRIM_THROTTLE, TECS_TIME_CONST.But without apparent improving.
    Log is a little big,you can download it below.
    Log
    Hoping you  can help me fix the problem,I was completely depressed by it.

  • I flew today after fixing all of the relevant issues.  I did have one moment where the I got a velocity variance warning due to a partial blockage in the airspeed sensor.  I would still be interested in how it chooses which velocity to use, I thought the ekf would automatically correct this variance due to identifying the issue and switch to a gps value, but based on the planes behavior it was not compensating.

    Other than that though a lot of success, thanks for the suggestions.  Even did some auto takeoffs which were much better than my manual throw and pray strategy. 

  • Thanks so much for the help. Obviously new to APM and rc in general.

    My airspeed sensor is funked, I noticed this in the logs but didn't think it was related. It did have some output earlier but it was misting out and I think it may have gotten clogged with water.  During the above time period you can see it was zero but the ekf loop realized this and gave an output I'm assuming was driven by the gps?  Isn't this the value that would have been used by the aircraft?  Also, in the log the ekf1 values and the ATT values are almost the same for other variables, but not quite.  Which is the flight controller using?

    Regardless I will figure out the arspd sensor and test ahead of time on the next go.

    Also thanks for the trim insight, I hadn't thought about re-calibrating after changing the tx.  And I will look at the stall speed.  It's an fx61, is there a good practice for setting this value?  I'm trying to fly in more complicated terrain and would rather the plane be flying slower than faster to limit the radius around waypoints.

    I greatly appreciate the responses already given

    Here's the output from a few of the arspd metrics:

    3702242485?profile=original

  • Developer

    Hi Chris,

    I had a look at your log, and the first think I noticed is the pitch integrator is wound all the way up. The reason is that you have adjusted the elevator subtrims on your radio for channel 2, but have not changes RC2_TRIM to match. So ArduPilot thinks the trim is way off. Your radio is giving a RC2 value of 1438 when sticks are centered, but RC2_TRIM is 1487. Try changing RC2_TRIM to 1438.

    I notice your aileron trim is also off. Your radio is setup for 1492, but RC1_TRIM is 1453.

    Have a read on the TRIM_AUTO parameter and how to use it. See http://ardupilot.org/plane/docs/parameters.html#trim-auto-automatic...

    That won't actually solve the problem however. The biggest problem is with airspeed. Your log shows you have:

    • ARSPD_ENABLE     1
    • ARSPD_FBW_MIN    16
    • ARSPD_PIN        65
    • ARSPD_USE        1
    • TRIM_ARSPD_CM    1600

    but the measured airspeed is zero for almost all the flight. Do you actually have an airspeed sensor? If so do you zero it and test it before each flight?

    Having a target airspeed (TRIM_ARSPD_CM) equal to your stall speed (ARSPD_FBW_MIN) is also a bad idea. That will lead to TECS frequently thinking you are stalling and wanting to put the nose down.

    I also note that the aircraft got nowhere near the target altitude of the waypoints (which was 200 meters). It got to about 50m. That was because it kept trying to gain airspeed by putting the nose down.

    Cheers, Tridge

    Complete Parameter List — Plane documentation
  • Moderator

    Some ideas as I had a similar problem:

    - make sure your elevator is absolutely slop free.

    - P and I seem a bit low, how big is your elevator?

    - do you have enough elevator movement?

    - have you done an autotune and at what level?

    - where is your CG%

    - Is your aircraft a raised motor pusher type? (try plot throttle with pitch, as the thrust line can affect this)

    Altitude control has a big bias on throttle not elevator

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…