[go: up one dir, main page]

CN111147079B - Data acquisition method and device with adaptive and adjustable sampling frequency - Google Patents

Data acquisition method and device with adaptive and adjustable sampling frequency Download PDF

Info

Publication number
CN111147079B
CN111147079B CN201911387276.9A CN201911387276A CN111147079B CN 111147079 B CN111147079 B CN 111147079B CN 201911387276 A CN201911387276 A CN 201911387276A CN 111147079 B CN111147079 B CN 111147079B
Authority
CN
China
Prior art keywords
data
detection window
sampling frequency
time detection
sensor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201911387276.9A
Other languages
Chinese (zh)
Other versions
CN111147079A (en
Inventor
吴向东
罗向龙
王立新
李储军
刘小强
汪珂
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Changan University
China Railway First Survey and Design Institute Group Ltd
Original Assignee
Changan University
China Railway First Survey and Design Institute Group Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Changan University, China Railway First Survey and Design Institute Group Ltd filed Critical Changan University
Priority to CN201911387276.9A priority Critical patent/CN111147079B/en
Publication of CN111147079A publication Critical patent/CN111147079A/en
Application granted granted Critical
Publication of CN111147079B publication Critical patent/CN111147079B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M1/00Analogue/digital conversion; Digital/analogue conversion
    • H03M1/12Analogue/digital converters
    • H03M1/124Sampling or signal conditioning arrangements specially adapted for A/D converters
    • H03M1/1245Details of sampling arrangements or methods
    • H03M1/126Multi-rate systems, i.e. adaptive to different fixed sampling rates
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Feedback Control In General (AREA)
  • Measurement Of Mechanical Vibrations Or Ultrasonic Waves (AREA)

Abstract

本发明公开了一种采样频率自适应可调的数据采集方法及装置,设定时间检测窗,计算时间检测窗内的采样数据变化速率与累计变化量,对相邻时间检测窗内数据变化速率及累计变化量比值进行处理后,得最终的实时采样频率,即当数据变化较快时,提高采样频率,从而使得到的采样数据可以精确地反映被测对象的参数变化细节;当数据变化较慢时,则降低采样频率,降低系统功耗的同时避免无效的大数据。该方法及装置能够实现采样频率的自适应调整。

Figure 201911387276

The invention discloses a data acquisition method and device with self-adaptive and adjustable sampling frequency, which sets a time detection window, calculates the sampling data change rate and cumulative change amount in the time detection window, and calculates the data change rate in adjacent time detection windows After processing the ratio of the accumulated change amount, the final real-time sampling frequency is obtained, that is, when the data changes rapidly, the sampling frequency is increased, so that the obtained sampling data can accurately reflect the details of the parameter change of the measured object; when the data changes rapidly When it is slow, the sampling frequency is reduced to reduce system power consumption while avoiding invalid large data. The method and device can realize adaptive adjustment of sampling frequency.

Figure 201911387276

Description

一种采样频率自适应可调的数据采集方法及装置A data acquisition method and device with adaptively adjustable sampling frequency

技术领域Technical Field

本发明属于监测领域,涉及一种采样频率自适应可调的数据采集方法及装置。The invention belongs to the field of monitoring, and relates to a data acquisition method and a device with adaptively adjustable sampling frequency.

背景技术Background Art

传感器可以检测到被测量的信息,同时将检测到的被测量信息按一定规律变化成为电信号或其他所需形式的信息输出,便于信息传输、处理和存储,广泛应用于数据采集与测量、诊断与监测等领域。现有的传感器其采样频率是固定不变的,实际情况中,被测对象的参数变化不一定是均匀的,所以固定的采样频率不一定能够有效地恢复原始信号,易在造成细节变化丢失。Sensors can detect the information being measured, and at the same time, change the detected information into electrical signals or other required forms of information output according to certain rules, which is convenient for information transmission, processing and storage, and is widely used in data acquisition and measurement, diagnosis and monitoring, etc. The sampling frequency of existing sensors is fixed. In actual situations, the parameter changes of the measured object are not necessarily uniform, so the fixed sampling frequency may not be able to effectively restore the original signal, which may easily cause the loss of details.

发明内容Summary of the invention

本发明的目的在于克服上述现有技术的缺点,提供了一种采样频率自适应可调的数据采集方法及装置,该方法及装置能够实现采样频率的自适应调整。The purpose of the present invention is to overcome the shortcomings of the above-mentioned prior art and provide a data acquisition method and device with adaptively adjustable sampling frequency, which can realize adaptive adjustment of the sampling frequency.

为达到上述目的,本发明所述的采样频率自适应可调的数据采集方法包括以下步骤:To achieve the above object, the data acquisition method with adaptively adjustable sampling frequency of the present invention comprises the following steps:

1)安装、固定传感器,通过传感器进行数据采集,再对传感器的输出模拟信号进行预处理;1) Install and fix the sensor, collect data through the sensor, and then pre-process the output analog signal of the sensor;

2)设定传感器的初始采样频率为f0、最大采样频率为fmax以及时间检测窗,其中,时间检测窗的长度为T,设第i个时间检测窗内,i=1,2,3…,传感器采集到的数据

Figure BDA0002339631340000026
其中,Ni为数据的采集点数;2) Set the initial sampling frequency of the sensor to f 0 , the maximum sampling frequency to f max and the time detection window, where the length of the time detection window is T. Suppose that in the i-th time detection window, i = 1, 2, 3, ..., the data collected by the sensor
Figure BDA0002339631340000026
Among them, Ni is the number of data collection points;

3)传感器以初始采样频率f0进行数据的采集,其中,传感器在第1个时间检测窗内采集到的数据

Figure BDA0002339631340000027
第2个时间检测窗内采集到的数据
Figure BDA0002339631340000028
其中,N1=N2=T·f0,通过公式(1)计算第1个时间检测窗与第2个时间检测窗内数据的变化速率R1与R2,通过公式(2)计算第1个时间检测窗与第2个时间检测窗内的累计变化量B1与B2;3) The sensor collects data at the initial sampling frequency f0 , where the data collected by the sensor in the first time detection window is
Figure BDA0002339631340000027
Data collected in the second time detection window
Figure BDA0002339631340000028
Wherein, N 1 =N 2 =T·f 0 , the change rates R 1 and R 2 of the data in the first time detection window and the second time detection window are calculated by formula (1), and the cumulative changes B 1 and B 2 in the first time detection window and the second time detection window are calculated by formula (2);

Figure BDA0002339631340000021
Figure BDA0002339631340000021

Figure BDA0002339631340000022
Figure BDA0002339631340000022

4)计算相邻时间检测窗内数据的变化速率比值a为

Figure BDA0002339631340000023
变化速率比值的约束条件如式(3)所示,传感器的采样频率fa与其约束条件下得到的比值结果a满足式(5)所示的关系,计算相邻时间检测窗内数据的累计变化量比值b为
Figure BDA0002339631340000024
该累计变化量比值的约束条件如式(4)所示,传感器的采样频率fb与其约束条件下得到的累计变化量比值b满足式(6)的关系,得最终的实时采样频率为fs=max[fa fb];4) Calculate the change rate ratio a of the data in adjacent time detection windows:
Figure BDA0002339631340000023
The constraint conditions of the change rate ratio are shown in formula (3). The sampling frequency f a of the sensor and the ratio result a obtained under its constraint conditions satisfy the relationship shown in formula (5). The ratio b of the cumulative change of the data in the adjacent time detection window is calculated as follows:
Figure BDA0002339631340000024
The constraint condition of the cumulative change ratio is shown in formula (4). The sampling frequency fb of the sensor and the cumulative change ratio b obtained under its constraint condition satisfy the relationship of formula (6). The final real-time sampling frequency is fs = max[f a f b ];

Figure BDA0002339631340000025
Figure BDA0002339631340000025

fa=2a-1·f0 (4)f a =2 a-1 ·f 0 (4)

Figure BDA0002339631340000031
Figure BDA0002339631340000031

fb=2b-1·f0 (6)f b =2 b-1 ·f 0 (6)

其中,

Figure BDA0002339631340000032
为向上取整符号;in,
Figure BDA0002339631340000032
is the rounding symbol;

5)在第3个时间检测窗内,传感器以最终的实时采样频率fs进行采集,其中,采集到的数据

Figure BDA0002339631340000033
根据式(7)计算第三个时间检测窗内数据的采集点数N3,同时计算第三个时间检测窗内数据的变化速率R3及累计变化量B3;5) In the third time detection window, the sensor collects data at the final real-time sampling frequency fs , where the collected data
Figure BDA0002339631340000033
According to formula (7), the number of data collection points N 3 in the third time detection window is calculated, and the change rate R 3 and the cumulative change amount B 3 of the data in the third time detection window are calculated at the same time;

Ni=T·fs(i=3,4,…) (7)N i =T·f s (i=3,4,…) (7)

6)重复步骤4),通过式(3)及式(5)更新a与b的值,重新确定实时采样频率fs,并下一个采样点数检测窗口内,传感器以确定好的采样频率fs进行采集,并且重新计算当前检测窗口内所需的时间Ti、Ri及Bi6) Repeat step 4), update the values of a and b through equations (3) and (5), re-determine the real-time sampling frequency fs , and in the next sampling point detection window, the sensor collects data at the determined sampling frequency fs , and recalculates the time Ti , Ri and Bi required in the current detection window.

步骤1)中对传感器的输出模拟信号进行预处理的具体过程为:对传感器的输出模拟信号依次进行降噪、放大及滤波处理。The specific process of preprocessing the output analog signal of the sensor in step 1) is: performing noise reduction, amplification and filtering on the output analog signal of the sensor in sequence.

本发明所述的采样频率自适应可调的数据采集装置包括:The data acquisition device with adaptively adjustable sampling frequency described in the present invention comprises:

采集模块,对传感器的输出模拟信号进行预处理,并将采集得到的数据传输至控制模块;The acquisition module pre-processes the output analog signal of the sensor and transmits the acquired data to the control module;

控制模块,与采集模块相连接,其中,控制模块的具体工作过程为:The control module is connected to the acquisition module, wherein the specific working process of the control module is:

a)设定传感器的初始采样频率为f0、最大采样频率为fmax以及时间检测窗,其中,时间检测窗的长度为T,设第i个时间检测窗内,i=1,2,3…,传感器采集到的数据Xi=[x1,x2,…xNi],其中,Ni为数据的采集点数;a) Set the initial sampling frequency of the sensor to f 0 , the maximum sampling frequency to f max and the time detection window, where the length of the time detection window is T. Suppose in the i-th time detection window, i=1,2,3…, the data collected by the sensor is Xi =[ x1 , x2 ,… xNi ], where Ni is the number of data collection points;

b)传感器以初始采样频率f0进行数据的采集,其中,传感器在第1个时间检测窗内采集到的数据

Figure BDA0002339631340000041
第2个时间检测窗内采集到的数据
Figure BDA0002339631340000042
其中,N1=N2=T·f0,通过公式(1)计算第1个时间检测窗与第2个时间检测窗内数据的变化速率R1与R2,通过公式(2)计算第1个时间检测窗与第2个时间检测窗内的累计变化量B1与B2;b) The sensor collects data at the initial sampling frequency f0 , where the data collected by the sensor in the first time detection window is
Figure BDA0002339631340000041
Data collected in the second time detection window
Figure BDA0002339631340000042
Wherein, N 1 =N 2 =T·f 0 , the change rates R 1 and R 2 of the data in the first time detection window and the second time detection window are calculated by formula (1), and the cumulative changes B 1 and B 2 in the first time detection window and the second time detection window are calculated by formula (2);

Figure BDA0002339631340000043
Figure BDA0002339631340000043

Figure BDA0002339631340000044
Figure BDA0002339631340000044

c)计算相邻时间检测窗内数据的变化速率比值a为

Figure BDA0002339631340000045
变化速率比值的约束条件如式(3)所示,传感器的采样频率fa与其约束条件下得到的比值结果a满足式(5)所示的关系,计算相邻时间检测窗内数据的累计变化量比值b为
Figure BDA0002339631340000046
该累计变化量比值的约束条件如式(4)所示,传感器的采样频率fb与其约束条件下得到的累计变化量比值b满足式(6)的关系,得最终的实时采样频率为fs=max[fa fb];c) Calculate the change rate ratio a of the data in adjacent time detection windows:
Figure BDA0002339631340000045
The constraint conditions of the change rate ratio are shown in formula (3). The sampling frequency f a of the sensor and the ratio result a obtained under its constraint conditions satisfy the relationship shown in formula (5). The ratio b of the cumulative change of the data in the adjacent time detection window is calculated as follows:
Figure BDA0002339631340000046
The constraint condition of the cumulative change ratio is shown in formula (4). The sampling frequency fb of the sensor and the cumulative change ratio b obtained under its constraint condition satisfy the relationship of formula (6). The final real-time sampling frequency is fs = max[f a f b ];

Figure BDA0002339631340000047
Figure BDA0002339631340000047

fa=2a-1·f0 (4)f a =2 a-1 ·f 0 (4)

Figure BDA0002339631340000051
Figure BDA0002339631340000051

fb=2b-1·f0 (6)f b =2 b-1 ·f 0 (6)

其中,

Figure BDA0002339631340000052
为向上取整符号;in,
Figure BDA0002339631340000052
is the rounding symbol;

d)在第3个时间检测窗内,传感器以最终的实时采样频率fs进行采集,其中,采集到的数据

Figure BDA0002339631340000053
根据式(7)计算第三个时间检测窗内数据的采集点数N3,同时计算第三个时间检测窗内数据的变化速率R3及累计变化量B3;d) In the third time detection window, the sensor collects data at the final real-time sampling frequency fs , where the collected data
Figure BDA0002339631340000053
According to formula (7), the number of data collection points N 3 in the third time detection window is calculated, and the change rate R 3 and the cumulative change amount B 3 of the data in the third time detection window are calculated at the same time;

Ni=T·fs(i=3,4,…) (7)N i =T·f s (i=3,4,…) (7)

e)重复步骤c),通过式(3)及式(5)更新a与b的值,重新确定实时采样频率fs,并下一个采样点数检测窗口内,传感器以确定好的采样频率fs进行采集,并且重新计算当前检测窗口内所需的时间Ti、Ri及Bie) Repeat step c), update the values of a and b through equations (3) and (5), re-determine the real-time sampling frequency fs , and in the next sampling point detection window, the sensor collects data at the determined sampling frequency fs , and recalculates the time Ti , Ri and Bi required in the current detection window.

控制模块通过I/O接口与外部计算机相连接。The control module is connected to an external computer via an I/O interface.

控制模块连接有无线通信模块。The control module is connected with a wireless communication module.

本发明具有以下有益效果:The present invention has the following beneficial effects:

本发明所述的采样频率自适应可调的数据采集方法及装置在具体操作时,设定时间检测窗,计算时间检测窗内的采样数据变化速率与累计变化量,对相邻时间检测窗内数据变化速率及累计变化量比值进行处理后,得最终的实时采样频率,即当数据变化较快时,提高采样频率,从而使得到的采样数据可以精确地反映被测对象的参数变化细节;当数据变化较慢时,则降低采样频率,降低系统功耗的同时避免无效的大数据。本发明一改传统固定采样频率不能兼顾待测参数变化的精细度与采样频率动态可调的矛盾,为后续数据处理的稳健性奠定基础。The data acquisition method and device with adaptively adjustable sampling frequency described in the present invention, in specific operation, sets a time detection window, calculates the sampling data change rate and cumulative change amount in the time detection window, and processes the data change rate and cumulative change amount ratio in adjacent time detection windows to obtain the final real-time sampling frequency, that is, when the data changes faster, the sampling frequency is increased so that the obtained sampling data can accurately reflect the parameter change details of the measured object; when the data changes slowly, the sampling frequency is reduced to reduce the system power consumption while avoiding invalid big data. The present invention changes the contradiction that the traditional fixed sampling frequency cannot take into account the fineness of the change of the measured parameter and the dynamic adjustment of the sampling frequency, and lays the foundation for the robustness of subsequent data processing.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1为本发明的流程图;Fig. 1 is a flow chart of the present invention;

图2为本发明的系统框架图。FIG. 2 is a system framework diagram of the present invention.

具体实施方式DETAILED DESCRIPTION

下面结合附图对本发明做进一步详细描述:The present invention is further described in detail below in conjunction with the accompanying drawings:

参考图1,本发明所述的本发明所述的采样频率自适应可调的数据采集方法包括以下步骤:Referring to FIG1 , the data acquisition method with adaptively adjustable sampling frequency according to the present invention comprises the following steps:

1)安装、固定传感器,通过传感器进行数据采集,再对传感器的输出模拟信号进行预处理;1) Install and fix the sensor, collect data through the sensor, and then pre-process the output analog signal of the sensor;

2)设定传感器的初始采样频率为f0、最大采样频率为fmax以及时间检测窗,其中,时间检测窗的长度为T,设第i个时间检测窗内,i=1,2,3…,传感器采集到的数据

Figure BDA0002339631340000061
其中,Ni为数据的采集点数;2) Set the initial sampling frequency of the sensor to f 0 , the maximum sampling frequency to f max and the time detection window, where the length of the time detection window is T. Suppose that in the i-th time detection window, i = 1, 2, 3, ..., the data collected by the sensor
Figure BDA0002339631340000061
Among them, Ni is the number of data collection points;

3)传感器以初始采样频率f0进行数据的采集,其中,传感器在第1个时间检测窗内采集到的数据

Figure BDA0002339631340000062
第2个时间检测窗内采集到的数据
Figure BDA0002339631340000063
其中,N1=N2=T·f0,通过公式(1)计算第1个时间检测窗与第2个时间检测窗内数据的变化速率R1与R2,通过公式(2)计算第1个时间检测窗与第2个时间检测窗内的累计变化量B1与B2;3) The sensor collects data at the initial sampling frequency f0 , where the data collected by the sensor in the first time detection window is
Figure BDA0002339631340000062
Data collected in the second time detection window
Figure BDA0002339631340000063
Wherein, N 1 =N 2 =T·f 0 , the change rates R 1 and R 2 of the data in the first time detection window and the second time detection window are calculated by formula (1), and the cumulative changes B 1 and B 2 in the first time detection window and the second time detection window are calculated by formula (2);

Figure BDA0002339631340000064
Figure BDA0002339631340000064

Figure BDA0002339631340000071
Figure BDA0002339631340000071

4)计算相邻时间检测窗内数据的变化速率比值a为

Figure BDA0002339631340000072
变化速率比值的约束条件如式(3)所示,传感器的采样频率fa与其约束条件下得到的比值结果a满足式(5)所示的关系,计算相邻时间检测窗内数据的累计变化量比值b为
Figure BDA0002339631340000073
该累计变化量比值的约束条件如式(4)所示,传感器的采样频率fb与其约束条件下得到的累计变化量比值b满足式(6)的关系,得最终的实时采样频率为fs=max[fa fb];4) Calculate the change rate ratio a of the data in adjacent time detection windows:
Figure BDA0002339631340000072
The constraint conditions of the change rate ratio are shown in formula (3). The sampling frequency f a of the sensor and the ratio result a obtained under its constraint conditions satisfy the relationship shown in formula (5). The ratio b of the cumulative change of the data in the adjacent time detection window is calculated as follows:
Figure BDA0002339631340000073
The constraint condition of the cumulative change ratio is shown in formula (4). The sampling frequency fb of the sensor and the cumulative change ratio b obtained under its constraint condition satisfy the relationship of formula (6). The final real-time sampling frequency is fs = max[f a f b ];

Figure BDA0002339631340000074
Figure BDA0002339631340000074

fa=2a-1·f0 (4)f a =2 a-1 ·f 0 (4)

Figure BDA0002339631340000075
Figure BDA0002339631340000075

fb=2b-1·f0 (6)f b =2 b-1 ·f 0 (6)

其中,

Figure BDA0002339631340000076
为向上取整符号;in,
Figure BDA0002339631340000076
is the rounding symbol;

5)在第3个时间检测窗内,传感器以最终的实时采样频率fs进行采集,其中,采集到的数据

Figure BDA0002339631340000077
根据式(7)计算第三个时间检测窗内数据的采集点数N3,同时计算第三个时间检测窗内数据的变化速率R3及累计变化量B3;5) In the third time detection window, the sensor collects data at the final real-time sampling frequency fs , where the collected data
Figure BDA0002339631340000077
According to formula (7), the number of data collection points N 3 in the third time detection window is calculated, and the change rate R 3 and the cumulative change amount B 3 of the data in the third time detection window are calculated at the same time;

Ni=T·fs(i=3,4,…) (7)N i =T·f s (i=3,4,…) (7)

6)重复步骤4),通过式(3)及式(5)更新a与b的值,重新确定实时采样频率fs,并下一个采样点数检测窗口内,传感器以确定好的采样频率fs进行采集,并且重新计算当前检测窗口内所需的时间Ti、Ri及Bi6) Repeat step 4), update the values of a and b through equations (3) and (5), re-determine the real-time sampling frequency fs , and in the next sampling point detection window, the sensor collects data at the determined sampling frequency fs , and recalculates the time Ti , Ri and Bi required in the current detection window.

步骤1)中对传感器的输出模拟信号进行预处理的具体过程为:对传感器的输出模拟信号依次进行降噪、放大及滤波处理。The specific process of preprocessing the output analog signal of the sensor in step 1) is: performing noise reduction, amplification and filtering on the output analog signal of the sensor in sequence.

参考图2,本发明所述的采样频率自适应可调的数据采集装置包括:Referring to FIG2 , the data acquisition device with adaptively adjustable sampling frequency of the present invention comprises:

采集模块,对传感器的输出模拟信号进行预处理,并将采集得到的数据传输至控制模块;The acquisition module pre-processes the output analog signal of the sensor and transmits the acquired data to the control module;

控制模块,与采集模块相连接,其中,控制模块的具体工作过程为:The control module is connected to the acquisition module, wherein the specific working process of the control module is:

a)设定传感器的初始采样频率为f0、最大采样频率为fmax以及时间检测窗,其中,时间检测窗的长度为T,设第i个时间检测窗内,i=1,2,3…,传感器采集到的数据

Figure BDA0002339631340000081
其中,Ni为数据的采集点数;a) Set the initial sampling frequency of the sensor to f 0 , the maximum sampling frequency to f max and the time detection window, where the length of the time detection window is T. Suppose that in the i-th time detection window, i = 1, 2, 3, ..., the data collected by the sensor
Figure BDA0002339631340000081
Among them, Ni is the number of data collection points;

b)传感器以初始采样频率f0进行数据的采集,其中,传感器在第1个时间检测窗内采集到的数据

Figure BDA0002339631340000082
第2个时间检测窗内采集到的数据
Figure BDA0002339631340000083
其中,N1=N2=T·f0,通过公式(1)计算第1个时间检测窗与第2个时间检测窗内数据的变化速率R1与R2,通过公式(2)计算第1个时间检测窗与第2个时间检测窗内的累计变化量B1与B2;b) The sensor collects data at the initial sampling frequency f0 , where the data collected by the sensor in the first time detection window is
Figure BDA0002339631340000082
Data collected in the second time detection window
Figure BDA0002339631340000083
Wherein, N 1 =N 2 =T·f 0 , the change rates R 1 and R 2 of the data in the first time detection window and the second time detection window are calculated by formula (1), and the cumulative changes B 1 and B 2 in the first time detection window and the second time detection window are calculated by formula (2);

Figure BDA0002339631340000084
Figure BDA0002339631340000084

Figure BDA0002339631340000085
Figure BDA0002339631340000085

c)计算相邻时间检测窗内数据的变化速率比值a为

Figure BDA0002339631340000091
变化速率比值的约束条件如式(3)所示,传感器的采样频率fa与其约束条件下得到的比值结果a满足式(5)所示的关系,计算相邻时间检测窗内数据的累计变化量比值b为
Figure BDA0002339631340000092
该累计变化量比值的约束条件如式(4)所示,传感器的采样频率fb与其约束条件下得到的累计变化量比值b满足式(6)的关系,得最终的实时采样频率为fs=max[fa fb];c) Calculate the change rate ratio a of the data in adjacent time detection windows:
Figure BDA0002339631340000091
The constraint conditions of the change rate ratio are shown in formula (3). The sampling frequency f a of the sensor and the ratio result a obtained under its constraint conditions satisfy the relationship shown in formula (5). The ratio b of the cumulative change of the data in the adjacent time detection window is calculated as follows:
Figure BDA0002339631340000092
The constraint condition of the cumulative change ratio is shown in formula (4). The sampling frequency fb of the sensor and the cumulative change ratio b obtained under its constraint condition satisfy the relationship of formula (6). The final real-time sampling frequency is fs = max[f a f b ];

Figure BDA0002339631340000093
Figure BDA0002339631340000093

fa=2a-1·f0 (4)f a =2 a-1 ·f 0 (4)

Figure BDA0002339631340000094
Figure BDA0002339631340000094

fb=2b-1·f0 (6)f b =2 b-1 ·f 0 (6)

其中,

Figure BDA0002339631340000095
为向上取整符号;in,
Figure BDA0002339631340000095
is the rounding symbol;

d)在第3个时间检测窗内,传感器以最终的实时采样频率fs进行采集,其中,采集到的数据

Figure BDA0002339631340000096
根据式(7)计算第三个时间检测窗内数据的采集点数N3,同时计算第三个时间检测窗内数据的变化速率R3及累计变化量B3;d) In the third time detection window, the sensor collects data at the final real-time sampling frequency fs , where the collected data
Figure BDA0002339631340000096
According to formula (7), the number of data collection points N 3 in the third time detection window is calculated, and the change rate R 3 and the cumulative change amount B 3 of the data in the third time detection window are calculated at the same time;

Ni=T·fs(i=3,4,…) (7)N i =T·f s (i=3,4,…) (7)

e)重复步骤c),通过式(3)及式(5)更新a与b的值,重新确定实时采样频率fs,并下一个采样点数检测窗口内,传感器以确定好的采样频率fs进行采集,并且重新计算当前检测窗口内所需的时间Ti、Ri及Bie) Repeat step c), update the values of a and b through equations (3) and (5), re-determine the real-time sampling frequency fs , and in the next sampling point detection window, the sensor collects data at the determined sampling frequency fs , and recalculates the time Ti , Ri and Bi required in the current detection window.

控制模块通过I/O接口与外部计算机相连接,控制模块连接有无线通信模块。The control module is connected to an external computer via an I/O interface, and the control module is connected to a wireless communication module.

控制模块包括数据单元、算法单元、控制单元及配置单元;数据单元,用于存储采集模块采集到的数据、算法单元处理后的数据,同时还为算法单元提供样本数据集;算法单元,用于根据数据单元提供的样本数据计算第i(i=1,2,3…)个时间窗内,采样数据的变化速率Ri以及累计变化量Bi,不断更新a与b的值,每更新一次得到相应的实时采集频率fs,将处理后的数据信息保存到数据单元,同时反馈给控制单元;配置单元,用于用户对采集模块中的采集持续时间、初始采样频率f0、最大采样频率fmax以及时间窗长度T进行配置,还可以通过I/O接口实现用户对该装置的一些其它设定;控制单元,用于控制整个电路运算,并且通过接收配置单元信息的反馈进一步控制整个装置的工作流程;通过接收算法单元的反馈信息实时调整采样频率fsThe control module includes a data unit, an algorithm unit, a control unit and a configuration unit; the data unit is used to store the data collected by the acquisition module and the data processed by the algorithm unit, and also provides a sample data set for the algorithm unit; the algorithm unit is used to calculate the change rate R i and the cumulative change amount B i of the sampling data in the i-th (i=1,2,3...) time window according to the sample data provided by the data unit, and continuously update the values of a and b. Each update obtains the corresponding real-time acquisition frequency f s , saves the processed data information to the data unit, and feeds back to the control unit; the configuration unit is used for the user to configure the acquisition duration, initial sampling frequency f 0 , maximum sampling frequency f max and time window length T in the acquisition module, and can also realize some other settings of the user for the device through the I/O interface; the control unit is used to control the entire circuit operation, and further control the workflow of the entire device by receiving feedback from the configuration unit information; the sampling frequency f s is adjusted in real time by receiving feedback from the algorithm unit.

Claims (5)

1. A data acquisition method with adaptive and adjustable sampling frequency is characterized by comprising the following steps:
1) Installing and fixing a sensor, acquiring data through the sensor, and preprocessing an output analog signal of the sensor;
2) Setting the initial sampling frequency of the sensor to f 0 Maximum sampling frequency of f max And a time detection window, wherein the length of the time detection window is T, the length of the time detection window is set to be in the ith time detection window, i =1,2,3 …, and data collected by the sensor
Figure FDA0002339631330000011
Wherein N is i Counting the number of collected data;
3) Sensor with initial sampling frequency f 0 Data acquisition is carried out, wherein the data acquired by the sensor in the 1 st time detection window
Figure FDA0002339631330000012
Data collected in the 2 nd time detection window->
Figure FDA0002339631330000013
Wherein N is 1 =N 2 =T·f 0 Calculating the change rate R of the data in the 1 st time detection window and the 2 nd time detection window by formula (1) 1 And R 2 Calculating the cumulative variation B in the 1 st time detection window and the 2 nd time detection window by formula (2) 1 And B 2
Figure FDA0002339631330000014
Figure FDA0002339631330000015
4) Calculating the change rate ratio a of the data in the adjacent time detection windows as
Figure FDA0002339631330000016
The constraint condition of the rate of change ratio is shown in formula (3), and the sampling frequency f of the sensor a And the ratio result a obtained under the constraint condition satisfies the relation shown in the formula (5), and the accumulated change ratio b of the data in the adjacent time detection window is calculated to be ^ based on>
Figure FDA0002339631330000017
The constraint condition of the accumulated variation ratio is shown as formula (4), and the sampling frequency f of the sensor b The ratio b of the obtained real-time sampling frequency to the accumulated variation quantity satisfies the relation of the formula (6) under the constraint condition, and the final real-time sampling frequency is f s =max[f a f b ];
Figure FDA0002339631330000021
f a =2 a-1 ·f 0 (4)
Figure FDA0002339631330000022
f b =2 b-1 ·f 0 (6)
Wherein,
Figure FDA0002339631330000023
is a rounded up symbol;
5) In the 3 rd time detection window, the sensor samples at the final real-time sampling frequency f s Performing an acquisition, wherein the acquired data
Figure FDA0002339631330000024
Calculating the number N of the acquisition points of the data in the third time detection window according to the formula (7) 3 Simultaneously calculating the change rate R of the data in the third time detection window 3 And the accumulated variation B 3
N i =T·f s (i=3,4,…) (7)
6) Repeating the step 4), updating the values of a and b through the formulas (3) and (5), and re-determining the real-time sampling frequency f s And next sampling point number is detected in the window, the sensor determines the good sampling frequency f s The acquisition is carried out and the time T required within the current detection window is recalculated i 、R i And B i
2. The data acquisition method with the adaptive and adjustable sampling frequency according to claim 1, wherein the specific process of preprocessing the output analog signal of the sensor in the step 1) is as follows: and sequentially carrying out noise reduction, amplification and filtering processing on the output analog signals of the sensor.
3. A sampling frequency self-adaptive adjustable data acquisition device is characterized by comprising:
the acquisition module is used for preprocessing the output analog signal of the sensor and transmitting the acquired data to the control module;
the control module is connected with the acquisition module, wherein the specific working process of the control module is as follows:
a) Setting the initial sampling frequency of the sensor to f 0 Maximum sampling frequency of f max And a time detection window, wherein the length of the time detection window is T, the length of the time detection window is set in the ith time detection window, i =1,2,3 …, and data acquired by the sensor
Figure FDA0002339631330000031
Wherein N is i Counting the number of collected data;
b) Sensor with initial sampling frequency f 0 Data acquisition is carried out, wherein the data acquired by the sensor in the 1 st time detection window
Figure FDA0002339631330000032
Data collected in the 2 nd time detection window->
Figure FDA0002339631330000033
Wherein N is 1 =N 2 =T·f 0 Calculating the change rate R of the data in the 1 st time detection window and the 2 nd time detection window by formula (1) 1 And R 2 Calculating the cumulative variation B in the 1 st time detection window and the 2 nd time detection window by formula (2) 1 And B 2
Figure FDA0002339631330000034
Figure FDA0002339631330000035
c) Calculating the change rate ratio a of the data in the adjacent time detection windows as
Figure FDA0002339631330000036
The constraint condition of the rate of change ratio is shown in formula (3), and the sampling frequency f of the sensor a The ratio result a obtained under the constraint condition satisfies the relation shown in the formula (5), and the accumulative variation of the data in the adjacent time detection window is calculatedThe differentiation quantity ratio b is->
Figure FDA0002339631330000037
The constraint condition of the accumulated variation ratio is shown as formula (4), and the sampling frequency f of the sensor b The ratio b of the obtained real-time sampling frequency to the accumulated variation quantity satisfies the relation of the formula (6) under the constraint condition, and the final real-time sampling frequency is f s =max[f a f b ];
Figure FDA0002339631330000038
f a =2 a-1 ·f 0 (4)
Figure FDA0002339631330000041
f b =2 b-1 ·f 0 (6)
Wherein,
Figure FDA0002339631330000042
is an rounding up symbol;
d) In the 3 rd time detection window, the sensor samples at the final real-time sampling frequency f s Performing an acquisition, wherein the acquired data
Figure FDA0002339631330000043
Calculating the number N of the acquisition points of the data in the third time detection window according to the formula (7) 3 Simultaneously calculating the change rate R of the data in the third time detection window 3 And the accumulated variation B 3
N i =T·f s (i=3,4,…) (7)
e) Repeating the step c), updating the values of a and b through the formulas (3) and (5), and re-determining the real-time sampling frequency f s And the next sampling point number is detected in the window, the sensor anddetermining a good sampling frequency f s The acquisition is carried out and the time T required within the current detection window is recalculated i 、R i And B i
4. The adaptive adjustable sampling frequency data acquisition device according to claim 3, wherein the control module is connected with an external computer through an I/O interface.
5. The data acquisition device with the adaptively adjustable sampling frequency as claimed in claim 3, wherein the control module is connected with a wireless communication module.
CN201911387276.9A 2019-12-26 2019-12-26 Data acquisition method and device with adaptive and adjustable sampling frequency Expired - Fee Related CN111147079B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911387276.9A CN111147079B (en) 2019-12-26 2019-12-26 Data acquisition method and device with adaptive and adjustable sampling frequency

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911387276.9A CN111147079B (en) 2019-12-26 2019-12-26 Data acquisition method and device with adaptive and adjustable sampling frequency

Publications (2)

Publication Number Publication Date
CN111147079A CN111147079A (en) 2020-05-12
CN111147079B true CN111147079B (en) 2023-04-07

Family

ID=70521411

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911387276.9A Expired - Fee Related CN111147079B (en) 2019-12-26 2019-12-26 Data acquisition method and device with adaptive and adjustable sampling frequency

Country Status (1)

Country Link
CN (1) CN111147079B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112460742B (en) * 2020-11-19 2021-11-23 珠海格力电器股份有限公司 Control method and device of sensor, storage medium and processor
CN115265629A (en) * 2021-04-30 2022-11-01 深圳市谷粒科技有限公司 Dynamic sampling method and device of analog sensor
CN113686413B (en) * 2021-08-23 2023-10-03 国能宝日希勒能源有限公司 Water level monitoring device and arrangement method of water level monitoring system in dumping site in strip mine
CN113867142A (en) * 2021-09-09 2021-12-31 北京小米移动软件有限公司 Sensor control method, sensor control device, electronic device and storage medium
CN113915799A (en) * 2021-09-16 2022-01-11 国网浙江省电力有限公司湖州供电公司 Energy consumption evaluation and calculation method for ground source heat pump system
CN115251957A (en) * 2022-09-26 2022-11-01 深圳市心流科技有限公司 Method, device and storage medium for adjusting sampling frequency step by step
CN115777632A (en) * 2022-10-08 2023-03-14 浙江省农业科学院 A method for optimizing silkworm hybrid combination
CN117909660A (en) * 2022-10-19 2024-04-19 华为技术有限公司 Data processing method, device, system and readable storage medium
CN117644639A (en) * 2024-01-18 2024-03-05 南通市扬子橡塑有限公司 Rubber tube extrusion system, method and equipment with monitoring function
CN118018439B (en) * 2024-04-10 2024-06-18 山东益来环保科技有限公司 Data management system for monitoring system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2034281A1 (en) * 2007-09-07 2009-03-11 Berkin B.V. Coriolis type flow measuring system with analog to digital converters having an adjustable sampling frequency
CN101655519A (en) * 2009-09-14 2010-02-24 国电南京自动化股份有限公司 Data processing method for alternating current sampling of digital transformer station measurement and control device
CN104391464A (en) * 2014-11-06 2015-03-04 电子科技大学 FPGA-based hardware equivalent synchronous sampling device
CN106500829A (en) * 2016-09-30 2017-03-15 广州机智云物联网科技有限公司 A kind of adaptively sampled frequency tracking method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2034281A1 (en) * 2007-09-07 2009-03-11 Berkin B.V. Coriolis type flow measuring system with analog to digital converters having an adjustable sampling frequency
CN101655519A (en) * 2009-09-14 2010-02-24 国电南京自动化股份有限公司 Data processing method for alternating current sampling of digital transformer station measurement and control device
CN104391464A (en) * 2014-11-06 2015-03-04 电子科技大学 FPGA-based hardware equivalent synchronous sampling device
CN106500829A (en) * 2016-09-30 2017-03-15 广州机智云物联网科技有限公司 A kind of adaptively sampled frequency tracking method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于变周期技术的自适应数据采集算法;牛保超等;《单片机与嵌入式系统应用》;20130101(第01期);全文 *
电力系统采样频率自适应预测算法;朱安福等;《渭南师范学院学报》;20050315(第02期);全文 *

Also Published As

Publication number Publication date
CN111147079A (en) 2020-05-12

Similar Documents

Publication Publication Date Title
CN111147079B (en) Data acquisition method and device with adaptive and adjustable sampling frequency
CN111769819B (en) Sampling frequency self-adaptive adjustable data acquisition method and system
CN103495263B (en) A kind of sensor acquisition processing system of Implanted cardiac pacemaker and the control method based on this system
CN114046873B (en) Reactor vibration monitoring system based on LOF-FCM fuzzy clustering algorithm
CN111159063B (en) A Cache Allocation Method for Multilayer Sketch Network Measurement
CN115773793B (en) Dynamic regulation method for signal amplitude of ultrasonic water meter
CN117387172B (en) Terminal air conditioner energy saving method and system based on accurate recommended equipment control parameters
CN110702972B (en) Adaptive sampling method and device for analog signals
CN105004798B (en) A kind of signal intelligent amplifying device and method for foundation pile ultrasonic detecting equipment
CN101354311A (en) Automobile Rear Axle Life Prediction System
CN117434153A (en) Road nondestructive testing method and system based on ultrasonic technology
CN106618499B (en) Fall detection equipment, fall detection method and device
CN114692723A (en) Reverse osmosis membrane fouling and blocking early warning method and system
CN110716534B (en) An Oscillation Detection Method for Industrial Processes Based on Self-tuning Variational Mode Decomposition
CN112414483A (en) Self-adaptive method for acquiring metering signals of ultrasonic water meter
CN118740114A (en) A current digital filtering method for electric power equipment
CN117310455B (en) Oral cavity scanner circuit board fault detection method based on electric signals
CN114034375A (en) A system and method for measuring noise of ultra-high voltage transmission lines
CN117310118B (en) A visual monitoring method for groundwater pollution
CN116576553B (en) Data optimization acquisition method and system for air conditioner
CN118014940A (en) Fan blade damage area positioning method in strong noise environment, electronic equipment and storage medium
CN108805011B (en) Digital filtering method and system
CN113049106B (en) A digital intelligent color sensor system
CN112073035A (en) Self-adaptive filtering method for PSD (phase-sensitive Detector) signals
CN112491486A (en) Interference detection system of wireless communication equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20230407

CF01 Termination of patent right due to non-payment of annual fee