Debugging Code in Zero Gravity: Illinois Students Participate in NASA Microgravity Program

10/23/2013 By Lawrence Angrave, CS @ ILLINOIS

Five U of I students got to perform an experiment in zero gravity at the Johnson Space Center.

Written by By Lawrence Angrave, CS @ ILLINOIS

June 2013. At 30,000 feet over the gulf of New Mexico, the plane, a heavily customized Boeing 727, changes quickly from a body crunching 2-g climb, where everything is twice as heavy, to free-fall. Your stomach lurches as you float away from the floor. 0 g. For a few seconds the plane will still be gaining altitude, but it's now accelerating towards Earth with you inside. Inside the plane, you instinctively yelp with excitement--you're weightless and floating in the air. An unbelievable, out-of-this world sensation.

Moon Goons team (from left): Ehsan Keramat, Sam Liu, Alejandro Gomez, Sunny Gautam, and Danylo Hirnyj
Moon Goons team (from left): Ehsan Keramat, Sam Liu, Alejandro Gomez, Sunny Gautam, and Danylo Hirnyj

"You don't get tired of microgravity–it's just really cool every time," says engineering physics major Dan Hirnyj, team leader of the Moon Goons. The journey to this point has been an intense experience for the University of Illinois students, Alejandro Gomez, Danylo Hirnyj, Ehsan Keramat, Linas Sulas, Sam Liu, and Sunny Gautam. Each year NASA receives over 70 proposals for the Reduced Gravity program and invites around 15 of the best proposals to Houston's Johnson Space Center and to fly at Ellington field. In the previous year, the Moon Goons team did not make the shortlist, but with perseverance they rewrote the proposal, strengthened their school outreach plans, and created a winning entry. Their hard work also brought them a prize – one of the winners of best undergraduate research at Illinois's Engineering Open House – and a week at NASA's base at Houston to learn about space, safe "0g" flying, and to prepare and then fly their quadrocopter experiment.

The first of two 0-g flight day, Thursday, includes team members Dan, Alejandro, Sunny, and myself, Lawrence Angrave, the photo-journalist for the team. The team is nervous and excited. It's the maiden 0-g voyage of the quadrocopter or “drone” experiment, and we're not sure how it will perform. But we're in great hands. NASA has been very careful to ensure our safety: 0-g flight requires all tools, bolts, and loose items be accounted for, and the experiment be strongly secured. Before the flight we've also taken anti-motion sickness medication and are reminded that avoiding neck movements and staying still during the 2-g pull-up phases will help avoid motion sickness.

"Feet down," warns the NASA flyer before Alejandro even makes it to the laptop to start the experiment. The plane pulls out of its dive and we drop hard on the floor. For the second parabola out of 30, Sunny and Dan are in position, but Alejandro has a surprise waiting for him. His long dreadlocks have caught on some Velcro. On standard Earth gravity,"1 g," he would simply stand and pull his hair lose. But in 0 g, his body floats up and the slight tug on his hair has now rotated him upside-down. Fortunately he is rescued by a nearby NASA engineer who quickly grabs and rotates Alejandro before the 2-g pull up.

Preparing for takeoff and the experiment at the laptop.
Preparing for takeoff and the experiment at the laptop.

By the third parabola, Alejandro has found the foot straps and is at the laptop ready to tell the quadrocopter to fly to the dock. The laptop provides the computational power--it's the brains behind the quadrocopter, translating the real-time camera images transmitted from the quadrocopter into power changes of each of the four motors. Thanks to electrical engineering major Sunny Gautum, it's reliably receiving a wireless video stream of 15 pictures per second from a camera mounted on the side of the quadrocopter. Sunny developed the communication system and also discovered how to work around the drone's inbuilt software that assumed it was operating in Earth's gravity.

The laptop is running a vision algorithm that searches for the red cloth background and quickly makes power adjustments to the four propellers to turn the drone towards the red cloth. "Analyzing images is an active area of Computer Science research," explains computer science major Sam Liu, responsible for the quadrocopter's vision system. "Early on in the design, I used a sliding window detection algorithm but in testing found its performance was too slow to control the quadrocopter. So we simplified the processing required by using a large red cloth and a faster color-moment algorithm. It's fast and sufficient to tell us when the craft has rotated away from the desired docking angle so we can add extra thrust to some of the fans."

The drone inside its cage, with the Illinois logo shown.
The drone inside its cage, with the Illinois logo shown.

The Moon Goon's experiment is inspired by the original lunar landing module, but today they are testing two new docking systems: first using a vision system to control the quadrocopter, and second, using Lorentz-force magnetic braking to slow the machine as it nears the target.

Due to the 30-second duration of each 0-g parabola, the drone's movements were purposely constrained to one linear and one rotational degree of freedom. These constraints are now the cause of the Moon Goon's very own problem at Houston. The fans whirr and pulse but are ineffective against the friction. The drone refuses to fly. Dan and Sunny open up the safety cage, designed by Linas, and attempt to free the quadrocopter while Alejandro debugs and recompiles the code, his long dreadlocks, unshackled from gravity's tug, explore and waft gently in every possible direction. This is first time I've seen Illinois students debug code at 30,000 ft in 0 g. But the quadrocopter is steadfast so the team use the last few parabolas to playfully perform pushups and bunny hops in 2-g and low-g environments.

Thursday night at the Moon Goons Mission HQ (hotel room 208). A last chance to make some final minor tweaks. Ehsan Keramat, an electrical engineering major, has created a simulation model to calculate proportional-integral-derivative feedback values, but without more 0-g testing, friction is still a concern to the team. Realizing that minor tweaks might be insufficient, they rewrite their control software and burn the midnight oil. A torrential thunderstorm rages outside–perhaps tomorrow's flight will be canceled?

Friday 7 a.m. Clear skies–perfect flying conditions for the reduced gravity plane. Back at the airbase the team members carefully follow NASA's strict safety requirements. A missed safety precaution and the entire team could be grounded. Ehsan and Sam zip up their olive green flight suits, take their pre-flight meds. and together with their NASA mentor and robotics engineer Fernando Zumbado, board the plane. The stakes are high. The new software is loaded, but will the quadrocopter fly to home?
With Ehsan and Sam flying, Dan, Sunny. and Alejandro must now wait two hours for news. This last flight represents two years of work. All but Sam are graduating seniors, so this is the last chance they have to be together as a student team. It also represents the Moon Goon's persevering team spirit and their ability to take their Illinois experience out of the classroom and into the sky.

The week at Houston has been more than just the reduced gravity flight. "The Moon Goons learned teamwork and technical skills," explained Jamie Semple, NASA's Program Coordinator for the Reduced Gravity Education Program, "And with NASA's Flight Opportunities Program, they've had access to full-time NASA engineers."

Zero gravity can make any day a bad hair day.
Zero gravity can make any day a bad hair day.

"It's work-life as opposed to college-life," explained Frank Prochaska, program manager. "Safe tool-control and working under an aircraft wing in a hanger is definitely an adjustment for the teams."

As graduating seniors, this is the last university project the Moon Goon members will collaborate on. They are now leaving their student days, and nights, behind them so the triumphant rise of the quadrocopter on the second day is an appropriate finale. With the gravity display decreasing to 0g, the quadrocopter rises, graciously turns on Linas's custom-3D-printed mounts, flies and docks effortlessly on the target.

Two hours later, the entire team is back on the ground, packing up their experiment, handing in the olive green flight suites for the last time and thinking about life beyond college. But this flight week has spectacular and memorable ending. Their NASA mentor, Fernando Zumbado, offers a private tour of his engineering area. Being NASA, this is an entire hangar with space modules used for astronaut training, humanoid space robots, and his very own full-size robotic creations, including an astronaut jet-pack--soon to be tested in the same microgravity plane. Fernando explained how computer scientists and other engineers work side-by-side as they co-develop systems to work in the most demanding environments. "Just . . . unbelievable!" says Sunny as they posed for the picture, standing on Fernando's six-axis off-world exploration vehicle.


Share this story

This story was published October 23, 2013.