Proceedings of APSIPA Annual Summit and Conference 2017 12 - 15 December 2017, Malaysia Effect of the Audio Amplifier’s on Feedforward Active Control

Dongyuan Shi∗, Chuang Shi†, and Woon-Seng Gan‡ ∗‡ School of Electrical and Electronic Engineering, Nanyang Technological University, Singapore † School of Electronic Engineering, University of Electronic Science and Technology of China, Chengdu, China ∗ E-mail: [email protected] † E-mail: [email protected] ‡ E-mail: [email protected]

Abstract—Active (ANC) is an effective method with broadband noise, not to mention its robustness under for reducing low-frequency acoustic noise. An anti-noise wave is different noise environments [21]. transmitted by the secondary source to destructively interfere The real-time implementation of a feedforward ANC system with the noise wave. A quiet zone is thus formed around the error , which provides the error signal in the encounters several practical constraints: (i) the electronic delay adaptation process of an ANC controller. However, the real-world must be shorter than the acoustic delay from the reference performance of an ANC system is often subjected to the distortion microphone to the secondary source to ensure the overall sys- incurred in its electronic components. This distortion has been tem’s causality [22]; (ii) imperfect modeling of the secondary conventionally treated as a trivial part of the secondary path path leads to non-optimized performance; (iii) model. When the distortion is severe but the secondary path model is still forced to be linear, the nonlinearity of the true excessive analog amplification of the secondary source causes secondary path is no longer negligible and causes degradation in distortion that may break the controller’s stability. However, noise reduction performance or even divergence of the ANC con- the last constraint has not been well studied. There are only troller. This paper revisits the causes of the amplitude distortion few papers about the effect of the nonlinear secondary path on in the audio amplifier and how it influences the convergence of the the performance of an ANC system [23], [24]. Hence, there filtered-x least mean square (FxLMS) algorithm in a feedforward ANC system for tonal noise cancellation. is a lack of explanation on how over-amplification can break down an ANC controller. When the output power of the audio I.INTRODUCTION amplifier exceeds its rated output power or greater than the rated power of the secondary source, termed as saturation In modern urban living, traffic, construction and machinery and mismatch respectively, the anti-noise wave generated by are becoming more intrusive due to the proximity of the ANC system is distorted and results in additional high- residential buildings and noise sources. Exposure to excessive frequency annoyance and sometimes divergence of the ANC noise can lead to sleeping disturbance, hypertension and controller. This paper revisits the distortion incurred in the vascular diseases. Passive solutions are known effective in audio amplifier and elaborates how this distortion degrades canceling the high-frequency noise due to their ability to the noise reduction performance and breaks the stability of a absorb and reflect the noise wave, but become too expensive feedforward ANC system. and impractical for mitigating the low-frequency noise, whose upper frequency bound is typically below 2 kHz. Paul Leug II.AMPLIFIER DISTORTION patented the idea of active noise control (ANC) in 1936 to The audio amplifier, which drives the secondary source combat the low-frequency air-flow noise in a duct [1], [2], [3], to generate the anti-noise wave, is a very critical but often [4]. Since then, many types of ANC systems have been devel- overlooked electronic component in an ANC system. Class A oped with the open-loop, feedforward and feedback structures. and Class AB amplifiers own low distortion and short latency The filtered-x least mean square (FxLMS) algorithm is the but also low power efficiency. In contrast, Class D amplifiers most effective and computationally efficient adaptive algorithm have high power efficiency but long latency. Despite of types that is being used in many ANC systems [5]. The real-time of audio amplifiers, they may have the same three types digital processing platforms for ANC systems include micro- of distortion, which are the amplitude distortion, frequency controllers [6], digital signal processors (DSP) [7] and field distortion and phase distortion. Among them, the amplitude programmable gate arrays (FPGA) [8]. distortion plays the most important role in an ANC system. Over the past thirty years, ANC systems have been suc- There are two causes of the amplitude distortion. Firstly, cessfully deployed in applications such as canceling noise the inappropriate biasing level applied to the audio amplifier in ventilation ducts [9], [10], home windows [11], [12], causes only a portion of the input being amplified and the rest [13], [14], [15], MRI equipment [16], [17], headsets and ear being clipped. This usually happens to the discrete component protectors [18], [19], [20]. Among those applications, the amplifier. Using the integrated audio amplifier can avoid this feedforward ANC structure is usually favorable when dealing problem. Secondly, the output level of the audio amplifier

978-1-5386-1542-3@2017 APSIPA APSIPA ASC 2017 Proceedings of APSIPA Annual Summit and Conference 2017 12 - 15 December 2017, Malaysia

Fig. 1. The curve of output amplitude vs. input amplitude of an audio amplifier. Fig. 2. The clipped output signal of an audio amplifier. is limited by the supply voltage. Therefore, large input to the audio amplifier cannot be faithfully amplified. Figure 1 shows the input-output curve of an audio amplifier, where Vthr indicates the supply voltage and the voltage gain of this audio amplifier is set to 1. The input signal is a sinusoidal signal, given by y(t) = C sin(ω0t), (1) where ω0 and C denote the frequency and amplitude respec- tively. When C is greater than Vthr, the output of the audio amplifier is clipped at the top and bottom as shown in Fig. 2. This clipped waveform can be mathematically expressed as  Fig. 3. Single-frequency adaptive noise canceler. − ∈ π − π  Vthr ω0t + 2kπ [ 2 ∆t, 2 + ∆t] y(t) = C sin(ω0t) others , (2) thus given by  ∈ π − π Vthr ω0t + 2kπ [ 2 ∆t, 2 + ∆t] x0(n) = sin(ω0n + θr) (5) π − Vthr ∈ Z where ∆t = 2 arcsin( C ) and k . Its Fourier series x1(n) = cos(ω0n + θr), (6) can be written as where θr is the initial phase of the reference signals. Based −2∆t + π + sin(2∆t) y(t) = C sin(ω0t) on the FxLMS algorithm, the coefficient updating equation of π . (3) the single-frequency feedforward ANC controller is written as 4 cos(∆t) sin3(∆t) + C sin(3ω0t) + . .. ∗ 3π w0(n + 1) = w0(n) + µe(n)[x0(n) hs(n)] (7) ∗ Equation (3) tells that the clipped waveform consists of the w1(n + 1) = w1(n) + µe(n)[x1(n) hs(n)], (8) odd-order harmonics. Furthermore, when an audio amplifier where µ is the step size and e(n) is the error signal [25]. When exhibits the amplitude distortion, it can be regarded as a the coefficients of the controller reach the optimal solution, the memoryless system, because the output y(n) relies only on ′ anti-noise y (n) should equal to the disturbance signal d(n), the current input y(n), where y(n) and y(n) represent y(t) i.e. and y(t) in the digital domain. ′ y (n) = y(n) ∗ hs(n) = d(n), (9) III.INFLUENCE OF THE AMPLITUDE DISTORTION ON ANC where y(n) is the output signal of the control filter. PERFORMANCE Figure 3 displays the block diagram of a single-frequency A. Case A: Moderate Overdriving feedforward ANC controller [25]. Hˆs(z) is the estimate of the When the amplitude of the disturbance signal exceeds the secondary path Hs(z). To simplify the analysis, it is assumed threshold of the audio amplifier, the output signal y(n) is dis- −jθs that Hˆs(z) = Hs(z) = Ase . The primary disturbance torted and expressed by (3). As the over-driving is moderate, signal d(n) is defined as the fundamental and third-order harmonics are dominating in the distorted output, which are written as d(n) = D sin(ω0n), (4) yfirst(n) = AC(n) sin(ω0n + θ0) (10) where D is the amplitude of the disturbance signal and ω0 is the noise frequency. The two orthogonal reference signals are ythird(n) = BC(n) sin(3ω0n + θ1), (11)

978-1-5386-1542-3@2017 APSIPA APSIPA ASC 2017 Proceedings of APSIPA Annual Summit and Conference 2017 12 - 15 December 2017, Malaysia when the controller’s output y(n) is actually given by

y(n) = C(n) sin(ω0n + θ0). (12) The corresponding harmonics in the anti-noise are written as ′ − yfirst(n) = AsAC(n) sin(ω0n + θ0 θs) (13) ′ − ythird(n) = AsBC(n) sin(3ω0n + θ1 θs). (14) Fig. 4. The equivalent diagram of the single-frequency adaptive noise canceler for the third-order harmonic. It is noteworthy that A changes slowly when the amplitude of y(n) is only slightly greater than the amplifier’s threshold which is a positive feedback loop and hence easily becomes Vthr. ′ The error signal is further written as unstable. The amplitude of ythird(n) will increase until the gradient of the FxLMS algorithm decreases to 0. − ′ − ′ e(n) = d(n) yfirst(n) ythird(n) ... (15) In the moderate over-driving case, the amplitude of the disturbance is only slightly greater than the threshold Vthr. where the ... denotes the higher-order harmonics in y′(n). Thus, A = D ≈ Copt, where Copt is the amplitude of y(n) The modified coefficient updating equation is thus derived as when the control filter reaches its optimal solution. From (3), ′ ′ ′ the third-order harmonic is finally derived as w0(n + 1) = w0(n) + µe(n)x0(n) (16) w′ (n + 1) = w′ (n) + µe(n)x′ (n), (17) − 2 3/2 1 1 1 ≈ 2A√sVthr(1 ξ ) ythird(n) sin(3ω0n), (24) ′ ′ 3(ξ 1 − ξ2 + arcsin ξ) where w0(n) and w1(n) are the coefficients of the controller when the audio amplifier generates amplitude distortion. Be- Vthr ′ ′ where ξ = D . Using to the same procedure, the other cause x0(n) and x1(n) are orthogonal to the harmonics in the harmonics can also be found to be constant when the control anti-noise, after calculating the expectation of (16) and (17), filter reaches the optimal solution. the coefficient updating equation becomes A B. Case B: Severe Overdriving w′ (n + 1) = w′ (n) + µE{[d(n) − y′(n)]x′ (n)} (18) 0 0 C(n) 0 When the amplitude of the disturbance is much greater A than threshold of the audio amplifier, the distorted output w′ (n + 1) = w′ (n) + µE{[d(n) − y′(n)]x′ (n)} (19) 1 1 C(n) 1 approximates a bipolar rectangular wave. In this case, we y(n) θ ′ assume that the has the initial phase of s and can be where C(n) is independent with the reference signal x0(n) ′ expressed as and x1(n). { Therefore, the optimal coefficients of the controller with the V ω n + 2kπ ∈ (−θ , π − θ ] y(n) ≈ thr 0 s s (25) amplitude distortion are derived as −Vthr ω0n + 2kπ ∈ (π − θs, 2π − θs],

′o 1 o ∈ Z w0 = w0 (20) where k . The Fourier series of the anti-noise is written A as ′o 1 o w1 = w1, (21) ′ 4AsVthr 4AsVthr A y (n) ≈ sin(ω0n) + sin(3ω0n) . . .. (26) o o π 3π where w0 and w1 are the optimal coefficients of the controller without the amplitude distortion. It is hence confirmed that the If the amplitude of the disturbance is greater than the ampli- FxLMS algorithm has an optimal solution under this situation. tude of the fundamental harmonic, i.e. The disturbance d(n) is finally canceled by the fundamental 4A V D > s thr , (27) harmonic yfirst(n) but the third- and high-order harmonic are π introduced as the high-frequency annoyance. the ANC controller diverges and fails to cancel the disturbance. The error transfer function of the single-frequency ANC This is because that the power of the error signal leads to controller can be written as negative gradient in the FxLMS algorithm, i.e. Y (z) 2µ[zA cos(ω + θ − θ ) − 1] G(z) = = s 0 r s , (22) 1 4A V E(z) z2 − 2zA cos(ω + θ − θ ) + 1 ∇E{∥e∥2} = ( s thr − D) < 0. (28) s 0 r s 2 π where Y (z) and E(z) are the z-domain output and error In summary, the single-frequency ANC controller is stable signals respectively [25]. Based on the simplified structure and does not generate high-frequency annoyance, when the shown in Fig. 4, the transfer function of the third-order disturbance’s amplitude D ∈ [0,Vthr]. The high-frequency harmonic ythird(n) is written as annoyance is incurred, when there is moderate overdriving, i.e. ∈ 4AsVthr 1 D (Vthr, π ]. The ANC controller becomes unstable, He(z) = , (23) ∈ 4AsVthr ∞ 1 − G(z)Hs(z) when D ( π , + ).

978-1-5386-1542-3@2017 APSIPA APSIPA ASC 2017 Proceedings of APSIPA Annual Summit and Conference 2017 12 - 15 December 2017, Malaysia

whereby the disturbance is sufficiently canceled but high-order harmonics are observed in the attenuated noise. Subsequently, D is adjusted from 0.74 to 0.97. The curves of the coefficient W 1(n) are drawn in Fig. 6 for different values of D. When D is slightly less than the threshold, the coefficient W 1 is close the optimal solution; when the D ∈ [0.75, 0.9549), the controller converges to a different optimal solution; when D > 0.9549, the FxLMS algorithm fails to converge. Therefore, the simulation results obey well with our analysis in the previous section.

V. CONCLUSIONS The amplitude distortion is a common issue of the audio amplifier, but its effect is seldom studied in ANC systems. This Fig. 5. Spectrum of the disturbance and attenuated noise at 500 Hz in the moderate over-driving case. paper takes the single-frequency feedforward ANC controller as an example and elaborates the generation of the additional high-frequency annoyance due to the moderate overdriving and the slightly distorted anti-noise signal. As long as the ampli- tude of the disturbance is less than the maximum amplitude of the fundamental harmonic in the distorted output of the secondary source, the FxLMS algorithm can still converge. Otherwise, the mild overdriving can surely lead to the diver- gence of the FxLMS algorithm.

VI.ACKNOWLEDGMENT This material is based on research work jointly sup- ported by the Haliburton Singapore-NTU Fund (Project Code M4061428) and the Fundamental Research Funds for the Central Universities (Project No. A03017023601291).

Fig. 6. The curves of weight w1(n) for disturbances with different power. REFERENCES [1] S. M. Kuo and D. R. Morgan, “Active noise control: a tutorial review,” Proceedings of the IEEE, vol. 87, no. 6, pp. 943–973, 1999. IV. SIMULATION [2] P. A. Nelson and S. J. Elliott, Active control of . Academic press, 1991. In this simulation, the output function of the audio amplifier [3] C. N. Hansen, Understanding active noise cancellation. CRC Press, is configured as 2002.  [4] Y. Kajikawa, W. S. Gan, and S. M. Kuo, “Recent applications and −0.75 y(n) < −0.75 challenges on active noise control,” in 2013 8th International Symposium on Image and Signal Processing and Analysis (ISPA), Sept 2013, pp. y(n) = y(n) others , (29)  661–666. 0.75 y(n) > 0.75 [5] D. R. Morgan, “History, applications, and subsequent development of the fxlms algorithm [dsp history],” IEEE Signal Processing Magazine, y(n) y(n) vol. 30, no. 3, pp. 172–176, May 2013. where and are the input and output signal of the [6] K. K. Shyu, C. Y. Ho, and C. Y. Chang, “A study on using micro- audio amplifier. The primary noise is given by controller to design active noise control systems,” in 2014 IEEE Asia Pacific Conference on Circuits and Systems (APCCAS), Nov 2014, pp. x(n) = D sin(0.1πn), (30) 443–446. [7] S. M. Kuo and D. Morgan, Active noise control systems: algorithms and where D is the amplitude of the d(n). The disturbance signal DSP implementations. John Wiley & Sons, Inc., 1995. [8] D. Shi, C. Shi, and W. S. Gan, “A systolic fxlms structure for imple- is generated by a simple primary path as mentation of feedforward active noise control on fpga,” in 2016 Asia- Pacific Signal and Information Processing Association Annual Summit d(n) = 0.01x(n − 1) + 0.99x(n − 2) + v(n), (31) and Conference (APSIPA), Dec 2016, pp. 1–6. [9] E. Esmailzadeh, A. Alasty, and A. Ohadi, “Hybrid active noise control where v(n) is a white whose variance is of a one-dimensional acoustic duct,” Journal of Vibration and , 0.0323. The secondary path is a single delay which has a vol. 124, no. 1, pp. 10–18, 2002. [10] P. Minogue, N. Rankin, and J. Ryan, “Adaptively canceling server fan unit gain (As = 1). Moreover, the sampling frequency is set noise,” Analog Dialogue, vol. 2, pp. 34–40, 2000. to 10 kHz. [11] B. Lam, S. Elliott, J. Cheer, and W. S. Gan, “The physical limits of active noise control of open windows,” in 12th Western Pacific Acoustics Using (29) and Vthr = 0.75, the threshold of the disturbance Conference, December 2015. is calculated as (4AsVthr)/π = 0.9549. When D equals to [12] T. Murao and M. Nishimura, “Basic study on active acoustic shielding,” 0.94, the spectrum of the attenuated noise is shown in Fig. 5, Journal of Environment and Engineering, vol. 7, no. 1, pp. 76–91, 2012.

978-1-5386-1542-3@2017 APSIPA APSIPA ASC 2017 Proceedings of APSIPA Annual Summit and Conference 2017 12 - 15 December 2017, Malaysia

[13] B. Lam, C. Shi, and W. S. Gan, “Active Noise Control Systems for Open Windows : Current Updates and Future Perspectives,” in Proceedings of the 24th International Congress on Sound and Vibration, London, UK, 2017, pp. 1–7. [14] B. Lam and W. S. Gan, “Active acoustic windows: Towards a quieter home,” IEEE Potentials, vol. 35, no. 1, pp. 11–18, Jan 2016. [15] X. Qiu, “Recent advances on active control of sound transmission through ventilation windows,” in Proceedings of the 24th International Congress on Sound and Vibration, London, UK, 2017. [16] H. Sawano and Y. Kajikawa, “Active noise control systems with simpli- fied period aware linear prediction method for mr noise,” in 2016 Asia- Pacific Signal and Information Processing Association Annual Summit and Conference (APSIPA), 2016, pp. 1–4. [17] Y. Kajikawa, W. S. Gan, and S. M. Kuo, “Recent advances on active noise control: open issues and innovative applications,” APSIPA Trans- actions on Signal and Information Processing, vol. 1, p. e3, 2012. [18] W. S. Gan, S. Mitra, and S. M. Kuo, “Adaptive feedback active noise control headset: implementation, evaluation and its extensions,” IEEE Transactions on Consumer Electronics, vol. 51, no. 3, pp. 975–982, 2005. [19] W. S. Gan and S. M. Kuo, “An integrated audio and active noise control headset,” IEEE Transactions on Consumer Electronics, vol. 48, no. 2, pp. 242–247, 2002. [20] S. M. Kuo, S. Mitra, and W. S. Gan, “Active noise control system for headphone applications,” IEEE Transactions on Control Systems Technology, vol. 14, no. 2, pp. 331–335, March 2006. [21] C. Kean and M. Yuanliang, “Adaptive active broadband noise control,” Acta Acustica, vol. 2, 1994. [22] X. Kong and S. M. Kuo, “Study of causality constraint on feedforward active noise control systems,” IEEE Transactions on Circuits and Systems II: Analog and Digital Signal Processing, vol. 46, no. 2, pp. 183–186, 1999. [23] X. Qiu and C. H. Hansen, “A study of time-domain fxlms algorithms with control output constraint,” The Journal of the Acoustical Society of America, vol. 109, no. 6, pp. 2815–2823, 2001. [24] W. J. Kozacky and T. Ogunfunmi, “An active noise control algorithm with gain and power constraints on the adaptive filter,” EURASIP Journal on Advances in Signal Processing, vol. 2013, no. 1, p. 17, 2013. [25] B. Widrow, J. R. Glover, J. M. McCool, J. Kaunitz, C. S. Williams, R. H. Hearn, J. R. Zeidler, J. E. Dong, and R. C. Goodlin, “Adaptive noise cancelling: Principles and applications,” Proceedings of the IEEE, vol. 63, no. 12, pp. 1692–1716, 1975.

978-1-5386-1542-3@2017 APSIPA APSIPA ASC 2017