auto-level problem

Post Reply
jy0933
Posts: 180
Joined: Wed Jun 27, 2012 4:24 pm

auto-level problem

Post by jy0933 »

i found the recovery speed from angle is slow...

say i pitch forward... after release stick... the quad does not return level immediately... but staying forward...


what PID should i look into for this case?



thx

chris ables
Posts: 317
Joined: Wed Feb 08, 2012 8:42 pm
Location: United states

Re: auto-level problem

Post by chris ables »

The level P value ! The higher the P the quicker it responds !

jy0933
Posts: 180
Joined: Wed Jun 27, 2012 4:24 pm

Re: auto-level problem

Post by jy0933 »

thx.. i'll give it a try when i got back

isnt according to mwc wiki.. we want to keep roll/pitch P + Level P is about the same value as default?

chris ables
Posts: 317
Joined: Wed Feb 08, 2012 8:42 pm
Location: United states

Re: auto-level problem

Post by chris ables »

It's according to aircraft and setup ! There's no fixed place to put them for every aircraft ! But the LEVEL is for the acc ! But as far as roll and pitch im running a 2.0 on the P value because default oscilated very bad and like i said it depends on setup and which sensors or board and several other factors such as how you wan't it to fly and feel ! Hope this helps you !

jy0933
Posts: 180
Joined: Wed Jun 27, 2012 4:24 pm

Re: auto-level problem

Post by jy0933 »

i have tried to move P up to 13 and I 0.5....

the return to center is still slow.....

here's the current setting

i'm totally lost what to do now

ds.PNG

chris ables
Posts: 317
Joined: Wed Feb 08, 2012 8:42 pm
Location: United states

Re: auto-level problem

Post by chris ables »

Have you checked one of the boxes in the gui to turn the acc sensor on ? I can't tell with that gui you are using ! Sounds like you dont have acc turned !

chris ables
Posts: 317
Joined: Wed Feb 08, 2012 8:42 pm
Location: United states

Re: auto-level problem

Post by chris ables »

How to activate options


Depending on your configuration, you can easily activate/deactivate options via 2 switches on your RC TX.
The 2 switches correspond to channel 5 (AUX1) and channel 6 (AUX2).

LEVEL is the autolevel feature (require an ACC)
BARO allows to keep a constant altitude once activated (require a barometer)
MAG allows to keep a perfect heading direction once activated (require a magnetometer)
CAMSTAB: if activated, the PITCH&ROLL servo output will follow the inclination of the multi (require an ACC + the code activation via #define statement)
CAMSTRIG: if activated, a servo output will trigger repetitively a sequence where we can define the duration on the HIGH/LOW position.

To activate a function, you must check the white box at the intersection of the required option (row) and at the switch state you want to enable (column).
It’s possible to make a complex mix.

If you want to force an option permanently, it’s possible to check all the white boxes, even without a RC channel connected.
(=> this way, you don’t need a 5 or 6 channels RC receiver)

jy0933
Posts: 180
Joined: Wed Jun 27, 2012 4:24 pm

Re: auto-level problem

Post by jy0933 »

what im saying is even with such level pid... in auto-level mode the return to level is slow and not significant

wktdesign
Posts: 5
Joined: Fri Oct 19, 2012 12:38 pm

Re: auto-level problem

Post by wktdesign »

I also have this problem and haven't found a solution, when the rc stick returns to center the quad remains at the same inclination angle, i have to move the stick in the other direction for the quad to reach level again.

What variable is responsible for that? I increased the Roll&Pitch Proportional but the behaviour didn't change.

jy0933
Posts: 180
Joined: Wed Jun 27, 2012 4:24 pm

Re: auto-level problem

Post by jy0933 »

i guess might has to do with D?..

i was using APM recently... apm suggested to let rate I=0 so it wont hold the angle and use auto level P to make it work...

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: auto-level problem

Post by scrat »

Try to decrease I term at Level settings.

vpb
Posts: 231
Joined: Mon Jul 23, 2012 4:09 pm

Re: auto-level problem

Post by vpb »

Did you turn on ACC (LEVEL/ANGLE) mode as Chris said before?

wktdesign
Posts: 5
Joined: Fri Oct 19, 2012 12:38 pm

Re: auto-level problem

Post by wktdesign »

I will try to adjust the level I value soon and let you know the result.
I mapped the Aux1 signal to the Acc by ticking the box in the gui, and i can switch between modes. I can tell for sure when the acc is active because only with the gyro i can't even take off. When i take off in level mode the quad ia very stable, it doesn't drift in any direction, the only problem is that it doesn't return from level.
Thank you for your responses

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: auto-level problem

Post by scrat »

wktdesign wrote:I also have this problem and haven't found a solution, when the rc stick returns to center the quad remains at the same inclination angle, i have to move the stick in the other direction for the quad to reach level again.

What variable is responsible for that? I increased the Roll&Pitch Proportional but the behaviour didn't change.


I have default settings for LEVEL and it's working very good. P 7.00 I 0.11 D 100

vpb
Posts: 231
Joined: Mon Jul 23, 2012 4:09 pm

Re: auto-level problem

Post by vpb »

Now I've found that it's easier to fly in Acro mode than level mode.

IMO, the Level mode should only be the fail-safe option when we lose orientation. I've just trimmed the acc, not Level PID tuned yet, my very old problem with Level is still there, from my previous tricopter to my current Y6, that is when I fly away with Level ON, my machine always tries to compensate the angle and it comes back to the last position, like GPS hold haha :D. I think it should be fixed with PID tuning. Anyone have the same problem with me?

wktdesign
Posts: 5
Joined: Fri Oct 19, 2012 12:38 pm

Re: auto-level problem

Post by wktdesign »

I think that you didn't do acc calibration, you have to position the sensor on a completly level surface, if you don't do that the software will compensate to the wrong angle and keep the platform at the angle that the calibration was done.
I can't do the calibration wih the quad sitting on the ground because the battery and foam that are fitted under the frame and are keeping the platform at a wrong angle, so what i do is place the quad under a table with the axes of the motors touching the underside of the table keeping the quad in my hand steady and then do acc calibration from the gui, so the calibration is done to the plane that contains the propellers.

I don't actually understand what acc trim does, i think that the same thing but tweaking the values of the x and y axes of the acc from the TX

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: auto-level problem

Post by scrat »

ACC trim is what you must use to get perfect hover in auto-level.

Check this video: http://www.youtube.com/watch?v=knagzCgXGEg

vpb
Posts: 231
Joined: Mon Jul 23, 2012 4:09 pm

Re: auto-level problem

Post by vpb »

OMG :D, my wrong post here.

doughboy
Posts: 252
Joined: Tue Sep 04, 2012 7:20 am

Re: auto-level problem

Post by doughboy »

wktdesign wrote:
I don't actually understand what acc trim does, i think that the same thing but tweaking the values of the x and y axes of the acc from the TX


acc trim does to acc what your TX trims does to RC signals.

first, run acc calibration on as level a surface as possible. use a bubble level if possible. if you did this right, then theoretically there should be no need to do acc trim.
how do you know if you need acc trim? fly the quad in angle mode, say hover to about 3-5ft. and let go of pitch/roll stick and observe which way the quad drifts. land the quad, then use the acc trims to compensate for the drift by trimming to the opposite direction of the drift. repeat until you can make the quad take off without drifting.

note that you MUST make sure your RC values are as close as possible to 1000-1500-2000 for min-mid and max. otherwise, there is no point calibrating/trimming acc.

from your statement above, it is incorrect to adjust for drift using the TX trims!!!! do not do that. the tx/rx values must only be trimmed so the RC values on the gui shows 1000-1500-2000. do not use it to trim quad drift!!

also, it is a good idea to calibrate gyro a few times before flying. as gyro readings are used for YAW compensation.

what I don't get with acc trim is why did they coded this to store the trim values separately. they could have just added/subtracted this to the acc calibration value and save variable space and extra addition operation.

-------------
Go Giants!

wktdesign
Posts: 5
Joined: Fri Oct 19, 2012 12:38 pm

Re: auto-level problem

Post by wktdesign »

Yes i know that you don't use the trims for ACC trim. I was a bit confused of the necessity of the acc trim since the acc calibration had to be enough to obtain level, but there are other things to get in consideration that unbalance the platform, like uneven weight distribution.

Before switching to multiwii i used the aeroquad flight software and using their default PID values the flight was decent, i was thinking to use the same values, the system is slightly different:
MULTIWII 2.1 DEFAULT:
Roll/Pitch: P:4.0 I:0.030 D:23
Level: P:7.0 I:0.010 D:100

AEROQUAD DEFAULT
GYRO Roll/Pitch: P:100 D:-300
ACC Roll/Pitch: P:4.0 I:0.60

I assume they use gyro I:0 and acc D:0 since they are missing from the configuration.

I want to try to decrease the level I as suggested but for the moment i don't have much spare time to make tests considering i have to walk some distance to the nearest field of grass, which is the reason i switched to multiwii so i can make configuration changes on the go with a display and my TX.

doughboy
Posts: 252
Joined: Tue Sep 04, 2012 7:20 am

Re: auto-level problem

Post by doughboy »

my experience with aeroquad is the opposite. I never got anywhere close to a stable flight, while multiwii I got stable flight right out of the box using all default.
I don't think you can use aeroquad pid values in multiwii, as the units they use are probably different. I think most multiwii users leave pid values to default.
you know you can do "inflight" acc calibration with multiwii if you cannot position your quad level due to your battery.

wktdesign
Posts: 5
Joined: Fri Oct 19, 2012 12:38 pm

Re: auto-level problem

Post by wktdesign »

Yes i read about that. But.. how would you calibrate the acc while flying, the stick combinations that generate acc calibration would not work, i assume that it's done with the AUX channels, but in the GUI i don't see the option.

jy0933
Posts: 180
Joined: Wed Jun 27, 2012 4:24 pm

Re: auto-level problem

Post by jy0933 »

i guess i should probably restate the problem for clarification.

the original problem is that

after well calibrated acc.
WHEN TURN ON AUTO-LEVEL.. AFTER PITCH/ROLL, THE MR GOES BACK TO LEVEL SLOWLY. and I was looking for the solution that the return to level can be faster. (like APM/mpng, after release roll/pitch, the MR goes back to level almost immediately)

User avatar
shikra
Posts: 783
Joined: Wed Mar 30, 2011 7:58 pm

Re: auto-level problem

Post by shikra »

Ok , prob a silly question - is level definitely enabled on a switch? Those are crazy high level PID settings. I would expect the copter to be shaking to pieces!
What versions are you running? If its 2.1, suggest to use the normal GUI to be sure the level goes green when activated on switch.

jy0933
Posts: 180
Joined: Wed Jun 27, 2012 4:24 pm

Re: auto-level problem

Post by jy0933 »

did checked with gui since i have BT on when tuning

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: auto-level problem

Post by scrat »

doughboy wrote:
note that you MUST make sure your RC values are as close as possible to 1000-1500-2000 for min-mid and max. otherwise, there is no point calibrating/trimming acc.

from your statement above, it is incorrect to adjust for drift using the TX trims!!!! do not do that. the tx/rx values must only be trimmed so the RC values on the gui shows 1000-1500-2000. do not use it to trim quad drift!!


-------------
Go Giants!


I've read that you use subtrims on Tx to make rc values as close as possible to 1000 - 1500 - 2000. Then you can use Tx trims for quad drift in ACRO mode. For Acc mode you must not use Tx trims. Is that ok?

vpb
Posts: 231
Joined: Mon Jul 23, 2012 4:09 pm

Re: auto-level problem

Post by vpb »

Yes, use sub-trim to make rc values especially mid-point close to 1500.
In acro mode, you can use tx-trim to get drift-free, in level mode, you should use acc trimming, not tx-trim.

doughboy
Posts: 252
Joined: Tue Sep 04, 2012 7:20 am

Re: auto-level problem

Post by doughboy »

I would use tx trim to adjust drift only if you dont plan on using angle or horizon mode at all. otherwise, whatever tx trim you do in acro mode, will be there in angle and horizon mode. plus the way mw is coded, any trim offset from center on the sticks will count towards the error value. a better option is to enable acrotrainer mode, which is essentially a combo of acro and angle mode. from looking at the code, I think it makes sense to add the acc trims to acro mode as well, not just angle mode, which is essentially what happens in acrotrainer mode. (well, technically, it adds the acc trim values when pitch+roll is <=200, which is exactly what you are trying to achieve by using trims to compensate for drift when pitch and roll are centered. I think rx should be left alone at 1500 and acc trims used to offset drift)

as to the original topic, there is an option called level_pdf which is probably what you want. watch out though, I tried it and completely lost pitch and roll control.
viewtopic.php?f=8&t=503
other than this, you really just need to adjust the LEVEL pid.

------------
Go Giants!

sirbow2
Posts: 7
Joined: Sun Oct 14, 2012 7:13 am

Re: auto-level problem

Post by sirbow2 »

may seem obvious, but did you click "write" or similar?

eggar
Posts: 3
Joined: Thu Jan 24, 2013 1:38 pm

Re: auto-level problem

Post by eggar »

Is there any solution for that problem ?
Because i have the same problem, my copter needs nearly 1 second to get back in level after
using Roll or Pith.
With Arducopter it returns to level at once.
I tried nearly every PID combination and cant fix it.

User avatar
KasparsL
Posts: 75
Joined: Wed May 16, 2012 3:31 pm

Re: auto-level problem

Post by KasparsL »

eggar wrote:Is there any solution for that problem ?
Because i have the same problem, my copter needs nearly 1 second to get back in level after
using Roll or Pith.
With Arducopter it returns to level at once.
I tried nearly every PID combination and cant fix it.

+1

I see the same problem, it kind of slowly finishes returning to level, no mather what PID values are set for acro and level.
Here is a video demonstrating: http://youtu.be/iRKM-4tf-Q0

Write "+1"if you have the same behaviour. ;)

User avatar
KasparsL
Posts: 75
Joined: Wed May 16, 2012 3:31 pm

Re: auto-level problem

Post by KasparsL »

Come on - dont tell me, that everybody are PRO pilots and fly using ACRO mode only! Nobody wants to make LEVEL (angle) mode perfect?

cardboard
Posts: 183
Joined: Tue Mar 15, 2011 9:40 am

Re: auto-level problem

Post by cardboard »

I would like to think I'm a pretty accomplished pilot and I fly in horizon mode almost exclusively. If you don't know horizon shares similar autoleveling to angle mode.

Assuming your copter is tuned well for acro mode then half the chanlege is complete. If angle/level P is to low return will be slower and wont be as locked in as a well tuned P factor. In your clip P looks ok, may be able to raise it a little more but is hard to tell. Next is D, this controls the speed at which the copter tries to return to the level or if in acro how fast to recover from outside forces.

In your video you are applying an outside force which can complicate the situation, any test of this matter should be done with the copter flying on its own. This is to do the the feedback style control loop that is used.

Make sure all props and motors are balanced and that the flight controller has some vibration dampening if it needs it. If the sensors are subjected to vibration it will effect there accuracy.

Now the next point that will have the biggest impact on how quickly it returns, your flying style.
I fly my copters all the time, if that makes sense. During flight I very rarely just let level mode fly the copter.
If you ease the sticks back to centre instead of snapping the back this may also make a difference also.

I have a couple of ideas though, if you turn the rate up for pitch and roll that may help with the speed of return. I always chuck .25-.5 on rates as that is how I enjoy flying. The other idea would be to lower expo, this would only make it seem as if it were returning faster but may only be a preserved effect.

Multiwii 1.9 (WMP and NC)in level mode, pretty dam snappy
https://vimeo.com/31985786
A newer flight controller.
http://www.youtube.com/watch?v=35rnEsdN6UI
And FPV, this is how I fly 70% of the time which may be why I fly like I do.
http://www.youtube.com/watch?v=qiJmESBqaYA

User avatar
KasparsL
Posts: 75
Joined: Wed May 16, 2012 3:31 pm

Re: auto-level problem

Post by KasparsL »

cardboard wrote:In your video you are applying an outside force which can complicate the situation, any test of this matter should be done with the copter flying on its own. This is to do the the feedback style control loop that is used.

I am not applying any force! I am just holding to not to let it to fly away. It is at hoowering rpm.

cardboard wrote:If you ease the sticks back to centre instead of snapping the back this may also make a difference also.

It will just hide the real issue, its like flying in ACRO and saying that there is no issue in LEVEL mode.

The video was made to show the issue, and it doesnt reflect my flying style in any way. Before i got the CRIUS board, i was flying only in ACRO, because Level was not working properly on my previous DIY MultiWii.

cardboard wrote:I have a couple of ideas though, if you turn the rate up for pitch and roll that may help with the speed of return. I always chuck .25-.5 on rates as that is how I enjoy flying. The other idea would be to lower expo, this would only make it seem as if it were returning faster but may only be a preserved effect.

No it will not help, as it is not config issue.

Look more carefully in the video, when the copter is returning to the level position, everythin is fast and ok UNTIL some certain small angle, when it becomes slow and not depends on any PID values.

And in HORIZON mode it acts exactly the same (it is the same at low angles as level mode), I know what is "HORIZON" mode and how it works.

Please correct me if I am wrong.
Any other suggestions?

Levon
Posts: 3
Joined: Mon May 13, 2013 3:27 pm
Location: Sydney

Re: auto-level problem

Post by Levon »

Hi KasparsL, I have exactly the same behaviour and that annoys me, copter can't hold it's position in the small area... Sometimes overshoots and I have a feeling when I send the copter a bit far forward, it then returns where it was by itself. Well that overshooting is a matter of setting up the PID more coorectly, but that slow returning to the level is definitely annoyingly present.

My board is Paris v4r5 upgraded to firmware v2.2
Do you fix it? any news on that?
Thanks

Levon
Posts: 3
Joined: Mon May 13, 2013 3:27 pm
Location: Sydney

Re: auto-level problem

Post by Levon »

Here is what I have now. Can't get rid of that slow leveling and slow overshooting. I barely hold the copter and did just one stick movement forward and then one movement backward, the rest pendulum effect does the board.
http://www.youtube.com/watch?v=KXXJ_at- ... e=youtu.be

felixrising
Posts: 244
Joined: Sat Mar 23, 2013 12:34 am
Location: Australia

Re: auto-level problem

Post by felixrising »

That overshooting and pendulum effect is analogous to the "ringing" when tuning Pitch/Roll PIDs... albeit much slower. from the wiki, increasing "D" will increase importance of "P", but increase rate of return to level, so if you increase "D" you will need to decrease "P". Wiki: http://www.multiwii.com/wiki/index.php?title=PID#Advanced_Tuning_-_understanding_impact_of_P.2C_I_and_D

Levon
Posts: 3
Joined: Mon May 13, 2013 3:27 pm
Location: Sydney

Re: auto-level problem

Post by Levon »

I played with the PIDs today. D absolutely doesn't influence on the speed of that slowness.
It appeared that the slow leveling minimises when I either lower gyro (pitch/roll) P or bring acc P (level) higher. Very high - 20 or maybe 15. Sounds weird, but in my hand it's rather stable, I need to do test fly and see if it's stable in the air as well.
I'll report the results. Though this topic seems pretty calm already, all has fixed their levelling problems? :) Or grown up? :P

geggog
Posts: 6
Joined: Sat Nov 02, 2013 1:31 am

Re: auto-level problem

Post by geggog »

KasparsL - you didn't by any chance come to a resolution to this issue? I too have come from an APM and whilst I've managed to tune all of my other PIDs (in acro) satisfactorily, the MultiWii still returns to level rather slowly in angle mode. Admittedly I'm new to the MultiWii so I'm not sure whether this is simply as good as it gets, or whether there's an issue here I can dial out.

A little view of the slow auto levelling :-

http://www.youtube.com/watch?v=0DOqlvz9KS8

geggog
Posts: 6
Joined: Sat Nov 02, 2013 1:31 am

Re: auto-level problem

Post by geggog »

In doing a little reading, I stumbled across this little thread on a horizon issue in V2.2 :-

viewtopic.php?f=17&t=3806

Reading through the symptoms it sounded rather similar to the slow-return-to-level-issue I'd had been experiencing... it was just too slow returning back to level after pitch/roll. To cut a relatively short story shorter, I installed the V2.3 release candidate, upped the rates a tad and viola! It now flies (and returns to level) like a dream.

Post Reply