Gas electricity meter based on pressure difference and size paging calibration conversion
By adopting multi-sensors and signal processing modules in the gas-electric meter, combining the compensation algorithm of air pressure and pressure difference between the gas source and the temperature compensation algorithm, the problem of unstable measurement accuracy under the influence of environmental factors is solved, and high-precision and stable multi-dimensional measurement is achieved.
Patent Information
- Application Number
- CN202510205459.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2044-11-25
AI Technical Summary
Existing gasoline meters are susceptible to environmental factors, resulting in unstable measurement accuracy, insufficient sampling accuracy and sampling rate, and the pressure difference-dimensional conversion is linear, which cannot adapt to the nonlinear situation of the actual differential pressure and dimensional relationship.
The temperature and humidity, air pressure, and probe pressure difference signals are collected through multiple sensors, and the signal processing module is used to adjust and filter signals. The control module performs compensation algorithm for air pressure and pressure difference and temperature compensation algorithm for workpiece size based on the collected signals, and obtains a polynomial calibration function to calibrate the actual measured dimension data.
Nonlinear fitting of environmental factors is achieved, measurement accuracy and stability are improved, and is suitable for high-precision measurements under multiple sizes and multi-environmental conditions.
Smart Images

Figure CN119984111A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a testing device, in particular to a gas-electricity meter based on pressure difference and size paging calibration conversion. Background Art
[0002] With the introduction of Industry 4.0 and the continuous advancement of intelligent manufacturing, the processing and inspection of more and more parts are becoming more intelligent and digital; however, in traditional production management, there are still obvious deficiencies in quality supervision: first, most companies still use manual measurement and random inspection, which is time-consuming and labor-intensive, and difficult to ensure measurement accuracy, which can easily lead to quality problems; second, there is a lack of persistence in data storage management, and no analysis of quality data, making it difficult to discover production problems in a timely manner, which can easily cause a lot of property losses to the company.
[0003] At present, the manufacturing technology and products of measuring tools and instruments in my country generally rely more on introduction and imitation as well as cheap human and material resources. The competition for mid- and low-end products is fierce, while it is difficult to enter the high-end product market. Therefore, measuring tools and instruments with high measurement accuracy, easy use and low cost are the gaps that the domestic measurement industry urgently needs to fill.
[0004] As a new type of measuring tool, the gas-electricity meter uses gas as the measuring medium, converts the length signal into an airflow signal, which is further converted into an electrical signal through a gas-electricity converter, and then compared and measured. The principle of gas-electricity measurement is based on fluid dynamics and fluid statics, and is a way of measuring the structure and physical dimensions of the workpiece according to the pressure characteristics and flow characteristics of compressed air. Due to its characteristic of using gas as the measuring medium, the gas-electricity meter can measure more items than other measuring instruments, has a small human error, and the measuring head does not directly contact the measured surface, making it one of the main instruments for high-precision measurement.
[0005] The main problems of the gas-electricity meters currently in use are as follows: (1) They are easily affected by environmental factors such as unstable gas source pressure, temperature and humidity changes, etc., resulting in unstable workpiece size measurement accuracy; (2) The sampling accuracy and sampling rate are insufficient, resulting in too few data samples, affecting the size measurement accuracy; (3) The pressure difference-size conversion adopts a linear conversion method, which cannot be applied to the situation where the actual differential pressure and size relationship curve is nonlinear, resulting in measurement errors. Summary of the invention
[0006] In order to overcome the shortcomings of the prior art, the present invention provides a gas-electricity meter based on pressure difference and size paging calibration conversion, which uses a compensation algorithm for pressure difference based on gas source pressure and humidity, and a compensation algorithm for workpiece size based on temperature, and uses temperature, humidity, air pressure and the like as environmental variables for nonlinear fitting to obtain a polynomial calibration function to calibrate the actual measured size data, thereby realizing multi-channel, high-speed, and high-precision multi-size measurement.
[0007] In order to achieve the above object, the present invention provides a gas and electricity meter based on pressure difference and size paging calibration conversion, which includes:
[0008] The acquisition module includes multiple sensors, which collect temperature and humidity of the workpiece, air source pressure and probe pressure difference signals through multiple acquisition channels;
[0009] The signal processing module adjusts and filters the collected signals and outputs them to the control module after signal conversion;
[0010] The control module calibrates the pressure difference signal based on the collected signal through the air source pressure and pressure difference compensation algorithm; based on the compensated pressure difference signal, the pressure difference signal is converted into the corresponding workpiece size through the pressure difference size paging conversion algorithm; based on the converted size data, the size data at different temperatures are calibrated using the temperature and size compensation algorithm to complete the real-time size measurement of the workpiece;
[0011] Based on the verified and converted dimension data, the statistics of the configured workpiece are calculated according to the multiple acquisition channel data configured by the user and the type of measured workpiece; based on the statistics of the workpiece, the real-time dimensions of each channel are alarmed and pre-warning judged, and the real-time dimensions, statistics and pre-warning alarm information corresponding to each channel are displayed.
[0012] Preferably, the step of collecting the pressure difference by the collection module includes:
[0013] The real-time differential pressure data is acquired through the multi-channel differential pressure acquisition process. If the number of acquired data reaches the set number of acquisitions, the multi-channel data extraction and single-cycle data processing process is executed to extract and process the data;
[0014] After a single data acquisition is completed, a pressure difference data in the FIFO operation structure is taken out for judgment. If the pressure difference is greater than the preset trigger range value, the workpiece is not currently placed or the workpiece is not placed as required, then the variable of the number of times the pressure difference exceeds the threshold is incremented by 1, and the pressure difference data judgment is performed again at the beginning of the next round of measurement refresh cycle;
[0015] If the pressure difference is within the trigger range, the variable of the number of times the pressure difference exceeds the threshold is cleared; if the number of times the pressure difference exceeds the threshold is greater than the set value, an alarm is issued and the real-time measurement ends, and the measurement starts after the user places the workpiece in the specified position.
[0016] Preferably, during the workpiece measurement process, the steps of the multi-channel data extraction and single-cycle data processing flow are specifically as follows:
[0017] Extraction steps:
[0018] Extract all unextracted data in the FIFO operation structure array within the corresponding cycle. The pressure difference storage array in the FIFO operation structure is stored in FIFO form, that is, the data stored first will be kicked out of the array first after the array is full.
[0019] Calculate the standard deviation of the extracted data. The standard deviation calculation formula is:
[0020]
[0021] Among them, N is the number of data, x i is the data at the corresponding position in the array, is the average value of all data in the array; according to the normal distribution characteristics of the data, 3σ is used to eliminate abnormal points and all data outside the range of x±3σ are eliminated;
[0022] The eliminated data are averaged, the average is stored in the pressure difference measurement storage array, and the number of storages is recorded;
[0023] Data processing steps:
[0024] The data processed in a single cycle is stored in the pressure difference measurement storage array. When the data in the array reaches the number of pressure difference real-time data processing, the data in the corresponding array is processed;
[0025] The Gaussian filtering method is used to process the data and then the average is calculated to obtain the real-time pressure difference at the current moment;
[0026] The current sampling and data processing are completed, all variables of the current sampling are cleared, and the next round of data sampling and processing begins again.
[0027] Preferably, the steps of the gas source pressure and pressure difference compensation algorithm include:
[0028] Calculate the air source pressure and pressure difference compensation value: Use the air source pressure and humidity as parameters for pressure difference compensation. The relationship between the air source pressure, humidity and pressure difference is:
[0029] △DP=f(Gsp,H)
[0030] Among them, Gsp is the air source pressure, △DP is the pressure difference compensation value, H is the current humidity, Gsp and △DP are in a polynomial relationship, H and △DP-Gsp curve are in an interval relationship, and f is the polynomial function of the air source pressure Gsp and the pressure difference compensation value △DP in the specified temperature interval;
[0031] Determine the current humidity: If the current humidity exceeds the system set humidity, the system prompts that the humidity is too high and needs to be confirmed; if the current humidity is less than the system set humidity, determine the interval of the △DP-Gsp compensation curve corresponding to the current humidity, and call the fitting coefficient of the △DP-Gsp compensation curve of the corresponding interval to compensate the pressure difference of the air source pressure. The calculation formula is:
[0032] ΔDP=f(Gsp)=a6*Gsp 6 +a5*Gsp 5 +a4*Gsp 4 +a3*Gsp 3 +a2*Gsp 2 +a1*Gsp+a0;
[0033] Among them, the gas source pressure Gsp uses a multi-order polynomial fitting curve to compensate the pressure difference compensation value △DP, α 0~6 is a multi-order polynomial compensation coefficient, which is obtained by a corresponding compensation coefficient acquisition algorithm;
[0034] The pressure difference compensation value △DP is used to compensate the current real-time pressure difference to obtain the compensated real-time pressure difference, and the formula is:
[0035] DP=DP c +ΔDP;
[0036] Among them, DP is the real-time pressure difference after compensation, DP c is the real-time pressure difference of each channel, and △DP is the pressure difference compensation value obtained by converting the compensation fitting polynomial of the gas source pressure to the pressure difference.
[0037] Preferably, the compensation coefficient acquisition algorithm for the air source pressure and the pressure difference is used. When acquiring the compensation coefficient, if the deviation between the size of the workpiece to be measured and the size of the workpiece currently calibrated is large, the compensation calibration of the air source pressure to the pressure difference is performed again. If the deviation is small, the coefficient compensation algorithm is used for calibration. The specific steps for acquiring the compensation coefficient include:
[0038] Get the real-time humidity of the current environment regularly;
[0039] Determine whether the current ambient humidity is within the selected humidity range. If so, proceed to the next step. Otherwise, prompt the user to adjust the ambient humidity or modify the humidity range.
[0040] If the current humidity meets the requirements, the user is prompted to put in the standard part, input the standard part size value and the probe model, and obtain the calibration data bound to the standard part size and the probe model;
[0041] Divide multiple calibration intervals according to the set standard air source pressure, obtain the air source pressure value and pressure difference value in all calibration intervals, adjust the air source pressure to the standard pressure, and obtain the air source pressure and pressure difference compensation calibration coefficient for the current humidity; adopt the method of fitting a univariate polynomial to perform compensation calibration, and obtain the fitting coefficient by the least squares method, and the pressure difference and the air source pressure are a univariate sixth-order polynomial function relationship;
[0042] If the humidity interval is switched and the calibration coefficients are refitted before the switch, the calibration fitting coefficients of the current humidity interval are saved. The system pops up a dialog box asking whether to save the fitting coefficients. Select to save the fitting coefficients before switching the humidity interval.
[0043] After the fitting coefficients are saved, the user is prompted to adjust the calibration environment humidity to adjust the current environment humidity to the set humidity range; repeat the above steps to obtain the air source pressure and pressure difference compensation calibration coefficients corresponding to the set humidity range.
[0044] Preferably, the specific steps of the pressure difference size conversion by the pressure difference size paging conversion algorithm include:
[0045] Divide the pressure difference values into pages, put the standard parts into the specified positions, obtain the corresponding pressure difference values, turn the current pressure difference page to the corresponding page based on the current pressure difference value, and fill the current pressure difference value into the corresponding numerical item; if the pressure difference values between each page are equal at the beginning and the end, proceed to the next step;
[0046] The pressure difference and size are converted using a multi-order polynomial, and the formula is:
[0047] SV i =b 6i *DP 6 +b 5i *DP 5 +b 4i *DP 4 +b 3i *DP 3 +b 2i *DP 2 +b 1i *DP+b i ;
[0048] Among them, SV i is the real-time size of the corresponding page after conversion, b 6i 、b 5i 、b 4i 、b 3i 、b 2i 、b 1i 、b i is the polynomial fitting coefficient of the corresponding page, which is obtained by the corresponding pressure difference dimension conversion coefficient acquisition algorithm, and DP is the real-time pressure difference after compensation by the air source pressure.
[0049] Preferably, the steps of the pressure difference size conversion coefficient acquisition algorithm include:
[0050] The real-time differential pressure value and the input differential pressure value are obtained, and the system determines whether the current differential pressure value is within the set range. If so, the current differential pressure value is filled in the differential pressure value of the corresponding calibration item;
[0051] According to the dimension values of the start item and the end item and the total number of calibration items, the dimension values of the pressure difference are divided, and all calibration dimension reference values of the current page are obtained and the reference values are corrected;
[0052] Select the corresponding calibration item size value, and the user places the corresponding standard part according to the selected calibration item size value, and fills in the actual size value that is smaller than the previous calibration item size value and larger than the next calibration item size value in the interface;
[0053] If all the standard part dimension values and corresponding pressure difference values on this page meet the requirements, calibration will start. If there are modification items for each pressure difference and dimension input value, the modification item data will be saved, and the dimension value will be calculated by a multi-order polynomial function. The dimension values and corresponding pressure difference values of all groups on the current page will be fitted by the least square method to obtain the coefficients corresponding to the multi-order polynomial function, and the calibration coefficients will be displayed in the interface at the same time.
[0054] In the pressure difference size conversion coefficient acquisition interface, page conversion operations are performed, and the page conversion operations include: adding a page, deleting a page, turning up a page, and turning down a page.
[0055] Preferably, the steps of the temperature and size compensation algorithm include:
[0056] Determine whether the current temperature is within the temperature range set in the temperature and dimension value compensation coefficient acquisition algorithm. If so, call the temperature and dimension value compensation coefficient acquisition algorithm to perform polynomial calculations, obtain temperature compensation, and calibrate the dimension value.
[0057] If the current temperature exceeds the set range and the number of times it exceeds the threshold is greater than the set value, the system will issue an alarm.
[0058] Preferably, the specific calculation steps of the temperature and size value compensation coefficient acquisition algorithm are:
[0059] The workpiece size values at different temperatures are obtained, and the least squares method is used to fit the obtained multiple sets of data to obtain a univariate polynomial function of temperature relative to the size value.
[0060] Preferably, the acquisition module includes: a probe module and a temperature and humidity sensor, an air pressure sensor; the signal processing module includes: a workpiece pressure difference acquisition signal processing module and an air source pressure acquisition signal processing module connected to the control module via a parallel FMC bus; the gas-electric instrument also includes a touch screen connected to the control module via a serial port.
[0061] Preferably, the step of multi-dimensional measurement includes:
[0062] Perform stack processing on the real-time dimension values after compensation calibration in each round to obtain the workpiece dimension value of the current channel;
[0063] Calculate the taper, roundness, straightness, cylindricity and flatness of the workpiece currently being measured according to the statistical information of the workpiece configured by the user and the current channel data;
[0064] Configure the warning value and upper and lower deviation values of each channel according to the calculated statistics, and make alarm and warning judgments on the real-time size value of each channel;
[0065] The real-time dimensions, statistics and alarm information of the workpiece measured by each channel are displayed on the touch screen.
[0066] Preferably, the calculation steps for measuring the taper, roundness, straightness, cylindricity and flatness of the workpiece include:
[0067] For cone or frustum workpiece, calculate the corresponding taper, specifically:
[0068] The calculation formula of cone taper is: cone taper = base diameter / cone height,
[0069] The calculation formula of the cone taper is: cone taper = |upper base diameter - lower base diameter| / cone height,
[0070] Among them, the diameter of the cone base is D, the height of the cone is H, and the size of the workpiece at each channel is CS i , the vertical spacing between adjacent channels is CVD i , where i is the channel number, then:
[0071] Cone taper = D / H = |CS i -CS i-1 | / CVD i ,
[0072] Cone taper = |CS i -CS i-1 | / CVD i ,
[0073] For circular workpieces, the workpiece is rotated to collect data from the same channel of the workpiece multiple times and then the roundness is calculated. The calculation method is the difference between the maximum size value and the minimum size in the multiple sampling data. The number of sampling data is set through the measurement setting interface; the mutation data in the multiple sampling data is eliminated through the standard deviation;
[0074] For cylindrical workpieces, statistics on straightness, cylindricity and flatness are performed;
[0075] Straightness is the maximum runout deviation of all channel dimensions. The maximum and minimum values of all measurement channel dimensions are counted. Straightness is the difference between the maximum and minimum dimensions.
[0076] The cylindricity is determined by rotating the same cylindrical workpiece and collecting data from each channel. The cylindricity of the corresponding workpiece is then obtained by performing statistical analysis on all the data from each channel.
[0077] The gas and electricity meter based on pressure difference and size paging calibration conversion provided by the present invention has the following beneficial effects:
[0078] 1. In view of the influence of environmental factors such as temperature, humidity, and air pressure on the measurement results of workpiece dimensions, the present invention uses multiple sensors to collect the air source pressure, temperature and humidity in the measurement environment, and pressure difference signals through multiple collection channels. When collecting environmental data, a signal processing module with high precision and strong anti-interference ability is used for processing, which can output accurate environmental signals.
[0079] 2. Based on the collected gas source pressure, humidity and pressure difference signals, through the compensation algorithm of gas source pressure and humidity for pressure difference, and the compensation algorithm of temperature for workpiece size, temperature, humidity and air pressure are used as environmental variables for nonlinear fitting to obtain the polynomial calibration function to calibrate the actual measured size data, so that the gas and electricity meter can accurately measure the workpiece size under different environments.
[0080] 3. The present invention realizes multi-channel synchronous sampling and dimension measurement through multi-channel synchronous sampling technology. At the same time, according to multi-channel data and workpiece measurement settings, it can realize the calculation of statistics such as axis straightness, roundness, coaxiality, verticality, flatness, etc. of different types of workpieces, thereby realizing multi-dimensional measurement of workpieces. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] Figure 1 The principle block diagram of the gas and electricity meter system based on pressure difference and size paging calibration conversion provided by the present invention;
[0082] Figure 2 A cross-sectional view of the probe structure in the gas-electricity meter based on pressure difference and size paging calibration conversion provided by the present invention;
[0083] Figure 3A schematic diagram of the connection between the probe structure and the differential pressure sensor in the gas-electricity meter based on differential pressure and size paging calibration conversion provided by the present invention; wherein, 1-pressure stabilizing chamber; 2-throttle hole; 3-back pressure chamber; 4-nozzle baffle mechanism; 5-differential pressure sensor;
[0084] Figure 4 A flow chart of collecting pressure difference values of each channel in the gas and electricity meter based on pressure difference and size paging calibration conversion provided by the present invention;
[0085] Figure 5 A flow chart for obtaining the gas source pressure (humidity)-pressure difference compensation calibration coefficient of the gas-electricity meter based on pressure difference and size paging calibration conversion provided by the present invention;
[0086] Figure 6 A flow chart for obtaining the multi-channel pressure difference-dimension value conversion coefficient of the gas-electricity meter based on the pressure difference and dimension paging calibration conversion provided by the present invention;
[0087] Figure 7 A flow chart of page conversion operation on a touch screen in a gas and electricity meter based on pressure difference and size paging calibration conversion provided by the present invention;
[0088] Figure 8 A schematic diagram of a human-computer interaction interface for realizing page switching of a pressure difference-size conversion coefficient in a gas and electricity meter based on pressure difference and size paging calibration conversion provided by the present invention;
[0089] Fig. 9 The setting items of the test program in the gas and electricity meter based on pressure difference and size paging calibration conversion provided by the present invention;
[0090] Fig.10 A system operation flow chart of the gas and electricity meter based on pressure difference and size paging calibration conversion provided by the present invention;
[0091] Fig.11 , Fig.12 A circuit diagram of a collection module and a signal processing module in a gas and electricity meter based on pressure difference and size paging calibration conversion provided by the present invention;
[0092] Fig.13 A circuit diagram of a temperature and humidity sensor module in a gas and electricity meter based on pressure difference and size paging calibration conversion provided by the present invention;
[0093] Figures 14 to 19 A circuit diagram of voltage conversion in a power module in a gas and electricity meter based on pressure difference and size paging calibration conversion provided by the present invention;
[0094] Fig. 20The present invention provides a flow chart of workpiece statistics calculation, display and alarm in a gas and electricity meter based on pressure difference and size paging calibration conversion. DETAILED DESCRIPTION
[0095] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0096] like Figure 1 As shown, the present invention provides a gas-electricity meter based on pressure difference and size paging calibration conversion (hereinafter referred to as "gas-electricity meter"), including: an acquisition module, a signal processing module, and a control module. The acquisition module acquires the temperature and humidity, gas source pressure and probe pressure difference signals of the workpiece through multiple acquisition channels; the signal processing module adjusts and filters the acquired signals, and outputs them to the control module after signal conversion. The control module (main MCU) calibrates the pressure difference signal based on the acquired signal through the gas source pressure and pressure difference compensation algorithm; based on the compensated pressure difference signal, the pressure difference signal is converted into the corresponding workpiece size through the pressure difference size paging conversion algorithm; based on the converted size data, the temperature and size compensation algorithm is used to calibrate the size data at different temperatures to complete the measurement of the real-time size of the workpiece. Based on the size data after verification and conversion, the statistics of the configured workpiece are calculated according to the multiple acquisition channel data configured by the user and the type of workpiece to be measured; based on the statistics of the workpiece, the real-time size of each channel is alarmed and warned, and the real-time size, statistics and warning alarm information corresponding to each channel are displayed, thereby realizing multi-size measurement.
[0097] Specifically, the present invention uses multiple sensors to collect signals such as temperature and humidity, air source pressure, and multi-channel probe pressure difference through multiple acquisition channels, and provides accurate pressure difference signals through a high-precision anti-interference signal processing module. Based on the processed acquisition signal, the control module uses the compensation algorithm of air source pressure and humidity on the pressure difference and the compensation algorithm of temperature on the workpiece size to take temperature, humidity, and air pressure as environmental variables for nonlinear fitting, and obtains a polynomial calibration function to calibrate the actual measured size data, so that the gas and electricity meter can achieve accurate size measurement under different environments. In view of the nonlinear situation of pressure difference-size conversion, and in order to improve the conversion accuracy of pressure difference-size, a paging conversion method is adopted to segment the measurement interval, and the corresponding polynomial conversion algorithm is adopted to fit the pressure difference data into a size signal, thereby improving the measurement efficiency. In addition, during the conversion, operations such as adding pages, deleting pages, and jumping pages are also performed within the measurement interval, further improving the flexibility of pressure difference-size conversion.
[0098] In the present invention, the signal processing module includes: a workpiece pressure difference acquisition signal processing module and a gas source pressure acquisition signal processing module, and the two communicate with the control module through a parallel FMC bus.
[0099] Among them, the workpiece pressure difference acquisition signal processing module is used to convert the pressure difference sensor analog signal into a digital signal that can be processed by the main MCU, including cascaded operational amplifiers, filter circuits and multiple high-precision analog-to-digital converters. The operational amplifier is used to proportionally adjust the pressure difference analog signal so that the output analog signal meets the voltage conversion range of the analog-to-digital converter; the filter circuit is a low-pass filter used to filter out high-frequency interference signals in the output signal of the operational amplifier; the multiple high-precision analog-to-digital converter uses an 8-channel 18-bit synchronous sampling ADC to achieve multi-channel synchronous conversion of analog signals through a parallel FMC bus, providing rich raw data for the main MCU.
[0100] Among them, the gas source pressure acquisition signal processing module and the workpiece pressure difference acquisition signal processing module realize the same function, which is to convert the gas source pressure analog signal into a digital signal that can be processed by the main MCU. In order to improve the accuracy of the measurement of each channel size, the gas source pressure of each channel is collected separately and calibrated using the gas source pressure-pressure difference calibration algorithm.
[0101] In this embodiment, the acquisition module includes:
[0102] The temperature and humidity acquisition module is composed of temperature and humidity sensors;
[0103] The probe module includes a probe and a differential pressure sensor. The probe needs to select a suitable probe form and a suitable probe size according to the structure and position of the measured part, so that the relationship between the pressure difference and the change of the gap during measurement is approximately linear, making the measurement result more accurate. The differential pressure sensor collects the pressure difference between the air source pressure after passing through the pressure regulating valve and the air pressure at the probe nozzle, converts the corresponding differential pressure analog signal into a digital signal through the signal processing module and sends it to the main MCU. Figure 2 As shown in FIG. , it is a cross-sectional view of the probe structure; Figure 3 The figure shows the schematic diagram of the probe structure connected to the differential pressure sensor for measurement. In the figure, 1 is the pressure stabilizing chamber, 2 is the throttle hole, 3 is the back pressure chamber, 4 is the nozzle baffle mechanism, and 5 is the differential pressure sensor. b is the gas source pressure, P x is the air pressure at the nozzle, d1 is the throttle hole diameter, d is the nozzle diameter, and x is the gap between the workpiece and the probe.
[0104] Among them, when the acquisition module collects environmental data, it acquires data through the IIC bus, and the timing time is set to the measurement refresh cycle. If the measurement refresh cycle time is reached, the temperature and humidity are acquired once. The air pressure of each air source is collected to ensure the accuracy of the pressure difference compensation of each air source pressure. At the same time, the air pressure of each air source is also acquired through the FMC parallel bus. The way the FMC bus acquires the air source pressure is the same as the way the instantaneous value of the pressure difference is acquired.
[0105] like Figure 4 As shown, in this embodiment, for pressure difference acquisition, the signal processing module uses an 8-channel, 18-bit synchronous, model AD7609 sampling chip to realize analog-to-digital conversion of the pressure difference signal, and the main MCU obtains the 8-channel sampling data converted by AD7609 through the parallel bus FMC.
[0106] The collection steps include:
[0107] S1.0: Stop AD7609 sampling operation: set the analog-to-digital conversion start IO level to high level, and turn off the analog-to-digital conversion IO output PWM control timer.
[0108] S1.1: Configure AD7609 to detect BUSY signal after conversion is completed, and disable the external interrupt of BUSY signal. After AD7609 completes the conversion, it will output a falling edge signal through the BUSY pin, and the MCU will capture the signal through the external interrupt.
[0109] S1.2: AD7609 reset operation: The main MCU outputs a high-level pulse of no less than 50nS to the RESET pin connected to the AD7609. After the pulse is output, the hardware is set to a low level.
[0110] S1.3: Output a low-level pulse to the AD7609 analog-to-digital start conversion port. This pulse can start the AD7609 to perform an AD conversion, avoiding the first data obtained from the AD7609 being 0.
[0111] S1.4: Clear the relevant variables in the pressure difference sampling value data FIFO storage structure variable. The pressure difference sampling data storage is stored through two structure variables. Among them, FIFO (First In First Out) is a first-in-first-out data buffer used to realize the orderly storage and reading of data.
[0112] One of the structure variables is an 8-channel single-sampling data storage variable. The structure variable contains 8 channels of AD conversion data. The single-channel data is divided into two 16-bit data. Therefore, it includes 16 arrays with a length of 16 bits and 16 arrays with a length of 32 bits.
[0113] Another structure variable is a FIFO operation structure stored by number, which includes a data storage FIFO array, an array read data position variable, an array write data position variable, an array storage data number variable, and a FIFO full flag.
[0114] S1.5: Configure the AD7609 analog-to-digital conversion chip to work in automatic acquisition mode.
[0115] First, configure the PWM pulse output timer of the main MCU to regularly output PWM pulses to the start conversion port of AD7609. The pulse frequency is calculated according to the instantaneous sampling number and measurement refresh rate set by the user. Pulse frequency = instantaneous sampling number * measurement refresh rate. The measurement refresh rate is the number of calculations and displays of the measured dimension data within a unit time of 1S, and the instantaneous sampling number is the number of 8-way synchronous pressure difference sampling performed within the measurement refresh cycle. Finally, set and enable the conversion completion detection BUSY interrupt signal.
[0116] After completing the multi-channel differential pressure acquisition settings, the main MCU timer will periodically send high-frequency PWM pulses to the start conversion port of AD7609. The 8-channel synchronous AD conversion speed of AD7609 can reach up to 200kHz. After each conversion of AD7609 is completed, the BUSY port of AD7609 will generate a falling edge signal, and the main MCU will obtain the falling edge through external interrupts.
[0117] Based on the external interrupt, it is determined whether the AD7609 has completed the conversion. If it has completed, the multi-channel sampling data reading, conversion, and storage process will be executed to obtain the pressure difference data. The steps are as follows:
[0118] S1.6: The 8-channel single-shot sampling data of the corresponding address are obtained in sequence through the FMC bus. Each channel of data occupies 18 bits and is stored in two 16-bit array elements. D[17:2] of the 18-bit data is stored in the first array element sNowAdc[0], and D[1:0] is stored in the high bit of the second array element sNowAdc[1]. Therefore, the array has a total of 16 elements for storing 8 channels of differential pressure data.
[0119] S1.7: Process the 16 elements of the array, convert the 2 elements corresponding to each data channel into 32-bit data and perform a shift operation, specifically: sNowAdc[0]*4+sNowAdc[0] / 16384. Store the corresponding 8 data in arrays containing 8 elements respectively.
[0120] S1.8: Store the 8 data in the 8-channel differential pressure storage array into the corresponding position of the FIFO array in the FIFO operation structure. The FIFO operation structure contains a write data position variable. Each time a data is written, the position data variable performs an increment operation. If the variable is larger than the FIFO size, the variable is cleared to zero, thereby realizing a circular write in the FIFO. In addition, the FIFO operation structure contains a variable for recording the number of unread data in the FIFO array. Each time a data is written to the FIFO, the variable is also incremented by 1. If the variable is larger than the FIFO size, the FIFO full flag in the FIFO operation structure is set to 1.
[0121] The AD7609 start conversion port receives the PWM pulse sent by the MCU at regular intervals. The MCU will acquire the pressure difference signal according to the PWM pulse frequency. The system main loop determines in real time whether the number of sampled data reaches the instantaneous sampling number set by the system. If it reaches it, multi-channel data extraction and single-cycle data processing procedures will be performed. At the same time, if the user does not press the stop detection button, the AD7609 sampling data acquisition will continue.
[0122] The system sets the periodic acquisition data flag and two FIFO operation structures to store the AD7609 sampled data. In odd cycles, the data is stored in the FIFO array in the FIFO1 structure, and in even cycles, the data is stored in the FIFO array in the FIFO2 structure. At the same time, the odd cycle extracts the data in the FIFO2 structure that has completed sampling in the even cycle, and the even cycle extracts the data in the FIFO operation structure that has completed sampling in the odd cycle, thereby realizing data synchronous processing while collecting pressure difference data, improving data processing efficiency and dimensional measurement accuracy.
[0123] After a single data sampling is completed, a pressure difference data in the FIFO operation structure is taken out for judgment to determine whether it is greater than the trigger range value set by the user in the measurement setting interface; if the workpiece is not currently placed or the workpiece is not placed as required, the variable of the number of times the pressure difference exceeds the threshold is added by 1, and the pressure difference data is judged again at the beginning of the next round of measurement refresh cycle; if the pressure difference is within the trigger range, the variable of the number of times the pressure difference exceeds the threshold is cleared to determine whether the number of times the pressure difference exceeds the threshold is greater than the set value. If so, the system will alarm and end the real-time measurement process, waiting for the user to place the workpiece and click "Measure" before starting the measurement.
[0124] The specific steps of the multi-channel data extraction and single-cycle data processing flow include:
[0125] S1.9: extract all unextracted data in the FIFO operation structure array within the corresponding cycle. The pressure difference storage array in the FIFO operation structure is stored in FIFO form, that is, the data stored first is kicked out of the array first after the array is full.
[0126] S1.10: Calculate the standard deviation of the extracted data. The standard deviation calculation formula is:
[0127]
[0128] Among them, N is the number of data, x i is the corresponding position data in the array, is the average value of all the data in the array. According to the normal distribution characteristics of the data, 3σ is used to eliminate outliers and all data outside the range of x±3σ are eliminated.
[0129] S1.11: Calculate the average of the eliminated data, store the average value in the pressure difference measurement storage array, and record the number of storages.
[0130] S1.12: The data after single-cycle processing will be stored in the pressure difference measurement storage array in sequence. When the data in the array reaches the number of pressure difference real-time data processing, the array data is processed. The Gaussian filtering method is also used to process the data and then average it. The obtained pressure difference value is the real-time pressure difference at the current moment.
[0131] After this round of sampling and data processing is completed, all variables in this round of sampling are cleared and the next round of data sampling and processing is restarted to ensure the independence of the next and current data.
[0132] In a single round of data collection and processing, a single-cycle big data collection method is adopted to obtain a large amount of data, and the average processing is performed to obtain the instantaneous pressure difference value; then the data of a specified single cycle number is processed to obtain a relatively stable real-time pressure difference value; the cycle index and cycle number data variables of a single cycle can be adjusted, which is convenient for parameter adjustment according to environmental conditions, thereby improving measurement accuracy.
[0133] In this embodiment, based on the collected pressure difference, air source pressure, and temperature and humidity data, the air source pressure and pressure difference compensation algorithm is used to calibrate the influence of the air source pressure on the pressure difference, and the steps include:
[0134] Calculate the air source pressure (humidity) and pressure difference compensation value:
[0135] S2.0: The change of air source pressure will affect the actual pressure difference value, and humidity will affect the air source pressure. Therefore, the air source pressure and humidity are used as parameters for pressure difference compensation. The relationship between air source pressure, humidity and pressure difference:
[0136] △DP=f(Gsp,H),
[0137] Among them, Gsp is the air source pressure, △DP is the pressure difference compensation value, H is the current humidity, Gsp and △DP are in a polynomial relationship, H and △DP-Gsp compensation curve are in an interval relationship, and f is the polynomial function of the air source pressure Gsp and the pressure difference compensation value △DP in the specified temperature range.
[0138] S2.1: First determine the current humidity. If the humidity exceeds the system set humidity, the system prompts that the humidity is too high and requires user confirmation. Otherwise, further determine the interval of the △DP-Gsp compensation curve corresponding to the current humidity, and call the fitting coefficient of the △DP-Gsp compensation curve of the corresponding interval to compensate the pressure difference of the air source pressure. The calculation formula is:
[0139] ΔDP=f(Gsp)=a6*Gsp 6 +a5*Gsp 5 +a4*Gsp 4 +a3*Gsp 3 +a2*Gsp 2 +a1*Gsp+a0;
[0140] Among them, the compensation of Gsp to the pressure difference compensation value △DP is compensated by a 6th-order polynomial fitting curve, α 0~6 It is a multi-order polynomial compensation coefficient, which is obtained through the compensation coefficient acquisition algorithm corresponding to the air source pressure (humidity)-pressure difference.
[0141] S2.2: After obtaining the pressure difference compensation value △DP, the current real-time pressure difference is compensated to obtain the compensated real-time pressure difference, and the formula is:
[0142] DP=DP c +ΔDP;
[0143] Among them, DP is the real-time pressure difference after compensation, DP c is the real-time differential pressure of each channel obtained by the real-time differential pressure value acquisition process of each channel, and △DP is the differential pressure compensation value obtained by converting the compensation fitting polynomial of the gas source pressure to the differential pressure.
[0144] In the present invention, since different humidity will affect the change of air pressure at both ends of the differential pressure sensor, and thus affect the collection of the final sensor differential pressure value, differential pressure compensation is required for different humidity. From the perspective of the influence of air pressure on differential pressure, the differential pressure is a binary polynomial function of the air source pressure and the ambient humidity. Considering the influence weights of humidity and air source pressure on air pressure, the influence weight of humidity is low. In order to reduce the number of humidity collections and reduce the difficulty of setting the ambient humidity, the humidity is interval calibrated during calibration, and a constant humidity environment with different humidity is set, and then compensation calibration is performed for different air source pressures.
[0145] Among them, when obtaining the compensation coefficient corresponding to the air source pressure and the pressure difference, if the deviation between the size of the workpiece to be measured and the size of the workpiece currently calibrated is large, the compensation calibration process of the air source pressure to the pressure difference is re-performed (that is, repeating the above steps); if the deviation is small, the coefficient compensation algorithm is used for calibration, such as Figure 5 The specific steps for obtaining the compensation calibration coefficient corresponding to the gas source pressure and the pressure difference include:
[0146] S2.10: Get the humidity collected by the temperature and humidity sensor. The main MCU communicates with the temperature and humidity sensor through the IIC bus to obtain the current ambient humidity. The main MCU obtains the humidity regularly through the timer and takes out the humidity data for use when executing the current process.
[0147] S2.11: Determine whether the current ambient humidity is within the selected humidity range. If so, proceed to the next step. Otherwise, prompt the user to adjust the ambient humidity or modify the humidity range.
[0148] In this embodiment, the gas and electricity meter system divides the humidity range into four levels, namely 30% to 40%, 40% to 50%, 50% to 60%, and 60% to 70%. If it is lower than 30% or higher than 70%, the system will alarm to remind the user that the current ambient humidity is abnormal and the equipment cannot work normally.
[0149] S2.12: If the humidity meets the requirements, the user is prompted to put in the standard part and enter the standard part size value, and enter the probe model in the current calibration interface. The final calibration data will be bound to the standard part size and probe model. When the user is setting the measurement, the compensation coefficient of the air source pressure (humidity) to the pressure difference for each channel size measurement can be selected according to the actual probe model and the size value of the part to be measured.
[0150] S2.13: Perform the gas source pressure adjustment and acquisition process.
[0151] Adjust according to the set standard gas source pressure to obtain the current pressure difference value. In this embodiment, the set standard gas source pressure is preferably 0.3MPa. In order to ensure the accuracy of calibration, the gas source pressure calibration interval is divided according to the standard gas source pressure, the gas source pressure calibration starting pressure and the ending pressure. The system is divided into 20 calibration intervals in total, and the starting pressure to the standard gas source pressure is divided into 10 calibration intervals in 10 equal parts, and the standard gas source pressure to the ending pressure is divided into 10 calibration intervals in 10 equal parts.
[0152] S2.14: Collect the gas source pressure and the corresponding pressure difference of the above 10 intervals in turn and record them.
[0153] Each time the user selects one of the intervals to collect the corresponding gas source pressure, the user adjusts the pressure of the pressure regulating valve input to the gas source pressure to within the currently selected pressure interval, and then selects the "Input Pressure" button in the interface to complete the collection of the gas source pressure in this interval. At this time, the pressure difference value of the current channel is obtained and recorded.
[0154] S2.15: After completing the acquisition of the gas source pressure and the corresponding pressure difference of all intervals, adjust the gas source pressure to the standard gas source pressure. The pressure accuracy requirement is high and the error is required to be within 0.1% to ensure the accuracy of the reference pressure. After pressing the "Input Pressure" button, compare the gas source pressure with the standard pressure. If the error is greater than 0.1% (settable), the user is prompted to readjust the gas source pressure until it meets the error requirement. After completing the gas source pressure input, the current channel pressure difference value is obtained and recorded in real time.
[0155] S2.16: After completing the collection of all air source pressure and pressure difference values, the air source pressure-pressure difference compensation calibration coefficient can be obtained for the current humidity. The compensation calibration is performed by fitting a univariate polynomial. The fitting coefficient is obtained by the least squares method. The pressure difference and the air source pressure are in a univariate sixth-order polynomial function relationship.
[0156] S2.17: If the user switches the humidity interval in this interface and refits the calibration coefficient before switching, the current humidity interval calibration fitting coefficient saving process is executed, and a dialog box pops up to ask whether to save the fitting coefficient. The fitting coefficient before switching the humidity interval is saved according to the user's choice. After completing the fitting coefficient saving process, the user is prompted to adjust the calibration environment humidity to adjust the current environment humidity to the set humidity interval. Then, the air source pressure-pressure difference compensation calibration coefficient of the corresponding humidity interval is obtained according to the above method.
[0157] S2.18: If you click the "Exit" button, the current humidity range calibration fitting coefficient saving process will be executed and then this interface will be exited.
[0158] In this embodiment, after the calculation of the air source pressure (humidity)-pressure difference compensation value is completed, the compensated pressure difference is converted to the corresponding dimension value. The pressure difference-dimension value conversion is performed in a page conversion manner, and the steps include:
[0159] S3.0: Paginate the pressure difference values, place the standard parts in the specified position, obtain the corresponding pressure difference values, and based on the current pressure difference value, turn the current pressure difference page to the corresponding page, and fill the current pressure difference value into the corresponding numerical item; if the pressure difference values between each page are equal from beginning to end (that is, the maximum pressure difference value of the previous page is equal to the minimum pressure difference value of the current page, and the maximum pressure difference value of the current page is equal to the minimum pressure difference value of the next page, thereby ensuring that the current real-time pressure difference value is within the pressure difference conversion range established by the user), then execute the next step.
[0160] S3.1: The pressure difference-dimension conversion adopts the 6th order polynomial conversion, and its formula is:
[0161] SV i =b 6i *DP 6 +b 5i *DP 5 +b 4i *DP 4 +b 3i *DP 3 +b 2i *DP 2 +b 1i *DP+b i ;
[0162] Among them, SV i is the real-time size of the corresponding page after conversion, b 6i , b 5i , b 4i , b 3i , b 2i , b 1i , b i is the polynomial fitting coefficient of the corresponding page, obtained through the pressure difference size conversion coefficient acquisition algorithm. Different channels have different coefficients. The coefficients of the corresponding channels are used for polynomial calculation. DP is the real-time pressure difference after compensation by the air source pressure. It should be noted that the order of the polynomial can be set according to the actual application scenario.
[0163] In the present invention, the pressure difference dimension conversion algorithm uses multiple workpieces for paging calibration for each channel and performs polynomial fitting on each page of data, thereby obtaining the accurate conversion coefficient of the corresponding pressure difference to the dimension value in each page. At the same time, when the paging calibration is set, the last dimension value of the previous page and the first dimension value of the current page are guaranteed to be the same, thereby ensuring an uninterrupted interval of calibration.
[0164] like Figure 6 As shown, the specific steps of the pressure difference size conversion coefficient acquisition algorithm include:
[0165] S3.10: Before calibration in each calibration page interface of each channel, complete the input of each standard part size value and the acquisition of the corresponding pressure difference value. The polynomial coefficients for the conversion between pressure difference and size value are realized by polynomial fitting of multiple sets of pressure difference values and corresponding standard part sizes.
[0166] In this calibration interface, the pressure difference value of the current user-selected channel is obtained in real time and displayed in the interface. At this time, the user can click the "Input Pressure Difference" button, and the system determines whether the current pressure difference indication is within the set range. If so, the current pressure difference indication is filled in the pressure difference value of the corresponding calibration item. The pressure difference setting range of the calibration item is filled in here to ensure the accuracy of the calibration. The pressure difference sensor is converted by the sampling chip model AD7609 and input into the main MCU as 18-bit data, of which the highest bit is the sign bit. After removing the sign bit, the data range is 0 to 131071. When performing pressure difference size conversion, the area with higher conversion accuracy is generally around the middle value of the data. Therefore, the pressure difference setting range can be set to 30000 to 60000. If it exceeds this range, it prompts the user to reset the range or adjust the device to obtain the pressure difference value within this range.
[0167] S3.11: The method of quickly dividing dimension values is adopted. After the user clicks the "Divide Dimension Values" button, the dimension values of the starting item and the ending item and the total number of calibration items are equally divided to obtain all the calibration dimension reference values of this page, thereby realizing the rapid input of standard part dimensions. After the dimension division, the dimension value obtained by automatic division can be modified.
[0168] S3.12: When the user selects the corresponding calibration item dimension value, the system prompts the user to place the corresponding dimension standard part according to the dimension value, and fill in the actual size of the current standard part in the interface.
[0169] In order to ensure the correctness of the user input data and the final fitting coefficient, the user input standard part size is constrained, requiring that the current standard part size must be smaller than the previous calibration item size value and larger than the next calibration item size value. If this requirement is not met, the user is prompted to re-fill in the standard part size value.
[0170] S3.13: After completing the input of all standard part dimensions and corresponding pressure differential values on this page and they all meet the set requirements, you can start obtaining the calibration coefficients.
[0171] The user clicks the "Start Calibration" button to determine whether there are modification items for each pressure difference and dimension input value. If so, the modification item data is stored. The dimension and pressure difference are in a 6th-order polynomial relationship, where the pressure difference is the input parameter. The dimension value is calculated by the 6th-order polynomial function. The dimension values and corresponding pressure difference values of all groups on this page are fitted by the least squares method to obtain the coefficients of the corresponding 6th-order polynomial function, which are also displayed on the interface.
[0172] S3.14: Perform page conversion operations in the pressure difference size conversion coefficient acquisition interface. The page conversion operations include: adding pages, deleting pages, turning up pages, and turning down pages. Figure 7 It should be noted that when performing page conversion operations, the pressure difference values of each page must be ensured to be equal at the beginning and the end to ensure the continuity between pages.
[0173] The specific switching steps include:
[0174] (1) If the "Previous Page" button is clicked, it is first determined whether the current page is the home page. If so, the user is prompted that the page is the home page. Otherwise, the calibration page switching process is executed.
[0175] This process first determines whether there is any calibration parameter modification on the current page. If so, a parameter save dialog box pops up to save the calibration parameters according to the user's selection. Then it determines whether the calibration coefficient is updated. If there is an updated coefficient, the calibration coefficient is saved. Here, the calibration parameters and calibration coefficients are stored in temporary variables when entering the interface. When the user exits this page, the current parameters can be compared with the parameters stored in the temporary variables to determine whether the parameters have been modified.
[0176] (2) After the calibration parameters and calibration coefficients are saved, the current page record variable is reduced by 1, and then the calibration parameters and calibration coefficients are obtained according to the current page. Finally, the current calibration page is closed, and the corresponding calibration page is opened according to the current page to display the calibration parameters and calibration coefficients.
[0177] (3) The execution process of clicking the "Next Page" button is similar to that of clicking the "Previous Page" button. The difference is that when clicking the "Next Page" button, it is necessary to determine whether it is the last page. If it is the last page, the user is prompted that it is the last page. Otherwise, the page switching process is executed.
[0178] (4) If you click the "Add Page" button, first determine whether the current page is the maximum page set by the system. If so, the user is prompted that it is the maximum page and cannot add a page. Otherwise, determine whether the current page is equal to the total page number. If so, execute the calibration page adding process. Otherwise, prompt the user to turn to the last page before adding a page. The calibration page adding process first determines whether there are calibration parameter and calibration coefficient modifications on the current page. If so, save it according to the user's operation, then add 1 to the current page storage variable, update the total page number, and calculate the calibration reference size values based on the current page. In the calibration interface, you can enter the end data of the calibration reference value for the next page and the number of calibration items. The spacing value of each calibration item size reference value is (calibration reference value end data - current page calibration end data) / number of calibration items. The calibration size reference value of each item on the next page is calculated based on this spacing value. Close the current calibration page, open the corresponding calibration page based on the current page, and display the calibration size value.
[0179] (5) If the "Delete Page" button is clicked, it is first determined whether the current page is equal to the total page number. If so, it is further determined whether the current page is the home page. If it is the home page, the user is prompted that there is only one page and the page cannot be deleted. Otherwise, the calibration page deletion process is executed. The calibration page deletion process first determines whether the calibration parameters and calibration coefficients of the current page have been modified. If so, it is saved according to the user operation, and then the current page storage variable is subtracted by 1 and the total page number is updated. The current page calibration parameters and calibration coefficients are obtained according to the current page storage variables. Finally, the current calibration interface is closed, and the corresponding calibration page is opened according to the current page and the calibration parameters and calibration coefficients are displayed.
[0180] (6) Click the "Exit" button in each calibration page to exit the pressure difference-dimension value conversion coefficient acquisition interface, and the calibration interface exit process will be executed. This process will first save the calibration parameters and calibration coefficients of the previous calibration page, and then determine the correlation between the parameters of each calibration page. The calibration fitting curve of each page must ensure the continuity of the pressure difference, and the calibration dimension values cannot jump, so that the pressure difference and dimension conversion can be correct. If the pressure difference in the fitting curve is discontinuous, the interrupted disconnected area cannot be converted. If the calibration dimension value jumps, the dimension jump phenomenon may occur when converting the same pressure difference in the actual conversion. In order to ensure that the calibration curve of each page has no jumps on the size axis, the starting size value of each page and the ending size value of the previous page, as well as the ending size value of each page and the starting size value of the next page must be within a certain distance. The distance can be set on each calibration page. When exiting the page, the starting size value and the ending size value of all current pages are judged. If there is a setting greater than the spacing value, the user is prompted that there is an incorrectly set page; in order to ensure the continuity of the calibration curve of each page on the pressure difference axis, it must be ensured that the starting pressure difference value of each page is equal to the ending pressure difference value of the previous page, and at the same time, the ending pressure difference value of each page is equal to the starting pressure difference value of the next page. If there are different items, the user is prompted that there is an incorrectly set page. If the above-mentioned size values and pressure difference values meet the requirements, exit the pressure difference-size conversion coefficient acquisition interface and return to the measurement calibration conversion interface. Its conversion calibration interface is as follows: Figure 8 shown.
[0181] In the present invention, since the workpiece has the phenomenon of thermal expansion and contraction, it is necessary to perform temperature compensation on the workpiece size. The workpiece executes the temperature-size value compensation process, and performs temperature compensation on the real-time size after the pressure difference-size corresponding page conversion. The specific steps include:
[0182] Determine whether the temperature is within the temperature range set in the temperature-dimension value compensation calibration process. If so, call the temperature-dimension value compensation calibration polynomial coefficient to perform polynomial calculation to obtain the calibrated dimension value after temperature compensation. The calculation method of the polynomial is the same as the above-mentioned pressure difference-dimension polynomial calculation method; if the temperature exceeds the set range and the number of times the threshold is exceeded is greater than the set value, the system will issue an alarm prompt.
[0183] In the present invention, the temperature and dimension value compensation coefficient acquisition algorithm is used to compensate the real-time dimension during the measurement process. The specific steps include:
[0184] The workpiece dimension values at different temperatures are collected, and the least squares method is used to fit the multiple sets of data to obtain a univariate polynomial function of temperature relative to the dimension value.
[0185] The present invention also includes a measurement setting step for setting the reference value, early warning value, and alarm value of each channel, and can realize the channel pressure difference conversion trigger setting.
[0186] The specific parameters of early warning and alarm include baseline value, early warning upper limit, early warning lower limit, alarm upper limit and alarm lower limit. According to these parameters, the early warning range is: greater than (baseline value - alarm lower limit) and less than (baseline value - early warning lower limit) or greater than (baseline value + early warning upper limit) and less than (baseline value + alarm upper limit), and the alarm range is less than (baseline value - alarm lower limit) or greater than (baseline value + alarm upper limit).
[0187] The specific steps for setting up the test program are:
[0188] The user can enter the measurement program selection interface by clicking the "Measurement Program Selection" button in the setting interface. Entering this interface will execute the measurement program operation process. Through this process, the user can view the compensation calibration parameter selection status of the gas source pressure, pressure difference, temperature, etc. selected by each measurement program, and can use this interface to create, configure, delete and upload measurement programs.
[0189] In the air source pressure-differential pressure compensation calibration interface and the temperature-dimension compensation calibration interface, the interface provides "calibration number", "probe model", "workpiece model", and "standard air source pressure" input. Each calibration number corresponds to a probe model, workpiece model, and standard air source pressure value. The current compensation calibration coefficient can be saved according to the calibration number, and the associated probe model, workpiece model, and standard air source pressure value can be saved. In addition, calibration numbers can be added, deleted, and selected in this interface. Adding / deleting calibration numbers can add or delete a group of compensation calibration coefficients and related original parameters. Selecting a calibration number obtains the corresponding number compensation calibration coefficient and original parameters. In the interface, the compensation calibration coefficient can be calculated after the original parameters are re-acquired.
[0190] In the pressure difference-size conversion calibration, each channel can set the "calibration number", "probe model", "workpiece model", and "standard air source pressure" input. The operation method is similar to the above-mentioned air source pressure-pressure difference compensation calibration interface.
[0191] Enter the measurement program interface, and the program name selected by the user last time is selected by default. A program name includes the pressure difference-size conversion calibration number, gas source pressure-pressure difference compensation calibration number, and temperature-size conversion calibration number selected for each channel. The user can select and adjust the corresponding number according to the model of the current workpiece being tested, the probe model, and the standard gas source pressure. Adding a new program is to add a new workpiece detection parameter. All parameters are empty by default. The user can select from the currently completed calibration numbers, or enter the corresponding calibration interface to obtain the calibration coefficient. The parameters in the currently selected program name are calibrated on the corresponding calibration page. The setting items of the test program are as follows: Fig. 9 shown.
[0192] The present invention is also provided with a slave MCU, which sends the raw data waveform display data to the touch screen, communicates through the serial port, and can view some mutation signals of the current workpiece measurement channel data through the raw data waveform. The system master MCU sends the real-time size and real-time dispersion of each channel to the touch screen through the serial port and displays them through waveforms on the data interaction interface. The data is sent separately through the dual MCU, thereby reducing the processing pressure of the main MCU and improving the processing ability of the main MCU for real-time size.
[0193] In the present invention, the gas and electricity meter also includes: a power supply module for powering the working system of the gas and electricity meter; a display screen for displaying and configuring measurement data; and a serial communication touch screen, through which the user interacts with the gas and electricity meter.
[0194] Among them, the interface of the serial communication touch screen includes:
[0195] Main interface: Displays the measurement results and statistical data of each channel size of the workpiece in real time, and provides operation buttons for the setting interface and data interaction interface entrance.
[0196] Settings interface: provides operation buttons for measurement and calibration conversion interface, measurement settings interface, measurement program selection interface and return to the main interface.
[0197] Air source pressure compensation calibration interface: This interface realizes the compensation calibration of air source pressure (humidity) - pressure difference, obtains the humidity, air source pressure and pressure difference in the calibration environment in real time, and obtains the calibration coefficient through polynomial fitting.
[0198] Pressure difference-size conversion interface: This interface realizes the pressure difference-size conversion function, obtains the pressure difference value of each channel of the workpiece in real time, and inputs the standard workpiece size value by manual input, and obtains the conversion 6th order polynomial coefficient through polynomial fitting. This interface can perform page conversion on the conversion size interval, thereby improving the conversion accuracy and eliminating the fitting error existing in single page fitting.
[0199] Temperature-dimension value compensation calibration interface: This interface implements temperature-dimension value compensation calibration. Metal workpieces have the physical phenomenon of thermal expansion and contraction, so the dimension value of workpieces at different temperatures is compensated. The dimension value is obtained in real time through pressure difference dimension conversion, and the temperature value is obtained in real time through the temperature sensor. Then, the temperature-dimension value compensation curve fitting coefficient can be obtained through polynomial fitting.
[0200] Measurement setting interface: This interface sets the measurement parameters of each channel size, including the workpiece reference value, upper and lower deviation thresholds, and warning values. It can also set the no-workpiece judgment condition and synchronize the channel setting parameters.
[0201] Measurement program selection interface: This interface provides measurement program selection, adding, deleting and other functions. Through this interface function, it is possible to save the measurement parameters of different workpieces, save multiple groups of parameters, and switch parameters according to the actual workpiece being inspected.
[0202] Data interaction interface: This interface realizes the real-time curve display of the measurement data of each channel of the workpiece, including the real-time change curve of the workpiece's real-time size, dispersion and standard deviation, and records the user operation records in the form of data tables.
[0203] like Fig.10 As shown in the figure, the operation process of the gas and electricity meter is as follows:
[0204] After the system is powered on, the hardware initialization process is executed.
[0205] The current system is an embedded system, and the main hardware included is temperature and humidity sensor, differential pressure sensor, air source pressure sensor, serial communication touch screen, signal processing circuit and power supply circuit.
[0206] First, perform hardware initialization. The specific steps include:
[0207] (1) Initialize the IIC communication port of the temperature and humidity acquisition sensor and initialize the relevant registers of the sensor.
[0208] The pin settings of the AD sampling chip for pressure difference and air source pressure analog signals and the FMC bus initialization settings for parallel output of AD sampling digital signals are implemented. The input range, reset, start conversion pin, etc. are set through the pin settings; the FMC bus initialization settings implement the settings of read and write addresses, read and write time parameters, and read and write mode parameters.
[0209] Initialize the touch screen serial communication interface, and set the port, baud rate, receive interrupt, etc. for the RS232 serial communication between the MCU and the touch screen.
[0210] (2) After completing the hardware initialization, execute the peripheral self-test process. The self-test process first performs a touch screen communication self-test. The touch screen sets the self-test bit and determines the communication status between the MCU and the touch screen by reading the touch screen self-test bit. Perform gas source pressure detection and temperature and humidity detection. If the detection parameter exceeds the system set threshold, the detection value is displayed on the touch screen and the user is prompted to check the gas source pressure and equipment environment.
[0211] (3) The data initialization process reads various detection parameters from the power-off storage module and stores them in related variables.
[0212] Specific test parameters include:
[0213] 1. Air source pressure (humidity) - pressure difference compensation calibration coefficient;
[0214] 2. Multi-channel coefficients for pressure difference-dimension value conversion;
[0215] 3. Temperature-dimension value compensation calibration coefficient;
[0216] 4. Measurement setting parameters, mainly the reference value, warning value and alarm value parameters of each channel of the workpiece;
[0217] 5. The user selects the measurement program number.
[0218] Among the above parameters, the air source pressure (humidity) - pressure difference compensation coefficient acquisition algorithm is applicable to the pressure difference compensation in all workpiece size measurement processes; the pressure difference - size value conversion, temperature - size value compensation coefficient acquisition and measurement setting parameters need to be set differently for different workpieces. Therefore, different parameters are stored for each workpiece, which can be switched and selected through the measurement program interface.
[0219] After entering the main interface of the system, real-time measurement of the dimensions of each position of the workpiece, measurement conversion and calibration operations, and real-time curves and user operation records are performed according to user operations.
[0220] Main interface dimension measurement process: This process includes the process of obtaining the real-time differential pressure value of each channel, the process of converting and calibrating the differential pressure value data of each channel, the process of calculating and displaying the workpiece statistics and the process of stopping the detection operation. This interface mainly realizes the acquisition and processing of the dimensions of each channel of the workpiece, and performs statistical calculation and alarm control based on the dimension data.
[0221] Setup interface: This interface includes the entry operations of the measurement and calibration conversion interface, measurement setup interface, and measurement program selection interface. The measurement and calibration conversion interface can perform source air pressure (humidity)-pressure differential compensation calibration, multi-channel pressure differential-dimensional value conversion, and temperature-dimensional value compensation calibration.
[0222] Data interaction interface: This interface displays the real-time waveform of the dimensional measurement results and records user operations, alarm information, etc. in a list format.
[0223] like Fig.11 , Fig.12 As shown, in the present invention, the acquisition module, the differential operational amplifier, the filter circuit, and the AD9609 high-precision acquisition chip form a high-precision anti-interference pressure difference conversion circuit, which realizes high-precision and interference-free AD conversion of the pressure difference analog signal and provides an accurate pressure difference signal for the measurement system.
[0224] The conversion circuit uses a differential operational amplifier circuit to realize pressure difference signal processing, improves the signal-to-noise ratio, and can suppress common-mode interference; the high-frequency interference signal is filtered out through the filter circuit, and the high-precision multi-channel synchronous acquisition circuit is used to achieve high-speed synchronous sampling of the pressure difference signal, providing rich processing data for the measurement system, thereby improving the measurement accuracy.
[0225] The circuit also includes: an isolation circuit and an AC coupling circuit connected in sequence, which are arranged between the acquisition circuit and the filter circuit. The output end of the filter circuit is connected to a differential operational amplifier, which outputs the collected voltage difference signal after amplification.
[0226] The pressure sensor in this circuit is a pressure sensor suitable for differential pressure measurement. Its core part is a silicon piezoresistive pressure sensitive chip. The front and back sides of the pressure sensitive chip sense different pressures through the pressure nozzle, thereby forming a pressure difference and generating a voltage signal proportional to the pressure difference. The built-in circuit chip digitally compensates for the sensor's offset, sensitivity, temperature drift and nonlinearity.
[0227] Signal processing circuit: The sensor passes through the bridge amplification circuit composed of operational amplifiers, and then passes through the IOS100 photoelectric isolation circuit to isolate the acquisition circuit and the processing circuit to increase system stability.
[0228] Due to the characteristics of the acquisition circuit, the output signal is mainly concentrated in -15-1V, and the center of the signal is -7V, which causes trouble for the post-processing. Therefore, through the capacitor AC coupling circuit, the center of the signal is placed at 0V, and then filtered through the 10KHz active filter circuit, and then amplified to the AD9609 high-precision acquisition chip.
[0229] The humidity sensor acquisition circuit is shown in Figure 13, and the power supply circuit is shown in Figures 14 to 19 As shown. The principle of the power supply circuit is: the input 220V is stepped down to +5V through the power frequency transformer, and then stepped up to 24V through DCDC. The advantage of this is that when the external 220V power supply fluctuates, if it is directly stepped down to 24V, it may cause fluctuations in 24V. However, it is stepped down to 5V first, and then stepped up to 24V, using 5V as a buffer to ensure the stability of 24V.
[0230] The power supply circuit uses DCDC to reduce the voltage of 24V to ±15V for the acquisition circuit. Another circuit uses DCDC to reduce the voltage of 24V to ±15V for the signal processing circuit of IOS100 optoelectronic isolation chip. Then reduce the ±15V of signal processing to ±5V for the op amp power supply of the post-processing circuit and the power supply of the microcontroller peripheral chip. Then reduce the voltage of 5V to 3.3V to power the microcontroller.
[0231] In the present invention, based on the multi-channel synchronous acquisition technology, multi-channel synchronous sampling and dimension measurement are realized. According to the user's settings for multi-channel data and workpiece measurement, the control module can also realize the calculation of statistical quantities such as the straightness, roundness, coaxiality, verticality, flatness, etc. of the workpiece axis line, thereby realizing the measurement of multiple dimensions of the workpiece.
[0232] like Fig. 20As shown, the specific steps include:
[0233] S4.0: In order to ensure the stability of data measurement and display, the real-time dimension values after multiple compensation calibration in each cycle are stacked and each round of data is stored in the stack array. When the stack is full of data, the data first stored in the stack is discarded according to the test dimension stack size set by the user, and the remaining data in the stack array is moved forward by one storage unit, and then the newly acquired real-time dimension value is placed in the last storage unit of the stack, thereby realizing a first-in-first-out stack operation.
[0234] After each round of cycle data completes the stack operation, the data in the stack array is filtered by standard deviation, mutation points are removed, and the average value is calculated. This average value is used as the final workpiece size value of the current processing channel.
[0235] S4.1: Calculate the taper, roundness, straightness, cylindricity and flatness of the workpiece currently being measured based on the statistical information of the workpiece selected by the user and the current channel data. For different types of workpieces, calculate the indirect statistics of the workpiece based on the measurement of the dimensions of different positions of the workpiece by each channel.
[0236] S4.10: For conical or frustoconical workpieces, calculate the taper.
[0237] The calculation formula of cone taper is: cone taper = base diameter / cone height;
[0238] The calculation formula of the frustum taper is: frustum taper = |upper base diameter-lower base diameter| / frustum height.
[0239] Among them, the diameter of the cone base is D, the height of the cone is H, and the size of the workpiece at each channel is CS i , the vertical spacing between adjacent channels is CVD i , where i is the channel number, then:
[0240] Cone taper = D / H = |CS i -CS i-1 | / CVD i ,
[0241] Cone taper = |CS i -CS i-1 | / CVD i ,
[0242] Therefore, the taper of the frustum and cone can be calculated by the size values of two adjacent channels and the vertical spacing between the two channels, where the vertical spacing between adjacent channels is a fixed value, which the user can also input through the measurement setting interface. After the taper values obtained from all adjacent channels are calculated, all data can be averaged to obtain the total taper of the workpiece.
[0243] S4.11: For circular workpieces, such as cylindrical workpieces, spherical workpieces and conical workpieces, the workpiece can be rotated to collect data from the same channel of the workpiece multiple times and then the roundness calculation is performed. The calculation method is the difference between the maximum size value and the minimum size in the multiple sampling data. The number of sampling data can be set through the measurement setting interface. The mutation data in the multiple sampling data can be eliminated through the standard deviation to prevent the concave and convex points on the workpiece from affecting the accuracy of the roundness calculation.
[0244] S4.12: For cylindrical workpieces, straightness, cylindricity and flatness can be counted.
[0245] Straightness is the maximum runout deviation of all channel dimensions. The maximum and minimum values of all measured channel dimensions are counted, and straightness is the difference between the maximum and minimum dimensions.
[0246] Cylindricity is calculated by rotating the same cylindrical workpiece and collecting data from each channel, then calculating the scattered difference of all data from each channel. The scattered difference value is the cylindricity of the workpiece. Since the size of the workpiece fluctuates at different positions, the deviation of the workpiece size measurement value is used to determine whether the workpiece has completed the rotation operation. The 10 size values (this value can be set and adjusted through the interface) collected continuously by the current channel are judged. If the scattered difference of these 10 data is less than the set threshold, the original data storage of the cylindricity calculation begins. The same method is also used to judge the end of the cylindricity data collection. After the data collection is completed, the cylindricity calculation is performed.
[0247] S4.2: According to the warning value and upper and lower deviation values of each channel in the measurement setting interface, the real-time dimension value of each channel is alarmed and warned. If the difference between the real-time dimension value of the current channel and the reference value of the channel set by the system is greater than the upper or lower deviation of the alarm set for the current channel, the system will sound a buzzer alarm and pop up a prompt message on the main interface of the touch screen; if it is less than the alarm value, it is determined whether the difference is greater than the warning value. If so, a buzzer warning is issued and the warning is displayed on the main interface of the touch screen. Here, for alarms and warnings, the buzzer alarm is distinguished by different alarm frequencies, and the main interface of the touch screen is distinguished by different real-time dimension colors.
[0248] S4.3: The main MCU sends the real-time size of the workpiece obtained by each measurement channel, the measurement statistics set by the user and the alarm information to the touch screen. The touch screen will display the real-time size of the workpiece in different colors according to the alarm information and display the statistics selected by the user.
[0249] Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
Claims
1. A gas and electricity meter based on pressure difference and size paging calibration conversion, characterized in that: include: The acquisition module includes multiple sensors, which collect temperature and humidity of the workpiece, air source pressure and probe pressure difference signals through multiple acquisition channels; The steps of collecting pressure difference by the collection module include: The real-time differential pressure data is acquired through the multi-channel differential pressure acquisition process. If the number of acquired data reaches the set number of acquisitions, the multi-channel data extraction and single-cycle data processing process is executed to extract and process the data; After a single data acquisition is completed, a pressure difference data in the FIFO operation structure is taken out for judgment. If the pressure difference is greater than the preset trigger range value, the workpiece is not currently placed or the workpiece is not placed as required, then the variable of the number of times the pressure difference exceeds the threshold is incremented by 1, and the pressure difference data judgment is performed again at the beginning of the next round of measurement refresh cycle; If the pressure difference is within the trigger range, the variable of the number of times the pressure difference exceeds the threshold value is cleared; if the number of times the pressure difference exceeds the threshold value is greater than the set value, an alarm is issued and the real-time measurement ends, and the measurement starts after the user places the workpiece in the specified position; The steps of the multi-channel data extraction and single-cycle data processing flow are specifically as follows: Extraction steps: Extract all unextracted data in the FIFO operation structure array within the corresponding cycle. The pressure difference storage array in the FIFO operation structure is stored in FIFO form, that is, the data stored first will be kicked out of the array first after the array is full. Calculate the standard deviation of the extracted data. The standard deviation calculation formula is: Among them, N is the number of data, x i is the data at the corresponding position in the array, is the average value of all data in the array; according to the normal distribution characteristics of the data, 3σ is used to eliminate abnormal points and all data outside the range of x±3σ are eliminated; The eliminated data are averaged, the average is stored in the pressure difference measurement storage array, and the number of storages is recorded; Data processing steps: The data processed in a single cycle is stored in the pressure difference measurement storage array. When the data in the array reaches the number of pressure difference real-time data processing, the data in the corresponding array is processed; The Gaussian filtering method is used to process the data and then the average is calculated to obtain the real-time pressure difference at the current moment; The current sampling and data processing are completed, all variables of the current sampling are cleared, and the next round of data sampling and processing begins again; The control module calibrates the pressure difference signal based on the collected signal through the air source pressure and pressure difference compensation algorithm; based on the compensated pressure difference signal, the pressure difference signal is converted into the corresponding workpiece size through the pressure difference size paging conversion algorithm; When the pressure difference size paging conversion algorithm performs page conversion operations, the pressure difference values of each page are equal at the beginning and the end, and the starting size value of each page and the ending size value of the previous page and the ending size value of each page and the starting size value of the next page are within a certain distance.
2. The gas and electricity meter based on pressure difference and size paging calibration conversion according to claim 1 is characterized in that: The steps of the gas source pressure and pressure difference compensation algorithm include: Calculate the gas source pressure and pressure difference compensation value: The air source pressure and humidity are used as parameters for pressure difference compensation. The relationship between the air source pressure, humidity and pressure difference is: △DP=f(Gsp,H) Among them, Gsp is the air source pressure, △DP is the pressure difference compensation value, H is the current humidity, Gsp and △DP are in a polynomial relationship, H and △DP-Gsp curve are in an interval relationship, and f is the polynomial function of the air source pressure Gsp and the pressure difference compensation value △DP in the specified temperature interval; Determine the current humidity: If the current humidity exceeds the system set humidity, the system prompts that the humidity is too high and needs to be confirmed; if the current humidity is less than the system set humidity, the current humidity corresponds to the interval of the △DP-Gsp compensation curve, and the fitting coefficient of the △DP-Gsp compensation curve in the corresponding interval is called to compensate the pressure difference of the air source pressure. The calculation formula is: ΔDP=f(Gsp)=a6*Gsp 6 +a5*Gsp 5 +a4*Gsp 4 +a3*Gsp 3 +a2*Gsp 2 +a1*Gsp+a0; Among them, the gas source pressure Gsp uses a multi-order polynomial fitting curve to compensate the pressure difference compensation value △DP, α 0~6 is a multi-order polynomial compensation coefficient, which is obtained by a corresponding compensation coefficient acquisition algorithm; The pressure difference compensation value is used to compensate the current real-time pressure difference to obtain the compensated real-time pressure difference, and the formula is: DP=DP c +ΔDP; Among them, DP is the real-time pressure difference after compensation, DP c is the real-time pressure difference of each channel, and △DP is the pressure difference compensation value obtained by converting the compensation fitting polynomial of the gas source pressure to the pressure difference.
3. The gas and electricity meter based on pressure difference and size paging calibration conversion according to claim 2 is characterized in that: The air source pressure and pressure difference compensation coefficient acquisition algorithm, when acquiring the compensation coefficient, if the deviation between the size of the workpiece to be measured and the size of the workpiece currently calibrated is large, the air source pressure compensation calibration for the pressure difference is re-performed; if the deviation is small, the coefficient compensation algorithm is used for calibration; The specific steps of obtaining the compensation coefficient include: Get the real-time humidity of the current environment regularly; Determine whether the current ambient humidity is within the selected humidity range. If so, proceed to the next step. Otherwise, prompt the user to adjust the ambient humidity or modify the humidity range. If the current humidity meets the requirements, the user is prompted to put in the standard part, input the standard part size value and the probe model, and obtain the calibration data bound to the standard part size and the probe model; Divide multiple calibration intervals according to the set standard air source pressure, obtain the air source pressure value and pressure difference value in all calibration intervals, adjust the air source pressure to the standard pressure, and obtain the air source pressure and pressure difference compensation calibration coefficient for the current humidity; adopt the method of fitting a univariate polynomial to perform compensation calibration, and obtain the fitting coefficient by the least squares method, and the pressure difference and the air source pressure are a univariate sixth-order polynomial function relationship; If the humidity interval is switched and the calibration coefficients are refitted before the switch, the calibration fitting coefficients of the current humidity interval are saved. The system pops up a dialog box asking whether to save the fitting coefficients. Select to save the fitting coefficients before switching the humidity interval. After the fitting coefficients are saved, the user is prompted to adjust the calibration environment humidity to adjust the current environment humidity to the set humidity range; repeat the above steps to obtain the air source pressure and pressure difference compensation calibration coefficients corresponding to the set humidity range.
4. The gas and electricity meter based on pressure difference and size paging calibration conversion according to claim 1 is characterized in that: The specific steps of the pressure difference size paging conversion algorithm for pressure difference size conversion include: Divide the pressure difference values into pages, put the standard parts into the specified positions, obtain the corresponding pressure difference values, turn the current pressure difference page to the corresponding page based on the current pressure difference value, and fill the current pressure difference value into the corresponding numerical item; if the pressure difference values between each page are equal at the beginning and the end, proceed to the next step; The pressure difference and size are converted using a multi-order polynomial, and the formula is: SV i =b 6i *DP 6 +b 5i *DP 5 +b 4i *DP 4 +b 3i *DP 3 +b 2i *DP 2 +b 1i *DP+b i ; Among them, SV i is the real-time size of the corresponding page after conversion, b 6i 、b 5i 、b 4i 、b 3i 、b 2i 、b 1i 、b i is the polynomial fitting coefficient of the corresponding page, which is obtained by the corresponding pressure difference dimension conversion coefficient acquisition algorithm, and DP is the real-time pressure difference after compensation by the air source pressure.
5. The gas and electricity meter based on pressure difference and size paging calibration conversion according to claim 4 is characterized in that: The steps of the pressure difference size conversion coefficient acquisition algorithm include: The real-time differential pressure value and the input differential pressure value are obtained, and the system determines whether the current differential pressure value is within the set range. If so, the current differential pressure value is filled in the differential pressure value of the corresponding calibration item; According to the dimension values of the start item and the end item and the total number of calibration items, the dimension values of the pressure difference are divided, and all calibration dimension reference values of the current page are obtained and the reference values are corrected; Select the corresponding calibration item size value, and the user places the corresponding standard part according to the selected calibration item size value, and fills in the actual size value that is smaller than the previous calibration item size value and larger than the next calibration item size value in the interface; If all the standard part dimension values and corresponding pressure difference values on this page meet the requirements, calibration will start. If there are modification items for each pressure difference and dimension input value, the modification item data will be saved, and the dimension value will be calculated by a multi-order polynomial function. The dimension values and corresponding pressure difference values of all groups on the current page will be fitted by the least square method to obtain the coefficients corresponding to the multi-order polynomial function, and the calibration coefficients will be displayed in the interface at the same time. In the pressure difference size conversion coefficient acquisition interface, page conversion operations are performed, and the page conversion operations include: adding a page, deleting a page, turning up a page, and turning down a page.
6. The gas and electricity meter based on pressure difference and size paging calibration conversion according to claim 5 is characterized in that: The operation steps of the conversion page are: If the previous page button is clicked, it is first determined whether the current page is the home page. If so, the user is prompted that the page is the home page. Otherwise, the calibration page switching process is executed to complete the calibration parameters and calibration coefficients. Subtract 1 from the current page record variable, and obtain the calibration parameters and calibration coefficients according to the current page; close the current calibration page, open the corresponding calibration page according to the current page and display the calibration parameters and calibration coefficients; If you click the add page button, it will first determine whether the current page is the maximum page set by the system. If so, the user will be prompted that the page is already the maximum page and cannot be added; Otherwise, determine whether the current page is equal to the total page number. If so, execute the calibration page adding process. Otherwise, prompt the user to turn to the last page before adding a page. If the delete page button is clicked, first determine whether the current page is equal to the total page number. If so, further determine whether the current page is the home page. If it is the home page, the user is prompted that there is only one page and the page cannot be deleted. Otherwise, the calibration page deletion process is executed; Click the Exit button in each calibration page to exit the pressure difference-dimension value conversion coefficient acquisition interface.
7. The gas and electricity meter based on pressure difference and size paging calibration conversion according to claim 6 is characterized in that: The calibration page switching process is as follows: Determine whether there is any calibration parameter modification on the current page. If so, a parameter save dialog box pops up to save the calibration parameters. Determine whether the calibration coefficient is updated, and if there is an updated coefficient, save the calibration coefficient; The calibration parameters and calibration coefficients are stored in temporary variables when entering the interface. When exiting this page, the current parameters are compared with the parameters stored in the temporary variables to determine whether the parameters have been modified.
8. The gas and electricity meter based on pressure difference and size paging calibration conversion according to claim 6 is characterized in that: In the operation steps of switching pages, if the next page button is clicked, it is necessary to determine whether the current page is the last page. If it is the last page, the user is prompted that it is the last page. Otherwise, the page switching process is executed.
9. The gas and electricity meter based on pressure difference and size paging calibration conversion according to claim 6, characterized in that: The specific steps of the calibration page adding process include: Determine whether there are any calibration parameter and calibration coefficient modifications on the current page. If so, save them according to the user's operation; Add 1 to the current page storage variable, update the total page number, and calculate the calibration reference size values based on the current page; On the calibration interface, enter the calibration reference value termination data and the number of calibration items on the next page. The reference value spacing for each calibration item is: Calculate the reference value of each calibration dimension on the next page based on the spacing value; Close the current calibration page, open the corresponding calibration page based on the current page and display the calibration size value.
10. The gas and electricity meter based on pressure difference and size paging calibration conversion according to claim 6, characterized in that: The specific steps of the calibration page deletion process are: Determine whether the calibration parameters and calibration coefficients of the current page have been modified, and if so, save them according to the user operation; Subtract 1 from the current page storage variable and update the total page number, and obtain the current page calibration parameter and calibration coefficient according to the current page storage variable; Close the current calibration interface, open the corresponding calibration page based on the current page and display the calibration parameters and calibration coefficients.
Citation Information
Patent Citations
Device and method for calibrating differential pressure sensor in low-pressure environment with high or low temperature
CN105651458A
Car air pressure detection device in car that closes door in twinkling of an eye
CN208043309U
A Smart Multi-Channel Pneumatic Measurement System Based on Industrial Internet of Things
CN215217531U
Method and system for determining the height of a device above ground
US20140172351A1