Sunday, August 22, 2010

Dapper dudes, miss-bowled and flexible filtering

Hey there partner!  =)  Glad you took the time to head my direction... 

This weekend was fun.  Elisa came over on Saturday and we had some great talks.  I had promised her a surprise activity, so she thought it was great when we finally arrived at Sunny Bowl in Mountain View to do a little bowling...  here is Sunny Bowl...
Yes indeed, it really looks "Sunny" in there, but you should've seen the look on their faces when I walked toward the door and turned right around seeing that there was no way that they had a bowling alley "in the back!"  =)  I suppose I had the funnier/confused look on my face though.  I should've done my homework a little better!!  Well, we finally did find a place to go bowling (Palo Alto Bowl) and really enjoyed ourselves.  Hopefully you get this quote, but I felt much more like "King of the Lanes" than "King of the Trolls" for this pic...


I think I need to do more manual labor or something because we only bowled two games and my hands were a little sore from gripping the ball...  No good!  =(

Elisa was sure that she could beat me at this game... (we have an ongoing competition when we play games).  As it turned out, I beat her the first game and she beat me in the 2nd.  Just 'cause I'm so proud of our high scores, I thought I'd post the frames for everyone to see (this is for you James!).

It was E-Train vs. G-Dog, and the battle was a fierce one!  I even have the play-by-play for you with this next video, lol



So, we had a good time there.  That was Saturday, on Sunday, I needed to accomplish some things for work, so I have been researching and designing a variable-frequency, variable-order filter to address that problem that I posted a few days ago.  I think I have it conquered, but I wish I could simulate the thing...  that always gives me more confidence.  Here is the rough block diagram


It is kinda neat how variable frequency filters can be realized these days...  the one I'm designing is based on something called "Switched-Capacitors" which emulate resistors.... kinda cool really.  Even though it is an analog filter, it is actually discretely sampled; that is, even though I can put a very precise amount of water in my bucket, I'm still getting a fixed number of buckets every second...  like everything, it is a tradeoff, but with a little pre-filtering, and at high speed "bucketing" (like 100 kHz) I can get very nice looking, accurate filtering done...  way cool.  =)

Lastly on my update agenda is the fact that this is likely my last post from my current abode (in Sunnyvale).  Cousin Scott closes escrow on his home tomorrow, so we'll be moving in this week!  =)  yay!  so next time I should have some pictures of the new place.  In a nostalgic bid to remember this little hat-hanger, I took one last pic of the bathroom...  only because it had two mirrors and I could doubly reverse my reflection and show you the cool new CSUC pride I have!!!   LOL, I'll miss something things about this place, but I sure wont miss the family below us that get in an argument at 11:30pm every evening....  anyhow, here is the new duds


pretty snazzy, right?  Even some nice baller Chico State shorts...  Garrett, you're afraid of these shorts, aren't you?  Well, you should be.  personally, I'd give you one chance in three.  More tea anyone?

Okay, well that's it for now...  one last thought, tho: you should really drink more water, it's sooooo good for you!


Sunday, August 15, 2010

What's in a name (or a tree)?

I think this might be a record for my blogging frequency!  Only just yesterday I gave you a lengthy update and here I am back at it again...  =)  too much good stuff to say, I guess.

Since I decided to not work on work over the rest of the weekend, I decided that maybe I'd see if I could make some progress on tree modeling (another back-burner project that's been cookin' for awhile now).  I have been reading about fractals and their recursive nature, and I was inspired that trees seem to show this same nature in the structure as well.  Since it has long been a goal of mine to mathematically model a tree, a logical place to start is to generate the static structure or skeleton of a tree automatically (this takes forever to do by hand).

Today was my first shot at trying to actually implement some code to do this in MATLAB, but low and behold, it worked out alright.  This is only a 2-dimensional version, but you'll get the idea.  It can be easily extended into 3D.  After some trial and tribulation, here is a tree to chew on...  this tree has 3 branches per level and is 4 levels deep.
by changing a couple of numbers, I can very quickly generate a new tree with very different structure...

I am of course still working on the details, so these are only rough-draft trees, but it is exciting to get some visual results so quickly.  Part of why these trees don't look familiar (Beyond the fact that they are perfectly generated and perfectly symmetrical) is that a real tree has gravity acting on it which pull weaker branches down and makes it look a little less upright.  this algorithm is really generating trees that you might think of as having grown upside-down!   of course, it would also help to have thicker lines for the bigger branches, etc.  but all in good time.

 Just a few more variables to throw in their for me to get pictures that will look more like the trees we are trying to model, but this is a good start for today.

I hope y'all have a great week!  G-out

Saturday, August 14, 2010

On the state of "Gavin-a-roo" =)

ey there, sports fans!  I am right in the middle of a relaxing Saturday afternoon, so I thought that I'd post an update on how things are going around here...

Work is going well (though one of the other guys in the office remarked that he didn't see too much going "well," rather he saw it as "well, I've got more to do...").  I have to admit, though every project I've ever been involved with gets complicated for reasons that are outside of my control, this project has seemed like a can-of-worms at almost all turns.  I guess that means that I'm learning a lot (which makes me happy), so this is how I replied to my pessimistic co-worker.  =D

Hilary, I haven't yet gotten the approval I need from my supervisor to post the video, so hopefully that will happen next week.  I'll "do it up special" so that it has more footage and better explanations than the other one too!  lol, far be it from me to just "get'r'done".  I guess I use a lot of quotes these days, but "it is what is!"

I can share some things from work.  This last week, I was working on troubleshooting an amplifier and realized that the major problem was not with the amplifier at all (it was due to a  component in my model that was doing exactly what i told it to do).  I was thinking how funny that is that when things aren't going right, we sometimes don't look at ourselves as the culprit until there are no more "outside" places to point at.  Kind of a get-the-spec-out-of-your-own-eye thing (or maybe a you-shouldn't-use-so-many-dashes-thing).

Anyway, after that round of toubleshooting, I had several conclusions.  first that since my system operates at a fixed frequency (somewhere between 4000 and 8000 cycles/second) and the signals i'm generating can range up to rather high frequencies themselves (92 cycles/second under normal conditions and possibly up to 1000 cycles/second) this means that the number of "points" that my system is generating get kinda sparse in the output waveform.  Here's an example.  If I want to generate a nice clean waveform, I'll use a lot of points (500) along it so that is is approximately smooth.


a plot like the one above would happen if we were using a 4000 cycles/second signal generator to generate an 8 cycles/second waveform (4000/8 = 500).  But since my system is generating signals at a fixed rate (approximately 4000 cycles/sec), as we increase the waveform frequency, our points/cycle decreases.  below is a plot of 100 points/cycle.

Notice the "stair-step" like appearance.  This is because we have fewer points, and in-between points the signal generator does not update it output value.  If we push this further to 43 points/cycle (below) we see that the signal is looking less and less smooth.

This is the problem I am running into (one of them at least).  Since my signal is not smooth at higher frequencies, I need to smooth it out after I generate it.  This is done with what is called a "low-pass" filter (which means that it only lets the low frequencies pass through it and attenuates the higher frequencies).  In the picture below I have made a cool Simulink model (part of MATLAB) which does two things: it generates exactly the same signal as my data system (my data system was prorammed using the same code), and then it simulates what effect a proposed analog low-pass filter would have on that generated signal.



Here is the plot this model produced (below)

See how nice and smooth the red is?  very nice!  =D  So I've been playing a little with that today, trying to find a reasonble filter design to handle my needs (the output amplitudes are similar, as in this one, but also the phase shift can't be too much, notice how in this one the red output signal is shifted to the right...)

Yeah, so that's what I've been working on lately.  There are some other cool things that I've been playing with, but I'll save 'em for later.  In other news, I have been thinking a lot about a new truck!  It has been awhile since I have really seriously considered buying a new vehicle, but things are at a points where it seems reasonble.  I have been doing some research on it (that is what I do, I guess), and come up with the following spec that i'm looking for: 2007 chevy silverado extended cab, 1/2-ton, supersport, lifted with 35x12.50 tires and nice alloy wheels.  With a little snooping around on the net, I found a picture of *almost* exactly what I'm looking for...   :P

Wow, that's pretty, eh!  So I've been pursuing that a little and watching some different ads to see if I come across anything interesting.  It is so strange to actually have some money to think about these things, I'm really not used to having any money!  :P

On the topic of money, I've also been thinking about a killer workstation laptop.  This isn't a popular idea with any of my advisors, but man, how sweet would it be!  For those of you that are into the techy stuff, I'm thinking about a Lenovo W701, 2GHz, 16GB RAM, 256GB ss hard drive, 1TB secondary, 17" uwxga display (FHD, LED backlit), blu-ray burner onboard, Quadro 3800 video card with 1TB of memory.  Pretty much maxing everything out the way I like it there.  Of course, the major problem is that it is so stinkin' expensive.  Ah well, for the moment, dreaming is free...

On another front altogether, I have made  some great strides in my eating habits this last week.
This here picture is a sandwich I made for myself at lunch.  Now, mind you, making food is not all that difficult a task, so I'm not expecting a bouquet of roses, but for some reason I have something of a mental block about making my lunches, cooking at home, etc.  this week I only eat out twice; both times because I needed something to eat for lunch and I didn't have time to make it the night before or the morning of.  Other than that, this week has been completely "homemade."  Yay!!  ...and there was great rejoicing!

There is often more going on that I can't blog about, but there is a similar phenomenon that there is more blogged about than you are interested in, so I think it balances itself out.  I'm missing all you friends and family out there, but I'm trying to be content in my situation and take full advantage of it.

Oh, one other thing.  I almost forgot to tell you...  I have changed a little!  See if you can find the difference in these next too pictures (queue the music, "one of these pictures is not like the other")



And of course, my post wouldn't be complete without mentioning that I've been having a great time with my girlfriend Elisa.  This pic was taken before we went out to eat a few weeks ago... it's funny, the stairs do a tolerable job of holding the camera, but I still can't get them to take it where I look as good as she does!  Oh well, I guess I'll just keep workin' on my guns and hope for the best!  =P


Adieu!