Jump to content


First stabilized flight!


21 replies to this topic

#1 peabody124

    Architecture Team

  • Administrators
  • 3383 posts
  • LocationHouston, TX
  • Country: flag of United States United States


Posted 03 September 2010 - 12:41 AM

So I took my Zagi delta-wing up today for it's first stabilized flight. Here are my thoughts after it.

1) Overall, everything went as I anticipated. That means the bugs I expected to be a problem were, and plenty of things I didn't also were (the list goes on, transmitter battery failing, thinking I burned out the receiver when I reset some settings because switched from PPM transmission, etc. I did catch most of these the previous few days though).

2) Flying in the field near where my parents were camping while visiting was a mistake - not enough space and I was constantly tip stalling while trying to turn conservatively and avoid trailers)

3) Mounting my XBee on the front of the plane (getting it away from battery momentum in a crash) backfired when I broke the PCB in the first heavy landing (manual control) so there is no telemetry from this :-(

4) Absolutely need a bias correction for the attitude of AHRS. Because it's mounted on the top of the wing for me, there is 10-15 degree difference between the top and the bottom of the wing. The attitude for level flight is probably around 10 degrees. This error meant that whenever I switched to stabilized mode, it initially would dive to the ground. I hacked in an offset and that was too much, so afterwards it would jump up. Since I was trying to tell it straight-and-level I was jimmying the sticks to suggest the "correct" attitude I don't have a good feel for how well stabilization would work.

4a) I'm soliciting suggestions for a good way to learn this parameter. My current plan is to use the flight logging to grab a straight and level flight, then have a utility to post process, select a segment, and look at the average attitude during this. I thought at first putting it on a table would work but: 1) the table probably wasn't horizontal based on the influence of rotating the plane 2) the bottom horizontal != level flight. TL;DR: I tried this shit and it sucked.

5) Time for PID loop constants tuning. My ultimate goal, and a serious interest of mine, is wrapping some system identification into the flight hardware so it can automatically learn these (plus #4). As I said the area I was flying in was too small for me to feel that the stabilization was really rejecting perturbations from the wing and correcting. Also a delta wing with no yaw correction flying at 20 feet in a corridor of trailers is a terrible place to figure this out.



Also here is a second video showing a more successful flight with some telemetry (although it was dropping out - probably the modem damage)



#2 Edouard

    GCS Developer

  • Members
  • PipPipPip
  • 716 posts
  • LocationParis
  • Country: flag of France France


Posted 03 September 2010 - 06:26 AM

congratulations!!!

#3 Pip

    Developer

  • Members
  • PipPipPip
  • 282 posts
  • Country: flag of United Kingdom United Kingdom


Posted 03 September 2010 - 07:01 AM

Well done!

Thought your a brave man to put so much trust into untested flight control software lol.

The videos would have been interesting to see how well (or not as the case maybe) OP works.

#4 PT_Dreamer

    GCS Core Developer

  • Administrators
  • 965 posts
  • LocationCaparica, Portugal
  • Country: flag of Portugal Portugal


Posted 03 September 2010 - 09:34 AM

Congrats, its a small crash step to man but a big step to mankind "OpenPiloters".

#5 osnwt

    Core Developer

  • Administrators
  • 1477 posts
  • LocationSevastopol
  • Country: flag of Ukraine Ukraine


Posted 03 September 2010 - 12:07 PM

Congratulations, first of all!

You're really brave man to fly without enough space to recover :-)
(I do this myself sometimes with my foam delta, but at least it was tested and proved to be controllable).

View Postpeabody124, on 03 September 2010 - 12:41 AM, said:

4a) I'm soliciting suggestions for a good way to learn this parameter. My current plan is to use the flight logging to grab a straight and level flight, then have a utility to post process, select a segment, and look at the average attitude during this. I thought at first putting it on a table would work but: 1) the table probably wasn't horizontal based on the influence of rotating the plane 2) the bottom horizontal != level flight. TL;DR: I tried this shit and it sucked.
Going to that direction, as I understand, you want to put away the requirement of (flight) level placement of AHRS in the model? That's good intention because correct placement sometimes is impossible or unknown.

It is not very user-friendly, but I may only suggest to use separate Tx discrete channel to learn the system for level flight attitude. That is, you put model to straight and level flight, and then switch that channel to "save current attitude as default". I do not think that any other ways will work well enough (except if you manually choose correct segment what may be not so obvious and even less user-friendly).

#6 peabody124

    Architecture Team

  • Administrators
  • 3383 posts
  • LocationHouston, TX
  • Country: flag of United States United States


Posted 03 September 2010 - 12:13 PM

View PostPip, on 03 September 2010 - 07:01 AM, said:

Well done!

Thought your a brave man to put so much trust into untested flight control software lol.

The videos would have been interesting to see how well (or not as the case maybe) OP works.

I'll parse through the videos today and upload them. There's one that I think it worked quite well - but as I said it wasn't a long enough flight to really know what it was doing (and needs the cal/PID tuning).

View Postosnwt, on 03 September 2010 - 12:07 PM, said:

Going to that direction, as I understand, you want to put away the requirement of (flight) level placement of AHRS in the model? That's good intention because correct placement sometimes is impossible or unknown.

It is not very user-friendly, but I may only suggest to use separate Tx discrete channel to learn the system for level flight attitude. That is, you put model to straight and level flight, and then switch that channel to "save current attitude as default". I do not think that any other ways will work well enough (except if you manually choose correct segment what may be not so obvious and even less user-friendly).

That's a good idea and one of the things I was thinking. It could even be fairly user friendly - a GCS switch could say this time flipping into stabilize mode is a horizontal calibration mode too. I kinda like that plan because it doesn't require GCS (which I'm currently lacking in air).

#7 Edouard

    GCS Developer

  • Members
  • PipPipPip
  • 716 posts
  • LocationParis
  • Country: flag of France France


Posted 03 September 2010 - 01:58 PM

View Postpeabody124, on 03 September 2010 - 12:13 PM, said:

That's a good idea and one of the things I was thinking. It could even be fairly user friendly - a GCS switch could say this time flipping into stabilize mode is a horizontal calibration mode too. I kinda like that plan because it doesn't require GCS (which I'm currently lacking in air).

It is pretty easy to switch the flight mode from the TX.

I was actually thinking of using some of the rotary controls on my TX to fine-tune the PID parameters. All in all I am still afraid this will require good coordination between laptop keyboard and TX handling at the same time, unless we use really high-end TX - or a custom firmware on the Turnigy 9X ;-)

How difficult would it be to add a calibration routine in the config gadget which says "Put your UAV horizontally and press the button", and detect the Pitch/roll bias - Yaw is not really an issue for basic stabilization, right ?

#8 dschin

    Lead INS Developer

  • Moderators
  • 100 posts
  • Country: flag of United States United States


Posted 03 September 2010 - 02:01 PM

KEEP UP THE GOOD WORK! You'll have it flying loops soon. Just need a second GPS module to mount on the bottom.

#9 osnwt

    Core Developer

  • Administrators
  • 1477 posts
  • LocationSevastopol
  • Country: flag of Ukraine Ukraine


Posted 03 September 2010 - 03:11 PM

View PostEdouard, on 03 September 2010 - 01:58 PM, said:

How difficult would it be to add a calibration routine in the config gadget which says "Put your UAV horizontally and press the button", and detect the Pitch/roll bias
That's easy but this should be done in flight, so better to use Tx for that. But GCS option also may be useful for initial setting, mostly in cases where you put AHRS not being level in the model for some reason.

#10 peabody124

    Architecture Team

  • Administrators
  • 3383 posts
  • LocationHouston, TX
  • Country: flag of United States United States


Posted 03 September 2010 - 03:21 PM

View PostEdouard, on 03 September 2010 - 01:58 PM, said:

I was actually thinking of using some of the rotary controls on my TX to fine-tune the PID parameters. All in all I am still afraid this will require good coordination between laptop keyboard and TX handling at the same time, unless we use really high-end TX - or a custom firmware on the Turnigy 9X ;-)

How difficult would it be to add a calibration routine in the config gadget which says "Put your UAV horizontally and press the button", and detect the Pitch/roll bias - Yaw is not really an issue for basic stabilization, right ?

That was my first though, and I measured those values while it was horizontal and then hacked them into the code. Still not good enough (but swapped it from diving to ground to pulling up - much better). I think it needs to be in flight to know the attitude that keeps it flying straight & level. In the long run I'd love to do some system identification, just process a flight log - see from the AHRS when it was holding altitude and heading, and take the average of the attitude in all those segments.

For now I'm going with something similar Dschin suggested - use the rotary knobs to tune a bias term (I'll add a RPY). I like the idea of tuning the P term as well though. I'll maybe add a way that you can change what those knobs do if you want... I'll check this code in when written but wrapped if disabled #ifdef's.

#11 Edouard

    GCS Developer

  • Members
  • PipPipPip
  • 716 posts
  • LocationParis
  • Country: flag of France France


Posted 03 September 2010 - 04:38 PM

View Postpeabody124, on 03 September 2010 - 03:21 PM, said:

That was my first though, and I measured those values while it was horizontal and then hacked them into the code. Still not good enough (but swapped it from diving to ground to pulling up - much better). I think it needs to be in flight to know the attitude that keeps it flying straight & level. In the long run I'd love to do some system identification, just process a flight log - see from the AHRS when it was holding altitude and heading, and take the average of the attitude in all those segments.

I will be getting my Pandora within the next few weeks (www.openpandora.org) and I am definitely planning to use this as a small ground station. If it works as I hope it does, I will write a gadget with large buttons to access several functions such as "Set Level Flight" by just pressing the touchscreen - the goal being to avoid a crash while using the touchpad on a laptop in broad sunlight, something that is definitely bound to happen...

Quote

For now I'm going with something similar Dschin suggested - use the rotary knobs to tune a bias term (I'll add a RPY). I like the idea of tuning the P term as well though. I'll maybe add a way that you can change what those knobs do if you want... I'll check this code in when written but wrapped if disabled #ifdef's.

It is 1st of all a matter of defining new input channel types in the ManualControlCommand object, right? Then of course to have a module in the flight software which does something with those inputs...

#12 peabody124

    Architecture Team

  • Administrators
  • 3383 posts
  • LocationHouston, TX
  • Country: flag of United States United States


Posted 03 September 2010 - 10:58 PM

Ok, video added to initial post. Enjoy!

#13 Gary Mortimer

    Member

  • Banned
  • PipPipPip
  • 832 posts
  • LocationCold Brayfield UK, Rosetta RSA
  • Country: flag of South Africa South Africa


Posted 04 September 2010 - 12:19 AM

Well done, you have pretty big control throws on those surfaces. Most wings were made for combat on slopes at relatively slow speeds with high turn rates. We keep making our surfaces smaller with less movement. All that said, once again well done a cracking start!

#14 dschin

    Lead INS Developer

  • Moderators
  • 100 posts
  • Country: flag of United States United States


Posted 04 September 2010 - 12:36 AM

Including the the crash was a nice touch. I had a good laugh at you and your father dodging the plane. Been there.

#15 PT_Dreamer

    GCS Core Developer

  • Administrators
  • 965 posts
  • LocationCaparica, Portugal
  • Country: flag of Portugal Portugal


Posted 04 September 2010 - 01:12 AM

This will be forever in OpenPilot's history as the first stabilized flight ever. I think this marks the beginning of a new stage in development.

Also good reflexes therePosted Image

#16 Pip

    Developer

  • Members
  • PipPipPip
  • 282 posts
  • Country: flag of United Kingdom United Kingdom


Posted 04 September 2010 - 07:09 AM

lol :)

You can't beat a good piccy or video :)

#17 Gary Mortimer

    Member

  • Banned
  • PipPipPip
  • 832 posts
  • LocationCold Brayfield UK, Rosetta RSA
  • Country: flag of South Africa South Africa


Posted 04 September 2010 - 09:34 AM

Oh and you really need to put the wing tips back on, they help!! Unless thats a new Zagi finless design. I think you will find reduced throws, wing tips and a brushless motor will really help. If you like you can put them inboard a little, that helps with a discuss style launch and sort of makes a prop guard as well.

#18 peabody124

    Architecture Team

  • Administrators
  • 3383 posts
  • LocationHouston, TX
  • Country: flag of United States United States


Posted 05 September 2010 - 03:01 AM

View PostGary Mortimer, on 04 September 2010 - 09:34 AM, said:

Oh and you really need to put the wing tips back on, they help!! Unless thats a new Zagi finless design. I think you will find reduced throws, wing tips and a brushless motor will really help. If you like you can put them inboard a little, that helps with a discuss style launch and sort of makes a prop guard as well.

Per your suggestions I dug out the old wing tips and it did help (as well as flying with some space so I could run it up). Good point about the throw too - I normally fly with exponential so don't use it all normally but it might make the plane too sensitive. I added a video above with another flight and some GCS video although the telemetry link wasn't very good (cracked modem)

#19 Gary Mortimer

    Member

  • Banned
  • PipPipPip
  • 832 posts
  • LocationCold Brayfield UK, Rosetta RSA
  • Country: flag of South Africa South Africa


Posted 07 September 2010 - 03:04 PM

That second video looks much better, top banana.

#20 Vassilis

    Developer

  • Members
  • PipPipPip
  • 130 posts
  • Country: flag of United States United States

Posted 08 September 2010 - 02:25 AM

First of all well done! Looking forward to more.

View Postpeabody124, on 03 September 2010 - 12:41 AM, said:

4) Absolutely need a bias correction for the attitude of AHRS.


I agree, for stabilized flight the bias is effectively controlled by the pilot, so if your pitch bias is -15 degrees your pitch command will need to be +15 degrees to keep the model flying level. So one could trim through the radio until the model is flying level, then when you land you check the AttitideDesired object and use those values for the bias (with the sign reversed).