Saturday, September 24, 2011

Yeah baby! -> disturbance estimation looking good!

Howdy, ya'll!

It seems like I only blog when I'm back at Ames Research Center, here in the Bay Area.  I had to post something quick 'cause Scott (my cousin) is asleep and I can't tell him right now...  =)  Those of you that know me well, know that I have to get things out of my head and told to someone, partly so that I can stop thinking about it and go to bed, but of course part of it is for your own edificiation.  "Yes," I reply, this does apply to everyone, control theory is general, thus generally applicable.

As a special bonus today, if you read slowly though my monologue and see all the pretty pictures, I will let you see the pictures at the end of some satelite stuff that cousin Scott showed me today.

Right.  Well, here is the state of the union on the helicopter project: I have designed a new, truly high performance controller for the rotor.  This new one uses a more advanced algorithm with an algorithm called receding horizon control or Model Predictive Control (MPC).  Basically, it predicts what the flap will do some steps ahead (15 steps in my case) and then optimizes some "control" commands (5 steps in my case) to make the predicted response as close to what the setpoint reference (my desire) is asking it to do...  In order to do this, it has an internal "sense" of how the model will react to its commands, and then it plans out the next 5 control steps.  When the next control step comes, it does the whole optimization again and plans 5 more control steps ahead. 

When you stop and think about it, this is much like we act every day.  We have a plan of all the wonderful things that we are going to do today and how we will be very efficient with what we want to do.  Then when life actually happens, we have to re-optimize our day as different things come up that make us change our plan.  This controller is just a mathematical version of that.

Example: when you are driving a car, you look forward maybe 50 feet when you are moving slow, right?  you don't plan out what you are going to do and then close your eyes and do it, you watch 50 in front of you, then you drive a little bit and you are still looking 50 feet ahead of you.  This "receding horizon" is the essence of the controller, it optimizes inside a reasonble window of time into the future.


Above is the "natural" response of my system.  This means that when I suddenly tell it to go to the value of 1, this is how it reacts.  My new controller interacts with this natural response and predicts what the system will do, so it can make it settle down quicker.  See below

there are little "steps" in the model output and the command because this is how a computer see the world...  in little steps that are contant between the times that it measure them/changes them.

Anyhow, this new type of controller has the advantage of taking my control bandwidth from something like 15 Hz to now more like 250 Hz.  (not a bad improvement!).  This means that if you ask the little flap to move back and forth 250 times per second, it can and will do what you ask.... fantastic!

The biggest problem at the moment is that while the control bandwdith is great (I only needed to make it to 89 Hz), I still have a low disturbance rejection bandwidth.  disturbance rejection means that when I tell the flap to move to a particular spot and there is something else, external to the assembly that interferes (like aerodynamic forces in my case), how well does the controller deal with that, and at what frequencies will it stop responding.  Up until this point the highest disturbance rejection bandwdith I've been able to achieve was in the 15 Hz neighborhood.  I would really like the controller to be able to get up to 89 Hz disurbance rejection bandwidth to fulfill the purpose that my boss needs it for, so I've been working furiously to try and find a way to accomplish that.

Now, with that context, you can appreciate my accomplishments today (with the Lord's help).  After much research and consideration, I came to the conclusion that much of the problem is seperating what part of the measured position was due to response of the model to my command and what part was due to external disturbances.  This is a tricky thing though, because there is only one position signal that is being measured, so it is combined.  What a wonderful world that we live in that we CAN actually seperate these signals!!  I will not bore you with all the gory math details (unless you ask me of course), but I thought I'd show you some interesting results.  Here is the situation:  I want to control something at 75 Hz.  Meanwhile, some external force is affecting the flap at 120 Hz and then, to really mess things up, gravity is suddenly reduced by 50%, which produces a sudden step in the measured output.  In order to have the flap do as commanded, I have to seperate which parts of what I am measuring come from something that i told it to do (the 75 Hz) and everything else.  Below is a picture of what this would look like.
 So this is the result of my work in the last few days.  The blue is the real thing happening, the red dased line is the system's best guess or estimate about what is going on.  Notice how the guesses are not very good in the beginning but once it locks in, it really a great job!  Now that this portion has been somewhat addressed, I need to figure out what to do with this newly found information in the controller itself (this result is only a small part of the control system; it estimates what is going on that we can't measure directly).  Ideally, the top should be the sum of the bottom two. 

Thanks for hanging with me long enough to get through some cool stuff. 

As promised, here is the super, top-secret satelite pictures that I took when I visited one of the labs that Scott was working in today.  Some of the stuff in this picture is real flight hardware that will be in the final spacecraft.

Monday, July 18, 2011

Objective Successful

I am proud to report that I and the many other people helping me were successful this evening in "closing the loop" of the controller here at Ames.  This means that we can now issue a command to the assembly, say something like, "please oscillate at 35 Hz and at a magnitude of 1 degree."  and it will do so, but you have to say please and ask in a nice voice.  =)

This is a huge step forward for the team in general and for me personally.  This evening marks the first time I have been involved with a closed-loop control project wherein we have gone through the formal experimental and modeling stages and closed-loop control design and had a reasonably high performance controller.  While I didn't get to be involved as much as I would have liked to be in the controller (due to time), I was able to add a modifying controller (an "outer loop") that boosted one of the weaknesses of the inner controller, which was nice to be able to contribute.

One of my mentors, Hossein, and I spent this whole weekend working through the varioius implementation details including safety mechanisms, etc and we finally got the system breathing Sunday evening at about 9pm!  whew!  (the demonstration is taking place at 2pm on Monday...)



This is a funny cartoon kinda showing what closed-loop control is all about, a good reference for those reading this who have no idea what i'm talking about.

Well, I'm gonna hit the hay.  Happy trails partner!

Gavino

Tuesday, July 12, 2011

one more turn in the bay

Hello everyone!

So after 6 months of hard work at ENE and Army/NASA, I still do not have a finished product to show off, but progress is being made.  I am now back at Ames Research Center in the Bay Area spending about a week to demonstrate some control algorithms for the helicopter blade flap that I've been working on.  Pray that it goes well... if it does then we can continue on our project, otherwise, we will have to give up one of the more challenging tests, which would be a shame.

On the ENE front, the Case machine is coming along nicely (the 6-wheel, fully independent suspension pruning machine).  I have almost completely finished detailing the hydraulic system and my colleague Alex is nearly done with the mechanical design.  I'm very excited about that.  My current estimate is that we will be painting in 4 weeks, put on hydraulics in 5 weeks and be done in about 8 weeks, Lord willing.  I'll definitely post some pictures of that bad boy soon.

On a personal note, I'm still a bit socially constricted due to two (too) busy work schedules (sche-duels).  But every once in a while I get to do something fun and blow off some steam.  I had a wonderful afternoon this last sunday, getting to spend time with some friends I haven't seen in a while (just hangin' out and drinkin' smoothies) and then going to soak up some sun by the pool with family and friends... it was great.  very relaxing.

I still haven't found the truck i'm looking for yet.  I hope to find it soon though.  It's funny, I find the right make/model/year/mileage without the extras, or a find all the extras without the year/mileage...  In case someone reading this (by chance) has my truck, here is what i'm looking for:

chevy silverado
crew-cab
2004-newer
less than 100k miles
4" lift
33x12.50 tires
alloy wheels
the longest short bed (I think it is 6.5')
good paint, good body

so if you have such a truck and are in the market to be rid of it, please drop me a note ( gavin.nielsen@gmail.com )

------------------------------------------------

in other news, I'm also looking for a good place to live in the country where I can keep track of a nice big dog...  again, if you have a place, I have some cash!  =)

------------------------------------------------

I guess last on the list is that other thing, which must not be named.  I daren't say it out loud, for fear that its report may be heard.  No, I must keep it secret, I must keep it safe.  LOL.  This is called dramatic bluffing.  as far as this public address goes, I'm done.  I hope to post some pics soon of the goings on here at Ames, but until then, Adieu!  =)

Gavin

Saturday, February 12, 2011

Some poetry from my past

Howdy sports fans!

Today has been a housecleaning/room-cleaning day, and I have had great success!  One benefit to going through things is that you tend to find all sorts of historical treasures (treasures by my measure at least), and today I wanted to share some with ya'll.  I wrote this poem sometime around 1990, so I think I would have been about 10. 

Every Christmas, Thanksgiving and Easter my family makes a massive amount of food.  Do we need all this food?  Probably not, but I guess it is tradition at this point.  Somehow these mountains of food do finally get eaten, sometimes weeks down the road.  LOL.  One of my favorite memories was the competition (when we were younger) to try and steal fudge before dessert time, and this little poem is to that effect.  I hope you enjoy it.

A TASTE OF THE PAST

Some I think of days gone by
I think of me as a little guy.
A man of questions, acquainted with thought.
Thinking of the Christmas war, about the be fought.

Our primary objective was the fudge to robe,
But the restraining dilemma was big uncle bob!
We'd round the corner, innocent as could be,
But he knew our intentions and forced us to flee.

Casey suggested a diversion and I was inclined.
Off went bob, but twas in his arm reclined.
As we watched him go we thought of our plan
And watched with remorse as he dipped into the pan.

It was my turn for an idea and my comrades held their breath
Because my plans of daring usually ended with their death.
To fail was not an option and to quit not a thought;
Fudge was at large, and it wasn't the kind bought.

My plan was perfect.  It had no mistake.
My plan was for Garrett, the fudge, to take.
Garrett wanted to please me, on my every word did he dote,
And he made, by far, the best scapegoat.

We sent out "The Kid" with unprecendented anticipation
For we knew that to succeed meant unparalleled sensation.
Little "G" was sneaky; we had to admit
But compared to uncle Bob, it was bit to bit.

We were linked by walkie-talkies, a clever touch of min.
But really just another tool toward the chocolate taste divine.
Casey took the forward position and I took the rear,
Because if we got caught, Bob'd have them by the ear!