Friday, May 14, 2010

All systems functional!

Regarding yesterday's to do list:
  1. Fixed it! I think. I hope. I added a check to prevent spurious signals from being sent to the outputs. I also added clipping to the outputs so that it won't overdrive the servos, even if we have spurious signals. I'm currently outputting only when I get a full set of channel updates, but I should add another check to ensure that a full set of channel updates happens in a timely manner (nominally within 20 ms).
  2. Haven't gotten around to it, despite how easy it would be. Should also edit estimator code to take out magnetometer stuff.
  3. In the process of learning to live without.
  4. Haven't gotten around to it. Plan to machine the box (oh, it's a serious box) over the weekend. Do this in conjunction with designing rev 2 of the helicopter interface board, and send that off to BatchPCB; get the soldermask and silkscreen, the works. I can even label the connectors! HAH.
  5. Increased the UART buffer size and decreased the data reporting rate to 25 Hz. Between the two, it seems to have solved the problem.
So next step is a control system! Woot! I think I can do some system identification by holding the helicopter in my hand (yeah, so much for that 3-D linkage) and giving it some control inputs. I've noticed the pitch/roll gyroscopic coupling (both in flight and holding it in my hand), but the controls are pretty responsive and they feel more like 1/s than 1/s2, so I may be able to ignore it for a simpler controller.

Controller options, in order of increasing complexity:
  1. Straight gain. If the cyclic-to-attitude transfer function really is 1/s, then we have 90 degrees of phase margin already. It's probably more like 1/s(s+a), but as long as we're not too aggressive with bandwidth it should be okay. Don't need system identification, can probably just pick a gain and see how it works. If I want to get fancy, I have a knob, right on the transmitter, that I can tie the gain to and twiddle in real-time.
  2. Lead compensator on each axis, independently. We have the gyro signal, but it's too noisy (for now, at least) to do PD, so it'll have to be a lead compensator. Noise threshold sets the pole location; we can choose the zero and gain to give us the bandwidth and phase margin we want. Might not need sys ID either; zero location can also be a trial-and-error kind of design.
  3. If we do sys ID, we have the hard part over with; might as well go to state-space and LQR. Still remains 1 degree of freedom to twiddle.
Awesome! I'm excited...

No comments:

Post a Comment