In-vehicle Automatic Phase Equalization Method and System Based on Second-Order All-Pass IIR Filter

By adopting an automatic phase equalization method based on a second-order all-pass IIR filter in the car, the phase response is automatically adjusted, and the problem of inaccurate sound and image positioning in the car is solved, achieving low-cost and efficient phase compensation.

CN114900774BActive Publication Date: 2025-05-27COLSONIC SUZHOU ELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210497745.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-09
Publication Date
2025-05-27
Estimated Expiration
2042-05-09

AI Technical Summary

Technical Problem

In the environment inside the car, the user has inaccurate sound and image positioning due to inconsistent distances between left and right speakers. The traditional parameter eq tuning method cannot adjust the phase difference. The existing full-pass FIR filter has a large amount of calculation, while the full-pass IIR filter is difficult to adjust the parameters.

Method used

The in-vehicle automatic phase equalization method based on the second-order all-pass IIR filter is adopted. By obtaining the acoustic field average phase difference response as the target phase difference response, multiple sets of second-order all-pass IIR filters are specified, and filter parameters are automatically adjusted through random searches to achieve automatic adjustment of phase response.

Benefits of technology

Real-time phase compensation with low computing complexity is achieved, hardware costs are reduced, phase response is adjusted automatically, tuning engineers are reduced, and time and labor are saved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114900774B_ABST
    Figure CN114900774B_ABST
Patent Text Reader

Abstract

The present invention discloses an in-vehicle automatic phase equalization method and system based on a second-order all-pass IIR filter. The in-vehicle automatic phase equalization method includes: obtaining the average phase difference response in the in-vehicle listening area as the target phase difference response; within the frequency range [Fre_Low, Fre_High], dividing the target phase difference response into multiple sub-regions according to the zero-crossing points, and selecting one of the sub-regions as the current corrected phase region; finding the phase difference value P and the corresponding frequency Fc within the current corrected phase region, and obtaining the quality factor Q; entering a random search, adding random perturbation variables to P, Fc, and Q, determining the final values of P, Fc, and Q, and calculating the coefficients of the left and right second-order all-pass IIR filters of the first set of second-order all-pass IIR filters according to the parameters P, Fc, and Q; updating the target phase difference curve according to the coefficients of the first set of second-order all-pass IIR filters that have been calculated. The method of the present invention has a low operation complexity and can automatically adjust the phase response at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to an in-vehicle automatic phase equalization method and system based on a second-order all-pass IIR filter. Background Art

[0002] Traditional stereo playback configurations such as Figure 1 As shown in the figure, the left and right speakers are exactly the same, and the user is at the same distance from the left and right speakers. In this case, the user is in the best listening area, so accurate sound and image positioning information can be obtained. However, most environments cannot meet this requirement. Figure 1 conditions, but as Figure 2 As shown, in a car, the user in the driving position is generally close to the left speaker and far from the right speaker. Under this condition, the sound image position will collapse, and the user cannot get the accurate sound image position. Due to the existence of the Haas effect, the user may even feel that the sound comes entirely from the left speaker.

[0003] Since the user is at different distances from the left and right speakers, the amplitude and phase from the left and right speakers to the user are different, resulting in inaccurate sound and image positioning. The traditional parametric EQ tuning method only adjusts the amplitude. By manually adjusting the parameters, the amplitude difference can be adjusted to the minimum, but the phase difference cannot be adjusted. Existing research shows that in the sound and image positioning of broadband signals, the sound and image positioning of low-frequency signals is the main factor, and the phase difference at low frequencies is an important factor affecting the sound and image positioning. Therefore, in order to obtain accurate sound and image positioning, the phase must be adjusted.

[0004] In a space without reflection, the phase difference introduced by the inconsistent distance can be compensated by pure delay, but in a small compartment, due to multiple reflections, pure delay cannot completely compensate for the phase difference. The phase difference can be achieved by an all-pass FIR filter. Although the FIR filter is simple to implement, the FIR filter has a large amount of calculation and requires high hardware computing resources. The all-pass IIR filter has low computational complexity and is suitable for low-cost hardware implementation, but it is difficult to adjust the parameters. Summary of the invention

[0005] In view of the above problems, the present invention provides an in-vehicle automatic phase equalization method and system based on a second-order all-pass IIR filter, which has low computational complexity and can automatically adjust the phase response.

[0006] In order to achieve the above object, the present invention adopts the following technical solution:

[0007] An in-vehicle automatic phase equalization method based on a second-order all-pass IIR filter comprises the following steps:

[0008] S100, obtaining an average phase difference response of the sound field in the listening area in the vehicle as a target phase difference response;

[0009] S200, specifying N groups of second-order all-pass IIR filters and a frequency interval [Fre_Low, Fre_High] for equalization, wherein each group of the second-order all-pass IIR filters includes a left second-order all-pass IIR filter for controlling a phase response of a left speaker in a vehicle and a right second-order all-pass IIR filter for controlling a phase response of a right speaker in a vehicle;

[0010] S201, within the frequency interval [Fre_Low, Fre_High], dividing the target phase difference response into a plurality of sub-regions according to the zero-crossing point, and selecting one of the sub-regions as the current corrected phase region;

[0011] S202, finding the phase difference value P and the corresponding frequency Fc corresponding to the maximum absolute value in the current corrected phase region, obtaining the quality factor Q, and calculating the coefficients of the left and right second-order all-pass IIR filters of the second-order all-pass IIR filter according to the phase difference value P, the frequency Fc and the quality factor Q;

[0012] S203, enter random search, add random disturbance variables to P, Fc and Q, recalculate filter coefficients according to new values, and at the same time judge the effect of the new filter in the current corrected phase region, if the effect is improved, retain the new value, otherwise retain the old value, perform multiple random searches, determine the final P, Fc and Q values, and calculate the coefficients of the left and right second-order all-pass IIR filters of the first group of second-order all-pass IIR filters according to the parameters P, Fc and Q;

[0013] S204, updating the target phase difference curve according to the calculated coefficients of the first set of second-order all-pass IIR filters;

[0014] S205, using the updated target phase difference curve as the target phase difference curve of the next set of second-order all-pass IIR filters;

[0015] Steps S201 to S205 are repeated until all coefficients of the N groups of second-order all-pass IIR filters are calculated.

[0016] In some preferred embodiments, the transfer function of the second-order all-pass IIR filter is where z -1 、z -2 is the delay unit, b 0 , b 1 , b 2 are the filter coefficients of a second-order all-pass IIR filter.

[0017] In some preferred embodiments, in step S202 or S203, the coefficients of the left and right second-order all-pass IIR filters are calculated specifically by the following steps:

[0018] Calculate the frequency based on the quality factor Q and frequency Fc and When the phase difference value P is greater than 0, Fc L =f 1 , Fc R =f 2 ; When the phase difference value P is not greater than 0, Fc L =f 2 , Fc R =f 1 ; Among them, Fc L represents the center frequency of the left second-order all-pass IIR filter, Fc R represents the center frequency of the right second-order all-pass IIR filter;

[0019] The left and right second-order all-pass IIR filter coefficients are calculated based on the respective center frequencies of the left and right second-order all-pass IIR filters and the phases at the frequency Fc.

[0020] In some preferred embodiments, step S100 specifically includes:

[0021] S101, determining discrete control points within a listening area;

[0022] S102, testing the phase responses of the left speaker and the right speaker to the control point at the control point respectively, and performing subtraction to obtain a phase difference response;

[0023] S103: Averaging the phase difference responses at all control points to obtain a final target phase difference response.

[0024] In some preferred embodiments, in step S201, the region with the largest area is selected as the current corrected phase region.

[0025] In some preferred embodiments, in step S202, the closest phase is searched from both sides of the current correction phase region. The frequency F corresponding to the value 1 and F 2 , obtain the quality factor Q = Fc / (F 2 -F 1 ).

[0026] In some preferred embodiments, in step S203, the random disturbance variable is a random noise of a set percentage of P, Fc or Q. More preferably, the new value of P, Fc or Q after adding the random disturbance variable is 85-115% of the original value, and further 90-110%.

[0027] In some preferred embodiments, in step S203, the number of random searches is 50 to 100 times.

[0028] The present invention also adopts the following technical solution:

[0029] An in-vehicle automatic phase equalization system based on a second-order all-pass IIR filter is characterized by comprising a processing module and a left speaker and a right speaker arranged in a vehicle, wherein the processing module is used to execute the in-vehicle automatic phase equalization method as described above.

[0030] In some preferred embodiments, the processing module includes N groups of second-order all-pass IIR filters connected in sequence, each group of the second-order all-pass IIR filters includes a left second-order all-pass IIR filter for controlling the phase response of a left speaker in the car and a right second-order all-pass IIR filter for controlling the phase response of a right speaker in the car.

[0031] In some preferred embodiments, the processing module includes a DSP chip, and the N groups of second-order all-pass IIR filters are arranged on the DSP chip.

[0032] The present invention adopts the above solution, which has the following advantages compared with the prior art:

[0033] The in-vehicle automatic phase equalization method and system based on the second-order all-pass IIR filter of the present invention adopts an IIR filter structure, has low real-time calculation complexity, can effectively save resources, reduce hardware costs, and enhance product competitiveness; automatically adjusts the phase response, reduces the workload of tuning engineers, and can save a lot of time and manpower. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0035] Figure 1 This is a schematic diagram of the traditional stereo playback configuration;

[0036] Figure 2 A schematic diagram for the actual playback configuration of the in-car stereo;

[0037] Figure 3 It is a structural diagram of a set of second-order all-pass IIR filters;

[0038] Figure 4a The phase difference response for different P values ​​when Q=1 and Fc=100 is shown;

[0039] Figure 4b The phase difference response for different Q values ​​when P = 60 and Fc = 100 is shown;

[0040] Figure 4c The phase difference response for different Fc values ​​when Q=1 and P=60 is shown;

[0041] Figure 5 A schematic diagram of automatic phase equalization according to an embodiment of the present invention;

[0042] Figure 6 is a structural block diagram of an in-vehicle automatic phase equalization system according to an embodiment of the present invention;

[0043] Figure 7 The phase difference response of the original and the equalized embodiment is shown;

[0044] Figure 8 The error of the second-order all-pass IIR filter under different group numbers is shown. DETAILED DESCRIPTION

[0045] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art. It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0046] The in-car automatic phase equalization method of this embodiment is based on a second-order all-pass IIR filter to compensate for the phase difference between the sound played by the left and right speakers in the car and the user in the listening area (for example, near the driver's seat) to perform automatic phase equalization to avoid inaccurate sound and image positioning. The advantages of this automatic phase equalization method are: (1) the IIR filter structure is adopted, and the real-time calculation complexity is low, which can effectively save resources, reduce hardware costs, and enhance product competitiveness; (2) the phase response is automatically adjusted to reduce the workload of tuning engineers, which can save a lot of time and manpower. The in-car automatic phase equalization method of this embodiment is described in detail below.

[0047] 1. Measuring the average phase difference response of the sound field in the listening area in the car

[0048] 1. Determine discrete control points within the listening area;

[0049] 2. Test the phase responses of the left and right speakers to the control point at the control point respectively, and perform subtraction to obtain the phase difference response;

[0050] 3. Average the phase difference responses at all control points to obtain the final target phase difference response

[0051] 2. A set of second-order all-pass IIR filters

[0052] 1. As Figure 3 As shown, a set of second-order all-pass IIR filters 101 includes a left second-order all-pass IIR filter 101a and a right second-order all-pass IIR filter 101b, which are respectively used to control the phase response of the left speaker 200 and the right speaker 300. The transfer function of the second-order all-pass IIR filter 101a or 101b is as follows:

[0053]

[0054] Among them, z -1 is the delay unit, b 0 , b 1 , b 2 is the filter coefficient. By adjusting the coefficients of the left and right second-order all-pass IIR filters simultaneously and linkage, their phase difference response is made close to the target phase difference response.

[0055] 2. The input parameters of a set of second-order all-pass IIR filters are the quality factor Q, the phase difference P, and the frequency Fc;

[0056] 3. Convert a set of second-order all-pass IIR filter input parameters into left and right second-order all-pass IIR filter coefficients respectively.

[0057] Specifically, the frequency is first calculated based on the quality factor Q and frequency Fc and When P is greater than 0, Fc L =f1,Fc R =f 2 ; When P is not greater than 0, Fc L =f 2 , Fc R =f 1 ;

[0058] Then according to the center frequency Fc of the second-order all-pass IIR filter of the left and right channels L or Fc R ,, and frequency Fc, the center frequency Fc of the second-order all-pass IIR filter for the left and right channels L or Fc R The phase at frequency Fc is Convert the filter coefficients (see Greg Surges, Tamara Smyth, "Spectral Distortion Using Second-Order Allpass Filters" 2013).

[0059] 4. There are differences in the phase difference response curves of a set of second-order all-pass IIR filters under different parameters Q, P, and Fc, such as Figures 4a to 4c shown.

[0060] 3. Automatic Phase Balance

[0061] 1. As Figure 5 As shown, the number of groups of second-order all-pass IIR filters is specified as N, and the frequency range of equalization is specified at the same time, the lower limit frequency is Fre_Low, the upper limit frequency is Fre_High, and the phase difference response is corrected within the frequency range [Fre_Low, Fre_High].

[0062] 2. In the frequency range [Fre_Low, Fre_High], the target phase difference curve is divided into multiple sub-regions according to the zero-crossing point, the area of ​​each sub-region is calculated, and the region with the largest area is selected as the current corrected phase region.

[0063] 3. Find the phase difference value P and the corresponding frequency Fc corresponding to the maximum absolute value in the current corrected phase area, and start from both sides of the current corrected phase area to find the closest The frequency F corresponding to the value 1 and F 2 , obtain the quality factor Q = Fc / (F 2 -F 1 ), refer to the algorithm in the second part above to calculate the coefficients of the left and right second-order all-pass IIR filters according to the parameters P, Fc and Q.

[0064] 4. Enter random search, add random disturbance variables to P, Fc and Q, recalculate the filter coefficients according to the new values, and at the same time judge the effect of the new filter in the current corrected phase region. If the effect is improved, keep the new value, otherwise keep the old value, perform multiple random searches, generally recommended 50 to 100 times, to determine the final P, Fc and Q values. Examples of adding random disturbance variables to P, Fc and Q are as follows: for example, (1) add 10% or -10% random noise to P, update the P value to 110% or 90% of the original value, and recalculate the filter coefficients according to this value; or, (2) add 10% or -10% random noise to Fc, update the Fc value to 110% or 90% of the original value, and recalculate the filter coefficients according to this value; or, (3) add 10% or -10% random noise to Q, update the Q value to 110% or 90% of the original value, and recalculate the filter coefficients according to this value; you can also add random noise to two or three of the values ​​and then recalculate the filter coefficients.

[0065] 5. Update the target phase difference curve according to the calculated set of second-order all-pass IIR filter coefficients as the target phase difference curve of the next stage set of second-order all-pass IIR filters.

[0066] Repeat steps 2-5 until all groups of second-order all-pass IIR filter coefficients are calculated.

[0067] Reference Figure 6 As shown, the in-vehicle automatic phase equalization system based on the second-order all-pass IIR filter of this embodiment includes a processing module 100, and a left speaker 200 and a right speaker 300 arranged in the vehicle. The processing module 100 is used to perform the in-vehicle automatic phase equalization method as described above. The processing module 100 includes N groups of second-order all-pass IIR filters 101 connected in sequence, and each group of the second-order all-pass IIR filters 101 includes a left second-order all-pass IIR filter 101a for controlling the phase response of the left speaker 200 in the vehicle and a right second-order all-pass IIR filter 101b for controlling the phase response of the right speaker 300 in the vehicle. Further, the processing module 100 includes a DSP chip, and the N groups of second-order all-pass IIR filters 101 are arranged on the DSP chip.

[0068] Simulation Example

[0069] The number of groups N of the second-order all-pass IIR filter is set to 20, and only the phase difference response in the [100,2000] Hz interval is equalized. Figure 7 The phase difference response of the original and the phase after equalization using the above-mentioned in-vehicle automatic phase equalization method is given. Figure 8 The errors under different N values ​​are given.

[0070] The above embodiment is only for illustrating the technical concept and features of the present invention, and is a preferred embodiment. Its purpose is to enable people familiar with the technology to understand the content of the present invention and implement it accordingly, and it cannot be used to limit the protection scope of the present invention. Any equivalent transformation or modification made according to the spirit of the present invention should be included in the protection scope of the present invention.

Claims

1. An automatic phase equalization method in the car based on second-order all-pass IIR filter, It is characterized in that The steps include: S100, obtaining an average phase difference response of the sound field in the listening area in the vehicle as a target phase difference response; S200, specifying N groups of second-order all-pass IIR filters and a frequency interval [Fre_Low, Fre_High] for equalization, wherein each group of the second-order all-pass IIR filters includes a left second-order all-pass IIR filter for controlling a phase response of a left speaker in a vehicle and a right second-order all-pass IIR filter for controlling a phase response of a right speaker in a vehicle; S201, within the frequency interval [Fre_Low, Fre_High], dividing the target phase difference response into a plurality of sub-regions according to the zero-crossing point, and selecting one of the sub-regions as the current corrected phase region; S202, finding the phase difference value P and the corresponding frequency Fc corresponding to the maximum absolute value in the current corrected phase region, obtaining the quality factor Q, and calculating the coefficients of the left and right second-order all-pass IIR filters of the second-order all-pass IIR filter according to the phase difference value P, the frequency Fc and the quality factor Q; S203, enter random search, add random disturbance variables to P, Fc and Q, recalculate filter coefficients according to new values, and at the same time judge the effect of the new filter in the current corrected phase region, if the effect is improved, retain the new value, otherwise retain the old value, perform multiple random searches, determine the final P, Fc and Q values, and calculate the coefficients of the left and right second-order all-pass IIR filters of the first group of second-order all-pass IIR filters according to the parameters P, Fc and Q; S204, updating the target phase difference curve according to the calculated coefficients of the first set of second-order all-pass IIR filters; S205, using the updated target phase difference curve as the target phase difference curve of the next set of second-order all-pass IIR filters; Repeat steps S201 to S205 until all coefficients of N groups of second-order all-pass IIR filters are calculated; In step S202, the closest phase is searched from both sides of the current correction phase region. The frequencies F1 and F2 corresponding to the values ​​are used to obtain the quality factor Q = Fc / (F2-F1); In step S202 or S203, the coefficients of the left and right second-order all-pass IIR filters are calculated specifically by the following steps: Calculate the frequency based on the quality factor Q and frequency Fc and When P is greater than 0, Fc L =f 1 , Fc R =f 2 ; When P is not greater than 0, Fc L =f 2 , Fc R =f 1 Among them, Fc L represents the center frequency of the left second-order all-pass IIR filter, Fc R represents the center frequency of the right second-order all-pass IIR filter; The left and right second-order all-pass IIR filter coefficients are calculated based on the respective center frequencies of the left and right second-order all-pass IIR filters and the phase at the frequency Fc.

2. The in-vehicle automatic phase equalization method according to claim 1, It is characterized in that The transfer function of a second-order all-pass IIR filter is where z -1 、z -2 is the delay unit, b 0 , b 1 , b 2 are the filter coefficients of a second-order all-pass IIR filter.

3. The in-vehicle automatic phase equalization method according to claim 1, It is characterized in that Step S100 specifically includes: S101, determining discrete control points within a listening area; S102, testing the phase responses of the left speaker and the right speaker to the control point at the control point respectively, and performing subtraction to obtain a phase difference response; S103: Averaging the phase difference responses at all control points to obtain a final target phase difference response.

4. The in-vehicle automatic phase equalization method according to claim 1, It is characterized in that In step S201, the region with the largest area is selected as the current phase correction region.

5. The in-vehicle automatic phase equalization method according to claim 1, It is characterized in that In step S203, the random disturbance variable is a random noise of a set percentage of P, Fc or Q; and / or the number of the multiple random searches is 50 to 100 times.

6. An in-vehicle automatic phase equalization system based on a second-order all-pass IIR filter, It is characterized in that It comprises a processing module, and a left speaker and a right speaker arranged in a vehicle, wherein the processing module is used to execute the in-vehicle automatic phase equalization method as described in any one of claims 1 to 5.

7. The in-vehicle automatic phase equalization system according to claim 6, It is characterized in that The processing module includes N groups of second-order all-pass IIR filters connected in sequence, each group of the second-order all-pass IIR filters includes a left second-order all-pass IIR filter for controlling the phase response of a left speaker in the car and a right second-order all-pass IIR filter for controlling the phase response of a right speaker in the car.

8. The in-vehicle automatic phase equalization system according to claim 7, It is characterized in that The processing module comprises a DSP chip, and the N groups of second-order all-pass IIR filters are arranged on the DSP chip.

Citation Information

Patent Citations

  • In-vehicle sound field robustness automatic equalization method and system

    CN109889955A

  • Device for and a method of processing audio signals

    US20110280421A1