Servers by jDrones

# New Loiter Mode - Alpha Testers Wanted

(Chris Olson) #103

Hi Leonard,
Ok, cool. I’ll pull that in, build it for heli and give it a try.

As @Rob_Lefebvre pointed out, frame lean angles do apply to heli too in acceleration. But the math is different than multirotors. The Loiter (and most other flight modes) will limit what a helicopter can do. But under normal conditions (rate mode) if you build speed with a heli, for instance, pull back gently on the elevator, it will do a nice big 100 foot diameter loop just like an airplane. It’s just simple collective management - do a dive to build speed, lead with a little collective pull back on the elevator and hold it. As the heli goes vertical ease off on the collective to zero pitch, as it goes thru the top of the loop ease into the negative pitch a bit (only takes about -3 degrees). Let it come around, ease off the collective back to zero. All the while holding the same amount of nose-up elevator. As it comes around the bottom go back into positive collective, let off the elevator and it comes out right where it went into the loop (if you did it right). And it doesn’t lose much speed in the loop. Even a heavily loaded UAV will do a pretty nice loop if you build enough speed in the dive.

Now, what makes it interesting with heli’s is that a flybar will corkscrew off the top of the loop so you have compensate with a little roll with a flybar to keep it wings level in the top of the loop. FBL doesn’t do that. A flybar reacts to torque and collective/cyclic pitch changes differently from a FBL head - especially when you invert the rotating plane of the flybar, which is what is steering the head. Or make a sudden pullup on the elevator with a flybar, will react differently from a FBL.

The point is, the flight dynamics of helicopters are more like airplanes, and then we have more than one type of helicopter. Changing the AoA of their wing has a different effect than it has on a multi in what it will make the aircraft do. That’s what will make translating lean angles to acceleration very difficult to apply to both multirotor and helicopters in the same package. If you carefully study a helicopter in 3D flight it becomes apparent how hard it is to apply lean angles into the calculations. Matt is easily pulling 9-10G’s with rapid changes in cyclic and collective here flying just an old flybar with only a tail lock gyro on it. Part of learning how to fly a helicopter is learning how to be really, really smooth. Because if you’re just a little bit aggressive with it, this is what they do. Like in your vid of of your multi - making rapid full stick input and then letting the stick self-center and bounce against the centering springs? You don’t do that with a heli because it will react instantly to every little bounce on the centering springs. The autopilot also has to learn how to be really, really smooth because any sort of aggressive change in attitude with a heli at high speed results in accelerations that are highly undesirable for UAV aircraft.

(Bill Geyer) #104

I want to add that unlike airplanes, helicopters are almost always unstable in AoA. For an airplane without stability augmentation, you would not even think of taking off with an AoA unstable aircraft. We do it all the time with helicopters. So I am fairly confident that it is this behavior that is causing issues with tuning the new loiter.

At least for the pitch and heave axes, I think the controller needs to account for the heavy coupling in forward flight to really make this work well.
Just my 2cents.

(Chris Olson) #105

This is very true. To echo the sentiments of a good friend of mine, a scale pilot at the RC club, after watching the 3D competitions - “I’ve spent 20 years trying to get my helicopters to NOT do that.” It is actually a much greater challenge to get the scale-quality flight we want from a UAV heli than it is aerobatic/3D handling qualities

When it comes to Loiter I use the flight mode for hovering work, and very slow speed precision manuevering where I want the autopilot to fly the heli. I have long used a maximum speed in Loiter of 300 cm/s because of what I use it for. I’m satisfied New Loiter can be tuned to provide the same functionality as Old Loiter for my purposes. I’m not convinced it’s at all a good flying mode for helicopters at anything more than about 5 m/s. I mean, after all, Loiter was named Loiter because of what the mode was designed for. And New Loiter still seems to do that fairly well, other than the slight position oscillation I’ve been getting, that I don’t get with Old Loiter. But I think that’s a problem in the Postion Controller and not necessarily the Loiter controller.

(Chris Olson) #106

@Leonardthall I didn’t get a chance to test this today. I pulled kind of a bummer. I was going to test it in my 626 and I had changed the radio configuration from PPM SUM to S.Bus so I can use all the channels in my radio. The PPM RC endpoints were 1000 and 2000. On S.Bus the endpoints are 1023 and 2000. I thought I could just calibrate the RC and everything be would be happy.

I took off with the heli in Acro and everything was great until I switched to Stabilize. Then I tried Pos Hold and manually flew it to a hover. Centered the cyclic and it lunged off for a different part of the country, then braked and stopped. But it wouldn’t stay were I put it because what the autopilot knew was level with the world, the heli’s trims were way off.

So I had to bring it in and do a complete re-setup of the head from scratch. Which took longer than I thought. And blew all my testing time for the change in New Loiter.

(Leonard Hall) #107

Thanks for your testing @ChrisOlson. Sometimes delays happen.

On the differences between heli, copter, and plane. I don’t think they are as significant as they may seem. I suspect that there may be some differences in the way things like Alt_Hold are set up for example. The issue with pulling back in Loiter causing the aircraft to climb can only happen if Alt_Hold is not given the authority to prevent the climb (that my be because of a very good reason).

But Loiter should be able to pull back as much as it likes and the heli should not climb or pull positive G. As Loiter pulls back the collective should go low or slightly negative to prevent the climb. This should mean that a 1 G vertical force is maintained and therefore the same equations that are good approximations for multirotors should hold pretty well for heli to.

On the forward flight issue. I wonder if at speed the retreating blade is at a higher angle of attack and therefore a higher coefficient of drag when compared to the forward going blade. That then produces a small amount of forward thrust that results in the aircraft being able to maintain forward speed with less angle of attack.

In any case Randy and I have been discussing the common problem of wanting to maintain good lateral acceleration requiring larger lean angles while limiting loiter to lower maximum speed requiring lower lean angles. The solution we discussed was to limit the maximum lean angle in the direction of travel based on speed. So we would have two angle specifications for Loiter, one for stationary and one for max speed. The resultant lean angle limit would be low in the direction of travel increase along an elliptical path to maximum perpendicular to the direction of travel and then form a constant radius circle in the opposite direction of travel.

This would then mimic what a pilot would do naturally. They would start with a large lean angle to accelerate the vehicle then level the vehicle out to ensure there is enough power to maintain height or limit the maximum speed.

From the perspective of the loiter controllers this will let us reliably set it up to ensure the velocity controllers is asking for a little more lean angle at maximum speed so when you let go of the sticks the aircraft does not go past level.

(Chris Olson) #108

No, they are significantly different because a multi-rotor does not fly. So when the multi wants to brake, it tips up. Which reduces the vertical thrust vector and it wants to fall out of the sky. So it surges its motors to provide the horizontal vector to brake, and the additional vertical vector to hold altitude.

The heli or plane is a true flying machine. Tip it up in flight and instead of wanting to fall out of the sky it wants to go up. Unlike a multi both can convert kinetic energy in speed into altitude. With a helicopter you don’t dump collective pitch to brake. Go to your local medical facility and watch a heli come in for a landing. It don’t come screaming in at 165 kts and suddenly go into a 30 degree nose up and dump collective. That will make it crash. When it leaves translational lift (like stalling the wing on an airplane), that, combined with dumping collective, will cause it to go into Vortex Ring State and settle with power. Instead, just like an airplane it does an approach where it bleeds off speed and gradually increases collective pitch as it leaves translational lift and goes into hover. If you do the dumping off collective thing with a lightly loaded heli, like most UAV’s are compared to full size because you flared it too much, it results in the “brick wall stop”. Which is highly undesirable for UAV operation. Caused by the sudden surge in collective pitch as it increases again after leaving translational lift. But the result is a lot more dramatic than a multi, as witnessed by the capabilities of helicopters in 3D flight.

It’s very hard to explain unless you have experience flying one. One of the things a new heli pilot learns is how to control speed. I think you termed it “slippery”, but a helicopter does not like to hover. They like to fly. They only have the capability to hover. But where they really shine is in flight in translational lift. The amount of braking we can use is all based on the speed so when it leaves translational lift the collective pitch is smoothly increased to hover configuration so the heli doesn’t “recoil” to recover from falling out of the sky because it suddenly lost two sources of lift.

I don’t know how to get this right for New Loiter.

Where it’s going to matter is in Auto flight. As it is right now, there is no way I can use the WPNAV_ACCEL values needed to hit waypoints to bring a helicopter to a stop in Auto from a 27 m/s flight speed. I have to use Channel 6 to set WPNAV_SPEED on-the-fly as it’s coming in on its approach to gradually bleed off speed so it can transition to hover. Or sometimes I “cheat” by setting two waypoints close together at different altitudes so it forces the heli to slow smoothly to make the altitude target at the next waypoint. And then I will “cheat” again and switch to Stabilize so I got control of it before it hits the final waypoint and attempts to do it’s autonomous braking thing, which is not very smooth.

I don’t know how much of the Loiter changes carry over to Auto flight, but that’s where it’s going to be critical to have it right. The current Auto flight controller is not ideal, but is functional once you learn how to work around its shortcomings. We have to be careful to not introduce more shortcomings into the Auto flight functionality because that is the primary use of the software for the great majority of our users.

(Chris Olson) #109

I forgot to comment on this. For a heli in 3D flight, the vertical lift component of the retreating blade, produced thru drag as you surmised, and combined with the pilot slamming the collective back and forth to slightly change the plane of the rotation of the disc, is what makes it possible for a helicopter to seemingly stand on it’s tail in one spot, or do “tic tocs”.

In horizontal flight the cyclic pitch works kind of like a swimmer with one arm. The collective pitch actually decreases in forward flight, reducing the drag on the main rotor. So the advancing blade becomes more efficient. The retreating blade operates at its maximum pitch in the cycle at approximately 90 degrees to the direction of the relative wind. So yes, it propels the helicopter forward.

They are really quite amazing machines. And a proven design over millions of flight hours doing jobs no other aircraft can do.

(Leonard Hall) #110

This is not true. If flying quickly a multi must reduce the throttle output to near minimum to prevent it from gaining altitude. This is especially true if the disk loading is light. It also tends to be a little rough because the aircraft is effectively descending through its own downwash in a way that may cause Vortex Ring State in a heli but probably with more disturbed air so not as apparent or dangerous. It may also be a factor that the quad’s generally have a boat load of power and therefore can punch out of vortex ring state like I imagine a acro RC heli can.

As I said, I suspect there are more similarities than you realise. Multies are draggier, dirtier and generally higher disk loading, but I see and have to deal with many of the issues you describe with heli’s. Multies are more efficient in forward flight than in hover. If you pull back a little you have to dump throttle to prevent a climb. If you pull back hard on a multi you also get a ridiculous “brick wall stop”. We get a reduction in lift if we descend through our own wake. None of these things are as severe as heli but they are all a significant factor for multis.

So I look at heli as a good worst case scenario for loiter and auto modes (the focus here being loiter). So far this has highlighted the lean angle requirements when stationary are different to those in forward flight. This is an issue with multis too. We also need to consider the case where loiter is only being used for slow flight (much more apparent in heli’s)

When it comes to Auto the only change is the velocity controller pid D term is now user settable and applies to the error not just the request. Other than that it should operate the same. There may be a need to separately define turning acceleration and starting and stopping acceleration when I get to Auto.

In any case let’s try to not turn this into a discussion about Heli’s, we can do that separately. Lets try to focus on Loiter specific conversation here.

(Chris Olson) #111

Right. I’ve been waiting to hear from some of the other multi testers as to whether or not they’re seeing the same oscillation in hover that I’ve been getting. And how smooth it is on the braking in high speed vs slow speed flight. I do have a 1 meter TriCopter I could dust off and test with too. But I don’t think it would be a good test example because it is a hybrid with a wing on it and it’s maximum speed is ~10 m/s. So currently, I am only able to provide any feedback from the traditional helicopter perspective.

I think we did learn that the heli’s, because they don’t use much lean angle to go someplace, are more a challenge with the new design. There is a relationship between the angle the user sets vs the speed, and that affects how the braking works for smoothness. So if I set the angle vs speed correctly, my max angle would be ~7 degrees and the speed would be 27 m/s. Only problem with that configuration is that the 7 degree angle doesn’t give me any significant acceleration. So I think the original design considered a linear relationship between the frame angle and speed, and applying that same relationship to the braking. Which is difficult for helicopters because a heli continues to accelerate at frame angles that a multi cruises at. That’s why my settings in my log look so weird. I was playing with them to find where this works for a heli to get the smoothness we want for a UAV.

(Chris Olson) #112

I think it would be good to get user feedback on what the different modes are used for. For multi’s I think Loiter has traditionally been the mode used for stationary camera work and precision shots. For heli’s it’s not commonly used for that because they’re not a very efficient or convenient platform for it. I use Loiter for hooking and lifting tethered or towed loads with a heli, and I think other users do as well. Once airborne with the load I typically switch to a true flying mode, usually Stabilize. That is a use case where multi’s probably don’t do that as they’re not very efficient for that application. But in neither case do we use high speeds, or can have any sort of aggressive braking.

I think multi’s use Loiter quite commonly as a flying mode. Based on many logs I see from heli, I think a lot of beginning helicopter pilots will use it as a limited flying mode until they get more experience. It’s a good mode for a beginner to learn all nose orientation maneuvering, etc…

Upon completion of an Auto flight Loiter is the mode that the system defaults to in the absence of a RTL or Land command. Using it for landing a helicopter is a hairy ordeal because neither the collective nor the cyclic response is crisp enough for precision in the wind. A GPS glitch can cause a serious accident, usually way too close to the pilot or other objects for comfort. I think multi’s commonly use it for BOTH takeoff and landing, but a tipover with a multi won’t result in a catastrophic explosion with flying shrapnel.

The new inverted flight function in 3.6 (heli’s only) introduces new anomalies for Loiter because pitch and yaw are reversed inverted (for stick inputs), but roll is not. The purpose of that has me totally baffled because I haven’t tested it enough to determine if the GPS even works properly in inverted flight. I’m sure it works in the sim, but in the real world it introduces possibility of multi-pathed or dropped signals which will cause an accident.

I can’t think of a logical use case where Loiter is commonly used in higher speed flight. That’s probably why the default maximum speed has always been set to 5 m/s in Copter.

(Holger Steinhaus) #113

I can support that theory. It goes as far as the current is becoming negative and in fact charging the batteries while pulling out from high forward airspeed (15…20 m/s) quickly without allowing the copter to climb by dropping the throttle. BTW, never try this in Stabilize (zero throttle -> zero stabilization -> auto disarm - one of the most dangerous behaviors of ArduCopter on multirotors).

My main use cases for loiter in a medium sized copter used for capturing orthophotos:

1. takeoff and landing (if I trust that particular copter and it’s compasses)
2. repositioning and getting clear off obstacles before/after AUTO missions
3. have a break if my attention is needed elsewhere
4. trial flights with people that have never ever had a R/C tx in their hands before (never had a crash while doing that - which is a huge achievement for the current Loiter, IMHO!)

I am looking forward to give the new Loiter a try, but we have completely stupid weather here for the next days.

PS: I have flown conventional R/C helicopters for years before starting with multirotors and I think they are not too different in dynamic behavior when comparing similiar disc loadings.

(Holger Steinhaus) #115

Just did a short test flight with new Loiter. I used an empty 800mm quadcopter with 17" props, about 2.5kg. Design TOW is 4kg - so this config is heavily overpowered and rather hard to control usually.

First impressions: no problems at all despite medium gusty wind (10kt, gusts 18kt). In contrast to PosHold, it is very easy to maneuver precisely both at speed and during stationary hover/landing. I especially like sharp turns at speed virtually without getting blown away (full pitch, full roll plus some coordinated yaw). For the flown setup, the acceleration and braking seems to be a bit too hard, but this might be influenced by the expectations resulting from old Loiter. One thing I have noted was some minor overshooting during stop - flying past desired stop point, than returning slowly and finally stopping. But remember, no attempts to tune anything so far.

I won’t miss the old Loiter when it gets replaced.

(Rob_Lefebvre) #116

I would be very interested to see some data logs and machine spec for this. I’ve never seen a multirotor reduce throttle/power in fast forward flight. Maybe I’ve been missing something.

(Leonard Hall) #117

The iris was a clasic case of it but I think most multi’s do it but I have not done a dedicated test on all my aircraft.

The iris would backflip in alt hold when gently breaking from full speed because as it leavaled out propeller flapping torque would kick in and take it back past level. The problem was that just as that happened the aircraft would climb, dropping the throttle down, reducing the motor range that pitch could use to fight the blade flapping torque. The result would be that the iris would flip on it’s back.

This is why we added the ATC_THR_MIX_MAX parameter. It is there specifically to handle this problem. It lets roll and pitch keep the average throttle higher than alt hold wants because this phenomenon was causing some aircraft to flip.

So we actually did a fair amount of work studying this problem a while back.

(Matt) #118

I’ve never seen that happen on any of mine, so I would imagine it depends greatly on the dynamics of the particular copter? My custom built quad and Y6 never did that. The transition from fast forward to level was always pretty smooth. The Solo also transitions smoothly.

(Chris Olson) #119

I have also never seen or heard of blowback on a fixed pitch system. Such a phenomenon would disagree with basic flight aerodynamics for rotary wing aircraft with fixed pitch rotors running in opposite directions. Since blowback is a function of the cyclic pitch and dissymmetry of lift, with the associated flapping up and down of the blades in the cyclic pitch cycle. Helicopters have head dampers or teetering/flapping hinges to make that possible. And multirotors do not have such a thing. It is what causes a helicopter to nose up as it enters translational lift and starts to fly instead of beating the air into submission. Multirotors live in an eternal state of beating the air into submission and they never do actually fly - as witnessed by the fact that if you cut the power to a multirotor in flight it will drop out of the sky like a rock. A helicopter continues flying with no power in autorotation with the collective feathered and rotor driven by cyclic pitch, as long as it has sufficient airspeed.

Lumping the two types of aircraft in one category is extremely difficult because they are so fundamentally different in aerodynamics. Multirotors are pretty much proof-of-concept that if you strap enough horsepower to a brick you can make it fly. From 120 meters altitude I can fly a 800-class helicopter across the 40 and back, make a nice approach and land it - all with no power. That’s because a helicopter is a true flying machine. Multirotors are not. And also why it is difficult to apply flight programs made for multirotors to helicopters.

Ultimately, IMO, it would be better to have helicopters separated from multirotors, with their own category, instead of lumping them together in Copter. Even the collective pitch handling for helicopters is pretty much a “hack” to get them to work with the multirotor code. And that “hack” is part of the problem when we start looking at functions like in-flight braking when we’re dealing with one machine that flies aerodynamically, and another that doesn’t. When we put compound helicopters into the mix, New Loiter will not work for those at ALL. So how do we “fix” that one?

(Leonard Hall) #120

Chris, multirotor propellers bend and yes this effect is worse on a more flexible prop.

Just a heads up for everybody. This thread has gotten way off topic. We will start a new thread for loiter when it comes out and I will be flagging off topic posts to keep it focused.

(Shawn) #121

I’ve got a question about new loiter.

What I notice in (old) Loiter: releasing sticks causes the multirotor (in my case) to start braking about as hard as allowed by parameters, then braking effect lessens, speed is reducing and the copter “drifts” a little before holding position.

With new loiter, upon releasing sticks, will it: gradually increasing braking, then maybe reduce braking as the craft reaches an acceptable position? Almost the opposite braking effect of old loiter which seems to “slam on the brakes” immediately.

I realise some of the old loiter behaviour can be modified with the relevant parameters, but changing them for gentler braking gives lots of drift before holding position. Or maybe I’m just not changing the correct params…

(Leonard Hall) #122

Hi Shawn,

Yes and no. If you use the same parameters in the initial release you will see the same issues. If you swap to the defaults then things will be much nicer.

As you say, the problem with the current loiter is it is difficult for people to stop the “over breaking” but still get assertive breaking. People say if they speed it up they don’t get the “over Breaking” affect but then it feels like a freight train and keeps going.

These changes will let you speed up Loiter to remove the “over Breaking” but then add in the additional breaking parameter to get the breaking you want. In addition, the new loiter is much more responsive.