Intracranial pressure sensor signal conditioning method
Technical Field
The invention relates to the field of conditioning methods, in particular to a signal conditioning method for an intracranial pressure sensor.
Background
At present, most of intracranial pressure sensors clinically used are micro piezoresistive sensors. The intracranial pressure monitoring sensor used in the invention is a semiconductor material piezoresistive sensor, which means that when stress is applied, the resistivity can be obviously changed. Piezoresistive sensors are made based on piezoresistive effect and are used for measuring pressure, acceleration and the like.
Besides the advantage of high sensitivity, the silicon piezoresistive sensor also has the advantages of high resolution and high response frequency, and can measure low-frequency acceleration and linear acceleration, and is widely applied in many aspects [20 ]. However, due to the inherent characteristics of semiconductors, piezoresistive sensors have several common problems:
large temperature drift: semiconductor materials are very sensitive to temperature changes and require temperature compensation or are used under constant temperature conditions.
Consistency: due to the limitation of process means and the higher sensitivity, the sensors in the same batch have larger discreteness. In order to ensure the product precision, the correction is always needed to be carried out separately.
Signal amplification: although industrial silicon piezoresistive sensors have high sensitivity and can be used without amplification in many cases, the current of an intracranial pressure microsensor is milliampere, and the signal must be amplified.
Aiming at the use environment of the packaged pressure sensor in the intracranial, the signal directly output by the sensor inevitably has the problems of nonlinearity, zero point temperature drift, sensitivity temperature drift and the like due to the limitation of materials and processing technology. For this reason, it is necessary to compensate for these uncertainties during actual use to obtain a signal that meets the requirements of use.
In practical applications, the piezoresistive sensor mainly needs to solve the problems of temperature drift and nonlinearity, and in the field of temperature compensation of the piezoresistive sensor, the technology is kept leading abroad, and research on the technology is started early and many important achievements are obtained. The temperature drift compensation method of the piezoresistive sensor comprises a hardware compensation method, a software compensation method and a comprehensive compensation method combining software and hardware. The hardware compensation method comprises the following steps: external series and parallel thermistor compensation methods, bridge arm series and parallel constant resistance methods, bridge arm thermistor compensation methods, double bridge methods, triode bridge external compensation methods, and the like. The software compensation is to combine the MCU and the pressure sensor by a software method and compensate the temperature drift of the sensor by combining a compensation algorithm. Common software compensation algorithms include table lookup, curve fitting, inverse function, and the most popular neural network.
The hardware compensation method has many disadvantages, such as complex circuit, low precision, poor versatility, high cost, etc. The software compensation effect is better than the hardware effect, the achieved precision is higher, the universality is strong, and the cost is low. For the non-linearity problem of the sensor, the following methods are commonly used: reducing the measuring range section by section and taking an intermediate approximate value; and adding a nonlinear correction link and a nonlinear scale. With the widespread use of digital technology and microcomputers today, many non-linearity correction methods have been developed to address the non-linearity problem of sensors. Such as table lookup, linear lifting, polygonal line approximation, etc. With the advance of technology and the advent of various new sensors, temperature compensation and linearization correction of sensors are advancing toward intellectualization.
The purpose of sensor compensation is to make the input-output characteristics of the sensor approach to an ideal curve as much as possible, and since the actual model of the sensor is difficult to obtain accurately, the sensor needs to be calibrated once by a standard tool with higher precision before use, and the output model obtained by the calibration once is used as a reference for subsequent compensation processing.
The calibration of the sensor is divided into static calibration and dynamic calibration. The static calibration mainly aims at the static characteristic indexes of the sensor, such as measuring range, precision and the like. Dynamic calibration is used to determine the dynamic sensitivity, natural frequency, and frequency response range of the sensor. The calibration mode of the universal pressure sensor is that a dynamometer provides a series of standard pressures, and a proper calibration point is selected according to a reference working curve to determine the input/output relationship of a sensor system. The calibration mode has the disadvantages of complicated process, difficult data acquisition and incapability of evaluating the calibration quality on the calibration site. An automatic calibration technology is provided by Wanlina et al, and computer control technologies such as intellectualization, curve fitting, error analysis and the like are introduced in the calibration process of the pressure sensor, so that the calibration efficiency and reliability are greatly improved. The Yi Wei et al adopts a complex fitting regression curve model, and utilizes the strong matrix and numerical calculation capability of a virtual instrument technology and Matlab software to realize the static calibration of the pressure sensor. Schellin et al propose a neural network hybridization modeling method for sensor calibration, which is established by introducing a neural network hybridization modeling method. Because the duration of intracranial pressure monitoring is generally not less than 5 days, the calibration of the sensor cannot be stopped or calibrated by high-precision calibration equipment again after being taken out like a common sensor. For this reason, a method of on-line calibration needs to be sought. US4672974 achieves compensation for sensor sensitivity and zero drift by introducing a reference pressure to one side of the probe, thereby completing one on-line calibration. In the two methods described in US7771362B2 and US6120457, calibration is also achieved by skillfully modifying the structure of the pressure probe and taking the other sensor as a reference for in-vivo pressure introduction. Yameogo et al integrate actuators and sensors through MEMS technology, and complete calibration of the sensors by using the actuators.
The calibration and compensation of the sensor have more methods and are widely applied to engineering practice. With the progress of science and technology, the hardware compensation technology of the sensor is developed from the hardware circuit compensation of the initial discrete elements to the integrated circuit conditioning module, the model of the software compensation algorithm is more accurate, and meanwhile, the compensation method combining software and hardware enables the compensation of the sensor to be more intelligent, so that the efficiency of designers is greatly improved, and convenience is brought to users. The traditional calibration method is multiple in steps and complex in operation, the sensor needs to be in an offline state in the calibration process, and the traditional calibration method cannot be applied to sensor use occasions which are inconvenient to calibrate offline. The on-line calibration methods mentioned in the literature are all provided on the basis of certain hypothesis premises, the calibration process is simplified, and for different use environments, the sensor structure or hardware needs to be correspondingly designed, so that the calibration processing effect has a certain difference compared with the standard calibration method. At present, the problems of zero drift and the like still exist in the long-time monitoring process of the intracranial pressure sensor, and the long-term stability of the sensor still needs to be improved.
In order to solve the problems, the application provides a method for conditioning the signal of the intracranial pressure sensor.
Disclosure of Invention
Objects of the invention
In order to solve the technical problems in the background art, the invention provides a signal conditioning method of an intracranial pressure sensor.
(II) technical scheme
In order to solve the above problems, the present invention provides a method for conditioning intracranial pressure sensor signals, comprising:
a signal conditioning circuit based on PGA309 is manufactured to calibrate and correct the bridge type pressure sensor, and the signal conditioning circuit comprises a signal gain module, a temperature measuring module, a fault detection module, an excitation and linearization module and a digital interface module;
after the PGA309 is electrified, firstly, a temperature sensor is used for temperature measurement, then, corresponding temperature compensation coefficients are searched from list data of an external EEPROM, the output of a zero DAC and a gain DAC is adjusted, temperature compensation is carried out, an output signal after gain amplification is sent to a linearization DAC through a feedback path and is overlapped with a reference voltage in proportion to form an excitation signal which is sent to the sensor, the process is realized and continuously executed by an automatic state machine built in the PGA309, and the PGA309 is ensured to normally work;
the compensation of the nonlinear part of the bridge type pressure sensor is realized by the PGA309 linearization module, and only the nonlinearity caused by pressure is compensated, and the nonlinearity error caused by temperature is not considered; the PGA309 linearization module dynamically changes the magnitude of the bridge excitation voltage by introducing a certain proportion of output voltage, so that the output voltage is matched with an ideal linear curve as much as possible;
the PGA309 linearisation block only removes excitation induced non-linearity errors and for this purpose also compensates for temperature drift errors, the PGA309 being atTemperature sampling is carried out before signal amplification every time, and according to a temperature compensation table established in advance, zero point and gain fine adjustment DAC values matched with the temperature are inquired according to a certain retrieval algorithm, so that the output of the PGA309 still meets the expected output range at different temperatures; the core of the temperature compensation algorithm is to establish a temperature compensation coefficient search table, for this purpose, firstly, a temperature drift curve corresponding to each sensor is established, and according to a mathematical reference model of the sensor, when the input pressure P is PminAt this time, the zero drift curve of the corresponding bridge is obtained; when P is equal to PmaxWhen the sensitivity of the bridge is measured, corresponding to the sensitivity drift curve of the bridge,
Kbridge(P,T)=n+nT+nT2;
the values of the zeroDAC and the GainDAC in the required working temperature range can be calculated according to the expected output range, and then a compensation coefficient table of 17 temperature points is established by adopting a linear interpolation algorithm.
Preferably, the PGA309 based signal conditioning circuit includes a signal gain module:
the PGA309 has three stages of signal amplifying circuits in common, the preamplifier G1 amplifies and suppresses noise of an input weak sensor, the gain range is 4-128 at most, the post-stage amplifier G3 is used for driving the output gain adjusting range to be 2-9, the gains of the preamplifier G1 and the post-stage amplifier G3 are fixed values, the configuration is carried out through an internal register of the PGA309, in order to obtain a desired specified gain multiple, the intermediate stage G2 can realize fine adjustment of the gain through a 16-bit DAC, and the adjusting range is 0.3333-1; through three-stage amplification adjustment, the whole amplification gain range of the PGA309 can reach 2.7-1152, and considering that the sensor has zero drift, the PGA309 is also internally provided with a zero drift correction function, and can be adjusted at two places: compensation for zero drift is accomplished by coarse adjustment before the pre-amplifier stage G1 and fine adjustment after the pre-amplifier stage G1 before fine adjustment G2.
Preferably, the PGA309 based signal conditioning circuit includes a temperature measurement module:
an internal temperature sensor can be selected, a TEMP pin can be externally connected with a measuring element, a voltage signal representing the temperature is sent to the internal ADC, the external EEPROM stores a temperature correction coefficient, and sectional compensation is carried out in a table look-up mode.
Preferably, the PGA309 based signal conditioning circuit includes a fault detection module:
the fault detection module is divided into two parts, one part is positioned in a fault detection unit of a sensor signal input port, the fault detection unit compares an input signal with a reference voltage through 9 comparators in the fault detection unit so as to judge the state of the sensor, and a mark is given to a mark position of a fault state device; the other part is to detect the signal after gain, and when the signal exceeds the output range, the output signal is limited and an alarm is given.
Preferably, the PGA309 based signal conditioning circuit includes an excitation and linearization module:
under the external force, the output signal of the bridge sensor is nonlinear, a circuit special for sensor excitation and linearization is contained in the PGA309, when the PGA309 works, a stable reference voltage is needed, the voltage can be the internal reference voltage or the external reference voltage, the linearization circuit firstly measures the internal reference voltage, adds the internal reference voltage with the feedback signal of the output voltage VOUT to be used as the compensation of the nonlinear curve of the sensor, and the size of the feedback value is determined by a 7-bit DAC; the excitation voltage of the bridge can be selected in two ways, an independent constant voltage source can be externally connected to supply power to the bridge, or the VEXC provided by the PGA309 is used as the excitation voltage, if a linearization function module in the PGA309 is used, the VEXC is used as the excitation source, a linearization circuit dynamically changes the size of the VEXC by introducing output voltage feedback to achieve the purpose of linearity correction, and the pins VIN1 and VIN2 are connected with the output end of the bridge.
Preferably, the PGA309 based signal conditioning circuit includes a digital interface module:
the programming port of the single-wire UART is used for configuring the internal register of the PGA309, and the baud rate is 4.8kb/s-38.4 kb/s; the other one is a two-wire system I2C interface which is mainly used for accessing an external EEPROM, and the EEPROM stores the configuration information and the temperature compensation coefficient table of the PGA 309; the PGA309 has 9 internal registers for configuration and status monitoring of the functional modules; after power-on, PGA reads configuration information from EEPROM, then carries on temperature conversion once, according to the converted temperature value, searches the calibrated temperature compensation coefficient table, inquires the gain fine and zero fine adjustment value under the current temperature, thus completes the amplification of input voltage once, the amplification of each signal is started from temperature sampling.
Preferably, VEXC=KEXC*V+KLIN*V;
The nonlinear coefficient in the formula is a linearization coefficient, for a system with a selected reference voltage range, the value of the value directly influences the excitation voltage of the bridge, and the optimal working point of the PGA309 linearization module is configured to enable the output value when the input pressure is half of the full-scale to be equal to the ideal output value by combining a sensor mathematical reference model, namely, the output nonlinear error at 50% of the pressure tends to be zero.
In the formula, the linear coefficient is adopted, for a system with a selected reference voltage range, the value of the value directly influences the excitation voltage of the bridge, and the maximum nonlinear position of the bridge pressure sensor is positioned near 50% full-scale input pressure by combining a sensor mathematical reference model, so that the optimal working point of the PGA309 linear module is configured to ensure that the output value when the input pressure is half of the full-scale is equal to the ideal output value, namely the output nonlinear error at 50% pressure tends to zero,
BV={KV(50)[KV(100)+KV(0)]/2}/[KV(100)-KV(0)]
KLIN=(4*BV*VREFKEXC)/[(VOUTMAX-VOUTMIN)-2BV(VOUTMAX+VOUTMIN)],
the error value at the midpoint in the equation can be found by measuring the bridge output at 0%, 50%, and 100% inputs, respectively.
The technical scheme of the invention has the following beneficial technical effects:
the output signal of the sensor end is effectively compensated and conditioned through the temperature compensation coefficient table and the linearization circuit.
Drawings
Fig. 1 is a schematic structural diagram of a gain module of a PGA309 in a signal conditioning method for an intracranial pressure sensor according to the present invention.
FIG. 2 is a non-linear correction graph of bridge pressure in a method for conditioning intracranial pressure sensor signals according to the present invention.
Fig. 3 is a flowchart illustrating the operation of the PGA309 in the method for conditioning intracranial pressure sensor signals according to the present invention.
Fig. 4 is a flowchart of an algorithm in the intracranial pressure sensor signal conditioning method provided by the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the accompanying drawings in conjunction with the following detailed description. It should be understood that the description is intended to be exemplary only, and is not intended to limit the scope of the present invention. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present invention.
As shown in fig. 1-4, the present invention provides a method for conditioning intracranial pressure sensor signal, comprising:
a signal conditioning circuit based on PGA309 is manufactured to calibrate and correct the bridge type pressure sensor, and the signal conditioning circuit comprises a signal gain module, a temperature measuring module, a fault detection module, an excitation and linearization module and a digital interface module;
after the PGA309 is electrified, firstly, a temperature sensor is used for temperature measurement, then, corresponding temperature compensation coefficients are searched from list data of an external EEPROM, the output of a zero DAC and a gain DAC is adjusted, temperature compensation is carried out, an output signal after gain amplification is sent to a linearization DAC through a feedback path and is overlapped with a reference voltage in proportion to form an excitation signal which is sent to the sensor, the process is realized and continuously executed by an automatic state machine built in the PGA309, and the PGA309 is ensured to normally work;
the compensation of the nonlinear part of the bridge type pressure sensor is realized by the PGA309 linearization module, and only the nonlinearity caused by pressure is compensated, and the nonlinearity error caused by temperature is not considered; the PGA309 linearization module dynamically changes the magnitude of the bridge excitation voltage by introducing a certain proportion of output voltage, so that the output voltage is matched with an ideal linear curve as much as possible;
the PGA309 linearization module only eliminates nonlinear errors caused by excitation, and also needs to compensate temperature drift errors for this purpose, the PGA309 samples the temperature before amplifying the signal each time, and according to a temperature compensation table established in advance, a zero point and a gain fine adjustment DAC value matched with the temperature are inquired according to a certain retrieval algorithm, so that the output of the PGA309 still meets the expected output range at different temperatures; the core of the temperature compensation algorithm is to establish a temperature compensation coefficient search table, for this purpose, firstly, a temperature drift curve corresponding to each sensor is established, and according to a mathematical reference model of the sensor, when the input pressure P is PminAt this time, the zero drift curve of the corresponding bridge is obtained; when P is equal to PmaxWhen the sensitivity of the bridge is measured, corresponding to the sensitivity drift curve of the bridge,
Kbridge(P,T)=n+nT+nT2;
with reference to the output ranges shown in fig. 3 and 4, the values of ZeroDAC and gaincac within the required operating temperature range can be calculated, and then a linear interpolation algorithm is used to establish a compensation coefficient table for 17 temperature points.
In an alternative embodiment, the PGA309 based signal conditioning circuit includes a signal gain module:
the PGA309 has three stages of signal amplifying circuits in common, the preamplifier G1 amplifies and suppresses noise of an input weak sensor, the gain range is 4-128 at most, the post-stage amplifier G3 is used for driving the output gain adjusting range to be 2-9, the gains of the preamplifier G1 and the post-stage amplifier G3 are fixed values, the configuration is carried out through an internal register of the PGA309, in order to obtain a desired specified gain multiple, the intermediate stage G2 can realize fine adjustment of the gain through a 16-bit DAC, and the adjusting range is 0.3333-1; through three-stage amplification adjustment, the whole amplification gain range of the PGA309 can reach 2.7-1152, and considering that the sensor has zero drift, the PGA309 is also internally provided with a zero drift correction function, and can be adjusted at two places: compensation for zero drift is accomplished by coarse adjustment before the pre-amplifier stage G1 and fine adjustment after the pre-amplifier stage G1 before fine adjustment G2.
In an alternative embodiment, the PGA309 based signal conditioning circuit includes a temperature measurement module:
an internal temperature sensor can be selected, a TEMP pin can be externally connected with a measuring element, a voltage signal representing the temperature is sent to the internal ADC, the external EEPROM stores a temperature correction coefficient, and sectional compensation is carried out in a table look-up mode.
In an alternative embodiment, the PGA309 based signal conditioning circuit includes a fault detection module:
the fault detection module is divided into two parts, one part is positioned in a fault detection unit of a sensor signal input port, the fault detection unit compares an input signal with a reference voltage through 9 comparators in the fault detection unit so as to judge the state of the sensor, and a mark is given to a mark position of a fault state device; the other part is to detect the signal after gain, and when the signal exceeds the output range, the output signal is limited and an alarm is given.
In an alternative embodiment, the PGA309 based signal conditioning circuit includes a stimulation and linearization module:
under the external force, the output signal of the bridge sensor is nonlinear, a circuit special for sensor excitation and linearization is contained in the PGA309, when the PGA309 works, a stable reference voltage is needed, the voltage can be the internal reference voltage or the external reference voltage, the linearization circuit firstly measures the internal reference voltage, adds the internal reference voltage with the feedback signal of the output voltage VOUT to be used as the compensation of the nonlinear curve of the sensor, and the size of the feedback value is determined by a 7-bit DAC; the excitation voltage of the bridge can be selected in two ways, an independent constant voltage source can be externally connected to supply power to the bridge, or the VEXC provided by the PGA309 is used as the excitation voltage, if a linearization function module in the PGA309 is used, the VEXC is used as the excitation source, a linearization circuit dynamically changes the size of the VEXC by introducing output voltage feedback to achieve the purpose of linearity correction, and the pins VIN1 and VIN2 are connected with the output end of the bridge.
In an alternative embodiment, the PGA309 based signal conditioning circuit includes a digital interface module:
the programming port of the single-wire UART is used for configuring the internal register of the PGA309, and the baud rate is 4.8kb/s-38.4 kb/s; the other one is a two-wire system I2C interface which is mainly used for accessing an external EEPROM, and the EEPROM stores the configuration information and the temperature compensation coefficient table of the PGA 309; the PGA309 has 9 internal registers for configuration and status monitoring of the functional modules; after power-on, PGA reads configuration information from EEPROM, then carries on temperature conversion once, according to the converted temperature value, searches the calibrated temperature compensation coefficient table, inquires the gain fine and zero fine adjustment value under the current temperature, thus completes the amplification of input voltage once, the amplification of each signal is started from temperature sampling.
In an alternative embodiment, VEXC=KEXC*V+KLIN*V;
The nonlinear coefficient in the formula is a linearization coefficient, for a system with a selected reference voltage range, the value of the value directly influences the excitation voltage of the bridge, and the optimal working point of the PGA309 linearization module is configured to enable the output value when the input pressure is half of the full-scale to be equal to the ideal output value by combining a sensor mathematical reference model, namely, the output nonlinear error at 50% of the pressure tends to be zero.
In the formula, the linear coefficient is adopted, for a system with a selected reference voltage range, the value of the value directly influences the excitation voltage of the bridge, and the maximum nonlinear position of the bridge pressure sensor is positioned near 50% full-scale input pressure by combining a sensor mathematical reference model, so that the optimal working point of the PGA309 linear module is configured to ensure that the output value when the input pressure is half of the full-scale is equal to the ideal output value, namely the output nonlinear error at 50% pressure tends to zero,
BV={KV(50)[KV(100)+KV(0)]/2}/[KV(100)-KV(0)]
KLIN=(4*BV*VREFKEXC)/[(VOUTMAX-VOUTMIN)-2BV(VOUTMAX+VOUTMIN)],
the error value at the midpoint in the equation can be found by measuring the bridge output at 0%, 50%, and 100% inputs, respectively.
It is to be understood that the above-described embodiments of the present invention are merely illustrative of or explaining the principles of the invention and are not to be construed as limiting the invention. Therefore, any modification, equivalent replacement, improvement and the like made without departing from the spirit and scope of the present invention should be included in the protection scope of the present invention. Further, it is intended that the appended claims cover all such variations and modifications as fall within the scope and boundaries of the appended claims or the equivalents of such scope and boundaries.