PDA

View Full Version : Automatic Yaw Correction


Pages : [1] 2 3 4

Gary Warner
Apr 02, 2005, 04:14 PM
I bought a Memsic (parallax) accelerometer (+/- 2G's) for my Dynamic Prop Balancer project, since it was just sitting in the store calling my name. Turns out, the accelerometer is not suitable for the DPB project. Now I own a fairly expensive accelerometer and I'm sitting here, wondering what to do with it. This came to mind.

On my sailplanes I use a piezo rate gyro on the rudder to assist on bad launches, keep the nose pointed at the landing tape and to help coordinate my turns. It works quite well, but not perfect when it comes to coordinated turns.

My new idea is to use this accelerometer and a PIC to control slip. The slip indicator in my real airplane works on perceived gravity alone. With an accelerometer, I can use it to provide the exact same information. It's been done before I'm sure, but I haven't gone looking yet. Still, I'd love to take on this project as a diversion from the DPB while I wait from some supplies to come in. It should go together in just 1 or 2 days.

Anyone interested in following my progress?

Gary
--

Mr.RC-CAM
Apr 02, 2005, 04:30 PM
Sounds fun. How do you plan to mask the effects of inertia (they can induce a huge error) without compromising the static G-force measurements?

This may help: http://autopilot.sourceforge.net/kalman.html

RC-CAM

Gary Warner
Apr 02, 2005, 04:55 PM
Aaaaa... help me out here...

The axis I'm going to sense is affected HOW by inertia?

I thought that it will ONLY read the side to side G forces. Am I missing something here?

I'm NEW to the concept of accelerators. :confused:

Gary

Gary Warner
Apr 02, 2005, 05:13 PM
Oh! Duh...

I see what you are saying. I misread the post as there were inertia errors in the sensor. You are talking about over/under shoot and oscillations in the yaw axis.

I plan on doing what you and others suggested in another post about my Angle Of Attack (AOA) feedback system. I'll use a lookup table to use a non-linear response curve. This application will let me cut my teach on the LUT concept before applying it to the AOA project.

Sorry to sound dumb so late on a Saturday (I've had all the coffee I'll get today)

Gary
--

Mr.RC-CAM
Apr 02, 2005, 05:21 PM
Accelerometer ICs will measure static (gravity) and dynamic (movement) acceleration with ease. They are clueless to which is which. They need other sensors to help them sort this out. Piezo gyros are popular, which often utilize a Kalman filter to manage the accelerometer's error component.

Basically, in absence of motion, you can easily measure the static G-forces due to gravity. However, when you add movement, such as vibration or a model plane's pitch and roll attitude changes, the two forces interact with each other. Depending on what you have in mind, this can induce error.

Just keep this in mind while you prototype the device. Knowing these little details will help you understand the limitations of your gadget. Sadly, I have no idea what a slip indicator is or how it is used, so I am clueless about the issues you will encounter. Just blaze forward and hammer down the problems as they poke up. :)

RC-CAM

Gary Warner
Apr 02, 2005, 05:34 PM
I'm still trying to grasp what you just said, but maybe this will help you and me (since you don't know what a 'slip' indicator is).

The picture attached is a slip indicator that most all planes have. It's effectively a spirit level turned upside down. It's a curved tube filled with kerosene (fluid for dampening) and a ball, free to move inside. If the flight is uncoordinated (slip) the ball will simply move to the side that gravity (perceived gravity) pulls it to. In flight, we apply rudder input to re-center the ball in the indicator. It responds to only one axis of force (horizontal, i.e. X axis) and it reads true in any normal flight attitude.

Does this help?

Gary
--

Mr.RC-CAM
Apr 02, 2005, 05:52 PM
The issue is that if the model changes roll attitude, but has no slip, then the change in static G-forces can appear as slip to the PIC. From what I can tell from the photo, and your comments, you should be able to emulate the viscous damping media of your mechanical gauge with a simple low low pass filter. But, that can create other issues if you are not careful.

I am not sure how the pilot interprets the shown slip indicator in a steep roll. Do you just apply pilot training to what you see? That is, does the pilot coordinate other physical senses when viewing the slip reading in a banked turn? If you do, then that is the sort of sensory perception that would need to be in your PIC.

RC-CAM

Gary Warner
Apr 02, 2005, 05:58 PM
I also see another point you were tying to make (I think).

When the PIC is first turned on the plane will be still and level. The first second nothing happens (allows for my hand to get away from the plane since I just turned the power on). In the second 'second' the unit will calibrate it's self to understand that the current horizontal G force reading is strait and with no slip (no horizontal movement) . This reading will now be used as the ‘zero’ reference. . This gives the PIC a reference as to what zero G's is, so far as side to side G's. Then the PIC will begin to recognize errors and output corrections via my LUT.

Are we having fun yet? :p :rolleyes: :D

Gary
--

Gary Warner
Apr 02, 2005, 06:20 PM
I am not sure how the pilot interprets the shown slip indicator in a steep roll. Do you just apply pilot training to what you see? That is, does the pilot coordinate other physical senses when viewing the slip reading in a banked turn? If you do, then that is the sort of sensory perception that would need to be in your PIC.

RC-CAM

That's a very good question for those who don't fly (haven't been trained to fly).

The concept of the slip indicator revolves around the rudder and the fact that airplane wings and airframes perform at their peak (and predictably) if slip is corrected to zero (centered ball). Notice in the indicator that there are two lines that are positioned on either side of the ball. These lines are the "center" of the slip indicator. If the ball moves to the right, then right rudder is needed to correct the slip. The same in reverse applies to the left. The amount of error (distance of error from the center marks) illuminates the amount of corrective input needed to correct the slip.

What we are most concerned with in real plane flying is the ability to perform a 'constant rate turn’. This is done using a gyro in addition to the slip indicator (this may have a lot to do with what you were talking about). Without the input from both the gyro and slip indicator (as well as the altimeter), it’s not always possible to perform a constant rate turn. Constant being the real goal, because with constant rate turns, we can use a stopwatch to tell just how far we have changed our heading in any given period of time (Instrument Flying Rules - IFR). It also applies to the efficiency of lift that the wing produces, as well as other aspects of flying. It's an important instrument since it's the only one that directly (without vacuum, pitot or electrical input) can show the slip condition of flight.

And they say you learn something new every day....

Gary
--

Gary Warner
Apr 02, 2005, 06:32 PM
The issue is that if the model changes roll attitude, but has no slip, then the change in static G-forces can appear as slip to the PIC RC-CAM

I see a bit more of your confusion. The sensor will not read any component of vertical perceived gravity. Just the side force component of gravity. A plane in coordinated flight will have no side forces felt of the turn as seen by the pilot(at any degree of bank).

All this talk for flight in real planes hass caused me to call the FBO (I need to get my night-time currency up to date). I've rented a C-172 for the night. See ya when I get back...

Gary
--

Mr.RC-CAM
Apr 02, 2005, 06:49 PM
If the ball moves to the right, then right rudder is needed to correct the slip.Doesn't the ball move off center in a steep bank, even in the absence of slip? It surely must.

I see a bit more of your confusion. The sensor will not read any component of perceived gravity. Just the side force component of gravity. A plane in coordinated flight will have no side forces felt of the turn as seen by the pilot(at any degree of bank).If the aircraft banks, Yes it will. Keep this in mind: If the sensor experiences a change in roll attitude, it will be affected big time. Your "level" calibration will be meaningless unless you add a correction based on the amount of roll (gyro is useful). The resulting error will probably be at a higher order of magnitude than a slip episode will impose. As mentioned, static force and dynamic force are the same thing to the sensor. Your aircraft will experience both, unless parked on the ground with the wheel chocks in place. Earthquakes excluded. :)

RC-CAM

Gary Warner
Apr 02, 2005, 06:56 PM
Doesn't the ball move off center in a steep bank, even in the absence of slip? It surely must.

Nope. Not in the least.

If the aircraft banks, Yes it will. Keep this in mind: If the sensor has changed roll attitude, it will be affected big time. Probably at a higher order of magnitude than a slip episode will impose. As mentioned, static force and dynamic force are the same thing to the sensor. Your aircraft will experience both, unless parked on the ground with the wheel chocks in place. Earthquakes excluded. :)

RC-CAM

I'm no good at explaining these things (apparently). Jump over to the Modeling Science forum and shout at Ollie. He's one hot-shot pro at this. He has a good way of explaining these things. Give him a try. But when it's all done and said, he'll back up what I'm saying.

Gary
--

Gary Warner
Apr 02, 2005, 07:00 PM
Not to beat this horse anymore than necessary, but...

The last time you took a flight in a jet plane, did your lap-top and drink go flying into the isle when the plane turned?

Gary

(don't get me wrong - I ENJOY stimulating conversation)
--

YHSC_Chris
Apr 02, 2005, 07:05 PM
Gary,

The turn coordinator is intended to tell you if the lateral acceleration of the aircraft (at the location of the turn coordinator) is zero. Whether this means you are coodinated or not is not always the same, but for practical purposes, we can assume it to be (gliders use yaw strings in lieu of that device to get a better handle on whether or not they are coordinated). The damping fluid (low pass filter) takes out the dynamic oscillations and stabilizes the system, as Mr. RC-CAM explained. The Memsic accelerometer is probably capacitance-based, and therefore can reliably read relatively low frequency accelerations, including static (~0Hz) reliably. As an electronic replacement for the turn coordinator, it will work well.

As an aside, one of the interesting things about rate gyros, like those that people use for things like helicopters and discus-launch gliders, is that they are susceptible to drifting with temperature, time, and any other number of factors, leading to a bias. For those, you would actually want to put a band-pass filter to eliminate the bias effect at low frequency, in addition to high-frequency noise. Basically, if you're flying DLG or helicopters for short flights, the bias doesn't get too bad.

I don't know if this provides any insight other than another opinion that the concept should work.

-Chris

Mr.RC-CAM
Apr 02, 2005, 07:19 PM
The last time you took a flight in a jet plane, did your lap-top and drink go flying into the isle when the plane turned?No. But I have had items roll on the flip down tray due to the effects of static G-forces. A slip measurement would only be interested in dynamic G-forces. In practice, the IC sensor cannot tell the difference and will use one to corrupt the other. But if the bank induced error is low, and the slip data is large, then a simple low pass filter (software or analog) might be all that you need.

The best thing to do is to just fire up the sensor and play with it. You may vary well be able to utilize it in your application and live with the cautions discussed here. My experience with accelerometers suggests your aircraft application will be challenging.
RC-CAM

Gary Warner
Apr 02, 2005, 07:26 PM
Gary,

The turn coordinator is intended to tell you if the lateral acceleration of the aircraft (at the location of the turn coordinator) is zero.

Chris

All good stuff, except this part. It's not for 'acceleration', it's for static lateral loading. Though the rate of change in the indicator provides information about the 'lateral acceleration', it does not provide any useful information about amount of error, except in a relative term. It only shows the lateral forces applied to the plane. The amount of vertical gravity (perceived) affects the amount of side deflection, due ONLY to the weight of the ball it's self. If the ball could be without weight (at one G), than it would show the same degree of error for any given slip and any amount of perceived vertical G forces.

The accelerometer sensor element effectively has no weight. It will not be affected be perceived vertical G forces.

Gary

(time to call FSS for a weather breifing)
--

Gary Warner
Apr 02, 2005, 07:32 PM
The best thing to do is to just fire up the sensor and play with it. You may vary well be able to utilize it in your application and live with the cautions discussed here. My experience with accelerometers suggests your aircraft application will be challenging.
RC-CAM

Cool. I don't want to start a pissing-war about aerodynamics. I think you are right. I'll just do it and be happy with what I get. And if I should be disappointed - well... that's for another day.

Never the less, thanks for the spirited conversation. No hard feeling I hope. You have a good weekend! ;)

Gary
--

Mr.RC-CAM
Apr 02, 2005, 07:43 PM
The accelerometer sensor element effectively has no weight. It will not be affected be perceived vertical G forces.That is not at all what you will experience. They do indeed perceive vertical G-forces with excellent sensitivity. That is the static component. Accelerometer IC's make excellent inclinometers. Hence, the problem.

Never the less, thanks for the spirited conversation. No hard feeling I hope.Not at all. With luck, I may have actually helped. Time will tell. :)

Gary Warner
Apr 02, 2005, 07:50 PM
They do indeed perceive vertical G-forces with excellent sensitivity. That is the static component.

Oh boy, not to run on with this forever, but I NEED to know this (it’s important)...

Am I to understand in the simplest terms, that the 'X' axis is coupled to the 'Y' axis? I only want to read and use the ‘X’ axis (horizontal forces).

Gary
--

Mr.RC-CAM
Apr 02, 2005, 08:33 PM
There is really no sensitivity in the Y-axis when the sensor is oriented for the X-axis. However, if there are sufficient attitude changes in pitch and roll, then the Y-axis can be affected since it can tilt into the other axis. It is hard to say if the error from that will be of sufficient magnitude to impact the slip data. It is just a matter of firing up the sensor and playing airplane with it.

RC-CAM

mike50
Apr 02, 2005, 10:00 PM
The turn-and-bank indicator is like a tilt meter which measures the "tilt" felt by the plane relative to the perceived gravity.

With the accelerometer's axis parallel to the wings, it can be used to measure the tilt of the plane relative to the perceived gravity.

Gary Warner
Apr 03, 2005, 12:08 AM
There is really no sensitivity in the Y-axis when the sensor is oriented for the X-axis. However, if there are sufficient attitude changes in pitch and roll, then the Y-axis can be affected since it can tilt into the other axis. It is hard to say if the error from that will be of sufficient magnitude to impact the slip data. It is just a matter of firing up the sensor and playing airplane with it.

RC-CAM

Cool. That answers my biggest question - there is no cross coupling of the two axis. I'm comfortable with my own understanding of aerodynamics to proceed.

I see the biggest challenge being applying a non-linear response curve look-up-table (LUT) that will reduce response at near neutral detected errors and larger corrections as the error is increased. This will help with oscillations and 'hunting' for the zero error position.

BTW, my flight was very nice tonight. A cold front came through yesterday and cleared out the hazy air. The Dallas skyline was picture perfect. Couldn’t ask for a better night to fly.

Gary
--

Gary Warner
Apr 03, 2005, 12:13 AM
The turn-and-bank indicator is like a tilt meter which measures the "tilt" felt by the plane relative to the perceived gravity.

With the accelerometer's axis parallel to the wings, it can be used to measure the tilt of the plane relative to the perceived gravity.

Thanks for the description. This what I've been trying to say.

BTW, a "turn-and-bank" indicator must include a rate gyro indicator. Without the rate gyro, it's just a slip indicator.

Anyway, it seems you get what I'm talking about.

Gary
--

TMorita
Apr 03, 2005, 03:54 AM
Hey, there's a dead horse, and I didn't know about it.

I've looked at accelerometers such as the Analog Devices ADXL202.

It's easiest to think of an accelerometer as "measuring weight along a given axis". So think of a weightless rod mounted to a scale, and a donut-shaped weight that slides along the rod, and the scale measures the weight.

When the plane is flying level, this works okay, because down = direction of gravity.

When you bank the plane hard, this falls apart, because you have centrifugal force. The accelerometer can't tell the difference between gravity and centrifugal force - it just reads the weight along one axis.

If it helps, think of a ball suspended on a string inside the plane. When the plane banks hard, the ball will swing in the direction of the outside of the circle, and that's the apparent direction that you will read "down" as with a two/three-axis accelerometer.

If that's what you want, I guess it will work, but that doesn't sound like what you want?

Toshi

Warske
Apr 03, 2005, 08:25 AM
Using the accelerometer/inclinometer/slip-indicator appears to be a good idea (hard to argue with common practice in this case).

One way to test the accelerometer would be to take it up during a flight and compare its reading with that of the slip indicator under various flight conditions. Presumably they would read the same if the appropriate filtering is applied.

To assist with the dead-horse-beating, I would like to contribute the following from

http://www.av8n.com/how/htm/multi.html#sec-slip-string

"The inclinometer ball is often referred to as the slip/skid instrument, but that is a misnomer. It measures inclination, not slip. As we shall see in section 17.1.5, it is quite possible for the airplane to be inclined but not slipping. To repeat: there is no good way to determine the slip angle without a slip string."

Actually, I would quibble with the statement that it measures inclination, unless one defines inclination as lateral acceleration. Keeping in mind that gravity is one type of acceleration.

I suspect what is happening with the slip indicator is: Slip produces a lateral force (the fuselage being somewhat sideways to the air flow) which through F=MA produces a lateral acceleration, which is what is actually being measured.

Warske

sesat
Apr 03, 2005, 09:30 AM
Hey guys, I'm still not clear, how in the PIC will you separate the two vectors, gravity and non-g body acceleration?


Ram.

Gary Warner
Apr 03, 2005, 12:19 PM
If it helps, think of a ball suspended on a string inside the plane. When the plane banks hard, the ball will swing in the direction of the outside of the circle, and that's the apparent direction that you will read "down" as with a two/three-axis accelerometer.

Wow, what coincidence! Last night's flight in a Cessna 172 was in a rented airplane. The owner of the plane as a Styrofoam antenna ball attached to a string and suspended over the center of the rear window. Though I didn't take the time to 'check' the ball theory, I know it's common practice to do the ball thing to show students that the ball hangs strait down (relative to the floor of the plane) in a coordinated turn, at ANY bank angle.

I don't know why so many R/C pilots assume that the yaw axis is going to change in force in coordinated turns. It's a mind boggling thing.

Who here is a licensed pilot, especially an IFR pilot, that can backup claims that the 'ball' must swing off to the side in a steap coordinated turn? Anyone?

Gary
--

Gary Warner
Apr 03, 2005, 12:25 PM
Warske,

That link is very compete. One of the best I've seen. One could learn alot about slips, skids and rudders there.

Gary Warner
Apr 03, 2005, 12:36 PM
Hey guys, I'm still not clear, how in the PIC will you separate the two vectors, gravity and non-g body acceleration?


Ram.

That's kind of the crux of this topic. It depends on your understanding of aerodynamics. I'm toting the line that says it's an absolute force, exclusive from any other axis movement, and as such, it can be read directly from the sensor. Others say that there will be mixed forces applied to the axis I want to read (slip/skid) and that it'll have to dealt with it.

So far as to what to do to remove this mixing of axis forces, you'll have to ask the others. I don't believe there will be any mixing of other forces that will interfere with the ability to read slip/skid.

Gary
--

Gary Warner
Apr 03, 2005, 12:51 PM
Ok, I'm off to the shop (work) to build and code this project. I'll report back in tonight.

Gary
--

YHSC_Chris
Apr 03, 2005, 01:15 PM
The horse has life. Let's beat it some more... I would like to clarify a few things.

That slip string link has its terminology completely wrong. Heading is the direction that the forward body axis is pointing, yaw is the angle which the forward body axis makes with respect to the relative wind (wind relative to the airplane, that is). FWIW, course is the direction that the center of gravity is moving.

The accelerometer has a seismic mass that is accelerated, and the resulting force required to move it relative to the accelerometer case gives you a reading of acceleration. For most MEMS-based accelerometers, the seismic mass is connected to the case by flexures, and the sensing of position is determined by measuring the capacitance of multiple sets of interlaced "combs".

The cross-axis sensitivity of these devices is typically low, due to the design of the flexures.

When you are talking about a coordinated turn, you should be talking about a zero yaw angle. Because the plane is not of infinitely small size, in order for it to turn, some parts of the plane are always in slip while others are not. The error is very small, yes, but it is more correct to say it that way. That being said, assume you are not turning very small circles with a long fuselage (DLG planes do this when coring tight thermals). So, the issue is that you want the fuselage reference (centerline) to be aligned with the relative wind in the lateral direction (you still probably want some angle of attack in pitch).

The yaw string outside of gliders more or less measures this. What the turn coordinator does is to ensure that the component of lift pointed inward in a banked turn equals the centripetal acceleration (manifested as an apparent acceleration outward). The resultant apparent acceleration (including gravity) is measured and compared to a vertically (airplane axis) symmetric, downward reference. The vertical component (Earth reference axis) equals the weight in a steady turn, so you can relate the bank angle easily to the speed and turn radius. If there is a sideslip, the primary effects are sideforces on the aircraft, due to the AoA of the fuselage, tail, etc. This would effect the coordinated turn sensor's reading. Depending on the cross-coupling of the control surfaces, you can conceivable have a slipping flight that makes the coordinated turn sensor read as coordinated. For completeness, the airmass must be unaccelerated for this rough description to be true, but zero yaw in an accelerated airmass is a trickier situation.

I think the horse is still alive, and there is enough subtlety in the dynamics of this system to warrant a very prolonged conversation, with lots of figures and equations.

End result? The coordinated turn sensor is close enough for shallow, steady turns. for tight, rapidly accelerating turns, it is not right. You will probably not notice any difference unless you fly tight thermals in air that is really moving. People obviously use coordinated turn sensors all the time, so there is real merit in their output. But glider pilots fly with a yaw string, so that means something too.

-Chris

Mr.RC-CAM
Apr 03, 2005, 02:08 PM
So far as to what to do to remove this mixing of axis forces, you'll have to ask the others. I don't believe there will be any mixing of other forces that will interfere with the ability to read slip/skid.
That is not really the problem that I am worried about. I am thinking beyond that and more about the control system and the data it will be presented with.

Stepping back, I totally agree that in a coordinated turn, the vector forces will result in zero acelleration. So the concept works well in that situation. However, what do you do at all the other times? The sensor will yell at you whenever it is subjected to changes in model attitude (pitch or roll, depending on exact sensor array orientation) or has an inertial influence in absence of a deliberate turn.

Here is my best analogy. Place the acelerometer and an observer in a big cardboard box. Don't let them see outside the box. They represent the sensor and microcontroller you will be using. Stick them in an airplane. Tell the observer to yell at the pilot whenever the "slip" is measured on the sensor. This will be represented by a change in the sensor's output from its calibrated state.

Now, go fly. But, instead of performing coordinated turns, bank the aircraft while going straight. Do a knife edge. Do corkscrew rolls. Fly in turbulance. My opinion is that the sensors' output will change throughout these experiences. The guy in the box will be yelling "slip" a lot.

In the PIC controlled system, if this is the only data you have to base your PID loop on, then the feedback can indeed be inaccurate under many scenarios. Applying correction, when none is needed, is the end result.

But, perhaps I am misunderstaning the application. In any event, it will be great if it works out for you. It does sound like a fun project.

RC-CAM

Warske
Apr 03, 2005, 03:01 PM
yaw is the angle which the forward body axis makes with respect to the relative wind (wind relative to the airplane, that is).
That would mean that an airplane flying straight and level in still air would suddenly have a non-zero yaw angle if hit by a side gust of wind, even though its heading was unchanged. Not sure I buy that, but everything else sounded good. :)

Warske

william541
Apr 03, 2005, 04:28 PM
I had to draw a picture to see what the accelerometer would be seeing. As shown if figure 1-4, the accelerometer is mounted with its sensitive axis parallel to the wings. In each figure, we are looking from the tail towards the nose of the aircraft.

In figures 2 and 3, the sensor would perceive similar slip, even though no slip was present in figure 3.

Unless I'm missing something, I don't see this circuit operating any differently than the tube and BB slip indicator as long as you know what the limitations are.

I also tried using two accelerometers in a similar configuration, but it still has the same problems the single unit did under these conditions.

Bill

Gary Warner
Apr 03, 2005, 04:34 PM
I'll catch up with you guys on this dead-horse in a bit.

The hardware is finished. It took longer to print out the 16F84 datasheet than it did to make the board, and that was only the first 70 pages. :eek:

I made it with manual reset, 4MHZ clock, an input from the rx rudder channel (I still want control over the rudder), output to the servo and mounted the accelerometer on the same board.

I'm going back home now. I'll expect to have some code questions later on. I have pictures too.

Gary
--

Gary Warner
Apr 03, 2005, 05:05 PM
Here's the pictures.

Gary Warner
Apr 03, 2005, 05:18 PM
PCB trimed. Measures 1.5 x 1 x .375 and weighs 10.1 grams.

YHSC_Chris
Apr 03, 2005, 06:09 PM
Just looked up the Memsic web site for the 2125 datasheet. Truly weird. I am impressed that they can sense acceleration by using convection instead of a conventional proof mass. That's pretty cool.

Gary, I would suggest that you put some foam or epoxy surrounding the accelerometer to keep it as close to isothermal as possible. It's looking good though, and if the insulation does the trick, the package should be nice and small.

I wonder about the cross-axis sensitivity in a situation where there are no rigid restraints... I see a literature search in my future.

-Chris

YHSC_Chris
Apr 03, 2005, 06:13 PM
That would mean that an airplane flying straight and level in still air would suddenly have a non-zero yaw angle if hit by a side gust of wind, even though its heading was unchanged. Not sure I buy that, but everything else sounded good. :)

Warske

Think of a flying wing without roll-yaw coupling (straight wing with slight anhedral would do the trick), and a CG at about the neutral point. The breeze would just go by the wing without disturbing it, generating a yaw, but no change in heading. there would be a slight change in course, due to the drag force.

-Chris

Gary Warner
Apr 03, 2005, 08:52 PM
Yup, and it works. This is just the first draft of many versions to come. For right now, I'm just driving the servo directly from the CPU. If I move the sensor, it only responds to the correct axis and ignores the other axis (just as I would expect). I left the gain high and linear for this demonstration.

I see I can't put an MPEG here. Ok, I'll FTP it to my server. It's 255K. Blury, but you'll get the idea.

Slip1 Project (http://web2.airmail.net/warner1/MOV00014.MPG)

Give me a minute to get it up.

Gary
--

Gary Warner
Apr 03, 2005, 08:56 PM
CRUD! No FTP on this computer. Moving to another one...

Done. It's up.

Warske
Apr 03, 2005, 09:06 PM
Think of a flying wing without roll-yaw coupling (straight wing with slight anhedral would do the trick), and a CG at about the neutral point. The breeze would just go by the wing without disturbing it, generating a yaw, but no change in heading. there would be a slight change in course, due to the drag force.

-Chris
I'm with you, but not yet convinced. I still suspect that yaw angle has nothing to do with relative wind.

Let me try this one out on you:

1) Yaw rate is essentially what an ideal rate gyro tells you it is.

2) A yaw rate of 1 degree per second means that in 1 second, the yaw angle changed by 1 degree.

3) The rate gyro knows nothing about relative wind, only about changes in heading.

4) Therefore, yaw angle is defined with respect to compass direction, and not with respect to relative wind. For yaw angle to be defined with respect to relative wind would mean that yaw rate was defined with respect to relative wind.

Still working on the horse. :)

Warske

Gary Warner
Apr 03, 2005, 10:20 PM
A few observations...

Temperature does indeed cause some drift. My unscientific test took the sensor from room temp (75F) to about 130F with a Monokote hot air blower. The output arm moved about 3 degrees in this range, with most of the movement at the lower end of the temperature. Note that a temp read pin is on the accelerometer which can be used to compensate temp drift.

The drive signal is very stable. That is, if the sensor is set on a table, dead still, there is no output jitter. None at all.

The effects of static gravity are impressive. Tilting the sensor across the read axis causes the output to change the servo arm position by 45 degrees.

Careful checking has shown that there is no noticeable cross coupling of adjacent axis. I'm very happy to see this.

The code used to program this is only 9 lines long in PBP. It compiles to 126 instructions. I should have enough room at 1000 lines to get this to do the fancier things I have in mind.

The size of the final product will occupy the same space used by the rate gyro currently in the nose and I'll save about .3 ounces.

This was my first experience programming the F chips. I like it. I may never go back to windowed PICs again, except to use up my supply on hand.

Though this is about 10 grams, I think a commercial product could come in at 2-3 grams and 1/5th the size using SMD parts.

More to come in the days ahead. And it's too late tonight to address the physics of flight. I'll jump in tomorrow.

Gary
--

Mr.RC-CAM
Apr 03, 2005, 10:51 PM
The effects of static gravity are impressive. Tilting the sensor across the read axis causes the output to change the servo arm position by 45 degrees.
Yes, static G-force sensitivity is awesome. That is the issue I keep bringing up. The model will experience attitude changes, which is how the static G-force error will be introduced into your measurements. If there is a simple way to mask this then all your problems are solved. All the methods I know of use a rate gyro sort of sensor for error correction.

Nice job on the protoboard. Clean and simple.

RC-CAM

Warske
Apr 03, 2005, 11:03 PM
Looks nice! Thanks for sharing your observations.

Tilting the sensor across the read axis causes the output to change the servo arm position by 45 degrees.
How many degrees of tilt does it take to get your 45 degrees on the servo?

This was my first experience programming the F chips. I like it. I may never go back to windowed PICs again, except to use up my supply on hand.
I see you're using a 16F84. There's lots of good example code out there for that chip, but this might be of interest:
http://www.finitesite.com/d3jsys/16F88.html
The PIC 16F88: Why the PIC 16F84 is now Really obsolete.

The other nice thing about the F chips is the in-circuit programming (ICSP). You don't have to pry it out of its socket and transfer it to a programmer.

Looking forward to your reports.:)

Warske

william541
Apr 03, 2005, 11:16 PM
Very nice Gary, I especially like the MPG...

From what I gathered, you want to use this to help control the rudder during a coordinated turn?

Would it be possible to use the aileron position as an input to the micro as well? If the micro sees that the ailerons are in the neutral position, the micro would take an accelerometer reading and call it the zero reference point. Then as the ailerons are moved out of neutral to establish the bank angle, the micro would monitor the accelerometer and adjust the rudder to get back to this reference point. When the ailerons are re-centered after the bank angle is established, then the accelrometer makes this its new zero point.

Basically re-zero the accelerometer every time the ailerons are centered, no matter what roll angle you happen to be in. So you are monitoring the change in the accelerometer only during roll/bank angle changes.

Not sure if this example would work, but it's a thought. -Bill-

Gary Warner
Apr 04, 2005, 01:22 AM
Yes, static G-force sensitivity is awesome. That is the issue I keep bringing up. The model will experience attitude changes, which is how the static G-force error will be introduced into your measurements. If there is a simple way to mask this then all your problems are solved. All the methods I know of use a rate gyro sort of sensor for error correction.

Nice job on the protoboard. Clean and simple.

RC-CAM
Funny... about the clean PCB. It’s only about the 6th PIC PCB I’ve ever made. I have no format to reserve space. I just start with the crystal, move to the B+ and add reset. Everything else just follows.


I can't contemplate all this in terms of what's right and wrong, but I will tell you that this; CPU will fly next weekend, if not sooner. We'll see once the flight tests are in.

Thanks so much for all your input. It's been invaluable and spirited - both of which are good things.

Gary
--

Gary Warner
Apr 04, 2005, 01:35 AM
Looks nice! Thanks for sharing your observations.


How many degrees of tilt does it take to get your 45 degrees on the servo?

About 130 degrees. I first thought it was 180 degrees, until I noticed that the servo was max'ed out sooner. Truth be known, at this time I'm dividing the resolution by 3. That's about 1.66MS centering. Not the correct 1.5MS centering, but close enough for me to prove the hardware was made correctly and it allows me a chance to see the characteristics of the accelerometer.

I see you're using a 16F84. There's lots of good example code out there for that chip, but this might be of interest:
http://www.finitesite.com/d3jsys/16F88.html
The PIC 16F88: Why the PIC 16F84 is now Really obsolete.

The other nice thing about the F chips is the in-circuit programming (ICSP). You don't have to pry it out of its socket and transfer it to a programmer.

Looking forward to your reports.:)

Warske

Yeah, I noticed that chip has been superceded by a long shot. But since it was at hand, well, I have only got 3.5 hours real work in this. What's in the shop will have to do for now. The next order will for sure include many of the new chips. Did you notice the date code on the IC: "9803SAW"? It was made and most likely bought in 1998.

Gary
--

Gary Warner
Apr 04, 2005, 01:45 AM
Very nice Gary, I especially like the MPG...

From what I gathered, you want to use this to help control the rudder during a coordinated turn?

Would it be possible to use the aileron position as an input to the micro as well? If the micro sees that the ailerons are in the neutral position, the micro would take an accelerometer reading and call it the zero reference point. Then as the ailerons are moved out of neutral to establish the bank angle, the micro would monitor the accelerometer and adjust the rudder to get back to this reference point. When the ailerons are re-centered after the bank angle is established, then the accelrometer makes this its new zero point.

Basically re-zero the accelerometer every time the ailerons are centered, no matter what roll angle you happen to be in. So you are monitoring the change in the accelerometer only during roll/bank angle changes.

Not sure if this example would work, but it's a thought. -Bill-

Thinking... thinking... oh, it's past midnight! I'll catch up with this tomorrow.

Gary
--

sesat
Apr 04, 2005, 09:55 AM
This is so exciting!

Gary, how are you dealing with the fact that your sensor detects yaw with respect to the ground and not the river of air?

If you need tilt compensation consider thermopile horizon-sensing.


Ram.

Ironsides
Apr 04, 2005, 11:29 AM
This thread is really good stuff. Way over my head.

Having watched Gary's video of the servo reacting to the sideways motion of the sensor, my immediate reaction was to wonder what other applications this could assist.

First thoughts are to keep glow planes - tail draggers in particular - running in a straight line on takeoff. Equally, to keep glow float planes running straight on the water on takeoff. You would want an engage/disengage capability.

David

Gary Warner
Apr 04, 2005, 12:03 PM
OK, I've had my first cup of coffee :cool: . It's time to address these aerodynamic issues.

When I titled this thread, I may have been misspoken. What I've made is a slip/skid correction sensor. I want to close that loop between the rudder and the slip/skid. In a real plane, the human is in loop, using the slip indicator, seat-of-the-pants feeling and rudder input. If the slip/skid ball moves to the right, we apply right rudder input to get the ball to re-center in the indicator. Same concept for left. As modelers, we also have a visual feedback loop. But our problem is that it takes a large amount of error for us to see the slip/skid and when we do apply corrective input it's usually far behind the curve (slow in the loop). Not to mention that we do not have any seat-of-the-pants feedback (where you can feel the side to side forces on the body).

I'm not trying to self level a plane in flight. I'm simply and purely interested in detecting side forces (forces that would cause you to fall over right or left, if you were sitting in the plane) and to have this PIC apply the appropriate amount of rudder correction for a given amount of detected error.

Many R/C pilots are under the impression that side forces are needed or unavoidable to induce or maintain a coordinated turn. That's just not true. I think that it's mostly due to their experiences with the dihedral based roll functions on so many trainers and easy to fly planes, i.e. using the rudder to turn the airplane. Quickly, the rudder on these planes simply introduces a side slip (oops, I mean skid) in flight, causing the perceived wind to change in horizontal heading. Because of the dihedral effect (mostly do to the physical dihedral of the wing) one wing produces more lift than the other, hence we get a rolling result. It's the bank angle and the resulting horizontal component of lift that turns the plane. The rudder input is only used to control the differences in lift for each side of the wing.

An aileron equipped airplane doesn't need to turn on the dihedral effect. It can induce the roll by directly effecting the lift differential between the right and left sides of the wing. Unfortunately the changes in lift on the planes wings usually causes differences in drag too. It's the yaw effect from this differential drag that this project is all about.

We have used assorted mixing methods to control this 'adverse yaw' effect by applying a mixed amount rudder input in the direction of the turn (I say in the direction of the turn, because typically it's a slip, not a skid that's induced, though it's possible to setup the aileron differential to cause a skid in the turn). But when we do this 'automatic' mixing (via computer radios) we are only getting things close. Kind of putting a Band-Aid on the problem. I want to completely heal the wound, not just put a Band-Aid on it.

Something else that I think gets misunderstood to often, is that this yaw that is induced in changing aileron input, only exists when the ailerons are deflected (like to initialize or to stop a banking turn)(edit: I'm going to rephrase this - so far as wing drag induced yaw, it's the differences in drag between the two sides which can be caused by a number of sources). Once the plane is established on a new bank angle and the lift distribution is now equal on the right and left halves, there is no induced yaw. Hence, we can continue the banked turn by keeping the lift equal on both sides of the wing and the application of elevator. What we do is kind of pull up into a climb to turn. Only we input enough elevator to maintain our altitude.


STOP! Now before you hit the reply button, read on. I know what some of you are thinking:

"Ah Ha! He has to hold more up elevator in the turn, and that's going to increase the amount of perceived gravity. It has to screw with the sensor's output. As soon as he turns the plane, the sensor's feedback will be wrong. He'll need to correct for this"

Sound about right?

What so many people are missing here is that I am ONLY sensing the horizontal axis of gravity, relative parallel to the wings. The sensor goes along in the plane for the ride. When the wings bank, the sensor banks, but the perceived vertical axis of gravity still remains pointed strait down the to floor of the plane, in a coordinated turn. Now if there is a slip or skid, yes, the vertical component of gravity (Y axis) will skew forward, back, left, right or any two combinations of the X and Z axis. I don't sense forward/back axis (Z axis) or the vertical Y axis. I'm only sensing the X axis. It's the slip/skid error I am to correct for.

I know that a coordinated flight condition does not guarantee that the relative wind is exactly off the nose, but it's going to be very close, if not right on 99% of the time. If I wanted to do so, I'd put a 'weather vane' out in the air stream, lined up as a rudder would be, right over the wing to have the most accurate sensing of yaw, or more accurately stated, most accurate indication of the horizontal component of the relative wind). But why? This slip/skid sensing thing achieves the same results without all the mechanics involved with a vane sensor.

My fingers are tired.

Flame-On my friends :p ...

Gary
--

Gary Warner
Apr 04, 2005, 01:34 PM
This is so exciting!

Gary, how are you dealing with the fact that your sensor detects yaw with respect to the ground and not the river of air?

If you need tilt compensation consider thermopile horizon-sensing.


Ram.

Ground, no. Resultant component of perceived gravity, yes. It's always pointing strait down to the floor of the plane in coordinated constant speed flight, be it banked at any angle. The "fact" you speak of is in static conditions, not the dynamics of flight.

Gary
--

YHSC_Chris
Apr 04, 2005, 01:37 PM
Gary,

No flame from me. I just re-read "Airplane Performance Stability and Control," by Perkins and Hage, and found that my definition of yaw is inconsistent with theirs. Thinking about it more, I think they are correct. The sideslip angle is what I had meant to reference, and that is the angle between the relative wind and the body axis. Yaw is related to heading.

I personally like the paragraph (page 316 of my copy) that reads:

"Considerable confusion has arisen because of the misunderstanding of the terms yaw and sideslip. In most cases the term yaw is used to define the angle of the relative wind to the plane of symmetry, which although incorrect in certain phases of the problem is perfectly permissable if straight flight conditions are maintained. Yaw, for instance, is almost always used in wind-tunnel work..."

Highly recommended book, even if old (1949) and expensive (Wiley textbook). Chapters 11-7 "Response to Aileron with Adverse Yaw", and 11-8 "Steady-State Turns" are worth a read.

In any event, I'm sure you will be close enough 99% of the time. But if you ever get into handlaunch with a DLG, you'll want to re-think things :)

-Chris

Gary Warner
Apr 04, 2005, 01:42 PM
Would it be possible to use the aileron position as an input to the micro as well? -Bill-

Yes and no. Coordinated flight is not assured just because the ailerons are centered. Mass inertia is for ever having it's effect, as well as the horizontal component of the relative head wind changes a lot, in disturbed air. Thermals, gusts, 'rolling waves' and the likes will always keep the airplane detecting some degree of error, all be it small in fairly 'smooth' air.

It could be done as a 'averaging' calibration though. You bring up a good point and I haven't thought about it long enough to see where it might fit into this project, but at least the seed has been planted.

Gary
--

Mr.RC-CAM
Apr 04, 2005, 01:45 PM
Good luck with the tests. Success would be sweet.

RC-CAM

Gary Warner
Apr 04, 2005, 02:04 PM
Gary,

In any event, I'm sure you will be close enough 99% of the time. But if you ever get into hand launch with a DLG, you'll want to re-think things :)

-Chris

Chris, I am into hand launch and DLG's in a BIG way. I currently don't use any active correction on them, but I did once have a piezo gyro on a DLG. It was kind of a mixed blessing. I like some parts of the launch and flight, while others just didn't 'feel' right. Go figure :rolleyes: .

I was thinking about the use of this in DLG's, but I haven't put enough time in it to even begin to sound like I know what I'm talking about.

Specifically (since you should have a better idea for what this project is all about) what concerns would you bring up?

Gary
--

Gary Warner
Apr 04, 2005, 02:05 PM
Good luck with the tests. Success would be sweet.

RC-CAM

Thanks. I'm sure things will be fine - I mean the plane 'should' come home in one piece ;) .

Gary
--

YHSC_Chris
Apr 04, 2005, 02:28 PM
Gary,

The DLG issues that I worry about (and I haven't analyzed them to anywhere near the extent that say, Mark Drela has) are related to the small thermals that you catch near the ground, where it is important to be coordinated. The problem areas I suspect are those arising from drag due to sideslip. Since the wingspan is on the order of the turning radius, all of those terms that we usually drop from the equations need to be considered.

The gyros run into these problems, because they are trying to give you a desired yaw rate (this time I mean yaw as in P&H). I assume that they get their input for your desired yaw rate from the rudder deflection commanded by the TX. As your turn varies, the required rudder input to remain coordinated varies (more early in the turn, less once you've established it). If the gain is fixed, then the problem arises because your constant turn will have a yaw rate that is higher than what the rudder alone would ask for. A turn is 360 degrees of yaw according to the P&H definition. So, I expect that the rudder would actually give counter-inputs in the steady turn, because it is yawing faster than your commanded rudder input would dictate. Then you're back to using your rudder stick aggressively, so that your gyro knows what yaw rate to shoot for.

Then there are other factors that confound things. For a DLG, I can see cases where you are being impusively lifted as you go through the core, and maybe turning the nose down into it, as a gyro (or your accelerometer, or even a true sideslip reducer) would do, might not be ideal. But maybe they help. I know that my DLG turns pretty well with just the rudder, and maybe it would make up for the rolling moment as the thermal core tries to push you out.

I think the answer in the end is to know why your extra sensors might be making your plane fly funny, and compensate your flying for those situations. I generally take the "Boeing" approach rather than the "Airbus" approach, and view the instruments as giving suggestions, that the pilot should be able to override.

I'll keep thinking about this. There should be a way to account for the varied flight conditions, and maybe even one that works autonomously in the controller.

-Chris

Warske
Apr 04, 2005, 02:39 PM
..."Airplane Performance Stability and Control," by Perkins and Hage,...Highly recommended book.
Chris,

Thanks for posting the update and the reference book info. I had spent some time looking for that information on the web and couldn't find it.

Warske

Gary Warner
Apr 04, 2005, 02:50 PM
Chris,

Can we take this through the individual logical steps, instead of trying to envision all flight aspects at once?

I'd like to start with the DLG launch.

The way I 'see' it, when the plane is swung around and just released, the effects of the gyro and the accelerometer would be the same. Counter applied rudder while in rotation and a neutralizing rudder output shortly there after in the launch climbing stage, with a resulting strait climb out.

You think?

Gary
--

YHSC_Chris
Apr 04, 2005, 02:57 PM
Gary,

I'm trying to envision it in my mind, but I think the accelerometer might give the wrong input while you're holding it, then the right input once you release. Something seems wrong about my logic. I think I need some diagrams... after lunch, since I'm making myself dizzy trying to imagine I'm the plane :)

-Chris

Gary Warner
Apr 04, 2005, 03:24 PM
Chris,

I'm sitting here driving myself nuts trying to think of why a small airplane in tight turns would be any different than other planes in turns. Then I remembered these two threads I started while back.

Formula for distance and time elapsed in a 360 degree turn (constant rate and holding altitude) (http://www.rcgroups.com/forums/showthread.php?t=234077)

Discussion about applying formula to see airspeed differences at opposite wing tips (http://www.rcgroups.com/forums/showthread.php?t=234427)

These concepts are the only things I can think of that makes DLG any more of a challenge for this accelerometer project.

One could make the assumption that since the wings are moving through the air at different speeds, and the angle of attack is the same for the two panels, that the two panels would produce different amounts of lift (read as different levels of drag) and the need to apply roll and/or yaw correcting input.

Think?

Gary
--

YHSC_Chris
Apr 04, 2005, 04:07 PM
I thought more about it, and the accelerometer will give the correct correction during DLG launch. Plus, I didn't have to lose my lunch to figure that out.

As for the wings at the same angle of attack, that is not the case. Think of this:
1) Air stationary, constant banked turn.
2) A wing with no washout
3) The airspeed is proportional to the distance from the center, as shown in your previous posts.
4) The plane is "falling through the air" at some sinkrate

Then, the AoA varies with distance from the center, since the sink rate is constant, but the forward velocity varies.

For a thermal, there is also the difference in vertical air velocity with distance from the center.

If you have some time, check out AVL. It's command-line and a chore to input stuff, but it gives reasonable results:

http://raphael.mit.edu/avl/index.html

The Trefftz-plane plot for a banked turn is interesting. I'll try to post the results sometime soon.

-Chris

YHSC_Chris
Apr 04, 2005, 04:18 PM
Oh yeah, one more thing...

So the wingspan is on the same order as the turn radius for a DLG, especially trying to save a flight with one of those small thermals near the ground, right? Well, add to the equation that the tail distance is nearly the same as the span for current DLGs. Either the tail or the wing will not be "coordinated", and this is usually a small effect, but not quit as small here. It's a tradeoff, are you afraid of cross-flow causing a premature stall on your wing, or is the body and tail drag a bigger issue? I guess keeping the wing more or less coordinated is the more over-riding goal.

Small planes have this issue, as do big planes with really light wing loadings.

-Chris

Gary Warner
Apr 04, 2005, 04:35 PM
OMG! Now THATS what I call a program. Downloaded it and can't wait to get some time to play with it. Thanks!

Gary
--

Fred Arsonneau
Apr 06, 2005, 07:49 AM
On my sailplanes I use a piezo rate gyro on the rudder to assist on bad launches, keep the nose pointed at the landing tape and to help coordinate my turns. It works quite well, but not perfect when it comes to coordinated turns.

--

Gary,

A little different topic, but related to what you said at the beginning of the thread : I own a DC3 (or I should say, I owned, as it crashed recently...), and in another thread I tried to find a device to synchronize the engines, to help the flight control, especially during take off. Someone advised me to find another idea, as it was unrealistic at this scale, for many reasons. At the opposit, he advised me to use one of these gyro, used in helicopters.
Do you have a good experience with them, and how do you adjust their gain ? Isn't there any control problem at high speed (overshoot, due to higher rudder effectiveness) ?

Fred

rdresch
Apr 06, 2005, 08:59 AM
The gyros are great. they will hold your tail where you set it. Gain can be set with transmitter channel remotely or on the gyro itself to save a channel.
Rudy

Fred Arsonneau
Apr 06, 2005, 10:32 AM
The gyros are great. they will hold your tail where you set it. Gain can be set with transmitter channel remotely or on the gyro itself to save a channel.
Rudy

Ok ; is there any clever way to preset the gain before the 1st flight ?

Fred

Gary Warner
Apr 06, 2005, 04:42 PM
I finished the code today with 3 hours work. Here's some data:

Draws 4.5ma from a 4 cell pack
Code in PBP is 31 lines
Code complied to asm in 231 instruction sets
Code adjustable sensitivity (external adjust next)
Code adjustable offset (centering) (external adjust next)
Universal for reversed servos - just invert sensor
No jitter and continues pulse train - no dropped frames
Have full control of rudder via transmitter - transparent input
No LUT for response curve until flight tests are back
One COOL project to show your friends - everyone loves it

I'm on weather/work hold for now. I'm going to be brave and put it in my Artimus for the first tests. There's nothing like risking a $1000 plane to raise your adrenalin levels.

Weather looks like it's going to suck this weekend, but we do have a contest set for Sunday. I'm taking the plane into the contest WITH this sensor. What a way to prove it can work :eek: .

I've let a few too many things fall behind here at work, so I'll most likely be quiet about this until after Sunday's flights.

Gary
--

Gary Warner
Apr 06, 2005, 04:45 PM
The gyros are great. they will hold your tail where you set it. Gain can be set with transmitter channel remotely or on the gyro itself to save a channel.
Rudy

I agree. I put a rate gyro on a Lancair that was having tracking problems. Now she track on the ground strait and true. This as also done to a Turbo Porter (tail dragger). It helped quite a bit.

Gary
--

Gary Warner
Apr 06, 2005, 05:32 PM
Accelerometer ICs will measure static (gravity) and dynamic (movement) acceleration with ease. They are clueless to which is which...

RC-CAM

I didn't fully understand this point you brought up at the beginning of the project. But since I've had a chance to play with it, I see what you mean.

As it turns out, it's sensing the side to side acceleration as you said. The beauty of it is that it acts just like my rate gyro in the correct directions. If the sensor was placed behind the CG (read: behind center of yaw axis) it would provide the wrong rudder input. As it is, if the plane yaws (not slip/skid) to the right, it applies left rudder, just as my rate gyro did. And of course, it outputs right rudder as right sided'ed gravity is felt. This is the "if the ball goes right, step on the right rudder" effect I originally wanted.

What was a surprise to me was that I get both rate and slip/skid compensation. Cool! I killed two birds with one stone, and I was only shooting at one of them :D .

Gary
--

Gary Warner
Apr 08, 2005, 02:38 PM
I addressed two concerns today.

First, I was having the cpu fail to startup correctly, intermittently. Once it was up, it's been 100%, but it was failing about 1 in 10 startups. I realized that I failed to reset (clear) variables on startup. Now it starts up and runs all the time.

Secondly, I have been having concerns about incorrect rudder output when launching. If you don't fly sailplanes on a winch, you might have a hard time understanding this one. I know I do.

An example would be while the plane is climbing nearly vertical, say it yaws over to the right. As acceleration in the yaw slows down, the accelerometer will sense gravity off to the right side of the sailplane. As it's been programmed to apply right rudder for right-side gravity, it would apply rudder output in the wrong direction, aggravating the situation and setting up an unstable condition.

I spoke with a friend that has more knowledge about the physics and aerodynamics than I do, and he felt the sailplane would be stable on the launch. But when it's all done and said, I can't put 100% faith in his logic. Better safe than sorry.

So, I opted to tie the gear channel to an unused port on the cpu and use it to decide if the accelerometer will be on or off. It works like a champ. With the wings level and still, there's not even a glitch to the rudder when changing from on to off or visa versa. You have to move the sailplane to see if the accelerometer is even working. And of course, I have rudder authority on the stick of the transmitter in either the on or off condition.

It's now mounted in the plane and secured, for the ‘last’ time (yhea, right).

BTW, I said before that if the accelerometer was mounted aft of the yaw axis the plane, the rate effect would be backwards. Not true. I would simply rotate the sensor about it's Y axis (face it backwards) and invert it 180 degrees. I've found that with the 4 possible mounting positions, it can be anywhere in the plane and drive any servo direction. Only the distance from the Y yaw axis matters. The farther away from the plane's Y axis, the greater the yaw rate detection.

Their calling for 20-30 MPH winds Sunday :mad: . Thunderstorms in the mix too. I can't wait to get this thing in the air. Hope I don't make a mistake and fly in horrible conditions. I feel like the lady on the Mervin's commercials, with her face pressed against the front door saying "Open, Open, Open".

Gary
--

Mr.RC-CAM
Apr 08, 2005, 04:15 PM
What was a surprise to me was that I get both rate and slip/skid compensation. Cool! I killed two birds with one stone, and I was only shooting at one of them I was worried that the static vs dynamic G-Force effects would work against you. It's great to hear there is a benefit. There are still some other situations that I am concerned about, but the proof is in the pudding. :)


So, I opted to tie the gear channel to an unused port on the cpu and use it to decide if the accelerometer will be on or off.That was a good thing to add. It will certainly help demo the device.

RC-CAM

Warske
Apr 08, 2005, 04:42 PM
...I have been having concerns about incorrect rudder output when launching... An example would be while the plane is climbing nearly vertical, say it yaws over to the right. As acceleration in the yaw slows down, the accelerometer will sense gravity off to the right side of the sailplane. As it's been programmed to apply right rudder for right-side gravity, it would apply rudder output in the wrong direction, aggravating the situation and setting up an unstable condition.
Your new ability to disable the device will get you through the weekend, I hope. If it were me, I would be afraid of forgetting to disable it on launch one of these days (I've done that sort of thing!).

It occurs to me that your accelerometer is 2 axis, so (I think) you also have a signal available in the pitch direction. I wonder if you could use that to disable the device until pitch is within a certain range and stable? Or maybe a pressure sensor (altimeter) to disable it below 200 feet? Just a couple random thoughts.

I hope it works well!

Warske

Gary Warner
Apr 08, 2005, 05:50 PM
Your new ability to disable the device will get you through the weekend, I hope. If it were me, I would be afraid of forgetting to disable it on launch one of these days (I've done that sort of thing!).

It occurs to me that your accelerometer is 2 axis, so (I think) you also have a signal available in the pitch direction. I wonder if you could use that to disable the device until pitch is within a certain range and stable? Or maybe a pressure sensor (altimeter) to disable it below 200 feet? Just a couple random thoughts.

I hope it works well!

Warske

When I started flying retract electric planes, I replaced the gear switch with one the locks into position. It takes two fingers to pull the top of the switch up, then it can be moved. It's impossible just 'hit' the switch and have it move. This will help. Plus, I *always* check that all surfaces are correct before I launch. The rudder servo noise (movement) will be very obvious with the smallest amount of aircraft movement. And, in competition, the timer is standing behind me when I launch. It's most always the same person. I'll ask him early on to note any rudder out of trim.

That being said, I *know* what you are saying. If I can screw it up, I'll do it.

I'd like to couple the function to the launch mode switch, since I always launch with some camber. But my Vision radio doesn’t offer such coupling. I could modify the radio switch wires to make this happen, but I don't want to do that at this point.

My biggest concern is that the rudder signal is always processed through the CPU, all be it transparent when the accelerometer is disabled or enabled. If I've screwed up the code I could get more than I bargained for. Then again, I have faith in my code (if I don't, who will? ;)).

All of your ideas are good. I might consider the one that would sense the Z axis and have it disable the accelerometer processing if it exceeds a forward / back limit (the forces of forward and back acceleration if you were sitting in the plane). This might be the simplest one to implement since the axis is already wired into a port on the CPU and it would just be a matter of code.

Thanks for the thoughtful response.

Gary
--

Gary Warner
Apr 08, 2005, 05:57 PM
There are still some other situations that I am concerned about...

RC-CAM

Oh, please do tell. Now is the time to consider all possible problems. You've been very helpful so far. You're a 'thinker' and I like that.

Gary
--

Mr.RC-CAM
Apr 08, 2005, 06:55 PM
Nothing really new to say. I keep imagining the problems relating to the effect of the static G-Force sensing as the array position moves off an ideal level path. That is, as the model tracts a straight path, and a wingtip is substantially raised or lowered (think about stunt sort of activities or severe turbulence) the sensor profile will be exposed to the static G-forces (e.g., gravity only, ignore the inertial element). It will then see what it thinks is slip. The PIC will react to it by commanding rudder. The amount of rudder movement will depend on your system's gain.

If the rudder and ailerons are interactive, and the error is in your favor, then it might try to correct the roll or bank. This might be good, or it might fight the pilot's intentions (the latter could be resolved in the firmware). If the error is not in your favor, the PIC could exaggerate things. On the other hand, in a model where the affects of ailerons and rudder are not very interactive (think pattern ship), the PIC will just add or subtract to the rudder position. It could create some interesting effects as the PIC moves the rudder. I suppose that a pilot that is prepared for this could correct this via the sticks and fly through it without much effort.

I tend to think of the extremes when I design control systems. In a big stable airframe, that is flown in a graceful fashion, perhaps this sort of issue is not much concern. But, with a squirrelly stunt ship, I'm not sure if it will behave as intended at all times. I guess I'm thinking that the proposed system will work nicely in some situations, but could be an annoyance in others. The on/off switch feature can help mitigate some of this.

I believe that you have covered all your bases. All that is left to do is give it a go and prepare to pop the champagne cork at the end of the test flights. :)

RC-CAM

Gary Warner
Apr 08, 2005, 08:40 PM
I hear you, loud and clear. I think it would be irresponsible of me to say there won't be some issues like you described. I plan (read: hope) on it being a 'level' of success that will warrant additional fine tuning. That's the hard part, I know. When the flight tests are in, I'll report back here with no bias towards my enthusiasm for having a successful flight. It would be cool to say it's perfect, but unless it's true, I won't say so.

If the flights show that I'm barking up the wrong tree, I'll abandon this project. But if it merits additional work, I'll have a project that should keep me (us?) quite busy for a while longer.

Thanks for your input. It's great to have this on-line group to discuss projects that are targeting R/C planes. Five years ago, this would have only been a dream. We've come a long way.

Gary
--

Mr.RC-CAM
Apr 08, 2005, 08:54 PM
If the flights show that I'm barking up the wrong tree, I'll abandon this project.Worse case is that the project might just need to be a bit more "environmentally aware." As mentioned, there are established ways to separate the static forces from dynamic ones, which will help manage the error sources. Doing so would make it a more complicated project, but in the end, to the PIC it's all one's and zero's. :)

I am not sure if I have been all that helpful. But, at least I may have emotionally prepared you to be ready for any odd flight behaviors that may arise, if at all.

RC-CAM

stumax
Apr 09, 2005, 05:16 AM
Interesting thread! Gary, have you considered using 2 accelerometers equispaced about the CG? Then measure differential between the two to cancel drift. You'll then have a yaw rate sensor which can also measure lateral G.

Stu.

Gary Warner
Apr 09, 2005, 10:14 AM
Interesting thread! Gary, have you considered using 2 accelerometers equispaced about the CG? Then measure differential between the two to cancel drift. You'll then have a yaw rate sensor which can also measure lateral G.

Stu.

No, I have not thought of this. I can’t quite picture it, but I think I can see the logic. Interesting. Only problem I see is the placement in the sailplane. Directly under the CG is a ballast tube and a 9 pin servo plug. I don't think I could shoehorn anything else in at that location.

Gary Warner
Apr 09, 2005, 11:48 AM
I would be afraid of forgetting to disable it on launch one of these days

One more thought on this subject.

The next time I pull the PIC out of the airplane (I'm assuming I'll need to change some code sooner or later) I'll program a new test condition before the PIC can start reading the accelerometer. When the PIC first boots up, it will be instructed to ignore the accelerometer no matter what state the gear switch position is in. The PIC will have to see a disabled switch position before it will recognize the enabled position. Kind of the same logic used on ESC's to prevent the motor from turning on at power up.

So, if I forget to turn the switch off, the next time power is turned on the accelerometer can't be in the loop, until I exercise the switch. Now, if I fly two consecutive flights without turning the power off... well I best be following a preflight check list.

Gary
--

Gary Warner
Apr 09, 2005, 12:25 PM
Interesting thread! Gary, have you considered using 2 accelerometers equispaced about the CG? Then measure differential between the two to cancel drift. You'll then have a yaw rate sensor which can also measure lateral G.

Stu.

Oh, I think I see. You would have one in front of the CG and another behind the CG at equal distances from the CG. That would allow for canceling out the yaw forces. I see. Interesting.

If the yaw coupling input turns out to be an issue, I'll consider this approach.

Thanks for the input.

Gary
--

Warske
Apr 09, 2005, 05:54 PM
I'll program a new test condition... The PIC will have to see a disabled switch position before it will recognize the enabled position. Kind of the same logic used on ESC's to prevent the motor from turning on at power up.
That's an even better idea! :)

---------

In post 36 (http://www.rcgroups.com/forums/showthread.php?p=3548332&postcount=36) I see the board you're using has pre-tinned copper.

That would probably work better than the Radio Shack boards I've tried. The RS 276-150 boards aren't too bad, and are inexpensive, but I'm always looking for ways to make the ckt building less painfull.

Are you up for sharing the source for your boards? If not, I understand. :)

Warske

Gary Warner
Apr 09, 2005, 09:53 PM
Are you up for sharing the source for your boards? If not, I understand. :)

Warske

Sure. I bought it from Tanner Electronics (Farmers Branch, TX). That means nothing to you, I know. They are an electronic surplus store within a mile of two from my home and shop. They order them from someone, but whom, I have no idea. Some of their proto boards actually have the name 'Tanner' in the board etches. Look at the lower right hand corner of the PCB in the picture.

I think the RS proto boards look well enough. I never considered these boards from Tanner any improvement from the RS boards. Though pre-tinned runs is a plus. They just happen to be at the same store I do allot of business with.

Check in you local yellow pages under electronics; surplus. Maybe you’ll find a new source for your hobby electronics.

Gary
--

Warske
Apr 09, 2005, 11:15 PM
Thanks Gary.

I couldn't make out the words on your picture before, but now I can see it is "Tanner" as you say.

I found their site http://www.tannerelectronics.com/ and may give them a call.

Thanks for your help. Hope the flight tests are working out.

Warske

Gary Warner
Apr 09, 2005, 11:34 PM
Thanks Gary.

I couldn't make out the words on your picture before, but now I can see it is "Tanner" as you say.

I found their site http://www.tannerelectronics.com/ and may give them a call.

Thanks for your help. Hope the flight tests are working out.

Warske

Cool. I didn't know that they were on the web. I also see that they are in Carrollton. They are right on the border and I thought it was Farmers branch.

When you call, ask for Jim. He's the owner and most knowledgeable about things like this. I'm not aware of their offering mail-order sales. Mention that you were sent his way via Gary Warner from York Tv and it might help. I've been going there for a long time and I'm well known there. Good luck.

Side note: If Jim doesn't want to do mail-orders, send me a note. I'll pickup what you want and send it your way.

BTW, what's that project on your board?

Gary
--

stumax
Apr 09, 2005, 11:58 PM
Gary, the idea of using 2 accelerometers is so that if they drift due to temp they both drift the same way, and if you measure the difference between the 2 your reading won't be affected by drift. You can take this to the next level and use the 2 signals as opposite legs on a wheatstone bridge, with 1% resistors forming the other legs. This will give you a very stable, temp compensated yaw sensor, and if you can read each one independently you can also measure lateral G. I used to use this arrangement in vehicle dynamics testing when I worked in the auto world. Keep up the interesting work, it's great to see someone having a go!

Stu.

Warske
Apr 10, 2005, 01:51 AM
BTW, what's that project on your board?
Just a little test circuit to play with the A/D on a PIC12F675. Nothing very interesting, I'm afraid.:)

Gary Warner
Apr 10, 2005, 02:09 PM
What can I say.... It works great. The Artimus is now the best flying sailplane I've ever flown.

I had two quick flights before the contest today. Immediately I knew it was working well. After I launched, I engaged the accelerometer. Nothing changed. Now for some steep turns. Lets just say I was jumping up and down and yelling expletives about how good it tracked. While in a steep left turn I apply full right ailerons. The plane carved the best looking transition turn I ever seen on this plane. I left it on for landings. The nose tracked strait and true.

The second flight I launched her up and handed the controls over to two other pilots. They both flew it with the accelerometer on and off. Both agreed that the plane flew much better with it on.

Now it was time for the contest. The winds are 20 -30 MPH today. About 15 on the first flight and 20+ with gusts to 30 MPH by the last flight. All flights were with the accelerometer 'off' on launch and zoom. Once stable it was turned 'on' and left 'on' through the landings.

Unfortunately, there's not much use in thermal turns on a day like today. But I did think that the plane had a better than usual sink rate. When it's flown in lift, usually I see the wings 'walk' a bit. Now, I get a more pronounced walk, which should be a good thing when it comes to reading lift.

As the task time was met and I had lots of altitude, it was time to check the high speed flight. I expected some oscillations due to an increased rudder effectiveness. I was wrong, the plane tracked strait and true (no tail wiggles). I performed a few 80 degree high speed turns, going from one direction strait into the other. It was sight to see.

Landings were amazing. I didn't expect any real improvement on landings. Again I was wrong. The nose of the plane tracked and corrected better than I ever thought possible. The high winds had most pilots all over the place trying to land. But not mine.

Ok, I 'have' to find something wrong with this project. When I performed a full right to full left bank, as the plane crossed over center (wings level) I applied a bit too much down elevator. Once the G forces inverted to negative, the incorrect rudder was applied. It was easy to fix. Just release the down elevator and it quickly corrected the situation. I don't normally 'ever' fly in negative G's on a contest day, but I was intentionally horsing it around to see the effects.

Over all, I can't think of a thing I'd change. It's done exactly what I wanted it to do and its 'odd' traits were predictable. Like the fact that the elevator has a bit heavier feel and needs to be inputted sooner than normal in a turn. I predicted this over the two previous days of armchair flying. But it's not a problem that needs to be fixed. Since, without the accelerometer the nose high yaw was misleading me into thinking that elevator input should be delayed in starting a turn. Now, when the wings bank, elevator is inputted as soon as the roll starts. I can tell there is a lot better sink rate in performing turns. It won't be a big change, just one that was noted.

All in all, I'm VERY happy with the accelerometer project. The fact that I won FIRST PLACE in today’s contest further reinforces the fact that the project is a success.

Thanks all for your input. We did take pictures and video today. I get them up when I get a chance.

Gary
--

Mr.RC-CAM
Apr 10, 2005, 02:52 PM
Congrats on the project and the first place win. Pop the champagne cork!

RC-CAM

Warske
Apr 10, 2005, 03:06 PM
Pretty impressive! No oscillations? Time to crank up the gain! Just kidding. :)

Congrats!

Warske

Gary Warner
Apr 10, 2005, 08:00 PM
Here's a short video clip (.wmv) of the function of this on the rudder.

Keep in mind that I'm rotating the plane in a roll axis, in my hand, to demonstrate what happen when 'perceived' gravity moves to the left or right.

Slip Demo Video (100K) (http://web2.airmail.net/warner1/slip.wmv)

I have flight videos, but you can't see anything meaningful. I'll try to get better flying shots next weekend.

Gary
--

mrbaseballny
Apr 10, 2005, 08:44 PM
Nice Work Gary:)

Are you planning on releasing any kits, etc??

Again, great job!!

DFW_HLG_TG
Apr 11, 2005, 08:45 AM
Gary and I time for each other and of course I had to yank the radio out of his hands and check it out. This was on a test launch. I was quite impressed with how it performed. The turns wer nice and coordinated. I did several 45 deg balnk turns and figure eights. The model stayed coordinated even under high input load and at high and low speed turns.

On with the contest. With the high winds it was most usefull on final. It was the kind of wind where your gimble becomes a joy stick. I was slamming the sticks just to keep the white side up and twice, while going for the spot, I drug a tip and ended up inverted. I just was not quick enough on the sticks. Gary came in and all 4 aproaches looked like he was on rails. I was quite impressed and can't wait to put one in my plane.

Gary Warner
Apr 11, 2005, 10:31 AM
Nice Work Gary:)

Are you planning on releasing any kits, etc??

Again, great job!!

I'm going to hold off on offering kits for a bit. I want my timer (DFW_HLG_TG) to get one in his plane and finish the R&D. One day's flight in windy conditions shows that it works, but I'd like to see it perform in other conditions before I call it finished. Stay tuned though, as I do intend to make them available eventually.

Gary
--

Gary Warner
Apr 11, 2005, 10:59 AM
Gary and I time for each other and of course I had to yank the radio out of his hands and check it out.

I'm glad you liked it. I'll put one together this week, if I can get another accelerometer in my hands. Think about where you want to mount it (look at the pictures I posted before) and keep in mind that the accelerometer can be separate from the main board, allowing for more flexibility in placement. Also, though I chose to place the PCB in the vertical position, it can be horizontal as well, though for now I'd need to know which you intended to use if you are going to keep the accelerometer on the main board. Also keep in mind that the flat side of the accelerometer faces either the front or back of the plane. It can't face sideways.

Speaking for compatibility in sharing this project, I thought of two things last night.

First, the numerical data I use to offset the centering of the rudder (when wings are level) were dependant on 'matching' that data to match my transmitter. Other transmitters may not agree. So I plan on using an onboard eeprom byte to store the centering data value. The user them plugs in a 3 wire plug (servo style pins) and it's connected to two switched on a small board. To change the centering data, you just press one or the other button to adjust the data up or down.

Secondly, I'm going to use a micro pin jumper (like the jumpers used on computer boards to select this or that function) to select the physical axis of detection, so that with just moving (or removing) the jumper, the accelerometer can be mounted vertically or horizontally.

Thirdly, I want to develop a system of using the transmitter sticks to perform the above steps and more options. I don't think you are familiar with "stick programming" that's common in motor speed controllers, since you don't fly electrics. But if you are, that's the line if thought I am going for.

For example, turning the system on with full left rudder, waiting for 1 second, then hold full right rudder, then move the gear switch from off to on would put you in the programming mode. Then as the rudder stick was moved to full right or left, it would change the centering data and show as slight rudder input, reflecting the new centering data. So, enter the setup mode as described, hold the rudder right or left to adjust the centering, then shut the system down, come back on and you are centered. No wires, buttons or what not.

What do you think?

Gary
--

Gary
--

sesat
Apr 11, 2005, 11:16 AM
Congratulations Gary. Could you draw us a schematic?


Ram.

Gary Warner
Apr 11, 2005, 11:48 AM
Congratulations Gary. Could you draw us a schematic?


Ram.

Refer to 16F84 data sheet.

RB4 = rudder input from receiver
RB5 = rudder output to servo
RB7 = gear input from receiver
RA1 = X input for accelerometer
RA2 = Y input for accelerometer
OSC1/2 = 4Mhz crystal w/20pf padding

Everything else is B+ and GND as the CPU and accelerometer require

Use LM293 low-dropout 5 volt regulator to protect for over voltage to cpu

If 5 cell receiver pack is used, 5.1 volt zener clamp (with dropping resistor) is needed for clamping receiver input pulses. (max input 5.85 VPP) - not needed for 4 cell operation.

Don't worry about B+ falling under 5 volts. CPU stable down to about 2.5 volts. Accelerometer will drift slightly, but not noticeable down to 4.5 volts (it's time to land anyway ;) )

Gary
--