Welcome to Multi-Rotor UK. Please login or sign up.

Tuesday,April 16, 2024, 05:24:52

Login with username, password and session length

Shoutbox

Bad Raven:
26 Mar 2024 08:41:05
 :(
Andy7:
25 Mar 2024 14:49:21
An excess of work and rain.  :thumbdown:
Bad Raven:
23 Mar 2024 18:12:38
Almost a personal Blog, it would seem. LOTS of members, but NO posts.  :-/   :shrug:
Gaza07:
06 Mar 2024 16:59:49
Anyone still here  :shrug:
ched:
24 Dec 2023 11:48:48
Hope you all have a Great Christmas and a happy New Year.
Bad Raven:
20 Dec 2023 06:17:47
 ~~   :beer2: 
Gaza07:
19 Dec 2023 22:20:27
Merry Christmas All  :beer2:
Bad Raven:
01 Dec 2023 06:59:57
New Simulator Section started!   :beer2:
Bad Raven:
17 Jun 2023 06:52:23
Yes, smaller, same as lots of things as time passes.
Andy7:
08 Jun 2023 22:49:18
 ~~
Members
Stats
  • Total Posts: 201,425
  • Total Topics: 20,260
  • Online today: 31
  • Online ever: 530
  • (Tuesday,June 26, 2012, 08:34:46 )
Users Online
Users: 0
Guests: 24
Total: 24

Theme Changer





3d - Printworx

Arducopter 3.2 - great things coming

Started by Hands0n, Friday,May 09, 2014, 07:53:29

Previous topic - Next topic

Hands0n

If you are an APM or Pixhawk pilot flying Arducopter code (what else?) then the following should be of great interest.  Ditto if you are vaguely interested in Arducopter or are considering using it, or even simply wondering what all the fuss is about.   

This is one awesome flight controller that is simply getting better with each new release of code.

The Problem
Marco Robustini is a very active Arducopter tester, I';m guessing somewhere out in Italy. He posts regularly on YouTube to show his own experience of Alpha and Beta versions of the Arducopter code.  And so it was interesting to see him demonstrate [what was for him] a problem coming up in the next big release, version 3.2.

In this version he observed a significant lag that had been introduced into the control - something that is not all that easy to see from the video he posted (below) but no doubt moreso from the pilots physical use of the sticks.  And so he fed back to the developer';s group with amazing results (gotta love Open Source).

Damn: 3.2.0 code intruduce tangible lag in the copter responce with sticks input!


The Answers
After a lot of to';ing and fro';ing discussion on the group we have the true answer directly from the hands of the developer responsible for this new apparent behaviour in 3.2.0, Leonard Hall.  And what he tells us is rather exciting stuff.  Basically making Arducopter able to fulfil the flight responsiveness and control of everyone from the Acro pilot to the Camera Ship captain.  All the while, keeping it as simple as possible - and an indirect explanation of perhaps why Auto Tune in version 3.1.x can, but not always, leave you with a fairly highly strung aircraft.

Thank you for the excellent explanation and detail Leonard.  I include it in full, below.

The full discussion thread is on Google groups here: https://groups.google.com/forum/?hl=en#!topic/drones-discuss/JUeGZjVJ6GI

I simply cannot wait to get the production release of 3.2 when it becomes available. It is going to take APM/Pixhawk to a completely different level, once again setting the bar.

Quote
Holy crap batman the sky is falling!

This is pre beta people :)

First up I would like to say a couple of things:
- A big first up. Everybody please try to keep the feedback constructive until you understand what the new features are.
- Thanks Marco for your feedback! and... relax I am confident you will like these features once you understand them.
- As far as I can see this isn';t lag, it is doing exactly what it is supposed to do.
- These features are designed to improve the performance for the sharpest acro pilot, the gun fpv pilot, the instructor for a new beginner (on the gun acro quad), and the massive camera ship. If you don';t understand how this can be true then you have some learning to do. :)
- Finally my whole interest in the control code of Arducopter is to make it possible to squeeze every last bit of performance out of a frame. And I understand I need to do this in a way, that keeps tuning parameters to a minimum, and makes it easy for a beginner to start using arducopter.

First up you should be able to get back to the sharp feel you like by setting:
RC_FEEL_RP to 100
ATC_ACCEL_RP_MAX to 216000 but anything over 108000 shouldn';t be noticeable. I would suggest 94500.
ATC_RATE_RP_MAX to 54000 but don';t do this on your big copter! I also don';t think this parameter is your problem.

This should make things very similar to your original experience.

Ok so what are these parameters doing and how have I chosen the defaults. The defaults are chosen to make a sharp-as-hell copter feel like a stock 3dr quad on the old default setting before we discovered that autotune could turn it into a razor blade. So if you had a sharp-as-hell copter before, expect it to feel like a docile beginner quad.

So how have we done this? There are three layers.
1. RC_FEEL_RP
2. ATC_ACCEL_RP_MAX
3. ATC_RATE_RP_MAX

1. For the old hats, RC_FEEL_RP is basically an artificial Stab_P. It controls how aggressively the copter reacts to small changes in the stick inputs. A value of 25 will give you the equivalent of Stab_P of 4.5 and a value of 100 will give you an equivalent Stab_P of 12. "12!" I hear you say, "that will make it oscillate". Well, that is the point, it won';t. If your value is higher than the copter is capable of, all that will happen is your commanded position will leave your actual position behind and your copter will just do it';s best to keep up.

Why use 0 to 100? That was just to make it easy for people to adjust the way it feels.

Finally for those of you digging into the physics of motion that we design these control systems around. RC_Feel_RP basically defines the Jerk and therefore stops the hunting around zero.

2. Now the big one, ATC_ACCEL_RP_MAX. This is the maximum acceleration you can request of your frame. If you set this to 18000 it will feel like you are flying the avengers aircraft carrier. I would not recommend going below 36000 and 54000 is a nice number for everyday relaxed flying. Most agile frames, running 10" props, are capable of 100000 to 120000 (on high powered micro quads this could easily double again). How do I know this? Because I have been looking at this on everybodies autotune logs since it was released. This brings me to my next point. The next release of Autotune will set this parameter to something like 75% of the maximum your copter is capable of while staying in control.

Ok, so why did we want to include this. There are 3 basic reasons. Many people were detuning their Stab_P after autotune because they found it too aggressive and fast. Camera ships need smooth movements to get the best video. And finally my favorite, FPV and acro pilots get a slight bounce back or digital feel to acro.

For people that aren';t ready or don';t like the ultra sharp control afforded by autotune on many copters can make their copter feel like a larger, lower powered copter without sacrificing the stability of a small agile tune. This is where 54000 is a good number.

Camera ships are able to make much smoother movements without relying as heavily on the steady hands of a talented pilot. The camera ship operator is effectively able to control both the Jerk (change in acceleration per unit time) and the angular acceleration with the RC_FEEL_RP and ATC_ACCEL_RP_MAX parameters respectively. The aggressiveness of copter movement can then be controlled to ensure that camera gimbals can stay perfectly level or to remove that last little wobble on very large copters.

Finally Acro and especially FPV pilots, flying in ACRO, can choose ATC_ACCEL_RP_MAX just under what their frame is capable of. What this does is slow the desired point as it reaches the final target. Without this the pilot can request changes in rate the copter is capable of, the result of which is a small overshoot and bounce back. This means that a well setup copter (one that has done autotune) will stop reliably and repeatedly without bounce back or overshoot when performing aggressive maneuvers like rolls or loops. This is where the last little bit of precise control is squeezed out of the copter. This is the pointy end of the stick that all but the most talented pilots won';t even notice and even the pilots that do will only be able to describe the performance in terms of confidence or feel. Of course the FPV pilot will be able to pick this up much easier. The most obvious axis that this improves is Yaw.

3. Now ATC_RATE_RP_MAX is the safety net that sits below everything else to ensure the copter is always in control. The two parameters I just described bypass the stabilised controller and feed their commands directly into the rate controller. This provides a very fast response (faster than any other Arducopter release) because we don';t need to wait for the position error to build up before the copter reacts. The ATC_RATE_RP_MAX acts on the output of the Stability controller that is working to minimise the remaining error between where the pilot';s filtered input says it should be and where it is.

We choose ATC_RATE_RP_MAX to be a rate we know the copter can safely stop from and again I can calculate this from Autotune. Here I will probably go to something like 30 to 50% the maximum value calculated by Autotune.

This addresses the problem with large copters that fly fine until they are commanded to go from full right 45 degrees to full left. The copter then overshoots and flips. This is being caused by the Stab controller asking for a higher de-acceleration than the copter can achieve because of a large Stab_P value. When correcting small angle errors, say 45 degrees, the copter doesn';t build up too much speed. However, when the angle error becomes large the copter is able to get a real head of steam up and it is like comparing the stopping distance of a car from 60 km/h to doing 120 km/h (the stopping distance isn';t double, it is quadruple).

The beauty of this parameter in the new system is we are able to set this to very conservative values without compromising the performance of the copter. This value is really only used when the copter is forced away from it';s desired attitude by an outside force, impact, or mechanical failure.



Ok, it looks like I have finished my essay just in time for Marco to have worked out the settings without my help but I hope this has explained a couple of things here. Thanks again for everybodies feedback! And remember that the ATC_ACCEL_RP_MAX and ATC_RATE_RP_MAX parameters will be set by Autotune based on measurements of the system. It is only RC_FEEL_RP that is purely a user defined parameter. The defaults for the ATC_ACCEL_RP_MAX and ATC_RATE_RP_MAX parameters should be chosen as safe numbers for everybody to start with and leave autotune to update them or experienced users to tune them as they please.

Ok, this has taken me longer than I thought.

Good night everybody and sorry I didn';t discover this earlier!!!
--
Danny
"Its better than bad, its good"

Current FCs: Pixhawk, APM 2.6, Naza M V2, Naze32, Flip32+ CC3D, KK2.1.5
Aircraft: miniMax Hex, DJI 550 (clone) TBS Disco, 450 Firefly, 250 Pro, ZMR250, Hubsan X4, Bixler 2

guest2350

Very nice, I look forward to it!
Thanks for sharing Danny!

Rammylad

Great post Danny, thank you for sharing  :goodpost:

bravopapa

It it can satisfy the a OpenPilot acro brigade and give them real sat based failsafes it will sky rocket (and not in an out of control DJI way)