An Algorithm for Adjusting the Multimedia Audio Volume of a Bus
Through the volume adjustment algorithm that works in a coordinated manner with two-stage audio amplification circuit, the lack of volume adjustment in the bus multimedia audio system in the noise-changing environment is solved, dynamic volume adjustment is achieved, the volume adjustable range is expanded and the minimum value of volume adjustment is reduced, and the system's applicability is improved.
Patent Information
- Application Number
- CN202211568379.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-08
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2042-12-08
AI Technical Summary
The existing bus multimedia audio system cannot meet the demand in an environment with high noise changes, and cannot ensure that all passengers hear voice broadcast content in a high noise environment and avoid excessive volume causing discomfort to passengers in a low noise environment.
The volume adjustment algorithm is used to work in a coordinated manner with two-stage audio amplifier circuits. The volume size is adjusted through the program-controlled potentiometer MCP4531-103E/MS, and the functional relationship between the volume size K value and registers N0 and N1 is calculated to achieve dynamic volume adjustment.
It realizes reasonable adjustment of volume in different noise environments, expands the adjustable volume range and reduces the minimum quantization value of volume, and improves the stability and application range of the system.
Smart Images

Figure CN115988383B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of bus volume adjustment, and particularly relates to a bus multimedia audio volume adjustment algorithm. Background Art
[0002] With the intelligence of the public transport dispatching system, the intelligent dispatching system of buses is currently being applied more and more. Due to the intelligent and unmanned characteristics of the intelligent dispatching system, the multimedia audio system on the bus, as the hardware carrier of voice broadcasts, plays an important role in information interaction with passengers in the intelligent dispatching system. However, due to the operating characteristics of buses, the noise in the vehicle environment changes greatly. During peak hours, there are more passengers in the vehicle, and the noise in the vehicle environment is relatively large. While during off-peak hours, especially at night or on night buses, the noise in the vehicle is relatively small. When the multimedia voice system needs to broadcast voice in a noisy vehicle environment, the audio volume needs to be particularly large to ensure that each passenger can accurately hear the voice broadcast content; while when the vehicle environment noise is relatively small, the audio volume needs to be adjusted to a relatively small value to avoid discomfort to passengers caused by the overly loud voice. Considering the above two requirements, the currently adopted single-range audio volume adjustment method, in terms of the adjustable range of the volume and the minimum quantization value of the volume that can be adjusted, cannot meet the requirements.
[0003] The patent with the publication number CN 215300895U discloses a multi-source audio processing system for buses to simplify the audio processing circuit on the bus. On the basis of ensuring its normal functional requirements, the scale of the existing audio processing circuit is reduced, realizing the path management of the audio processing circuit, and the reuse of the signal processing circuit and the power amplifier circuit. However, it does not disclose the algorithm process for realizing audio volume adjustment. Therefore, based on the disclosed hardware circuit, the present patent provides a bus multimedia audio volume adjustment algorithm. Summary of the Invention
[0004] Aiming at the defects and problems that the adjustable range of the volume and the minimum quantization value of the volume that can be adjusted by the currently adopted single-range audio volume adjustment method cannot meet the requirements, the present invention provides a bus multimedia audio volume adjustment algorithm.
[0005] The solution adopted by the present invention to solve its technical problems is: a bus multimedia audio volume adjustment algorithm, including the following steps:
[0006] Step 1: Select the programmable potentiometer MCP4531-103E / MS, which is adjustable in 129 steps (7-bit register). Define the set value of the register for setting the order of the first-stage amplifier circuit as the decimal value N0, and the set value of the register for setting the order of the second-stage amplifier circuit as the decimal value N1. Conduct actual data tests to obtain the actual resistance values of the first-stage and second-stage amplifier circuits when the volume is at its maximum respectively.
[0007] Step 2: According to the correspondence between the selected programmable potentiometer and the actual resistance value, obtain the actual resistance value R0 of the first-stage amplifier circuit as 75 + 78.125 * N0, and the actual resistance value R1 of the second-stage amplifier circuit as 75 + 78.125 * N1. Based on the above formula and the actual resistance values of the first-stage and second-stage amplifier circuits obtained in Step 1, calculate the actual values of N0 and N1 when the volume is at its maximum.
[0008] Step 3: Define the volume level as K. When K is 0, it is in the mute state; when K is 100, it is at the maximum volume. At the same time, when K is 0, the amplification factor of the audio circuit is close to 0.
[0009] Step 4: By setting different K values in the range of 0 - 100, actually test the actual resistance values of the first-stage and second-stage amplifier circuits that change with the K value, and combine the correspondence between the potentiometer and the actual resistance value in Step 2 to calculate the different values of N0 and N1 that change with the change of the K value.
[0010] Step 5: Through the analysis, testing, and calculation in the above steps, two different functional relationships between the volume level K value and N0 and N1 can be obtained, so as to achieve different effects presented when adjusting the volume by setting different register values.
[0011] As a preferred technical solution of the present invention, in Step 1, through actual testing, the actual resistance values of the first-stage and second-stage amplifier circuits when the volume is at its maximum can be obtained as 5 kΩ and 3 kΩ respectively.
[0012] As a preferred technical solution of the present invention, in Step 2, when the volume is at its maximum, the actual values of N0 and N1 are 63 and 37 respectively.
[0013] As a preferred technical solution of the present invention, in Step 4, when the volume level K value is 1, by setting the amplification factor of the first-stage circuit as 1 and the amplification factor of the second-stage circuit as 0.5, the corresponding actual resistance values and the corresponding values of N0 and N1 can be calculated at this time.
[0014] As a preferred technical solution of the present invention, in Step 4, when the volume level K value is 1, the human ear can just start to hear the sound.
[0015] As a preferred technical solution of the present invention, during the actual test in step five, as the value of K is continuously increased, when 1 < K ≤ 48 and when 48 < K ≤ 100, two different functional relationships between the value of K and N0 and N1 are obtained respectively.
[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: Based on the existing hardware solution, the volume adjustment algorithm of the present invention can, through the collaborative work of two-stage audio amplification circuits, adjust the volume of the multimedia voice system in the bus to be close to the current environment when facing a noisy environment and a relatively quiet environment, so as to ensure that each passenger can accurately hear the voice broadcast content when the volume demand is large. When the ambient noise in the vehicle is relatively small, the audio volume is adjusted to a smaller value to avoid discomfort caused to passengers by the overly loud voice of the broadcast, realizing the dynamic adjustment of the multimedia voice system, further achieving the effects of expanding the adjustable range of the volume and reducing the minimum quantization value that the volume can be adjusted, improving the stability of the system and enhancing the scope of application. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a schematic diagram of the overall process of the present invention;
[0018] Figure 2 is a schematic diagram of the U47 amplifier circuit of the present invention;
[0019] Figure 3 is a schematic diagram of the U49 amplifier circuit of the present invention;
[0020] Figure 4 is a schematic diagram of the function curve of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0021] The present invention will be further described below with reference to the drawings and embodiments.
[0022] Please refer to Figures 1-4 , the present invention provides a bus multimedia audio volume adjustment algorithm.
[0023] Example 1:
[0024] A bus multimedia audio volume adjustment algorithm provided by the present invention improves the multimedia audio volume adjustment algorithm on the basis of the publicly disclosed patent "A multi-source audio processing system for buses" (CN 215300895U). Through this algorithm, two-stage audio amplification circuits on the hardware scheme are controlled to work together to achieve an enlarged adjustable range of volume and a reduced minimum quantization value of volume adjustment; specifically, it includes the following steps: Step 1: Select the program-controlled potentiometer MCP4531-103E / MS to be adjustable in 129 steps (7-bit register). Define the decimal value of the register setting value of the first-stage amplification circuit order as N0, and the decimal value of the register setting value of the second-stage amplification circuit order as N1. Refer to Figure 2 and Figure 3 . The register for setting the order of the first amplification circuit U47 corresponds to the I2C0 interface, and the register for setting the order of the second amplification circuit U49 corresponds to the I2C1 interface. Conduct actual data tests to obtain that when the first-stage amplification circuit U47 is set to 5 kΩ and the second-stage amplification circuit U49 is set to 3 kΩ, it is the maximum volume; Step 2: According to the actual resistance values of the first-stage and second-stage amplification circuits when the volume is the largest obtained in Step 1, and combining the corresponding relationship between the order of the selected program-controlled potentiometer MCP4531-103E / MS and the actual resistance value, obtain the actual resistance value R0 of U47 = 75 Ω + (10 KΩ ÷ 128) * N0, that is, R0 = 75 + 78.125 * N0, with the unit of Ω; the actual resistance value R1 of U49 = 75 + 78.125 * N1, with the unit of Ω. And when the volume is the largest, substitute the actual resistance values of U47 and U49 into the above formula to obtain the actual values of N0 and N1 when the volume is the largest, that is, N0 = 63, N1 = 37; Step 3: On the basis of Steps 1 and 2, define the volume size as K, which is equivalent to that when a person operates the remote control, the value of K can be adjusted at any time by adjusting the volume button on the remote control. And when the value of K is 0, it is in the mute state, and when K is 100, it is the maximum volume. During actual testing, when K is 0, set the values of both N0 and N1 to 0 at the same time. Then, according to the calculation formula obtained in Step 2 above, calculate that the actual resistance value R0 of U47 and the actual resistance value R1 of U49 are both 75 Ω at this time, and the amplification factor of the audio amplification circuit is close to 0 at this time;
[0025] Step 4: By setting different K values within the range of 0 - 100, actually test the actual resistance values of the first-stage amplifier circuit and the second-stage amplifier circuit that vary with the K value, and combine the corresponding relationship between the potentiometer and the actual resistance value in Step 2 to calculate the different values of N0 and N1 that change with the change of the K value. Specifically, when K is 1, this is when the human ear can start to hear sound. Define the first-stage amplification factor as 1 and the second-stage amplification factor as 0.5. According to multiple actual tests, at this time, R0 = 1330Ω and R1 = 511Ω. Substitute them into the formula in Step 2 above, and it is possible to calculate that N0 = 16 and N1 = 5, that is, when the human ear can start to hear sound, the set values of the corresponding registers are 16 and 5 respectively. Then continue to increase the K value and correspondingly adjust the values of R0 and R1 to obtain different values of N0 and N1 that change accordingly. Specifically, according to the above analysis, when the volume K is 1, N0 = 16 and N1 = 5. When the volume is the largest, N0 = 63 and N1 = 37. Therefore, in the process of increasing the volume from 1, first keep the value of N1 unchanged (the amplification factor of the second-stage amplifier circuit is 0.5), and N0 starts to increase from 16 and keeps increasing until 63 (at this time, the actual resistance value corresponding to U47 is 5kΩ). Then keep the value of N0 unchanged, and N1 starts to increase from 5 and keeps increasing until 37. At this time, the maximum volume is reached. And during this adjustment process, N0 is adjusted by a total of 63 - 16 = 47 steps, and N1 is adjusted by a total of 37 - 5 = 32 steps. That is, N0 and N1 are adjusted by a total of 47 + 32 = 79 steps. That is, the volume adjustment can only increase by 79, and when K = 80, it is the maximum volume. For volumes with K > 80, they can be reserved as a margin. At this time, N1 can continue to increase until K = 100;
[0026] Step 5: Through the analysis, testing, and calculation in the above steps, two different functional relationships between the volume magnitude K value and N0 and N1 can be obtained, that is, the volume adjustment function is as follows: when K = 0, N0 = 0, N1 = 0; when K = 1, N0 = 16, N1 = 5; when 1 < K ≤ 48, N0 = K + 15, N1 = 5; when 48 < K ≤ 100, N0 = 63, N1 = K - 43; and the change curves of the volume magnitude K value with N0 and N1 are obtained, thus realizing the different effects presented by adjusting the volume by setting different register values. The volume adjustment algorithm described in the present invention, based on the existing hardware solution, through the collaborative work of two-stage audio amplifier circuits, realizes the effects of expanding the adjustable range of the volume and reducing the minimum quantization value that can be adjusted for the volume.
[0027] The above are only the preferred embodiments of the present invention and do not limit the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A multimedia audio volume adjustment algorithm for a bus, characterized in that: It includes the following steps: Step 1: Select the programmable potentiometer MCP4531-103E / MS, which is adjustable in 129 steps with a 7-bit register. Define the order of the first-stage amplifier circuit, set the decimal value of the register setting to N0 for the first-stage amplifier circuit, and the order of the second-stage amplifier circuit, set the decimal value of the register setting to N1. Conduct actual data tests to obtain the actual resistance values of the first-stage and second-stage amplifier circuits when the volume is at maximum respectively; Step 2: According to the correspondence between the selected programmable potentiometer and the actual resistance value, obtain the actual resistance value of the first-stage amplifier circuit R0 = 75 + 78.125×N0, and the actual resistance value of the second-stage amplifier circuit R1 = 75 + 78.125×N1. Based on the above formula and the actual resistance values of the first-stage and second-stage amplifier circuits obtained in Step 1, calculate the actual values of N0 and N1 when the volume is at maximum; Step 3: Define the volume level as K. When K is 0, it is in the mute state, when K is 100, it is at the maximum volume. At the same time, when K is 0, the amplification factor of the audio circuit is close to 0; Step 4: By setting different K values in the range of 0 - 100, actually test the actual resistance values of the first-stage and second-stage amplifier circuits that change with the K value, and combine the correspondence between the programmable potentiometer and the actual resistance value in Step 2 to calculate the different values of N0 and N1 that change with the change of the K value; Step 5: Through the analysis, testing and calculation of the above steps, as the K value is continuously adjusted and increased, obtain the functional relationships: when 1 < K ≤ 48, N0 = K + 15, N1 = 5; when 48 < K ≤ 100, N0 = 63, N1 = K - 43, so as to achieve different effects presented when adjusting the volume by setting different register values.
2. The audio volume adjustment algorithm according to claim 1, wherein: In Step 1, through actual testing, the actual resistance values of the first-stage and second-stage amplifier circuits when the volume is at maximum can be obtained as 5kΩ and 3kΩ respectively.
3. The audio volume adjustment algorithm according to claim 1, wherein: In Step 2, when the volume is at maximum, the actual values of N0 and N1 are 63 and 37 respectively.
4. The audio volume adjustment algorithm according to claim 1, wherein: In Step 4, when the volume level K value is 1, by setting the amplification factor of the first-stage amplifier circuit to 1 and the amplification factor of the second-stage amplifier circuit to 0.5, the corresponding actual resistance values and the corresponding values of N0 and N1 can be calculated at this time.
5. The audio volume adjustment algorithm according to claim 4, wherein: In Step 4, when the volume level K value is 1, the human ear can just start to hear the sound.
Citation Information
Patent Citations
Multi-sound-source bus audio processing system
CN215300895U
Sound and image processor
JP1994180595A