Monday, October 19, 2015

Enduroquad Success

2 EnduroQuads ready to take flight. Both carry 20 Ahr of 4S. Ours, on the left, has a Tarot 2-axis GoPro gimbal as payload and the one on the right has a 6600 mAhr 4S standing in for a Sony a5100.
Well, as I mentioned in my Vibration Consideration post, I have been working on new iterations of an endurance quadcopter. Today I cleared the final hurdle in declaring it ready for use: I flew it in Auto. As I mentioned before, I have seen this quad (and others) descend in forward flight while in Loiter or Alt Hold, so I was a little worried about how auto would go. The only thing to do, though, was to give it a shot. So, I gave it a plan to fly a grid over Davis Field and let it rip. It was basically flawless. After it finished and began loitering at the final WP, I restarted the mission, and let it go again. Then I put it in RTL and let it autoland. Finally I restarted the mission, took off in Loiter, switched to Auto, let it run, and then did an RTL and autoland again. All in all, it was really nice with no significant altitude loss at a 6 m/s cruise.

Screenshot showing 3 auto flights using the same flight plan. Note the excellent agreement between all flights (orange, green, and pink)
Here are my more detailed notes:
  • Upping rate_yaw_P to a the healthy value of 0.28 (from a default of 0.2 and above the "maximum" value of 0.25) fixed the issue I had with the nose wandering around. I'll say, this behemoth needs some huge PID values to make it fly well.
  • I did observe altitude drop at the end of transects which is well known to the APM community. This seems to be a physical barometric pressure issue and there doesn't really seem to be a workable fix for it. I have never seen it present a problem, though, as it has always been a controlled loss of about 1-2m altitude which is then regained.
  • Copter 3.2.1 doesn't like to land on a slope. In both autolandings I had to switch to Stabilize with the throttle down as the landing detector didn't kick in with the slope there. The changelog indicates that this may have been fixed in 3.3 (they added "improved landing on slopes"). I will find out when I test the bigger EnduroQuad which has 3.3. I will also likely upgrade this one to 3.3
  • Takeoff in Loiter is quite nice. The devs have done a considerable amount of work with this in recent releases and I now find it to be a less dramatic way to get out of ground effect than punching the throttle in Stabilize.
So, that is pretty much it. My plan for the rest of the week is to get a few more hours of time on our quad and get a few Auto flights in on the bigger quad to convince myself that they are both 100% mission capable. Then it will be on to all sorts of fun projects like using TIR imagery to census lions, tigers, and bears at the NC Zoo and deer at Pilot Mountain. We are also planning to use it to identify energy leaks on some buildings around campus.

Friday, October 16, 2015

Good to be productive

I have been hating on mutlirotors quite a bit lately, and for good reason. Our planes are easy; they work every single time we need them to and they do exactly what we need. They are easy to set up, easy to use, and they get results. Multirotors, on the other hand, tend to be a huge pain to get operational as they are super sensitive to vibration (see my earlier post on this topic) and when they fail they tend to fall out of the sky. I basically have felt like I was spinning my wheels for the past few weeks with the multirotors.

The past couple days, though, I made a lot of progress. First I figured out the vibration and altitude hold problem I had been having. That got alt hold and loiter working quite well.

Today I maidened a second endurance quad with larger motors for carrying a Sony a5100 and gimbal. After a little tuning it flew really incredibly. I think I have as much confidence in it's stabilize performance as any other copter I've flown. It hovers at just under half throttle, it has tons of power, and it flies like its on rails.

I also did some testing with the Swift Navigation Piksi RTK GPS system, which will go on the heavy lift endurance quad. The first thing I noticed is that it is insanely simple to use. For basic positioning you simply connect both Piksis to telemetry radios, power them up, and connect to one over USB or serial. Then you wait 10-20 minutes for it to get an RTK lock and at that point you get centimeter accurate relative position precision. I wanted to verify that advertised accuracy so I measured the distance between the antennas and compared it with the distance reported by the software. I was amazed, the RTK distance varied within +/- 2 cm of the measured distance. I haven't installed it on an aircraft yet but I'll report back in when I do.

With all that good news, I did have a couple problems today. First, Enduroquad 1 had a very odd issue in flight. The controls were all delayed by about a second and changed in a stepwise manner, making it quite hard to get back on the ground safely. I would give input, it would come into effect after about 0.5-1 seconds, stay at that input for about a second, then update to whatever input I was giving at that point. I gave up on troubleshooting it in the field but when I got back to the shop I determined that the Dragonlink was at fault. I had upgraded to a new transmitter and it turns out it has a new firmware version. Even though I fixed it, this does seem to be a significant safety issue to me, as firmware versions should either be compatible or not. There should never be a case where the RC system only partially works. I might report it as a big to Dragonlink but I doubt they would do anything about it...

The other issue I'm having is that both quads are losing 1-3 m of altitude during fast forward flight in loiter or alt hold. I had observed this behavior before and thought it was an air pressure issue. So I used my lessons learned finding vibration and did the same for this. Here is what I found:


Here we have pitch in yellow, target altitude in green, barometric altitude in pink, and calculated altitude in red. When you see sustained positive or negative pitch that means the copter is in forward flight. As speed builds, you see a lot of noise in the barometer and a gradually increasing calculated altitude as the barometric variations slowly cause deviation from the accelerometer readings. Then when the copter stops you see that altitude plummet, as the copter has actually descended but doesn't know it until forward flight stops. Then you get the gradual return to target altitude. The noisiness of the barometer signal makes me pretty confident that this problem will be solved but putting a cover over the pixhawk to hopefully prevent airflow around it and only allow real pressure changes. We will see how that works out tomorrow...

Thursday, October 15, 2015

Now What?

I'm excited to announce that the Huffington Post/AOL documentary series, Now What with Ryan Duffy, made an episode about our work in Peru. The episode is now live, check it out:

Now What with Ryan Duffy

Vibration Consideration

Ok, so I fully realize that we have been absolutely awful about updating this thing. The other day, as I sent email #5832 to the flight crew updating them on progress with our aircraft, I remembered that avoiding having all of our development information hidden away in email threads is exactly why we created this blog. So, with that in mind, I'm going to try to do a better job. I may also set up a Gmail group, as that seems like a really good way to track/organize routine/mundane communications within the group that don't really justify a blog post.

Anyway, the big news items are:

  • The Mugin is flying beautifully in manual and FBW. We haven't tried auto, but will like do that the next time we fly. I'm still concerned about vibration but FBW at least seems to be totally unaffected by it. An FBWB test may be in order
  • The Z3 is still excellent. 60% of the time it works all the time.
  • My company built 2 Skywalker X8 aircraft for a client and they are really superb machines. They are a little flimsy, but the trade-off you get for that flimsiness is huge: carrying a Nex-5 for 75-90 minutes at 18 m/s. We need to buy 1 or 5. 
  • I am building a quad for a client which will have the Swift Nav Piksi on it. I am excited to see how well that performs.
And now, on to what I want to spend this post talking about. I've been developing a new quadcopter which should fall nicely into a niche of good endurance combined with high portability. Spurred on by the excellent work done by the Ecosynth crew and Jonathan Dandois down at the STRI in developing  a quadcopter with 50 minute endurance from spare MK parts, I set out to copy it. I believe this is detailed in an earlier post on here.

Sunday, May 31, 2015

Flying Low

We have talked about the potential need to fly from a higher elevation to a lower elevation using Pixhawk Auto mode.  I have seen the terrain following and absolute altitude discussions but never could I find a discussion on making an auto mission using negative altitudes.  Well that changed today:


I setup two flights starting at 10 m and descending to -10 m at the end of the grid.  It work perfectly!!!  The only changes I made were were to set the Alt Warning in the wp list window to -15 m.  I was losing telemetry (3DR radio) connection on the return legs and I should have raised the antenna.  

Now we need to combine this with a laser altitude unit....

Tuesday, March 3, 2015

Next stop, Belize!

Well, today has been a pretty good day so far. I was up late last night working on resolving all the dependencies for Ecosynth to run on RedHat/CentOS. I got it to compile and today I will find out if it actually works. I also got a fan controller for Big Deac so now it sounds less like a vacuum and more like one of those little white noise generator's outside of your therapist's office.

The bigger news, though, is that our newest aircraft made its maiden flight this morning.

The newest Zephyr in the fleet, complete with a wonderful looking black and gold Monokote livery
The plane is a Zephyr 3, like the others, but is setup somewhat differently. Instead of the Ritewing secret sauce motor we have a Turnigy 3420 1250KV driven by a secret sauce ESC. Elevons are controlled by Hitec HS-5245MG servos. This setup provides boatloads of power and good control. FBW settings from the other Z3s are a little sluggish on this one but thats nothing a little tuning can't fix. Finally, you'll notice the Ritewing GoPro and FPV camera box on the nose. This is nice as it will allow us to run a GoPro for video recording and a more reliable FPV camera for the live feed.

So, now it is off to start getting gear ready for the trip to Belize; departure is bright and early Friday.

Wednesday, February 18, 2015

Big Deac is a little bigger

Well, the title says it all. It came to my attention a couple weeks ago that Intel's Xeon Phi 31S1P coprocessor is on sale for less than $200. The Phi line is out to compete with nVidia Tesla in the HPC market but despite looking similar it has some critical differences. The biggest is that while a Tesla is a high-end graphics card with firmware designed for for HPC, the Phi is a highly-parallel Xeon processor (57 cores at 1.1 GHz, in our case). This means that while it isn't as parallelized as a GPU, it runs an (almost) full x86 architecture. While that should make it easier to program for, in our case it is unimportant. In fact, in our application it should be significantly inferior to a Tesla, or even a top of the line desktop GPU, but it is only $200. So, we got one to see how it goes.

The card, in all of its glory. As you can see, it is quite a behemoth. It is about the same size as our AMD Radeon 7970 and is, actually, a little thinner.

Another difference from the Tesla cards is that the Phi can (currently) only run on Linux. And, to make matters worse, it only natively supports RHEL and SUSE. Being the cheapskate that I am, I had no plans of investing in enterprise Linux. Instead I opted for Ubuntu 14.04. I found this excellent guide on how to get it up and running. I did have some difficulties getting it going but, for the most part, everything went as planned. Following the instructions closely you shouldn't have a problem. My only addition is that when you download the OpenCL drivers, get the ones that say they are for RHEL/SUSE. Even though they say Ubuntu isn't supported (and there is an Ubuntu version which lacks Phi support), the OpenCL 15.1 Runtime for Linux installs perfectly fine on Ubuntu.

The next (ongoing) challenge was cooling. The card is passively cooled and designed to be installed in a server with what amounts to a wind tunnel in it. So, to satisfy the cooling requirements of the card (a whopping 275W TDP, to be exact), I made my own wind tunnel. I put a 75 CFM intake fan in the front of our case and a 150 CFM 92 mm fan on the back with a, erm, custom ducting unit, to draw air through the heatsink of the card.

The exhaust fan. It is LOUD.

The card installed. Not shown is the 120mm fan now installed below the HDD bays to push air toward the intake side of the card's heatsink.

The exhaust fan is very, very loud (who knew pushing 150 CFM through a 92 mm diameter hole would be noisy), but it keeps the card running nice and cool (currently peaking at 52 C to be exact, which is well within spec).

So, with everything in place, it was time to fire up Photoscan and give it a whirl. To my relief the Phi and the 7970 both showed up in the OpenCL menu in Photoscan, so I selected them and got to work. I opened our 3000 image campus dataset, deleted the dense cloud, and set it loose reconstructing the whole thing on medium quality. It is looking like it will take about an hour and 45 minutes (a very respectable time) and isn't even able to fully utilize the Phi (not necessarily a good thing). I think chunking tasks and running them in separate instances of Photoscan will give further performance gains. Once it is done I will go in, disable the Phi, and see how long it takes then. But, for now, all is looking quite good.

Shortly after starting the reconstruction.

Monday, January 12, 2015

Pushing the limits

While I have, for some time now, hinted at our intentions to obtain a more capable aircraft which will provide longer endurance and higher payload capacity, I have kept it mostly in the shadows. Well, it is now time for me to [very excitedly] announce the arrival of the newest and most capable addition to our fleet of aircraft: the Mugin v3 aircraft.




This impressive aircraft will launch us into a whole new class of UAV remote sensing, giving us capabilities far beyond our current stable of electric aircraft. Here are some of the details:

Wingspan:
3m
Material:
Wood structure, fiberglass and film covering
Powerplant:
Saito FG-57TS 57cc, 4-stroke, twin-cylinder, gas engine
Propeller:
Xoar Beechwood 22x10
Flight controller:
3DR Pixhawk
Cruise speed:
120 km/h
Endurance (expected):
~5 hours
Range (radio limited):
~100 km

This aircraft is not widely used, but there are some notable exceptions. CanberraUAV used an earlier version of the aircraft in the 2012 Outback Challenge. There are a handful of others who are discussing using it with APM/Pixhawk or are in the process of adopting it into a program, but we are certainly spring-boarding ourselves to the forefront of this work.

Stay tuned for updates on the build and testing of the aircraft. At the moment I have done the little bit of assembly that is required on the fuselage, gotten the motor and fuel system set up, and installed all the electronics. The next steps are to break in and tune the engine and power up the electronics, configure them, and test them out. The it will be flying time. As I have been building I have been looking around and found that there is an utter dearth of information about this airframe, so I will do my best to document the process in painstaking detail.

Too much excitement

Alright, after long absence I have some updates to make. First of all, to follow up on my last post, the endurance quad got back-burnered but we're going to turn our attention back to it. We made some test flights and determined that the vibration levels were too high for reliable flight. I traced this issue back to the motors, so we're replacing them. We could change bearings and fix the vibration issue but I already wanted to swap the motors for some lower KV ones, so I decided to save the time on the bearing work and just get the right motors for the setup. They should arrive in the next week or so, so I'll update once we have some flight time on the aircraft.

2 Zephyrs heading to Peru soon
Second, I have been in a build frenzy around here, with 3 Zephyrs just getting finished up and another right in the middle of the build. I am also working on a rail launcher that should get the planes in the air more reliably. It looks like we will have some fantastic weather this weekend, so we should be able to get all those new aircraft up and see how they perform. I'll provide more info on that after the weekend.

The Deacon Zeph in its fantastic black and gold livery
A bit of bad news is that we did a test flight on one of the new Zephyrs a week ago and had a crash on takeoff. We had flown it before and it performed really well, so that caught us by surprise. The wind was quite gusty and swirling on the ground that day so we think there might have been a stall issue with a rogue gust on takeoff that put it in the ground. We should be able to determine if that was the issue this weekend. I review the logs and there was a suspect board voltage change, but it didn't happen until after impact. We'll keep an eye on that to see if we actually have a hardware issue.

Finally, on the same day we crashed the Zephyr, we also did our first ever successful fully automatic airplane flights. We had tried auto-takeoff before with a skywalker and it ended badly. We were hoping that new firmware had solved all the issues we had before, so I put together an auto takeoff, circuit, and auto landing mission on Marcus' Pixhawk-equipped Apprentice. We were able to carry out the flights with total success from hand launch and ground roll despite the heavy winds (really too windy for an Apprentice). We found the results to be repeatable, with identical performance on numerous flights.

Well, thats all for now, but hopefully on Monday I will have lots of exciting updates to report.