Tuesday, July 20, 2010

Control Theory 101

I'm gonna go super-geek nerd analogy here, so if that floats your boat, keep reading.

My educational background is in Controls and Dynamics, a subset of engineering used in various applications, most notably robotics. The key idea behind controls is to control something (talk about a big reveal). As a simple example, say NASA wants to launch a rocket to Mars, but to conserve fuel to make it to their destination, they need the rocket to travel at 300 miles/second (note: these numbers are completely fabricated). No faster, no slower. The rocket speed is controlled via a propeller (note: rockets do not use props for propulsion, they use rockets, but for simplicity's sake, we're using a propeller).

After launch, a good control algorithm (e.g., nonlinear, adaptive) will adjust the propeller speed in such a way that we quickly get to our desired cruising speed of 300 mi/s and stay there. The problem with these algorithms is that sometimes they can screw you and go out of control (and there ain't no coming back when that happens). Safe algorithms (i.e., linear: pole placement, PID, etc. -- warned you this was super geeky) will always get you to your speed, but usually they will overshoot and then fluctuate around your desired setpoint (300) before eventually settling (a dampened sine wave).

A writer's arc is in many ways analogous to a control algorithm. We don't hit our desired setpoint right away, usually. We tend to overcorrect based on feedback, rules, etc, but eventually, if we iterate enough, we can find our setpoint.


PS - I'm off the grid at the moment (hopefully somewhere in Yellowstone not getting eaten by bears). 

6 comments:

Ricardo Bare said...

I get you bane. The dampening sin wave helped. :)

(We do something semi-similar, I think, when tuning values for game design, sometimes. How long should the AI search for the player--it's way to long at the moment. Cut it in half. Okay, now it's way to quick. Go between the two old values. Okay, now it's just a little too long. And so one, until it zeroes in on the sweet spot.)

L. T. Host said...

I have to admit, the only thing I could read in my current state (post-vacation exhaustion) that made any sense was the last bit. But that made enough sense, and I have this to say:

Word.

I hope, too, that you are not being eaten by a bear.

Matthew Delman said...

Well said, compadre. Well said indeed.

And you also need to make sure the bears aren't stealing your picnic baskets. Especially in Yellowstone.

Ricardo Bare said...

I meant "sine" wave. I'm not sure what a wave of sin would be.

Adam Heine said...

I'm totally with you. Thanks for reminding me why it's so hard to auto-correct :-)

Susan Kaye Quinn said...

A wave of sin! Oh, the images ... wait, what were we talking about? Ah yes, control theory.

I'm a bit late to this party, but if the bears haven't gotten you, I wanted to say Yay, for nerdiness!

When I was working at NASA (Dryden Flight Research Facility), I was studying supersonic ramjets, but my engineering buddies (see us here) were working on the control systems of the (what was then new) fly-by-wire system that controlled the X-aircraft. The airplanes were inherently unstable (gee, brilliant, aero designers! Couldn't you make one that would fly straight?). Turns out an unstable aircraft is *ahem* highly manueverable, and so this was desired. However, the control software was literally the only thing standing between the pilot and a suddenly wildly out-of-control aircraft plummeting to earth. Those test pilots certainly earned their money.

I've always had huge respect for control systems since then.

As far as writing, I feel like it's a little more stable than that, but still oscillating as you say, especially when we're talking about developing story lines - honing in on themes and character arcs seems to be in iterative process for me.

Great post! Hope you see some cool geysers! :)