Aircraft Stability

View previous topic View next topic Go down

Aircraft Stability

Post by fredsmith on Wed Jan 19, 2011 1:36 am

First, a disclaimer: This is Not my work. If I remember correctly, it was Chris220 who made this on the old-new forums. If it is someone else's, please claim your work and I will edit the above sentence Smile It was another topic that I copied from the forums for my own reference, and now I'm returning it to its home. I have several other topics which I will post later.

(By the way, DemoPlane1 requires Bwansy's library, bernard.lua)

CORRECTION: This was Bwansy's tutorial, I should have known by the use of his library. My bad!

Fred




Aircraft Stability Tutorial


PART 1
I've wanted to write this for quite some time. Every once in a while someone would ask for help with their planes acting strangely. Planes pitching up suddenly as soon as you press "down", planes losing control and spin around, etc. So, I'd like to share some of my knowledge I gained in my classes and my experience in RC here. Please note that this tutorial only deals with normal fixed-wing aircraft, ones that have jets or propellers for thrust, and moving surfaces (chips) for controls.

In short, there are two possible sources of these situations. One possibility is that your plane is unstable. If not, then it is probably over-sensitive to controls.

Stability

Basics:
Stability determines whether your plane wants to fly straight with with your nose pointing the same direction as your thrust. A stable aircraft would correct itself if the direction its nose is pointing is deviated from its flight direction. On the other hand, an unstable aircraft would pitch or yaw out of control if its nose is not perfectly aligned with the flight direction. The plane would flip over and lose control.
Stability can be further broken down into pitch-stability, roll-stability and yaw-stability, each being responsible for one movement only. Roll stability is not an issue in RC because of its simplified physics.


Determining stability:

To find out whether your plane is stable, there's an easy way: drop test. Download the map pack on this forum, in which there's a map called "skydiving". Simply load up that map, and let your plane fall. If it falls nose-down, then you're good. If it falls nose-up, then it is unstable in both pitch and yaw direction. If it keeps spinning around, then either it's pitch-stable and yaw-unstable, or the other way round.


How to achieve stability:

If your aircraft is found to be unstable from the drop test, then here's how you can fix it.
We all know that arrows, darts, and most modern aircraft have a small set of small wings at the tail to stablise their flight. In RC, the principles are the same: more "wings" at the tail, more weight at the nose, then your aircraft is stable.
Air flow exerts force on surfaces. Any type of chip that are affected by air resistance can act as "wings". These include chips (core, chip, trim, rudder), wheels, weights and arms.
Rudders (vertical stablisers) and tail-planes (horizontal stablisers) are more effective if they are from the "centre of mass". In short, the longer the tail you are, the smaller the rudders and tail planes you would need to make your aircraft stable.


Control Sensitivity

Control sensitivity, on the other hand, is a simpler issue. Your ailerons or elevators deflecting too much at high speed is often the problem.

If from the drop test, your aircraft is indeed stable, yet the pitching problem still exists, then it is because your pitch sensibility is too high. Try lowering the angle of deflection of the elevators or canards (any moving chips that control pitch) especially at high speed should solve the problem. Generally, elevators (moving chips at the back) is better than canards (one in front of the main wing) because canards are inherently more sensitive.
As for roll sensitivity, the principles are the same. If your aircraft tend to roll violently at high speed even if you pressed the controls, then you should lower their angle of deflection as well. This may cause the plane to turn slowly at low speed, so a better way is adjust the angle according to speed. Another simpler way is that, instead of turning the whole wing for roll control, move part of the wing only, so that if the plane is spinning too fast, the parts of the wings that are fixed would provide some resistance to rotation.

I hope this can help most of you who have aircraft stability problems.

PART 2
This part deals with something called "augmented stability", which is commonly used in modern fighters and airliners.

What is it?

Augmented Stability system is mainly for unstable aircraft. By using the computer to correct the aircraft's flight path in real-time, it makes possible to control unstable aircraft.

Why?

In real life, there are two major reasons. For fighters, while dogfighting, you definitely want to turn as quickly as possible. However this leads to a dilemma: either you have a stable aircraft that always wants to fly straight, or an unstable aircraft that is very agile, but is unable to control manually. With A.S., you can get the best of both: controllable and agile.
For airliners, the A.S. can extend its range. Stable aircraft is heavier in the front, which has a side effect of dipping the nose. To compensate this effect, an airliner needs a tail that raises the nose by pushing the tail down. This decreases the overall lift of the aircraft, therefore a larger pair of wings is required, increasing the weight and drag of the aircraft. An unstable or marginally airliner, on the other hand, doesn't suffer from this negative effect. In fact, some civil aircraft even have tailplane that provides lift as well.
In RC, there is one more benefit from making an unstable aircraft. Chips are commonly used as wings as well as fuselage. Therefore, unlike aircraft in real life, the weight of the wings of an RC aircraft is comparable or even larger than their fuselage. This makes it hard to make a stable aircraft without using weight chips (even with option2 or higher), which will drastically increase the weight of the aircraft. With the A.S. system you can get rid of the weights while still being able to make the aircraft anyway you like.

How?

This section deals with pitching movement only, but the same principles apply to yawing movement as well.
As discussed in part 1, for a stable aircraft, if it pitches up a little bit, it will want to restore to its original position, while an unstable aircraft will deviate from original position further. The A.S. system simply reverses this effect by controlling the elevators (or whatever the physical controls that pitches the aircraft), forcing the aircraft to its original position. In the demo model, the angle-of-attack (alpha) was measured, then combined with the manual input (mouse or keyboard, or both), achieving "artificially stable control".

Using the model:
The plane is designed so that it is naturally unstable while the wings are extended, but naturally stable while they are swept back. First, try flying the aircraft with autopilot off, you will find that it is impossible, unless you're a godly pilot. Then, turn on the autopilot to feel the difference. Alternatively, sweep back the wings to make it stable. The autopilot automatically disengages while the wings are swept back, therefore it won't decrease its agility in swept-back mode.
SEE DemoPlane1, below

Code:

// [RCD]
Val
{
   AILEL(default=0, min=-400, max=400, disp=0)
   AILER(default=0, min=-400, max=400, disp=0)
   ELEVL(default=0, min=-400, max=400, disp=0)
   ELEVR(default=0, min=-400, max=400, disp=0)
   GEARANG1(default=90, min=-400, max=400, disp=0)
   JETPWR(default=0, min=-999999999, max=999999999, disp=0)
   KEYPITCH(default=0, min=-10, max=10, step=2, disp=0)
   KEYROLL(default=0, min=-10, max=10, step=2, disp=0)
   KEYTHR(default=0, max=10, disp=0)
   KEYYAW(default=0, min=-10, max=10, step=2, disp=0)
   RUDDL(default=0, min=-400, max=400, disp=0)
   RUDDR(default=0, min=-400, max=400, disp=0)
   WINGSWEEP(default=10, min=-400, max=400, disp=0)
}
Key
{
   0:KEYPITCH(step=2)
   1:KEYPITCH(step=-2)
   2:KEYROLL(step=2)
   3:KEYROLL(step=-2)
   4:KEYYAW(step=2)
   5:KEYTHR(step=-0.2)
   6:KEYYAW(step=-2)
   8:KEYTHR(step=0.2)
}
Body
{
   Core(name=NOSE) {
      S:Trim(angle=90) { }
      S:Frame() {
         S:Frame() {
            S:Frame(name=TAIL) {
               W:TrimF(angle=ELEVL, option=1) {
                  E:Rudder(angle=140) {
                     E:Chip() { }
                     E:Rudder(angle=-135) { }
                  }
               }
               E:TrimF(angle=ELEVR, option=1) {
                  W:Rudder(angle=-140) {
                     W:Chip() { }
                     W:Rudder(angle=135) { }
                  }
               }
            }
            S:Trim(angle=90) {
               S:Chip(angle=RUDDL) { }
               S:Chip(angle=RUDDR) { }
            }
         }
         W:Rudder(angle=-WINGSWEEP) {
            S:Rudder(angle=100) {
               S:Trim(angle=AILEL) {
                  S:Chip() { }
               }
            }
            W:Chip() {
               W:Chip(name=WINGL) { }
            }
         }
         E:Rudder(angle=WINGSWEEP) {
            S:Rudder(angle=-100) {
               S:Trim(angle=AILER) {
                  S:Chip() { }
               }
            }
            E:Chip() {
               E:Chip(name=WINGR) { }
            }
         }
         S:Frame(angle=30) {
            S:Jet(angle=-120, power=JETPWR) { }
         }
      }
      S:Frame(angle=GEARANG1) { }
   }
}
Lua
{require("Bernard/Bernard.lua")


function init()
   autoflag = 0
   sweepflag = 0
   sweepfactor = 0
   sweep1= 10
   sweep2 = 45
   gearflag = 1
   flapflag = 0
   flap = 0
   spoiler = 0
   mouseflag = 1
   mouseroll,mousepitch = 0,0

   pitchstiff = 11
   pitchdamp = 1.2
   rollstiff = 1
   rolldamp = 1
   yawstiff = 10
   yawdamp = 3
end
function OnInit()
   init()
end
function OnReset()
   init()
end

function inputctrl()
   if mouseflag > 0 then mouseroll,mousepitch = inputmouse(0) end
   mouseroll = mouseroll*10
   mousepitch = mousepitch*10
   inppitch = KEYPITCH+mousepitch*mouseflag
   inproll = KEYROLL+mouseroll*mouseflag
   inpyaw = KEYYAW
end

function getstate()
   v = -_VZ(NOSE)
   alpha = (-(_VY(NOSE)+_VY(TAIL))/2)/v
   beta = ((_VX(NOSE)+_VX(TAIL))/2)/v
   pitchw = (-_VY(NOSE)+_VY(TAIL))/1.8
   rollw = (-_VY(WINGL)+_VY(WINGR))/3.6
   yaww = (_VX(NOSE)-_VX(TAIL))/1.8
end

function driveplane()
   if autoflag > 0 then
      ctrlcorr = limit(v/10,0,1)
      pitchcorr = 1/sqrt((v/100)^2+1)
      rollcorr = 1/sqrt((v/100)^2+1)
      yawcorr = 1/sqrt((v/100)^2+1)
      pitcht = (inppitch*0.4*pitchcorr+(alpha*pitchstiff-pitchw*pitchdamp)*(1-sweepfactor)*ctrlcorr*(1+(v/200)^2))
      rollt = (inproll*1.5-rollw*rolldamp*ctrlcorr)*rollcorr
      yawt = (inpyaw*2+(beta*yawstiff-yaww*yawdamp)*ctrlcorr)*yawcorr
   else
      pitchcorr = 0.05+1/sqrt((v/100)^2+1)
      rollcorr = 0.05+1/sqrt((v/100)^2+1)
      yawcorr = 0.05+1/sqrt((v/100)^2+1)
      pitcht = inppitch*0.4*pitchcorr
      rollt = inproll*1.5*rollcorr
      yawt = inpyaw*2
   end
end

function actuateplane()
   flap = animate(flap,flapflag*10,0.5)
   spoiler = animate(spoiler,30*_KEY(11),2)
   sweepfactor = animate(sweepfactor,sweepflag,0.05)
   WINGSWEEP = sweep1+(sweep2-sweep1)*sweepfactor
   AILEL = animate(AILEL,rollt-flap,5)
   AILER = animate(AILER,rollt+flap,5)
   ELEVL = animate(ELEVL,-pitcht,5)
   ELEVR = animate(ELEVR,pitcht,5)
   RUDDL = animate(RUDDL,-yawt-spoiler,5)
   RUDDR = animate(RUDDR,-yawt+spoiler,5)

   JETPWR = KEYTHR*7000
end

function OnFrame()
   autoflag = switch(autoflag,7)
   flapflag = switch(flapflag,12)
   sweepflag = switch(sweepflag,14)
   mouseflag = switch(mouseflag,15)

   getstate()
   inputctrl()
   driveplane()
   actuateplane()

   gearflag = switch(gearflag,13)
   GEARANG1 = animate(GEARANG1,90*gearflag,3)
   out(0,"Advanced Aircraft Stability Demo by Bernard (bwansy)")
   out(1,"[S/X] Throttle: ",KEYTHR*10," %")
   out(2,"[F]: Flaps [G]: Landing Gears")
   out(3,"[Q]: WIng Sweep [W] Toggle Mouse Control")
   if autoflag > 0 then out(4,"[A] Augmented Stability System: ACTIVE")
   else out(4,"[A] Augmented Stability System: INACTIVE") end
end}


Last edited by fredsmith on Sun Jan 23, 2011 10:45 pm; edited 1 time in total (Reason for editing : Corrected for the fact that this is Bwansy's tut)
avatar
fredsmith
Hover
Hover

Posts : 109
Join date : 2011-01-19
Location : Nowhere and everywhere.

View user profile http://lmgtfy.com/?q=rigidchips

Back to top Go down

Re: Aircraft Stability

Post by RA2lover on Wed Jan 19, 2011 8:35 am

i think it was bwansy.
avatar
RA2lover
Walker
Walker

Posts : 382
Join date : 2010-10-11
Age : 22
Location : Brazil

View user profile

Back to top Go down

Re: Aircraft Stability

Post by bwansy on Wed Jan 19, 2011 2:51 pm

Wow fred! It's good to see you back!

And thanks for saving my tutorial. Very Happy

_________________
A.K.A. Bernard

bwansy
Admin

Posts : 170
Join date : 2010-07-15

View user profile http://rigidchips.forum-motion.com

Back to top Go down

Re: Aircraft Stability

Post by fredsmith on Mon Jan 24, 2011 5:39 pm

Whoops, sort of late, but I edited it to credit you, Bwansy.
avatar
fredsmith
Hover
Hover

Posts : 109
Join date : 2011-01-19
Location : Nowhere and everywhere.

View user profile http://lmgtfy.com/?q=rigidchips

Back to top Go down

Re: Aircraft Stability

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum