PDA

View Full Version : AOA Feedback and Control


Gary Warner
Mar 24, 2005, 05:25 PM
I must be into pain. :rolleyes:

I made an AOA controller about 5 years ago and now I've got a wild-hair to try it again.

In short, I'd like you to read this and provide some feedback. It would be nice to get it right this time. :cool:

Here's a link, since it's a bit big to post here: AOA R/C Sailplane Project (Part II) (http://web2.airmail.net/warner1/aoa1.htm)
--

Corrections made...

Gary Warner
Mar 24, 2005, 08:42 PM
This was the old AOA PCB. I can't put mu hands on the sensor right now.

Gary Warner
Mar 25, 2005, 05:25 PM
Ok, well how about comments on this:

Can someone explain the coding method(s) used to produce the non-linear responce curve?

My earlier version used the linear method - easy to code, but won't work well in practice.

raptor22
Mar 25, 2005, 06:29 PM
I can't say much except that this is super coo. rcg has a electronics forumt hat you could probably get more comments on coding and the actual electronics.

Gary Warner
Mar 25, 2005, 06:57 PM
I just tried to PM Andy W. to ask him to move this tread to the DIY Electronics forum....

Andy W. - Empty your PM mail box. It's FULL! :D

Seriously, Andy... Can you please move this topic to DIY Electronics? I don't want to start a cross post thread.

Thanks.

Gary
--

Ollie
Mar 25, 2005, 10:50 PM
http://www.charlesriverrc.org/articles/asfwpp/helmutlelke_asfwpp.htm

Gary Warner
Mar 26, 2005, 11:58 AM
Thanks for the link Ollie.

Warske
Mar 26, 2005, 12:33 PM
...I'd like you to read this and provide some feedback... Here's a link, sinceit's a bit big to post here: AOA R/C Sailplane Project (Part II) (http://web2.airmail.net/warner1/aoa1.htm)
...
Ok, well how about comments on this:
Can someone explain the coding method(s) used to produce the non-linear responce curve?
My earlier version used the linear method - easy to code, but won't work well in practice.
You asked for comments...:)

Looks like you are taking a very thoughtfull approach.

Coding method(s) used to produce non-linear response curve:

1) Use a lookup table. With a 10 bit A/D value, you only need 1024 table entries to cover the whole range. You can use a smaller table (using less memory) by accepting lower resolution (maybe you only need 7 or 8 bits) or doing a linear interpolation between table entries. You can use the onboard EEPROM for the lookup table, attach a larger external EEPROM, or you can probably use program memory (but I haven't tried it).

2) Download one of the PIC C compilers (limited "free" version) and use a math library to code your formula. The 2 popular C compilers I looked at both let you mix in assembly language, so you wouldn't need to rewrite your original code (you didn't say you used assembler, but that's what I'm assuming). Google: "numerical methods in C"

"If the response curve could be reduced when only small changes are needed, this oscillation problem could be reduced, if not eliminated."

I'm not sure that follows. If the system ever gets into the high gain part of the curve, I would expect it to oscillate like it did before. If it is never going to get to that part of the curve, you don't need the high gain part anyway, and what is left is just a low gain system. To get a low gain system, all you need to do is reduce the feedback. But then it wont correct the AOA as well.

If you want to learn more about the stability of linear feedback systems, Google: bode analysis

Although you probably don't have a linear system, one of the things linear feedback theory tells you is that a low-pass-filter in the feedback signal will improve stability.

"I want to have the response curve increase in response the longer and farther away from the intended AOA error is sensed."

That is essentially what the low pass filter does.

A low pass filter passes low frequencies and attenuates high frequencies. Putting this in the feedback path reduces the feedback gain for higher frequencies.

You noticed your glider oscillates. Lets say it took 2 seconds for a complete cycle of the oscillation. The frequency would then be 0.5 hz. A 0.1 hz low pass filter would reduce the gain of the system at 0.5 hz and (hopefully) kill the oscillation. Frequencies below 0.1 hz would get through at the normal gain.

The low pass filter approach slows down the response of the feedback system. You want a very fast response. That is usually the trade off with feedback systems: faster response = less stable. slower response = more stable

One approach to implementing a low pass filter in software is to time average the signal. That is, you read the A/D value and average it with the previous value. That averaged value is what you use for the feedback. Or you average the last 2 values, or 3, etc. The more values averaged, the lower the cutoff frequency, the more stable, and the less responsive.

In fact, you could use another channel input to adjust the number of values averaged while you are flying. That would let you quickly find the best value.

Other ideas
With linear systems, using the above mentioned Bode analysis, it is sometimes possible to do better than a simple low pass filter. It involves designing a feedback system with poles and zeros at certain frequencies. If you enjoy math, it might be an interesting approach and give you a better understanding of what you are up against.

Another approach is to try to simulate your aerodynamic system on a computer and try various techniques to make it stable. Faster than building and testing hardware. Might give you some more insights.

Warske

Gary Warner
Mar 26, 2005, 12:56 PM
Thanks Warski.

This is exactly what I needed. My expertise is in electronics, not physics. You have given much to digest. I'll check this in detail after work today. I might have some questions for you then.

Thanks again!

Gary
--

Warske
Mar 26, 2005, 01:43 PM
Its been over 25 years since I looked at this, but I seem to remember that to design the fastest high gain feedback system, you start by making everything as fast as possible with the least phase shift. Then you make it stable by putting a low pass filter in the feedback loop.

This would imply that you want to reduce the mass of your sensor, use a fast elevator servo, and reduce the angular momentum of your glider by moving fore and aft mass toward the center of gravity.

[Edit]
Also possibly increase the area of the elevator.

Warske