Skip to main content

Signal Processing

Signal Processing for Ignition brings SciPy's signal processing to Ignition scripts: 33 functions under system.signal, with SciPy 1.18.1's names, parameters, defaults and results. Free and open source under the Apache 2.0 license, for Ignition 8.1 and 8.3.

Ignition scripts run on Jython, which cannot load numpy or SciPy. Until now, filtering a noisy tag, finding batch peaks or computing a spectrum meant hand-written code or an external service. Signal Processing does it inside the gateway, in every scope: gateway scripts, tag events, timers, Perspective, Vision and the Designer.

sos = system.signal.butter(4, 2.0, fs=50.0, output="sos")
clean = system.signal.sosfiltfilt(sos, x) # filter without lag
peaks, props = system.signal.find_peaks(clean, prominence=2.0)
f, pxx = system.signal.welch(x, fs=50.0, nperseg=1024) # power spectral density

What is included​

GroupFunctions
Detrending and windowsdetrend, get_window
Filter designbutter, cheby1, cheby2, ellip, bessel
Filter order selectionbuttord, cheb1ord, cheb2ord, ellipord
Frequency responsefreqz, freqz_sos, sosfreqz
Filteringlfilter, lfilter_zi, sosfilt, sosfilt_zi, filtfilt, sosfiltfilt
Smoothingsavgol_coeffs, savgol_filter, medfilt
Peak findingfind_peaks, peak_prominences, peak_widths
Spectral analysiswelch, periodogram, spectrogram, hilbert
Resamplingresample, resample_poly, decimate

Why it can be trusted​

  • Checked against SciPy at scale. Every test run checks about 65,000 calls, some 54 million samples of signal, against SciPy 1.18.1, on signals shaped like plant data.
  • Identical where it matters. Filtering, median filtering and peak finding match SciPy to the last bit; FFT-based results agree to within rounding.
  • Tested inside Ignition. The signed modules pass the same comparison inside Ignition 8.1 and 8.3, plus a gateway-scope check of every function, 1,000,000-point signals, and a concurrency test in which 8 threads must reproduce single-threaded results exactly.
  • Fast. On a test gateway, an order-8 zero-lag filter over 1,000,000 points took under 0.1 s, and a Welch spectrum of 1,000,000 points about 0.1 s.

What you can do with it​

  • Clean noisy measurements for trends and reports, without the lag of a moving average.
  • Smooth a live value in a gateway timer, carrying the filter's state from call to call.
  • Remove sensor spikes while keeping real steps sharp.
  • Get a smooth rate of change for rate-of-change alarms.
  • Find batch or cycle peaks, their prominence, width and timing.
  • Find the period of an oscillating control loop, or the envelope of a vibration signal.
  • Bring tags logged at different rates onto one time base, or thin long historian pulls without aliasing.

Next: Installation · Quick start · Function reference