Design of Infinite Impulse Response Notch Filter for Removing Powerline Interferences in Signals using SCILAB

DOI : 10.17577/IJERTV10IS090035

Download Full-Text PDF Cite this Publication

Text Only Version

Design of Infinite Impulse Response Notch Filter for Removing Powerline Interferences in Signals using SCILAB

Shibani Kar

Assistant Professor and Head In-charge, Department of Electronics and Communication Engineering

Sambalpur University Institute of Information Technology, Jyoti Vihar, Burla, Odisha

Akansha Sadangi

Student, M.Sc Electronics ,Department of Electronics, Sambalpur University, Jyoti Vihar, Burla

AbstractIn this paper the design and use of Infinite Impulse Response Notch filter has been studied and its performance has been evaluated using elementary sinusoidal signals. The removal of power-line interference from the signals of interest is a very important application of the notch filter. Power-line interference of 50Hz effects the accurate representation of signals as most of the signals are susceptible to the most popular 50hz noise due to the use of electronic systems. Hence, a second order IIR digital notch filter is designed using SCILAB which is an open source software tool to remove the interference and to present a noise free signal for the further processing by digital systems and applications. All the necessary signals are generated using simulations on SCILAB. Signal to noise ratio is selected as an objective measure in order to know the efficiency of the notch filter.

KeywordsIIR Filter; Notch Filter, powerline interference; SCILAB; sinusoidal signals, SNR

  1. INTRODUCTION

    Filters are used to remove the interferences from the desired signals. All electronic devices are susceptible to power-line interferences that is a 50Hz or 60 Hz sinusoidal signal. Sinusoidal noises disrupts the normal behavior and accurate representation of signal of interest. The sinusoidal noise introduced by power supply affects mostly the electronic equipments used in medical sciences. The 50Hz or 60Hz power-line interference corrupt a variety of biomedical signals like ECG, EMG, EEG etc. Various types of digital filters are available which can remove the 50Hz / 60 Hz interference. Digital Filters are categorized into two types: FIR filters and IIR filters.

    In this paper, an IIR notch filter is designed to remove the sinusoidal noises added in the weak signals . Notch filters are basically band stop filters designed to eliminate single frequency signals. Notch filters has found immense popularity in the removal of power-line interferences in audio and biomedical signals. In our implementation, a second order digital IIR notch filter is designed. The sinusoidal signals are generated and passed through the filter to study the effect of power-line interference removal. The ECG signal is also simulated in the software and then passed through the filter to study performance of the filter. SCILAB is used here for the simulation purpose. SCILAB is an open processing software tool to study signal processing applications.

  2. RELATED WORKS

    In paper [1] various techniques for the removal of power- line interference are studied. The paper discusses the removal of power-line interference from the ECG signal by the use of LMS filter and wavelet . The paper deals with various types of interferences corrupting the ECG signal like power-line interference, baseline wandering, channel noise, contact noise, muscle artifacts etc. The paper compares the IIR notch filter, FIR filter, Adaptive LMS filter and Wavelets for the signal de- noising and proposed that the wavelet filter performs better than others.

    In paper[2] the use of adaptive filters for the removal of power-line interference from the ECG signal is studied. A simple adaptive algorithm Least Mean Square is used for MIT/BIH arrhythmia database with added 60Hz noise. The algorithm performs satisfactorily in cancelling the sinusoidal noises.

    In paper[3] discusses that the Power-line Interference is the main cause of noise the ECG signal. An adaptive notch filters are implemented and the results are compared with the conventional digital notch filter.

    In paper [4] the paper discusses the design aspects of second order notch filter for the removal of AC 50 Hz power interference. The paper discusses the IIR filter design theory and implementation in DSP. The IIR notch filter is used to remove the 50Hz noise from the audio signal and the results are effective in treating the noise.

    In our work we have discussed and implemented a digital IIR notch filter in SCILAB to remove 50Hz PLI from the synthetic ECG signal.

  3. DESIGN OF IIR NOTCH FILTER USING SCILAB Notch filter is a band stop filter that is used to remove a

    specific frequency component from the signal of interest. For a notch filter the band of frequencies is very narrow. The range of frequencies that a band stop filter attenuates is called the stop band.

    where 0 is the notch frequency. [4]

    The frequency response of the filter is given below:

    Figure 1: Notch Filter Frequency Response[5]

    1. Second Order IIR Notch Filter Design

      Second order IIR Notch filter design equation:

      Here the angular frequency 0 is the notch frequency that needs to be attenuated. The H(z) is plotted across z-circle. The equation has two poles that are plotted across the unit circle where 'r' is the radius of the poles and they must lie between 0<r<1. When the radius 'r' of pole is close to unity the frequency response at notch filter is narrower. The second order equation simplified equation is given below:

    2. Implementation of Second order Notch filter using SCILAB

    Generate a 50 Hz sinusoidal signal and a 10 Hz sinusoidal signal using simulation in scilab. The 50 hz signal is used as PLI noise. The noise is added to the signal to generate the noisy signal.

    clear; close, f =50; fs =1000; Y=sin(2*%pi*10*t),Y1=2*sin(2*%pi*50*t)

    Notch filter design Simulation

    The parameter r=0.98, w =2* %pi*f/fs, z1=exp(%i*w);

    z2=exp(-%i*w); p1=r* exp (%i*w); p2=r* exp (-%i*w); z=%z;

    num1 =( real ((z-z1)*(z-z2))),

    den1 =( real (((z-p1)*(z-p2)))), Hz= num1./den1,

    [p fr ]= frmag (Hz ,512)

    The ECG signal is synthetically generated in scilab [6]. The PLI interference is added to it and passed through the filter. All the simulations are performed in SCILAB software tool that is an open source tool.

  4. SIMULATION RESULTS

  1. Notch Filter Magnitude Response(Peak at 50 Hz)

    Figure 2. IIR Notch filter 50 Hz in SCILAB

  2. Clean Sinusoidal Signal of 10Hz

    Figure3: Clean Signal of 10Hz in SCILAB

  3. Powerline Interference 50Hz in SCILAB

    Figure 4. PLI 50 Hz Signal in Scilab

  4. Noisy signal Generation by addition of clean signal with PLI interference

    Figure 5. Noisy Signal in SCILAB

  5. IIR Notch Filter Output in SCILAB

    Figure 6. Notch filter output filtered signal

  6. Clean Synthetic ECG signal in SCILAB

    Figure 7. Clean ECG in Scilab

  7. Noisy ECG simulation in Scilab

    Figure 8. 50 Hz PLI added to clean ECG in Scilab

  8. Filtered ECG in SCILAB(IIR Notch removes 50Hz PLI)

A. Objective measure

The signal to noise ratio is used as an objective measure to find the efficiency of IIR notch filter implemented in this work.

Signal to noise ratio(SNR) numbers are all about the strength of the desired signal compared to the unwanted noise. The larger the number , the more the strength of signal as compared to noise. The simulation code in SCILAB is given below:

//calculation of snr before filtering snr_before=mean(clean_ecg.^2)/mean(Noisy_ECG.^2); snr_befor_db=10*log10(snr_before)// in dB disp(snr_before_db)

//calculation of snr after filtering residual_noise=clean_ecg(1:1001)-filtered ecg ; snr_after=mean(filtered ecg.^2)/mean(residual_noise.^2); snr_after_db=10*log10(snr_after)

disp(snr_after_db)

Table 1. SNR output measured

ECG Signal

Before filtering

After Filtering

IIR Notch filter Output

SNR Value

6.3449535

13.503649

CONCLUSION AND FUTURE WORK

The present experimental work discusses the implementation of IIR Notch filter for the removal of power- line interference . By observing the filter output and SNR levels, it is clear that the filter is successful in removing the PLI interference noise from the signal. The work can further

be extended in future by using adaptive filtering methods for the design of adaptive notch filter.

Acknowledgment

This work is an outcome of an M. Sc student Project, completed under my guidance.

REFERENCES

  1. S. Thalkar and D. Upasani, Various Techniques for Removal of Power Line Interference From ECG Signal, vol. 4, no. 12, p. 12, 2013.

  2. Y.-L. Liu, N.-C. Chang, S.-F. Hsu, D.-L. Lin, and Y.-D. Lin, AN ADAPTIVE ALGORITHM FOR CANCELING POWER-LINE INTERFERENCE IN BIOPOTENTIAL MEASUREMENT, Biomed. Eng. Appl. Basis Commun., vol. 16, no. 06, pp. 350354, Dec. 2004, doi: 10.4015/S1016237204000487.

  3. B. Chen, Y. Li, X. Cao, W. Sun, and W. He, Removal of Power Line Interference From ECG Signals Using Adaptive Notch Filters

    of Sharp Resolution, IEEE Access, vol. 7, pp. 150667150676, 2019, doi: 10.1109/ACCESS.2019.2944027.

  4. C. M. Wang and W. C. Xiao, Second-order IIR Notch Filter Design and implementation of digital signal processing system, Control Autom., p. 3, 2013.

  5. Electrical-Technology, Notch filter- Theory, circuit design and Application, Electrical-Technology | All about Electrical Engineering. https://www.electrical-technology.com/2019/05/Notch- filter-theory-circuit-design-and-Application.html (accessed Sep. 05, 2021).

  6. Scilab Manual for Digital Signal Processing by Dr. Prarthan Mehta, Prof Pinkesh Patel, Dharmsinh Desai University.

Leave a Reply