Sunday, August 25, 2013

Arducopter tuning history

Update Aug 25, 2013 3 scary flights with the arducopter today. One of the first was when I setup an auto way-point flight and when I started the flight it started heading in a slightly off direction than I expected it to go. At first I thought it was just I judged the way-point on the map a bit off. But suddenly without any input to the controls the arducopter suddenly stopped flipped almost completely sideways for a moment. It had 20 meters of altitude so I froze for a moment prepared to take it to stabilize mode and bring it down. Also now this position had moved directly over the pilot flight area. I must have screamed or something like “shit what the FUCK” very load since everyone seemed to have taken notice. The aircraft at that point had only lost about 3 meters of altitude even after the flip so I put it in stabilize move and moved it to a safe location and landed it in one peace in releaf. I sat it down and took a break after that and tried to think what could have happened. I did note after the flight that the way-points that I thought I had programed were not updated in the aircraft and that it still had the way-points from soi 5 that was about 12km from where we were flying. So lucky I got it into stabilize mode before it flew away forever. But that still didn't explain why it did the near flip over the flight area. So after that I setup the fence mode thinking that would be safer to prevent the aircraft from flying off if I were to fail to get to stabilize mode in time. But that ended up causing another bad and more scary flight that the last one. This time when I hit the fence mode barrier at 30 meters away from launch it was having problems returning to landing in RTL mode. This day we had very heavy winds up to 12 and 17mph at times. Just so happens at that moment was one of those 17mph wind times and the settings for auto flight were setup to work in only 9mph winds with the large heavy 6000mah battery that I was flying with in this flight. So the auto mode didn't have enough flight authority to over come the wind so it continued to drift farther away from me instead of returning to the landing zone. I could see it wasn't getting closer to me and I knew it was in RTL mode from the android mission planer voice that signaled the present mode change. So again I thought no problem I'll override it to stabilize mode and bring it back. But every time I would try to put it in stabilize mode the aircraft would see it was outside the fence and force back into RTL mode. So I kept trying to over come the conflict of the aircraft not returning with just short durations of stabilize mode until I finally got it back within the fence mode boundaries. When I finally and barely got that to happen I was able to bring the aircraft back to landing zone and land with out any more problems. So that fence mode seems a bit scary if you are flying on a windy day and don't know if auto modes can handle wind drift rates. Later I tested Position mode with the 6000mah battery and it seemed to hold position OK in the wind at that time but it was only about 11mph when I had a chance to test it as the winds were not consistent. It did circle the location lock position with a 2 meter radius so not perfect but it did have authority to fight the wind. I also later found that the way-point program switch doesn't always work in the android. I'm not sure how to verify that the way-points have been programed as compared to the PC version of the mission planer that has a read way-points button that can be used to download the values in the aircraft and view them to be sure they are what you want. I don't see such a button on the android version of the software. What I think seems to work to pull the present way-points from the aircraft is if you reset the android software and unplug and replug the 3DR telemetry TX/RX on the android to verify that it has a link that is working. It seems the plug sometimes gets disconnected on the 3DR and there is no easy way to know if it's working or not. Update Aug 23, 2013: Todays tweaking on Paul's Arducopter 3.0.1 had a bit more success than yesterday. Partly due to just a bit less wind on this day but still a bit to keep it challenging. This time we got altitude hold to stop it's quick oscillation. This was done by lowering THR_RATE_P down to .3 from what is was set to 1.5. It originated value started at 6 so we have moved it a lot from the defaults. With this change we don't have the pulsing quick reactions to altitude change. Now it has a bit of a tendency to drift in altitude up to 1 – 2 meters if I do aggressive lateral push movements before it slowly creeps back into position, but when in a stationary loiter it holds altitude quite well. Also changes were made in LOITER_LAT_P, LOITER_LON_P down to 1 (the original default value in 3.0.1) were it was 1.8 in yesterdays setting. With this value in the low wind we had on this date we held a good loiter position without too much unstable and sometimes scary movements from the previous values we had set yesterday. Also to prevent the loiter mode from going in a circle around the loiter position the values of HLD_LAT_P and HLD_LON_P moved up to 3.0 from the last value of 0.6. With this combination of values loiter seems to work with both size batteries at least in these wind conditions with gusts of up to 11 knts or a bit more. I could also snap it into loiter or position as I had a lot of lateral movement in the aircraft before setting to loiter without any problems. So I will try these present values in a few other conditions to finalize on this as the settings. Also I have setup another model on the DX6 TX radio called APM_SLOW that has limited the throttle to 75% max throttle where it was originally (and still is in APM_QUAD) to be set to 125%. This will require testing as it's not been flown with this value yet. With APM_SLOW setting I plan to simulate the max vertical acceleration that is available in the H2OQUAD. I failed to find a way to change max thrust in the APM config settings and this might be the best way as you can change the speed with the TX radio without having laptop or android system available in the field to change them. So we will see how that goes and see how Paul wants to set it to his preference at some point and depending on the flight application. Update Aug 18, 2013: Today we got a few more modes tested as working on Paul's Arducopter. We made a few changes to basic gains of pitch and roll and increased gain for loiter rate to hold even in winds of up to 8 knots or maybe more within 3 - 4 meter radius. I also cranked up throttle altitude gain to make alt hold work with the bigger 6000mah batts. See my published param files for Aug 18, 2013 to see the details of the end parameters of todays flights, and you can compare them to the day before or back to day one to see what has changed in the params over time at the temp FreeNET site that will at some point be moved to my Google drive site at some point to be preserved for long term archives when it all works or when we end working on it. We also tested altitude hold, acrobatic mode and way point auto mode between 2 way points. I have been having some problems with altitude hold when I use different size batteries as we now run from 2200 mah to 6000 mah batts that have a big difference in mass. I am working on figuring out how to make them both work in altitude hold and loiter mode to some reasonable degree without having to make changes to setting in the field. So next planed mode development is to setup a fence mode for the soi 5 lot and another for the stadium with a cylinder shape fence to see how well we can get that to work. The fence mode is supposed to prevent the aircraft from flying outside a boundary so good for training and for safety. Maybe you could learn to fly aerobatic flight with a quad in a fence without worry of crashing? That would be very cool if at all possible. After that or at the same time I would like to try the follow me mode to track an android phone that has gps and version 3.1+ version of android. As far as using this for camera video work, the system would require some changes in vertical gain to make it more stable in that axis. The mass of the camera and gimbal will add some stability and will require increase of P gain in roll and pitch in stable mode as I have it tuned down to 2.5 P gain for stable in pitch and roll and note it's already slow for the heavy 6000 mah batts in roll and pitch movement with these settings. I might also change yaw gain down a bit for a video camera as it's now cranked up to 4.5 P gain for yaw. But this can also be adjusted with the TX radio with dual rate settings, so not sure how far down I will need to go for yaw. I'm not sure what would be required to get the added mass of the camera equipment to get loiter and altitude hold mode to work stable enough to film. But we already have the servo gimbal in the present inventory that we can try that the APM can already drive to stabilize and steer a camera at a target in auto mode. So that will be fun to try at some point. At some point when it gets stable we will also have to try the FPV equipment on it. This again will require tuned down vertical gain to not be scary to fly. Another cool thing we learned today thanks to Tone that just happened to be at the stadium this day is that the default settings of the 3DR telemetry being set to network 25 that he was able to see my Arducopter data feed without any changes of settings that he had set for his APM aircraft that he flew this day. He found that if he changed his settings to network channel 60 that he could no longer see my feed and I could no longer see his and we no longer conflicted in operation. So in the future I might want to change my network to some random number other than 60 in hopes the next 3DR telemetry user won't be on my channel or network. The other cool thing is If I wanted I might also be able to monitor and control a flight from more than one location on a separate 3DR telemetry unit if set to the same network and made sure not to setup conflicting traffic.

No comments:

Post a Comment