Design of audio signal acquisition system based on TMS320C6713
Published time: 2020-03-05 10:11:04
TMS320C6713 is a new type of floating-point DSP chip developed by TI. It is based on a very long instruction word structure (VLIW), which is very suitable for high-intensity mathematical operations. It is considered to be one of the most powerful processors of TI. This article uses a development board based on TMS320C6713 chip developed by Hezhongda to build an audio signal processing system, and performs hardware verification on the IIR lattice adaptive filter processing algorithm for audio signals.
1 hardware system design
The overall scheme block diagram of the development board system is shown in Figure 1. The analog audio signal is first pre-amplified by the high-performance pre-operation NE5532, and then enters the audio ADC for A / D conversion to obtain a serial output digital audio signal. This article uses the latest professional audio chip CS4272 from CIRRUS, which uses a differential Analog structure, sampling rate up to 192 kHz, actual signal-to-noise ratio exceeds 90 dB. The digital audio signal then enters the DSP chip TMS320C6713 through the McBSP port of the DSP through the FPGA. The data entering the DSP is stored in the internal storage area of the DSP to facilitate high-speed operation of the processor. The data processed by the DSP is also output to the FPGA through the McBSP port of the DSP, and then output to the pre-operation NE5532 through the DAC for amplification and output. Also connected to the circuit is a single-chip microcomputer chip STC89LE52, which is used to control LEDs, buttons, A / D, D / A converters, and data communication with FPGA.
2 CCS and CSL Introduction
CCS (Code Composer Studio) is an integrated development environment developed by TI for the development of DSP chips. It uses a familiar Windows-style interface and provides basic code generation tools with editing, compilation, linking, software simulation, hardware debugging, and Real-time tracking and other functions, support * .asm, * .c, * .h, * .cmd and other formats and finally generate * .out and other binary format files that can be downloaded to the hardware circuit for operation. It also provides a variety of C / C ++ code optimization function and some real-time analysis and programming solutions. In addition, CCS debugging and simulation have strong functions: allow breakpoints, profiling points, and detection points to be set for three types of breakpoints, respectively, to achieve program breakpoints, real-time analysis, and data import functions. CCS provides great convenience for the development and design of DSP chips, and is one of the most widely used DSP development environments. Its version has been developed to 4.1 or higher.
In the DSP application system, it will inevitably involve a large amount of programming and processing of DSP device peripherals, especially on-chip peripherals, which will consume a lot of energy of development engineers in the early stages of development. In the company's CCS development environment, DSP chip-level support library CSL is provided as a component. Most CSL modules are composed of corresponding functions, macros, classes, and representation symbols. Using these modules, it is very convenient to complete DSP on-chip peripherals. Configuration and control programming, which simplifies the development of DSP on-chip peripherals, shortens the development cycle of user programs, and achieves the ability to standardize control and management of on-chip peripherals, reducing the impact of DSP hardware specificity on user program code To facilitate the porting of user code between different devices.
3 Adaptive IIR Lattice Filter and Algorithm
3.1 Adaptive IIR Lattice Filter
The adaptive filter is that its weight coefficient can be continuously modified according to some adaptive algorithm, so that the impulse response of the system can meet the given performance judgment. Its design includes the selection of structural design and adaptive algorithms, determination of optimal parameters, and minimization of the effects of effective word length effects.
Although the filter performance of the IIR structure is not stable enough, it can achieve the same function as the FIR filter with little complexity in practical applications, and can use the results of the analog filter design, so the stability requirements are not high. This is an ideal choice. The IIR lattice adaptive filter is used in this paper. The advantage of the lattice structure is that it recurses in steps. Increasing or decreasing the number of stages will not affect the existing order design.
3.2 Adaptive Filter Algorithm
The principle and structure of the adaptive filter were discussed earlier, and then another key component of the adaptive filter is discussed: the adaptive algorithm. Currently, most adaptive filters use the least mean square algorithm (LMS) because it is easy to design, implement, and has robust performance. The self-adaptive algorithm is designed according to a certain criterion, the purpose is to try to make y (n) and d (n) as close as possible, different algorithms are essentially the same, but the measure of the proximity is different. The most commonly used criterion is the Minimum Mean Square Error (MSE) criterion, that is, the squared value of the difference e (n) between the expected signal d (n) and the filter output y (n) is the smallest, and according to this criterion, Adjust the adaptive algorithm. C67xDSPLIB library function DSPF_sp_lms developed by TI is used. DSPF_ sp_lms is a single-precision floating-point LMS algorithm, which implements the LMS adaptive algorithm.
4 DSP implementation of adaptive IIR trellis filtering algorithm
Because the adaptive filter requires two inputs, one is the main signal input and the other is the reference signal input. Therefore, how to design and implement the establishment of two signal paths in software and hardware is one of the keys to adaptive filters. In order to solve the problem of the signal input channel of the dual-channel adaptive filter, the stereo input function of the CS4272 codec on the development board can be used. The left and right audio inputs of the stereo codec are used as the main signal input and reference signal input. . The signals of the two channels are then sent to the DSP for adaptive IIR trellis filtering. The processed signals are transmitted to the CS4272 codec through McBSP0, and the D / A conversion circuit of the CS4272 codec converts the digital signal to analog. Audio.
The program is compiled using the CCS development environment, linked to generate an executable common object file (COFF), and then loaded and run. The weight coefficient of the filter is set to 512 steps, the adaptive step size is 5 × 10-5, and the input signal is a given set of audio signals. The test results obtained by the graphic analysis tool of the CCS development environment are shown in the figure. It can be seen that the spectrograms before and after filtering are very similar, and the results show that the filter has a good filtering effect.
Finally, the SEED-XDSusb 2.O emulator was downloaded to the development board to run and play music for real-time testing. The experimental results were in line with the expected results and had good practical value.
The focus and difficulty of this paper is to master and apply the DSP to realize the hardware platform construction of audio signal acquisition and output. The DSP implementation of the IIR lattice adaptive filter processing algorithm is studied. Finally, the target algorithm is completed by DSP software programming. Engineering realization. The adaptive filter based on this special structure proposed in this paper will be more and more widely used in various projects due to its strong real-time performance and obvious filtering effect.Tag: TMS320C6713
IC MCU 16BIT BGA >
DS110DF111EVM: 8.5-11.3 Gbps Retimer Eva >
Logic IC >
DC/DC Switching Controllers Dig Dual-Ph >
1V Synchronous Boost Converter >
Automotive Catalog 3.3 V, 500mA Fixed Po >
Analog Phase-Locked Loop >
14-Ohm Dual SP4T Analog Switch 3.3-V/2.5 >
LOW-NOISE FAST-TRANSIENT-RESPONSE 1.5-A >
Integrated Photo Flash Charger and IGBT >
Power Management IC Development Tools TP >
Power Management IC Development Tools TP >