Monday, February 27, 2012

Still alive, just paddlin' along

Howdy peeps.

I hope this post finds you all well.  why does it take me so long to post?  Idunno.  I did get a facebook account recently, so I'm posting a bit more there, but this blog is nice because I can post whatever and it doesn't necessarily broadcast it to all my facebook friends.  Understand, it isn't that I don't want anyone there to read this, but sometimes facebook posts tend to demand the attention of one's friends, know what I mean?  This blog, on the other hand, does not necessarily alert anyone when it is updated (unless of course you subscribed to the RSS or atom feeds).  At any rate, for that reason, I feel like I can post more here somewhat more anonymously without subjecting everyone's eyes to my rantings.  Of course, I'll prove myself wrong and post a link to the this on facebook, but somehow it just seems different.  Go figure.

So where I have I been?  I have been working with the family in Orland, CA. as a design engineer for ENE, Inc.  lots of little projects going on there.  Not as many large projects finishing, but I'm working towards things.

I did have some news to report in my personal life though.  I am now dating a wonderful girl named Kristen!  We have known each other for a while, but have recently reconnected.  It is unfortunate that we live a little ways apart (she in Sacramento, I in Chico), but we make it work.  Below is a good picture of us after my last birthday party...  this was the day-after cleanup.  Actually, come to think of it, we were both in pretty good moods considering that we were running low on sleep!  ;)

Anyhow, it has been great getting to know her these last few months (since November).  I suppose this is neither here nor there, but if you haven't tried Mythos beer, you should really check it out; it's good stuff!

Speaking of parties (since I was talking about cleanup) I just celebrated my 32nd birthday on the 17th.  Every once in a while I have a big theme party, and this year was just such a year.  This time I had guests come as an international, historical noun, so I had lots of creatively dressed friends helping me celebrate.  Kristen did a tremendous amount of planning and footwork beforehand and a whole bunch of cookin' the day of.  I don't think she got enough praise for all of her hard work, so I think this is a good place to brag about what a great job she did.  We had food from six different cultures and apetizers from three.  Beer and other beverages spanning those same six cultures as well.  It was great.  The best part was that lots of people came and helped us celebrate, and they all seemed to have a fun time.

Another thing that has happened since I last posted: I bought a truck!  yeah, baby!

It's a 2007 GMC Sierra 4x4.  Man!  It is so nice to be driving a truck again.  Mind you, I'm not saying that I didn't appreciate the loaner vehicles from mom and dad this past stretch, but it feels good to finally have a vehicle that is closer to my personality.  I'm really diggin' the crew cab too.  Now it isn't a pain to invite more people to ride with me...  ;)  It should be noted that my original plan is still in effect: add lift, tires, wheels, sound, etc.  But as is oft the case, things turned out to be a bit more expensive than I anticipated  and I had a bit less cash than I was counting on originally.  All-in-all, I'm very pleased with the purchase though.

Living situation-wise, I am back in Chico living with my brother and roommates.  I had thought for a while that I would try living by myself.  I haven't totally given up on the idea, but I still am thinking that I am a social enough person that I benefit from living with roommates, etc.  So all that is working well.

I have completed the Army AFDD / NASA Ames stuff as far as my project duties, but I am still in the midst of authoring my portion of an American Helicopter Society Forum paper.  That is kind of exciting, expecially since I've never been a co-author (or author) on anything published before.

My thesis is making very slow progress these days, but I intend to crank up the heat on that.  I have to complete the modeling procedures to represent my plant, and then explore a few controller architectures.  This should be straight-forward, but for some (strange) reason, I am trying to get re-motivated to work on it since i'm not getting paid to (funny how that works).  Also, the fact that there is no deadline is really playing tricks on my psyche.

Hmmmm...  what else can I update y'all on... I have spent a good deal of time thinking about mechanical harvesting equipment and the technology surrounding some potential ideas I've had for olive harvesting (in addition to other crops), that I think could knock the socks of people.  I'll have to give some more details on that in another post.

I would appreciate prayer for my family, generally.  We are all going through some tougher times and as at all times, need God's grace to persevere.  Pray that He will give us all peace and endurance.

Personally, I face many upcoming decisions in a lot of areas of my life, and desperately need wisdom that is not of earthly origin.  Please hold me up in prayer as well. 

I'm not sure if this is really a good marketing tactic, but tune in soon to hear some more technical details and my latest schemings; I promise to thrill!  ;)    cya!  BTW, if you wanna drop me a line, send it to gavin.nielsen@gmail.com I'd love to hear from you.

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!

Tuesday, December 14, 2010

I am a blessed man! =)

Howdy there peeps!

Hmm...  well, here I am with less than a week left in my southbay adventure.  It has been a long ride, but a good one.  reflecting a bit on what has happened since I moved to the southbay, I can't help but thank God for his blessing and provision throughout the year.

I would like to believe that I am a brilliant individual.  Truly I would.  But the reality of the situation is that I feel more like a delivery boy.  Okay, hopefully a delivery man, but you get the idea.  What prompts such a random comment?  I was thinking back on the problems that arose this year at work... definitely some tough ones!  At each step of the way, I feel like the Lord inspired me with ideas to solve the problems as they arose.  Kinda feels like that game ("wack-a-mole"?) where you bonk moles when they poke their head out of a board and you have to bonk them quick or you lose the game.

Enough problems came up this year at work that I truly believe that without the inspiration of the Holy Spirit and the refueling and renewing of my mind, that I might be in mental shambles.  I will not bore you with a list of all of the things, but suffice it to say the list makes me a little tired!  =)

Work aside, it has been a tremendous blessing to live with my cousin Scott.  Beyond just getting to know that chap better, it has been fun goofing off with him.  In some ways we are good for each other since we have some almost opposite tendencies, but then we have a lot in common as well, which makes it fun to talk (and sometimes complain) about work problems since the other can understand them a bit better.

Then there is the whole housing thing...  again, what a blessing!  I got to live in a perfectly central, beautiful apartment complex in Sunnyvale that was very relaxing to come home to (and even had a jacuzzi and pool).  For these last few months I have been blessed to live with Scott in his new home in Santa Clara where I have been the proud occupant of the master bedroom (Scott will soon rent it out, which is why he didn't want to move in there). 

I had the opportunity to get to know a girl from Santa Rosa (Elisa) which ended up not working out, but was still a learning/growing experience for me.  I am often torn when I think back on relationship history-types of things, since all relationships that one invests in that do not work out do take their toll, but thinking back I can praise God that he is teaching me these things so that my future wife will hopefully be shielded from them.  I guess you could say that I have a long way to go, but hopefully I can accelerate and make up that distance fast!  =P  Speedracer!  lol

Since I spent time going back and forth to Santa Rosa / Petaluma, I have had the chance to hang out and have some great talks with one of my closest friends (John).  It is amazing to me that I can know someone for such a long period of time and still misunderstand them.  It would not be appropriate for me to fully explain what I mean by that statement here, but let me just say that I am blessed with close friends who find me worthy enough to share part of their inner-selves with, and this encourages me beyond measure.

On top of all these things (I sure am glad I didn't list the problems, I wouldn't have had room for this list of blessings!)  I have felt much more at peace with my future and future directions, which I would definitely call a miracle in and of itself.  For someone like me who is constantly over-analyzing everything and trying to optimize, feeling at peace with the unknown future and being content to see a few years in advance and settle on a path is no small feat!  Yet, the Lord has seen fit to grant me this insight/direction.  For that, I praise Him! 

I look back and wonder how else I would have come to the same conclusions without spending this time here...  I have often wondered why I am here since I am somewhat isolated and I hate watching my family grow up from a distance.  Don't get me wrong, I knew that I needed to be here to finish my formal education, but one can't help but wonder if there isn't another way when you feel lonely...  But, the Lord has a plan and I am more and more willing to let Him lead and watch the beautiful things that result from letting the omniscient One have the reigns.  How ludicrous that I think I can do better sometimes!  =)

Check back here on the blog soon for an update with some pictures.  I promise to get some pics/videos of the people I've been working with and post 'em (with their permission, of course).  Yet again, a great blessing that I need to praise God for... so many people do not enjoy the people they work with, yet I generally can't wait to get to work and interact with these people (and when I'm not excited to be at work, it is generally because I am tired).

Okay, well that'll do for now, pig.  I hope wherever this post finds you, you are doing well and the ways that you are currently being blessed will be revealed to you also.  "And we know that God causes all things to work together for good to those who love God, to those who are called according to His purpose." (Romans 8:28)

-Gav

Thursday, November 11, 2010

On why I love modelling...

Howdy there sports fans!  =)

I am pleased to report that I have had some great success with a long-time project of mine.  I have simulated a very rough approximation of a tree under forced oscillation!  This is something that I have been pondering how to do for about 10 years...  Boy, to write that down makes it seem, well, like a long time.  First, a little backstory...

A few years into college I began mathematically modeling the shaker head that ENE uses for harvesting prunes, pistachios, etc.  After making a few assumptions and idealizations, tt was a relatively simple set of parametric equations, and served as a wonderful application and exercise of the concepts in calculus that I was learning at the time.  Essentially, those equations parameterize the configuration of the shaker head and predict the output pattern.  With a bit of doing (and a few major mistakes in derivation), I had a reasonable, closed-form approximation of how the shaker head would react to different weights, speeds and arm lengths. 

Below is a plot of the predicted output pattern for the configuration
freq1=10 Hz, freq2=7.14 Hz, arm1=2.5 in, arm2=3.5 in, weight1=40 lbs, weight2=30 lbs.
For a while, I was very enthralled by this set of equations and what they might mean for tuning and understanding harveting better, but I soon realized that the real problem was not what the shaker head was doing, but rather how the tree was responding to what the shaker head was doing.  In short, it is necessary to understand the behavior of the shaker head, but only from the standpoint of guiding it into a behavior that is useful for successfully shaking a tree (e.g. getting fruit off, not damaing the tree, etc, etc.).

Since the orginal equations were derived symbolically they are easy to calculate and easy to analyze, but I could not wrap my head around a good method to symbolically model a tree.  As I progressed through my schooling and various work projects, I spent more and more time in numerical simulations (mostly Finite Element Analysis-type (FEA) and dynamical systems (for control system engineering).  It has taken me a long time to realize that the answer to my problem could be approached in a numerical way, but even after I realized that, I wasn't sure the right software package to use to tackle the problem.

****************   so much for the back-story...  on to the present   *****************

Since while I'm here in Santa Clara, I decided that it was the right time to go to a workshop for a software package called COMSOL Multiphysics.  They have an office in Palo Alto which is only a few minutes from work, so it all worked out beautifully.  My cousin scott was nice enough to come along for moral support and may have just enjoyed himself a little along the way...  =)  As part of the workshop, we recieved a trial license for the software which is a great match for my brand-spankin' new computer...  =)

So that was this Tuesday, and for the past two nights I have spent a few hours trying to figure out how to model a tree and simulate it in a flexible way.  This evening I finally had success and thought it would be fitting to share the results of my labor with you.  Below is a very simple tree's response to the input of the shaker head (given the same configuration as listed above).  Hopefully this video uploads correctly... it took a long time, so I'm not sure if everything got to the server ok...

video


That is pretty cool I think.  The coolest part about this might be that the solve only took about 2 minutes!  Granted, when I have a tree model that is sufficiently more complicated and takes into account more effects (Such as the damping due to leaves, etc.) that solve will take longer, but this was a simple example and it solved very quickly. 

Another quick little video which breezes through the first 50 (or so) eigen-frequencies and eigen-mode shapes (the natural frequencies and vibration modes of the tree structure).  I would slow this down a bit, but the slowest I could do was 1 frame per second, so just check out the frequencies listed in the upper portion of the screen to get a feel of the frequencies that are causing the shapes...
video


On top of that, I found the COMSOL environment to be very well thought out and even capable of some post processing tasks that didn't need to go over to MATLAB to handle... namely looking at the pattern input that caused this type of purturbation...  I know what you're thinking, you're thinking, "Hey Gav, hang on.  Just a few paragraphs ago you said that you had closed-form equations that could predict the shaker heads position (and thus the pattern input to the tree)..."  to which I respond, "Yes, that's true, but remember my qualification: "After making a few assumptions and idealizations..."  The first assumption was that the shaker head was "free" and not being affected by anything else.  That isn't quite true, because while the shaker head is big and powerful, it is still affected by the tree...  remember, we can push on the tree, but the tree can push back!  So, without futher ado, I give you thee updated pattern that my simulation yielded after taking into account the tree's "push" back on the shaker head...

There are a few things that need be said here...  first of all, you have to look closely to find that it does have many of the same characteristics of the idealized patter, but the idealizations might have been a bit too much from a rough accuracy standpoint.  Note that I didn't include any mass for the shaker head, so this isn't as accurate as it could be.  Also notice that the new pattern output is not as wide as it is tall...  this I believe to be due to the trees asymmetrical response (which in turn is due to it's asymmetrical topology)..  What we found here was that it was much easier to move the tree in and out vs. moving it left and right, which might make sense when you stop and look at where the branches are on this tree...  =) 

Man I love modelling!

*********
On a more peronsal note, I am doing well and things are moving forward with my thesis.  Slowly but surely.  I will post again soon with more personal things, but I better get some sleep tonight!

Thanks for reading!  =)