Abstract Audio equalizer is one of the important tools for adjusting the timbre in audio system. This paper proposes a design of digital audio equalizer based on ADSP-BF533 hardware platform, and its audio processing algorithm includes spectrum analysis and equalization algorithm. Tests show that the system can achieve ideal audio equalization effect, and users can select and customize various sound effects.
Keywords Audio equalizer; Spectrum analysis; ADSP-BF533
Equalizer is an electronic device that can adjust the amplification of various frequency components of electrical signals respectively. By adjusting the parameters of the audio equalizer, the defects of the speaker and the sound field can be compensated, and it plays a role in compensating and modifying various sound sources. The
analog inductor audio equalizer constructed by discrete devices and operational amplifiers has many unfavorable factors due to the influence of the performance of the discrete devices themselves, which makes the audio equalizer at a disadvantage in the competition. This paper proposes a method for designing a digital audio equalizer on the ADSP-BF533 hardware system. The spectrum analysis algorithm uses FFT, and its program design can call the real-time signal processing library function of DSP. The design algorithm of the equalizer adopts the design method of FIR filter. FIR filter has a strict linear phase, and the equalized audio will not produce phase distortion. The system has great advantages over analog audio equalizers, with flexible design, high calculation accuracy, fast processing speed, and meets the requirements of real-time signal processing.
1 Hardware Design of Digital Audio Equalizer
The hardware platform uses ADSP-BF533 (DSP) as the digital signal processing core, AD1836A as the audio acquisition and playback unit, and LCD display module and buttons to realize human-interface interaction. The system principle is shown in Figure 1.
The analog audio signal is converted to digital by AD1836A, and then digitally equalized by DSP before being sent to AD1836A for digital-to-analog conversion to achieve audio signal equalization. Users can change the software processing flow or parameters in DSP through LCD display module and buttons to complete the control of digital audio equalizer.
1.1 Main processor ADSP-BF533
ADSP-BF533 processor is a member of ADSP Blackfin series. Its structure adopts Micro Signal Architecture and has a simple RISC instruction set structure. The internal instruction processing adopts pipeline technology, and integrates multiplication and accumulation unit (MAC) and arithmetic logic unit (ALU). Its highest core frequency can reach 600 MHz.
BF533 integrates a wealth of peripheral interfaces. In the digital audio equalizer, SPORT0 is used to complete the data transmission of digital audio, SPI is used to configure the working mode of AD1836A, and the programmable flag (PF) is used to connect with LCD and buttons.
1.2 Audio Encoder AD1836A
AD1836A is a high-performance single-chip encoder that can provide 3 stereo DACs and 2 stereo ADCs. DSP configures AD1836A with a sampling rate of 48 kHz and a data word width of 24 bits through SPI, and transmits data through SPORT and AD1836A. Its serial data port can use the popular I2S serial mode.
1.3 LCD Display Module Design
LCD uses MSP-G240128DYSY dot matrix liquid crystal display module. The drive control system of this liquid crystal display module consists of liquid crystal display controller T6963C and its peripheral circuits, row driver group, column driver group and liquid crystal drive bias voltage circuit. BF533 realizes the reading and writing of T6963C 8-bit data bus and control line through PF interface. Among them, PF0~PF7 are used as data lines, and PF12~PF14 are used as control lines. Figure 2 shows the interface mode between BF533 and LCD.
2 Software Design of Digital Audio Equalizer
The software flow is shown in Figure 3. First, a series of initializations are performed on BF533 to set the system in a certain working state. After the initialization is completed, the user controls the audio signal processing by selecting the menu items on the LCD through the buttons.
2.1 Spectral analysis algorithm of audio signal
Adding spectral analysis to audio signal processing can more intuitively see the gain adjustment effect on different frequency bands, which facilitates adjustment and analysis. The spectrum characteristic curve can be obtained by discrete Fourier transform, as shown in formula (1).
In the formula, x(n) is the audio signal sampling sequence;
is the rotation factor; N is the DFT transformation interval length; X(k) can be used to describe the spectrum of its audio signal.
In actual operation, AD1836A sends 4 24-bit sampling data to the SPORT0 receiving buffer through SPORT0 each time, and generates a receiving interrupt. The received data in the interrupt service program is sent to the set buffer. When the receiving counter reaches N, the sampling data is FFT-ed, and the calculated amplitude-frequency characteristic curve is displayed in real time on the LCD. [page]
2.2 Equalizer algorithm for audio signals
The function of the equalizer is to boost or attenuate a certain frequency component of the signal. The equalizer that only adjusts the low-frequency or high-frequency gain is controlled by the shelving filter. The low-frequency adjustment is achieved by the low-pass shelving filter, and the high-frequency adjustment is achieved by the high-pass shelving filter. Its frequency response is shown in Figure 4.
In most applications, low-pass and high-pass filters try to completely remove a portion of the spectrum. However, a shelving filter only pushes or attenuates a portion of the spectrum, leaving the rest unaffected. At this time, a peak filter or bandpass filter needs to be designed, and its frequency response is shown in Figure 5.
These three filters form the simplest equalization system. This system is to design a graphic equalizer, which is simple to operate and easy to control. It consists of a series of peak filters with fixed center frequencies. The design block diagram of the graphic equalizer is shown in Figure 6.
According to the above ideas, in fact, only the filter in the equalizer needs to be designed. According to the superposition of linear systems, the above filters can be connected in parallel to form a system function. This system function requires linear phase to restore the sound signal without distortion, and the linear phase FIR digital filter just meets the above conditions. The system designs a 9-band equalizer, initializes the AD1836A to a sampling rate of fs = 48 kHz, defines the normalized frequency λ = f/fs, and gives the parameters of each frequency band of the equalizer as shown in Table 1.
[page]
The ideal filter transfer function is designed , and its amplitude-frequency characteristics are shown in Figure 7, where gain1~gain9 are the gains of 9 frequency bands, and the adjustable gain range of each frequency band is -12~12 dB.
It can be seen from the figure that the transfer function of the equalizer is composed of a low-pass filter in parallel with a series of band-pass filters, so
it can be written as follows
: hd(n) is windowed h(n)=hd(n)w(n), and then h(n) and x(n) are convolved to obtain the output sequence y(n), thus completing the filtering operation.
3 System test
System test includes two aspects. The first is the spectrum analysis test, which is used to check whether the spectrum analysis performed by the system meets the engineering requirements; the other is the equalizer test, which checks the gain adjustment effect of the equalizer on each frequency band and the equalization effect on the entire audio range. The test method can be implemented through the plot function of VisualDSP++, the development software of BF533.
3.1 Spectral analysis test
The input signal is sampled at 48 kHz, and the data is placed in a buffer of length 256 to prepare for spectrum analysis. The frequency range of the sound signal is 20 Hz to 20 kHz, and the spectrum analysis test results of its 20 Hz and 20 kHz sine signals are as follows.
Figures 8 and 9 are the 256-point sampling signals and spectrum diagrams of 20 Hz and 20 kHz, respectively. The spectrums of Figures 8(a) and 9(a) are the spectrums of the actual signals, and Figures 8(b) and 9(b) are the spectrums obtained by FFT. It can be seen that the algorithm can better reflect the spectrum characteristics of the original signal. As can be seen from the figure, the algorithm meets the needs of spectrum analysis.
[page]
3.2 Equalizer test
The equalizer can be regarded as a linear time-invariant system, whose system function
is the discrete time Fourier transform of the unit impulse response h(n), so
the amplitude-frequency characteristic reflects the equalization effect of the equalizer.
(1) Equalizer gain test. The signal source generates a 20 Hz to 20 kHz sine sweep signal, and the change of the signal amplitude is observed from the oscilloscope to test whether the amplitude-frequency characteristic curve of the system meets the requirements. The adjustable range of each frequency band of the 9-band equalizer is -12 to 12 dB. After testing, when the input peak-to-peak value of a 1 V sine signal is set to 0 dB, the output signal peak-to-peak value is 540 mV; when the gain of the required frequency band is -12 dB, the output signal peak-to-peak value is 140 mV; when the gain of the required frequency band is 12 dB, the output signal peak-to-peak value is 2.18 V. It can be seen that the gain of the equalizer meets the requirements. Figures 10 and 11 are the gain test spectrum of the three frequency bands of the equalizer: low, medium and high.
(2) Equalizer sound effect test. The system can provide 7 sound effects for users to choose from, including POP, ROCK, DANCE, COUNTRY, JAZZ, CLASSIC and BRUCE. They all amplify or attenuate different frequency bands of the audio signal to achieve different sound quality effects. The gain of each frequency band of each sound effect is shown in Table 2.
The equalizer designed according to the above parameters has a system function amplitude-frequency characteristic curve under several sound effects as shown in Figure 12.
4 Conclusion This paper
introduces a method for designing a digital audio equalizer based on ADSP-BF533, that is, using digital signal processing to achieve equalization of audio signals. This paper proposes an algorithm for designing an equalizer using FIR filters, and uses LCD and buttons to achieve external control. This method meets the requirements of real-time processing and equalization of audio signals.
Previous article:Analog technology and digital technology complement each other in digital equipment
Next article:Design of Network Video Compression System Based on Blackfin
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Application Note - Optimizing Capacitance and AC Impedance Measurements Using the 4200A-SCS Parameter Analyzer
- SPI interface driver based on TI-RTOS and separate control of CS pin
- Prize live broadcast: TI low-power MCU products and Zigbee wireless solutions are now open for registration~
- FPGA_100 Days Journey_VGA Design
- CCS Basics Tutorial
- Design of wireless network sensor based on Bluetooth protocol
- MCU experts, do I need to modify the USB virtual serial port program generated by STM32cubeMX?
- 2021 ST Industrial Summit Tour starts to reserve seats: "Motor Drive, Power Supply, Industrial Automation" + "New Products, Courses, Training"
- Happy Dragon Boat Festival, salty rice dumplings, sweet rice dumplings, which kind do you like?
- [Topmicro Intelligent Display Module Review] 5. Development Board NUCLEO-F746ZG Communication with Intelligent Display Module