Power saving method and system of battery power supply pressure transmitter
By calculating the pressure change rate of the pressure transmitter and dynamically adjusting the sampling frequency and communication method, the problem of ineffective energy consumption of battery-powered pressure transmitters during the pressure stabilization period is solved, thus extending the battery life of the equipment.
Patent Information
- Application Number
- CN202511124390.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2025-11-04
AI Technical Summary
Battery-powered pressure transmitters suffer from wasted energy due to fixed sampling frequencies and ineffective integration calculations, which affects the long-term stable operation of the equipment in power-free scenarios.
By acquiring the pressure value measured by the pressure transmitter, calculating the pressure change rate, generating PID control instructions and freezing the integral term calculation, using a predictive algorithm to process the pressure change rate to output the steady-state period determination result, dynamically adjusting the sampling frequency, and triggering a pulse signal to replace RS485 communication during the steady-state period.
It significantly reduces ineffective energy consumption during the pressure stabilization period, extends device battery life, and reduces static power consumption and communication power consumption.
Smart Images

Figure CN120890597A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of industrial sensor energy saving, in particular to a power saving method and system of a battery-powered pressure transmitter. BACKGROUND
[0002] In recent years, with the wide application of industrial automation in oil and gas pipeline monitoring, dangerous chemical environment and other unstable power supply scenes, battery-powered pressure transmitters have become key equipment due to their deployment flexibility and safety requirements. The industry focuses on high-precision pressure measurement (such as 0-60MPa range, ±0.1%FS accuracy) to meet the needs of real-time monitoring of pressure changes (such as pump start-stop). However, this field faces serious challenges: first, the battery life is short, and the static power consumption of traditional equipment is as high as 120μA, resulting in a 3.6V lithium sub-battery life usually less than 6 months, and frequent replacement of batteries in remote or dangerous environments increases maintenance costs and risks; second, poor temperature adaptability, conventional temperature compensation algorithms have a residual error of ±0.3%FS in a wide temperature range of -30~70℃, especially at low temperatures, the error increases, affecting the measurement reliability; third, energy imbalance, such as the on-site test of China Petroleum shows that pressure changes only account for 5% of the whole day, but the equipment is fixed at a high frequency of 200Hz sampling, and the RS485 communication power consumption accounts for more than 68%, resulting in 95% of invalid energy waste. These problems seriously restrict the long-term stable operation of the equipment in the power supply scene.
[0003] Traditional technology tries to solve the problems of energy consumption and accuracy through basic PID control algorithm, fixed sampling frequency (such as 200Hz) and RS485 communication protocol. For example, PID control is used for pressure error compensation, fixed sampling ensures data real-time, and RS485 realizes data transmission. However, these schemes have significant defects: static power consumption is not optimized, continuous working current >120μA, integral term invalid calculation increases by 40% at low temperature, unable to dynamically adapt to pressure changes; temperature drift compensation is insufficient, conventional algorithms have a residual error of ±0.3%FS in a wide temperature range, resulting in a sharp drop in low-temperature measurement accuracy; communication strategy is rigid, fixed sampling frequency causes a large amount of invalid data transmission during pressure stabilization, and RS485 single power consumption is as high as 150mAs, with low energy efficiency. These problems expose the poor adaptability of traditional technology to dynamic working conditions, and the inability to balance energy consumption and accuracy, which urgently needs innovative methods to break through the bottleneck.
[0004] In summary, how to solve the problem of invalid energy waste caused by fixed sampling frequency and invalid integral calculation of battery-powered pressure transmitter during pressure stabilization is a problem that needs to be solved. SUMMARY
[0005] The main purpose of the present application is to provide a battery-powered pressure transmitter power saving method and system to at least solve the problem of invalid energy waste caused by fixed sampling frequency and invalid integral calculation during the pressure stable period of the battery-powered pressure transmitter, significantly reducing the invalid energy waste during the pressure stable period, thereby effectively prolonging the service life of the device battery.
[0006] In order to achieve the above-mentioned purpose, the present application provides a battery-powered pressure transmitter power saving method and system.
[0007] In the first aspect, the present application provides a battery-powered pressure transmitter power saving method, which comprises: acquiring the pressure value measured by the pressure transmitter and calculating the pressure change rate based on the pressure value; generating a PID control instruction according to the pressure change rate, and freezing the integral term operation in the PID control instruction when the error between the pressure value and the set value is less than a preset threshold; processing the pressure change rate using a prediction algorithm to output a pressure stable period judgment result; dynamically adjusting the sampling frequency based on the pressure stable period judgment result; when the pressure stable period judgment result indicates a stable state, triggering a pulse signal output to replace the RS485 communication.
[0008] Specifically, the acquisition of the pressure value measured by the pressure transmitter and the calculation of the pressure change rate based on the pressure value comprises: acquiring the pressure raw value through the MEMS piezoresistive chip of the pressure transmitter; performing sliding average filtering processing on the pressure raw value to output a filtered pressure value; based on the current value and the historical value of the filtered pressure value, calculating the pressure change rate within a unit time.
[0009] Specifically, the generation of a PID control instruction according to the pressure change rate, and the freezing of the integral term operation in the PID control instruction when the error between the pressure value and the set value is less than a preset threshold, comprises: selecting a PID parameter mode according to the interval range to which the pressure change rate belongs; generating a control instruction containing a proportional term, an integral term, and a differential term based on the PID parameter mode; when the absolute value of the error between the pressure value and the set value is less than 0.05% of the full scale range of the pressure transmitter, freezing the integral term operation in the control instruction.
[0010] Specifically, the processing of the pressure change rate using a prediction algorithm to output a pressure stable period judgment result comprises: input the pressure change rate into a state transition equation of a Kalman filter to predict a pressure change trend in a next period; update a covariance matrix of the Kalman filter based on a predicted value of the pressure change trend and an actual observed value; compare a maximum eigenvalue of the covariance matrix with a preset convergence threshold value, and output the pressure stationary period determination result containing a stationary state, a regular monitoring state and a non-stationary state.
[0011] Specifically, the dynamic adjustment of the sampling frequency based on the pressure stationary period determination result comprises: when the pressure stationary period determination result indicates the non-stationary state, the sampling frequency is set to 200 Hz; when the pressure stationary period determination result indicates the regular monitoring state, the sampling frequency is set to 1 Hz; when the pressure stationary period determination result indicates the stationary state, the sampling frequency is set to 0.00028 Hz.
[0012] Specifically, the triggering of the pulse signal output to replace the RS485 communication when the pressure stationary period determination result indicates the stationary state comprises: reading a current pressure value of the pressure transmitter; calculating a pulse width control signal according to a ratio of the current pressure value to a full scale of the pressure transmitter; outputting a pulse signal corresponding to the pulse width control signal through a pulse generator.
[0013] Specifically, the comparison of the maximum eigenvalue of the covariance matrix with the preset convergence threshold value and the output of the pressure stationary period determination result containing the stationary state, the regular monitoring state and the non-stationary state comprise: if the maximum eigenvalue ≤ λ1, output a determination result indicating the stationary state; if the maximum eigenvalue > λ1 and ≤ λ2, output a determination result indicating the regular monitoring state; if the maximum eigenvalue > λ2, output a determination result indicating the non-stationary state; wherein λ1 and λ2 represent a first preset convergence threshold value and a second preset convergence threshold value respectively.
[0014] In a second aspect, the application provides a power saving system of a battery-powered pressure transmitter, which applies the power saving method of the first aspect, and comprises: a measurement and calculation module configured to acquire a pressure value measured by the pressure transmitter and calculate a pressure change rate based on the pressure value; The control instruction generation module is connected with the measurement calculation module, and is configured to generate a PID control instruction according to the pressure change rate, and freeze integral term operation in the PID control instruction when an error between the pressure value and a set value is less than a preset threshold value. The prediction processing module is connected with the measurement calculation module, and is configured to process the pressure change rate by using a prediction algorithm and output a pressure stable period determination result. The sampling adjustment module is connected with the prediction processing module, and is configured to dynamically adjust a sampling frequency based on the pressure stable period determination result. The communication switching module is connected with the prediction processing module and the sampling adjustment module, and is configured to trigger pulse signal output to replace RS485 communication when the pressure stable period determination result indicates a stable state.
[0015] Specifically, the measurement calculation module comprises: The acquisition unit is configured to acquire a pressure original value by using a MEMS piezoresistive chip of the pressure transmitter. The filtering processing unit is connected with the acquisition unit, and is configured to perform sliding average filtering processing on the pressure original value and output a filtered pressure value. The change rate calculation unit is connected with the filtering processing unit, and is configured to calculate a pressure change rate in a unit time based on a current value and a historical value of the filtered pressure value. Specifically, the control instruction generation module comprises: The mode selection unit is configured to select a PID parameter mode according to an interval range to which the pressure change rate belongs. The instruction generation unit is connected with the mode selection unit, and is configured to generate a control instruction comprising a proportional term, an integral term and a differential term based on the PID parameter mode. The integral freezing unit is connected with the instruction generation unit, and is configured to freeze integral term operation in the control instruction when an absolute value of an error between the pressure value and a set value is less than 0.05% of a full scale range of the pressure transmitter.
[0016] The application provides a power saving method and system of a battery-powered pressure transmitter, which comprises the following steps: acquiring a pressure value measured by the pressure transmitter, calculating a pressure change rate, and generating a PID control instruction according to the pressure change rate. When the error between the pressure value and a set value is less than a preset threshold, the integral term operation in the PID control instruction is frozen to avoid invalid integral calculation energy consumption. The pressure change rate is processed by using a prediction algorithm to output a pressure stable period judgment result. Based on the result, the sampling frequency is dynamically adjusted to reduce the invalid energy consumption caused by the fixed sampling frequency. When the pressure stable period judgment result indicates a stable state, a pulse signal output is triggered to replace RS485 communication to reduce communication energy consumption. The method solves the problem of invalid energy consumption waste caused by the fixed sampling frequency and invalid integral calculation of the battery-powered pressure transmitter in the pressure stable period, significantly reduces energy consumption, and effectively prolongs the service life of the device battery. BRIEF DESCRIPTION OF DRAWINGS
[0017] The accompanying drawings, which form a part of the present description, illustrate the present application and, together with the written description, serve to explain the application. In the drawings: Figure 1 A flowchart of the power saving method of the battery-powered pressure transmitter provided by the application; Figure 2 A connection diagram of the power saving system of the battery-powered pressure transmitter provided by the application.
[0018] The specific embodiments of the application have been shown and described in the above-described drawings, and will be described in more detail hereinafter. These drawings and written description are not intended to limit the scope of the inventive concept in any way, but to illustrate the inventive concept to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical scheme and advantages of the application clearer, the technical scheme of the application will be described clearly and completely below in combination with the drawings in the application. Obviously, the described embodiments are only some of the embodiments of the application, not all. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the application.
[0020] The terms "first", "second", "third", "fourth" and the like (if any) in the specification and claims of the application and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the application described herein can be implemented in an order other than that illustrated or described herein.
[0021] In the present application, the words "exemplary" or "for example" are used to mean example, illustration, or instance, and do not imply any preference or superiority. In fact, the use of the words "exemplary" or "for example" is intended to present concepts in a particular, concrete manner, and not to imply any preference or superiority.
[0022] The application provides a power saving method and system of a battery-powered pressure transmitter. The technical concept of the power saving method is to obtain the pressure value measured by the pressure transmitter and calculate the pressure change rate, generate a PID control instruction, freeze the integral term operation when the error between the pressure value and the set value is less than the preset threshold, and avoid invalid integral energy consumption. A prediction algorithm is used to process the pressure change rate, output a stable pressure period determination result, dynamically adjust the sampling frequency, and reduce the invalid energy consumption caused by fixed sampling. When it is determined that the state is stable, a pulse signal output is triggered to replace the RS485 communication, reduce the communication energy consumption, and prolong the service life of the device battery.
[0023] The technical solutions of the application and how the technical solutions solve the above technical problems will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of the application will be described below with reference to the drawings.
[0024] Figure 1 The flowchart of the power saving method of the battery-powered pressure transmitter provided by the application is shown in FIG. 1. Figure 1 The power saving method of the battery-powered pressure transmitter provided by the embodiment includes the following steps. S101: Obtain the pressure value measured by the pressure transmitter, and calculate the pressure change rate based on the pressure value.
[0025] Specifically, the step of obtaining the pressure value measured by the pressure transmitter and calculating the pressure change rate based on the pressure value includes the following steps. Collecting a pressure original value through a MEMS piezoresistive chip of the pressure transmitter; Performing a moving average filtering process on the pressure original value to output a filtered pressure value; Calculating the pressure change rate in a unit time based on the current value and the historical value of the filtered pressure value.
[0026] The step S101 specifically includes the following steps. Step 1: Collecting a pressure original value through a MEMS piezoresistive chip 1.1 Specific operation: The silicon piezoresistive MEMS chip (range 0-60 MPa, overload capacity 150%) is used to collect pressure signals in real time. When the pressure transmitter is exposed to the measured medium, the Wheatstone bridge of the MEMS chip generates a differential voltage signal due to pressure deformation, and the raw pressure value is output through a 24-bit Σ-Δ ADC conversion (sampling rate 10 SPS) (unit: MPa).
[0027] 1.2 Data recording: The last 5 sampling periods of value (sampling interval Δt = 1 s) are continuously stored to construct the original data queue: .
[0028] Step 2: Sliding average filtering process outputs filtered pressure value 2.1 Algorithm execution: Apply the sliding average filtering algorithm (window size N = 5) to the original data queue to calculate the filtered pressure value at the current time :
[0029] Parameter explanation: : The kth historical original value in the queue (k = 0 represents the current value); = 1 s: Fixed sampling interval.
[0030] 2.2 Output update: Update the filtered pressure value queue : .
[0031] Step 3: Calculate the pressure change rate per unit time 3.1 Change rate formula: Based on the current value of the filtered pressure value and the value at the previous time , calculate the pressure change rate (unit: MPa / s):
[0032] Parameter explanation: Numerator: The difference between adjacent filtered pressure values; Denominator: Fixed time interval Δt = 1 s.
[0033] The step collects the pressure original signal through the MEMS piezoresistive chip, eliminates the sudden noise interference through the sliding average filtering algorithm (window size N=5) to ensure the data stability, and accurately calculates the pressure change rate per unit time (unit: MPa / s) based on the time domain difference of the filtered pressure value. The process provides high reliability input for subsequent dynamic PID control and pressure state prediction, and reduces invalid energy consumption caused by measurement error from the source.
[0034] S102: generating a PID control instruction according to the pressure change rate, and freezing the integral term operation in the PID control instruction when the error between the pressure value and the set value is less than a preset threshold.
[0035] Specifically, the PID control instruction is generated according to the pressure change rate, and the integral term operation in the PID control instruction is frozen when the error between the pressure value and the set value is less than a preset threshold, including: selecting a PID parameter mode according to the interval range to which the pressure change rate belongs; generating a control instruction containing a proportional term, an integral term and a differential term based on the PID parameter mode; freezing the integral term operation in the control instruction when the absolute value of the error between the pressure value and the set value is less than 0.05% of the full scale of the pressure transmitter.
[0036] The step S102 specifically includes: Step 1: selecting a PID parameter mode according to the pressure change rate interval 1.1 Specific operation: read the pressure change rate calculated in S101 (unit: MPa / s), select a PID parameter mode according to the interval to which the numerical value belongs: interval 1 ( >0.5): select a full-parameter PID mode ( =2.0, =0.5, =1.0), corresponding to the pressure mutation state (such as pump start-stop); interval 2 (0.1 ≤0.5): select a regular PID mode ( =1.5, =0.3, =0.8), corresponding to the regular monitoring state; interval 3 ( ≤0.1): select a simplified PID mode ( =1.0, =0.1, =0.2), corresponding to the pressure stable state.
[0037] 1.2 Parameter basis: The interval threshold is derived from the percentage of the full scale (FS=60MPa) of the pressure transmitter: 0.5=10%×FS / 60s (i.e. ±10% FS / s); 0.1=2.5%×FS / 60s (i.e. ±2.5% FS / s).
[0038] Step 2: Generate control instruction containing proportional term, integral term, derivative term 2.1 Control instruction calculation formula:
[0039] Parameter description: : Current time control instruction (unit: mA); : Set value SP and actual value deviation (unit: MPa); : Respectively represent the proportional, integral, and derivative coefficients (selected by step 1); : Historical error accumulation (calculated by discrete integration); : Error change rate (Δt=1s).
[0040] 2.2 Discrete implementation: Read the current filtered pressure value (from S101); Calculate the current error (set SP=20.0MPa); Update the integral term: ; Calculate the derivative term: ; Output control instruction: .
[0041] Step 3: Condition execution for freezing integral term operation 3.1 Freezing condition: When the absolute value of the error between the pressure value and the set value satisfies: .
[0042] 3.2 Freezing operation: If the condition is met, forcibly reset the integral term accumulation: .
[0043] And maintain until ≥0.03MPa to restore integral operation.
[0044] The step dynamically selects the PID parameter mode (full parameter / normal / simplified) by the pressure change rate to generate a control instruction containing proportional, integral, and differential terms; when the absolute value of the pressure error is less than 0.05% of the full scale (i.e. 0.03 MPa), the integral term operation is frozen to eliminate invalid historical error accumulation calculation in the steady state. According to the oil field test, this operation reduces 40% of the invalid calculation in the pressure stabilization period, the static power consumption is reduced to 3.2 μA, the daily total energy consumption is reduced from 44.6 mAh to 5.39 mAh, and the battery life is significantly extended to ≥18 months.
[0045] S103: using a prediction algorithm to process the pressure change rate to output a pressure stabilization period determination result.
[0046] Specifically, the step of using a prediction algorithm to process the pressure change rate to output a pressure stabilization period determination result comprises: inputting the pressure change rate into a state transition equation of a Kalman filter to predict a next period pressure change trend; updating a covariance matrix of the Kalman filter based on the predicted value and the actual observed value of the pressure change trend; comparing the maximum eigenvalue of the covariance matrix with a preset convergence threshold value to output the pressure stabilization period determination result containing a stable state, a normal monitoring state and a non-stable state, and specifically, the step of comparing the maximum eigenvalue of the covariance matrix with a preset convergence threshold value to output the pressure stabilization period determination result containing a stable state, a normal monitoring state and a non-stable state specifically comprises: if the maximum eigenvalue ≤ λ1, outputting a determination result indicating a stable state; if the maximum eigenvalue > λ1 and ≤ λ2, outputting a determination result indicating a normal monitoring state; if the maximum eigenvalue > λ2, outputting a determination result indicating a non-stable state; wherein λ1 and λ2 represent a first preset convergence threshold value and a second preset convergence threshold value respectively.
[0047] The step S103 specifically comprises: Step 1: Kalman filter initialization 1.1 parameter setting: state vector (pressure value and change rate); state transition matrix ; observation matrix (only observe the pressure value); process noise covariance (system inertia); observation noise covariance (ADC quantization error). Step 2: State prediction 2.1 Input data: Current pressure rate of change from S101 and filtered pressure value .
[0048] 2.2 State prediction equation:
[0049] Parameter explanation: : Last time state estimation (initially ); : Current time prior state estimation, whose second component is the predicted next period pressure change trend (core output).
[0050] 2.3 Output: Predicted pressure change trend . Step 3: Covariance matrix update 3.1 Kalman gain calculation: ◦ Parameter explanation: : Prior estimation covariance; : Last time posterior covariance (initially ).
[0051] 3.2 State and covariance update:
[0052] Parameter explanation: : Actual observation value; Identity matrix (identity transformation reference); : Updated covariance matrix. Step 4: Maximum eigenvalue comparison and state determination 4.1 Calculate maximum eigenvalue: Perform eigenvalue decomposition on and extract the maximum eigenvalue .
[0053] 4.2 Double threshold state determination: If → Output stationary state; If → Output regular monitoring state; If → Output non-stationary state.
[0054] Parameter Description: λ1=0.01, λ2=0.1; The state result is stored as a 3-bit binary code (00: stable, 01: regular, 10: unstable).
[0055] This step accurately predicts the pressure change trend through the Kalman filter (state equation + covariance update), and outputs the stable, regular monitoring, and unstable three-state determination results based on the comparison of the maximum eigenvalue of the covariance matrix and the double threshold (λ1=0.01, λ2=0.1). The misjudgment rate of this determination method in oilfield measurement is reduced to 0.5%, which provides a reliable basis for dynamic sampling (S104) and communication optimization (S105), supports the sampling frequency to be reduced to 0.00028 Hz in the stable pressure period, and reduces the communication energy consumption by 99.99%, and finally realizes the daily total energy consumption of 5.39 mAh (reduced by 87.9% compared with the traditional 44.6 mAh).
[0056] S104: dynamically adjusting the sampling frequency based on the pressure stable period determination result.
[0057] Specifically, the dynamic adjustment of the sampling frequency based on the pressure stable period determination result comprises: when the pressure stable period determination result indicates an unstable state, setting the sampling frequency to 200 Hz; when the pressure stable period determination result indicates a regular monitoring state, setting the sampling frequency to 1 Hz; when the pressure stable period determination result indicates a stable state, setting the sampling frequency to 0.00028 Hz.
[0058] When implemented, step S104 specifically comprises: Step 1: read the pressure stable period determination result 1.1 Input data source: Obtain the pressure stable period determination result (3-bit binary code: 00=stable state, 01=regular monitoring state, 10=unstable state) from S103.
[0059] 1.2 Specific operation: Real-time read the state code in the determination result register, and decode it into executable instructions: Unstable state: binary code 10, corresponding to the pressure mutation period (such as pump start-stop); Regular monitoring state: binary code 01, corresponding to the regular monitoring period; Stable state: binary code 00, corresponding to the stable pressure period.
[0060] Step 2: set the sampling frequency according to the state 2.1 Frequency configuration rule: 2.1.1 Non-stationary state (10): Call the ADC clock controller of STM32L5, set the sampling frequency to 200 Hz (period 5 ms), and start the high-speed continuous sampling mode.
[0061] 2.1.2 Regular monitoring state (01): Switch to low-power timer triggered mode, set the sampling frequency to 1 Hz (period 1 s), and enable single sampling sequence.
[0062] 2.1.3 Stationary state (00): Activate the RTC wake-up mechanism in deep sleep mode, set the sampling frequency to 0.00028 Hz (period about 60 minutes), and only maintain the reference monitoring.
[0063] Step 3: Update sampling frequency and verification 3.1 Frequency switching execution: Write ADC sampling rate register through HAL library function of STM32L5 (C language part code example): “ADC_SetRate(frequency); / / frequency value takes 200 / 1 / 0.00028”.
[0064] Example complete.
[0065] 3.2 Real-time verification mechanism: Read the clock division value of the ADC configuration register to confirm that the actual sampling rate error is <±0.1%.
[0066] This step is based on the pressure stationary period determination result (stationary / regular monitoring / non-stationary state) to dynamically adjust the sampling frequency to 200 Hz, 1 Hz or 0.00028 Hz, realizing multi-modal energy management. According to the oil field test, this mechanism reduces the sampling frequency to 0.00028 Hz during the pressure stable period (accounting for 72% of the whole day), combined with sleep mode, the static power consumption is reduced to 3.2 μA, the daily average sampling energy consumption is only 0.0576 mAh (reduced by 98.5% compared with traditional fixed 200 Hz sampling), and the total system energy consumption is reduced to 5.39 mAh, significantly prolonging the battery life to ≥18 months.
[0067] S105: When the pressure stationary period determination result indicates a stationary state, trigger pulse signal output to replace RS485 communication.
[0068] Specifically, when the pressure stationary period determination result indicates a stationary state, triggering pulse signal output to replace RS485 communication includes: Read the current pressure value of the pressure transmitter; According to the ratio of the current pressure value to the full scale of the pressure transmitter, a pulse width control signal is calculated; A pulse signal corresponding to the pulse width control signal is output by a pulse generator.
[0069] When implemented, step S105 specifically includes: Step 1: Read the current pressure value 1.1 Input data source: Get the filtered pressure value from S101 (unit: MPa) as the current pressure value .
[0070] 1.2 Specific operation: Access the ADC data register of STM32L5 to read the 24-bit pressure sampling value, and linearly convert it to the actual pressure value according to the range 0-60 MPa: Parameter description: ADC_CODE: ADC original sampling value (0~16777215); : 24-bit ADC full scale value (16777215).
[0071] Step 2: Calculate the pulse width control signal 2.1 Pulse width calculation formula:
[0072] Parameter description: : pulse width (unit: millisecond); : current pressure value (unit: MPa); Constant term: 10 ms (basic width), 90 ms (full scale expansion width).
[0073] 2.2 Calculation process: 2.2.1 Calculate the ratio ; 2.2.2 Calculate ; 2.2.3 Limiting processing: if >100, forced =100.
[0074] Step 3: Pulse signal output 3.1 Hardware configuration: Use the TIM3 timer (channel 1) of STM32L5 to configure as PWM mode, and output pin PA6.
[0075] 3.2 Output Operation: 3.2.1 Configure timer TIM3 to operate in PWM mode (pulse width modulation), and set the pulse width control signal... (Unit: milliseconds) Write to the timer's capture / compare register; 3.2.2 Start timer TIM3 channel 1, output duration is A single pulse signal; 3.2.3 After the pulse ends, turn off timer TIM3 to put the pressure transmitter into deep sleep mode.
[0076] This step triggers a pulse signal output during the pressure stabilization period (state code 00), dynamically calculates the pulse width (range 10~100 ms), and outputs a high-precision pulse through a timer hardware. This communication method consumes only 0.02 mAs per cycle, a 99.99% reduction compared to RS485 communication (150 mAs). During the pressure stabilization period (accounting for 72% of the day), the communication energy consumption is reduced from 68% to 22%, supporting a daily average total system energy consumption reduction to 5.39 mAh and extending battery life to ≥18 months.
[0077] This embodiment provides a power-saving method for a battery-powered pressure transmitter. The method first acquires the pressure value measured by the pressure transmitter, calculates the pressure change rate, and then generates a PID control command based on the pressure change rate. When the error between the pressure value and the set value is less than a preset threshold, the integral term calculation in the PID control command is frozen to avoid energy consumption caused by invalid integral calculations. Simultaneously, a predictive algorithm is used to process the pressure change rate and outputs a pressure stabilization period determination result. Based on this determination result, the sampling frequency is dynamically adjusted, changing the fixed sampling frequency mode to reduce energy consumption from invalid sampling. When the pressure stabilization period determination result indicates a stable state, a trigger pulse signal output replaces RS485 communication, reducing communication energy consumption. This method focuses on the energy consumption problem of battery-powered pressure transmitters during the pressure stabilization period. Through the synergistic effect of the above multiple methods, it effectively solves the waste of invalid energy caused by fixed sampling frequency and invalid integral calculations, significantly reducing energy consumption during the pressure stabilization period, and thus effectively extending the battery life of the device.
[0078] Figure 2 A connection diagram of the power-saving system for the battery-powered pressure transmitter provided in this application is shown below. Figure 2 As shown, this embodiment provides a power-saving system for a battery-powered pressure transmitter. This system utilizes… Figure 1 The energy-saving method for the battery-powered pressure transmitter described in the embodiment includes an energy-saving system comprising: The measurement and calculation module is used to acquire the pressure value measured by the pressure transmitter and calculate the pressure change rate based on the pressure value; The control instruction generation module is connected with the measurement calculation module, and is configured to generate a PID control instruction according to the pressure change rate, and freeze integral term operation in the PID control instruction when an error between the pressure value and a set value is less than a preset threshold value. The prediction processing module is connected with the measurement calculation module, and is configured to process the pressure change rate by using a prediction algorithm and output a pressure plateau judgment result. The sampling adjustment module is connected with the prediction processing module, and is configured to dynamically adjust a sampling frequency based on the pressure plateau judgment result. The communication switching module is connected with the prediction processing module and the sampling adjustment module, and is configured to trigger pulse signal output to replace RS485 communication when the pressure plateau judgment result indicates a stable state.
[0079] Specifically, the measurement calculation module comprises: The acquisition unit is configured to acquire a pressure original value by a MEMS piezoresistive chip of the pressure transmitter. The filtering processing unit is connected with the acquisition unit, and is configured to perform sliding average filtering processing on the pressure original value and output a filtered pressure value. The change rate calculation unit is connected with the filtering processing unit, and is configured to calculate a pressure change rate in a unit time based on a current value and a historical value of the filtered pressure value. Specifically, the control instruction generation module comprises: The mode selection unit is configured to select a PID parameter mode according to an interval range to which the pressure change rate belongs. The instruction generation unit is connected with the mode selection unit, and is configured to generate a control instruction containing a proportional term, an integral term and a differential term based on the PID parameter mode. The integral freezing unit is connected with the instruction generation unit, and is configured to freeze integral term operation in the control instruction when an absolute value of an error between the pressure value and a set value is less than 0.05% of a full scale range of the pressure transmitter.
[0080] When implemented, the power saving system of the battery-powered pressure transmitter provided by the embodiment specifically comprises: I. System architecture and module cooperation The system adopts a modular hardware architecture, and each module is physically connected and data-interacted through a dedicated circuit and a bus: 1. The measurement calculation module transmits pressure change rate data to the control instruction generation module through an SPI bus. 2. The measurement and calculation module sends the pressure rate of change data to the prediction processing module through another SPI bus; 3. The prediction processing module transmits a three-state encoding signal to the sampling adjustment module through a GPIO pin; 4. The measurement and calculation module provides the filtered pressure value to the communication switching module through a parallel data bus; 5. The prediction processing module sends a steady state determination signal to the communication switching module through a state signal line.
[0081] Connection design: 10 Mbps high-speed SPI bus is used to ensure real-time data exchange, and GPIO pins are used to achieve millisecond-level state response, meeting the real-time requirements of industrial scenarios.
[0082] II. Module function implementation details 1. Measurement and calculation module 1.1 Acquisition unit structure The silicon piezoresistive MEMS pressure sensor chip is welded on an alumina ceramic substrate, and the copper wires of the Wheatstone bridge are connected to a 24-bit Σ-Δ analog-to-digital converter. When pressure acts, the bridge generates a differential voltage signal, which is sampled by the ADC at a rate of 10 times per second, outputting a digital pressure raw value. The design has a drift error of less than ±0.12% of full scale at -30°C.
[0083] 1.2 Filter processing implementation The DMA controller of the STM32L5 microcontroller directly processes ADC output data and performs five-point moving average filtering: five consecutive sample values are stored and the arithmetic mean is calculated as the effective pressure value. This processing eliminates more than 90% of sudden noise interference.
[0084] 1.3 Change rate calculation mechanism A dedicated dual-port SRAM chip stores historical pressure values, a hardware subtractor calculates the difference between the current value and the value 1 second ago, and then a divider divides by the time interval to output the pressure rate of change in real time (unit: MPa / s).
[0085] 2. Control instruction generation module 2.1 Mode selection circuit Three groups of voltage comparators make up the selection circuit, with threshold values set at 0.1 MPa / s and 0.5 MPa / s. When the pressure rate of change exceeds 0.5, the high-speed mode is triggered, between 0.1-0.5, the regular mode is enabled, and below 0.1, the simplified mode is activated.
[0086] 2.2 Instruction generation hardware STM32L5 built-in hardware PID accelerator executes control algorithm: multiplier calculates proportional term, accumulator handles integral term, differentiator handles derivative term, and finally 4-20mA analog control signal is output by summation circuit.
[0087] 2.3 Integral freeze execution Voltage comparator continuously monitors pressure error value, when error absolute value is less than 0.03MPa, reset signal is sent to accumulator through logic gate to stop integral operation.
[0088] 3. Prediction processing module 3.1 Core processing unit STM32L5 floating point operation unit runs Kalman filter algorithm: State prediction stage: multiply previous state estimate value with state transition matrix; Observation update stage: fuse actual pressure sampling value to correct prediction; Covariance update: complete matrix operation to update system confidence.
[0089] 3.2 State determination circuit Covariance processor completes matrix eigenvalue decomposition, two groups of voltage comparators respectively take 0.01 and 0.1 as threshold to judge, and output three-state binary code (00 / 01 / 10).
[0090] 4. Sampling adjustment module 4.1 Clock control mechanism Programmable frequency divider receives three-state code signal: Code "10" corresponds to 200Hz frequency division coefficient; Code "01" corresponds to 1Hz frequency division coefficient; Code "00" corresponds to 0.00028Hz frequency division coefficient; Switching signal is directly written into clock control register.
[0091] 4.2 Energy saving design In 0.00028Hz mode, automatically turn off ADC reference voltage source, and reduce working current to 3.2 microamperes.
[0092] 5. Communication switching module 5.1 Pulse generation system Timer TIM3 is configured as PWM working mode: Read current pressure value and calculate pulse width; Write time parameters into capture / comparison register; Start timer to output single pulse waveform.
[0093] 5.2 Switching control logic Activate TIM3 timer when receiving state code "00"; enable RS485 drive chip in non-steady state.
[0094] III. System workflow 1.1 Data acquisition stage MEMS sensor converts pressure signal to electrical signal, ADC completes digitization sampling.
[0095] 1.2 Data processing stage Sliding average filter eliminates noise, differential circuit calculates real-time change rate.
[0096] 1.3 Dynamic control stage Voltage comparator selects PID mode, hardware accelerator generates control instructions, error monitoring circuit manages integral freezing.
[0097] 1.4 State prediction stage Kalman filter algorithm processes change rate data, eigenvalue comparator outputs state code.
[0098] 1.5 Resource adjustment stage State code controls clock divider, dynamically adjusts sampling frequency.
[0099] 1.6 Communication output stage Pulse generator outputs width modulation signal in steady state, enables wired communication in non-steady state.
[0100] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the specification and examples be considered as exemplary only, with the true scope and spirit of the application being indicated by the following claims.
[0101] It should be understood that the application is not limited to the precise construction that has been described above and shown in the accompanying drawings, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the application. The scope of the application is limited only by the appended claims.
Claims
1. A power-saving method for a battery-powered pressure transmitter, characterized in that, The method includes: The pressure value measured by the pressure transmitter is obtained, and the pressure change rate is calculated based on the pressure value; A PID control instruction is generated based on the pressure change rate. When the error between the pressure value and the set value is less than a preset threshold, the integral term calculation in the PID control instruction is frozen. The pressure change rate is processed using a prediction algorithm, and the pressure stabilization period determination result is output. The sampling frequency is dynamically adjusted based on the pressure stabilization period determination result. When the pressure stabilization period determination result indicates a stable state, a trigger pulse signal is output to replace RS485 communication.
2. The power-saving method for the battery-powered pressure transmitter according to claim 1, characterized in that, The step of acquiring the pressure value measured by the pressure transmitter and calculating the pressure change rate based on the pressure value includes: The raw pressure value is acquired through the MEMS piezoresistive chip of the pressure transmitter. The original pressure value is subjected to a moving average filter to output the filtered pressure value. Based on the current and historical values of the filtered pressure, the rate of pressure change per unit time is calculated.
3. The power-saving method for the battery-powered pressure transmitter according to claim 1, characterized in that, The step of generating a PID control command based on the pressure change rate, and freezing the integral term calculation in the PID control command when the error between the pressure value and the set value is less than a preset threshold, includes: Select the PID parameter mode based on the range of the pressure change rate; Based on the PID parameter pattern, control instructions containing proportional, integral, and derivative terms are generated. When the absolute value of the error between the pressure value and the set value is less than 0.05% of the full scale of the pressure transmitter, the integral term calculation in the control command is frozen.
4. The power-saving method for the battery-powered pressure transmitter according to claim 1, characterized in that, The step of processing the pressure change rate using a prediction algorithm and outputting the pressure stability period determination result includes: The pressure change rate is input into the state transition equation of the Kalman filter to predict the pressure change trend in the next cycle. The covariance matrix of the Kalman filter is updated based on the predicted and actual observed values of the pressure change trend. The maximum eigenvalue of the covariance matrix is compared with the preset convergence threshold, and the pressure stabilization period determination result, including the stationary state, the normal monitoring state, and the non-stationary state, is output.
5. The power-saving method for the battery-powered pressure transmitter according to claim 1, characterized in that, The dynamic adjustment of the sampling frequency based on the pressure stabilization period determination result includes: When the pressure stabilization period determination result indicates a non-stable state, the sampling frequency is set to 200Hz; When the pressure stabilization period determination result indicates a normal monitoring state, the sampling frequency is set to 1Hz; When the pressure stabilization period determination result indicates a stable state, the sampling frequency is set to 0.00028Hz.
6. The power-saving method for the battery-powered pressure transmitter according to claim 1, characterized in that, When the pressure stabilization period determination result indicates a stable state, triggering a pulse signal output to replace RS485 communication includes: Read the current pressure value of the pressure transmitter; The pulse width control signal is calculated based on the ratio of the current pressure value to the full scale of the pressure transmitter. The pulse generator outputs a pulse signal corresponding to the pulse width control signal.
7. The power-saving method for the battery-powered pressure transmitter according to claim 4, characterized in that, The comparison of the largest eigenvalue of the covariance matrix with a preset convergence threshold outputs a pressure stabilization period determination result, including stationary, normal monitoring, and non-stationary states, comprising: If the maximum eigenvalue is ≤ λ1, output a judgment result indicating a stable state; If the maximum eigenvalue is greater than λ1 and less than or equal to λ2, output a judgment result indicating the normal monitoring status; If the maximum eigenvalue > λ2, output a determination result indicating a non-stationary state; Wherein, λ1 and λ2 represent the first preset convergence threshold and the second preset convergence threshold, respectively.
8. A power-saving system for a battery-powered pressure transmitter, characterized in that, The energy-saving system applies the energy-saving method according to any one of claims 1-7, and the energy-saving system comprises: The measurement and calculation module is used to acquire the pressure value measured by the pressure transmitter and calculate the pressure change rate based on the pressure value; A control command generation module is connected to the measurement and calculation module. The control command generation module is used to generate PID control commands based on the pressure change rate. When the error between the pressure value and the set value is less than a preset threshold, the integral term calculation in the PID control command is frozen. A prediction processing module is connected to the measurement and calculation module. The prediction processing module is used to process the pressure change rate using a prediction algorithm and output the pressure stability period determination result. A sampling adjustment module is connected to the prediction processing module, and the sampling adjustment module is used to dynamically adjust the sampling frequency based on the pressure stabilization period determination result. A communication switching module is connected to the prediction processing module and the sampling adjustment module. The communication switching module is used to trigger a pulse signal output to replace RS485 communication when the pressure stabilization period determination result indicates a stable state.
9. The energy-saving system according to claim 8, characterized in that, The measurement calculation module includes: The acquisition unit is used to acquire the raw pressure value through the MEMS piezoresistive chip of the pressure transmitter; A filtering unit is connected to the acquisition unit. The filtering unit is used to perform a moving average filtering process on the original pressure value and output the filtered pressure value. A rate of change calculation unit is connected to the filtering processing unit. The rate of change calculation unit is used to calculate the rate of pressure change per unit time based on the current value and historical value of the filtered pressure value.
10. The energy-saving system according to claim 8, characterized in that, The control command generation module includes: The mode selection unit is used to select the PID parameter mode according to the range of the pressure change rate; An instruction generation unit is connected to the mode selection unit. The instruction generation unit is used to generate control instructions containing proportional, integral, and derivative terms based on the PID parameter mode. An integral freezing unit, connected to the instruction generation unit, is used to freeze the integral term calculation in the control instruction when the absolute value of the error between the pressure value and the set value is less than 0.05% of the full scale of the pressure transmitter.
Citation Information
Cited By
USB audio equipment cache water level control method and device, USB audio equipment and storage medium
CN121501034A