I'm trying to stabilize an airplane in pitch with CG deliberately placed well aft of the aircraft neutral point, but I want control over the angle of attack with the elevator control like a stable airplane. I don't want autopilot functions leveling the airplane, or controlling the airspeed.
I have been through the past discussions in the DIY forums, and on RCGroups, Charles River, and Steve Morris's electronically stabilized plank. The Steve Morris plank approach is basically what I would like to do, but using as much off the shelf hardware and code as I can:
I would like to use Mark Drela's suggested approach to measuring the angle of attack, rather than a vane system:
This will require two differential pressure sensors, the code to perform the math, and code to allow control over the AoA with the elevator stick. Perhaps the existing code that ArduPlane can use to maintain an airspeed can be modified to maintain an AoA? The selected AoA must respond to the elevator commands. I'm also not entirely clear what happens at stall...
I have flown an airplane with an unstable CG position with just a rate gyro on pitch to damp out the divergence. It is easily flyable as long as the speed is far above stall. At lower speeds, the pitch control deteriorates, and the stall gets aggravated as the gyro attempts to stop the nose from falling.
I haven't written any program code for 25 years (Fortran!), so this is going to take awhile to come up to speed on. I suppose what I would like is an indication from the ArduPilot experts on whether this is possible with the existing hardware, and how big of a challenge are the modifications needed?
I don't follow what you're saying.
If the actual CG is behind the design CG you have an unstable plane. This is exactly when you would want autopilot stabilization, otherwise you're not going to be able to fly it.
If you want to move the CG back then use a lifting tail. This makes it more unstable, but that's the reason to use an autopilot stabilization system.
I want to do this in a sailplane application, where it will spend a lot of time flying tight circles near stall, in rising and descending air, without a motor.
I want an autopilot to provide the missing pitch stability of an unstable airplane. But I want the autopilot to drive to the angle of attack, not in reference to the surface of the earth or an airspeed. To circle in thermals efficiently requires flying near stall AoA with G loads.
By the way, a lifting tail does not make an airplane unstable in any way. As long as the CG is ahead of the neutral point, it will be statically pitch stable. The aircraft neutral point doesn't move with wing or tail camber, ignoring some low Re effects. The camber of the tail can have some effect on trim and manoeuvring drag, but it doesn't effect stability.
A lifting tail can certainly make things unstable. Anytime your CG is not directly under your lift you are making things less stable. Putting your CG in the middle of the aircraft means it's not under any of the lift, but supported by two lifting surfaces which can never be made to perform identically. Hence it's inherently unstable.
You should be able to get the pitch stability you want with the autopilot. As you probably know though, the accels will be thrown off by any turn pulling Gs, so your roll stability will be difficult. I'm not really sure exactly how the centrifugal force is accounted for in the APM. Usually by GPS.
You might find that it's corrected well enough to not matter. Otherwise there's plenty of PIDs to tune that might help.
What you really need to do though is just fly level in a circle. Maybe I don't know enough about sailplanes, but maybe you're over-complicating it. If you fly level in a circle in a thermal you will rise up with the air. You still need to maintain your AoA in relation to the airspeed.
Every time you apply down elevator to a hinged stab, you create a cambered tail airfoil. It only changes the trim speed, not the stability. Tandem wing airplanes work quite well with the CG between the wings.
This is getting off topic, but there are some good references on basic aircraft stability:
I'm not interested in stabilizing the roll axis. Sufficient roll stability can be designed in without substantial performance penalty. I just want to electronically replace the aerodynamic static pitch stability I lose when I have the CG behind the aircraft neutral point on tail-less (or nearly so) gliders. Flying wings pay a big performance penalty for pitch stability, that I would like to recover by using unstable CG positions and electronic pitch stability. I still want to fly the airplane myself.
I don't think having an autopilot that references "level" is going to allow efficient thermalling. I think controlling the AoA is required, although I suppose you might be able to have a calculation or look-up table that changes the target circling airspeed with G-load. That seems more complicated and indirect than controlling divergences from the commanded AoA.
Autonomous soaring has been accomplished to some degree, and it doesn't seem easy:
That isn't my goal in any case.
We'll have to agree to disagree, but lifting tails are well known for being unstable. Anytime the CG is away from the lift vector(s) it makes the plane unstable.
I'm still not understanding your ideas here. Without a motor a positive AoA will cause you to loose speed. An AoA lower than your glide slope will cause you to gain speed.
All you're ever going to want to do is maintain your proper airspeed through a proper AoA, in relation to your speed, and stay in the thermal by circling.
The APM can already do this fine. Just tilt your plane to your glide slope angle and zero the AHRS. The autopilot will then fly along the glide slope angle and pitch down if needed to maintain the airspeed. If you're in a thermal you'll keep gaining altitude, if you lose the thermal the autopilot will glide down at your slope ratio. That's the most efficient thermaling you can get.
The APM stabilizes by moving the elevator to get to a certain target pitch. The target pitch is normally zero in the stabilize mode when you let go of the sticks. In FBW mode the target pitch will correspond to the elevator stick position. You could fly like that and it will hold the pitch in relation to the stick position. You could use the radio trim to trim the pitch. I think this is what you're trying to do?
I think you're thinking that the rising thermal current is going to change your effective AoA significantly in relation to the earth reference. I don't think this is going to be the case.
Maybe you best bet is to use the accel data like a vario and use that to change the target AoA.
Airspeed for best sink rate will depend on the bank angle, altitude (air density), and barometric pressure to a small degree. Airspeed at a given bank angle will be dependent on the airplane weight. I don't want to have to reprogram if I ballast the glider, the weather chnges, or I'm at a different altitude. Stall AoA, best L/D AoA, etc. are fixed numbers for a design, no matter the airplane weight or bank angle. It would be much better to control AoA than pitch angle relative to the ground.
Gliders have a positive AoA to generate lift. They are on an downwards glide slope, but the AoA is still positive for upwards fift.
A 400fpm thermal (which is not an unusual thermal) is about a 4.5mph vertical updraft. If the glider is flying at less than 20mph near minimum sink speed, the thermal vertical velocity makes over a 12 degree difference to the still air pitch angle (relative to the earth). 400 fpm sink is not unsual either, so that could be 10+ degrees the other way in the glide slope. Trying to reference off the surface of the earth for a glider that spends a lot of time near stall AoA would be difficult.
I'm afraid the level of understanding of aircraft pitch stability and trim in that thread you referenced is quite low. Maybe refer to the articles I referenced.
I really don't want to discuss aircraft stability here. I was hoping for some insight into how I could use the Ardupilot to duplicate what Steve Morris did with an ancient Apple motherboard: control pitch from the aircraft AoA and Tx inputs for an unstable airplane.
Sorry I couldn't be more help. The accelerometers could probably be used to sense the G-forces and calculate the rising or falling acceleration. So you might be able to figure out if you're in an up or down draft.
If you want to use some pressure sensors there's the differential pressure setup from the pitot tube setup. You could run the tubes to different areas of the wings and try different configurations. You could use the static tube as static reference or get an entirely differential reading from different areas on the wing.
I think the APM can do what you want. The FBW modes will allow you the control you're looking for while stabilizing the aircraft in relation to the ground with respect to your input. I think if you tried to use a vane type sensor you would end up losing too much control. To me it looks like Steve just used this setup because he didn't have, or choose not to use, accelerometers.
You could always try a vane setup if you wanted. You can get some pretty tiny IMUs and you could mount one inside a vane, which would give you the AoA and also an AoA rate.
I'd say, get an APM2 and fly it for awhile. Once you see how the stabilize and FBW (fly by wire) modes work you'll be in a better place to understand what changes, if any, need to be made for your application. The APM2 would be the best starting point for you as far as I know. There's quite a few sensors and addons available, and there are spare inputs for implementing a custom sensor if need be.
The airspeed sensor could be setup to get your pressures. You could try it in different configurations and use the telemetry or logfiles to study the data, then write some simple code to use the airspeed reading to correct the pitch.
I'm sure if you post a log file and describe how the sensor readings could be used in the control scheme to increase efficiency there will be people here willing to help.
Thanks Jack.I had seen the airspeed sensor, and was hoping to use it to measure the pressure differential between the top and bottom of the wing as well as airspeed. Getting some files of the outputs is a good idea.
I am working away on a plank -glider to try this stuff in. I can fly it with a stable CG position, and get some data. Telemetry is illegal for any soaring competition, and it takes some of the challenge out of even sport flying, so ultimately I need a method of stabilizing the glider that won't mask it's responses to entering lift or sink. I still think the only way of doing that is to have the electronics stabilize around an AoA, exactly like a stable glider with a tail does.
If you are interested, here is another good article on aircraft stability:
And some examples of successful tandem/canard wing designs where the CG falls between the wings:
Many of Burt Rutan's designs have the CG between the wings. Any time the tail volume is large enough, stable CG positions will move behind the front wing.
It is very easy to make a little balsa model to convince yourself that it is quite possible to have pitch stability with the CG between the wings. Stall is also usually benign if the CG ahead of the aircraft neutral point.
Some good texts on aircraft stability:
"Aircraft Stability and Control": Perkins and Hage
"Dynamics of Flight: Stability and Control": Etkin
And a good calculator for finding the aircraft neutral point and CG location for a required static margin for just about any aircraft configuration:
I have not read through all your posts, but in this case we need to use AoA directly, the IMU data won't be sufficient. We also need a high baud rate, at least 20 Hz. Your thought of putting the accelerometer inside a vane is a great idea, and one I may pursue.
You have my rcgroups handle and email through the nc soaring group. I am currently modifying a APM2.0 to do advanced sensor data logging. Part of this will be implementing an angle of attack gauge. I have evaluated Dr. Drela's method and I don't think it is sufficient for our application, as truely you need 5 pressure ports to be more accurate than a 50 Hz IMU. Reading and filtering this data isn't trivial and may be beyond the scope of the APM2.0's processing power-I have another autopilot that is more than capable (32 filtered A/D inputs) but it is far too large for a typical R/C sailplane (never mind DLG). In my case I already have an analog alpha and beta vane. For a sailplane however, I think building one yourself using a linear hall effect sensor and a magnet on the moving vane will be best. You could use a potentiometer but those have friction, possibly too much friction. Rotatory optical encoders also have too much friction.
For some reason there is no "Reply" button under your post, so I'll have to reply to myself. Maybe a bad sign...
I'm very interested in what you are saying about Dr. Drela's AoA measurement technique. I really don't have anywhere to mount a vane on a tail-less e-glider, so I was really hoping to use the wing port idea.
Why do you say 5 pressure ports? Redundancy/averaging? I was hoping a top and bottom surface port, and then a static and dynamic pressure perhaps from the airspeed probe available here mounted out on the wing LE. Perhaps it would be best to do the combining/ratio of those two differential signals with an analog circuit, with analog filtering, before the D/A conversion? A lot less processing, hopefully?
Why is there a need for external sensors? Won't the IMU be sufficient for stabilzation?
If it can stabilize a stable aircraft why shouldn't it be able to stabilize a (moderately) unstable aircraft.
I think you should try the stock APM first.