Developer

I know the topic of adaptive control keeps showing up, but let's try one more time.

I'm trying to implement the Virtual Reference Feedback Tuning  algorithm to tune the PID loops on the ArduPlane software. My final objective is to use this as my graduation project (I'm an E.E. student). I have chosen this method because of some of its characteristics like:

  • Non iterative - Only one experiment needed, with the data collection from the plant
  • Can be used to tune PIDs - So no need to change the main code on APM
  • Can be run offline - This way if the Atmega doen't have enought power to process the data, it can be processed on the Ground Station ( even after the flight, without the use of telemetry).
  • Finds the global minimum directly - Unlike other methods that can lead to sub-optimized controllers.

The paper witch originally describes the algorithm is at this link. And a good explanation of the method and comparisons to others can be found on this book.

I have made for a class last semester a project about this method, the report can be read here. I also made a demo of the software (sorry about the bad diction, English is not my native language and recorders frightens me! feel free to ask anything):

 

I have already started to work on this (this is my git clone of the source), and if you would like to join me I would be pleased. My current strategy is:

  • Run HIL simulation (with X-plane) on the APM
  • Transfer all the necessary data to the Mission Planner via Mavlink. (the necessary data is the output of the PID controllers, and the output of the plant [for example in the roll controller these are: g.channel_roll.servo_out and ahrs.roll_sensor])
  • Collect, format, visualize, and trim the data on Labview. The communication between MP and Labview is via UDP.
  • Transfer the formatted data to Matlab, where the VRFT algorithm is run.

I'm using this data flow because I like to work with these tools, but it could all be hard-coded in MP or in the APM source.I currently have this setup up and running, but the implementation of the algorithm is still dangling. 

My first try was with the Roll PID, but it failed catastrophically since I had bad data. By this i mean the data was not received in a fixed sample rate neither the scale where appropriate. I also had problems with the gain adaptation introduced by the variable speed_scaler.

The second try was using just a P controller for the Yaw_Nav controller, I got I little more successful ( latter if there is interest I can post a video). But again I had problems with offsets, sample rate, and scaling between MP parameters and APM variables.

 

I'm happy to hear any response or ideas (or even to get help :).

 

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

Join diydrones

Email me when people reply –

Replies

  • This sounds very interesting. I can't help with APM or planes but I plan to read the paper and see if I stand any chance of understanding and applying :)

This reply was deleted.

Activity

DIY Robocars via Twitter
RT @chr1sa: Just a week to go before our next @DIYRobocars race at @circuitlaunch, complete with famous Brazilian BBQ. It's free, fun for k…
Saturday
DIY Robocars via Twitter
How to use the new @donkey_car graphical UI to edit driving data for better training https://www.youtube.com/watch?v=J5-zHNeNebQ
Nov 28
DIY Robocars via Twitter
RT @SmallpixelCar: Wrote a program to find the light positions at @circuitlaunch. Here is the hypothesis of the light locations updating ba…
Nov 26
DIY Robocars via Twitter
RT @SmallpixelCar: Broke my @HokuyoUsa Lidar today. Luckily the non-cone localization, based on @a1k0n LightSLAM idea, works. It will help…
Nov 25
DIY Robocars via Twitter
@gclue_akira CC @NVIDIAEmbedded
Nov 23
DIY Robocars via Twitter
RT @luxonis: OAK-D PoE Autonomous Vehicle (Courtesy of zonyl in our Discord: https://discord.gg/EPsZHkg9Nx) https://t.co/PNDewvJdrb
Nov 23
DIY Robocars via Twitter
RT @f1tenth: It is getting dark and rainy on the F1TENTH racetrack in the @LGSVLSimulator. Testing out the new flood lights for the racetra…
Nov 23
DIY Robocars via Twitter
RT @JoeSpeeds: Live Now! Alex of @IndyAChallenge winning @TU_Muenchen team talking about their racing strategy and open source @OpenRobotic…
Nov 20
DIY Robocars via Twitter
RT @DAVGtech: Live NOW! Alexander Wischnewski of Indy Autonomous Challenge winning TUM team talking racing @diyrobocars @Heavy02011 @Ottawa…
Nov 20
DIY Robocars via Twitter
Incredible training performance with Donkeycar https://www.youtube.com/watch?v=9yy7ASttw04
Nov 9
DIY Robocars via Twitter
RT @JoeSpeeds: Sat Nov 6 Virtual DonkeyCar (and other cars, too) Race. So bring any car? @diyrobocars @IndyAChallenge https://t.co/nZQTff5…
Oct 31
DIY Robocars via Twitter
RT @JoeSpeeds: @chr1sa awesomely scary to see in person as our $1M robot almost clipped the walls as it spun at 140mph. But it was also awe…
Oct 29
DIY Robocars via Twitter
RT @chr1sa: Hey, @a1k0n's amazing "localize by the ceiling lights" @diyrobocars made @hackaday! It's consistently been the fastest in our…
Oct 25
DIY Robocars via Twitter
RT @IMS: It’s only fitting that @BostonDynamics Spot is waving the green flag for today’s @IndyAChallenge! Watch LIVE 👉 https://t.co/NtKnO…
Oct 23
DIY Robocars via Twitter
RT @IndyAChallenge: Congratulations to @TU_Muenchen the winners of the historic @IndyAChallenge and $1M. The first autonomous racecar comp…
Oct 23
DIY Robocars via Twitter
RT @JoeSpeeds: 🏎@TU_Muenchen #ROS 2 @EclipseCyclone #DDS #Zenoh 137mph. Saturday 10am EDT @IndyAChallenge @Twitch http://indyautonomouschallenge.com/stream
Oct 23
More…