Idea: Coordinated Turn Mode

Post Reply
User avatar
linuxslate
Posts: 91
Joined: Mon May 13, 2013 3:55 pm

Idea: Coordinated Turn Mode

Post by linuxslate »

Since we seem to be fairly liberal about adding flight modes to MultiWii, how about 1 more.

Coordinated turn mode.

Basically it's like acro, but the copter will bank in a turn, mimicking an airplane.

The accelerometers would be used to maintain little or no side slip (lateral g's).

It could be use with roll input (add in some yaw), or yaw input (add in some roll) or both. (I would prefer to leave yaw inputs unaffected, and just use roll to make coordinated turns.)

If there is little or no forward velocity, the copter would behave just as it does today, so copter could still pivot, translate laterally, etc.; maintaining all of the advantages a quad has over conventional aircraft.

A config.h setting would determine the speed at which the effect began to happen. (Although it would naturally be 0 when there is no forward velocity, as the lateral g's that we are trying to zero out would be zero already.)

It would be great for a more natural FPV flying experience.

Also great for Quadcopter pylon or pod racing.

ReadError
Posts: 70
Joined: Sun Sep 09, 2012 11:08 pm

Re: Idea: Coordinated Turn Mode

Post by ReadError »

Image

User avatar
clough42
Posts: 70
Joined: Sat Dec 08, 2012 6:10 pm
Location: Boise, Idaho

Re: Idea: Coordinated Turn Mode

Post by clough42 »

Interesting from a coding perspective. I think it would be easier to add roll to yaw because you wouldn't need to know forward speed. When applying rudder, you could just add roll to minimize the x-axis acc value. Is this just level mode in roll only?

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: Idea: Coordinated Turn Mode

Post by Hamburger »

from my little airplane flying I think you need to apply counter rudder to fight the sagging tail from the roll orientation?

If there's more aspects to it, we could have a dedicated FPV-mode?

User avatar
linuxslate
Posts: 91
Joined: Mon May 13, 2013 3:55 pm

Re: Idea: Coordinated Turn Mode

Post by linuxslate »

from my little airplane flying I think you need to apply counter rudder to fight the sagging tail from the roll orientation?


While I would not say it that way.... Yeah, sort of.

Suggested Reading:
http://en.wikipedia.org/wiki/Coordinated_flight

Particularly:
#Coordinating_the_turn

For us Quad fliers,
Too much yaw in a turn (or turning using only yaw while moving forward) makes the quad skid sideways, like a hovercraft or airboat, or an racecar skidding in a turn.

Applying only Roll for us quad fliers, results in lateral translation without a change in heading occurring.

A coordinated turn would have the quad executing a turn while moving forward, as a aircraft does, or a racecar on a track with banked turns, or a roller coaster.

If properly done in software, the Quad would turn "Like it's on rails".

It is the most effective way to change course (not just heading) while moving forward.

User avatar
linuxslate
Posts: 91
Joined: Mon May 13, 2013 3:55 pm

Re: Idea: Coordinated Turn Mode

Post by linuxslate »

A few more comments before somebody wrecks a quad trying this, or messing with code.

A Quad will (should) turn if you apply roll, and then some pitch up. This is more like the way a fighter plane, or other high performance aircraft turns. The dynamics are different since a quad has lift (and pitch control) from the 4 corners.

Be careful when trying fast, banked turns. A conventional aircraft will stall in a turn even when it is travelling well above it's stall speed. This has ended many a student pilot's training --- actually it tends to end more than just their flight training. :cry:

Translated into quadcopter aerodynamics, this means that a fast, banked curve will increase the stress on propellers, arms, etc. significantly. A quad that flies around normally perfectly well may tend to "shed parts" in such a turn.

I can say from experience that Quads do not fly well with 1-bladed props.

It's possible a rotor stall, or other effect could happen.

In a fast, sliding (slipping) turn, the wash from the props on one side can wash over the props on the other, causing unpredictable results.

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: Idea: Coordinated Turn Mode

Post by Hamburger »

sounds like your suggestion is limiting this to quad+fpv mode.
Not my beef, good luck.

felixrising
Posts: 244
Joined: Sat Mar 23, 2013 12:34 am
Location: Australia

Re: Idea: Coordinated Turn Mode

Post by felixrising »

It sounds like this is just ACC based "ANGLE_MODE" flight on Roll axis only. So something like this around line 1226 in MultiWii.cpp : "|| (f.COORDTURN && axis=1 )".

Code: Select all

if (f.ANGLE_MODE || f.HORIZON_MODE || (f.COORDTURN && axis=1 )) { // axis relying on ACC
      // 50 degrees max inclination
      errorAngle         = constrain(rc + GPS_angle[axis],-500,+500) - att.angle[axis] + conf.angleTrim[axis]; //16 bits is ok here
      errorAngleI[axis]  = constrain(errorAngleI[axis]+errorAngle,-10000,+10000);                                                // WindUp     //16 bits is ok here

      PTermACC           = ((int32_t)errorAngle*conf.pid[PIDLEVEL].P8)>>7; // 32 bits is needed for calculation: errorAngle*P8 could exceed 32768   16 bits is ok for result
     
      int16_t limit      = conf.pid[PIDLEVEL].D8*5;
      PTermACC           = constrain(PTermACC,-limit,+limit);

      ITermACC           = ((int32_t)errorAngleI[axis]*conf.pid[PIDLEVEL].I8)>>12;   // 32 bits is needed for calculation:10000*I8 could exceed 32768   16 bits is ok for result

      ITerm              = ITermACC + ((ITerm-ITermACC)*prop>>9);
      PTerm              = PTermACC + ((PTerm-PTermACC)*prop>>9);
    }


Probably worth putting in a test for YAW and PITCH RC input too.. like "(f.COORDTURN && axis=1 && abs(rcCommand[YAW]) > 70 && abs(rcCommand[PITCH]) > 70)"..
Somehow the roll would need to be initiated to introduce an off axis force for roll axis level (based on ACC) to correct (as there is no or little aero dynamic effect to introduce off axis force after doing some yaw, so some YAW RC feeds into Roll initially and roll axis level takes over or fades out ...???

Disclaimer: IANAD (I am not a dev)

User avatar
linuxslate
Posts: 91
Joined: Mon May 13, 2013 3:55 pm

Re: Idea: Coordinated Turn Mode

Post by linuxslate »

Cool.

Thank you felixrising .

I am no where near enought of a dev (or flight dynamisist -- I can't even spell it) to try to figure this myself, but with your start, I may just look into it.

I'm working on FPV / OSD stuff right now (and possibly planning my first Tri), but I will definately look at what you suggest and the example code.

Thanks !

felixrising
Posts: 244
Joined: Sat Mar 23, 2013 12:34 am
Location: Australia

Re: Idea: Coordinated Turn Mode

Post by felixrising »

I've been thinking about the flight dynamics during a yaw (in level mode). It appears that there is no roll/pitch compensation going on when the craft is pitched/rolled during a yaw: take for example FFF, assume 45 degree forward pitch, yaw is currently assumed to be in relation to the FC, so is a rotation about the z axis of the FC (body frame) which is 45 degrees forward of level, now if you yaw 90 degrees to the right, new situation: your craft has a left roll of 45 degrees and is falling down to the left (with associated shift in acc readings as force vector has changed due to falling to the left).. of course your RC input is still 45 degrees pitch forward, so the FC has to remove the 45 degree left roll (formerly forwards pitch) and add a 45 degree forward pitch. Ideally, the yaw should be around the z axis of the world frame (whichever way gravity is pointing, ie the earth) and hence a 90 degree right yaw should rotate the craft in relation to the world frame (ie craft yaw AND roll), not just the body frame (craft yaw). Of course, you need to take into account all of roll, pitch and yaw of the body frame as a vector of the world frame to cover all cases. This article seems to cover it off well, and should be fairly easy to implement when level (acc) mode is engaged. http://planning.cs.uiuc.edu/node102.html

User avatar
linuxslate
Posts: 91
Joined: Mon May 13, 2013 3:55 pm

Re: Idea: Coordinated Turn Mode

Post by linuxslate »

felixrising ;

Yes.

But a coordinated turn is even more than that.

Let's say our flight software did that -- in level and forward flight, it responded to a yaw about an earth-relative z, instead of a frame (FC) relative z.

We would not drop, and we would remain in a far better orientation/flight throughout, but we would still momentarily slide sideways. The craft would follow a path outside of an ideal turn. Eventually the lateral slide would dissipate, and the craft would then (after the turn) follow a path that parallel, but to the right of (for a left turn) where the pilot intended it to be.

In a coordinated turn, we would overcompensate in roll, (and perhaps reduce the downward pitch) such that the y acceleration is maintained at exactly zero throughout the entire maneuver.

Ideally, In ACC mode, a glass of water that is sitting on top of the Quad should not spill when a turn is made (or, with in reason, no matter what the pilot does.)

felixrising
Posts: 244
Joined: Sat Mar 23, 2013 12:34 am
Location: Australia

Re: Idea: Coordinated Turn Mode

Post by felixrising »

Yes, absolutely. I was really just getting off topic, or at least diverging a bit whilst thinking about the coordinated turn... My thinking is that first fixing yaw during level flight so it's not translating the existing pitch to an unwanted roll, and then tune the acc component of roll during yaw to produce a coordinated turn. We could use similar logic that Throttle Angle Correction uses but instead of roll/pitch compensating with throttle, you'd use yaw to compensate with roll, tune-able in a similar manner, or perhaps we should be thinking in terms of yaw rate (radians/sec), calculating the vector of centrifugal force and gravity to work out the roll angle... I think we'd need to know velocity (angular velocity) to work out the centrifugal force.

EDIT: My physics is very rusty, so please forgive me if I get my terminology wrong...

User avatar
IceWind
Posts: 115
Joined: Fri Mar 25, 2011 2:11 am
Contact:

Re: Idea: Coordinated Turn Mode

Post by IceWind »

I was reading up this and I don't quite get the idea of adding this.

So you want the FC to mix for you Yaw, if you initiate a turn using the roll (determined by the current speed) or Roll in case you use Yaw instead.
But that is what you (the pilot) should normally do. For the ones flying planes, specially the ones that enjoy a more scale like flying, this is the basic way to turn a plane.

I can do banked turns easily with a quad. It's just a matter of training flying using both hands. :)

User avatar
linuxslate
Posts: 91
Joined: Mon May 13, 2013 3:55 pm

Re: Idea: Coordinated Turn Mode

Post by linuxslate »

IceWind;

You are correct.

I noticed that when I started flying FPV, I sort of naturally made coordinated turns without even consciously trying. (Not that I was not trying -- I was just trying to stay in the air and avoid trees, poles, etc. I mean I was not consciously trying to make great turns).

As my FPV flying has improved, my coordinated turns have improved.

Even though you can't really feel it, un coordinated (flat) turns just "feel" awkward when flying FPV. It's easier to perceive skidding when you see the ground going sideways underneath you.

Still; It was some interesting discussion, and may have helped other pilots learn even if they did not post.

felixrising
Posts: 244
Joined: Sat Mar 23, 2013 12:34 am
Location: Australia

Re: Idea: Coordinated Turn Mode

Post by felixrising »

Just throwing around ideas and waking up dead threads :P

I've been thinking about quick and dirty ways to achieve this when you don't have actual att.heading and velocity data.. I know there is a good point that it's up to the pilot to coordinate the turn manually, but you could apply the same thinking to level/angle mode and say every pilot should fly acro 100% of the time.. anyway, a simple idea occurred to me: how about applying Horizon Mode only on the Roll axis, call it FPV Hybrid mode.. so you can flip, you have full acro on pitch axis and some Horizon mode self leveling based on Acc data on the Roll axis..

Post Reply