CN111446937B - Dynamic gain AGC adjusting method - Google Patents
Dynamic gain AGC adjusting method Download PDFInfo
- Publication number
- CN111446937B CN111446937B CN202010197883.5A CN202010197883A CN111446937B CN 111446937 B CN111446937 B CN 111446937B CN 202010197883 A CN202010197883 A CN 202010197883A CN 111446937 B CN111446937 B CN 111446937B
- Authority
- CN
- China
- Prior art keywords
- adjust
- value
- peak
- peak value
- ultrasonic signal
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 12
- 230000001105 regulatory effect Effects 0.000 claims description 3
- 238000005259 measurement Methods 0.000 abstract description 4
- 239000007789 gas Substances 0.000 description 11
- 230000003321 amplification Effects 0.000 description 5
- 238000003199 nucleic acid amplification method Methods 0.000 description 5
- VNWKTOKETHGBQD-UHFFFAOYSA-N methane Chemical compound C VNWKTOKETHGBQD-UHFFFAOYSA-N 0.000 description 4
- 239000003345 natural gas Substances 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000002950 deficient Effects 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03G—CONTROL OF AMPLIFICATION
- H03G3/00—Gain control in amplifiers or frequency changers
- H03G3/20—Automatic control
Landscapes
- Measuring Volume Flow (AREA)
Abstract
The invention provides a dynamic gain AGC adjusting method. Firstly, calculating an adjustable resistance gear value according to the acquired ultrasonic signal peak value and flight time, then assigning a value to the currently calculated adjustable resistance gear value, thereby adjusting the ultrasonic signal peak value, acquiring the ultrasonic signal peak value and the flight time again, judging whether the ultrasonic signal amplitude is adjusted to a range defined by a system, and if not, continuing to calculate the adjustable resistance gear value; if so, the ultrasonic signal and time of flight are used for time value acquisition. The method effectively solves the problem of inaccurate ultrasonic measurement caused by continuous change of the intensity of ultrasonic signals due to continuous change of the gas medium, pressure, temperature, gas flow rate in the pipe section and the like in the pipeline.
Description
Technical Field
The invention relates to ultrasonic gas meter signal acquisition, in particular to a dynamic gain AGC adjusting method.
Background
With the increasing importance of the national environmental protection in recent years, the application of clean energy is becoming popular, and the popularization rate of natural gas is also greatly improved. On one hand, the domestic natural gas resources are relatively deficient, the precision requirement of gas companies on the meter is correspondingly improved, on the other hand, the gas use safety consciousness of vast residents is stronger, and the demands on the meter with high precision and safety are stronger in society. Under the background of the requirements, a meter with high precision and gas safety has come into the field of view of the public.
Because different gas media, different pressures, different temperatures, different gas flow rates in the pipe section and the like can influence the intensity of the ultrasonic signals, how to effectively obtain stable ultrasonic signals to realize stable metering becomes a great difficulty of the ultrasonic technology applied to the gas meter industry.
Because the ultrasonic signal has larger signal attenuation in the gas and smaller signal and can not be directly used, the ultrasonic signal can be used after being amplified by an amplifying circuit before being used for timing, the amplification factor of a common amplifying circuit is fixed gain, and a digital potentiometer is used as an adjustable resistor in the amplifying circuit, so that the resistor for determining the amplification factor in the amplifying circuit is linearly adjustable, and the amplification factor is adjustable.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a dynamic gain AGC adjusting method.
The method can realize the dynamic gain adjustment of the system on the amplification factor of the ultrasonic signal until the ultrasonic signal is adjusted to the range specified by the system, and realize the automatic adjustment of the amplification factor by automatically adjusting the gear value of the digital potentiometer.
A dynamic gain AGC adjusting method comprises the following specific steps:
Step (1), first initializing a definition Adjust_a、Adjust_b、Adjust_err、Standard_Peak、Peak、MaxPeak、MinPeak、Adjust_stage0、Adjust_stage1、Adjust_differvalue;, wherein Adjust_err is the difference between a Standard Peak value Standard_Peak and an acquired ultrasonic maximum Peak value Peak, standard_Peak is a Standard Peak value, maxPeak is the upper limit value of a Peak regulation range, minPeak is the lower limit value of the Peak regulation range, peak is the acquired ultrasonic signal maximum Peak value, adjust_stag0 is the current adjustable resistance gear value, adjust_stag1 is the adjustable resistance gear value calculated according to the acquired signal Peak value and the Standard Peak value difference, and Adjust_ differvalue is the intermediate difference value.
Step (2), obtaining the maximum Peak value Peak of the ultrasonic signal through signal acquisition, and calculating an intermediate difference Adjust_ differvalue, wherein the formula is as follows;
Adjust_differvalue=Standard_Peak-Peak;
and (3) calculating an adjustable resistance gear value Adjust_stage1 according to the intermediate difference Adjust_ differvalue, wherein the formula is as follows:
And (4) assigning values to the Adjust_err and the Adjust_stage0 according to the calculated intermediate difference value and the adjustable resistance gear value, and acquiring the maximum peak value and the flight time of the ultrasonic signal after the non-fixed gain is changed, so as to judge whether the peak value meets the specified range.
Update assignment to Adjust_err is performed by Adjust_ differvalue:
Adjust_err=Adjust_differvalue;
the adjustable resistance gear value Adjust_stage1 obtained through calculation carries out assignment on the Adjust_stage0 to obtain the current adjustable resistance gear value:
Adjust_stage0=Adjust_stage1;
Step (5), when the maximum peak value of the collected ultrasonic signal is judged to be more than or equal to MinPeak and less than or equal to MaxPeak, calculating the instantaneous flow by adopting the flight time collected at the time; and when the maximum peak value of the collected ultrasonic signal is judged to be smaller than MinPeak or larger than MaxPeak, repeating the steps 2-4 until the maximum peak value of the regulated ultrasonic signal accords with the specified range of the peak value.
The invention has the following beneficial effects:
The traditional fixed gain cannot be adjusted or the signal amplitude cannot be adjusted to be suitable for ultrasonic measurement, so that the situation that the accuracy of ultrasonic measurement is affected is generated. The method effectively solves the problem of inaccurate ultrasonic measurement caused by continuous change of the intensity of ultrasonic signals due to continuous change of the gas medium, pressure, temperature, gas flow rate in the pipe section and the like in the pipeline.
Drawings
FIG. 1 is a flow chart of the method of the present invention.
Detailed Description
The present invention is further described below with reference to the accompanying drawings.
As shown in fig. 1, a dynamic gain AGC adjustment method specifically includes the following steps:
Step (1), first initializing a definition Adjust_a、Adjust_b、Adjust_err、Standard_Peak、Peak、MaxPeak、MinPeak、Adjust_stage0、Adjust_stage1、Adjust_differvalue;, wherein Adjust_err is the difference between a Standard Peak value Standard_Peak and an acquired ultrasonic maximum Peak value Peak, standard_Peak is a Standard Peak value, maxPeak is the upper limit value of a Peak regulation range, minPeak is the lower limit value of the Peak regulation range, peak is the acquired ultrasonic signal maximum Peak value, adjust_stag0 is the current adjustable resistance gear value, adjust_stag1 is the adjustable resistance gear value calculated according to the acquired signal Peak value and the Standard Peak value difference, and Adjust_ differvalue is the intermediate difference value.
Step (2), obtaining the maximum Peak value Peak of the ultrasonic signal through signal acquisition, and calculating an intermediate difference Adjust_ differvalue, wherein the formula is as follows;
Adjust_differvalue=Standard_Peak-Peak;
and (3) calculating an adjustable resistance gear value Adjust_stage1 according to the intermediate difference Adjust_ differvalue, wherein the formula is as follows:
Adjust_stage1=Adjust_stage0+Adjust_a×(Adjust_differvalue-Adjust_err)
+Adjust_b×Adjust_differvalue;
Step (4) the step is paired according to the calculated intermediate difference value and the adjustable resistance gear value
And assigning values to Adjust_err and Adjust_stage0, collecting the maximum peak value and the flight time of the ultrasonic signal after the non-fixed gain is changed, and judging whether the maximum peak value and the flight time meet the peak value specified range.
Update assignment to Adjust_err is performed by Adjust_ differvalue:
Adjust_err=Adjust_differvalue;
the adjustable resistance gear value Adjust_stage1 obtained through calculation carries out assignment on the Adjust_stage0 to obtain the current adjustable resistance gear value:
Adjust_stage0=Adjust_stage1;
Step (5), when the maximum peak value of the collected ultrasonic signal is judged to be more than or equal to MinPeak and less than or equal to MaxPeak, calculating the instantaneous flow by adopting the flight time collected at the time; and when the maximum peak value of the collected ultrasonic signal is judged to be smaller than MinPeak or larger than MaxPeak, repeating the steps 2-4 until the maximum peak value of the regulated ultrasonic signal accords with the specified range of the peak value.
The working flow is as follows:
After the received signal passes through a certain gain (fixed gain and non-fixed gain, wherein the gain value can be changed by adjusting the gear value of the digital potentiometer), the maximum peak signal and the flight time value of the ultrasonic signal are obtained through acquisition. Judging the maximum peak value, if the maximum peak value accords with a given peak value range, judging that the flight time value obtained by the ultrasonic signal is effective, and using the time value to calculate the instantaneous flow of gas; if the maximum peak value does not accord with the given peak value range, judging that the flight time value obtained by the ultrasonic signal is invalid, simultaneously changing the gear value of the digital potentiometer through calculation, thereby changing the maximum peak value of the ultrasonic signal, then continuously collecting the peak value and the flight time value, and collecting and judging the maximum peak value of the ultrasonic signal until the maximum peak value accords with the given peak value range.
Claims (1)
1. A dynamic gain AGC adjusting method is characterized by comprising the following specific steps:
Step (1), initializing a definition Adjust_a、Adjust_b、Adjust_err、Standard_Peak、Peak、MaxPeak、MinPeak、Adjust_stage0、Adjust_stage1、Adjust_differvalue;, wherein Adjust_err is the difference between a Standard Peak value Standard_Peak and an acquired ultrasonic maximum Peak value Peak, standard_Peak is a Standard Peak value, maxPeak is the upper limit value of a Peak regulation range, minPeak is the lower limit value of the Peak regulation range, peak is the acquired ultrasonic signal maximum Peak value, adjust_stag0 is the current adjustable resistance gear value, adjust_stag1 is the adjustable resistance gear value calculated according to the acquired signal Peak value and the Standard Peak value difference, and Adjust_ differvalue is the intermediate difference value;
Step (2), obtaining the maximum Peak value Peak of the ultrasonic signal through signal acquisition, and calculating an intermediate difference Adjust_ differvalue, wherein the formula is as follows;
Adjust_differvalue=Standard_Peak-Peak;
and (3) calculating an adjustable resistance gear value Adjust_stage1 according to the intermediate difference Adjust_ differvalue, wherein the formula is as follows:
step (4), assigning values to the Adjust_err and the Adjust_stage0 according to the calculated intermediate difference value and the adjustable resistance gear value, acquiring the maximum peak value and the flight time of the ultrasonic signal after the non-fixed gain is changed, and judging whether the maximum peak value and the flight time meet the peak value specified range;
update assignment to Adjust_err is performed by Adjust_ differvalue:
Adjust_err=Adjust_differvalue;
the adjustable resistance gear value Adjust_stage1 obtained through calculation carries out assignment on the Adjust_stage0 to obtain the current adjustable resistance gear value:
Adjust_stage0=Adjust_stage1;
Step (5), when the maximum peak value of the collected ultrasonic signal is judged to be more than or equal to MinPeak and less than or equal to MaxPeak, calculating the instantaneous flow by adopting the flight time collected at the time; and when the maximum peak value of the collected ultrasonic signal is judged to be smaller than MinPeak or larger than MaxPeak, repeating the steps 2-4 until the maximum peak value of the regulated ultrasonic signal accords with the specified range of the peak value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010197883.5A CN111446937B (en) | 2020-03-19 | 2020-03-19 | Dynamic gain AGC adjusting method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010197883.5A CN111446937B (en) | 2020-03-19 | 2020-03-19 | Dynamic gain AGC adjusting method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111446937A CN111446937A (en) | 2020-07-24 |
CN111446937B true CN111446937B (en) | 2024-06-04 |
Family
ID=71653514
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010197883.5A Active CN111446937B (en) | 2020-03-19 | 2020-03-19 | Dynamic gain AGC adjusting method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111446937B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113721229B (en) * | 2021-11-03 | 2022-02-22 | 汇智机器人科技(深圳)有限公司 | Automatic gain calibration device, system and method for ultrasonic ranging |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101856285A (en) * | 2010-06-18 | 2010-10-13 | 上海理工大学 | Myoelectricity artificial hand control system having dynamic gains |
CN109632024A (en) * | 2018-12-17 | 2019-04-16 | 杭州晶锐仪器仪表有限公司 | A kind of Ultrasonic Controlling Method of combination amplitude and pulsewidth modulation |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3616324B2 (en) * | 2000-11-27 | 2005-02-02 | 東京計装株式会社 | Ultrasonic flow meter by propagation time difference method |
-
2020
- 2020-03-19 CN CN202010197883.5A patent/CN111446937B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101856285A (en) * | 2010-06-18 | 2010-10-13 | 上海理工大学 | Myoelectricity artificial hand control system having dynamic gains |
CN109632024A (en) * | 2018-12-17 | 2019-04-16 | 杭州晶锐仪器仪表有限公司 | A kind of Ultrasonic Controlling Method of combination amplitude and pulsewidth modulation |
Non-Patent Citations (1)
Title |
---|
基于气体超声波流量计的间歇激励和信号处理;田雷;徐科军;沈子文;李剑波;穆立彬;刘博;;电子测量与仪器学报;20171130(第11期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN111446937A (en) | 2020-07-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107727176B (en) | Ultrasonic gas flowmeter and flow measurement method thereof | |
CN111446937B (en) | Dynamic gain AGC adjusting method | |
CN109282862B (en) | Vibration-resistant type double vortex street sensor fluid measuring device and measuring method | |
CN107478282B (en) | Ultrasonic flow detection signal processing method and device and time difference method ultrasonic detection system | |
CN114001804B (en) | Calibration method and system of ultrasonic metering device based on time difference method | |
CN114397475A (en) | Water flow velocity measuring method suitable for ultrasonic water meter | |
CN105488772B (en) | Sensor signal peak value detection method | |
JPS56162029A (en) | Water leakage detecting method | |
CN106021855B (en) | A kind of reactor period calculates method | |
CN101858810B (en) | On-line measurement method for pressure drop ratio of adjusting valve | |
WO2003023328A1 (en) | Method for automatically adjusting measuring instrument and device using the same | |
CN208805238U (en) | A kind of double vortex street sensor fluid control devices of shock type | |
CN208805237U (en) | A kind of double vortex street sensor fluid measurement instruments of shock type | |
CN109060060B (en) | Gas metering method and device based on temperature compensation | |
CN115452669A (en) | Detection method and circuit of range-adjustable smoke detector | |
CN113606500B (en) | Method for monitoring burst leakage of gas courtyard pipe network in real time | |
CN203224624U (en) | Weather radar digital receiver dynamic range expansion device | |
CN106932467B (en) | Accurate vortex measuring method for gap area of heat transfer tube plate of steam generator | |
CN110542535B (en) | Normalization method for pulse wind tunnel multi-sensor negative pressure test system | |
CN110053601B (en) | Brake chamber pressure measuring device | |
JPS552919A (en) | Method of inspecting pressure loss in gas cock fitted with excess flow preventing valve | |
CN111600562A (en) | Control circuit with continuously adjustable amplification gain | |
CN217155484U (en) | High-precision conical flowmeter | |
JPS57203862A (en) | Controlling device for knocking | |
CN111597718B (en) | Ultrasonic flowmeter or gas meter flow channel design system and method thereof |
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 |