errorAngleI

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

errorAngleI

Post by PatrikE »

After flying a while my quad looses it´s ability to level with the Acc.

The Gui shows it as well.
Acc values for roll & pitch is 0 but the motors start to compensates as if it´s tilted.

In flight.
When Stable is enabled it tilts like The Gui shows.

If i land and go to min tthrottle It will fly level again.
For a while... Then it starts to drift.
It repets for ever..

I think this can cause it.

Code: Select all

 errorAngleI[axis] +=  errorAngle;


I think that when the machine is level and no RC-input there is no reason to compensate..
Am i riht?
Or do i have bad luck when i´m thinking
And this is why it´s corrected after a touch and go.

Code: Select all

  if (rcData[THROTTLE] < MINCHECK) {
      errorGyroI[ROLL] = 0; errorGyroI[PITCH] = 0; errorGyroI[YAW] = 0;
      errorAngleI[ROLL] = 0; errorAngleI[PITCH] = 0;


Would it be safe to try it like this?

Code: Select all

[code] errorAngleI[axis] =  errorAngle;[/code]


I think no correction is needed if Acc say is's level.
Something is building up an errorAngleI in my system.
Untill it reaches the constrain for errorAngleI.

When i make the change the drift is gone in the gui.
It's no weather for testfliht to day but the gui looks god.


My spec:
Warthox V1.2
Ardu mini
WMP original
NB original
Pluch 25
dys A2822-17 / Kv:1100

/Patrik

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: errorAngleI

Post by PatrikE »

I think JussiH have same issue described in this thead.
http://wbb.multiwii.com/viewtopic.php?f=8&t=229&p=1316#p1316

/Patrik

ziss_dm
Posts: 529
Joined: Tue Mar 08, 2011 5:26 am

Re: errorAngleI

Post by ziss_dm »

Hi,
You probably can archive same results just by setting I term to zero... (be careful though, the stick feedback could be really bad). The more interesting question: Why the AngleError is not zero? Is it because IMU reporting wrong angles or due something else?

You also can check that your NK reporting correct values. Try to compare ACC Z values for perfectly level board normal and inverted. They should be pretty much the same(except sign). If not, you would need to adjust acc1g variable.

regards,
Ziss_dm

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: errorAngleI

Post by Alexinparis »

Hi,

I developed especially the ACC software trim to cancel the effect of a level drift.
once correctly tuned, results are good.

errorAngleI is needed for a good back leveling.
Without it, it works (you can just cancel it from the GUI), it's not as efficient.

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: errorAngleI

Post by PatrikE »

What if i add this?

Code: Select all

errorAngleI[axis] /=2;

It will give some smoothing but not with a 5 minutes history as it seems to be now?. :?:

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: errorAngleI

Post by Alexinparis »

PatrikE wrote:What if i add this?

Code: Select all

errorAngleI[axis] /=2;

It will give some smoothing but not with a 5 minutes history as it seems to be now?. :?:


it would be exactly the same as divide I term by 2

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: errorAngleI

Post by PatrikE »

Tested the advice from Ziss_dm.
The dif on Acc-Z is: 196 and -220

After adjusting of acc_1G to 212
The dif on Acc-Z is: 208 and -207

But The behavior is still there.
Only thing is now its exacly same as Jussi described.

Mine just drifted untill constrain stopt it before and stayed there no mather what i did.

Would it be asfe to Restet errorAngleI if there is no errorAngle?

Code: Select all

if (errorAngle !=0){ errorAngleI[axis] +=  errorAngle;}{errorAngleI[axis] =  errorAngle;} 


Looks god in Gui.
Stormwinds means no IRL testing... :cry:
/Patrik

Post Reply