Keywords

1 Introduction

Problem proposed is removal of noise from an aperiodic and PieceWise Constant (PWC) signal. These signals occur in many contexts like bioinformatics, speech signals, astrophysics, geophysics, molecular biosciences and digital imaginary. Preprocessing of above said data is an undeniable paramount in any vital means of communication in present epoch. Each data has its own attribute and are essentially not the same. While denoising these attributes are considered based on the data chosen and denoised accordingly. The data chosen here is a real time 1D signal which is affected by noise by itself during transmission, or on recording the same. The salient idea behind the pre-processing stage is to retain the default quality of the data chosen rather than the re-styled one. In recent years many noise reduction techniques have been developed to produce a commotion free signal from the noise signal. Some of the algorithms used are Least Mean Squares Filtering, Adaptive Line Enhancer, Spectral Subtraction, Wiener filter, subspace, and spatial temporal prediction and much more [1, 2]. In PWC signal sudden variation in signal amplitude pose a fundamental challenge for conventional linear methods, e.g. Fast Fourier Transform (FFT) based noise filtering. While doing the above methods, signals converge slowly that is magnitudes of Fourier coefficients reduce much slower with increase in frequency. All these algorithms have their own pros and cons like reduced recoverability of data, computational complexity, less efficiency in processing real time signal and so on, which led to propose a wavelet transform based denoising method which offers simplicity and efficiency. Smoothing refers to removing high frequency components and retaining the low frequency components. Wavelet based denoising is not a smoothing function [3]. Wavelet retains the original signal regardless of the frequency content of the signal. The point to be stressed is that most of these algorithms are analyzed in MATLAB environment but introducing the same in GNU Radio can be applied more effectively for a real time signal [4]. In most cases Universal Software Radio Peripheral (USRP) and GNU Radio clubs up together to develop a real time Software Defined Radio (SDR) system. Since the outcome of such a combination were exorbitant this system could not be used in labs, research institutes, hobbyists and other commercial areas. RTL-SDR was then utilized for the same purpose, but this could not provide the efficiency (8 bit Anaolog to Digital Converter) that USRP (Typically 12 bit ADC) could afford to. Hence this work proposes an idea to overcome the above problem by introducing wavelet transform based denoising a signal which will be a key term for replacing USRP with RTL-SDR.

2 Literature Survey

Various researchers have proposed wavelet based denoising on 1D and 2D signals based on traditional way of thresholding and wavelet shrinkage which are unavailing for signals with high frequency noise content. Most of these methods were simulated in MATLAB which are exorbitant for commercial and educational basis. Moreover processing of real time signals becomes ineffectual. So a suitable platform and adequate algorithm is required. Slavy G. Mihov, Ratcho M. Ivanov and Angel N. Popov have proposed a denoising technique using wavelet transform which was applied on a large dedicated database of reference speech signals contaminated with various noises in several SNRs [5]. S. Grace Chang, Bin Yu and Martin Vetterli proposed a spatially adaptive wavelet thresholding method for image denoising. This is based on context modeling, a common technique used in image compression to adapt the coder to changing image characteristics [6]. Sylvain Sardy, Paul Tseng and Andrew Bruce have proposed a robust wavelet oriented predictor by having an optimizer model. Which is a nontrivial optimization problem and solved by choosing the smoothing and robustness parameters [7]. Sylvain Durand, Jacques Froment proposes a traditional wavelet denoising method based on thresholding and to restore the denoised signal using a total variation minimization approach [8]. It was made sure that the restoration process does not progressively worse the context information in the signal that has to be considered as a remark in the denoising step [8]. By observing this, wavelet transform based real time signal denoising is proposed in GNU Radio.

3 Wavelet Transform in GNU Radio for Denoising

3.1 Noise

Data captured from the real world known as signals do not exist without noise. In order to recover the original signal, noise must be removed. This task is more complex when the signal is aperiodic or piecewise constant in nature. The linear method achieved by low pass filtering is effective if and only if the signal to be recovered is sufficiently smooth, but it is not enough since piecewise constant signals are likely to introduce Gibbs phenomena while doing low pass filtering. By using Fourier transform aperiodic and signal overlapping cannot be substantially recovered from the noise affected signal in time-frequency domain. Wavelet transform in time-scale domain best suits for effective recovery of noise free signal from the contaminated one. In recent years Software Defined Radio has become an emerging field where it uses software instead of hardware components with Digital Signal Processor (DSP) or Field Programmable Gate Array (FPGA). SDR results in hardware reconfiguration by means of updating adoptable software written in DSP or FPGA. Therefore, SDR is a preferable choice in developing a wireless system instead of a traditional hardware radio when reconfigurability is required. At receiver end when SDR is built using RTL-SDR it results in reduced reconstruction performance when compared to SDR with USRP. This will introduce the noise occurrence in the signal mainly on flat top region of the signal. Wavelet transform based denoising will be solution to the above problem.

3.2 Wavelet

Wavelets could be dealt only with a prior knowledge in function spaces. In vector space, the vectors are represented as orthogonal unit vectors called bases. Fourier series is an extension of this idea for functions which are generally called as signals. Function is quantity which varies with respect to one or more running parameter, usually time and space. On the other hand Fourier transform gets struck with time-frequency localization. The above scenarios could be overcome using Wavelets. Similar to vector, function has its orthogonality characteristics and these orthogonal functions spans the function space. Wavelet obeys the above property in time-scale domain. Signal manipulation and interrogation using wavelets were developed primarily for the signals which are aperiodic, noisy, intermittent and transient. Current applications of wavelets include climate analysis, financial time series analysis, heart monitoring, condition monitoring of rotating machinery, seismic signal denoising, denoising of astronomical images, crack surface characterization, characterization of turbulent intermittency, audio and video compression, compression of medical and thump impression records, fast solution of partial differential equations, computer graphics and so on [3]. Based on the application continuous or discrete wavelet transform could be used. Here denoising is done using a continuous wavelet transform. Wavelets are waves that don’t last forever or in other words functions that are not predominant forever. It is significant which means exists only in particular range. Mathematically wavelet is represented as [3],

$$ \psi_{a,b} (t) = \frac{1}{{\sqrt {|a|} }}\psi \left( {\frac{t - b}{a}} \right) . $$
(1)

where, a and b are scaling and translation parameters which when varied gives new scaling and translation functions. The transform is performed by placing various scales of wavelet in various positions of the signal. This transforms the signal into another representation which will be more useful form, for analyzing the signals which is known as wavelet transform. By performing this in smooth and continuous manner it becomes a Continuous wavelet transform (CWT). Wavelet transform is defined as [3],

$$ w(a,b) = \int f(t)\frac{1}{{\sqrt {|a|} }}\psi \left( {\frac{t - b}{a}} \right)dt . $$
(2)

Unlike Fourier transform, we have a variety of wavelets that are used for signal analysis. Choice of a particular wavelet depends on the type of application used which will be dealt in the next section.

3.3 Multirate Signal Processing

One way to perform wavelet transform is through the use of different prediction and multirate signal processing steps. Here the predictor is type of wavelet transform used and Multirate signal processing blocks are used to form the scaling functions and filter banks. The complexity of Digital Signal Processing applications are reduced by altering the sampling rate used at different stages there by providing cost effective Digital Signal Processing structures [9]. The most basic blocks in multirate signal processing are M-fold decimator and L-fold interpolator. Wavelet transform is performed through interconnection of decimators, interpolators and filters by considering the rules that governs its interconnection [10]. Decimation is the process by which the sampling rate is reduced by an integer D without resulting in aliasing. Performing decimation mathematically is expressed as [9],

$$ \emptyset_{D} (m) = \left\{ {\begin{array}{*{20}l} {1,} & {m = Dm,D \in N^{ + } ,} \\ {0,} & {otherwise} \\ \end{array} } \right. $$
(3)
$$ x_{d} [n] = x[Dn] .\; $$
(4)

The M-fold decimator only keeps one out of every M elements of x[n] and ignores the rest. Interpolation is the inverse of the decimation where it is used to increase the sampling rate of a signal without changing its spectral component. This process will reduce the time period between the samples of the signal. Interpolation via zero insertion between the original sample signals will be mathematically expressed as [9] (Fig. 1),

Fig. 1
figure 1

Analyzer and synthesizer

$$ y(n) = \left\{ {\begin{array}{*{20}l} {x(\frac{n}{L}),\;n = 0, \pm L, \pm 2L, \ldots .} \hfill \\ {0,\quad otherwise } \hfill \\ \end{array} } \right. $$
(5)

3.4 GNU Radio

GNU Radio as a Software Defined Radio, which operates in multimode and performs multiple functions of receiving, processing and transmitting both real and non-real signals. A typical application of multirate digital signal processing in GNU Radio applications provides the tools like filter, decimator and and interpolator [11]. These tools could be used for performing wavelet transform in GNU Radio. Using available blocks in GNU Radio denoising the signal is effective by having wavelet transform. USRP is a range of SDR designed for development of transceiver system which could be controlled and used in GNU Radio platform. This set up results in an expensive system typically in the range of Lakhs. RTL-SDR is a substitute for USRP which generally has reduced efficiency when it comes to reconstruction of signals in receiver end. This typically ranges in few thousands and best suited for commercial purpose if modified for better efficiency which could be possibly achieved by inserting wavelet transform based denoising in receiver end.

4 Proposed Model

Before denoising a signal it is prerequisite for processing the signal i.e. information about signals maximum frequency and selection of wavelet. As mentioned in Sect. 3.2, it is necessary to select the required wavelet depending upon application for effective result and reconstruction. Miss selection of wavelets may lead to discontinuity in the signal. For example to work with the signals with flat tops Haar wavelets are relevant. Daubechies and Coiflet wavelet could be used for signals with sharp edges. Smooth signals use Symlet, Gaussian-Spline or Morlet wavelets. In this case the PWC signal are denoised using Haar wavelets. Speech signal and the signals which are received through RTL-SDR and USRP are denoised using Symlets. Maximum frequency information about a signal must be known in prior to avoid aliasing while applying scaling operation. Since scaling is done using a decimator sampling rate and maximum frequency information of a signal are taken into consideration. The proposed model is shown below, Consider the following signal (Fig. 2),

Fig. 2
figure 2

Different wavelet functions

Fig. 3
figure 3

Piecewise constant signal denoised in GNU Radio

$$ e[n] = x[n] + g[n] .\; $$
(6)

To recover the original signal x[n] from contaminated signal e[n] the noise g[n] must be removed. The non-smooth signal undergoes wavelet analysis which is achieved by using decimator, low and high pass filters. Changing the tapping coefficients in decimator will result in a different wavelet functions and these are scaled by placing decimators in cascaded structure. The approximation order is K if all its wavelets have K vanishing moments [3]. That is,

$$ \int {t^{m} \psi (t)dt = 0,\,i = 0,1;0 \le m \ge K - 1} . $$
(7)

In this case K = 4 when and sampling rate is 32 kHz. As the number of decimators gets increased new function spaces will be introduced and this could be mathematically represented as,

$$ \ldots ..V_{0} \subset V \subset \ldots .V_{\infty } \quad and\quad \ldots W_{0} \,\bot\, W_{1} \,\bot \,W_{2} \ldots \,. $$
(8)

where \( W_{n} \) is the complementary space of \( V_{n} \). In the synthesis part thresholding of high frequency coefficients i.e. approximated coefficients will take place to smoothen the contaminated signal. Smoothing takes place while reconstructing signal from coarser scale to finer scale. In simple words we omit the coefficients required to reconstruct the high frequency components. For example,

$$ V_{j} = V_{j - 1} + W_{j - 1} \quad and\quad V_{j} = V_{j - 1} + CW_{j - 1} . $$
(9)

where, \( C \) is the Thresholding factor.

5 Experimental Results

The test signals are transmitted using USRP (USRP N210-Carrier Frequency = 100 MHz) and received through RTL-SDR (RTL2832) and USRP. Further, denoising is done using wavelet transform in GNU Radio (Fig. 4). After denoising, the Mean Square Error (MSE) rate of these signals were calculated. Results showed that there was only small (1.38 dB) variation on receiving the same signal by means of RTL-SDR and USRP after denoising. Respective MSE rates were RTL-SDR 4.997246 dB and USRP 4.997137 dB which shows that replacement of USRP with RTL-SDR shows almost no variation in system efficiency when wavelet transform based denoising applied in the receiver end for efficient signal reconstruction. Two more test signals [Speech signals (Figs. 5 and 6) and PWC signals (Fig. 3)] were included to check the performance of the proposed model. It showed great performance in denoising these signals.

Fig. 4
figure 4

Received RTL-SDR and USRP signals denoised in GNU Radio

Fig. 5
figure 5

Denoised Speech signal in Cepstral domain

Fig. 6
figure 6

Speech signal denoised in GNU radio

6 Conclusion

Various aperiodic and piecewise constant signals that were corrupted with noise was effectively retained by using wavelet transform based denoising in GNU Radio platform. Though there were methods which previously existed for the removal of noise from a 1-Dimensional signal in GNU Radio, this proposal proves to be simple and effective with less computational steps. There was only a small variation in mean square error rate (1.38 dB) on receiving the same signal by means of RTL-SDR and USRP after denoising. Hence a commercial cost effective SDR could be built by replacement of USRP with RTL-SDR at receiver end. As we have dealt with real time signals this method could be used in various applications like reception of NOAA satellite signal and FM signals. Denoising an image by receiving NOAA satellite signal may prove to be one such application for future development.