Looking for an Easy Way to Calculate "Change-Over-Time" Values for Process Monitoring? Hello! I've recently designed a control panel featuring a PLC to manage a water tank filling process. This system activates a pump whenever the water level drops below a preset low threshold and deactivates it once the water reaches a high threshold. Since the drain and fill cycle is quite slow, sometimes taking hours to complete, I implemented a 4-20mA pressure transducer to measure the water level using a standard PSI-to-feet water column conversion. However, a minor issue arose when a small pinhole leak in the line supplying the pressure transducer led to incorrect readings, falsely indicating a half-full tank when it was actually overflowing. To enhance safety, I'm considering incorporating a mechanism to verify if the tank's water level genuinely changes. For instance, I'm looking to add a logic condition: if the pump is operational and there’s no minimum change of X inches in X minutes, an alarm should trigger to alert users of a potential issue. Does anyone have a sample algorithm or a straightforward method to calculate the change in a process variable over a specific time frame, like determining the level change over the past hour? I want to avoid creating a complete database of historical values due to the complexity involved. A basic solution could involve sampling the level at defined intervals and comparing it with the previous sample. However, this approach might miss significant fluctuations between samples. I am contemplating using a moving average, but I wonder if it needs periodic resets. I would appreciate insights from anyone who has developed a similar algorithm or a simpler strategy. Here are some references for your consideration: - Simple Running Average: http://www.plctalk.net/qanda/showthread.php?t=19066 - Hourly Average: http://www.plctalk.net/qanda/showthread.php?t=17831 - Calculating Moving Averages: https://stackoverflow.com/questions...rage-without-keeping-the-count-and-data-total - Exponential Moving Averages: https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average and https://stackoverflow.com/questions/10990618/calculate-rolling-moving-average-in-c/10990656#10990656 Thank you in advance for any advice or examples you can share!
The formula for determining how quickly a level changes is calculated by dividing the difference between inflow and outflow by the area. By having precise data on both inflow and outflow, you can accurately predict or estimate the rate at which the level alters. If there is a discrepancy between the actual change in level and your estimate, within certain acceptable limits, it indicates a potential issue. While you may be aware of what the inflow should be, failing to account for the outflow leaves you unable to accurately gauge the rate of change. Without knowledge of the outflow, predicting the change in level becomes impossible. This concise explanation will help you understand the importance of monitoring both inflow and outflow in assessing rate changes, crucial for effective water management, reservoir maintenance, and similar applications.
@Peter - I currently do not have information on the inflow or outflow rates. My available data is limited to the tank level measurements. Using this information, I need to determine the rate at which the level is changing to compare it against the operator's specified minimum rate of change.
User ryangriggs commented: @Peter - Unfortunately, I don't have direct access to the data regarding inflow or outflow rates. My only available data is the current level of the tank. I need to determine the rate of change from this information to assess how it compares with the operator's target minimum rate of change. Click to expand... Oops! It seems you’ve been assigned a highly challenging task.
To optimize your system, rely on the pump curve data to determine the pump's capacity in terms of volume. This information, combined with a timer or counter, can help you roughly estimate the expected versus actual volume pumped into the tank, as indicated by the pressure sensor. This method could be somewhat effective for monitoring tank filling, although implementing hysteresis may be necessary. Essentially, you'd set up an alert based on the theoretical efficiency of the pump compared to its actual performance. Is the efficiency dropping below 80%? Or even under 60%? Without precise measurement of the inflow and outflow rates, the accuracy remains uncertain.
I apologize if my earlier question was unclear. It seems the main point of my inquiry may have been overlooked. I'm not concerned with the theoretical capacity of the pump over a set period. Instead, my focus is on calculating a dynamic "rate of change" for the tank's level, ensuring it's continuously updated. This value should allow for real-time assessment of how rapidly the level is shifting per specified unit of time (such as per minute, second, or hour). Is there a more straightforward method than maintaining an array of past data points to compute a rate of change? Ideally, I want to generate an output indicating the current velocity of change, like "the tank level is now altering at roughly 2.5 feet per hour." One potential solution could be implementing an hourly timer. With each timer cycle, I'd compare the current tank level to the previous one and update the earlier reading with the current data. While this approach offers an hourly rate of change, it only considers two data snapshots. Preferably, I would collect a more averaged rate of change, sampling every minute, without needing to store 60 data points. To succinctly pose my question: How can I calculate an accurate rate of change over a defined period without accumulating a substantial array of values? Any insight would be greatly appreciated!
✅ Work Order Management
✅ Asset Tracking
✅ Preventive Maintenance
✅ Inspection Report
We have received your information. We will share Schedule Demo details on your Mail Id.
Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.