ACTIVE CONTROL OF SOUND AND VIBRATION COMPUTER LAB 2 – SISO ANC
DR JORDAN CHEER
1. Introduction
This lab will extend the work you completed for the first lab to consider broadband random distur- bances. You should use the same data that you were provided with in the first lab and you can either use your code from lab 1 or the code for lab 1 that has now been made available.
You will again consider the motivating example of an ANC headphone implementation, which is shown diagrammatically in Figure 1.
Figure 1. ANC headphones
By the end of this lab you should have consolidated and applied your understanding of the concepts
covered in the first three lectures. Specifically you should be able:
• Calculate the unconstrained optimal performance for a SISO broadband controller and demon- strate an understanding of the practical implementation.
• Implement the Filtered Reference LMS algorithm and demonstrate an understanding of what practical limitations this does and does not overcome.
2. SISO Tonal Control
In lab 1 you observed that the optimal controller theoretically achieved a huge amount of attenuation in the error signal at all frequencies. In fact, the level of attenuation was only limited by the precision of your computer. In practice, a harmonic controller will be limited by:
• The fact the disturbance signal, Dk, cannot, in practice, be measured directly, because it will be corrupted by the signal due to the controller at the error microphone. Instead it is necessary in a feedforward controller to use a reference signal.
• The fact that the plant response model used to calculate the control signals will not be perfect. The physical plant response may change over time and, therefore, no longer match the plant response that you identified in lab 1, or it may behave non-linearly, or may be subject to measurement noise.
1
2 DR JORDAN CHEER
It should also be highlighted that, although in the first lab you plotted the control over a broad frequency range, this assumed that the response at each frequency is due to a harmonic, tonal signal, which is predictable in nature. In practical noise control applications, it is more likely that there would be either (a) a small number of discrete harmonics to control or (b) that the noise would be stochastic and broadband in nature. This second situation is addressed in this lab.
3. Unconstrained Optimal Broadband Control
In general, the ANC headphones need to control broadband, stochastic disturbances. For example, they are often used in aircraft where the unwanted noise is broadband. This can be achieved using feedforward or feedback control strategies; here we focus on the feedforward case.
In the previous lab, the harmonic controller assumes that we have a perfect tonal reference signal. In the case of the ANC headphones, as shown in Figure 1, the reference signal for the broadband controller is provided by a microphone on the outside of the ear cup. In this section you will calculate the optimum broadband feedforward controller, with no constraint on the causality of the control filter.
Following the derivation in the lecture slides ‘Single channel control systems’ for the unconstrained optimum controller, the power spectral density of the error signal can be expressed at a single frequency as
S =W∗S W+W∗S +S∗W+S , (1) ee rr rd rd dd
where W is the control filter response, Srr is the PSD of the filtered reference signal, Srd is the cross power spectral density between the filtered reference signal and the disturbance signal, Sdd is the power spectral density of the disturbance signal and ∗ denotes complex conjugation. (Note I have dropped the dependency on (ejωT ) for notational convenience).
The power spectral density of the error signal given by eq. 1 is a Hermitian quadratic function and, therefore, has a global minimum. As shown in the lecture slides, the optimum control filter frequency response is given by
Wopt=−Srd=−Sxd , (2) Srr GSxx
where Sxx is the power spectral density of the reference signal and Sxd is the cross power spectral density between the reference and disturbance signals.
Using eq. 2, calculate the optimum broadband controller response. To achieve this, you will need to first calculate:
(1) The cross power spectral density between the reference and disturbance, Sxd, (2) The power spectral density of the reference signal, Sxx.
Once you have calculated Wopt, you should plot its magnitude and phase response over frequency, remembering to again label the axes appropriately. What observations can you make about this optimal controller from its response in the frequency domain and how this might limit the practicality of this implementation?
Having calculated Wopt, you should then calculate the power spectral density of the error signal See and the disturbance signal, Sdd, and plot their values on the same plot. Note, you can calculate See according to eq. 1, but a more efficient calculation can be achieved by substituting eq. 2 into eq. 1 and simplifying to give
|Sxd |2
See=Sdd−S . (3)
xx
If you compare the performance in this case to that calculated in the case of the Harmonic controller in lab 1, what do you notice? You should link the expected performance limitation in the broadband random case to the coherence between the reference and error signals.
Although you have predicted a broadband attenuation using the optimal controller given by eq. 2, this control filter is not causally contained. This means that it relies on both past and future input samples to generate its output; you can observe this by inverse Fourier transforming Wopt and plotting the impulse response of this optimal filter.
ACTIVE CONTROL OF SOUND AND VIBRATION COMPUTER LAB 2 – SISO ANC 3
4. Filtered Reference LMS Algorithm
In practice, it is necessary for the control filter to be causally constrained. This has been covered in the lecture on’ Digital Controllers’. It is possible to calculate the optimal, causally constrained controller, however, in many practical applications it also necessary for the controller to adapt over time. This means that the control filter can be iteratively adjusted to maximise performance as the disturbance signal changes; it can also allow for increased robustness to plant modelling errors. Therefore, you will now implement and assess the performance of the filtered-reference least mean squares (Filtered-Reference LMS, Filtered-x LMS, FxLMS) algorithm, which is the most widely used algorithm in active control applications.
The FxLMS algorithm has been introduced in the lecture slides and a detailed derivation can also be found in the book “Signal Processing for Active Control” by Steve Elliott. The FxLMS algorithm is given as
w(n + 1) = w(n) − αr(n)e(n), (4)
where n is the sample number or index, w is the vector of control filter coefficients, α is the convergence gain, which determines the speed of adaptation and the stability of the algorithm, r is the vector of current and previous samples of the reference signal, x, filtered by the plant response, G, and e is the error signal. The dimensions of each of the signals are given in Table 1
NOTE: in the previous sections you have been working in the frequency domain; here, you are working in the time domain.
You should write a script that implements the FxLMS algorithm given by eq. 4. Since you are operating in the time domain, this can be implemented using a for loop that operates over the sample time – in a consistent way to how a DSP board might carry out operations on a sample-by-sample basis.
Within each loop you will need to calculate the control filter update equation given by equation 4 and in order to do this you will also need to calculate the error signal, e(n), and the filtered reference signal, r(n), in order to populate the vector of current and previous filtered reference signals used in the update equation.
The error signal is given by
e(n) = d(n) + gT u(n) (5)
where g is the vector containing the impulse response of the plant that you calculated in Section ?? and u(n) is the vector of the current and the previous (I − 1) samples of the control signal. Note, the vector multiplication gT u(n) implements the convolution of the control signal with the plant response.
The control signal is given by convolving the control filter with the vector of current and previous (Iw − 1) reference signals, x(n), which can be implemented as
u(n) = wT (n)x(n). (6) Similarly, the filtered reference signal can be calculated as
r(n) = gT x(n). (7) Table 1. Dimensions of the signals utilised in the implementation of the FxLMS algorithm
Variable Dimensions
Description
Current error signal sample
Current reference signal sample
Current sample of the reference signal filtered by the plant response Current control signal sample
convergence gain
Vector of control filter coefficients
Vector of plant response filter coefficients
Vector of current and previous (Iw − 1) samples of the reference signal Vector of current and previous (Iw − 1) samples of the filtered reference signal Vector of current and previous (I − 1) samples of the control signal
e(n) x(n) r(n) u(n) α w(n) g x(n) r(n) u(n)
scalar scalar scalar scalar Scalar (Iw × 1) (I × 1) (Iw × 1) (Iw × 1) (I × 1)
The implementation process is summarised in the following steps, using a for loop operating over time (index n):
4
DR JORDAN CHEER
(1) Calculate and store current control signal output, u(n).
(2) Calculate and store current error signal, e(n);
(3) Calculate and store current filtered reference signal, r(n);
(4) Calculate and store the updated control filter coefficients, w(n + 1); (5) Repeat.
Note: because the implementation of the FxLMS algorithm requires both current and past samples to be utilised, you will need to both (1) store current and past samples and (2) start your for loop from either Iw or I, whichever is larger, so that you have sufficient previous samples to populate the vectors detailed in Table 1
Having implemented your FxLMS algorithm, you should plot the convergence of the filter coeffi- cients and error signal over time. You should also calculate the power spectral density of the error and disturbance signals and plot the performance of this practical system and compare it to the perfor- mance achieved in the previous section - can you explain the differences in performance? Finally, you should plot the impulse response of the control filter, w, after convergence and compare this to the unconstrained optimal result calculated in the previous section. Comment on the differences between the control filter given by the unconstrained optimal solution and that given by the FxLMS algorithm.
Note, you should try to vary the convergence gain α and investigate how this influences the speed of convergence and the level of control - what happens if it is very small or very large? You can also adjust the control filter length and investigate how this influence performance and convergence speed. What practical trade-offs are there in setting the convergence gain?
5. Summary
This lab has allowed you to implement the feedforward controller designs covered in the first three lectures. Notably, you should now have consolidated your knowledge and be able to implement and discuss as appropriate:
(1) Harmonic vs. stochastic control
(2) Feedforward reference signal requirements
(3) Control filter causality
(4) FxLMS implementation and the influence of convergence gain and control filter length.
6. Further Reading
In addition to the lecture notes, Chapter 2 and 3 of Elliott, S.J., Signal processing for active control, Elsevier, 2000.
版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。