HobbyKing.com New Products Flash Sale
Jack Crossfire's blog
Archive for October, 2008
Posted by Jack Crossfire | Oct 31, 2008 @ 04:10 PM | 2,937 Views
Paypal came through & managed to suck our last paycheck into China, so forget about the VicaGlider budget & get ready 4 VicaCopter III.

Now an embedded update.

Phone fans don't like talking about the CPUs in their corporate branded trophies because they're so damn slow. That's why it was really hard to find this out.

iPhone 3G: 412Mhz ARM CPU No FPU.
gPhone: 528Mhz ARM CPU No FPU.

The 600Mhz Gumstix boards we used R being phased out & replaced by new green themed boards running at, wait for it, 600Mhz! "NEON" FPU.

While advertised as dual core, the gPhone CPU is really a 1.5 core & the half core is for communication.

http://www.semiconductor.com/resourc...sinumber=20278

gPhone is written in Java. iPhone is written in C. The gPhone GUI is less responsive. Corporations don't pass higher clockspeeds to users. They use the clockspeeds to write cheaper software.

So unless you're into programming DSP's & FPGA's, the embedded floating point hasn't gone anywhere.
Posted by Jack Crossfire | Oct 30, 2008 @ 04:03 PM | 3,166 Views
Well, $12 motors R a bit too good 2 B true. U need to pay $30 shipping from China to have them in your lifetime. That is, if U can get your credit card to fund Paypal. Anything beats calling the Bangalore call center & waiting on hold for an hour to unblock Paypal. So unless you're crazy, the motors R $50.

Then of course, there's VicaGlider. Since the quadrotor requires parts that only exist in China, we expect major down times. We've got major mortgage bailout taxes coming up. Because of the difficulty in getting money to China, the overlapping quadrotor & VicaGlider purchases could take 2 months to finish, making the overlapping purchases more like 1 purchase each month.
Posted by Jack Crossfire | Oct 28, 2008 @ 11:30 PM | 3,679 Views
Well, the revelation about $12 motors changes everything.

It's time to put the T-Rex down. The starboard servo is repeatedly failing 4 a reason & that is either a damaged BEC or extreme sensitivity of the HS-65 servos to stalling.

The hope was to get a full life out of all 4 servos until burn out, but a replacement servo & BEC is 1/2 the cost of a complete quad rotor.

All crashes with the T-Rex were servo wear, radio failure, & tail belt failure. Quad rotors should never wear out since they have no brush motors. Assume U can control the radio failures & U have no reason to expect the quad to crash in normal operations.

Brushless motors + ESC's: $22 * 4
2 pusher props: $8
2 puller props: $2
Carbon fiber rods: $20
--------------------------------------
Total: $120

The economics don't support articulated rotors anymore. Our recently federally funded bank's credit card seems to have reset for November.

Now some secrets of lwneuralnet. It might be hackable to support backpropagation through time.



net_begin_batch

// solve network forward in time
net_compute

// compute error gradient for network backward in time
net_compute_output_error

// Need to get the derivatives from the inputs of one net_train_batch to
// the outputs of another net_train_batch.

// Set derivatives
net_train_batch

// Adjust weights based on average error gradient for all time
net_end_batch
Posted by Jack Crossfire | Oct 27, 2008 @ 10:12 PM | 6,570 Views
The latest starboard cyclic servo failed after 5 minutes. It was the aft cyclic servo which we gimbal locked & overheated earlier. http://www.rcgroups.com/forums/showthread.php?t=906358 There's also a theory that the CC-BEC was damaged in a crash & is burning out the servos 1 by 1.

Well, the T-Rex 450 has been so problematic, plans R already being drawn up for yet another airframe in 2009. That would be 3 airframes consumed in operating 1 UAV. Still more efficient than mortgage stimulus packages, as hard as it is 4 a certain country to believe.

The next airframe would be a quadroter. That's right. Except for the motors, quadroters can be built out of cheaper parts. Quadroters R perceived to be safer. Quadroters have more space for electronics. The main concerns R flight time & damage to expensive motors instead of cheap landing gear. There would be head on crashes into motors, bent casings, bent shafts, broken props, & bank failures.

With all these crashes, now would be a good time 4 U 2 view the Nevada test site....Continue Reading
Posted by Jack Crossfire | Oct 26, 2008 @ 08:04 PM | 3,274 Views
Well, it's cheaper than Taiwan. It shouldn't roll over as easily as Taiwan. Not sure how increased vibration is going to affect the connections. No plans for a camera.
Posted by Jack Crossfire | Oct 26, 2008 @ 01:24 AM | 3,380 Views
Step #1: Get rid of dependance on Taiwan slaves for landing gear.

Step #2: Reduce size of electronics tray to reduce turbulance.

Now some other ideas.

Neural network preprocessor: instead of using for loops & dynamic arrays like the current libraries, generate unrolled SIMD assembly language routines for networks defined at compile time.

Backpropagation through time: not as sexy as evolution & hard to
implement.

There is source code for backpropagation through time. It's all from 1993 & can't compile on modern systems.
Posted by Jack Crossfire | Oct 25, 2008 @ 06:04 PM | 3,008 Views
Finally wrote a way to animate flight recordings on THE GOOG.

Neural vs. PID feedback (0 min 41 sec)


That was PID vs neural feedback. Amazing how choppy even 4Hz GPS is. It doesn't matter if U try to smooth it with velocity. It's a small space & GPS only goes to 1m.

Since we're capturing Goog screens, have some thrilling moments in Goog Flight Simulator.

...Continue Reading
Posted by Jack Crossfire | Oct 24, 2008 @ 07:00 PM | 2,824 Views
Probably going to budget based on flights instead of repairs. That is, finish repairs right after the crashes but don't fly until the next credit card reset. That should keep the rent storing repaired copters instead of smashed copters.

In other news, finally watched Lockheed heroine's complete speech & what a bore. Some aerospace majors younger than U have the most boring jobs in the world. The most boring job in the world is your boss, but all this reminds U of the 2nd most boring job in the world, teaching American history.

Holy mother of sleeping pills that was boring & the reason it was boring was because while European governments excercised total power & elevated leaders to God status, your government could only trade bonds, pay interest, ask permission, & be extremely boring. Fortunately those days R over.

Bring on the Uba buba of buma, the holiest & most godlike leader humans have exulted in over 100 years. Human nature liveth once more. They are once again governeth by God in human form & American history will finally join the human race's action packed legacy of coronations, divine power, & despotic royalty.
Posted by Jack Crossfire | Oct 23, 2008 @ 02:21 PM | 3,141 Views
Repacked the IMU & got more stable autopilot using PID mode. Static neural mode was also more stable, but not as much as PID mode.

Noted frequent glitches in auto & manual mode. It could only be defective wiring to the servos, a BEC malfunction, or a PIC malfunction. While landing in manual mode, went into flat spin. Rudder was hard over after crash, showing software stabilization may have been compensating or may have byte wrapped around....Continue Reading
Posted by Jack Crossfire | Oct 22, 2008 @ 07:31 PM | 2,760 Views
What U can gleam from the GATech paper is that the neural network does not directly control the copter. It's added to the output of a reference model + the output of PD equations to produce pseudo control vectors. The pseudo controls are next reduced into even simpler controls by an inverted approximate model.

The use of a reference model is a technique called Model Reference Adaptive Control. Through some voodoo math, the output of the reference model helps tune the PD output. The neural network contribution is next applied to cancel flaws in the inverted approximate model.

outer loop
------------------
commanded velocity -> PD outputs + reference model corrections - NN corrections -> commanded acceleration (pseudo control)

commanded acceleration -> approximate inversion -> commanded attitude + angular rates

inner loop
-----------------
commanded attitude + angular rates -> PD outputs + reference model corrections - NN corrections -> commanded angular acceleration (pseudo control)

commanded angular acceleration -> approximate inversion -> servo commands

That's the heart of adaptiveflight.com's product. Hardly the biologically inspired system U envisioned.

Research seems to have peaked with this paper. His focus has gone more sideways rather than building on top of the adaptive paper. Using video instead of IMU input. Using hypersonic vehicles instead of copters.
Posted by Jack Crossfire | Oct 22, 2008 @ 02:48 AM | 3,103 Views
Looks like India is the aerospace champion today. Looks like we have another round of IMU alignment to do. PID equations did no better than the static neural networks. Lots of underdamped oscillation. Nasty rate damping oscillations on landing.

In other news, the video of the Lockheed head of spacecraft survivability & engineering at http://www.flightglobal.com/blogs/hy...orce.html#more drove home the point & the point is this. Knowing that the smart people in college would become accomplished spacecraft designers at Lockheed by the same age U were a flat broke, low paid programmer would have made no difference.

U still would have goofed off & daydreamed, & become a flat broke, low paid programmer.
Posted by Jack Crossfire | Oct 21, 2008 @ 02:13 AM | 3,209 Views
Looks like the inflight training problem is getting bigger & bigger. Most people probably ramp up the gains in flight, compare a small period of tracking with recorded movement, & ramp up the gains some more, until the guidance is within a certain target. Good enough for a fixed wing.

The mane problem is we're controlling angular rates, not the absolute angles the controller reads in. Humans go from seeing absolute angles to commanding angular rates, based on already knowing how fast they can turn the servos without losing control. Natural frequencies as it were.

Our feedforward impared computer may just have to focus on angular rate feedback & ramping up different natural frequencies for the angular rates until it gets ideal tracking.

Finally found that paper on the neural network in GA Tech's copter. Eric N. Johnson and Suresh K. Kannan "Adaptive Flight Control for an Autonomous Unmanned Helicopter" Lots of crazy symbols. The author's resume looks like the aeronautics program of a small country & he's just an assistant professor. At least he's overweight. He got an MS from MIT. The top software architect of Sony's BluRay player also got an MS from MIT. Might also be a few heads of state in there.

Full professors at GA Tech R indeed a real small club, each of whom probably accounts for 1/5th of the current human knowledge of control systems. Maybe there's a way in from the private sector. Maybe not.

The "NN" seems to be substituting for the integral in a PID equation. He calls integral terms the "trim" & has the remaining feedback as just "PD". The neural network accepts detected position, velocity, linear acceleration, attitude, angular velocity, & angular acceleration. It outputs some kind of offset to convert the output from conventional PD equations to nonlinear output.

Our first use of NN's was assisting the navigation estimate. That seems 2 B what the GA Tech NN is doing.
Posted by Jack Crossfire | Oct 18, 2008 @ 08:33 PM | 3,479 Views
Well, did our mandatory test flight with 100% neural control but no adaptation. The networks were trained for linear feedback.

Attitude control was definitely underpowered & underclamped. Forgot what we were doing with the throttle & may have had throttle on a low value for stable air. No surprises.

Was just about to revert to PID equations for comparison when the nose dove. Starboard cyclic servo failed after under an hour. Definitely an act of Chinese terrorism.

Also, the MaxAmps 3.3Ah did puff slightly after flight & recede after it cooled off. What we're seeing may be a natural event most people live with. As for the servo budget, not flying again until an adaptation algorithm is in place.
Posted by Jack Crossfire | Oct 18, 2008 @ 01:58 AM | 2,862 Views
The delusions of being able to fix the shutter quickly vanished as we dug deeper into the 20D. Then the delusions of being able to reuse the sensor vanished when we saw the number of pins & that they were extremely fine pitch ribbon cabled.

As for reusing the hot shoe & lens mount on their own, the electrical contacts are integral parts of the plastic body. Would have to grind the body up & that still wouldn't give up the lens protocol or provide the plug for a flash extension cord. The lens mount is also for a 62% sized sensor.

U laugh at that dinky sensor nowadays & the sacrifice in coverage once required to get digital pictures out of 35mm lenses. Most people still buy those 62% sized sensors.

Going to miss the 20D. Have a lot of fond memories of it. It recorded a lot of great moments in history, an elegant camera for a more civilized age....Continue Reading
Posted by Jack Crossfire | Oct 17, 2008 @ 02:54 AM | 2,771 Views
After mandatory procrastinating, decided to put down the recurrent neural network & use less sexy feedforward neural networks. There will B neural networks 4 proportional & rate feedback & linear equations for very small integral feedback. Add the neural & integral output to get total feedback. The neural networks are modeled after a PID equation initially & use backpropagation to adapt in flight.

The weeks of recurrent neural networks were necessary to know they couldn't be done. Got all the way to a recurrent network which could give proportional feedback on a graph, was stable in real life, & showed some memory in real life, but could not offer effective proportional feedback in real life.

Getting the integral part to work seems too need a much longer training pattern than we can afford. The amount of computing time & hand tweeking to get evolution out of it wasn't justified. The implementation is on the hard drive for when a CUDA budget appears.
Posted by Jack Crossfire | Oct 16, 2008 @ 02:01 AM | 2,784 Views
Discovered X-Y charts in OpenOffice were broken & the error of the neural network should be a euclidean distance instead of an absolute difference. That, along with more evolution tweeks, less neurons, & more processing time & the genetic algorithm is staying alive.

With the evolved neural networks, there is an optimum neuron count which is not too high & not too low & an optimum range for the starting weights. The chance of hitting a dead end with this algorithm is too high to build extra capacity into the structure.



Tomorrow's news today:

CNN: Ubama wins election

Fox: Ubama's 3rd nephiew's friend's cat's sister attacks hiker with hair ball.

CNN: President Ubama awards a free SUV to every home ower over $1 million underwater.

CNN: Ubama...

Fox: Hugo Chavez accuses Ubama of being too liberal & cuts off oil.

CNN: Treasury secretary Cramer pumps another $700 trillion into bank stocks.

Doomberg: Investors pull $700 trillion out of bank stocks & buy treasury notes.

Fox: Humans lose ability to walk without stepping on their own ****s.

CNN: Ubama promises bailout.

Fox: Ubama bans teaching evolution that requires carefully calibrated starting weights & neuron counts.
Posted by Jack Crossfire | Oct 15, 2008 @ 12:51 AM | 2,968 Views
Discovered rand() is not thread compatible. U need to use rand_r(&seed) for threads. rand() was sucking huge amounts of CPU time updating a global variable. rand_r keeps the CPUs in their own memory spaces & is much faster.

Well, after many hours & a lot of electricity, concluded evolved neural networks seem to require inhuman amounts of computing power to be effective. Maybe our genetic algorithm isn't the best. It just randomizes weights. It doesn't do crossovers. Even if they were trained offline using flight recordings every hour that we didn't fly, they probably wouldn't evolve much.

Have some other ideas, all back to backpropagation in flight:

Feedforward network taking an integrated error as one of the inputs.

Feedforward network that generates changes in feedback instead of absolute feedback. Current state & target state would replace current error as the input.

Well PBS is defending the parallel universe theory. Our obsession with infinite universes began when we asked if humans ever succeeded in simulating a human brain on a computer, & the contents of a real human brain were transferred to the computer, would the real human have sensations from the computer?

That led to defining human sensation as a function of the rate of increase in complexity of a localised packet of information. Similar packets of evolving information in different brains & different universes could share sensations like ESP. Our packets of...Continue Reading
Posted by Jack Crossfire | Oct 13, 2008 @ 12:15 AM | 2,572 Views
Good news: got a genetically trained feedforward neural network to control attitude feedback. Took very carefully designed training data with no clipped regions. Not sure large populations add anything.

The recurrent network is still a disaster....Continue Reading
Posted by Jack Crossfire | Oct 11, 2008 @ 12:38 PM | 2,810 Views
The genetic algorithm has been a disaster. So far, been using 1 member of the population as the seed for the next population. Very cache efficient & fast, but can lead to entire worthless populations. Also been feeding random inputs to it for the training set. This hasn't worked at all.

The algorithms that work use constant sets of training data & large populations as the seed for the next populations. No cache usage. Faster training since the random number generator is slow. Would have to test each population member on the entire training set.