当前位置:网站首页>Multi channel signal data compression storage
Multi channel signal data compression storage
2022-06-10 19:18:00 【Hua Weiyun】
Multi channel signal data compression storage
1 Signal compression description
Data compression includes lossless compression and lossy compression , Lossless compression is a method that can restore the data before compression from the data after compression , For any data , It is to get rid of the information redundancy existing in the data by recoding without losing the data information , Compression ratio ( Amount of original data / Amount of compressed data ) The size of is related to the data itself , If the information redundancy in the data is large, the compression ratio will be high , If the amount of information redundancy in the data is small, the compression ratio will be low . Lossy compression allows a certain loss of accuracy in exchange for high compression efficiency , Usually for special data , According to the characteristics of the data , Some data redundancy is generated after proper processing without serious loss of data quality , And then lossless compression , So as to improve the compression ratio , Such as mp3 Sound compression 、JPEG Image compression .
Signals are usually represented in the form of continuous waveforms , The characteristics of each channel signal can be very different , Such as sampling rate 、 Range of amplitude 、 Smoothness 、 Included frequency components, etc . therefore , Multi channel signal data lossy compression Storage Become more complex , Whether the quality of the compressed recovered signal meets the requirements needs to be judged by the user . The multi-channel signals recorded for a long time often have large data , Compressed storage can greatly save storage media space and data transmission time . reference JPEG Principle of image compression algorithm , Multichannel signal analysis software provides a general method for lossy compression and storage of multichannel signals , The user can adjust the signal quality according to his own requirements , To set the signal data compression control parameters . Suppose the signal is continuously changing , Divide the signal into many time periods , Compress each segment of the signal , Save the multi-channel signal compression results as a whole into a file . The compression algorithm steps are :(1) Eliminate the DC component in the signal ( To average );(2) Carry out one-dimensional discrete cosine transform on the signal (DCT);(3) Set the cosine transform coefficient with smaller absolute value to zero , So as to generate data redundancy ;(4) The cosine transform coefficients are quantized ;(5) The quantized cosine transform coefficients are processed by lossless Hoffman (Huffman) Compress ;(6) Save the compressed data to a file . Multichannel signal analysis software supports lossless compression and lossy compression storage of signals , The file generated by lossy compression is *.cmpdct, The file generated by lossless compression is *.cmp. therefore , Compression control parameters include signal segment length 、 Cosine coefficient quantization level 、 Compression quality control factor , These parameters are used to balance the compression ratio and signal quality , Meet the needs of users .
Multi channel signal data compression , Learn from it JPEG Compression principle . Suppose the signal curve is smooth and continuous , It is considered that the main information of the signal is contained in the high amplitude coefficients of the discrete cosine transform , If the absolute value of cosine coefficient is lower than a certain threshold, it is set to zero and quantized to generate information redundancy , Finally, the quantized coefficients are lossless compressed and saved . Multi channel signals recorded for a long time often have large data , Compressed storage can greatly save storage media space and data transmission time . By compressing parameters ( Segment length 、 Quantitative level 、 Quality factor ) Settings to balance compression efficiency and signal fidelity .
The signal data compression process is shown in the figure below .
.jpg)
2 Parameter setting and compression ratio
As a multi-channel signal file 1125.dss For example , To observe the effect of different compression parameter settings on compression results . Raw data file (1125.dss) The length of is 78566 Kbytes, The recording time is 8 Hours 35 branch 17 second (30917 second ), The signal contains 12 Channels , Sampling rate of each channel 、 Range of amplitude 、 The signal name is shown in the following table .
Channel serial number | name | Sampling rate (Hz) | AD Range of values |
0 | EEG1 | 100 | 0-255 |
1 | EEG2 | 100 | 0-255 |
2 | EOG1 | 100 | 0-255 |
3 | EOG2 | 100 | 0-255 |
4 | EMG | 100 | 0-255 |
5 | Flow | 100 | 0-255 |
6 | Chest breathing | 100 | 0-255 |
7 | Abdominal breathing | 100 | 0-255 |
8 | Snore | 100 | 0-255 |
9 | ECG | 200 | 0-255 |
10 | Pulse | 200 | 0-255 |
11 | SaO2 | 1 | 0-255 |
lossless compression : Save the multi-channel signal as a lossless compressed file , The file named 1125.cmp, file length 14877 Kbytes, Compression ratio :R = 78566/14877 = 5.28. The menu operation of lossless compression is :《 preservation 》→《 Save data as 》, Enter the suffix... After the select save file dialog box appears cmp The file of .
Lossy compression : The following table is for lossy compression of the signal , Comparison of different compression parameter settings . The menu operations with lossy compression are :《 preservation 》→《 Save data as 》, Enter the suffix... After the select save file dialog box appears cmpdct The file of . You need to input compression parameters before performing lossy compression :

The file name of the lossy data compression in the table , According to the input parameters , The naming rule is 1125(nSeg_ADmax_Quality).cmpdct, namely :
1125( Segment length _ Quantitative level _ Quality factor ).cmpdct, Observe the change of compression ratio of different parameter settings .
Number | file name | file length (Kbytes) | Compression ratio | explain |
1 | 1125(4096_4095_10).cmpdct | 12491 | 6.29 | The compression ratio is small but the signal quality is high |
2 | 1125(4096_4095_8).cmpdct | 11863 | 6.62 | |
3 | 1125(4096_4095_5).cmpdct | 8479 | 9.27 | |
4 | 1125(4096_4095_4).cmpdct | 7103 | 11.06 | |
5 | 1125(4096_4095_3).cmpdct | 5566 | 14.12 | |
6 | 1125(4096_4095_2).cmpdct | 3906 | 20.11 | |
7 | 1125(4096_4095_1).cmpdct | 2140 | 36.71 | High compression ratio but low signal quality |
8 | 1125(8192_4095_4).cmpdct | 6540 | 12.01 | |
9 | 1125(2048_4095_4).cmpdct | 7947 | 9.89 | |
10 | 1125(1024_4095_4).cmpdct | 8988 | 8.74 | |
11 | 1125(512_4095_4).cmpdct | 10524 | 7.47 | |
12 | 1125(256_4095_4).cmpdct | 13349 | 5.89 | |
13 | 1125(4096_2047_4).cmpdct | 6736 | 11.66 | |
14 | 1125(4096_1023_4).cmpdct | 6323 | 12.43 | |
15 | 1125(4096_511_4).cmpdct | 5854 | 13.42 | |
16 | 1125(4096_255_4).cmpdct | 5264 | 14.93 | |
17 | 1125(4096_2047_5).cmpdct | 8026 | 9.79 | |
18 | 1125(4096_2047_3).cmpdct | 5287 | 14.86 |
From the data file compression results in the above table , The greater the quality factor , The smaller the compression ratio , The better the fidelity of the signal , conversely , The smaller the quality factor , The greater the compression ratio , The greater the signal loss ; The longer the signal segment , The greater the compression ratio , The greater the signal loss , conversely , The shorter the signal segment , The smaller the compression ratio , The better the fidelity of the signal ; The higher the level of quantification , The smaller the compression ratio , The better the fidelity of the signal , conversely , The lower the level of quantification , The greater the compression ratio , The greater the signal loss . According to signal characteristics , Tradeoff between compression ratio and quality assurance , Select the appropriate parameters . For example, signal segment length (nSegment) by 4096, Quantitative level (ADmax) by 2047, Quality factor (Quality) by 5.
3 Comparison of signal waveforms before and after compression
example 1: Yes 1125.dss data , Observe a paragraph 20 Second multi-channel signal waveform before and after compression , The compression parameter is the segment length 4096, Quantitative level 2047, Quality factor 3, The output file is 1125(4096_2047_3).cmpdct. Compression ratio R=14.86.
Original waveform before compression (20s)

Recover the waveform after compression (20s)

example 2: For sound signal data file CoughDemo2.wav Implement compressed storage , 16 The bit , Two channels , Sampling rate 44100Hz, The recording time is 3 branch 42 second (222s), File size is 38161Kbytes. Lossless compression and save as a file :CoughDemo2.cmp, File size is 26862 Kbytes, Compression ratio R=31861/26862=1.19, Too small . The lossy compression parameter is set to segment length 4096 spot , Quantitative level 2047, Quality factor 3, Save the file as CoughDemo2(4096_2047_3).cmpdct, File length is 2198 Kbytes, Compression ratio R = 31861/2198 = 17.36.
Observe a paragraph 0.5s Signal waveform before and after compression .
Original waveform before compression (0.5s)

Recover the waveform after compression (0.5s), The compression parameter is set to nSeg=4096 ADmax=2047 Quality=3

example 3: ECG data , File name DemoECG1ch.dss, File size is 42196 Kbytes, Sampling rate 250Hz, Range of amplitude 0-4095. File name after lossless compression DemoECG1ch.cmp, File size is 9743 Kbytes, Compression ratio R=4.33. File name after lossy compression DemoECG1ch(4096_2047_3).cmpdct, file size 4049 Kbytes, Compression ratio R=10.42. The compression parameter is set to segment length 4096, Quantitative level 2047, Quality factor 4.
Original signal waveform before compression

Recover the signal waveform after compression

reference
[1] Qianguoxiang , Sun Hong , Pengzhenyun , Zhan Banghua , Xuguangfang Huang, . Data compression technology classic [M]. Beijing Xueyuan press ,1994 year 8 Yue di 1 edition .
[2] Gao Wen Writing . Multimedia data compression technology [M]. Beijing Electronic industry press ,1994 year 4 Yue di 1 edition .
Contact the author :[email protected]
Related articles
Multichannel signal analysis software system
Design of biomedical signal processing and analysis software system
Curve fitting software
Discrete wavelet transform is used for signal filtering
Multi dimensional feature parameter machine learning algorithm
Multi dimensional feature parameter machine learning software
Kohonen Self organizing feature mapping neural network ( Ring and spherical networks )
Three dimensional graphic display software of matrix
Picture browsing software tools
Principal component analysis (K-L Transformation ) And signal decomposition and synthesis ( wave filtering )
Calculation of sample entropy sequence of signal
Bispectral analysis of signal
Empirical mode decomposition of signal (EMD)
Hilbert (Hilbert) Calculation of instantaneous frequency of transformed signal
Random variable simulation with given probability distribution
Calculation of characteristic parameters of signal
Data distribution bitmap
边栏推荐
- OPENCV 检测人脸 不依赖于任何第三方库
- 《Single Image Haze Removal Using Dark Channel Prior》去雾代码实现分析
- Uncertainty reasoning: let the model know that it doesn't know
- 单纯形法代码求解(含超详细代码注释和整个流程图)
- Seata installing the window environment
- AgI foundation, uncertain reasoning, subjective logic Ppt1
- SQL statement to view the basic table structure and constraint fields, primary codes and foreign codes in the table (simple and effective)
- Design and development of hospital reservation registration platform based on JSP Zip (thesis + project source code)
- 3. getting started with golang concurrency
- 第161章 SQL函数 YEAR
猜你喜欢

How to transform digital transformation? Which way?

Pits encountered during the use of ETL (ETL Chinese garbled)

Request header field XXXX is not allowed by access control allow headers in preflight response

nodejs-基本架构分析-解析引擎目录-插件安装-核心模块

Openssl1.1.1 vs2013 compilation tutorial

超级简单的课程设计ssm学生管理系统(含源码简单添加、删除、修改、查询操作)

Array signal processing simulation part IV -- Z-transform analysis array polynomial

c(指针-02)

Adobe Premiere foundation - tool use (selection tool, razor tool, and other common tools) (III)

2022.05.29(LC_6079_价格减免)
随机推荐
Adobe Premiere基础特效(卡点和转场)(四)
Adobe Premiere Basics - introduction, configuration, shortcut keys, creating projects, creating sequences (I)
Uncertainty reasoning: let the model know that it doesn't know
Performance and high availability analysis of database firewall
nodejs-判断系统类型-获取主机名称-执行控制台命令-中文乱码
个人如何投资理财比较安全?
Linked List
VS从txt文件读取中文汉字产生乱码的解决办法(超简单)
lingo12软件下载及lingo语言入门资源
Use of uiautomator2 automated test tool
Adobe Premiere Foundation (track related) (V)
Longest ascending subsequence (LIS) Logu
C (pointer-02)
数据库防火墙的性能和高可用性分析
超级简单的课程设计ssm学生管理系统(含源码简单添加、删除、修改、查询操作)
Adobe Premiere Foundation (animation production - Flexible animation) (VIII)
c(指针02)
Mysql (17 déclencheurs)
Debugging skills
北京地铁票务系统