L1 navigation for tradheli

This is a good point too. L1 will not work with WP radius set to 2 meters or 5 meters, or whatever people use for Copter. Depending on the speed, it may or may not use the full radius to make a smooth turn. I’ve been flying it with the WPNAV_RADIUS set to 2200 (22 meters), tuned for flying tight 180 deg turns on surveys at 20kts. At 10kts it will turn an almost square corner much closer to the waypoint with smaller radius. At 30kts it will fly a wider “teardrop” with more crosstrack error.

So this can be tuned for your normal cruise speed. But it will handle a wide range of speeds and still keep the bank angle in check with the turn rate (or turning period), and still maintain constant speed in the turn.

I found that the damping setting, lower values will cause more “teardrop” and crosstrack error on the next leg. Higher damping causes less “teardrop” and cross-track error. I had the damping at 1.3 at one point to get zero crosstrack error. But turned that down to 0.8 and found Stomp Factor and the associated pedal turn works actually better for 180 deg S&R turns.

Stomp Factor is one thing Plane L1 does not have. But pedal turning is a perfectly valid method of making tight turns with helicopters, within the airspeed limitations in the flight manual for pedal turns. And it works just as well in RC as it does in full-size manned.

This is a good video that depicts the dynamics of the S&R reversal using a pedal turn. A helicopter can literally turn on a dime using this method. ArduPilot is now capable of doing this with L1 on autopilot if you get it tuned right with Stomp Factor.

1 Like

@ChrisOlson. I can confirm that the behaviour is different between normal waypoints and spline. In my 1st test, I used spline and did not see a change. I first thought that I had not set it up correctly but as soon as I used normal waypoints the changes were dramatic and L1 was active. I still have to do a number of tests as my radius is much wider than anticipated. I originally soften the WP behaviour a lot to get smoother results but the pedal turn is a way smoother option and I would like to see if I can get the same results from your suggestions above.

If this may help some else, setting WPNAV_USE_L1_NAV = 1 activates the L1 controller.

That’s correct. It won’t work with spline. Even if L1 is enabled it still will revert to Copter Nav if it encounters spline. It will, however, switch smoothly back and forth in flight if you insert spline in middle of a regular waypoint flight flying L1.

The turning period, damping and Stomp Factor will affect this. What I would do is set the WP radius for the typical speed you fly. I don’t know if you’re flying gas or electric, I think you have gas. So set up a flight plan in the shape of a big figure 8 and put a DO_JUMP command in it continuously repeat. It might take an hour to get it tuned to perfection the way you like.

Set up your Channel 6 knob to adjust the WPNAV_SPEED and set the tune low and tune high to the minimum and maximum speeds you’d like to see. Take off and start flying the flight and turn your knob up until it is cruising at your desired cruise speed.

For now, leave the damping at 0.8 to 0.85. I don’t think you’ll find it necessary to adjust this.

Start with the period at 20. Reduce the period one at a time and you should start to see the helicopter turning BEFORE it gets to the waypoint initiating the turn, it should fly in a teardrop fashion with crosstrack error to the outside of the leg of the flight to the next waypoint. If the waypoints are sufficient distance the crosstrack error should reduce and the helicopter’s flight path will intercept the radial to the next waypoint.

If you get the period too low it will bank quickly - it banks more aggressive with lower period.

Now, when you get it banking the way you want try some manual pedal turn and see how much it takes to get zero crosstrack error as it makes the turn. Important to do this in both left and right turns because of torque based on your rotor turning direction makes bank angle steeper turning one way than the other.

Now, when you get the “touch” on the pedal turn and see it works good set the Stomp Factor to try to simulate it with the autopilot. Bill said to only adjust the Stomp Factor by .05 at a time. But I found here that adjusting it by 0.1 at a time provides a more reasonable adjustment.

Stomp Factor (pedal turning) is best used on 180 deg S&R reversals. That’s where it has the most desirable effect. It has a negative effect on a 90 deg turn at speed.

If you do not fly flights with 180 degree turns then adjust the damping instead to eliminate the crosstrack error and maybe put in a small amount of Stomp Factor like 1.1.

That’s basically how I tuned it here. The first versions of the code I tested did not have Stomp Factor. Bill put that in later so I could pedal turn it. But it is kind of a nice feature.

3 Likes

Just a note here that you can use do_change_speed commands in your mission plan to change speeds as well. The aircraft will smoothly accelerate/decelerate to the new speed based on your wpnav_accel param.

A little explanation on the directional control logic that is used with the L1 controller. Unlike Planes where more of the natural directional stability (tail follows the nose) is used to aid in coordinating the turn, copter always has control over the tail and unless some (pilot/autopilot) is telling it to yaw the aircraft, it always holds the heading. So with L1, I had to determine the yaw rate at which to swing the nose to provide a coordinated turn. The calculated yaw rate is just based on the bank angle and assumes a level turn. The turn scale factor, or Stomp Factor as Chris likes to call it, allows the user to put more or less pedal in turns in case the calculated value is not enough to keep the turn coordinated.

Hope that helps.

I have updated the L1Nav build to the latest Copter 3.6.9 and added NuttX builds for all the various Pixhawks and Pixracer

The firmware is here ->

2 Likes

Wohoo looks interesting. Can’t wait to test it.

Does it combine with the 4 servo swash plate firmware?

@Pakman as of this morning the L1 Navigation feature is available with four-servo swashplate support. Follow the link above.

This is built on Copter 3.6.9, so please pay attention to the “watchdog” stuff, the bad IMU support for Pixhawk Cubes, etc. that was dumped into what was supposed to be a stable release after Copter 3.6.7. Personal experience with this new in-flight rebooting of your controller with ChibiOS says it is not a real impressive “feature” in Copter 3.6.9.

There is both NuttX and ChibiOS builds available - NuttX does not have the “watchdog”.

The L1 Nav support will soon be in ArduHeli-stable, which is built on Copter 3.6.7, as soon as I get it merged.

1 Like

thanks for this quick support.
so should I better start testing with the Nuttx release? (I am still using profiCNC CubeBlack on my testbench)

btw: will the ArduHeli-stable release also support 4 servo swash plate?

It’s not planned at this time because there was a significant backport for 3.6 four-servo support, and the swash setup breaks the current Heli setup page in QGroundControl due to parameters that appear and disappear based on swash selection.

For stable release for commercial operators we need the heli setup page to work.

Chris,
Does this mean we will finally have ArduHeli as a standalone branch without all the copter nonsense?

I did some test flight with 3.6-L1 today in 550sport goblin.
The navL1 works awesome.
It flew 30m/s like a charm. See some overshoots but tuning is not finished.

I was confused: the tuning knob seems not to actualize when refreshing parameters. But it reacts accordingly (wp nav speed is tuned from 0 to 30m/s)

Patrick,
Glad to get some feedback on L1. I hadn’t done much tuning either and I have noticed an initial overshoot on speed. After it locks in, i didn’t see any big transients but I only tested it at 15 m/s.
Please post your settings once you get it tuned to your satisfaction. As for the update of the wpnav speed, I will have to look at that. I am guessing the parameters updated when you did this with copter nav. I’m not sure what would be different to keep it from updating the wpnav speed.

WPNAV_SPEED will not update on-the-fly in your GCS. The parameter list has to be refreshed every time it changes. MavLink does not do this on-the-fly.

The ArduHeli builds are already there so we can fly new features on the current stable code, while being independent of what Copter does. The ArduHeli concept was something I dreamed up a couple years ago, as we have complete control of what goes into it for new features we have developed and tested. It is what makes it possible to fly new things like the governor, L1 Nav or the Vbar acro on Copter 3.6 without having to worry about when the next major release is coming out that will have these features. And worrying about how many bugs is in the new Copter release, that are totally not related to heli, in order for users to fly these new features.

ArduHeli is called a “fork” of Copter that is specific to helicopters. All open source projects develop forks with time, such as Ubuntu linux being a fork of Debian.

Blockquote WPNAV_SPEED will not update on-the-fly in your GCS. The parameter list has to be refreshed every time it changes. MavLink does not do this on-the-fly.

well I did see the changes in the previous version (3.6.6 4-servo swash plate). I hit the button tools/refresh, took some time, but afterwards the changed wpnav speed was visible…

qgroundcontrol AND missionplanner…

for test results:
I did figure-8 runs. first accu with L1 deactivated for plausibility checks, and to reapply some parameter settings.
then L1 activated and I was completely excited.

unfortunately I had no internet access and no notes with me… so I was completely blind while “tuning” parameters… or lets say I was changing parameters and observing behavior…

EDIT: the firmware was “ArduHeli-3.6-L1Nav-CubeBlack”

Very good. We have rain here today so working on the next version of the heli setup in QGC. I need to fix some things we did in a couple commits that make the heli setup not work. But after I get that fixed I’m going to see if I can get the L1 tuning settings incorporated into the heli setup in QGC.

The reason I want to do this is because L1 is specific to helicopters - it is not implemented for multi’s. So one difference between Plane and Heli is that Heli has the capability to fly a wide variety of speeds on L1 Navigation. Planes are more limited because they eventually stall and fall out of the air if you slow them too much. So right now, I have my L1 tuned for flying 20kt survey flights. But I might want to load in a flight plan for a 50kt long-range flight and this takes different tuning for the turns. Having these settings handy in the heli setup will allow click, click change the settings where it’s handy, and bingo - she’s set up to fly my 50kt flight.

So I think we can get a L1 Navigation tuning category in the heli setup in QGC that will make this very simple to do (after I get the rest of things fixed up so it’s compatible with the heli setup). @DonLakeFlyer and @LuisVale were very helpful in getting us that first heli setup in QGC. Now we want to make it awesome so this can be done from your mobile phone or tablet on-the-fly in the field with no hassles.

If you put L1 in QGC, will that cause problems for the versions of copter that are built without L1. I’m really not sure that we will get L1 into master.

@ChrisOlson let me know when there is an updated qgroundcontrol station.

@bnsgeyer this L1 upgrade is really awesome.

do changes in ATC_ACCEL_Y_MAX affect the NAVL1_TURN_SF?

what parameter does affect the aggressivness in turns, lets say maximum bank angle? there were spikes with almost 60 degree. but no continous bank with >40degree

L1 will be in the ArduHeli builds regardless of what happens in master because it’s gonna be a VERY popular feature. So if it never makes it into master I’ll build a custom build of QGC for it.

This is all open-source software. We are not restricted to what somebody THINKS we should have. We can have what we WANT to have.

3 Likes

Anything that tunes the yaw axis for stabilize mode will affect the response of the yaw axis in L1. L1 just makes yaw rate requests to the attitude controller.

The L1 damping and L1 period affect the aggressiveness of the L1 controller which is accomplished thru the bank angle. The L1 computes the yaw rate request based on the bank angle. The yaw rate request is modified by the navL1_turn_sf parameter to give more or less input.

1 Like

You want to stay with 0.8 to 0.9 on the damping. The dictates the overshoots you will see on capturing a course. The period will dictate how tight the turn will be. However they do interplay some.