Close

Let's.. Assemble!

A project log for R2Home

GPS Guided Parachute Recovery System - Making Radiosondes Reusable

yohan-hadjiYohan Hadji 08/26/2021 at 14:140 Comments

Hi there! 

Last time I wrote a project LOG, I told you that R2Home was now technically capable of reaching the final objective. The only missing part was really the software and the autopilot. 

The first good news is that there has been a lot of progress on these two things! 

But what’s the objective already? The objective is to drop the system at ~100m of altitude and ~100m of distance, to get it to autonomously deploy its wing at a given altitude, and then fly autonomously to to the home location. 

The first part - the autonomous deployment of the wing at the right altitude, is now really proven to work on many flights.

The autopilot thought, wasn’t really working until yesterday. As you might have seen on one of the latest videos : 

On this flight, we had multiple problems with the autopilot. What we can see is that the wing is flying a bit in the right direction, but then it quickly overshoots and enters a dead spiral. The only way to get out of the dead spiral was to bring back control to neutral, and let the wing fly again. 

The first reason for this problem was the reliability of the data used by the autopilot. At the moment, the only data - less is more - used is the course over ground given by the GNSS receiver (fancy name for GPS) . 

This first part of this first problem was in the way the GPS is communicating with the onboard controller. The GPS is sending a position estimation message every 200ms, this message is put in a buffer by the onboard controller before, or while parsing it to update the controller. But the buffer was too small to fit one full message, which meant that if the computer was not exactly emptying it as soon as the message was entering the buffer, then information was lost. 

The result was that every ~5s, the GPS position wasn't updated for  ~1 or ~2s. 

The second problem is that the GPS course over ground is only calculated and updated by the GPS if the speed > ~1m/s. And if the speed is lower than ~1m/s, then the data output is frozen. 

So what I needed, in addition to a bigger buffer size, was a function, to detect, using speed and course over ground variation, whether the course over ground is valid or not. 

If valid, then command is calculated and applied to the servos, otherwise, the command is brought back to neutral. So we are sure that, if the data is wrong, then we are just flying in a straight line. 

I also had to set the gain a bit lower than on this first test, to make sure, there isn’t enough command applied to enter the dead spiral, but in any case, there is also another function that monitors the vertical speed, and if it’s way too low (<-5m/s) then the command is brought back to neutral to get out of the spiral. 

See the spiral on this graph? 


And so here is the result : 

What you are looking at is the GPS trace of R2Home’s motorized version, it’s using the same servos, the same onboard controller, there is just a thruster, to be able to lift off from the ground, instead of using a drone drop to conduct a flight test. 

Here is also the direction sepoint and the measured direction (GPS course over ground), the big deviation that you can see at the end is when the wing is flying just above the home location and so it has to turn 180° really fast. 

The controller is actually a PD controller with very little D, and a bit too much P at the moment, I still have to set it a bit better, and see how wing loading is interacting with it. 

The dashed blue line on that graph is the beginning of the autopilot mode. The very big deviation you can see at then end is when the wing is flying just above the home location and it has to turn 180° really fast. 

And.. I guess you’re now all waiting for! Here is the video: 

So as you can see it’s working quite well in multiple different flights / wind conditions. I would be working better if the wing loading was higher, but then it is really hard for me to launch the wing with the thruster. 

And so the next step is to.. assemble! Assemble both operational “sub-projects”, the deployment, and the autopilot, to reach our objective. And make them both work together. 

Stay tuned, it’s gonna be.. epic!

- Yohan

Discussions