Sunday, March 16, 2008

Bored At Work

So, I'm sitting bored at work on a Sunday afternoon, so I thought I'd write a blog entry. Besides, there's a couple random topics I wanted to post, so this is as good an opportunity as any to get them out there before I totally forget about them.

Of course, before I get to them I have to give a little background on why I would be sitting at work bored on a Sunday afternoon (as opposed to sitting at home, bored on a Sunday afternoon). So, my group makes a whole bunch of different compounds, and while they all have highly similar properties, they're certainly not identical (the compounds, not my group). For example, some of them are cursed. Disappointingly, you can't recognize a cursed sequence from a normal sequence without actually synthesizing it first. But, once you try to synthesize it, oh you'll know it's cursed alright, yes you'll know right away.

Maybe the yield will inexplicably be like 30% less than normal. Maybe something will mysteriously break in the middle of a run. Maybe you'll get a ton of phantom water system failures, forcing you to stop working. Maybe there will be new, unexpected impurities that aren't removed in the default purification method. Maybe some other group will lose important documentation and force you to repeat the entire production run. Maybe all of these things will happen in the same three week period. Somewhere around this point, you'll start becoming suspicious that the sequence is cursed. And you'll remember it and be wary. Very wary. Of course, cursed sequences have this tendency to do well in clinical trials, which force us to make more of them, which just provides opportunities for more things to mysteriously go wrong (and they do, oh yes they do).

So, yeah, we're trying to deal with this cursed sequence, and well, let's be honest here. We're losing the battle (but time and numbers are on our side, sort of). So, I'm here on a Sunday trying to help us use that time advantage to get this thing out of our lives (until we're requested to make more, of course). Depressingly, I basically just have to press go, then wait two hours, then press go again. I also can't go anywhere during those two hours in case something mysteriously goes wrong. Which is why I'm writing a bored blog entry on a Sunday afternoon.

Now, if I wanted to do work, I would probably be contemplating this four hour process I was working on a few days ago called the stripping operation. If you've worked in a chemistry lab, it's kind of like roto-vapping our product solution, except we've got 150 liters, instead of 500 mLs. For anyone else, we basically just put our product under vacuum and boil it until we've reduced the mass by 30%. We do this because 30% of the mass at that point is ammonia, and it's not very much fun to work with ammonia (there's often complaints about burning of nostrils and lungs things like that).

So, I would be contemplating this process because the PID settings for the tank heating jacket are completely ridiculously inefficient. For readers who don't know what PID stands for, it is Proportional Integral Derivative. See, that explains everything. PID settings are the values that control the equation for controllers. So, somewhere there's probably some PID settings controlling things like your refrigerator and your stove and stuff like that. If the settings are good, then your system will quickly reach it's target setpoint and it will hold it without varying. If the settings are poor, well, it may never reach the setpoint.

Our settings are poor. As a chemical engineer, I'm not sure I can deal with that.

Now, the simple way to deal with this would be to go into the computer and change the settings so they don't suck. It would take, like 30 seconds, and I bet the stripping process would take like 15-45 minutes less time. Plus, nobody ever goes to that screen so no one would even notice it had been done, possibly for years, and there would be no way to trace it to me anyways (minus this blog entry, of course). However, the controller is a GMP system (no, I'm not going to bother telling you what that is, go google cGMP if you want to know), so I have to document and justify this change. Which means I have to provide data showing that the not-stupid settings will actually be effective.

So, I'll probably have to run a couple fake stripping operations with just ammonia and water and show that it works. What's really silly about this is that this wasn't done initially. The stupid settings were just the default and there weren't any chemical engineers around to complain that the settings were stupid so that became the standard.

In case you're curious, the current settings only use the P in PID, so it's just a proportional controller. The problem with that is that a proportional controller will never reach the set point (technically, this isn't actually a bad thing, since we picked the set point completely out of the blue, so who cares whether it reaches the set point, but that's an entirely different can of worms). For a tiny bit of explanation (and because I like to explain things), proportional controls take the difference between the set point and the current value and multiply it by some factor to determine the strength of the output (from 0-100%). So, when there is a large difference, the output is typically close to 100%. At the set point, however, the output is 0%. Clearly, if it's not trying at all, it won't be able to stay at the set point. Instead, it reaches equilibrium at some value less than the set point where the amount of heat the controller is allowing into the system (based upon the difference between the set point and this value) is equal to the amount of heat leaving the system.

What our system needs, however, is an integral controller as well (nobody really cares about derivative control). An integral controller looks at the difference between the value and set point over time (by computing the area between the two curves on a time axis). This means that initially it is really weak, because there hasn't been very much time, but as time passes and the value doesn't get closer to the set point, then the integral controller becomes increasingly strong. The danger is that it can overshoot the value, since proportional control doesn't get weaker as the value approaches the set point, it just stops getting stronger (but, on the other hand, we picked the set point out of the blue, so do we really care if we go above the set point?).

An integral controller would be really useful in our case because there is a massive amount of heat leaving the system (evaporating stuff consumes a lot of heat). With just the proportional controller, our system is only getting about 80% of the way to the set point as is, because that's where the proportional controller's offset reaches equilibrium (note that equilibrium can't really be reached because we have mass leaving the system, but work with me here). At that point, there's only about a 10 degree difference between the tank and the jacket (and it is this differential, as well as the temperature of the tank, which controls the rate of evaporation). However, if we used an integral controller, we could theoretically get the tank up to the target temperature, which has a faster evaporation rate (and therefore will cause the differential between the jacket and the tank to be greater as well).

So, in three paragraphs, I've already explained why the not-stupid set points are better. Given two minutes, I could explain it to almost anyone. But, I'm going to have to spend like a week showing that these basic principles really are true, even in the special case of our tank. But, I guess it will mean that at least we won't be just randomly picking values for the controller, so I'll be able to try a couple different settings for the integral controller to see how strong it should be, rather than having to be tentative and use a small value to ensure that we don't exceed our set point (even if the set point is meaningless).

Hmm, I think this post is long enough, actually. Never mind about those other topics I wanted to talk about. I've already forgotten them anyways.

That is all.


PS - I remembered one of the other topics I wanted to talk about, actually. The actress Zooey Deschanel is really hot with brown hair. I had no idea, since I'd always seen her with blond hair, but I saw her in this movie Bridge to Terabithia and I finally understood why so many random people have crushes on her (like GQ, for example). Also, please don't ask why I went out of my way to see a children's movie, my only excuse is that it was in high def and I'm a fan of the director, who was one of the creators of Rugrats, and I just want to make it clear that I did not rent it out of any desire to check out the 13 year old girl in it whatsoever, seriously, none at all...also, I didn't even know that Zooey Deschanel was in it with brown hair, otherwise that would have been a pretty good excuse as well.

PPS - I remember one more thing I wanted to mention. Apparently, River (of Firefly and Terminator: The River is Really Freaking Hot Chronicles fame) has actually been in a couple made-for-TV movies, that Netflix has on dvd so I'm slowly checking them out. It's kind of odd to see her playing normal characters, though. I mean, in this one Sci-Fi channel movie where aliens possess a frozen woolly mammoth and use it to attack a town (and steal people's souls or something, I'm not actually sure what they were doing, it wasn't totally clear to me) she actually has a boyfriend and dances and makes out with him. It's kind of surreal, really. I'm extra excited about this other made-for-TV movie from ABC Family that she's in, just because it might be the first non-sci-fi thing I see her in, which could just totally blow my mind. Or, maybe there actually are aliens or robots or browncoats involved in that movie and I just couldn't tell from the description, I mean, you never know, right?

PPPS - Okay, this is really the last thing I'm going to remember (I blame the words "browncoats" for reminding me of this one). And for some reason, all of these are about hot actresses, I'm not sure why. Anyways, I saw the direct-to-video movie White Noise 2 last week. It was pretty awesome, actually, which surprised me. It wasn't all that good, of course, but definitely not that bad (although it wasn't really horror, maybe more like a thriller...minus a lot of that thrilling stuff). In case you didn't know Nathan Fillion (that would be Malcolm Reynolds) is the star. Also, the kind of off-the-wall semi-love interest is played by Katee Sackhoff (that would be Starbuck, from Battlestar Galactica). And, well, she was totally hot. Surprisingly hot, really, since I'd never particularly liked Starbuck (probably had something to do with the boyish haircut, since I'd started warming up to her a little bit with longer, straighter hair, and now I have a minor crush on her after seeing her hair in this movie). Besides, that though, there wasn't too much to remember about it. Aside from Nathan Fillion being his typical, awesome self. Man, what an awesome dude he is. And funny, too.

PPPPS- Sorry, talking about Nathan Fillion and thinking about how awesome he is and how he just needs an awesome role to suddenly become the coolest guy ever in everyone's eyes, instead of just mine made me think of Bruce Campbell (if you know who Bruce Campbell is, then you know what I'm talking about, otherwise, um, well, you wouldn't get it, maybe check out Army of Darkness some time with a group of friends...or just forget about it). Did you know he has a role in the little Disney super hero/high school comedy/drama Sky High? I had no idea. Man, if I'd known I totally would have seen it in theaters, like three years ago or whenever it came out. Sigh, what an awesome dude he is. And funny, too.

That is all. For real.

No comments: