Developer

Arducopter 2 stability patch

Hey, I had a little brainstorm last night after watching the DJI Wookong video. It's a sweet little system, but I wondered if AC2 could do that? So I put a battery on the end of one arm and it couldn't hold level. It came close but 3-4° error meant that it couldn't fly perfectly still. So during the ride in to work I thought of a way to rework the controller so it replicates my hand on the stick rather the the PI>PI rate controller we have now. 

 

3690901743?profile=original

I've never been happy with the Outer I term. It never really seemed to be very effective. I started thinking that my hand is putting a constant bias to the stick to get the perfect stability, so I could easily replicate that with the outer loop's I-term. I re-routed the Integral to directly sum with the rate controller output. I flew it tonight and it does work. I can hold perfectly level with a 22003S battery dangling from the arm. I think this is exactly what is needed for better Hexa/Octa redundancy.

 

Enclosed is the patch that works with 2.0.54. Just replace attitude.pde with the linked file. Then set your STB_PIT_I and STB_RLL_I to .1, and your limit to something high like 30° or 40°

 

Let me know how it goes for you and please let me know how you might improve it.

Jason

 

 

Attitude.pde

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

Join diydrones

Email me when people reply –

Replies

  • I have tested this now, must say I really am impressed by what you can in a short time! The only thing is that logs seems not to work

    3692310701?profile=original3692310550?profile=original

    2011-12-01 12-03 2.log

  • Do you think this will help stability in gusty wind conditions? I don't feel I have ever achieved good stability when flying in winds that are gusting from 0 to 10mph in my garden, despite a lot of time tuning. I tried tying a string to one arm that I could get hold of and pull to simulate wind and that showed that disturbances to the 'copter caused more instability than when I disturbed the sticks.

     

    Peter 

  • Hello Jason, I'm looking at the new code. I see you add a stabilize_roll2 and stabilize_pitch2 but I don't see where it is use.

    When I search the stab_roll (or pitch) I found it is used in the arducopter.pde file. Is something missing? Or roll2 and pitch2 are the old stuff?

     

    Just found it. What I assume, roll2 and pictch2 are the backup stuff. :-)

    Will make the test after eating. Keep posted.

     

     

  • Developer

    Nice work Bro!
    I'm going to test it now on my "big octo", need to kicking or just fly? :P

    Best

  • I have praised DJI's properties but know that ardupilot is close to a similar solution. It is fast in the turns here:) I wonder if 054 will be able to properly display sonar log and the opportunity to test the sonar in the CLI if I reinstall it now. Is the version which is available now ready for use. I can not wait to try this battery test on the HEXA and will give you feedback

  • 3D Robotics

    This is kinda genius. Best. Commute. Ever.

  • Developer

    Here's my config.h just to make sure you see the correct parameters.

     

    Also note you can set stabilize KI to tune with CH6 for dynamic in-air tuning. I picked .1 out of thin air, but slower or faster values may change performance regarding overshoot. 

     

    in the cli:

    setup] tune 2

    This will enable tuning between 0 and .3

    test] tune

    Will output the current value.

     

    Also note, you can now enter CLI at startup by hitting enter 3 times in the serial window at reboot.

    Jason

    config.h

This reply was deleted.

Activity

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