« Safety and Security
Helpful Truck »

Removing Hacks

I spent today fixing a number of hacks that I had previously made. One was a tool I quickly built last week as a mashup of older tools. Even as I was building it last week, I could see that there were lots of bad practices that I had used in my older code but at the time I just wanted to get the program to work. This morning however I was irritated with the slow response times of the tool. It didn't take too long to rewrite some of the functions and sure enough the tool was much faster than before.

The other hack was a filter that I had applied to a control loop. Normally the system worked well with no filter. Unfortunately when the compressor speed was changed, it kicked the pressures and caused a significant downstream disturbance. My solution was to add a dynamic filter that was very fast to respond when the compressor was steady but very slow to respond when the filter detected a change in the compressor speed.

Last month the operators put the compressor into automatic control, meaning that there were lots of small moves. This caused the filter to get stuck on the slow response and led to lots of swings and instability. It turns out that removing the filter and leaving the compressor in automatic control let's the control look keep tight and fast control while the compressor is moved in small increments which don't cause downstream disturbances.

Well it looked good as I left. I suppose I will find out tomorrow.

Go Top
« Safety and Security
Helpful Truck »


I would love to know what you think. To comment on this article, send me an email

No comments yet.