CN102628697A - Method for dynamic memory of physical quantity and system thereof - Google Patents
Method for dynamic memory of physical quantity and system thereof Download PDFInfo
- Publication number
- CN102628697A CN102628697A CN2011100672236A CN201110067223A CN102628697A CN 102628697 A CN102628697 A CN 102628697A CN 2011100672236 A CN2011100672236 A CN 2011100672236A CN 201110067223 A CN201110067223 A CN 201110067223A CN 102628697 A CN102628697 A CN 102628697A
- Authority
- CN
- China
- Prior art keywords
- physical quantity
- circuit
- output
- indirect
- memory
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 19
- 238000006243 chemical reaction Methods 0.000 claims abstract description 18
- 238000001514 detection method Methods 0.000 claims abstract description 15
- 238000005259 measurement Methods 0.000 claims abstract description 7
- 238000001914 filtration Methods 0.000 claims description 4
- 230000003139 buffering effect Effects 0.000 claims description 3
- 230000006870 function Effects 0.000 claims description 3
- 230000003446 memory effect Effects 0.000 claims 1
- 230000002238 attenuated effect Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000003321 amplification Effects 0.000 description 1
- 230000001143 conditioned effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000003199 nucleic acid amplification method Methods 0.000 description 1
Images
Landscapes
- Analogue/Digital Conversion (AREA)
Abstract
一种物理量动态记忆方法及系统,其方法为:在测控系统中检测某一物理量时,可通过检测反映该物理量的间接物理量,然后将检测得到的间接物理量转换为被测物理量,以此实现物理量的检测;将获得的被测物理量大小转换成电压信号在记忆电路中存储起来,其大小按照被测物理量的大小和变化规律实时变化,以此实现动态记忆;其系统中的信号采集电路通过传感器采集间接物理量;单片机对间接物理量进行A/D转换,以PWM波形式输出;LPF电路对PWM波进行平滑滤波;记忆电路依据LPF电路的输出电压进行物理量动态记忆;输出电路用于对记忆电路的输出信号进行缓冲输出;复位电路对记忆电路进行复位操作;转换算法将间接物理量转换成被测物理量,然后再转换为PWM波输出。
A physical quantity dynamic memory method and system, the method is: when detecting a certain physical quantity in a measurement and control system, the indirect physical quantity reflecting the physical quantity can be detected, and then the detected indirect physical quantity can be converted into a measured physical quantity, so as to realize the physical quantity The detection of the measured physical quantity is converted into a voltage signal and stored in the memory circuit, and its size changes in real time according to the size and change law of the measured physical quantity, so as to realize dynamic memory; the signal acquisition circuit in the system passes through the sensor Acquisition of indirect physical quantities; A/D conversion of the indirect physical quantities by the single-chip microcomputer, and output in the form of PWM waves; LPF circuit smoothes and filters the PWM waves; the memory circuit performs dynamic memory of physical quantities according to the output voltage of the LPF circuit; the output circuit is used for memory circuits. The output signal is buffered and output; the reset circuit resets the memory circuit; the conversion algorithm converts the indirect physical quantity into the measured physical quantity, and then converts it into a PWM wave output.
Description
技术领域 technical field
本发明涉及测控系统中对物理量的检测及动态记忆。The invention relates to the detection and dynamic memory of physical quantities in a measurement and control system.
背景技术 Background technique
在一些测控系统中进行物理量检测时,有时要遇到这样一种情况:由于某些物理量无法直接进行检测,需要通过检测特定的一些间接物理量,然后由测得的间接物理量通过一定的转换实现对被测物理量的检测,并且在这些间接的物理量因故消失,或者间接的物理量消失的同时检测装置也因故断电的情况下,要求检测装置能及时的对间接物理量消失前对应的被测物理量的状态进行记忆,由于这些物理量往往是按照一定的规律进行衰减的,因此要求记忆量也要按照同样的规律衰减,即进行动态记忆。比如在电机的数字控制系统中,热容量是一个重要的控制依据,而热容量无法直接检测,需要通过对电流进行检测进而获得热容量值,而且当电机断电后,或者电机和检测电路同时断电时能对热容量值进行动态记忆(电机断电后热容量是随着时间动态衰减的),以便在下次电机和检测电路上电时控制器能够依据断电前的热容量值对电机进行合理控制。When performing physical quantity detection in some measurement and control systems, sometimes we encounter such a situation: because some physical quantities cannot be directly detected, it is necessary to detect some specific indirect physical quantities, and then the measured indirect physical quantities are realized through certain conversions. The detection of the measured physical quantity, and when these indirect physical quantities disappear for some reason, or the detection device is also powered off for some reason when the indirect physical quantity disappears, it is required that the detection device can promptly detect the corresponding measured physical quantity before the indirect physical quantity disappears. Since these physical quantities are often attenuated according to a certain law, it is required that the amount of memory should also be attenuated according to the same law, that is, dynamic memory. For example, in the digital control system of the motor, the thermal capacity is an important control basis, but the thermal capacity cannot be directly detected, and the thermal capacity value needs to be obtained by detecting the current, and when the motor is powered off, or the motor and the detection circuit are powered off at the same time The heat capacity value can be dynamically memorized (the heat capacity of the motor decays dynamically with time after power-off), so that the controller can control the motor reasonably according to the heat capacity value before power-off when the motor and detection circuit are powered on next time.
发明内容 Contents of the invention
本发明的目的是提供一种物理量动态记忆方法及系统。The object of the present invention is to provide a physical quantity dynamic memory method and system.
本发明是一种物理量动态记忆方法及系统,其方法包括:The present invention is a physical quantity dynamic memory method and system, the method comprising:
(1)在测控系统中检测某一物理量时,如果该物理量无法直接获得,可通过检测反映该物理量的间接物理量,然后将检测得到的间接物理量转换为被测物理量,以此实现物理量的检测;(1) When detecting a certain physical quantity in the measurement and control system, if the physical quantity cannot be obtained directly, the detection of the physical quantity can be realized by detecting the indirect physical quantity reflecting the physical quantity, and then converting the detected indirect physical quantity into the measured physical quantity;
(2)将获得的被测物理量大小转换成电压信号在记忆电路中存储起来,该电压信号的大小按照被测物理量的大小和变化规律实时变化,以此实现无法直接获得的物理量的动态记忆。(2) Convert the obtained measured physical quantity into a voltage signal and store it in the memory circuit. The voltage signal changes in real time according to the measured physical quantity and its changing law, so as to realize the dynamic memory of the physical quantity that cannot be directly obtained.
实现以上所述物理量动态记忆方法的系统,该系统由用于信号采集的信号采集电路1、用于进行算法实现和控制的单片机2、用于对单片机2输出的PWM波进行低通滤波的LPF电路3、用于实现物理量动态记忆的记忆电路4、用于对输出信号进行缓冲的输出电路5、用于对记忆电路4进行复位控制的复位电路6、用于将物理量转换成PWM波的转换算法7组成。其中信号采集电路1通过传感器采集间接物理量,并对采集到的间接物理量信号进行调理;单片机2(内含A/D转换器)用于对采集到的间接物理量进行A/D转换,得到间接物理量的数字信号,据此通过相关算法将间接物理量转换为需要记忆的被测物理量,并将其以PWM波形式输出;单片机2的另外一个作用是对记忆电路进行复位控制;LPF电路3对单片机2输出的PWM波进行平滑滤波;记忆电路4依据LPF电路3的输出电压进行物理量动态记忆;输出电路5用于对记忆电路4的输出信号进行缓冲输出;复位电路6用于在单片机控制下,对记忆电路4进行复位操作,以获得确定的记忆电路初始状态;转换算法7用于将间接物理量转换成被测物理量,然后再转换为PWM波输出。Realize the system of above-mentioned physical quantity dynamic memory method, this system is used for the signal acquisition circuit 1 of signal acquisition, is used for carrying out the single-
本发明实现的系统中,输出信号即为需要记忆的被测物理量,以电压形式输出,其大小取决于输入到单片机2内含的A/D转换器2-1中的间接物理量,被测物理量的大小实时的跟随间接物理量的大小变化,则输出电路的输出电压也实时的随间接物理量的变化而变化。当间接的物理量因故消失时,或者间接物理量与检测电路的电源同时消失时,本发明提供的方法和实现的系统中的记忆电路4能够将间接物理量消失前那一刻对应的被测物理量的大小记忆下来,以电压形式输出。如果这时记忆下来的被测物理量是动态变化的(比如按照一定规律随时间衰减),本发明中提供的记忆电路能够使其输出电压也按照被测物理量的大小和变化规律实时动态变化,以此实现物理量动态记忆。In the system realized by the present invention, the output signal is the measured physical quantity that needs to be memorized, and is output in the form of voltage, and its size depends on the indirect physical quantity input to the A/D converter 2-1 contained in the single-
附图说明 Description of drawings
图1是本发明整体结构示意图,图2为单片机实现PWM波的过程示意图。Fig. 1 is a schematic diagram of the overall structure of the present invention, and Fig. 2 is a schematic diagram of the process of realizing PWM waves by a single-chip microcomputer.
具体实施方式 Detailed ways
本发明是一种物理量动态记忆方法及系统,其方法包括:The present invention is a physical quantity dynamic memory method and system, the method comprising:
(1)在测控系统中检测某一物理量时,如果该物理量无法直接获得,可通过检测反映该物理量的间接物理量,然后将检测得到的间接物理量转换为被测物理量,以此实现物理量的检测;(1) When detecting a certain physical quantity in the measurement and control system, if the physical quantity cannot be obtained directly, the detection of the physical quantity can be realized by detecting the indirect physical quantity reflecting the physical quantity, and then converting the detected indirect physical quantity into the measured physical quantity;
(2)将获得的被测物理量大小转换成电压信号在记忆电路中存储起来,该电压信号的大小按照被测物理量的大小和变化规律实时变化,以此实现无法直接获得的物理量的动态记忆。(2) Convert the obtained measured physical quantity into a voltage signal and store it in the memory circuit. The voltage signal changes in real time according to the measured physical quantity and its changing law, so as to realize the dynamic memory of the physical quantity that cannot be directly obtained.
如图1所示,实现以上所述物理量动态记忆方法的系统,该系统由用于信号采集的信号采集电路1、用于进行算法实现和控制的单片机2、用于对单片机2输出的PWM波进行低通滤波的LPF电路3、用于实现物理量动态记忆的记忆电路4、用于对输出信号进行缓冲的输出电路5、用于对记忆电路4进行复位控制的复位电路6、用于将物理量转换成PWM波的转换算法7组成。其中信号采集电路1通过传感器采集间接物理量,并对采集到的间接物理量信号进行调理;单片机2(内含A/D转换器)用于对采集到的间接物理量进行A/D转换,得到间接物理量的数字信号,据此通过相关算法将间接物理量转换为需要记忆的被测物理量,并将其以PWM波形式输出;单片机2的另外一个作用是对记忆电路进行复位控制;LPF电路3对单片机2输出的PWM波进行平滑滤波;记忆电路4依据LPF电路3的输出电压进行物理量动态记忆;输出电路5用于对记忆电路4的输出信号进行缓冲输出;复位电路6用于在单片机控制下,对记忆电路4进行复位操作,以获得确定的记忆电路初始状态;转换算法7用于将间接物理量转换成被测物理量,然后再转换为PWM波输出。As shown in Figure 1, realize the system of above-mentioned physical quantity dynamic memory method, this system is used for the signal acquisition circuit 1 of signal acquisition, is used for carrying out the single-
整个系统的工作原理如下:The whole system works as follows:
在信号采集电路中通过传感器采集间接物理量,并对采集到的信号进行调理,包括放大和滤波;利用单片机中内含的A/D转换器将采集到的信号进行模/数转换,获得间接物理量的数字信号,并对转换结果进行数字滤波,以提高数据准确性,然后在单片机中通过一定的转换关系由间接物理量获得被测物理量,并且通过转换算法将获得的被测物理量转换成PWM波输出,用PWM波的占空比反映被测物理量的大小;输出的PWM波经过低通滤波器滤波后控制记忆电路,通过记忆电路的电压变化将被测物理量在记忆电路中进行动态记忆,而记忆电路的输出是随时间动态变化的,以此模拟被测物理量的实时变化情况。In the signal acquisition circuit, the indirect physical quantity is collected through the sensor, and the collected signal is conditioned, including amplification and filtering; the A/D converter included in the single-chip microcomputer is used to perform analog/digital conversion on the collected signal to obtain the indirect physical quantity The digital signal of the conversion result is digitally filtered to improve the accuracy of the data, and then the measured physical quantity is obtained from the indirect physical quantity through a certain conversion relationship in the single-chip microcomputer, and the measured physical quantity obtained is converted into a PWM wave output through the conversion algorithm , using the duty cycle of the PWM wave to reflect the size of the measured physical quantity; the output PWM wave is filtered by a low-pass filter to control the memory circuit, and the measured physical quantity is dynamically memorized in the memory circuit through the voltage change of the memory circuit, and the memory The output of the circuit changes dynamically with time, so as to simulate the real-time changes of the measured physical quantity.
将间接物理量转换成被测物理量,并且将其转换成PWM波输出的转换算法7由以下几个步骤实现:第一步,确定被测物理量与间接物理量之间的关系,将间接物理量转换为被测物理量(被测物理量与间接物理量之间的具体关系因实际系统的不同而不同);第二步,根据实际系统的具体情况,确定被测物理量的变化范围,将其最大值记为1,其对应的PWM波占空比为100%;第三步,用测量获得的某一时刻的被测物理量除以被测物理量最大值,将其结果(其大小介于0-1之间)作为PWM波占空比,则其占空比为0-100%之间的某一个值;第四步,以此占空比输出PWM波。以上算法通过程序在单片机中实现。The
记忆电路通过单片机控制的复位电路进行复位,以此获得电压为零的记忆电路初始状态。在正常检测状态下,通过单片机用PWM波定期对记忆电路进行刷新操作,使记忆电路的存储电压随PWM波的占空比动态变化,以此表征被测物理量的实时变化,而刷新频率则根据被测信号的特征和要求由单片机进行控制,一般要至少保证刷新频率不小于被测信号上限截止频率的2倍。由于某种原因使间接的物理量消失,或者间接物理量与检测电路电源同时消失时,记忆电路中存储元件能够将间接物理量消失前那一刻对应的被测物理量的大小以记忆元件上电压的形式记忆下来,并且记忆元件上的电压能够按照被测物理量的大小和变化规律实时动态变化。The memory circuit is reset through the reset circuit controlled by the single chip microcomputer, so as to obtain the initial state of the memory circuit with zero voltage. In the normal detection state, the memory circuit is periodically refreshed by the single-chip microcomputer with the PWM wave, so that the storage voltage of the memory circuit changes dynamically with the duty cycle of the PWM wave, so as to represent the real-time change of the measured physical quantity, and the refresh frequency is based on The characteristics and requirements of the signal under test are controlled by the single-chip microcomputer. Generally, at least the refresh frequency must be guaranteed not to be less than twice the upper limit cut-off frequency of the signal under test. When the indirect physical quantity disappears due to some reason, or the indirect physical quantity and the power supply of the detection circuit disappear at the same time, the storage element in the memory circuit can memorize the measured physical quantity corresponding to the moment before the indirect physical quantity disappears in the form of voltage on the memory element. , and the voltage on the memory element can dynamically change in real time according to the size and change law of the measured physical quantity.
在本发明提供的方法中,间接物理量可根据具体应用场合进行选择;通过合理设计记忆电路的电路结构,恰当选择电路参数,可使电路的记忆特性与不同的被测物理量变化规律一致,从而满足被测物理量的动态记忆的要求。在选择单片机时,要选择具有A/D转换器的单片机,并且其A/D转换器要有足够的分辨率,同时为方便编程,单片机要内含PWM模块。In the method provided by the present invention, the indirect physical quantity can be selected according to the specific application occasion; by rationally designing the circuit structure of the memory circuit and properly selecting the circuit parameters, the memory characteristics of the circuit can be consistent with the changing laws of different measured physical quantities, thereby satisfying The requirement of the dynamic memory of the measured physical quantity. When choosing a single-chip microcomputer, it is necessary to choose a single-chip microcomputer with an A/D converter, and its A/D converter must have sufficient resolution. At the same time, for the convenience of programming, the single-chip microcomputer must contain a PWM module.
将本发明提供的方法应用于某物理量的动态记忆,误差最大不超过10%,获得了满意的效果,满足工程要求。如果提高电路参数的精度,同时优化控制算法,能够进一步减小记忆误差。When the method provided by the invention is applied to the dynamic memory of a certain physical quantity, the maximum error is not more than 10%, a satisfactory effect is obtained, and the engineering requirement is met. If the accuracy of the circuit parameters is improved and the control algorithm is optimized at the same time, the memory error can be further reduced.
Claims (4)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011100672236A CN102628697A (en) | 2011-03-17 | 2011-03-17 | Method for dynamic memory of physical quantity and system thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011100672236A CN102628697A (en) | 2011-03-17 | 2011-03-17 | Method for dynamic memory of physical quantity and system thereof |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102628697A true CN102628697A (en) | 2012-08-08 |
Family
ID=46586999
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2011100672236A Pending CN102628697A (en) | 2011-03-17 | 2011-03-17 | Method for dynamic memory of physical quantity and system thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102628697A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN2047612U (en) * | 1988-03-15 | 1989-11-15 | 中国人民解放军81869部队 | Electroic self-control wire butt welding |
US20020067255A1 (en) * | 2000-06-28 | 2002-06-06 | Yukihiko Tanizawa | Physical-quantity detection sensor |
CN1588097A (en) * | 2004-09-24 | 2005-03-02 | 西安交通大学 | Intelligent pulse current multiple parameter digital measurer based on non-linear resistance sheet |
CN1602052A (en) * | 2004-06-09 | 2005-03-30 | 威盛电子股份有限公司 | Operation method of image sensing unit and image sensing device using same |
CN101354268A (en) * | 2008-09-18 | 2009-01-28 | 浙江中控自动化仪表有限公司 | Intelligent transmitter and safety device based on monostable circuit |
CN201465278U (en) * | 2009-08-26 | 2010-05-12 | 长沙同盛电子科技有限公司 | Remote wireless monitoring system |
-
2011
- 2011-03-17 CN CN2011100672236A patent/CN102628697A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN2047612U (en) * | 1988-03-15 | 1989-11-15 | 中国人民解放军81869部队 | Electroic self-control wire butt welding |
US20020067255A1 (en) * | 2000-06-28 | 2002-06-06 | Yukihiko Tanizawa | Physical-quantity detection sensor |
CN1602052A (en) * | 2004-06-09 | 2005-03-30 | 威盛电子股份有限公司 | Operation method of image sensing unit and image sensing device using same |
CN1588097A (en) * | 2004-09-24 | 2005-03-02 | 西安交通大学 | Intelligent pulse current multiple parameter digital measurer based on non-linear resistance sheet |
CN101354268A (en) * | 2008-09-18 | 2009-01-28 | 浙江中控自动化仪表有限公司 | Intelligent transmitter and safety device based on monostable circuit |
CN201465278U (en) * | 2009-08-26 | 2010-05-12 | 长沙同盛电子科技有限公司 | Remote wireless monitoring system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3087362B1 (en) | Digital temperature sensor with integrated timer and burst mode | |
WO2008102005A3 (en) | Device for determining a charge amount of a capacitive element, pixel cell and method for determining a position of maximum of an envelope of an analog amplitude-modulated signal | |
JP5523588B2 (en) | Analog input unit and programmable controller | |
CN202522915U (en) | Data acquisition system based on vibration wire type sensor | |
CN101939708A (en) | Minimal dead time digitally compensated process transmitter | |
CN103698594A (en) | A current detection circuit and method with adjustable detection range | |
CN105388356A (en) | Current measurement device | |
CN103616845A (en) | PID controller, parameter self-tuning extension module and implementation method thereof | |
CN103364629B (en) | A kind of electronic device energy consumption measuring method and system | |
CN103398775A (en) | Light signal acquisition system based on photodiode | |
CN106982043A (en) | For the method for the operation for controlling moving average filter | |
US10317355B2 (en) | Environmental sensor and method for measuring and predicting environmental parameters | |
US20240133956A1 (en) | Battery current monitoring method, controller and circuit | |
CN108697327A (en) | A kind of physiologic information monitoring method, device, equipment and intelligence pad | |
CN105814418A (en) | Digital temperature sensor with integrated digital temperature filter | |
CN102628697A (en) | Method for dynamic memory of physical quantity and system thereof | |
CN103780074A (en) | Signal peak detector and method, and control IC and control method of PFC converter | |
TW201908744A (en) | Method and sensor system for processing continuous sensor signals | |
CN204008908U (en) | Semiconductor laser detection device, system | |
CN103837170B (en) | Frequency output type sensor automatic frequency compensation circuit and method | |
CN114201026B (en) | Voltage control method and device, storage medium and electronic equipment | |
CN203561476U (en) | Electric pressure cooker and pressure detection device thereof | |
CN208270143U (en) | A kind of torque wrench device | |
CN112014646B (en) | Capacitance detection method, device and system of supercapacitor | |
CN110398519B (en) | Three-array NOx sensor measuring circuit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20120808 |