Jack Crossfire's blog View Details
Posted by Jack Crossfire | Apr 19, 2007 @ 12:22 PM | 5,150 Views
So got the onboard Kalman up to 10hz. The mag is the limiting factor. The mag is so slow, it's now the trigger for Kalman processing instead of a timer. The Gumstix seems to have plenty of horsepower, but we have the Kalman in a separate thread anyway, to make sure a freak floating point stall doesn't lock up Vicacopter.

Very small floating point numbers have stalled x86 and PA RISC processors in the past. Using threads in avionics is a whole new world of risk, but for a very long, complicated math sequence, easier to debug than event loops.

Also have more of Vicacopter simulated on the PC by delivering sensor values in the order they would have arrived on the actual airframe and using fake timer values. The PC simulation seems to give the same results as the Gumstix.

Using a slow floating point division wrapper to avoid any chance that a NaN could kill the flight.

Kalman doesn't seem to use the gyro data at all, relying entirely on accel data. That's why it can't see yaw. Theoretically all the answers about which axis with which sign to plug in where are in a book from the 1970's.
Posted by Jack Crossfire | Apr 16, 2007 @ 01:22 AM | 5,985 Views
So the ideal PID equation contains a proportional feedback term, integral feedback term, and derivative feedback term. The derivative provides lead compensation. autopilot.sourceforge.net has only proportional feedback enabled.

Gave up on automatic calibration for the moment. Using hard coded constants, the Kalman now generates something. After reading through more literature, was satisfied again that the Kalman is required. Also discovered the output of our implementation is just attitude. Based on the output from Vicacopter, it's absolute attitude.

In chasing floating point bugs, it seems with the Gumstix you can't just download the SDK and compile programs in it while running them on the stock installation. You have to reflash the entire installation with the SDK filesystem image. Seems the C library and compiler point releases have to match for floating point to work.

Weekends continue to be difficult. No contact with R.H.II for over 48 hours. Dread the day She is no longer around a computer and no longer has any free time during weekdays.
Posted by Jack Crossfire | Apr 15, 2007 @ 01:53 AM | 5,554 Views
Put a good 4 hours into chasing the PIC flash erase problems. The Dean connector used to power on Vicacopter has more transients than normal. It arcs. It bounces. It sends a lot of current into the LS7805. This causes the PIC to enter unknown states.

Delaying MCLR a few seconds has no effect with a full bootloader. Without a bootloader, we have more stable flash. Clearly an issue with Vdd. Next will be a 5.1V Xena diode to protect Vdd.

Also wrestled with alternative names and decals for Vicacopter. Apparently the k in Russian names is a hated government decision so we don't use k. Still need to see our nectar of life floating in the air. None of the names have the power of Copters***a.

Finally, looks like the Kalman filter is dead. Going to go back to synthetic gyro with a full PID loop.
Posted by Jack Crossfire | Apr 14, 2007 @ 02:08 PM | 5,246 Views
So another dancing campaign with R.H.II. Realized if you want the required energy, you have to think about R.H.II, but was afraid to do so the first time because She might find out. This time, had enough courage and the energy came.

This time R.H.II put up with us more so Jack was slightly more on track. Was truly soaring. Through Her, had a vicarious absence of need, separation, or pain at the moment, but realization that on Saturday She wouldn't be there and it would be purgatory.

It's remarkable someone who appeared so beautiful and impossible the first time you saw Her could eventually become so important.
Posted by Jack Crossfire | Apr 13, 2007 @ 01:33 PM | 5,384 Views
Whew. So R.H.II found out about Copter----a and Copter----a is a bad word. Haven't seen so much anger since Hillary Clinton on July 4. Nothing to do but print new decals, dump the domain name, dump the sourceforge project, stare at the ceiling, try to put the pieces back together, and try some other names. That's a lot of files to edit.

Wonder if Cinelerra would have had the same result if Hardware Heroine found out.

They say the world didn't marry Jack Crossfire so it could marry Scott Peterson instead.

Managed to reproduce the PIC flash erase by repeatedly plugging and unplugging U.S.S. Victoria's battery. Definitely not a static issue. Some transient on startup is erasing it. Maybe the LS7805 can't handle the high current of a LIPO so it briefly spikes to 11V before settling at 5V.

The LS7805 is also used on the trapezoidian equatorial mount and it never has flash erases, but it's also used NiMH. The trapezoid is definitely going to use LIPO in the future.

So yet another software debug to record sensor data and now we have good accel + gyro + mag readings but awful GPS readings. Cleaned more flux from the gyro pins and all 3 bounced right into the middle range. Those IDG300's have really low output current.

Also, Vica had significant radio dropouts on this flight, according to the radio graph. Need an alternative to the GWS breakout connector.

GPS was a fiasco. It took 136 seconds for it to initialize and it only got 3 satellites. It may have been damaged in yesterday's crash.

Rerouted the autopilot enable switch away from the antenna and that stopped the anomolies there, for now.

Things don't look good for Mr. Kalman. The Kalman probably has a bug, it's really complicated, and there are lots of failure points. Results from the synthetic gyro experiment show you can get pretty good data from raw sensors. Just need functioning leed compensation and a way to maintain the center point.
Posted by Jack Crossfire | Apr 12, 2007 @ 12:53 AM | 4,966 Views
So today Coptershyna became Coptercrashyna for the first time. Engaged the flight recording loop when 20ft away and ascending. Immediately lost radio contact.

She just kept ascending no matter what we did to the throttle. Then realized the radio was dead. She headed over the trees. Then heard the throttle start falling. Failure mode engaged as programmed.

Fought desperately as $600 of avionics descended into the trees but clearly there was no point. She managed to get blown 5ft away from the trees and hit the deck sideways before throttle cutoff. Her main spur gear was chewed up and servo headers were bent but the expensive stuff was shielded by heroine decorated balsa.

Flew 2.5 hours on Coptershyna firmware without a problem. The flight recording ended after 3 seconds, exactly as it's supposed to in a radio failure at time 0. Nothing could have crashed because the flight recording wouldn't have been saved and the throttle would have been cut instantly.

Only continued problems with the GWS breakout connector can explain the failure.

Also, the current PIC is losing its bootloader after every campaign.

Coptershyna has a lot of gremlins, but at least we finally got useful accelerometer data. It was a successful failure.

There was a real good reason for not announcing coptershyna.com but we can't remember it, so here U go. Go get some source code for Coptershyna on coptershyna.com.
Posted by Jack Crossfire | Apr 11, 2007 @ 11:15 AM | 4,819 Views
One of the floating A/D converter pins was dead on Coptershyna's 2nd PIC. Her first PIC had no good A/D converters. The only explanation is that she's seeing extreme static discharge. Maybe airflow across the flight surfaces is building up energy and it's getting channeled through the avionics.

At least now we have data from the ADXL330.

Was forced by a certain event to tell R.H.II a lot more, a lot faster than intended. Think R.H.II handled the fallinlovement discovery pretty well. Americans just chop your head off.
Posted by Jack Crossfire | Apr 10, 2007 @ 01:06 PM | 3,503 Views
Got some pictures of Utah 4 U. Saw an amazing company that is doing amazing things with UAV's out there....Continue Reading
Posted by Jack Crossfire | Apr 07, 2007 @ 05:05 AM | 3,434 Views
That says it all. Jack is not on track. Cut him into bits and pieces and use him as fertilizer. The Starlite dance club, a name that will live in infamy.
Posted by Jack Crossfire | Apr 06, 2007 @ 12:14 AM | 3,875 Views
So took Coptershyna's LIS3LV02DQ out of its foam rubber, cleaned more flux from the digital leads, insulated it from the foam with more electrical tape, and started getting nominal accel readings, at least in the dumpy apartment, hand held.

In flight, once again, the LIS3LV02DQ showed the same problems. For the Y axis, a constant value with occasional spikes. For the X axis, wildly deviating values with no correlation. For the Z axis, a constant value with lots of noise and no correlation.

Already pumped out the $40 for a tried and true ADXL330 but that puts Coptershyna out of flight status for a week. Progress on Coptershyna is critical in the emotional support game.

Have allocated an unprecidented new chunk of money into RH2 operations to try to make up the deficit but it's painful no matter what.

It feels like when we had a kidney stone. The lesson was so painful, anesthetic didn't work. Drank tons of water forever after, anything to avoid a repeat.

Now we've got RH2 service pack 8 programmed in. The technology is like the anesthetic, partially effective but not completely. Anything beats the pain.
Posted by Jack Crossfire | Apr 05, 2007 @ 10:52 AM | 3,833 Views
For today's test flight, recorded only translation movements in 20mph wind. It's a bad time for Coptershyna.

Getting nothing on the filter output and the Y axis accelerometer that was previously abnormally biased low is now stuck on -8313 unless you exert the greatest force. Guess they can't run on 5V. Looks like an issue with the accel's internal filtering

The magnetometer anomoly is still stable.

At this point, it looks like $40 is going to the eternally out of stock sparkfun.

Coptershyna wrote:
> YOU HAVE CHOSE A WRONG ACCELEROMETER AT THE WRONG [email protected]$#[email protected][email protected]#@$#[email protected]$#

Instant messaging works pretty well on the emotional support issue, but who knows how long it'll last. You sort of have constant emotional support. Can't say the word Coptershyna, love, or get over the 1/10 intensity rule which sux. Live by the 1/10 intensity rule. Only 1/10 your actual intensity leaves your head but it feels like 1/100.

Not sure when she figured out what was happening but the payback was hades. Going to pick up the pieces for a long time after that one.
Posted by Jack Crossfire | Apr 04, 2007 @ 12:52 AM | 3,930 Views
So here is Coptershyna's AHRS output for a complete 6m32s flight, with all 10 sensors sensing and Kalman filter filtering. This flight was the radio test flight from 4/2/07. The error constants were Hudson/Kahn's. Plotted the 3 values that they derived the servo feedback from.

She's currently deriving the center point and scale factors for the sensors from a reference flight recording. The reference flight recording is actually Coptershyna held in 4 hovering and 2 stationary positions concatenated. Seems the magnetometer isn't locking her to an absolute reference as hoped.

Coptershyna's X-axis magnetometer has serious gain impairment, but since it isn't responding to fiddling and the gain is constant, we're not going to fix it. The mag is so incredibly sensitive, probably going to need a degausser for it.
Posted by Jack Crossfire | Apr 03, 2007 @ 01:03 AM | 3,273 Views
So the autopilot enable switch is glitching often. That causes it to make large numbers of very short recordings. The previous algorithm overwrote recordings with the glitched recordings. Since the latest algorithm never overwrites recordings, it won't be a problem until the autopilot switch is used for its intended purpose.

In the quest to prevent Coptershyna from becoming Coptercrashyna, we now record the radio packet rate and look for sudden drops.

Was amazed to see the radio bandwidth staying consistently above 4400 bits/sec, regardless of altitude or range. The servos get over 50 updates/sec. In 3 instances, there's evidence of a signal loss causing a servo freeze. Evidence is pointing to the Gumstix not being very good at realtime processing, something we see on Linux all the time.

A 6 minute flight produced 1.7MB of data and she only has 4MB of flash, so 15 minutes is the flight recording limit. Bzip2 could get that up to 30 minutes.

No crashes so far with the $600 avionics package, but it's only a matter of time.
Posted by Jack Crossfire | Apr 02, 2007 @ 11:19 AM | 3,449 Views
It takes 15 minutes to walk from dumpy apartment to the daytime flying area. Had 20mph gusts, a calm day for Rain Ramon and the reason we don't normally fly during the day. Just needed to see the Coptershyna logo in daylight and measure flight times. Lots of sideways hovering.

Coptershyna stays in the air 18 minutes on the 4Ah and 17 min on the 3.3Ah with LEDs and all electronics on. So far the PIC is stable. Mistakenly thought her PIC was lost again and wasted 30 minutes to find out her motherboard was unplugged.

Stopped bothering with blade tracking because it's real sloppy on the Corona, but her blade tracking is pretty awful. Once again failed to get a first recording. Looks like a strange behavior of JFFS2.

Magnetometer results for the 4 cardinal coordinates, in flight:

Nose facing North: 179 1546 -1950
Nose facing East: -360 348 -1854
Nose facing South: -143 -1879 -1882
Nose facing West: 411 -766 -1941
Rotor facing North: -2 3408 1069
Rotor facing South: 75 3247 -880

Earth's magnetic field is alive and well, but column 0 has marginal results. There is no documentation on the mag signs.

Lost cinelerra.com to cybersquatters but that won't happen with Coptershyna. $10 gone.

Coptershyna improved spirits on the flight deck, for the moment. You can estimate how long you to have to fall in love with R.H. II from a historical average.

Bencivenni: 2 years
Softmore Sanders: 3 years
Softmore Franck: 6 months
Ego Monger: 1 year
Egbert: 1 year
Russian Heroine I: 1 year
Hardware Heroine: 6 months
Russian Heroine II: (2 + 3 + .5 + 1 + 1 + 1 + .5) / 7 = 1.29 years
Posted by Jack Crossfire | Apr 01, 2007 @ 12:02 PM | 3,417 Views
Reviewing the autopilot.sourceforge.net PID loop, it doesn't look like it should work at all. They didn't integrate attitude error. There's no lead compensation. They just react to instantaneous error directly.

So after 8 hours of heartbreak, blade terrorism, and dead batteries, synthetic tail gyro on Coptershyna proved a monster problem. It puts you in your place to not be able to solve a problem Chinese solve for $35.

The best algorithm used a quadratic equation to compute the servo feedback for an integrated yaw error, at a rate of at least 20Hz. That kept the oscillation under 15' and could actually be flown. At a rate of 10Hz, the oscillation grew to 90' and was unflyable.

A linear equation caused exponentially growing oscillation. An instantaneous yaw error instead of an integrated yaw error caused stubborn pirouetting.

Also found we can't depend on a valid radio signal to generate servo commands. Previously the the Gumstix didn't generate servo commands if there was no radio signal. With a synthetic tail gyro, that caused frequent, uncontrollable yaw.

Now the Gumstix writes servo inputs continuously and the PIC tests the radio valid bit in addition to Gumstix operation before driving the throttle.

Unfortunately, we did pay $35 for a GWS, time is being lost on the data acquisition flight, he Kalman filter may eventually have a solution, and we're desperate to see Coptershyna's short mane in the air, so synthetic gyro is going away and...Continue Reading
Posted by Jack Crossfire | Mar 31, 2007 @ 01:04 AM | 4,968 Views
As the Rachmaninoff blared, Coptershyna did not record any flight data. Also, the PIC lost its bootloader firmware twice now. Only static discharge remains an option.

Turns out Coptershyna was writing flight recordings to / instead of /root. Time to fly the Russian beast.

For synthetic tail gyro flight #1 we had exponentially increasing yaw oscillation. Need some kind of damping for the tail gyro, a dreaded PID loop. Russian Heroine II would know what to do.

Gaining confidence in the throttle algorithm, picking her up by the rotor, fully armed. Don't try this at home.
Posted by Jack Crossfire | Mar 30, 2007 @ 02:15 AM | 5,412 Views
The biggest problem affecting Coptershyna is the inability to stick things to balsa. We have really flimsy tape bonds between sensors and PC board, GPS and electronics table. Can't use aluminum because it's expensive and heavy. Carbon fiber is even more expensive.

The last component, the GWS gyro, requires attachment to balsa. Routing long wires from its station on the fuselage to the computer would be heavy. Drilling more holes on the electronics table would weaken it. Most likely going to need a rate gyro implementation on the Gumstix, a very risky path.

Really wanted no modulation of the flight controls unless the autopilot was enabled, but a synthetic rate gyro is required to fly it manually.

So if we record flight data on the flash in flight, it's likely to occasionally freeze up the kernel on a write, a lethal condition. Minidisc isn't fast enough to record it over wireless. All roads lead to recording to RAM and flushing RAM buffers after transmitter shutoff. Unfortunately it means only 1 recording per flight.

After a major firmware update, when the rotor is locked & loaded, and you plug in the main ESC power for the first time, your future on this planet, every experience you ever had, every limb you ever had, is in Coptershyna's hands.

No problem with the throttle this time, fortunately.

Quite a relief, after weeks of that malfunctioning GWS, to have Coptershyna back in charge of the RF, but the GWS is still malfunctioning, causing...Continue Reading