1 Introduction

1.1 Motivation

Nowadays, hearing aids can receive input from the acoustic environment through a microphone and also from a device capable of wireless transmission of sound signalsFootnote 1. In such a scenario, there is a possibility of intermixing of both the signals leading to an acoustic confusion for the users. When only the acoustic environment signal is considered and the wirelessly received signal is absent, the feedback cancellation continues as discussed in [19]. However, these existing hearing aid designs do not consider multiple inputs at a time. In case of multiple inputs, the interference can be severe if the two inputs are highly correlated with each other. The scenario for a single-microphone single-loudspeaker system, where a wirelessly received signal is considered along with the input received at the microphone, has also not been addressed in any existing research work. Hence, there is a necessity to analyse the resulting signal quality when more than one input signal is considered and to suggest possible optimization techniques to reduce the interference.

The feedback cancellers in [1, 7,8,9, 14,15,16,17,18] receive acoustic input only via microphone. However, it would be interesting to analyse the behaviour of a feedback cancellation system that receives a wireless signal in addition to the acoustic input. For the aforementioned problem, the wirelessly received input to the hearing aid can be considered to be an externally generated signal. Indeed, the reception of two inputs can result in interference and acoustic confusion for the user because the wireless signal is added to the loudspeaker path. When both the signals are emitted from the same source, there is high correlation between the wireless signal and the output of the feed-forward path and the resulting interference can be severe. The perceptibiity of the externally generated wireless signal can be weakened by using a shaping filter which utilizes the masking capability of the human ear [9, 17]. However, a fixed shaping filter used in [7, 14] is not sufficient for reducing such an interference, as the user might still be able to hear the shaped wireless signal along with the enhanced desired acoustic signal. Moreover, the feed-forward path in the existing feedback cancellers in [3, 7, 14, 17,18,19] is considered as a constant enhancement. There is a possibility to further reduce the interference and improve the quality of the loudspeaker output, when multiple correlated inputs are received at the hearing aid, by considering a cascade structure for the feed-forward path wherein one part is the fixed amplification as needed by the user and the other part is an FIR filter which can be further optimized.

1.2 Paper Overview

In this paper, we consider a hearing aid design with the capability to receive acoustic input from a wirelessly linked device and also from the user’s surroundings via microphone. We follow the basic adaptive feedback cancellation methodology and propose to model the wirelessly received acoustic signal as an externally generated signal. We will focus on the following scenarios:

  1. 1.

    The two inputs are very similar and therefore highly correlated.

  2. 2.

    The two inputs are very similar but received at the hearing aid with a time delay with respect to each other.

  3. 3.

    The two inputs are independent and generated from two different sources.

A cost function is proposed to improve the quality of output signal in the presence of interference. The shaping filter is optimized with respect to this cost function with the objective to reduce the interference between the two correlated input signals, thereby enhancing the quality of the loudspeaker output. Instead of a fixed feed-forward path, we have considered the feed-forward path as a cascade of a constant signal reinforcement portion and an FIR filter. The FIR filter part of the feed-forward structure is also optimized using the same cost function as that of the shaping filter. The proposed optimization methodology applied to the hearing aid model showed improvement in output sound quality and resulted in improvement in normalized misalignment as well as maximum stable gain.

1.3 Notation

The following notation is adopted throughout the paper: \({\left[ . \right] ^T}\) for the transpose of a matrix, \({\left[ . \right] ^{ - 1}}\) for the inverse of a matrix, \(E\left[ . \right] \) for the expectation operation and \(\left| {.} \right| \) for the magnitude. Here, n is used to denote discrete-time index and k for discrete-time delay operator such that \({k^{ - 1}}m\left( n \right) = m\left( {n - 1} \right) \). We have used bold-faced capital letters for matrices, bold-faced small letters for vectors, italic small letters for random variables and \({\mathbb {R}}\) for real numbers. For any two signals \(a\left( n\right) \) and \(b\left( n\right) \), the signal correlation \({r_{ab}}\left( n \right) = E\left[ {a\left( n \right) b\left( n \right) } \right] \). A discrete-time filter of length L is represented as a polynomial \(F\left( k\right) \) in terms of \({k^{ - 1}}\) as \(F\left( k \right) = {f_0} + {f_1}\,{k^{ - 1}} + \cdots + {f_{L - 1}}\,{k^{ - L + 1}}\) or by its coefficient vector \(\mathbf{{f}} = {\left[ {{f_0},{f_1},\ldots ,{f_{L - 1}}} \right] ^T}\). The signal \(m\left( n\right) \) is filtered by \(F\left( k\right) \) as \(F\left( k \right) m\left( n \right) = {\mathbf{{f}}^T}\left( n \right) \mathbf{{m}}\left( n \right) \), with \(\mathbf{{m}}\left( n \right) = {\left[ {m\left( n \right) ,m\left( {n - 1} \right) ,\ldots ,m\left( {n - L + 1} \right) } \right] ^T}\).

2 Proposed Methodology

In this section, we consider a hearing aid that receives an acoustic signal from its surrounding environment via a microphone, and another from a device via a wireless link. Feedback cancellation is carried out by an adaptive filter \({\hat{F}}\left( k\right) \) of order \(L-1\) (Fig. 1). As discussed earlier, various possible scenarios may exist which we elaborate one by one. Minimization of the cost function is done to obtain optimized expressions for the shaping filter \(S\left( k\right) \) and for the feed-forward path filter \({\bar{G}}\left( k \right) \), wherever necessary, to obtain improvement in the quality of the loudspeaker signal at the user’s end. We consider the following scenarios:

Scenario 1:

When the wirelessly received input and the acoustic environment input are received from the same source and are very similar.

Scenario 2:

When both the acoustic inputs are very similar, but there exists a time delay between them.

Scenario 3:

When both the acoustic inputs are independent and received from two different sources.

Assumption 1

Along with the sound signal from the environment, an acoustic signal is also transmitted from a wireless source using an encoding filter \(H\left( k\right) \) and a zero-mean white stochastic encoding noise \(\mathbf{{\zeta }}\left( n \right) \in {\mathbb {R}}^{M\times 1}\) is also introduced in the encoding process.

Assumption 2

The signal \(\zeta \left( n\right) \) is considered to be uncorrelated with all other signals in the adaptive feedback cancellation system.

Fig. 1
figure 1

Adaptive feedback canceller with an optimized shaping filter (depicted as dotted block)

Definition 1

With reference to Assumption 1, the sound signal wirelessly received at the hearing aid is shown in Fig. 1. The encoded wireless signal transmitted from the source can be expressed as

$$\begin{aligned} \mathbf{{r}}\left( n \right) = \alpha \,\,\mathbf{{h}}\left( n \right) x\left( n \right) + \left( {1 - \alpha } \right) {{\varvec{\zeta }}}\left( n \right) , \end{aligned}$$
(1)

where the input signal \(x\left( n \right) \in {\mathbb {R}}\) and \({r_{xx}}\left( n \right) = E\left[ {{x^2}\left( n \right) } \right] \), the signal vector \(\mathbf{{r}}\left( n \right) \in {\mathbb {R}}^{M\times 1}\) for the encoded wireless signal \(r\left( n\right) \) transmitted from the source can be defined as \(\mathbf{{r}}\left( n \right) = {\left[ {r\left( n \right) ,r\left( {n - 1} \right) ,\ldots ,r\left( {n - M + 1} \right) } \right] ^T}\), \(\mathbf{{h}}\left( n \right) = {\left[ {h\left( 0 \right) ,h\left( 1 \right) ,\ldots ,h\left( {M - 1} \right) } \right] ^T}\) is the coefficient vector for an FIR encoding filter \(H\left( k\right) \) of order \(M-1\) applied at the transmitting device such that \(\mathbf{{h}}\left( n \right) \in {\mathbb {R}}^{M\times 1}\), the signal vector \({{\varvec{\zeta }}}\left( n \right) \in {\mathbb {R}}^{M\times 1}\), for the zero-mean white stochastic encoding noise \(\zeta \left( n\right) \), is defined as \({{\varvec{\zeta }}}\left( n \right) = {\left[ {\zeta \left( n \right) ,\zeta \left( {n - 1} \right) ,\ldots ,\zeta \left( {n - M + 1} \right) } \right] ^T}\), \(\zeta \left( n\right) \) is assumed to be uncorrelated with \(x\left( n\right) \) for simplicity, \(\mathbf{{R}}\left( n \right) \in {\mathbb {R}}^{M\times M}\) is the autocorrelation matrix given as \(\mathbf{{R}}\left( n \right) = E\left[ {{{\varvec{\zeta }}}\left( n \right) \,{{{\varvec{\zeta }}}^T}\left( n \right) } \right] ,\) and \(\alpha \) is a scaling constant such that \(1 \ge \alpha \ge 0\).

Definition 2

The shaped wireless signal, which is introduced into the loudspeaker path of the adaptive feedback canceller in Fig. 1, can be written as

$$\begin{aligned} {\bar{r}}\left( n \right)&= {\mathbf{{s}}^T}(n)\mathbf{{r}}\left( n \right) \nonumber \\&= \alpha \,{\mathbf{{s}}^T}(n)\mathbf{{h}}\left( n \right) x\left( n \right) + \left( {1 - \alpha } \right) {\mathbf{{s}}^T}(n){{\varvec{\zeta }}}\left( n \right) , \end{aligned}$$
(2)

where \(\mathbf{{s}}\left( n \right) = {\left[ {s\left( 0 \right) ,s\left( 1 \right) ,\ldots ,s\left( {M - 1} \right) } \right] ^T}\) is the coefficient vector for the shaping filter \(S\left( k\right) \) of order \(M-1\).

Let the signal difference

$$\begin{aligned} c\left( n\right) =a\left( n\right) -b\left( n\right) , \end{aligned}$$
(3)

where \(a\left( n\right) \) is the desired loudspeaker output signal and \(b\left( n\right) \) is the actual loudspeaker output. Then, the cost function \( E\big [c^{2}\left( n\right) \big ]\) can be minimized by optimizing \(S\left( k\right) \) to reduce the interference due to correlation between the two acoustic signals input to the hearing aid. The optimization problem of \(S\left( k\right) \) can be expressed as

$$\begin{aligned} {\varvec{\mathrm{{s}}^{*}}}= {\texttt {argmin}}_{\mathrm{{{\mathbf {s}}}}}\,\,E\big [c^{2}\left( n\right) \big ]. \end{aligned}$$
(4)

2.1 Scenario 1

Let the hearing aid receive the acoustic signal \(x\left( n\right) \) from the user’s environment as well as via a wireless link, i.e. both the acoustic inputs are very similar and thus have a high correlation between them. This scenario would have been simpler if there was no signal available from the acoustic environment and the wirelessly received signal was the only acoustic input to the hearing aid. However, when an acoustic input is available from the wireless source as well as from the acoustic environment, the resulting interference can distort the loudspeaker output signal.

Let the wirelessly received input and the acoustic environment input be similar signals and received from the same source. Then, the interference perceived in the loudspeaker signal at the user’s end, due to correlation between the two aforementioned sound inputs, can be reduced by shaping the wirelessly received input with a shaping filter. The optimal shaping filter is given in Lemma 1:

Lemma 1

Considering Assumptions 12 and Definitions 12, the solution to the optimization problem of \(S\left( k\right) \) in (4) is unique for the minimization of the cost function and is given by

$$\begin{aligned} \mathbf{{s^{*}}}\left( n \right) = \alpha \Big [ {\alpha ^2}\,\mathbf{{h}}\left( n \right) {r_{xx}}\left( n \right) {\mathbf{{h}}^T}\left( n \right) + {{\left( {1 - \alpha } \right) }^2}\,\mathbf{{R}}\left( n \right) \Big ]^{ - 1}{} \mathbf{{h}}\left( n \right) {r_{xx}}\left( n \right) , \end{aligned}$$
(5)

where \(\mathbf{{s^{*}}}\left( n \right) = {\left[ {s^{*}\left( n \right) ,s^{*}\left( {n - 1} \right) ,\ldots ,s^{*}\left( {n - M + 1} \right) } \right] ^T}\) such that \(\mathbf{{s^{*}}}\left( n \right) \in {\mathbb {R}}^{M\times 1}\).

Proof

See “Appendix A”. \(\square \)

Remark 1

There is no need to optimize the feed-forward path here because both the acoustic inputs received by the hearing aid are very similar. Hence, the arrangement can be made such that the hearing aid user perceives only the wirelessly received signal, while the gain of the feed-forward path \(G\left( k\right) \) is reduced to prevent interference between the two acoustic inputs.

2.2 Scenario 2

Let us consider a practical scenario when the hearing aid is connected to a wirelessly transmitting device that also transmits sound signals normally for the normal-hearing people in the room. Thus, the hearing aid is receiving the acoustic signal \(x\left( n\right) \) from the environment as well as via a wireless link, as shown in Fig. 1.

Assumption 3

The device transmitting the acoustic signals is placed away from the hearing aid user such that the signal received from the acoustic environment is \(x\left( {n - \varDelta } \right) + \gamma \left( n \right) ,\) where \(\varDelta \) is a time delay and \(\gamma \left( n \right) \in {\mathbb {R}}\) is the background noise, which is considered as a white stochastic signal of zero mean.

Assumption 4

The signal \(\gamma \left( n \right) \) is considered to be uncorrelated with all other signals in the adaptive feedback cancellation system.

The source being kept at a distance from the hearing aid user, the wireless signal will reach the hearing aid microphone faster than the acoustic environment signal; the acoustic environment signal will be delayed in time with respect to the wireless signal. However, since both the signals are very similar, there exists a high correlation between them.

Remark 2

It is impractical to assume the feed-forward path gain as zero for the scenario under consideration, and thus the interference caused due to intermixing of the two sound signals is unavoidable. Consequently, both of the received acoustic signals will need to be considered.

Definition 3

The reinforced signal \(u\left( n\right) \) can be expressed as

$$\begin{aligned} u\left( n \right) = G\left( k \right) e\left( n \right) , \end{aligned}$$
(6)

where \(G\left( k\right) \) is the feed-forward path, \(e\left( n\right) \) is the error between the microphone input \(v\left( n\right) \) and the adaptive filter output \(y\left( n\right) \), and the reinforced signal vector \(\mathbf{{u}}\left( n \right) \in {\mathbb {R}}^{L\times 1}\) is defined as \(\mathbf{{u}}\left( n \right) = {\left[ {u\left( n \right) ,u\left( {n - 1} \right) ,\ldots ,u\left( {n - L + 1} \right) } \right] ^T}\).

Definition 4

The feed-forward path \(G\left( k\right) \) is considered to be a cascade of two parts (Fig. 2). The first part \(\left| {{G_1}} \right| \) is the constant gain provided to enhance the listening comfort of the users, and the other part is an FIR filter \({\bar{G}}\left( k \right) \) of order \(L-1\) with the coefficient vector \({{{\bar{\mathbf{g}}}}}\left( n \right) \in {\mathbb {R}}^{L\times 1}\) defined as \({{{\bar{\mathbf{g}}}}}\left( n \right) = {\left[ {{\bar{g}}\left( 0 \right) ,{\bar{g}}\left( 1 \right) ,\ldots ,{\bar{g}}\left( {L - 1} \right) } \right] ^T}\). Thus, (6) can be rewritten as

$$\begin{aligned} \mathbf{{u}}\left( n \right) = \left| {{G_1}} \right| {{{\bar{\mathbf{g}}}}}\left( n \right) e\left( n \right) . \end{aligned}$$
(7)

Definition 5

The shaped wireless signal is introduced into the loudspeaker path of the hearing aid and the final loudspeaker output \({\bar{u}}\left( n \right) = u\left( n \right) + {\bar{r}}\left( n \right) \), with the loudspeaker signal vector \({{{\bar{\mathbf{u}}}}}\left( n \right) \in {\mathbb {R}}^{L\times 1}\) defined as \({{{\bar{\mathbf{u}}}}}\left( n \right) = {\left[ {{\bar{u}}\left( n \right) ,{\bar{u}}\left( {n - 1} \right) ,\ldots ,{\bar{u}}\left( {n - L + 1} \right) } \right] ^T}\) and

$$\begin{aligned} {{{\bar{\mathbf{u}}}}}\left( n \right) = \mathbf{{u}}\left( n \right) + {{{\bar{\mathbf{r}}}}}\left( n \right) , \end{aligned}$$
(8)

where the shaped wireless signal vector \({{{\bar{\mathbf{r}}}}}\left( n \right) \in {\mathbb {R}}^{L\times 1}\) can be defined as \({{{\bar{\mathbf{r}}}}}\left( n \right) = {\left[ {{\bar{r}}\left( n \right) ,{\bar{r}}\left( {n - 1} \right) ,\ldots ,{\bar{r}}\left( {n - L + 1} \right) } \right] ^T}\).

The presence of the reinforced acoustic environment signal and the wireless signal at the loudspeaker input will result in interference and, thus, an incomprehensible loudspeaker output for the user. To attenuate this interference due to the presence of correlation between the two similar acoustic inputs (a wirelessly received input and a time-delayed acoustic environment input) from the same source and improving the quality of the output available at the user end, the difference between the two signals at the loudspeaker input must be minimized. The optimal shaping filter for this is given in Lemma 2.

Lemma 2

Considering Assumptions 14 and Definitions 15, the solution to the optimization problem of \(S\left( k\right) \) in (4) is unique for the minimization of the cost function and is given by

$$\begin{aligned} \mathbf{{s^{*}}}\left( n \right) = \alpha \Big [ {\alpha ^2}\,\mathbf{{h}}\left( n \right) {r_{xx}}\left( n \right) {\mathbf{{h}}^T}\left( n \right) + {{\left( {1 - \alpha } \right) }^2}\,\mathbf{{R}}\left( n \right) \Big ]^{ - 1}\Big [ {{r_{xx}}\left( n \right) - {r_{ux}}\left( n \right) } \Big ]\mathbf{{h}}\left( n \right) . \end{aligned}$$
(9)

Proof

See “Appendix A”. \(\square \)

We shall now derive expressions for an optimized feed-forward path. For the hearing aid design of Fig. 2, let \(c\left( n\right) \) be the signal difference, as expressed in (3). The optimization problem of \(\bar{G}\left( k\right) \) can be expressed as

$$\begin{aligned} {{\bar{{\varvec{g}}}}^{*}}= {\texttt {argmin}}_{{{{\mathbf {g}}}}}\,\,E\big [c^{2}\left( n\right) \big ]. \end{aligned}$$
(10)

The cost function can be minimized to obtain the solution to the optimization problem in (10) as the set of optimized feed-forward path FIR filter coefficients. For the adaptive feedback cancellation system in Fig. 2, there may be interference at the user’s end due to the presence of similar acoustic inputs, i.e. a wirelessly received input and a time-delayed acoustic environment input. The optimized feed-forward path filter is given in Lemma 3.

Fig. 2
figure 2

Adaptive feedback canceller with an optimized shaping filter and an optimized feed-forward path (depicted as dotted blocks)

Lemma 3

Considering Assumptions 14 and Definitions 15, the solution to the optimization problem of \({\bar{G}}\left( k \right) \) in (10) is unique for the minimization of the cost function, and is given by

$$\begin{aligned} {\bar{{\mathbf {g}}}}^{*}\left( n \right)&= \frac{\alpha }{{\left| {{G_1}} \right| }}{\left[ {{r_{vv}}\left( n \right) - 2\,{r_{vy}}\left( n \right) + {r_{yy}}\left( n \right) } \right] ^{ - 1}}\cdot \nonumber \\&\quad \Big \{ {r_{yx}}\left( n \right) {\mathbf{{s^{*}}}^T}\left( n \right) \mathbf{{h}}\left( n \right) - {r_{vx}}\left( n \right) {\mathbf{{s^{*}}}^T}\left( n \right) \mathbf{{h}}\left( n \right) \nonumber \\&\quad + \frac{1}{\alpha }\left[ {{r_{vx}}\left( n \right) - {r_{yx}}\left( n \right) } \right] \Big \}, \end{aligned}$$
(11)

where \(\alpha \) is the scaling constant, \(v\left( n\right) \) is the microphone output, \(y\left( n\right) \) is the adaptive filter output, optimum feed-forward path coefficient vector \({{\bar{\mathbf{g}}^{*}}}\left( n \right) = {\left[ {\bar{g}^{*}\left( n \right) ,\bar{g}^{*}\left( {n - 1} \right) ,\ldots ,\bar{g}^{*}\left( {n - L + 1} \right) } \right] ^T}\) such that \({{\bar{\mathbf{g}}^{*}}}\left( n \right) \in {\mathbb {R}}^{L\times 1}\) and \(\mathbf{{s^{*}}}\left( n \right) \) is the optimal set of coefficients for the shaping filter as obtained in (9).

Proof

See “Appendix B”. \(\square \)

2.3 Scenario 3

Further, we consider another scenario in which the acoustic environment signal and the wirelessly received signal are independent signals generated from two different sources, and hence are less correlated with each other as compared to the previous scenarios. However, an interference may still be perceived at the user’s end due to the presence of both of the two independent acoustic inputs. The optimal shaping filter for shaping the wirelessly received input is given in Lemma 4:

Assumption 5

The input signal received from the acoustic environment is \(x'\left( n \right) + \gamma \left( n \right) ,\) where \(\gamma \left( n \right) \) is the background noise which we have considered to be a zero-mean white stochastic signal.

Lemma 4

Considering Assumptions 1, 2, 4 and 5, and Definitions 15, the solution to the optimization problem of \(S\left( k\right) \) in (4) is unique for the minimization of the cost function and is given by

$$\begin{aligned} \mathbf{{s^{*}}}\left( n \right) = \alpha \left[ {{\alpha ^2}\,\mathbf{{h}}\left( n \right) {r_{xx}}\left( n \right) {\mathbf{{h}}^T}\left( n \right) + {{\left( {1 - \alpha } \right) }^2}\,\mathbf{{R}}\left( n \right) } \right] ^{ - 1} \Big [ {{r_{xx'}}\left( n \right) - {r_{ux}}\left( n \right) } \Big ]\mathbf{{h}}\left( n \right) . \end{aligned}$$
(12)

Proof

See “Appendix A”. \(\square \)

Remark 3

The correlation term \({r_{xx'}}\left( n \right) \) will be zero when the near-end acoustic signal \(x'\left( n \right) \) and the wirelessly transmitted acoustic signal \(x\left( n \right) \) are uncorrelated with each other. However, there always exists a small correlation between the two signals in practical scenarios.

Remark 4

When two independent signals arrive as inputs to the hearing aid from two different sources, as shown in Fig. 2, acoustic confusion may result at the output. In this case, priority can be given to either of the acoustic inputs, which is desired to be received at the loudspeaker end.

Let there be presence of independent acoustic inputs from two different sources (i.e. a wirelessly received input and an acoustic environment input). The optimal set of feed-forward path coefficients for minimizing the cost function in (10) is given in Lemma 5.

Lemma 5

Considering Assumptions 1, 2, 4 and 5, and Definitions 15 for the feedback canceller in Fig. 2, the solution to the optimization problem in (10) is unique and can be given by

$$\begin{aligned} \bar{{\mathbf {g}}}^{*}\left( n \right)&= \frac{\alpha }{{\left| {{G_1}} \right| }}{\left[ {{r_{vv}}\left( n \right) - 2\,{r_{vy}}\left( n \right) + {r_{yy}}\left( n \right) } \right] ^{ - 1}}\nonumber \\&\quad \Big \{ {\mathbf{{s^{*}}}^T}\left( n \right) \mathbf{{h}}\left( n \right) {r_{yx}}\left( n \right) - {\mathbf{{s^{*}}}^T}\left( n \right) \mathbf{{h}}\left( n \right) {r_{vx}}\left( n \right) \nonumber \\&\quad + \frac{1}{\alpha }\left[ {{r_{vx'}}\left( n \right) - {r_{yx'}}\left( n \right) } \right] \Big \}, \end{aligned}$$
(13)

where \(\bar{{\mathbf {g}}}^{*}\left( n \right) = {\left[ {\bar{g}^{*}\left( n \right) ,\bar{g}^{*}\left( {n - 1} \right) ,\ldots ,\bar{g}^{*}\left( {n - L + 1} \right) } \right] ^T}\) such that \(\bar{{\mathbf {g}}}^{*}\left( n \right) \in {\mathbb {R}}^{L\times 1}\) and \(\mathbf{{s^{*}}}\left( n \right) \) is the optimal set of coefficients for the shaping filter, as obtained in (12).

Proof

See “Appendix B”. \(\square \)

3 Simulation and Results

In this section, we present the simulation results of the various considered scenarios, viz. Scenario 1 in which the wirelessly received signal is similar to the acoustic environment signal, Scenario 2 in which there exists a time delay between the acoustic environment signal and the wirelessly received signal, and Scenario 3 in which both the signals are generated from two different sources. The simulations presented in this section aim to verify the improvement in quality of the loudspeaker signal when the shaping filter and the feed-forward path are optimized. The simulations are performed in MATLAB on a sampling frequency of 16 kHz.

The forward path gain \(\left| {{G_1}} \right| \) is set to a constant value of 4. The feed-forward path filter \({\bar{G}}\left( k \right) \), feedback path \(F\left( k \right) \) and the adaptive estimation filter \({\hat{F}}\left( k \right) \) are considered as FIR filters of order 50. The feedback path is known a priori and is obtained using a behind-the-ear hearing aid. Its magnitude response is presented in Fig. 3. Insertion of a delay of 55 samples in the feed-forward path as well as the feedback path is done to reduce bias in the estimation of the feedback path. The LMS algorithm is used to update the coefficients of the adaptive filter as well as the shaping filter and the feed-forward path, using a step size value of 0.00001. The acoustic environment signal for all the considered scenarios is a female-spoken speech sample denmark1.wav of 5 seconds, recorded using MATLAB. Pertaining to (1), we have considered a simple encoding filter, i.e. an FIR filter of order 1, with initial coefficient vector \({\left[ {0.9,\,0.5} \right] ^T}\) and \(\alpha = 0.5\). Similarly, the shaping filter pertaining to (2) is also considered as an FIR filter of order 1 with initial coefficients \({\left[ {0.5,\,-0.2} \right] ^T}\).

Fig. 3
figure 3

Magnitude response of the original feedback path

Fig. 4
figure 4

Spectrograms for a original wirelessly received signal, b wirelessly received signal shaped using fixed shaping filter, c wirelessly received signal shaped using optimized shaping filter

3.1 Scenario 1

Pertaining to the scenario in which the wireless signal is very similar to the acoustic environment signal, only one of the inputs will be sufficient for the user and the other input can be muted. The wireless input is the preferred signal at the loudspeaker, and its spectrogram is presented in Fig. 4a. The distortion introduced due to the coding noise can be reduced by passing the wirelessly transmitted signal through the optimized shaping filter. The spectrograms for the wireless signal shaped using a fixed shaping filter, and those for the wireless signal shaped using the optimized shaping filter are presented in Fig. 4b and c, respectively. It can be seen from Fig. 4b and c that the signal power is well preserved, but Fig. 4b contains random noise, which can be annoying to the user. However, in Fig. 4c, the random noise is reduced with the use of the optimized shaping filter. Optimization of the feed-forward path is not required in this case because the acoustic environment input is ignored.

Fig. 5
figure 5

Spectrograms for a acoustic environment input, b wireless signal shaped using fixed shaping filter, c interference, d loudspeaker output when shaping filter optimized, e loudspeaker output when shaping filter and feed-forward path are both optimized

3.2 Scenario 2

In the scenario where the acoustic environment signal is a delayed replica of the wireless signal, only one of the inputs, i.e. the wireless input, would be sufficient at the user end. We assume that the acoustic environment signal is transmitted from a device kept at a distance of 2 m from the user. Since the sound signal travels at a speed of 340 m/s, a delay of 5 ms is introduced in the acoustic environment signal. As discussed in Section 2, the input from the acoustic environment cannot be muted or ignored for this scenario. Thus, it is necessary to suppress the interference between the two inputs by optimizing the feed-forward path as well as the shaping filter.

Figure 5a and b depicts the spectrograms for the acoustic environment input and the wireless input shaped using a fixed shaping filter, respectively. The interference between the wirelessly received signal and the acoustic environment signal has been depicted by the spectrogram in Fig. 5c. It can be seen in Fig. 5c that the loudspeaker output quality is worsened as compared to the desired loudspeaker output in Fig. 5a due to interference present throughout the frequency range as undesirable audible artefacts in the spectrogram. Figure 5d shows the spectrogram of the loudspeaker signal when the optimized shaping filter was used. It can be clearly seen from Fig. 5d that the noise introduced due to interference is reduced throughout the frequency range, esp. between 1 kHz and 7.5 kHz, as compared to that in Fig. 5c. As compared to Fig. 5d, further decrease in the interference noise was achieved for the output signal with both feed-forward path and shaping filter optimized as shown in the spectrogram in Fig. 5e. In this dual-optimized output, the formants of the desired output, i.e. the wirelessly received signal, are well preserved and the signal can be easily understood. However, the noise in the background is reduced significantly throughout the frequency range as compared to that when only the shaping filter was optimized, as evident from the spectrogram.

Fig. 6
figure 6

Spectrograms for a wirelessly received signal shaped using fixed shaping filter, b interference, c loudspeaker output when shaping filter optimized, d loudspeaker output when shaping filter and feed-forward path are both optimized

3.3 Scenario 3

In the scenario where the wirelessly received signal and the acoustic environment input are generated from different sources, the preferred loudspeaker output is the acoustic environment signal. We considered a male-spoken speech sample abhinav.wav of 5 s as the wireless signal, also recorded in MATLAB. During simulation, more priority was given to the acoustic environment input, i.e. it is considered to be the signal desired to be received by the user at the loudspeaker end when both the acoustic inputs received at the hearing aid are generated from different sources. The logic behind it was that the users must be able to hear their immediate surroundings to facilitate their convenience and safety during emergencies. The spectrogram for the acoustic input from the environment is same as that in Fig. 5a, while that for the wireless signal shaped using a fixed shaping filter is presented in Fig. 6a. Due to arrival of both the inputs at the hearing aid, the interference between the two signals results in acoustic confusion for the user. The spectrogram for the interference is depicted in Fig. 6b. The interference between the two inputs was reduced by optimizing the feed-forward path and the shaping filter. Figure 6c depicts the spectrogram for the output when only the shaping filter was optimized. It can be clearly seen that, as compared to Fig. 6b, the undesirable audible artefacts due to interference are reduced between 0.8 kHz and 6.5 kHz in Fig. 6c. In Fig. 6d, it can be observed that the optimization of feed-forward path along with the shaping filter further reduced the interference as compared to Fig. 6c. The suppression of interference between the two inputs in the aforementioned scenario was more as compared to that in the scenario where the acoustic environment signal is a delayed replica of the wirelessly received signal. This is due to the fact that the correlation between the wireless signal and the acoustic environment input is less when both the signals are independent and generated from different sources, as compared to when both the signals are similar. In the spectrogram of Fig. 6d for the dual-optimized loudspeaker output for this scenario, it can be observed that the formants of the desired signal, i.e. the acoustic environment signal, are well preserved and the signal can be easily understood.

Fig. 7
figure 7

Normalized misalignment when a acoustic environment signal is a delayed replica of wirelessly received signal, b acoustic environment signal and wirelessly received signal are independent and generated from different sources

Fig. 8
figure 8

Maximum stable gain when a acoustic environment signal is a delayed replica of wirelessly received signal, b acoustic environment signal and wirelessly received signal are independent and generated from different sources

3.4 Performance Measures

The normalized misalignment between the original and the estimated feedback path is plotted in Fig. 7a and b for the loudspeaker output when no optimization was done and when both the feed-forward path and the shaping filter were optimized. As seen in the figures, it is evident that the misalignment is reduced when the shaping filter as well as the feed-forward path is optimized, as compared to when no optimization is done. Reduction in normalized misalignment is more in Fig. 7b as compared to that in Fig. 7a due to the fact that the correlation between the acoustic environment input and the wireless signal is less when both are independent signals. Thus, there are more fluctuations in plots of Fig. 7a as compared to those in Fig. 7b due to the existence of correlation between the wireless signal and the acoustic signal from the environment. It can also be observed in both the figures that the range of reduction in normalized misalignment, when the feed-forward path as well as the shaping filter is optimized, is small. This is because no explicit bias reduction techniques are employed in the simulation of the hearing aid.

The maximum stable gain (MSG) performance of the hearing aid is presented in Fig. 8a and b for different scenarios when no optimization is done and when the feed-forward path and the shaping filter are both optimized. As observed from Fig. 8a and b, the MSG performance is better when the feed-forward path as well as the shaping filter is optimized, as compared to when no optimization is done. It can be seen from Fig. 8b that the MSG performance is better, when both the inputs are independent, as compared to the scenario in which both the inputs are very similar. This is due to the fact that the correlation between the two signals is reduced when both the signals are independent as compared to when both of them are very similar. The fluctuations seen throughout the plots are due to the presence of correlation between the wireless signal and the acoustic signal from the environment as no explicit bias reduction methods are employed in the hearing aid under consideration.

The objective evaluation of loudspeaker signal quality was carried out for each scenario by comparing the loudspeaker signal, obtained after optimization, with the original (distortion-free) reference signal. The perceptual evaluation of speech quality (PESQ) algorithm was used for the objective measurement of the perceived audio quality of the loudspeaker output as the PESQ measures are well-established sound quality measures and are considered to be reliable for the evaluation of disturbing acoustic artefacts in the signal under consideration. For the evaluation of loudspeaker output in our simulations, we used the MATLAB implementation of PESQ presented in [12], based on the PESQ algorithm described in the ITU recommendation P.862 [10]. Table 1 presents the explanation of scores obtained from the PESQ implementation for the loudspeaker output signal in each scenario, and Table 2 represents the computed PESQ values. It can be observed from the evaluation scores in Table 1 that the loudspeaker signal quality is enhanced when the feed-forward path as well as the shaping filter is optimized. For the scenario when the wirelessly received signal and the acoustic environment signal are very similar, the loudspeaker output quality is fair and the signal can be easily understood and comprehended. For a more practical scenario when the input from the acoustic environment is the delayed version of the wireless signal, the loudspeaker output quality is nearly fair but only slightly annoying. However, the speech can still be understood easily. Similarly, when the wireless signal and the acoustic environment input are both independent signals generated from different sources, the loudspeaker signal quality is fair but better than when only shaping filter is optimized. In this case also, the speech can be easily understood even though slightly annoying artefacts are present due to signal correlation.

Table 1 PESQ values related to mean opinion scores in the range 1–5
Table 2 Explanation of PESQ values
Table 3 Absolute ratings of listening test scores

In addition to computing the PESQ values, we also conducted a listening test based on absolute ratings of quality of the signal under consideration. Evaluation of sound quality for the acoustic feedback suppression systems is usually performed using absolute ratings of quality-based tests. These tests allow for a convenient assessment of the test signal quality. On the other hand, audiologists use relative ratings, such as those used in [4], to improve fitting of the assistive listening devices [5]. For our work, the test based on absolute ratings was carried out in duration of 2 days in a quiet room. We selected 20 test subjects with normal hearing to evaluate the signal quality within the range 1–5 [11] as provided in Table 1, similar to that done in [6, 9, 13]. A pair of headphones (Beyerdynamic DT 990 professional over-ear headphones) connected to the computer is used by the test subjects to listen to the signals, and the score for each signal for every test session was recorded on the computer. The mean of ratings for each signal is given in Table 3. The logic behind selecting test subjects with normal hearing is that if the distortion in the signal under consideration is not annoying to the test subjects with normal hearing, it is unlikely that it will be annoying to the hearing aid users [2]. This way, we were able to obtain a lower threshold for the acceptable signal quality. It can be observed from Table 3 that the mean scores for the optimized loudspeaker outputs are close to the computed PESQ values in Table 1.

4 Conclusion

In this paper, we analysed the different scenarios, viz. the wirelessly received signal and the acoustic environment input, are emitted from different sources and are less correlated to each other or emitted from the same source and are highly correlated, in which case the wirelessly received signal can be very similar to the signal from the acoustic environment or to a time-delayed version of it. For the aforementioned scenarios, we optimized the shaping filter and the feed-forward path to minimize the proposed cost function for reducing the estimation bias and improving the output quality. The proposed optimization technique provided improvement in quality of the loudspeaker signal output, the normalized misalignment and the maximum stable gain for each of the considered scenarios.