Tuesday 29 November 2011

Landing Gear and On-board Camera

Since the last test, Brian purchased landing gear and reflective film, and we attached them to the 'copter. The landing gear consists of four legs and a central hub: the long legs would prevent the kopter from tipping, and we attached them to the existing landing gear with tape. However, this presented a problem, in that as the four legs flexed to absorb an impact, the hub would be pushed upward, and collide with the camera mount. Landing more gently would therefore be essential.

As part of the package, Aerobot provided with a small camera which could be mounted on the 'copter. It connects to a 5.8GHz transmitter, powered by a 11V LiPo battery which we mounted to the 'copter with sticky velcro. On the ground side, we had a 5.8GHz receiver, which has two analogue AV-out ports. One would usually pipe these to a TV, or a set of First-Person-View (FPV) goggles, but these had not yet arrived. There was no battery included for the receiver, so we had to run it from a 12V battery we had in the lab, originally intended to be used by the Tiny Radio Telescope exhibit. I emailed Aerobot asking where the battery for this receiver was.

Since we have neither a portable TV nor the goggles, we needed buy an AV-to-USB converter, so that my netbook could stream and record the video transmitted from the 'copter. I tested this in the lab and got a reasonable signal, once I set the receiver to channel 1. On the USB capture software, I had to use NTSC_M.

For this flight, I was assisted by Brian Crosse and a work-experience student, Ace. We wanted to test the landing gear and see if the reflective film had improved the visibility of the orientation, and to see if we could capture any streamed footage from the small video camera.

Weather was sunny, 38C, with a 10 knot easterly wind.


We plugged in the video transmitter and camera, and checked that the footage was being received on the laptop - it was surprisingly hard to tell given the extremely bright sunshine! I placed the 'copter in the same position as before - 10m to the east of my position, with its nose facing away.

Flight start 14:15 WST
I throttled up and took off, and we attempted to record some footage. Ace also used an HD video camera (a Sanyo Xactic HD2000) to record the flight. I brought it up and again in an arc around us; I then landed it. The landing gear made it much easier in terms of tilt, but it was difficult to land gently enough to avoid hitting the camera mount against the hub.
Flight end 14:17 WST
Modified Octo with landing gear and reflective foil.
Flight start 14:19 WST
We looked at the footage but all we could see was grass! So we adjusted the tilt on the camera and tried again. This time I put the kopter into position/altitude hold and yawed it around so that we could wave at it. The reflective foil was clearly visible and gave a much better impression of the 'copter's heading. I kept flying for three minutes, since there was no real time constraint, and I wanted to continue improving my skills at the controls.
Flight end 14:22 WST

Flight start 14.25
I took off again, but quite quickly, the transmitter started to beep; I looked at the MX-20 and it was showing the message 'Compass Error'.  I brought down the 'copter and nothing appeared to be wrong. We moved it back to its initial starting position and let it sit for a few minutes, in case it had overheated.
Flight end 14.27

Flight start 14.33
I took it up again and flew for a bit longer, trying some nose-first flying and again testing the 'come home' functionality. It was very pleasant flying, as the wind was absolutely non-existent, and the copter felt responsive and easy to control.
Flight end 14.37

Flight start 14.40
I put it into PH/AH and was explaining some of the controls to Ace, demonstrating tilting it to the left and right. Then the LEDs began to flash and the 'copter made an urgent beeping sound. We had had this problem in the lab when we were indoors, but not outdoors. However the day was extremely hot and quite still, and we'd been flying for quite some time, so I thought perhaps the 'copter was overheating. I brought it down perfectly, and went over to check if it was ok. Everything seemed fine but we decided to cease flight for the day.
Flight end 14:44

After the flights we looked at the captured footage, and found that the transmission quality seemed quite poor, and the framerate low. Unfortunately the battery on the transmitter had almost entirely discharged, so it was difficult to tell whether the problems were just from low battery or from the whole set-up.
The best still I managed to capture from the poor-quality
on-board camera footage
When I got back to the lab, I charged the battery and then tried recording footage around the lab again. I found that if I recorded to the netbook, without it being plugged in to the mains power, the framerate was sluggish, but that if I plugged the netbook in, the framerate was fine. Evidently the CPU's power-saving features meant that it was too slow to be able to de- and re-code the AV input quickly enough.

Lessons
  1. De- and re-coding from AV to MPEG is tricky for the eeePC unless it's running at full CPU capacity -- disable power-saving features if you want to capture footage.
  2. Ensure that the transmitter battery is fully charged before trying to power the camera and transmitter, and see if that improves the quality of the footage received.
  3. Reflective foil good
  4. Landing gear still needs work to prevent collision with the hub

Monday 28 November 2011

First Test Flight

For the first proper test flight, I wanted to use an area with considerably more free space than the courtyard behind the office. As term had ended, we were able to make use of Curtin University's Edinburgh Oval, a flat grassy space of 150 x 200 m with no trees and good visibility.

The plan was simply to take the octocopter up and test each of its controls - yaw, throttle, and tilt in each direction. I wanted to get a feel for the controls and see what the difference was between the simulator and reality. I intended to remain in manual control for the majority of flight, test the altitude/position hold, and to keep below an altitude of 10m, within a range of 30m. Assisting me was Brian Crosse.


Weather was 34 C and partly cloudy, with a 15-knot W wind, a little stronger than I would have liked for a first flight.

Flight start 15:12 WST
I placed the 'copter about 10m east of my position, with its nose pointed away. I calibrated, took the throttle up, and brought the 'copter into the air. I tested holding its position against the wind, gently tilting it toward me. I brought it a little higher, and tilted it around in an arc to the right, adjusting the yaw once I had repositioned, so that its nose was again facing away. I then brought it around to the left again, again yawing to compensate. I put it on altitude/position hold and found it quite stable, although it did move a few meters when caught by gusts of wind. I then landed it, but found that the ground effect was quite a bit stronger than in the simulation, so the 'copter bounced a few times and tipped over, landing against one propeller.
Flight end 15:14 WST

Flight start 15:23 WST
For the second flight I wanted to take it a little further away, to begin to get a feel for how it would look when we would use it for measuring the tile beam. In the simulator I noticed that it was easy to lose track of its orientation and I wanted to find out how strong this effect was in reality. I flew the 'copter about 20m away to the East, and kept it at a reasonably low elevation. This indeed did make it hard to see its orientation, as the LED lights are on its undercarriage. I brought it up to 15m elevation in order to adjust the yaw, putting it in PH/AH again to test it. I then tried out the 'come home' functionality, which brought it back. I landed it, but was unable to prevent it tipping over again. I found that in a wind, it was actually easier to fly while in PH/AH, as if I stopped moving the controls, it would simply stay in one place, as opposed to drifting away in the wind.
Flight end 15:25 WST

Lessons
  • Need to improve the visibility of orientation - Brian suggests reflective plastic film of the type used in model rocketry
  • Landing in even a light wind is difficult with the existing landing gear, as the 'copter is very top-heavy and has a tendency to tip. We could attach a larger set of landing gear.
  • PH/AH makes it easier to land, with the disadvantage that it's another layer of control that can go wrong, if you lose GPS or compass for some reason.

Saturday 26 November 2011

AerosimRC Simulator


In order to develop muscle memory and learn how to properly control the mikrokopter, I needed to train on simulation software, helpfully provided as part of the Aerobot package. The software uses simple polygonal and sprite graphics without any need for a GPU, so even a netbook can run it, as long as you have Windows installed :P

At last at home, I was able to install it on our lounge laptop and run it over our wall-mounted projector. This was excellently immersive: everything was about the right size, and I got the appropriate sense of vertigo and confusion when I sent the 'copter high up. In particular I realised how easily disoriented one becomes when the 'copter is more than 30m away; it suddenly becomes very hard to make out the 'nose' and see which way it is pointing.

The training tasks were hard to start with, but after training for a few hours, and then trying again the next day, I found my muscle memory had improved significantly. The hardest thing by far was mentally switching gears between 'tail toward you' flight, where essentially you're operating in a spherical co-ordinate system centered on yourself, and you want to keep the MK's nose pointed along r; into 'nose-first' flight, where you deliberately transpose yourself to the MK's frame, and always fly 'forward', but need to yaw around so 'your' nose is pointed in the right direction. The former makes more sense if you play a lot of computer games, the latter if you have played with lots of RC helicopters. Of course, if you have a first-person-view camera onboard the 'copter, and you can see it in real-time, then 'nose-first' flight becomes very straightforward, if a little dangerous since you could lose sight of where you are.

The calibration for the simulation is not well-documented so I wrote a short guide to getting it working on a Windows 7 computer:
Download the software from http://www.aerosimrc.com/ccount/click.php?id=211. Plug the cable that looks like an audio jack into the 'DSC' port in the back of the transmitter, and then plug the USB dongle end into your Windows computer. Open Control Panel and click Hardware and Sound, then Devices and Printers. You should see the controller there as a 'Gaming Device'. Right-click on it and press Configure, then click Calibrate.
These screens are better set up for a joystick than for the RC controller, so some of the calibration bars will not move no matter what you change on the controller. So when it asks you to centre the controller, just put both sticks in the centre and click next. When it asks you to test e.g. the z-axis, just move both sticks in complete circles both ways, then click next. Don't worry about any of the silver switches, just keep them all clicked away from you.
When you're done calibrating, install and run the AerosimRC. You may see a calibration screen straight away, but if the program skips it, go to the menu at the top of the screen and click Controller, then Configuration, then  Config 'A'.
On the right, you will see a graphical representation of your two control sticks and a third for the unused FPV camera control. On the left, you'll see a series of available commands your controller can send. Turn off the tick boxes for everything except Aileron, Elevator, Throttle, and Rudder.
Wiggle each stick one axis at a time to figure out where it is currently configured to, and move it to the correct setting using the toggle buttons in the middle. (On my laptop, Aileron is the second toggle, Elevator the third, Throttle the first and Rudder the fourth.) You may also need to tick the reverse button on Elevator and Rudder. Click the green tick mark at the bottom-right of the screen to save the settings.
Now you can go back to the sandbox mode and play around with it for a little, or start some training, again accessed from the top menu. You can select various models to play with; ours is the Oktokopter XL.
 Some flight tips:

  • Start the engines by pulling the throttle down and to the right, then back to the centre, easing the throttle up fairly quickly so that the kopter doesn't flip over.
  • To land, make sure you have no lateral motion, hover a meter above the ground, then cut the engines by moving the throttle down and to the left. (Ground effect is not strong in the sim, but huge in real life!)
  • Restart the training sim by pressing spacebar, if you lose the kopter. 
  • Always keep the nose (the red prop on the sim) facing away from you; your controls will be much more intuitive. The final training sessions involve flying the kopter with the nose in different positions to test your handle on rotational transformation!


Friday 25 November 2011

Reassembly and Motor Check

Having successfully transported the 'copter to Curtin, it was now time to reassemble it. Overall, the process was quite smooth; we initially thought that we had put the landing gear on backwards, we worked out that the 'Aerobot' sticker should indeed be facing forward. One issue we're concerned by is the lack of spare nuts, bolts and washers. We should take steps to accumulate more of these.

Having put it all back together, we then set it upright, switched on the MX-20 transmitter and then plugged in a 4000mAh battery to wake it up. It made a beeping sound as it tested each motor - keep your face well clear of the propellers!. I then attempted indoor calibration, but the transmitter reported a compass error - somewhat unsurprising.


We took the 'copter outside into a clear grassy courtyard, switched it on, and just tested hovering for a few seconds. It was surprisingly difficult!

I bunny-hopped a little, as flying at such a low altitude made the ground-effect very strong. I realised later that the 'copter was also very lightly laden, with just one battery and nothing in the camera mount, which made it very twitchy. I resolved to train for at least four hours on the simulator over the weekend, until I was comfortable enough to fly a little higher, and a little longer. I also realised we would need a larger space, with fewer nearby objects to cause turbulence and gusts.

Thursday 24 November 2011

Picking up the Astrocopter from Aerobot

I flew out to Gold Coast on the 22nd of November, taking the midnight howler, as they call it here! I arrived in Gold Coast on at 6am, which of course felt like 3am, and picked up some coffee and a croissant. I picked up the keys to the car, then checked out where I needed to drive to while consuming very necessary caffeine. I programmed my phone for the route, and set off.

An hour and a half later, I pulled into Byron Bay, found my accommodation ok, and had a nap, before going out to find lunch. After lunch, Flick from Aerobot came over and dropped off the transmitter and simulation software so I could practice before picking up the 'copter the next day. Unfortunately I didn't have a CD drive in my netbook, but luckily the software could be easily downloaded from the AerosimRC website. It checks for the proprietary USB dongle that comes with the transmitter, and if it doesn't find it, you can only fly a demo for a couple of minutes.
Simon's good enough to fly indoors!

I plugged it in and got straight into the training, which was quite surreal as I was rather jet-lagged, and sat in a four-poster bed surrounded by mosquito netting, since the mosquitos were just too persistent for me to sit outside. After a few hours I went out for dinner, then came back and trained for another hour or so, before reading and falling asleep.

The funky windchime
The next day I packed my few things and headed out to the home of Aerobot, a spacious two-story studio built into the side of a steep hill about fifteen minutes from Byron Bay. From the side of the hill, they could fly their machines out for hundreds of meters without losing line-of-sight. They had some great paraphernalia, including a wonderful wind-chime made entirely out of bits of busted mikrokopter.
Our own Oktokopter in flight

Simon and Flick were very helpful, showing me all the different parts of the Oktokopter XL, the model we had chosen. In particular, they showed me how to reattach the main body to the landing gear, since this is a bit fiddly.
The correct wire inputs for the transmitter.
The correct way to layer the shims between
the main body and the landing gear
I also did an hour or so of Quadcopter training, of which I unfortunately have no photos. It was quite windy outdoors and the Quad was considerably lighter than the Okto I had been training on. So I found it difficult to maintain fine control, as it was constantly being buffeted about. Also, I simply didn't yet have the muscle memory, and had to consciously pick which lever to push in order to have the Quad respond. However, after just an hour of training, I was noticeably better, and felt like I was beginning to move instinctively, rather than reactively.

But all too soon, we needed to pack the Oktokopter ready for transport back to Curtin. Unfortunately, all the nearby packing businesses were closed or busy, so we improvised, using a lot of cardboard and bubble wrap! Everything except the main body went in a box ready to be checked in, and I carried the main body, wrapped in clingfilm, as hand luggage. It certainly raised some eyebrows at the airport and for a time they weren't sure whether to let me on the plane, but eventually I was able to speak to the cabin manager for my flight, and he agreed that it would fit lengthwise in an overhead locker, even if it was longer than their 'standard' luggage side. Thank you, JetStar, for being reasonable!

Friday 21 October 2011

Introduction

One of the challenges of analysing data from the Murchison Widefield Array is correcting for the effect of the primary beam -- the telescope's inbuilt response to the sky -- on the astronomical signal. To do this, we need to know that response down to a high accuracy, in both polarisations to which the array is sensitive. Simulations go some way toward modelling the beam, but effects such as cross-coupling between the dipoles are complicated and non-linear. Efforts have previously been made to measure the beam using astronomical sources and satellite passes, but as neither of these kinds of source are well-characterised themselves, it is difficult to extract the beam from the data.

A simple solution to this inverse problem is to use a well-characterised source, with a known frequency and a known beam, placed at a known position. We then find the issue that the far-field of the MWA starts at 20m height over the instrument - so how do we place a radio-frequency source at at least that height?

Fortunately, over the last two years, there has been a huge leap forward in the development of miniature unmanned aerial vehicles, capable of flying and hovering up to a kilometer high. The largest, the Octocopter, can carry payloads of up to 1kg, and fly for half an hour at a time. After a feasability study, the Octocopter was purchased. This blog forms a record of flight-testing and eventually the tile measurement project.