Saturday, December 19, 2009

Frustrations in the Eleventh Hour

Well it's been a frustrating past couple of days. After a few multi-hour sessions of tinkering, I haven't made as much progress as I would have liked, but things are moving, ideas are still flowing.


Testing Against a Non-Linear Simulation

I've been focusing on designing a non-linear simulation model to test the controller from earlier this week. I was having trouble finding a way to pass the θ value back into the non-linear simulation to be re-evaluated. I tried directly wiring it, using a contortion of summations blocks, and building the entire non-linear simulation function in Simulink to pick out the value. It wasn't until a little earlier that I found the memory block which would do exactly what I wanted. I later opted that out for the unit delay block to do the same thing. I was finally able to complete the following which I believe should accurately test the control against the non-linear simulation.



In hindsight, using a unit delay block makes sense. Even though this exercise was not directly driving improvements to the project, it has greatly strengthened my skills with Matlab and Simulink. Before ECSE 4440, I had barely used this tool, even in my signals and systems class in undergrad. There were no projects or labs that used it. But my recent experiences have been my first major foray with the utilities and a lot has been learned.

That aside, I'm still wary of this model's behavior. Is there a better way of putting this together?

Assuming that this model is correct, the following are the responses to the same configuration as in my last post, with an initial angle offset of 5 and using arbitrary poles at 1+i and 1-i. The following plots are of the viewer locations marked at y (upper) and u (lower), where y is the angle (solid line) and angle delta (dashed line), and u is the acceleration of the base.





Something isn't right. The system eventually settles, but with some very odd behavior before hand. Possible sources of error include a faulty model, poles set to odd locations, or a controller design that can't completely handle the non-linear simulation. What does the above sort of response most likely suggest?

Also, just as a bit of eye candy (if you could call it that) and proof of the work I've put in, here's the model that breaks down the non-linear simulation function mapping acceleration to angle delta and the control. Note that this diagram is not complete. There are the beginnings of noise on the input, and the angle delta doesn't alter the current state of the angle. However, from what I found above, the state of the angle should be trivial to add with the unit delay block.




Identifying Reasonable Poles

Although the non-linear simulation work has taken most of my time, I've still managed to do a little work on identifying reasonable poles for the system. Below is the derivation which leads to the characteristic polynomial of the system. I should be able to compare this with it's canonical second-order representation to select poles for a reasonable rise time, overshoot, and settling time.



I haven't found a reasonable way to post my Matlab / Simulink files within this blog, so for the time being they remain unavailable from the web.

No comments: