PDA

View Full Version : Tried to explain to 'traditional aero modellers' just what a quad is...



davef
03-05-2011, 06:59 PM
So I took the quad down to my model flying club today. While flying I was trying to explain to a group of ‘traditional aero modellers’ just what the hell it was:p

Flying with super stable mode enabled.
Enjoy the commentary:eek:


http://www.youtube.com/watch?v=4n74jxTa2Rg

aadamson
03-05-2011, 07:09 PM
So I took the quad down to my model flying club today. While flying I was trying to explain to a group of ‘traditional aero modellers’ just what the hell it was:p

Flying with super stable mode enabled.
Enjoy the commentary:eek:


http://www.youtube.com/watch?v=4n74jxTa2Rg

The commentary was priceless... I especially liked the comment about "It's got a barometer in it, and it should hold altitude in the next release"...

Altitude hold works right now actually, just try it... it will just go up and down by about 1-2mtrs from where you switch it on, but it will hold that quite nicely :).....

Give it a try, and no it's not perfect, nor is it meant to be yet.......

davef
03-05-2011, 07:20 PM
Wasnt there some issue with the quad motors going to zero when too much power is backed off?
Ill re-enable it now ...

aadamson
03-05-2011, 08:35 PM
Wasnt there some issue with the quad motors going to zero when too much power is backed off?
Ill re-enable it now ...

Yes, but unless you move the stick to Zero, you won't find that... one change I would make if you try it... take the 2.2. code and change that += .1 in the hold algo to += .01, but beyond that I've done lots of testing with the as is routine... I do have a better one (from an escape stand point)... if I get my head out of 2.3 and DCM there, I'll post it for ya, it will build in 2.2 just fine......

as a matter of fact, take this and merge it into the 2.2 sources, I'll try to get it pushed up to the 2.3 branch over the weekend, we are trying to get 2.3 flyable as well, but in the interim...

Add this to aeroquad.h



// Altitude Hold
#define ALTPANIC 2 // special state that allows immediate turn off of Altitude hold if large throttle changesa are made at the TX
#define ALTBUMP 90 // amount of stick movement to cause an altutude bump (up or down)
#define PANICSTICK_MOVEMENT 250 // 80 if althold on and throttle commanded to move by a gross amount, set PANIC
//#define MINSTICK_MOVEMENT 32 // any movement less than this doesn't not trigger a rest of the holdaltitude



Then replace this in flightcommand.pde



#ifdef AltitudeHold

if (receiver.getRaw(AUX) < 1750) {
if (altitudeHold != ALTPANIC ) { // check for special condition with manditory override of Altitude hold
if (storeAltitude == ON) {
holdAltitude = altitude.getData();
holdThrottle = receiver.getData(THROTTLE);
PID[ALTITUDE].integratedError = 0;
PID[ALTITUDE].lastPosition = holdAltitude; // add to initialize hold position on switch turn on.
accel.setOneG(accel.getFlightData(ZAXIS));
storeAltitude = OFF;
}
altitudeHold = ON;

//stickMovement = abs(holdThrottle - receiver.getData(THROTTLE));

//if (stickMovement > PANICSTICK_MOVEMENT )
//altitudeHold = ALTPANIC;

//if (stickMovement > MIN_STICK_MOVEMENT && stickMovement < PANICSTICK_MOVEMENT)
//storeAltitude = ON;
}
// note, Panic will stay set until Althold is toggled off/on
}
else {
storeAltitude = ON;
altitudeHold = OFF;
}
#endif


lastly replace this section in flightcontrol.pde


#ifdef AltitudeHold
if (altitudeHold == ON) {
throttleAdjust = updatePID(holdAltitude, altitude.getData(), &PID[ALTITUDE]);
zDampening = updatePID(0, accel.getZaxis(), &PID[ZDAMPENING]); // This is stil under development - do not use (set PID=0)
if((abs(_flightAngle->getData(ROLL)) > 5) || (abs(_flightAngle->getData(PITCH)) > 5)) {
PID[ZDAMPENING].integratedError = 0;
}
//throttleAdjust = constrain((holdAltitude - altitude.getData()) * PID[ALTITUDE].P, minThrottleAdjust, maxThrottleAdjust);
throttleAdjust = constrain(throttleAdjust, minThrottleAdjust, maxThrottleAdjust);
if (abs(holdThrottle - receiver.getData(THROTTLE)) > PANICSTICK_MOVEMENT) {
altitudeHold = ALTPANIC; // too rapid of stick movement so PANIC out of ALTHOLD
} else {
if (receiver.getData(THROTTLE) > (holdThrottle + ALTBUMP)) { // AKA changed to use holdThrottle + ALTBUMP - (was MAXCHECK) above 1900
holdAltitude += 0.01;
}
if (receiver.getData(THROTTLE) < (holdThrottle - ALTBUMP)) { // AKA change to use holdThorrle - ALTBUMP - (was MINCHECK) below 1100
holdAltitude -= 0.01;
}
}
}
else {
// Altitude hold is off, get throttle from receiver
holdThrottle = receiver.getData(THROTTLE);
throttleAdjust = autoDescent; // autoDescent is lowered from BatteryMonitor.h during battery alarm
}
// holdThrottle set in FlightCommand.pde if altitude hold is on
throttle = holdThrottle + throttleAdjust; // holdThrottle is also adjust by BatteryMonitor.h during battery alarm
#else


That should do it...

You may need to play with that 250 value in aeroquad.h, it's guard band that allows the throttle to move that much before a PANIC takes you out of alt hold... once out, to get back in, you need to turn off alt hold and back on with the switch on your TX... if you PANIC out, you have full throttle control just like normal..

Also, for those purists - yes I know updatePID for the altitude is being called more frequently than the baro is updated... I just haven't taken the time to fix that... I've got my hands full with DCM at the moment and 2.3....but it's getting close...

Honk
03-06-2011, 12:24 AM
Really impressive that you can actually talk while flying! :) I've always found that hard and annoying to have to do...

About trying altitude hold: check the values before trying it, like simulating it using the Configurator and look at the motor output bars before hitting the field with it. That's all I'm gonna say.

davef
03-06-2011, 07:31 AM
Really impressive that you can actually talk while flying! :) I've always found that hard and annoying to have to do...

About trying altitude hold: check the values before trying it, like simulating it using the Configurator and look at the motor output bars before hitting the field with it. That's all I'm gonna say.

Been flying model helicopters for over 20 years. The quad in stable mode (super stable mode) is just a pleasure to fly. My next big issue is orientation as when it's far away there is no obvious outline to fly. I think flashing LEDs may help?

Do you think I managed to fake my expertise ok to the crowd? Ha ha ha!

rikshi
03-06-2011, 01:52 PM
Nooooooo, I really want altitude hold but bought an Arduino Uno with a BMP.

davef
03-06-2011, 02:56 PM
Tried altitude hold today for the 1st time. I’m using the default code in the 2.2 release, not the changes suggested by aadamson (ill try that later).
There was a 6 – 10 MPH wind blowing at the time.

The first time the quad just raised and lowered itself by 1-2 meters and seemed to sit there. Very predictable and definitely ok.

Second time I hit alt hold the quad sat there motionless for a while, then begun to oscillate nice and slowly at about 6 Hz (total guess). With each oscillation the amplitude grew. The quad started the alt hold experiment at about 5 meters altitude. After about 10 oscillations it managed to hit the ground – “let’s call that an automated landing” I said to the people around me as I cut the power to the motors. :eek:

I think they were impressed? Me? Learnt my lesson. So ill not use it for now, though I do appreciate it’s the first step we must solve if we ever want to add GPS.

Honk
03-07-2011, 05:43 AM
I think you meant 6 second period time, not 6Hz (6 ups and downs in a second). Thus ~0.17Hz.

Then you saw the effect of a inadequately tuned system. You'll always have to tune the P term to fit your quad weight. No-one will be able to make a 100% good algorithm with gains to fit every quad weight and characteristics, so don't hope too much.

First step is to bring back the original thinking I think: let throttle stick be linked to motor throttle in real-time even if inside altitude hold mode. That way you can adjust motor throttle and stop oscillations effectively when inside altitude hold mode until it has settled or if disturbed by wind or such.

davef
03-07-2011, 08:48 AM
I think you meant 6 second period time, not 6Hz (6 ups and downs in a second). Thus ~0.17Hz.

Quite correct Honk:p

Honk
03-07-2011, 09:49 AM
Hehe, sorry but I just had to pretend my nick was Ala42 for a moment... :)

But please do continue to experiment with the altitude hold, you can do quite a lot of changes to it without changing a single line of code.

davef
03-07-2011, 11:09 AM
From the other posts stating that my motors could all be shut off, i'd prefer to manage the altitude with my fingers when I have a camera onboard.
maybe ill give it another go when 2.3 comes around. I do recognise it's a required step on the way to the GPS functionality we all want so badly.

Honk
03-07-2011, 01:21 PM
Motor shut-off will only appear at *any state* if throttle stick is below a certain threshold, around 5-10% which you can easily see in Configurator. So there's nothing to be afraid of if you just check things like that in Configurator.

GPS/Altitude hold will take a lot of time before any of those are meeting the super high expectations people have on that. Now I might sound very dramatic and negative, no offense to anyone working hard on it, but it might take like a year of two. Implementations have been made for both GPS and Altitude hold, but none that got stuck in the official releases. I might also even go as far as saying the altitude hold part has seen so little official progress because of my initial coding of it which might be the totally wrong way to go, and it might be part of the problem with thinking outside the box with that specific feature. If we didn't have any code support for it at all someone might have come up with another method a lot quicker that worked. I don't know.

davef
03-07-2011, 06:36 PM
Its never really occured to me to actually tune the PID values for the altitude hold function. Im basically a zoom through the manual and get in the air type of guy.
Anyhow, I gave it a go and Honk, youre right. It is kinda neat.
I wacked up the P value to 30 and induced a nice oscillation in the alt hold. Then I increased negative D to tidy up. Now it sits within a couple of meters of where I left it.

Ok, ill admit, it is a flat calm night, so conditions couldnt be more perfect.

Ill see if it gets more of a challenge over the next weekend.

Honk
03-07-2011, 09:18 PM
Well, great you gave it a chance! Everyone have different points of view, mine is that even if your quad isn't all that you wished it to be (or you HAD it super well tuned, and now you can't just get that same performance anymore for no reason), you are learning such a great deal about it all if you just give it a little effort. That's the positive way to look at it. The "negative" would be that you have to learn to get better performance or suit your needs... Hehe.

What I've found most peculiar about throttle and altitude control is that once the quad gets below a certain distinctive point, it gets hugely sucked into the ground effect. It won't ever touch the ground, but it requires a lot more throttle to get out of it too. Is this the same with standard heli's?

aadamson
03-07-2011, 09:52 PM
Well, great you gave it a chance! Everyone have different points of view, mine is that even if your quad isn't all that you wished it to be (or you HAD it super well tuned, and now you can't just get that same performance anymore for no reason), you are learning such a great deal about it all if you just give it a little effort. That's the positive way to look at it. The "negative" would be that you have to learn to get better performance or suit your needs... Hehe.

What I've found most peculiar about throttle and altitude control is that once the quad gets below a certain distinctive point, it gets hugely sucked into the ground effect. It won't ever touch the ground, but it requires a lot more throttle to get out of it too. Is this the same with standard heli's?

yep, and it's called ground effect,the rotors create a huge downwash of air movement and if you are exactly in the middle of it, it take more and more power to counteract the downward movement of wind, Kinda like clawing up a steep gavel mound. Most real heli's won't hover without a slight amount of foward movement (or at an extremely high) altitude just so they don't get caught in that downdraft.

The sucking is due to the vortex that rotates from the tips of the props/rotors back up and then down the middle again, like a big toroid...

Alan

tane
03-29-2011, 07:42 AM
yep, and it's called ground effect,the rotors create a huge downwash of air movement and if you are exactly in the middle of it, it take more and more power to counteract the downward movement of wind, Kinda like clawing up a steep gavel mound. Most real heli's won't hover without a slight amount of foward movement (or at an extremely high) altitude just so they don't get caught in that downdraft.

The sucking is due to the vortex that rotates from the tips of the props/rotors back up and then down the middle again, like a big toroid...

AlanI think you're confusing ground effect with the vortex ring effect.

Ground effect is where the wash from the propeller or (or wings for a fixed wing craft) gets trapped between the ground and the craft, forming a 'cushion' of higher pressure air. Flight, and hovering, inside ground effect are more efficient. Look up the Ekranoplan for an example of a vehicle which takes advantage of ground effect. (Hovercraft do too, technically, but they use a skirt and so they're cheating. :P )

The vortex ring effect (wiki (http://en.wikipedia.org/wiki/Vortex_ring#Vortex_ring_effect_in_helicopters), Google books (http://books.google.com.au/books?id=Bk9fOM4zsKwC&lpg=SA11-PA6&ots=ITBZ6UGWta&dq=helicopter%20hover%20sinking%20effect&pg=SA11-PA5#v=onepage&q=helicopter%20hover%20sinking%20effect&f=false)) is where a helicopter is trying to hover above its operational ceiling and gets stuck in a vortex ring, which is the torus of rotating air that you described.