When is acro mode coming?

News, Setup, Compiling, Flashing, Development

Re: When is acro mode coming?

Postby Max » Sun Feb 28, 2016 6:43 am

Did anyone know that AQ actually has two ways to control attitude PIDs?

Code: Select all
DEFAULT_CTRL_PID_TYPE       0      // 0 == parallel TILT/RATE PIDs, 1 == cascading TILT/RATE PIDs


The default uses only the D term for Tilt Rate. The way D term is calculated in AQ, it ignores the desired position (setpoint) and only calculates based on current position (the error). This works for CTRL_PID_TYPE = 0 and our default "angle" flight mode because the desired final angle PID outputs are added to the current tilt PID rates (if any). This does not work for CTRL_PID_TYPE = 1 because the angle rate is calculated based on the tilt rate, which w/out a valid P term, and due to the way D term is calculated, is basically zero (except for noise).

Still with me? Then you can probably deduce that a rate-only (gyro) mode will not work with CTRL_PID_TYPE = 0 which needs no valid (> 0) P or I terms.

So, I think to use the PID controller with a rate/acro/gyro mode we'll need to switch to CTRL_PID_TYPE = 1 and re-tune the attitude PIDs. I'm still experimenting with this. I've never used it before nor have I ever heard anything mentioned about it.

Now to the main point of this story: Has anyone tried the alternate CTRL_PID_TYPE (1) with AQ, ever?

With Quatos rate/acro mode works superbly as-is, very smooth. At least in the sim... ;) Should be warm here tomorrow, perhaps I'll brave a real flight.

-Max
Max
 
Posts: 2814
Joined: Mon Aug 13, 2012 9:45 pm
Location: Near Ithaca, NY, USA

Re: When is acro mode coming?

Postby bn999 » Sun Feb 28, 2016 4:54 pm

That goes back many years to probably around AQ2. I've tuned and flown both ways, but I ended up liking type 0 better, so I never went back.

PIDs will almost certainly have problems around the poles due to the singularities. Quatos was made for this sort of thing and can perform properly at any angle.
bn999
 
Posts: 1559
Joined: Thu Jun 21, 2012 11:40 pm

Re: When is acro mode coming?

Postby brat002 » Sun Feb 28, 2016 4:59 pm

Quatos is good, but many controllers fly perfectly with PID controller. One additional point - quatos is not free and requires lot of work for properly setup.
brat002
 
Posts: 191
Joined: Tue Apr 21, 2015 10:35 pm

Re: When is acro mode coming?

Postby Max » Mon Feb 29, 2016 6:15 am

Thanks Bill, that's what I figured... an option from the old days. There are also a few commented-out PID calculation options/functions in the pid module which I assume met with the same fate.

bn999 wrote:PIDs will almost certainly have problems around the poles due to the singularities. Quatos was made for this sort of thing and can perform properly at any angle.

Do you mean in the current AQ angle control flight mode with extreme angles? Or you're saying this applies to rotation/angular rate mode somehow as well?

-Max
Max
 
Posts: 2814
Joined: Mon Aug 13, 2012 9:45 pm
Location: Near Ithaca, NY, USA

Re: When is acro mode coming?

Postby Max » Mon Feb 29, 2016 6:21 am

Acro/rate mode seems to work very well with PIDs, I'm happy to report, just not the same PIDs as our current angle mode works well with.

The simple answer might be to have separate D/F terms that are used only in angle mode (the current ones), and a separate set of tilt rate P/I/D/F(?) for rate mode. From what I see so far, rate-only mode likes a high P, low or zero I, and a much lower D than angle mode. In angle mode this translates to very sluggish/unusable controls (at least with CTRL_PID_TYPE = 0).

I'm not sure if the P/I/D/O Maximum values would need to change between modes, so far I'm not seeing a need for that.

The good news is that there are only half the PID settings to tune for rate-only mode vs. angle mode. :D

-Max
Max
 
Posts: 2814
Joined: Mon Aug 13, 2012 9:45 pm
Location: Near Ithaca, NY, USA

Re: When is acro mode coming?

Postby Patscherpofel » Mon Feb 29, 2016 12:08 pm

Max wrote:
Patscherpofel wrote:But a gps mode starts very fast to compensate for the error and the slows down once it reaches the speed
maybe there a workaround to solve this with the autoquad software, but I haven't found a way to do this

Yes, adjust the horizontal nav PIDs. Put them on Tx knobs with the new firmware options and you'll quickly be able to tell if you can get the desired effect. You should be able to adjust it for more "lazy" and smoother flight by reducing the Distance/Speed Rate P terms, or just limiting the Speed OM (which is the maximum allowed angle). The wiki page actually describes the Nav PIDs quite well.
[


yes, I tried to tune these values, but I though that tuning down P would also effect the prescion of position hold without my stick inputs...so the wind will push we around much more right?
in my dream scenario I have a very precise (aggressive) position hiold in gusty winds , but when I use my sticks it would react still very smooth (so the opposite of aggressive)...is this understandable?
is this possible right now you think?
Patscherpofel
 
Posts: 91
Joined: Fri Feb 12, 2016 10:03 pm

Re: When is acro mode coming?

Postby bn999 » Mon Feb 29, 2016 2:47 pm

Max wrote:
bn999 wrote:PIDs will almost certainly have problems around the poles due to the singularities. Quatos was made for this sort of thing and can perform properly at any angle.

Do you mean in the current AQ angle control flight mode with extreme angles? Or you're saying this applies to rotation/angular rate mode somehow as well?


Controlling rates will be fine, but angles approaching 90 deg will probably be a problem.
bn999
 
Posts: 1559
Joined: Thu Jun 21, 2012 11:40 pm

Re: When is acro mode coming?

Postby LPR » Mon Feb 29, 2016 3:24 pm

Patscherpofel wrote:
yes, I tried to tune these values, but I though that tuning down P would also effect the prescion of position hold without my stick inputs...so the wind will push we around much more right?
in my dream scenario I have a very precise (aggressive) position hiold in gusty winds , but when I use my sticks it would react still very smooth (so the opposite of aggressive)...is this understandable?
is this possible right now you think?



I have used expo on the pitch and roll joystick to get this slow movement effect you're looking for. Using the thumb and trigger finger to control the pitch and roll stick also helps me get smooth movements.

This is the only way I found to get smooth multicopter movements and still be able to handle wind well.
LPR
 
Posts: 1323
Joined: Tue Jun 26, 2012 1:29 pm
Location: MN, USA

Re: When is acro mode coming?

Postby Patscherpofel » Mon Feb 29, 2016 4:56 pm

hmm, I have been allways using lots of expo but this is not really my problem
I rather want a more linear control of the speed in gps mode, with no overshooting of attitude
...hard to discribe this...but ideal would be the exact same flight charachertiscs on each mode...only difference the one fights the wind with gps and the other doesnt
but I will try different expos for each flight mode , maybe it works better then I think
Patscherpofel
 
Posts: 91
Joined: Fri Feb 12, 2016 10:03 pm

Re: When is acro mode coming?

Postby Max » Mon Feb 29, 2016 10:40 pm

The problem with expo on the Tx can be the deadband setting (in AQ). AQ won't react to DVH request until you're past the deadband. By the time you have exceeded the AQ deadband, you're already part way into the expo curve. AQ then subtracts the deadband setting from the actual channel value and uses the result. With expo on the sticks, the result might not be what you expect (close to zero), so you may be getting a large jump in values right off the bat. And more importantly you're already into your expo curve so you potentially just lost the point of having expo to begin with (precise control around center stick).

If the expo setting is fairly extreme (very gentle curve), the response around deadband would be almost flat anyway so that should be OK (but flying manual like that might be annoying). Setting the AQ deadband to be very small might help. If your Tx allows it, you could also set up a custom curve for roll/pitch with a deadband area that matches the AQ setting. Then enable that curve in the Tx when you switch to PH mode.

Patscherpofel wrote:in my dream scenario I have a very precise (aggressive) position hiold in gusty winds , but when I use my sticks it would react still very smooth (so the opposite of aggressive)...is this understandable?

Understandable, yes... simple to achieve, maybe less so. :) You may need to give up some precision to achieve smoothness. Part of the problem is that GPS simply isn't that precise, even with a great lock the readings will drift "significantly" from moment to moment, so the flight controller needs to deal with that as well.

-Max
Max
 
Posts: 2814
Joined: Mon Aug 13, 2012 9:45 pm
Location: Near Ithaca, NY, USA

PreviousNext

Return to AQ Firmware

Who is online

Users browsing this forum: No registered users and 6 guests