1 Introduction

EMG signals are electrically generated brainwaves due to muscle activity. There are two variants of EMG: surface electromyogram (sEMG) and intramuscular EMG [8]. sEMG (10 Hz to 500 Hz) usually provides information about specific muscle activity at a time instant, a popular research topic in medicine and engineering. sEMG signal helps to understand the human body’s response under healthy and various clinical conditions. To effectively implement the human–computer interface (HCI) system [25], proper sEMG signals must control the device based on muscular action or identified pattern. During the recording process of sEMG, several artefacts, such as baseline wander (BW), electrode motion (EM) and power-line noise (PLN), corrupt the clean sEMG signal and the truthful information within it gets altered [28]. Many methodologies have been developed, such as a wavelet transform [29], independent component analysis [33], empirical mode decomposition [19] and higher-order statistics [3], to analyse the influence of various noises in sEMG signals.

The easiest way of removing the narrowband interference from sEMG signals is to apply a linear recursive digital notch filter. However, the drawback with notch filtering is the distortions in the filtered signal [21].

The significant advantage of the wavelet-based methods is that it can be decomposed into time and frequency domains. Moreover, the signals can be analysed and translated at different resolutions or scales [10]. Furthermore, attenuation and widening problems can be overcome by applying an advanced wavelet transform known as wave atom transform (WAT) [4]. In [14], a novel noise suppression method has been employed for sEMG signals using orthogonal WAT and generalised autoregressive conditional heteroscedasticity (GARCH) model with maximum a posteriori (MAP) estimator for denoising of sEMG signals.

Adaptive filtration techniques and evolutionary algorithms have proved effective in biomedical signal processing [1, 2, 18, 27, 30,31,32]. In [31], a dual-stage swarm intelligence-based adaptive filter was implemented, and good results were reported for electrocardiogram (ECG) noise detection for both high- and low-frequency noise components. The adaptive infinite impulse response (IIR) filter coefficients of the present work are optimised using particle-based algorithms to minimise the objective function.

The highlights of the manuscript are as follows:

  1. i.

    A novel SHO algorithm has been applied to drive the filter weights for reducing the MSE as an objective function. The SHO has not been used to optimise the adaptive filter for noise removal from sEMG signals.

  2. ii.

    The proposed SHO-optimised filter model is examined and tested for concerned techniques and recently reported results in relevant fields. The proposed model has been perceived to outdo all methods reported in the literature.

  3. iii.

    An IIR digital filter is considered for adaptive filter implementation. Furthermore, a cascade form of adaptive filtration methodology has been applied to remove various artefacts from noisy sEMG signals.

  4. iv.

    To verify the accuracy of the algorithms, various levels of AWGN at SNR ranging from − 5 to 15 dB have been incorporated across the datasets to obtain the noisy sEMG signals.

  5. v.

    The proposed methodology is implemented in the TMS320C6713 kit to verify its practical feasibility.

  6. vi.

    The robustness of the algorithms applied to optimise the adaptive model has been evaluated by the Wilcoxon hypothesis test.

The remaining sections of the article have been arranged as follows: Sect. 2 demonstrates the problem statement; the methodology used and technique employed for optimisation are explained in Sect. 3; results obtained by simulation and the experiments are tabulated in Sect. 4; Sect. 5 shows the discussion part; and the conclusion and future scope are mentioned in Sect. 6.

2 Problem Statement

Adaptive filtering offers an association of two signals in a feedback manner [1, 2, 18, 27, 30,31,32]. The schematic representation of a standard adaptive filter (AF) is depicted in Fig. 1, in which s(n) is the actual signal of interest, d(n) is the mixed-signal, x(n) is the noise fed to the adaptive filter, which yields y(n), and the error e(n) is the difference of d(n) and y(n) expressed in (1)–(3). The filtering action could be either finite/infinite impulse response (FIR/IIR) filter type [23, 24]. The structure shown in Fig. 1 can be altered to meet the application-specific requirement in the science and engineering fields, such as noise cancellation [26], system identification [13], channel equalisation [16] and QRS detection [12].

Fig. 1
figure 1

Schematic representation of the adaptive filter

In this paper, a cascaded noise-cancelling IIR filter is implemented and presented in Fig. 2. The input–output relation of the IIR system is given by the transfer function in (4). In (4), m is the order of the system, where the numerators and denominators, ai and bi, respectively, are the IIR filter coefficients. It is considered that all the coefficients are real, so the IIR filter coefficient vector \(w\left( n \right) = \left[ {a_{i} ,b_{i} } \right]\).

$$ d\left( n \right) = s\left( n \right) + x\left( n \right) $$
(1)
$$ y\left( n \right) = \mathop \sum \limits_{i = 0}^{m} a_{i} x\left( {n - i} \right) - \mathop \sum \limits_{i = 1}^{m} b_{i} y\left( {n - i} \right) $$
(2)
$$ e\left( n \right) = d\left( n \right) - y\left( n \right) $$
(3)
$$ W\left( z \right) = \frac{{\mathop \sum \nolimits_{i = 0}^{m} a_{i} z^{ - i} }}{{1 + \mathop \sum \nolimits_{i = 1}^{m} b_{i} z^{ - i} }} = \frac{{a_{0} + a_{1} Z^{ - 1} + a_{2} Z^{ - 2} + a_{3} Z^{ - 3} + \cdots + a_{m} Z^{ - m} }}{{1 + b_{1} Z^{ - 1} + b_{2} Z^{ - 2} + b_{3} Z^{ - 3} + \cdots + b_{m} Z^{ - m} }} $$
(4)
Fig. 2
figure 2

Proposed adaptive filter based on the SHO

3 Methodology—ANC Implemented with CSA, BGSA and SHO

As depicted in Fig. 2, the tempered sEMG waveform d1(n) consists of the actual sEMG waveform s(n) and interference in the form of BW, EM and PLN, considering that noises are uncorrelated with s(n). Here, s(n) is taken from the standard database publicly available on the Physionet website [9]. The BW and EM signals are taken directly from the MIT-BIH noise stress dataset [17]. The PLN is generated through MATLAB with a frequency of 50 Hz and a length equal to d1(n). Here, q1(n), q2(n) and q3(n) are reference noises simulated using the MATLAB to represent BW, EM and PLN in sEMG waveform d1(n), respectively. The reference noises q1(n), q2(n) and q3(n) are fed to AF, which yield the outputs y1(n), y12(n) and y3(n), respectively. The signal e1(n) is calculated by subtracting y1(n) from d1(n) and provided to the AF to update the coefficient vector w1(n) in every cycle. The entire procedure continues until e1(n) or BW noise is reduced to a certain level. The output from the first AF contains \(e_{1} \left( n \right) = d_{2} \left( n \right) = s\left( n \right) + {\text{EM}} + {\text{PLN}}\). The noisy sEMG is forwarded to the second AF, where the signal e2(n) is calculated by subtracting y2(n) from d2(n) and e2(n) is used to update the filter coefficient vector w2(n) in the entire cycle until e2(n) is minimised to the lowest possible value. The output from the previous AF is denoted as \(e_{2} \left( n \right) = d_{3} \left( n \right) = s\left( n \right) + {\text{EM}}\) and is forwarded further. The signal e3(n) is the difference between d3(n) and y3(n). The error signal e3(n) is used to drive the updating process of the coefficient vector w3(n) in each iteration until e3(n) is reduced to an acceptable value. The last yield s′(n) closely matches with s(n). The yielded signals from the first, second and third stages of the AF are expressed mathematically as y1(n), y2(n) and y3(n) in (6), (9) and (12), respectively.

$$ d_{1} \left( n \right) = s\left( n \right) + {\text{BW}} + {\text{EM}} + {\text{PLN}} $$
(5)
$$ y_{1} \left( n \right) = \mathop \sum \limits_{i = 0}^{m} a_{i} q_{1} \left( {n - i} \right) - \mathop \sum \limits_{i = 1}^{m} b_{i} y_{1} \left( {n - i} \right) $$
(6)
$$ e_{1} \left( n \right) = d_{1} \left( n \right) - y_{1} \left( n \right) $$
(7)
$$ d_{2} \left( n \right) = s\left( n \right) + {\text{EM}} + {\text{PLN}} $$
(8)
$$ y_{2} \left( n \right) = \mathop \sum \limits_{i = 0}^{m} a_{i} q_{2} \left( {n - i} \right) - \mathop \sum \limits_{i = 1}^{m} b_{i} y_{2} \left( {n - i} \right) $$
(9)
$$ e_{2} \left( n \right) = d_{2} \left( n \right) - y_{2} \left( n \right) $$
(10)
$$ d_{3} \left( n \right) = s\left( n \right) + PLN $$
(11)
$$ y_{3} \left( n \right) = \mathop \sum \limits_{i = 0}^{m} a_{i} q_{3} \left( {n - i} \right) - \mathop \sum \limits_{i = 1}^{m} b_{i} y_{3} \left( {n - i} \right) $$
(12)
$$ e_{3} \left( n \right) = d_{3} \left( n \right) - y_{3} \left( n \right) $$
(13)

To reduce the design complexity of the proposed system, linear filter has been implemented. The linear filter does not serve the required purpose if the signals are nonlinear. Such cases demand the need for nonlinear Volterra filters [13] and bilinear filters [7]. On the other hand, a neural network approach, fuzzy logic or genetic algorithm has also been popular [11]. The authors have implemented an optimal adaptive IIR filter whose coefficients are generated by applying various nature-propelled algorithms such as CSO, BGSA and SHO to suppress the noise.

Various evolutionary algorithms have solved many engineering optimisation problems, namely particle swarm optimisation (PSO), quadrature particle swarm optimisation (QPSO), cuckoo search (CS), modified cuckoo search (MCS), bounder range artificial bee colony (BR-ABC), least mean square enhanced squirrel search (LMS-ESS), recursive least mean square enhanced squirrel search (RLS-ESS), cat swarm optimisation (CSO), binary gravitational search algorithm (BGSA) and spotted hyena optimisation (SHO) [1, 2, 6, 15, 18, 24, 27, 30]. All the metaheuristic algorithms are similar in producing random sets of solutions. The most suitable solution is noted and utilised to update the new solution sets according to optimisation problems. The metaheuristic algorithms differ in their update equations [1, 2, 6, 13, 15, 18, 23, 24, 30,31,32]. The details of the variables used in the algorithms are mentioned in Table 1. As the CSO and BGSA are well studied, the SHO description is only presented in the subsequent section.

Table 1 Control variables for CSO, BGSA and SHO

The population has been considered 25 irrespective of algorithms throughout the work, and 1000 iterations have been evaluated. Instead of the whole sEMG signal, a block of 10-s sample size has been tested on the proposed ANC.

3.1 Objective Function Formulation

The random solution sets generated by the SHO incorporate all the coefficients of the adaptive IIR filter. For all the solutions, MSE is calculated, and the solution for which a minimum score is obtained is considered the optimal coefficients vector of the proposed filter. So, the MSE is treated as the cost function for the optimisation problem.

At the nth cycle, the MSE of the ith search agent is represented by (14).

$$ {\text{MSE}} = \frac{1}{N}\mathop \sum \limits_{i = 0}^{N - 1} \left( {{\text{EMG}}_{{\text{t}}} \left( i \right) - {\text{EMG}}_{{\text{f}}} \left( i \right)} \right)^{2} $$
(14)

where EMGt represents the template or pure sEMG; EMGf is the denoised sEMG waveform; and N is the number of samples.

3.2 Employed Optimisation Algorithm—SHO

SHO is encouraged by spotted hyenas’ social hierarchy and hunting attitude [6]. Cohesive clusters could be helpful for efficacious cooperation among spotted hyenas. The hunting behaviour of spotted hyenas inspires the integral equations of SHO.

figure a

3.2.1 SHO Encoding

This subsection provides the precise equations for searching, encircling, hunting and attacking the prey. After that, the SHO algorithm is explained by pseudocode (Algorithm 1), and the flow chart is given in Fig. 3.

Fig. 3
figure 3

Flow chart of SHO

3.2.2 Encircling Prey (Exploration)

Encircling is expressed as follows:

$$ \overrightarrow {{D_{{{\text{hy}}}} }} = \left| { \vec{B} \cdot \overrightarrow {{L_{{{\text{py}}}} }} \left( {{\text{Iter}}} \right) - \vec{L}\left( {{\text{Iter}}} \right) } \right| $$
(15)
$$ \vec{L}\left( {{\text{Iter}} + 1} \right) = \overrightarrow {{L_{{{\text{py}}}} }} \left( {{\text{Iter}}} \right) - \vec{E} \cdot \overrightarrow {{D_{{{\text{hy}}}} }} $$
(16)

where Dhy denotes the distance between the prey and spotted hyena, Iter refers to the present iteration, \(\vec{B}\) and \(\vec{E}\) are vector coefficients, \(\overrightarrow {{L_{{{\text{py}}}} }}\) indicates the vector location of prey and \(\vec{L}\) is the vector location of the spotted hyena. However, || and · represent the absolute value and multiplication. The vectors \(\vec{B}\) and \(\vec{E}\) are represented as follows:

$$ \vec{B} = 2\cdot\overrightarrow {{r_{1} }} $$
(17)
$$ \vec{E} = 2\vec{s}\cdot\overrightarrow {{r_{2} }} - \vec{s} $$
(18)
$$ \vec{s} = 5 - \left( {{\text{Iter}}*\left( {5/{\text{Max}}_{{{\text{Iter}}}} } \right)} \right) $$
(19)

where \({\text{Iter}} = 1, 2, 3 \ldots . {\text{Max}}_{{{\text{Iter}}}}\) is to trade off between exploitation and exploration, \(\vec{s}\) decreases linearly from 5 to 0, and \(\overrightarrow {{r_{1} }}\) and \(\overrightarrow {{r_{2} }}\) are randomly selected vectors in [0, 1].

3.2.3 Hunting Prey

The best search agent denotes the prey’s location to define the spotted hyena’s attitude mathematically. Other search agents move towards it and deliver the best solutions accumulated thus far to update their locations. It is expressed mathematically as:

$$ \overrightarrow {{D_{{{\text{hy}}}} }} = \left| { \vec{B} \cdot \overrightarrow {{L_{{{\text{hy}}}} }} - \overrightarrow {{L_{{{\text{ky}}}} }} } \right| $$
(20)
$$ \overrightarrow {{L_{{{\text{ky}}}} }} = \overrightarrow {{L_{{{\text{hy}}}} }} - \vec{E}\cdot\overrightarrow {{D_{{{\text{hy}}}} }} $$
(21)
$$ \overrightarrow {{G_{{{\text{hy}}}} }} = \overrightarrow {{L_{{{\text{ky}}}} }} + \overrightarrow {{L_{{{\text{ky}} + 1}} }} + \cdots \overrightarrow {{L_{{{\text{ky}} + M}} }} $$
(22)

where \(\overrightarrow {{L_{{{\text{hy}}}} }}\) denotes the location of the best-spotted hyena initially and \(\overrightarrow {{L_{{{\text{ky}}}} }}\) denotes the location of other spotted hyenas. Here, M is the number of spotted hyenas and is given by:

$$ M = {\text{Count}}_{{{\text{ns}}}} \left( {\overrightarrow {{L_{{{\text{hy}}}} }} ,\overrightarrow {{L_{{{\text{hy}} + 1}} , }} \overrightarrow {{L_{{{\text{hy}} + 2}} }} , \ldots .,\left( {\overrightarrow {{L_{{{\text{hy}}}} }} + \overrightarrow {{M_{{\text{r}}} }} } \right)} \right) $$
(23)

where \(\overrightarrow {{M_{{\text{r}}} }}\) is a randomly selected vector in [0.5, 1], ns denotes the number of solutions and counts all candidate solutions after adding with \(\overrightarrow {{M_{{\text{r}}} }}\), which are very similar to the best solution in a provided search space, and \(\overrightarrow {{G_{{{\text{hy}}}} }}\) is a group of M number of best solutions.

3.2.4 Attacking (Exploitation)

To mathematically model for attacking the prey, i.e. to determine the optimal solution, \(\vec{s}\) value needs to be decreased continuously, where \(\vec{s}\) is the step size that the spotted hyena takes to attack prey. It is evident that, when searching for prey, the spotted hyenas increase their number of steps. The equation for attacking target is given by:

$$ \vec{L}\left( {{\text{Iter}} + 1} \right) = \frac{{\overrightarrow {{G_{{{\text{hy}}}} }} }}{M} $$
(24)

where \(\vec{L}\left( {{\text{Iter}} + 1} \right)\) is the location of the current solution. The SHO permits its agents to update their spots in the prey’s direction.

\(\vec{B}\) and \(\vec{E}\) favour the SHO algorithm for exploration and exploitation. As \(\vec{B}\) decreases, half the iterations are devoted to exploration (\(\vec{E} > 1\)) and the rest is devoted to exploitation (\(\vec{E} < 1\)) [23]. \(\vec{B}\) consists of randomly selected values within [0, 2]. This element delivers random weights for prey to randomly accentuate (\(\vec{B} > 1\)) or deemphasise (\(\vec{B} < 1\)) the effect of prey in defining the distance in (17).

4 Simulation Results

After several experimental tests to estimate the proffered approach, the outcomes acquired are contrasted qualitatively and quantitatively with other techniques in the literature. Also, for testing, the worst contamination scenario of AWGN (− 5 to 15 dB) in the sEMG signal has been removed by the proposed approach.

4.1 Used Datasets and Other Details

A) Examples of electromyograms (EEDB): The data were collected from the Medelec Synergy N2 sEMG Monitoring System. A 25-mm concentric needle was placed in the muscle (tibialis anterior) for all subjects. The subject was instructed to dorsiflex the foot softly against resistance. The needle was repositioned until the motor unit potentials had been identified. Lastly, the data were recorded, and the subject removed the needle. Here the data were noted at 50 kHz and then lower-sampled to 4 kHz (refer to Fig. 4) [9]. The description of associated subjects is given in Table 2.

Fig. 4
figure 4

Various clinical sEMG signals a healthy, b neuropathy and c myopathy records from EEDB

Table 2 Characteristic features of EEDB

B) University College Dublin Sleep Apnea Database (UCDDB): These records were collected at St. Vincent’s University Hospital Sleep Disorders Clinic. It contains 25 whole-night polysomnograms with simultaneous three-channel Holter ECG of adult patients with sleep-disordered breathing issues. Polysomnograms were recorded using the Jaeger/Toennies system. Submental sEMG signal has been considered from record ucddb002.rec (refer to Fig. 5) stored at 128 samples per frame and had a gain of 4095 adu/nV with an ADC resolution of 12 bits [9].

Fig. 5
figure 5

Submental sEMG signal of record ucddb002_rec from UCDDB

C) Noise stress test database (NSTDB): Three noise signals were collected from the dataset by marking intervals at which baseline wander (BW), muscle noise (MN) and electrode motion artefact (EM) exist predominantly [17].

4.2 Comparative Analysis of Performance

The proposed approach-based ANC has been tested by comparing its noise removal capability to existing state-of-the-art techniques such as discrete wavelet transform (DWT) [10], WAT [4], DWT + GARCH [14], WAT + GARCH [14], LMS [30], RLS [30], PSO [30], QPSO [30], CS [30], MCS [30], ABC [30], ABC-MR [30], BR-ABC [30], LMS-ESS [18] and RLS-ESS [18]. All the simulation programs have been run in MATLAB 9.2.

4.2.1 Qualitative Interpretation

Qualitative interpretation of the resulting signal, as mentioned in [1, 22, 31, 32], has been presented in this section by comparing it with actual sEMG. A careful visual inspection of each irregular amplitude variation at every sample has been performed. The attainment of the proffered ANC has been investigated on the sEMG waveform altered with − 5 to 15 dB AWGN. MATLAB synthetically introduces the reference noise signal, ensuring that the length matches the sEMG signal.

The sEMG waveforms emg_healthy, emg_neuropathy and emg_myopathy from EEDB and ucddb002.rec from UCDDB have been presented and compared with their filtered version obtained using different algorithm-based ANCs. The proffered approach-based ANC produces results that closely correlate with the original version of sEMG.

4.2.1.1 ANC Performance Analysed Qualitative Results for EEDB

The signal shown in Fig. 6a is an sEMG waveform from emg_healthy of EEDB contaminated with various noises, including AWGN of 10 dB. The signal shown in Fig. 6b is a clean sEMG waveform from emg_healthy of EEDB. In response to the corrupted sEMG waveform, the outcomes of the optimised ANC through CSO, BGSA and SHO are delineated in Fig. 6c–e, respectively.

Fig. 6
figure 6

Outcomes of ANC on tempered emg_healthy of EEDB: a corrupted sEMG waveform, b sEMG template signal, c filtered sEMG waveform using optimal ANC by CSO algorithm, d denoised sEMG waveform using optimal ANC by BGSA, e estimated sEMG waveform using optimal ANC by SHO

The plots of pure sEMG waveform of emg_healthy and estimated sEMG via optimised ANCs based on CSO, BGSA and SHO algorithms are shown in Fig. 7a. The enlarged section in Fig. 7b shows that the proffered SHO-optimised ANC delivers a refined magnitude response of the sEMG waveform.

Fig. 7
figure 7

a Responses of optimised ANCs by CSO, BGSA and SHO algorithms on emg_healthy of EEDB b magnified section

Figure 8a shows a noisy version of emg_neuropathy from EEDB. The pure sEMG waveform is shown in Fig. 8b. The outcomes of optimised ANCs by CSO, BGSA and SHO are demonstrated in Fig. 8c–e, respectively. The responses of optimised ANCs by CSO, BGSA and SHO are compared with the clean sEMG and delineated in Fig. 9a. For better interpretation, a magnified version of the same is depicted in Fig. 9b.

Fig. 8
figure 8

Outcomes of ANC on tempered emg_neuropathy of EEDB: a corrupted sEMG waveform, b sEMG template signal, c filtered sEMG waveform using optimal ANC by CSO algorithm, d denoised sEMG waveform using optimal ANC by BGSA, e estimated sEMG waveform using optimal ANC by SHO

Fig. 9
figure 9

a Responses of optimised ANCs by CSO, BGSA and SHO algorithms on emg_neuropathy of EEDB, b magnified section

Figure 10a shows a tempered version of record emg_myopathy from EEDB. The pure sEMG waveform is shown in Fig. 10b. The responses of optimised ANCs by CSO, BGSA and SHO are demonstrated in Fig. 10c–e, respectively. The plots of the pure sEMG waveform from emg_myopathy versus signals estimated by CSO, BGSA and SHO-optimised ANCs are shown in Fig. 11a. The magnified portion of Fig. 11a is presented in Fig. 11b for better discernment.

Fig. 10
figure 10

Responses of ANC on corrupted myopathy sEMG waveform from EEDB: a corrupted sEMG waveform, b sEMG template signal, c filtered sEMG waveform using ANC optimised by CSO algorithm, d filtered sEMG waveform using ANC optimised with BGSA, e estimated sEMG waveform using ANC optimised incorporating SHO

Fig. 11
figure 11

a Responses of optimised ANCs by CSO, BGSA and SHO algorithms on emg_myopathy of EEDB, b magnified section

4.2.1.2 ANC Performance Analysed Qualitative Results for the UCDDB

The waveform depicted in Fig. 12a originated from record ucddb002_rec of UCDDB. It is contaminated with various noises at 10 dB AWGN. The signal depicted in Fig. 12b is an sEMG waveform without noise. The performance of CSO, BGSA and SHO-based ANCs on the UCDDB is shown in Fig. 12c–e, respectively.

Fig. 12
figure 12

Responses of ANC on corrupted sEMG waveform from UCDDB: a corrupted sEMG waveform, b sEMG template signal, c filtered sEMG waveform using ANC optimised by CSO algorithm, d filtered sEMG waveform using ANC optimised with BGSA, e denoised sEMG waveform using ANC optimised through SHO

The plots of the clean sEMG of record ucddb002_rec, along with the estimated sEMG signals from the ANC optimised by CSO, BGSA and SHO, are delineated in Fig. 13a. The magnified section shown in Fig. 13b ensures that the SHO-optimised ANC delivers a better response than the CSO and BGSA-optimised ANCs for denoising the sEMG waveforms.

Fig. 13
figure 13

a Responses of optimised ANCs by CSO, BGSA and SHO algorithms on ucddb002_rec of UCDDB, b magnified section

Qualitative interpretation ensures that the wave pattern of the estimated sEMG waveform resulting from the proffered method-based ANC resembles the original sEMG waveform more closely and seems smoother than the signal obtained from the CSO and BGSA-based ANCs.

4.2.2 Quantitative Interpretation

The quantitative interpretation based on specific metrics has been reported in this section. The signal-to-noise ratio (SNR) and correlation coefficient (CC) is desired to have high values. In contrast, MSE, normalised root mean square error (NRMSE), mean difference (MD), maximum error (ME) and peak reconstruction error (PRE) need to be reduced. The above metrics are computed by using (25)–(31) [1, 2, 14, 18, 30,31,32].

$$ {\text{SNR}} = 10\log_{10} \frac{{\mathop \sum \nolimits_{i = 0}^{N - 1} ({\text{EMG}}_{{\text{t}}} \left( i \right))^{2} }}{{\mathop \sum \nolimits_{i = 0}^{N - 1} ({\text{EMG}}_{{\text{f}}} \left( i \right) - {\text{EMG}}_{{\text{t}}} \left( i \right))^{2} }} $$
(25)
$$ {\text{MSE}} = \frac{1}{N}\mathop \sum \limits_{i = 0}^{N - 1} \left( {{\text{EMG}}_{{\text{t}}} \left( i \right) - {\text{EMG}}_{{\text{f}}} \left( i \right)} \right)^{2} $$
(26)
$$ {\text{NRMSE}} = \sqrt {\frac{{\mathop \sum \nolimits_{i = 0}^{N - 1} \left( {{\text{EMG}}_{{\text{t}}} \left( i \right) - {\text{EMG}}_{{\text{f}}} \left( i \right)} \right)^{2} }}{{\mathop \sum \nolimits_{i = 0}^{N - 1} ({\text{EMG}}_{{\text{t}}} \left( i \right))^{2} }}} $$
(27)
$$ {\text{MD}} = \frac{1}{N}\mathop \sum \limits_{i = 0}^{N - 1} \left( {{\text{EMG}}_{{\text{t}}} \left( i \right) - {\text{EMG}}_{{\text{f}}} \left( i \right)} \right) $$
(28)
$$ {\text{ME}} = \max \left[ {{\text{abs}}\left( {{\text{EMG}}_{{\text{t}}} \left( i \right) - {\text{EMG}}_{{\text{f}}} \left( i \right)} \right)} \right] $$
(29)
$$ {\text{PRE}} = \frac{{{\text{EMG}}_{{\text{t}}} \left( i \right) - {\text{ EMG}}_{{\text{f}}} \left( i \right)}}{{{\text{EMG}}_{{\text{t}}} \left( i \right)}} $$
(30)
$$ {\text{CC}} = \frac{{N\left[ {\mathop \sum \nolimits_{i = 0}^{N - 1} {\text{EMG}}_{{\text{t}}} \left( i \right){\text{EMG}}_{{\text{f}}} \left( i \right) - \left( {\mathop \sum \nolimits_{i = 0}^{N - 1} {\text{EMG}}_{{\text{t}}} \left( i \right)} \right)\left( {\mathop \sum \nolimits_{i = 0}^{N - 1} {\text{EMG}}_{{\text{f}}} \left( i \right)} \right)} \right]}}{{\sqrt {\left[ {N\mathop \sum \nolimits_{i = 0}^{N - 1} {\text{EMG}}_{{\text{t}}} \left( i \right)^{2} - \left( {\mathop \sum \nolimits_{i = 0}^{N - 1} {\text{EMG}}_{{\text{t}}} \left( i \right)} \right)^{2} } \right] \times \left[ {N\mathop \sum \nolimits_{i = 0}^{N - 1} {\text{EMG}}_{{\text{f}}} \left( i \right)^{2} - \left( {\mathop \sum \nolimits_{i = 0}^{N - 1} {\text{EMG}}_{{\text{f}}} \left( i \right)} \right)^{2} } \right]} }} $$
(31)

where EMGt denotes the true/template sEMG, EMGf is filtered or estimated sEMG and N is the length of samples.

4.2.2.1 Quantitative Interpretation of the Optimised ANC Analysed Results for EEDB

In Tables 3, 4 and 5, the comparison is made on performance metrics for the CSO, BGSA and the proposed SHO-based ANCs. From the comparison, it has been perceived that the SHO-optimised ANC delivers enhanced performance for almost every performance metric than those of the CSO and BGSA-optimised ANCs on various clinical datasets of EEDB at different AWGN (− 5 to 15 dB). The values of MD and PRE are substantially minimised using the proposed approach. The reported value of CC is almost unity, ensuring that the estimated signal resembles the clean sEMG waveform. According to Fig. 14a, substantial enhancement in SNR is achieved using the SHO-assisted ANC in contrast to CSO and BGSA-assisted ANCs at various SNRs. Figure 14b ensures a significant decrease in NRMSE. The deduction in MSE is noticed in Fig. 14c. Also, a noteworthy reduction has been reported in the values of MD, ME and PRE metrics, as depicted in Fig. 14d–f.

Table 3 Performance comparison among the CSO, BGSA and SHO-assisted ANCs on the emg_healthy of EEDB
Table 4 Performance comparison among the CSO, BGSA and SHO-assisted ANCs on emg_neuropathy of EEDB
Table 5 Performance comparison among the CSO, BGSA and SHO-assisted ANCs on emg_myopathy of EEDB
Fig. 14
figure 14

a SNR, b NRMSE, c MSE, d MD, e ME, f PRE and g CC of CSO, BGSA and SHO-based ANCs for cancellation of AWGN (− 5 to 15 dB) to healthy sEMG waveforms on EEDB

Similarly, from Fig. 15a, g enhanced SNR and CC, respectively, can be seen. The error metrics such as NRMSE, MSE, MD, ME and PRE have been significantly minimised and are depicted in Fig. 15b–f, respectively. The detailed quantitative analysis of emg_neuropathy and emg_myopathy signal is reported in Tables 4 and 5, and corresponding improvement metrics are illustrated in Figs. 16a–g and 17a–g, respectively.

Fig. 15
figure 15

a SNR, b NRMSE, c MSE, d MD, e ME, f PRE and g CC of CSO, BGSA and SHO-based ANCs for cancellation of AWGN (− 5 to 15 dB) to neuropathy sEMG waveforms on EEDB

Fig. 16
figure 16

a SNR, b NRMSE, c MSE, d MD, e ME, f PRE and g CC of CSO, BGSA and SHO-based ANCs for cancellation of AWGN (− 5 to 15 dB) to myopathy sEMG waveforms on EEDB

Fig. 17
figure 17

a SNR, b NRMSE, c MSE, d MD, e ME, f PRE and g CC of CSO, BGSA and SHO-based ANCs for cancellation of AWGN at different SNR to ucddb002.rec sEMG waveforms on UCDDB

4.2.2.2 Quantitative Interpretations of the ANC Analysed Results for UCDDB

In Table 6, the performance comparison among the CSO, BGSA and SHO-based ANCs tested on record ucddb002.rec taken from the UCDDB is tabulated, and the parameters are illustrated in Fig. 17a–g. The SNR shown in Fig. 17a could increase with respect to various noises. Concerned error metrics depicted in Fig. 17b–f have minimised with the increment of SNR values. The value of CC has been improved to almost unity and is presented in Fig. 17g.

Table 6 Performance comparison among the CSO, BGSA and SHO-based ANCs on ucddb002.rec of UCDDB

4.2.3 Hardware Implementation

This subsection expounds on the design and implementation of the proposed methodology on the Texas Instruments (TI) power-optimised apparatus, i.e. TMS320C6713 digital signal processor kit (DSK) with clock capacity of 225 MHz, 16 MB of synchronous dynamic random-access memory (DRAM) and 512 KB of flash memory. The power-optimised DSK is economical and requires fewer computations; therefore, crucial power cell-based portable instruments should emphasise battery backup. The TMS320C6713 kit is predominantly employed for industrialisation. This research uses the same kit to realise the signal obtained through simulation.

The realisation has been made in the C language employing the Texas Instruments code composer studio (CCS) version 3.1 integrated development environment (IDE). The CCS intercommunicates with the kit via an ingrained JTAG emulator through a USB host interface. The image of the experimental arrangement is illustrated in Fig. 18a. Finally, optimised coefficients achieved using SHO (refer to Table 7) have been used to evaluate the proposed methodology for hardware implementation. In real time, an sEMG signal (emg_neuropathy of the EEDB), as depicted in Fig. 18b, is provided to ANC. The filtered output from the line output jack via the onboard AIC23 codec is portrayed on a digital storage oscilloscope (DSO) (TDS 2002B, Tektronix). As depicted in Fig. 18b, the experimental results warrant proficiency in the proposed ANC signal generation.

Fig. 18
figure 18

a Experimental set-up, b optimised neuropathy sEMG, c optimised myopathy sEMG, d optimised healthy sEMG using the proposed method

Table 7 Optimal weight vectors obtained by SHO for ANC implementation

Operating in real time, the 5-s intercept of the sEMG signal sampled at 8 kHz is provided to the input of the optimised ANC. Once the 5-s sEMG signal is calculated, it is displayed on the DSO. This process is replicated for the subsequent 5 s of the sEMG section until interrupted. Figure 18c, d presents the optimised output of DSO for emg_myopathy and emg_healthy signal from EEDB. The FIR structure requires more coefficients and memory, so the design complexity will be higher, affecting its suitability in fast throughput real-time closed-loop applications. It creates problematic situations where the FIR structure may have too much group delay to achieve loop stability. These limitations may be overcome by using the IIR structure, which requires fewer coefficients and offers low latency, making it the aptest for high-speed real-time sEMG denoising applications. The adaptive structure does not restrict cut-off frequency as it adjusts its coefficients according to the input and adaptive algorithm. Many researchers proposed the adaptive filtration of sEMG using FIR structure [18, 30] and failed to get better results. Hence, the authors are motivated to apply the adaptive IIR structure for the sEMG noise mitigation. Figure 19 demonstrates the pole-zero plot of the IIR structure using optimal coefficients. The existence of poles within the unit circle ensures the stability of the designed IIR-AF.

Fig. 19
figure 19

Pole-zero plot for IIR adaptive filter: a stage 1, b stage 2 and c stage 3

4.2.4 Performance Comparison of the SHO with CSO and BGSA-Based ANCs on SNR, CC and MSE Obtained for Various Records Using the Wilcoxon Signed-Rank Test

For testing the rank among algorithms, Wilcoxon signed-rank test [5] is conducted concerning the metrics reported for − 5 dB and 15 dB to verify the suitability of the algorithms for different datasets. It assigns the ranks for algorithms based on their sensitivity. The signed-rank test calculations are given in Table 8.

Table 8 Wilcoxon signed-rank test based on SNR, CC and MSE

In Table 8, the desired MSE value is minimum (close to zero), whereas the SNR and CC desired values are maximum. The final ranking has been made by taking the mean of SNR, CC and MSE tabulated in declining order as SHO, BGSA and CSO.

5 Discussions

The proffered method is outlined for updating the coefficient vector of IIR ANC in the optimisation objective to minimise MSE. The qualitative and quantitative investigation of the presented approach shows that SHO-based ANC provides better SNR and substantially reduces the MSE and NRMSE values than those of CSO and BGSA-based ANCs. A proximate discussion on convergence shape, computational complexity and reported state-of-the-art methods with a comparative perspective has been presented in the subsections below.

5.1 Proximate Analysis of Convergence Shape

The convergence shapes for CSO, BGSA and SHO for all datasets are indicated in Fig. 20. In Fig. 20a for the emg_healthy signal of EEDB, the proposed technique requires fewer than 39 iterations to deliver the optimal value. In contrast, it needs 260 and more than 900 cycles for the BGSA and CSO, respectively. Figure 20b shows that the SHO leads to the best fitness within 50 iterations. In contrast, the BGSA takes about 278 iterations, and CSO demands 679 iterations for the optimal fitness for the UCDDB. The convergence shape analysis implies that the SHO is noticeably foremost to CSO and BGSA. Hence, it ensures that the proffered SHO-based ANC is the best suited for noise confiscation from sEMG.

Fig. 20
figure 20

a Convergence for CSO, BGSA and SHO on: a EEDB, b UCDDB

5.2 Computational Complexness

The computational complexity is represented in ‘O-notation’ [20]. Table 9 consists of the computational complexities of the various optimisation algorithms. The computational load of the overall task as computational time and searching load point of view depends on the optimal coefficient search, trial runs and fitness function evaluations at each iteration. To get the optimal coefficients set, the total searching load is given as \(\emptyset_{1} \times \emptyset_{2} \times \emptyset_{3}\), where \(\emptyset_{1}\) is the number of coefficients to be calculated and \(\emptyset_{2}\) is the number of trials. The term \(\emptyset_{1} \times \emptyset_{2}\) denotes the total runs from the control variable setting while \(\emptyset_{3}\) is the number of function evaluations tested in a single run which is proportional to the signal length/samples. Hence, the asymptotic time complexity concerning the associated task can be defined as \(O\left( {\emptyset^{3} } \right)\). In the present study, computational complexity is also estimated with respect to the run time of the algorithm as presented by (32)–(34) [1, 2, 31, 32], where execution time, running time of n (= 1000) iterations and mean of T trials are described as T0, T1 and T2, respectively.

$$ T_{0} = \frac{{{\text{Total}}\,{\text{time}}}}{{{\text{Number}}\,{\text{of}}\,{\text{Iteration}} \times {\text{population}}\,{\text{size}}}} $$
(32)
$$ T_{1} = \frac{{{\text{Total}}\,{\text{time}}}}{{{\text{Number}}\,{\text{of}}\,{\text{Iteration}}}} $$
(33)
$$ T_{2} = {\text{mean}}\,{\text{of}}\,T\,{\text{trials}} $$
(34)
Table 9 Running time estimation, mean, STD and computation complexity in terms of ‘O-notation’ analysis for CSO, BGSA and SHO-assisted ANCs

As illustrated in Table 9, the SHO outperforms the other comparing algorithms in terms of computational complexity, as the number of fitness function evaluations has been reduced, so a big riff in running time is detected. SHO takes considerably shorter intervals (average T2 for two datasets = 0.1733s) over BGSA (T2 = 0.3555 s) and CSO (T2 = 0.5395 s). Table 9 shows that the SHO-based ANC’s time is considerably lesser. Also, the precision of this process is more reasonable than ANCs founded on CSO and BGSA. For the investigation of adaption time, the square error of ANC is scrutinised on mean and standard deviation (STD). Table 9 lists the mean and STD of all the algorithms. It is followed that SHO-based ANC has acquired the lowest mean and STD values, which confirm that SHO has the lowest adaption interval. The simulation outcomes are achieved on the personal computer with configuration as Intel(R) Core() i7-3770 processor running at 3.40 GHz frequency on 6 GB of RAM.

5.3 Analysis of Performance Comparison with the Existing Literature and the Proposed SHO-Optimised ANC

A comparative study with the results obtained by other researchers in the literature and results achieved for the SHO-optimised ANCs on record emg_healthy from EEDB is given in Table 10. The best values reported have been mentioned in bold. Compared to other competing algorithms, an impressive SNR enhancement is accomplished through SHO-optimised ANC. The MSE obtained from SHO-based ANC is 1.46E−09, which is better than the value of 5.60E−07 obtained by its closest entrant BR-ABC [30] method. NRMSE value of 2.40E−04 has been accomplished using the proposed SHO-optimised ANC.

Table 10 A performance comparison study with the other reported algorithms and the proposed ANC at 10 dB AWGN on emg_healthy of EEDB

The results presented in Table 10 show that the proposed design shows better performance in contrast to DWT [10], WAT [4], DWT + GARCH [14], WAT + GARCH [14], LMS [30], RLS [30], PSO [30], QPSO [30], CS [30], MCS [30], ABC [30], ABC-MR [30], BR-ABC [30], LMS-ESS [18] and RLS-ESS [18] methods for denoising the sEMG waveform.

Figure 21 shows the percentage of effectiveness of the proposed SHO-based ANC over other methods based on various quantitative metrics at 10 dB. The proposed method is 9%, 11% and 14% more effective than recently reported RLS-ESS [18], LMS-ESS [18] and BR-ABC [30], respectively, in enhancing the SNR value. The proposed method is 99% better in MSE, 94% more effective in NRMSE and 99% in ME metric than other reported techniques in the literature.

Fig. 21
figure 21

Percentage improvement of the proposed SHO-based ANC over other methods reported in the literature based on SNR, MSE, NRMSE and ME at 10 dB SNR to healthy sEMG waveforms on EEDB

Figure 22a compares the mean SNR obtained in the sEMG waveform using the proposed and other state-of-the-art methods, considering added WGN at 10 dB SNR. The proposed ANC surpasses other algorithms applied to enhance the sEMG waveforms. Figure 22b compares the MSE resulting from the proposed ANC with other reported algorithms at AWGN at 10 dB. The proposed ANC yields a lesser value of MSE than other methods. The comparison with respect to ME is presented in Fig. 22c. The NRMSE value obtained using the proposed ANC model is compared with other techniques shown in Fig. 22d. It is observed that the proposed ANC yields minimum NRMSE.

Fig. 22
figure 22

Performance comparison of the proposed ANC with techniques reported in the literature based on a SNR, b MSE, c ME and d NRMSE of AWGN at 10 dB SNR to healthy sEMG waveforms on EEDB

Table 11 presents the comparison of the proposed ANC with the results reported by other researchers at − 5 dB AWGN. Table 11 shows that the proposed method provides better results with an SNR value of 7.6541, which is approximately 4 dB higher than the recently reported value through BR-ABC [30]. Also, the MSE and ME values have been reduced to 1.18E−08 and 8.28E−04, respectively.

Table 11 A performance comparison study with other reported algorithms and the proposed ANC at − 5 dB AWGN on emg_healthy of EEDB

The percentage improvement in SNR and reduction in various error metrics are presented in Fig. 23. The proposed SHO-ANC is 72%, 54% and 41% more enhancing the SNR metric than recently reported ABC [30], ABC-MR [30] and BR-ABC [30], respectively. The MSE value is improved by 99% more than other reported literature. The ME value is enhanced by 80%, 36% and 15% than ABC [30], ABC-MR [30] and BR-ABC [30], respectively.

Fig. 23
figure 23

Percentage improvement of the proposed SHO-based ANC versus other methods reported in the literature based on SNR, MSE and ME at − 5 dB SNR to healthy sEMG waveforms on EEDB

The SNR obtained is compared with the various methods as shown in Fig. 24a. Figure 24a shows that a significant improvement in SNR is achieved using the proposed method. Figure 24b shows that the lowest MSE has been accomplished compared to other techniques. Figure 24c compares ME obtained through simulation with various algorithms to cancel noise at − 5 dB to emg_healthy from EEDB. Figure 24c shows that the lowest ME value of 9.52E−05 is obtained compared to the existing algorithm-based ANCs.

Fig. 24
figure 24

Performance comparison of the proposed ANC with the reported literature based on a SNR, b MSE and c ME of AWGN at − 5 dB SNR to healthy sEMG waveforms on EEDB

6 Conclusion and Future Scope

This article presents a population-dependent metaheuristic SHO, which is applied to ANCs to investigate the superiority of SHO to provide better quality results than CSO and BGSA. Also, it performs better with lesser control variables than CSO and BGSA. A remarkable enhancement has been observed in SNR and CC values. Also, various other error metrics have been minimised through the proposed SHO-based ANC filter.

The proposed technique is a robust one for denoising the sEMG waveform. Hence, with the help of analysed results and discussions, the SHO-assisted ANC can be effectively used for denoising sEMG waveforms.

This work can be extended in the future by employing different cost functions for the ANC optimisation problem. Moreover, the optimal nonlinear filters can be implemented for enhancement application on other biomedical signals such as ECG (electrocardiogram), EOG (electrooculogram), MEG (magneto-encephalogram) and EEG (electroencephalogram).