Design of Multi-channel Synchronous Data Acquisition and Compression System

Publisher:PeacefulAuraLatest update time:2009-09-17 Source: 中北大学 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction

In order to minimize the transmission time and storage space in modern telemetry systems and transmit more useful information within the limited channel capacity, data compression technology is used to help reduce power and bandwidth requirements and improve communication efficiency. Here, a multi-channel synchronous data acquisition and compression system design based on DSP and CPLD is proposed. The system is applied to telemetry multi-channel noise data, where multi-channel synchronous data acquisition can achieve simultaneous measurement of signals. After correlation analysis, the relevant information between the signals is obtained, and the data compression algorithm embedded in the DSP realizes its data compression function.

2 System Hardware Structure

2.1 System Design Ideas

Figure 1 is the hardware block diagram of the system design. The multi-channel synchronous data acquisition and compression system based on CPLD and DSP is mainly composed of three parts: data acquisition module, data processing module and data interface module. The analog signal input by the sensor at the front end is shaped and amplified by the signal conditioning module and then input into the A/D conversion module. The analog quantity is converted into digital quantity. The programmable logic device (CPLD1) controls the A/D converter to collect data according to the set sampling rate and write the collected data into the FIFO through the bus. When the FIFO is half full, a half-full signal is sent, which is the interrupt of the DSP. After receiving the interrupt, the DSP immediately reads a frame of data from the FIFO to the data processing module. The DSP compresses the collected data at high speed and writes it into the interface module. Then the programmable logic device (CPLD2) transmits the data to the telemetry system through the RS-422 bus for further analysis.

2.2 Device Selection

2.2.1 A/D Converter ADS8365

The A/D conversion module of this system uses TI's ADS8365 A/D converter, which supports 6-channel signal differential input, has 3 groups of signal acquisition control terminals, each group controls 2 signals, 16-bit accuracy, and the conversion speed of each channel is up to 250 kHz. It supports high-speed parallel data output interface, and the data output interface includes direct address selection mode, CYCLE mode, and FIFO mode.

2.2.2 Complex Programmable Logic Device (CPLD) XCR3256XL

CPLD is used to control each interface. Here, XCR3256XL CPLD is selected, which is a high-performance complex programmable logic device (CPLD) of Xilinx's CoolRunner series. The device has the following features: COMSEEPROM manufacturing process technology; built-in standard JTAG interface, support 3.3 V in-system programming (ISP); 3.3 V power supply, integration density of 6,000 available gates; pin-to-pin delay of 7.5 ns. The system frequency is up to 140 MHz. Compared with separate logic devices, the single-chip CPLD realizes the logic control function, simplifies the circuit design, and improves the system reliability. In addition, XCR3256XL has the function of in-system programming. Only one download cable is needed to connect to the target board, which can easily realize multiple repeated programming, greatly facilitating circuit debugging.

2.2.3 Digital Signal Processor (DSP) TMS320C6713B

The DSP used in this system design is TMS320C6713B, which is one of the TMS320C67xx series floating-point DSPs launched by TI. It adopts an improved Harvard structure, with the characteristics of fast operation speed, low power consumption and high cost performance. Its architecture adopts the Veloci TI Very Long Instruction Word (VLIW) structure. It executes 8 32-bit instructions per cycle and supports 32/64-bit data. It adopts a RISC-like instruction set, with an operating speed of 300 MHz, 3.3 ns instruction cycle and a processing capacity of 2 400 MI/s or 1 800 MFLOPS, which is suitable for high-speed signal processing. In order to speed up the processing speed, the DSP core adopts a 2-level cache, of which the L1 level cache is divided into 4 KB direct program cache and 4 KB data cache (divided into 2 ways); the L2 level cache is divided into 64 KB unified memory and 192 KB additional memory. It has a 16-channel EDMA controller inside, which can handle almost all I/O and memory interface problems at high speed, greatly improving the device throughput. The external total memory address space is up to 512MB, the data width is 32b, and it can support SBRAM, SDRAM, SRAM, Flash and EPROM. The TMS320C6713 and the external I/O interface are implemented through the FFA-structured I/O port, HPI port, multi-buffered serial port (McBSP), SPI port and other methods. Compared with dedicated hardware compression devices, TMS320C6713B can easily realize data compression. And the system upgrade and configuration are flexible.

3 CPLD Part Design

3.1 CPLD1 control part

CPLD1 controls ADS8365, including the sampling rate of the A/D converter and the data quantization output mode. At the same time, controlling the CS signal can effectively suppress noise. The system clock input is 50 MHz, and CPLD1 divides it to generate a 5 MHz clock to trigger the A/D converter. The program starts the A/D conversion by controlling the HOLDX of the A/D converter; controls the ADD of the A/D converter to control its output channel information, and controls the ADDRESS of the A/D converter to control its data output working mode. Considering that the program algorithm in the DSP will increase the DSP calculation burden every time it determines the channel information, the A/D conversion is set without channel information, and the A/D converter works in the CYCLE mode. The data after A/D conversion is cyclically output in the order of channel numbers, and the DSP can directly determine the specific channel of the data according to the sequence. Figure 2 shows the circuit of CPLD1 controlling ADS8365.

CPLD1 controls DSP, including DSP reset settings, watchdog settings, DSP control signals and CE space combination logic control reading FIFO1, etc. [page]

3.2 Data frame format setting

CPLD1 continuously writes the data after A/D conversion into FIFO1. After 2048 bytes of data are written into FIFO1, CPLD adds a 16-bit frame flag and a 16-bit frame count, that is, the data format is: collected data + frame flag + frame count.

3.3 CPLD2 control interface

The core of the interface conversion module is CPLD, which is responsible for reading data from the output FIFO2, encoding it according to the timing requirements of the telemetry system, and uploading the compressed data to the telemetry system through the RS-422 bus.

4 DSP Part Design

4.1 DSP Programming Process

After the device is powered on and the DSP is reset, the internally fixed boot program (BOOT) moves the programs and data stored in the Flash memory to the internal RAM, and then the DSP starts to read the compression algorithm application and continues to run. The DSP workflow is as follows: first initialize the DSP's CSL function library, then initialize the PLL, GPIO and related interrupt registers, and wait for interrupts.

The 16-bit data of the acquisition module is continuously written into FIFO1 through the bus. The program controls its half-full (HF) signal, that is, when the data exceeds half full, the HF signal is low-level and effective, which will trigger an interrupt to notify the DSP. After the DSP enters the interrupt, it reads 2048 bytes of data from the input FIFO1 into the SDRAM space pointed to by the DSP. The DSP performs high-speed compression in the idle time after processing the interrupt. The compressed data is compared with the original data. If the compressed data is smaller than the original data, the compressed data is written into the soft FIFO of the DSP, otherwise, the original data is written into the soft FIFO of the DSP.

Finally, the DSP writes the compressed data in the soft FIFO into the output FIFO2, waiting for the sending module to upload the data to the telemetry system.

4.2 Data Compression Algorithm Selection

The source information of the compressed code can be completely restored when it is decompressed, that is, there is no loss of source information during the compression and decompression process. This coding method is called lossless compression. Commonly used lossless compression methods include Shannon-Fano coding, Huffman coding, run-length coding, IZW (Lempel-Ziv-Welch) coding and arithmetic coding (ARC). Here we focus on the ARC algorithm and the LZW algorithm. The idea of ​​the ARC algorithm is like looking up a dictionary. As we all know, the arrangement of English dictionaries is sorted by the first letter, and words with the same first letter continue to be sorted by the second letter, and so on. The actual application of arithmetic coding is more clever. The probability of the occurrence of characters is used to divide the interval from 0 to 1, and then a decimal between 0 and 1 is used to encode the data. The more original data, the more digits after the decimal point.

LZW encoding is done around a conversion table called a dictionary. The conversion table is used to store character sequences called prefixes, and each table entry is assigned a code word, or a serial number. This conversion table is actually an expansion of the 8-bit ASCII character set. The added symbols are used to represent variable-length ASCII strings that appear in text or images. The expanded code can be represented by 9 to 12 bits or even more. There are 4,096 different 12-bit codes for 12 bits, that is. The conversion table has 4,096 entries, of which 256 entries are used to store defined characters, and the remaining 3,840 entries are used to store prefixes. The LZW encoder (software encoder or hardware encoder) completes the conversion between input and output by managing the dictionary. The input of the LZW encoder is a character stream, which is a string composed of 8-bit ASCII characters, and the output is a code stream represented by n bits (for example, 12 bits). The code word represents a single character or a string composed of multiple characters. The LZW encoder uses a practical parsing algorithm called a greedy parsing algorithm.

In the greedy analysis algorithm, each analysis serially checks the string from the character stream (Charstream) and decomposes the longest recognized string from it, that is, the longest prefix (Prefix) that has appeared in the dictionary. The known prefix (Prefix) is added with the next input character C, that is, the current character (Current character) as the extension character of the prefix to form a new extended string - a string (Sning): Prefix. C. Whether this new string (String) should be added to the dictionary depends on whether there is a string (String) identical to it in the dictionary.

If so, then this suffix string (String) becomes a prefix (Prefix), and continue to enter new characters. Otherwise, this suffix string characters (String) are written into the dictionary to generate a new prefix (Prefix) and given a code.

Generally speaking, different compression algorithms have different advantages and disadvantages. The complexity of different algorithms also varies in terms of space requirements and compression rates. This depends not only on the compression method, but also on the characteristics of the compressed data.

The system is designed to compress real-time data, which requires a high time performance of the compression process, so the ARC algorithm with a pre-statistical model is used. Experiments have shown that the operation speed of this algorithm is similar to that of the LZW algorithm. The ARC algorithm is superior to the LZW algorithm in terms of compression removal rate.

5 Experimental Results

The algorithm selection is mainly compared from the compression speed and compression removal rate. In this design, the front end collects multi-channel noise compression of a system in real time at a speed of 27 kHz. From Table 1, it can be seen that the data compression removal rate of the ARC algorithm for different grouping segments is about 79%, while the LZW algorithm has a compression removal rate of only about 31% in this grouping segment. It can be seen that the compression removal rate of the ARC compression algorithm is relatively high. In the experiment, a certain regular data is sent through the host computer, and the compressed data is processed by the system. The compressed data is then unpacked and decompressed by the host computer, and the restored data is compared with the original data. The results are consistent, proving that the system is safe and reliable. Figure 3 is the host computer decompression report.


6 Conclusion

The system composition is introduced in detail, and the architecture of complex programmable logic device (CPLD) and digital signal processor (DSP) is used to compare the related algorithms of lossless compression, and finally arithmetic coding (ARC) is adopted as the system compression algorithm. The innovation of this system lies in the multi-channel synchronization of the acquisition module and the pertinence of noise data compression. Finally, through a large number of experiments, it is confirmed that this scheme is feasible and all indicators meet the system requirements.

Reference address:Design of Multi-channel Synchronous Data Acquisition and Compression System

Previous article:Research on online programming method of TMS320VC55x series DSP
Next article:Design of orthogonal signal source filter based on CPLD and DDS

Recommended ReadingLatest update time:2024-11-17 09:54

Design of manageable SAS hard disk backplane based on CPLD
Abstract: Based on CPLD as the core, a manageable SAS hard disk backplane is designed. While conveniently replacing the faulty hard disk, it can indicate the working status of the hard disk by controlling the LED light, and realize the monitoring of the hard disk status. The test results show that the backplane can
[Embedded]
Design of manageable SAS hard disk backplane based on CPLD
Design of MP3 Application Development Board Based on CoolRunner CPLD
Portable MP3 player As a digital product that integrates audio playback and data storage, its functional structure is talked about by electronic designers. MP3 players with new functions are constantly updated. In order to meet the needs of new MP3 player functions, we designed a software and hardware developm
[Embedded]
Design of MP3 Application Development Board Based on CoolRunner CPLD
Design of wireless endoscopy system based on ARM and CPLD
introduction At present, the research on micron and nanotechnology is very active, which has led to the rapid development of microtechnology and micro-mechanical electronic system (MEMS) technology, thus greatly promoting the miniaturization and micro-microscopicization of medical equipment, and the emergen
[Medical Electronics]
Design of wireless endoscopy system based on ARM and CPLD
Design of electromagnetic trigger controller for firearms based on CPLD technology
O Introduction The firing of firearms is an important link in the field of shooting range testing. Traditional firearms are fired manually, that is, the shooter pulls the trigger of the firearm manually after hearing the shooting command. This method has two problems: First, safety cannot be guaranteed. Whe
[Embedded]
Design of electromagnetic trigger controller for firearms based on CPLD technology
ARM usb camera test 【usb camera video image acquisition】
 luvcview is an open source project that focuses on testing UVC cameras. As long as your camera supports UVC drivers, you can use the luvcview test program. How do you know if your camera supports UVC drivers? Check this website to see Is your camera ID in the supported list? http://www.ideasonboard.org/uvc/ My
[Microcontroller]
Design of wireless endoscopy system based on ARM and CPLD
  At present, medical wireless endoscopes have been launched. As early as May 2001, Israel's GI company launched its M2A wireless endoscope product and obtained US FDA certification. The capsule endoscope produced by GI is 26 mm long, 11 mm in diameter and weighs 3.5 g. It uses a micro-power CMOS image sensor with an o
[Microcontroller]
Unlocking the infinite possibilities of programmable logic devices
We often say that logic devices are the "glue" of every electronic product design, but they are often the last thing you consider when selecting components for your system. It is true that there are many proven standard logic devices to choose from. However, as designs become more complex, we need to integ
[Industrial Control]
Unlocking the infinite possibilities of programmable logic devices
Automatic line patrol wheeled robot control system based on AT89S52 and CPLD
1 Introduction Wheeled mobile robot is an important part of the robot research field. It integrates mechanics, electronics, detection technology and intelligent control. Among various mobile mechanisms, wheeled mobile mechanism is the most common. The reason why wheeled mobile mechanism is widely used is mainly beca
[Microcontroller]
Automatic line patrol wheeled robot control system based on AT89S52 and CPLD
Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号