I'm still very new to flying a Tarot PRO Hexacopter and APM 3.2.1 and its been fine up to now, I have about 4 hours of flying experience with out incident. I added my FPV components and was about 11 minutes into a perfect flight in Loiter mode and low wind and good weather conditions. While hovering my machine at approx 30 meters altitude it suddenly started a shallow Toilet Bowel effect and got progressive more severe, and then also lost complete control. I tried to activate RTL with no effect. I then switched to Stabilize but because I had pulled the throttle to zero for RTL my machine inverted and was heading for the ground at a rapid rate. After applying full throttle I saved my machine from complete destruction with about half a meter above ground level.
My question is what causes Toilet Bowel effect and what should I do to fix it. Can antbody help please.
Replies
tbh it shouldn't be THAT reliant on the compass, the gyro should be dominating short term accuracy with compass correcting long term drift.
Magnetometer miss-calibration is a long term error. There is nothing the gyros can do to counter this.
In most places on earth, the components of the magnetic field that indicate north are very very small compared to the overall magnetic field. This is even worse on a multicopter where the high current power wires that run everywhere emit magnetic fields, ESC's output a lot of EMI, and motors have magnetic fields that can change based on how much power they are drawing. It's a minor miracle that even with careful calibration anything useful can be used from a magnetometer.
Hi Henry, How did you get on with the compass calibration? Does it Loiter better now?
Hi Sandy
Thank you for your reply. I have been away so have not yet discovered what went wrong. I had 10 minutes of perfect flying, the Toilet Bowel started quickly in the 11th Minute and only going to Stabilize mode stopped a machine in pieces. My compass is Lea-6 on a pedestal. Have found the compass connector was slightly out of its normal full in position, so this maybe the cause.
Will go thru the compass / Mot setup tomorrow and see what happens.
Cheers Henny
Every single time I ever had 'toilet bowl' effect it was the compass. You can pretty much take that to the bank Henry. Is your compass with the gps on a pedestal? How far away from the electronic is it? The single most common problem with compass issues is it's too close to electronics. Try and move any wires etc away from the compass. Also you might want to look here
http://copter.ardupilot.com/wiki/ac_compasssetupupadvanced/
in particular the compass mot which is compass motor compensation. I got rid of my toilet bowl by simply doing the compass mot. I would recommend you only go 3/4 throttle when doing so. I had better luck this way. good luck!
This issue here is toilet bowling which is caused by the compass not being calibrated correctly so that it knows what direction the copter is pointing in. From there it will be able to Pitch or Roll the copter in the correct direction to compensate for Loiter or Position hold drift.
If the compass is off it will pitch when it should be rolling causing it to fly in a circle until it crashes.
Loiter is effectively navigation to a fixed point. If you are east of the desired loiter point, and the aircraft heading is pointing north, the aircraft is commanded to roll left to move back to the west and reduce the error. If you are east of the of the desired loiter point, and the aircraft heading is pointing east, the aircraft is commanded to pitch back to move to the west and reduce the error. So, the pitch and roll commands needed are a function of both the position error and the aircraft heading.
Aircraft heading is determined by a mix of the gyros and the compass. In the short term the angular rates from the gyro are integrated, but long term drift is determined by the compass. So, if your compass is not calibrated you can't rely on the aircraft heading data, and don't know which way to steer to move towards any given position. If there is a very large error in the compass (say you have it pointed 180 degrees in the wrong direction) then the aircraft moves in entirely the wrong direction and you don't believe that the navigation loops are working at all, while smaller errors produce the toilet bowl effect where at least you see it trying.
You can see the effect of the mix of gyro and compass data by taking the compass off the aircraft (but leaving it electrically connected). Rotate just the compass and the heading value very slowly moves to a new value (which no longer reflects the aircraft heading). Rotate just the aircraft and in the short term the heading value looks like it is following the aircraft properly, but over the long term will move back to the original (compass defined) value which does not reflect the aircraft heading.
This is not unique to APM. Check the section "Fix the TBE (Toilet Bowl Effect) Problem" of the DJI manual here where they go through which direction to rotate the compass depending on which way the aircraft is circling.
More nonsense!
"Loiter is effectively navigation to a fixed point." What defines the point?
"If you are east of the desired loiter point, and the aircraft heading is pointing north, the aircraft is commanded to roll left to move back to the west and reduce the error. If you are east of the of the desired loiter point, and the aircraft heading is pointing east, the aircraft is commanded to pitch back to move to the west and reduce the error."
If the compass is off 90 degrees, east becomes south, north becomes east, west becomes south, substitute in quoted statement and result is the same.
"and reduce the error" What determines the error?
Actual magnetic heading is irrelevant, maintaining a fixed heading is irrelevant to maintaining a hover. Maintaining a fixed heading may make the computing easier that is all. The gyros can be used keep the copter level in pitch, roll and yaw.
"In the short term the angular rates from the gyro are integrated, but long term drift is determined by the compass" How does the compass control long term drift in pitch and roll?
The accelerometers detect movement in the XYZ planes A decent hover can be attained in XYZ by adjusting thrust of individual motors in opposition to accelerometer inputs, along with gyros input. This will not compensate for wind drift however.
A GPS can be used for drift but accuracy is only reliable either short or long term to 2.5 meters at best. Using GPS for position control, will cause "toilet bowling", just by following its short term variations.
If it doesn't know the orientation of the copter to its True North reference it still should be able to adjust, similar to what a human would do hand flying if you move the control right and the copter goes left you move the control right to make it go left.
Again I don't know how the code is written, I do know that GPS is not good for maintaining altitude, or a position within 2.5 meters,
Magnetometers are good at detecting motor thrust levels and other magnetic fields generated by electrical current.
Pressure sensors can measure airspeed changes, as well as altitude changes.
When flying my Piper Arrow, on takeoff, I set my Gyro compass to the runway heading (magnetic) and compare my mag compass reading, generally I use the gyro compass as my main reference. GPS will give my True Heading while flying and where I live the mag heading is 16 degrees west of true north. The autopilot only uses gyro inputs, it could also use Navigation inputs GPS/VOR/ILS but never the mag compass.
If Loiter relies on a calibrated mag compass it will always "toilet bowl" most of the time.
Clarence,
Apparently this concept is harder than I imagined. These are good explanations that don't seem to be getting through. I have written my own flight controller from the ground up. I know how these thing work, so I'm going to throw in my 2 cents and hope for the best. I'm going to take the long way around the barn so buckle-up.
The magnetometer gives a direction vector in three dimensions. As you have noted, it does not give position but only a reference direction. In the flight controller this direction vector is corrected for declination, inclination, hard iron effect and soft iron effect to determine "true" north. The hard iron and soft iron effects are the part that magnetometer calibration effects.
In a flight controller, navigating between way points involves flying towards a distant point until you are "close enough" and then moving on to the next way point. To do this the aircraft's current gps position is compared to the desired position (way point). The difference between these points creates a vector that describes the desired flight path. If the reference direction from the magnetometer is perfect, the aircraft can precisely fly that vector and arrive at the desired location. Each time a new gps reading is acquired, a new vector is determined allowing the aircraft to continue heading directly towards the desired way point even if it is being deflected by wind.
In a situation where the magnetometer is not calibrated correctly, the reference direction has a deviation from true north. If this deviation is "small", nothing bad happens. In a situation where an aircraft is flying towards a distant point, moderate errors look to the controller like it is being effected by wind (or some other force). Example: If the way point was directly north of the aircraft, the error in the reference direction would cause it to travel at an angle slightly off from the desired vector (assuming no other forces acting on the aircraft, this deviation angle would match the error in the reference direction). This deviation angle causes the aircraft to move slightly off of the desired vector. Each new position update detects this deviation and creates a new vector pointing at the desired way point. When approaching from a distance this causes a flight path that instead of looking like a straight line looks like an arc that bends tighter as the aircraft gets closer to the way point.
If the aircraft is told to go to a specific way point and hover on that spot (loiter), then this error in reference direction can be more problematic. Each small move towards the hover point has the same angular error as is found in the reference direction. The next move attempts to both move closer to the desired position and compensate for the error introduced by the last correction. If the error in the reference direction is large enough (bad calibration), then each correction generates more positional error than it corrects. This is called toilet bowl effect. In cases of mild miss-calibration, you can have a toilet bowl effect that does not devolve into a death spiral, but just looks like the aircraft moving slowly in a circular fashion.
In position hold, the desired "way point" is the copters current position when the sticks are released. It will attempt to loiter on this point until given a new command.
Bottom line, magnetometer calibration error can cause an aircraft to move in a direction that is not purely where it wants to go. This generates a flight path is is constantly correcting for error. Extreme cases will cause crashes.
As a side note, many good gps units can give a positional fix that is accurate to +/-1m. With some fancy math and sensor fusion magic, is is possible to hold to a position smaller than this under good conditions.
Wow great explanation Phillip thank you!