A waveform may get spikes due to lightning and other sources of surges. It is necessary to remove the spike from the waveform and compensate with an auxiliary supply.But for this the relay has to operate and reclose within few milliseconds
In the architecture of the relay, the first stage comprises of signal filtering. There are different filtering methods that are used. i.e Kalman filters, FIR filters, IRR filters etc. However, the overall challenge with these relay is that they employ Fourier Transform (FT) based methods for signal processing i.e SFT, FFT, DFT etc. FT based methods cannot process transient signals.
One solution is to implement powerful signal processing tools such as i.e Wavelets transforms, Hilbert Huang transforms etc. together with anti aliasing filters. That way the relay may be able to effectively recognize and filter a spike.
A mechanical relay won't work asswitching times are in the tens of milliseconds.
A solid state relay (basically 2 MOSFETs) could do the trick, but will most likely be damaged by the voltage it's trying to interrupt.
Thus it is better to clip the spikes by means of transzorb diodes and other overvoltage protection devices (zener diodes, gas discharge tubes, varistors).