Analog signals arriving at a PLC are almost never clean. A pressure or flow reading jitters from electrical noise, turbulence, and the ordinary roughness of the physical world, and that jitter makes trends hard to read, control loops twitchy, and alarms prone to chattering. The first-order low-pass filter is the simple, everywhere-used tool that smooths this out. It is a single line of recursive math that PLCs run on analog inputs to pass the slow, real movement of a signal while suppressing the fast noise. This guide explains the equation, how the time constant and scan rate set its behavior, and the fundamental trade-off between smoothing and lag.
First-order low-pass filter in one line: A first-order low-pass filter is a single-pole recursive filter a PLC applies to a noisy analog input to smooth it. Each scan it computes a new output as the previous output plus a fraction of the difference between the new reading and that previous output - y = y_prev + alpha*(x - y_prev) - so fast noise is suppressed while slow, real changes pass through. The filter's time constant and the scan rate set the smoothing factor alpha and the trade-off between noise rejection and added lag.
The filter is defined by one line of arithmetic that runs every scan: the new filtered output equals the old filtered output plus a fraction of the gap between the raw reading and that old output, or y = y_prev + alpha*(x - y_prev). The term alpha is a number between zero and one that sets how much of the new reading is allowed to move the output. If alpha is close to one, the output jumps almost all the way to each new reading and there is little smoothing; if alpha is close to zero, the output creeps toward new readings and noise is heavily suppressed but the signal responds slowly.
The recursion is what makes this filter cheap. Because each new output is built from the previous output and the current reading, the PLC only needs to store one value - the last filtered result - to keep the filter running indefinitely. There is no buffer of past samples to maintain, no array to shift, and no history to manage; a single stored number carries all the memory the filter has. That minimal footprint is a large part of why the first-order low-pass filter is the default choice for smoothing analog inputs in resource-constrained controllers.
The behavior it produces is an exponential response: when the input steps to a new level, the filtered output climbs toward it along an exponential curve rather than jumping, and it approaches the new value ever more slowly. This is why the filter is sometimes called an exponential filter or a single lag. The same math that smooths noise gives the output this smooth, delayed approach to any real change, which is the source of both its usefulness and its cost.
Rather than tuning alpha directly, engineers usually think in terms of a filter time constant, written tau, which is a time in seconds that describes how quickly the filter responds. A short time constant means a fast, lightly smoothed filter; a long time constant means a slow, heavily smoothed one. The time constant is intuitive because it is expressed in the same units an operator thinks in - seconds - rather than as an abstract fraction, so specifying that a signal should be filtered with, say, a few seconds of smoothing is far clearer than specifying a raw alpha.
The link between the time constant and alpha runs through the scan rate. The filter runs once per scan, so how much each execution should move the output depends on how often the filter executes relative to the chosen time constant. A filter with a given time constant running on a fast scan takes many small steps toward the target and so uses a small alpha; the same time constant on a slow scan takes fewer, larger steps and uses a larger alpha. This is why alpha cannot be set once and copied blindly between systems: the same alpha produces different smoothing if the scan rate differs, whereas a time constant expressed in seconds carries its meaning across systems and is converted to the right alpha for each scan rate.
This dependence on scan rate is a practical trap worth respecting. Copying an alpha value from one controller to another with a different scan time silently changes the effective time constant, so a filter that behaved well in one place can be far too aggressive or far too weak in another. The safe practice is to specify the desired time constant in seconds and let the correct alpha be derived from the actual scan rate, so the smoothing behavior is what the engineer intended regardless of how fast the controller happens to run.
The heart of filter tuning is a trade-off that cannot be escaped: more smoothing means more lag. A longer time constant rejects more noise and gives a cleaner, steadier reading, but it also makes the filtered value respond more slowly to genuine process changes, so the filtered signal always trails the real one. A shorter time constant tracks reality faithfully but lets more noise through. Every filter setting is a point on this spectrum, and choosing it means deciding how much delay is acceptable in exchange for how much noise reduction.
The danger of over-filtering is that a long time constant does not only smooth noise - it hides real change. Push the time constant too high and a genuine, fast process movement gets flattened and delayed, so a real excursion is muted and an alarm that should fire promptly is delayed by the filter's lag. For any signal that feeds a control loop or a safety-relevant alarm, this lag is not harmless; it directly slows the system's ability to respond. The filter should therefore be set just heavy enough to tame the noise that actually matters, and no heavier, so that real events still come through in time.
It helps to contrast the first-order filter with a simple moving average, which smooths by averaging the last N samples. A moving average weights every sample in its window equally and forgets a sample completely once it drops out the far end, which requires storing the whole window of samples. The first-order filter instead weights recent samples more heavily and older ones with ever-decreasing influence, and it needs only one stored value to do so. In practice the moving average gives a sharp, defined window at the cost of a buffer, while the first-order filter gives a smooth exponential response at almost no memory cost, which is why the recursive filter is the workhorse for per-tag analog smoothing where thousands of signals must each be filtered cheaply.
Alpha is a number between zero and one that sets how much each new reading is allowed to move the filtered output. Close to one means little smoothing and fast response; close to zero means heavy smoothing and slow response. Engineers usually set a filter time constant in seconds instead of alpha directly, and the correct alpha is derived from that time constant and the scan rate.
More smoothing always means more lag, because the filtered value responds more slowly to real changes and trails the actual signal. Push the time constant too high and a genuine fast excursion is flattened and delayed, so an alarm that depends on that value fires later than it should. Filters on control or safety-relevant signals should be set just heavy enough to tame real noise and no heavier.
A moving average weights the last N samples equally and needs a full buffer of those samples, giving a sharp, defined window. A first-order low-pass filter weights recent samples more heavily and older ones less, needs only one stored value, and produces a smooth exponential response. The recursive filter's tiny memory footprint is why it is preferred when thousands of analog tags each need cheap smoothing.
Merobix reads your field devices into a cloud SCADA - the real thing behind these terms, live in days from any browser.