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: Donkeycar 4.4 released with tons of new features, including path learning (useful with GPS outdoors), better Web and Lidar supp…
Nov 27, 2022
DIY Robocars via Twitter
RT @NXP: We are already biting our nails in anticipation of the #NXPCupEMEA challenge! 😉 Did you know there are great cash prizes to be won…
Nov 24, 2022
DIY Robocars via Twitter
RT @gclue_akira: レースまであと3日。今回のコースは激ムズかも。あと一歩 #jetracer https://t.co/GKcEjImQ3t
Nov 24, 2022
DIY Robocars via Twitter
UC Berkeley's DIY robocar program https://roar.berkeley.edu/
Nov 24, 2022
DIY Robocars via Twitter
RT @chr1sa: The next @DIYRobocars autonomous car race at @circuitlaunch will be on Sat, Dec 10. Thrills, spills and a Brazilian BBQ. Fun…
Nov 24, 2022
DIY Robocars via Twitter
RT @arthiak_tc: Donkey car platform ... Still training uses behavioral cloning #TCXpo #diyrobocar @OttawaAVGroup https://t.co/PHBYwlFlnE
Nov 20, 2022
DIY Robocars via Twitter
RT @emurmur77: Points for style. @donkeycar racing in @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/Y2hMyj1…
Nov 20, 2022
DIY Robocars via Twitter
RT @SmallpixelCar: Going to @diyrobocars race at @UCSDJacobs https://t.co/Rrf9vDJ8TJ
Nov 8, 2022
DIY Robocars via Twitter
RT @SmallpixelCar: Race @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/kK686Hb9Ej
Nov 8, 2022
DIY Robocars via Twitter
RT @PiWarsRobotics: Presenting: the Hacky Racers Robotic Racing Series in collaboration with #PiWars. Find out more and register your inter…
Oct 23, 2022
DIY Robocars via Twitter
RT @Hacky_Racers: There will be three classes at this event: A4, A2, and Hacky Racer! A4 and A2 are based around UK paper sizing and existi…
Oct 23, 2022
DIY Robocars via Twitter
Oct 23, 2022
DIY Robocars via Twitter
Oct 19, 2022
DIY Robocars via Twitter
Oct 18, 2022
DIY Robocars via Twitter
RT @NeaveEng: Calling all UK based folks interested in @diyrobocars, @f1tenth, @donkey_car, and similar robot racing competitions! @hacky_r…
Oct 13, 2022
DIY Robocars via Twitter
RT @araffin2: 🏎️ After hours of video editing, I'm happy to share a best of my Twitch videos on learning to race with RL. 🏎️ Each part is…
Oct 13, 2022
More…