Temperature compensation for piezoresistive pressure sensor based on deep learning on graphs

With the escalating demand for precision in piezoresistive pressure sensors to cater to a wide spectrum of applications, a significant challenge emerges due to the material properties of these sensors, which induce a substantial temperature coefficient. This limitation restricts the operational temperature range and is further exacerbated by ambient temperature variations, resulting in pronounced nonlinearity in sensor responses. To address these challenges, A new method using Graph Neural Networks (GNNs) is introduced to address nonlinearity and temperature drift in piezoresistive pressure sensors. GNNs improve the sensors’ accuracy and reliability across different temperatures, expanding their applicability. Test results show a notable accuracy enhancement, with a maximum full-scale error below 0.05% and even lower in specific ranges (under 0.04%). This precision makes the method ideal for industrial pressure sensor applications and production, offering significant benefits.


Introduction
Pressure measurement, a fundamental parameter in process control and automation systems, finds extensive application across diverse sectors, notably automotive, industrial, and healthcare [1][2].This ubiquity stems from the straightforward nature of its quantification and its adaptability in various contexts.Crucially, pressure readings offer insights into other key process variables, including level, volume, flow, and density, enhancing their applicability in complex systems.Pressure sensors, integral to these applications, are subjected to a broad spectrum of operational conditions and environments.Despite these varying demands, they consistently conform to rigorous industry standards, ensuring unwavering performance and reliability.This alignment underscores their critical role in maintaining the precision and efficiency of contemporary automated systems.
The unveiling of the piezoresistance effect in silicon by Smith [3] spurred the development of the first piezoresistive semiconductor sensors in the early 1970s, initially designed for the automotive industry.This breakthrough heralded a new era, with silicon piezoresistive technology becoming a focal point of intensive research and extensive commercial application.These sensors are highly esteemed for their exceptional sensitivity, sturdy resistance, and compact form.Nonetheless, the manufacturing and packaging processes of these pressure sensors still present unresolved challenges, resulting in notable nonlinearities and temperature-dependent drift in their response characteristics [4].To address these challenges, a range of approaches, encompassing a range of hardware and software solutions, has been suggested to incorporate thermal compensation into pressure sensor design [5].Hardware compensation in pressure sensors, typically using analogy circuits for calibration, incorporates elements like thermistors and adjustable amplifiers.While simple, this approach has drawbacks in terms of reliability and precision [6].In contrast, software temperature compensation relies on digital data processing with intelligent algorithms, particularly neural networks [7].This software approach offers improved adaptability, accuracy, and the ability to handle complex data.The focus is increasingly on refining and enhancing intelligent optimization algorithms rather than just introducing new neural networks [8]- [10].
In this study, a novel method employing Graph Neural Networks (GNNs) is introduced [11].Focused on addressing nonlinearity and temperature drift, this method utilizes the advanced computational power of GNNs, specifically two models: Graph Convolutional Networks (GCN) [12] and Graph Attention Networks (GAT) [13].By leveraging these GNNs, sensor accuracy and reliability are significantly enhanced under varying temperature conditions, expanding the practical applications of piezoresistive pressure sensors.Through simulations and practical tests, the method has been shown to substantially improve accuracy.Notably, the maximum full-scale error across the sensor range is reduced to better than 0.05%, and in localized ranges, this error is further minimized to less than 0.04%.Comparative analysis revealed that while both GCN and GAT models contribute to performance improvements, the GAT model exhibits superior results, making it particularly effective.This level of precision establishes the method as highly suitable for the development and production of industrial pressure sensors, presenting multiple advantages.The silicon-based piezoresistive pressure sensor consists of a core that senses pressure through the piezoresistive effect and a module for signal processing.Illustrated in Figure 1(a), this sensor utilizes the piezoresistive properties of semiconductor materials within the core to detect pressure alterations.As shown in Figure 1(b), the sensor's sensitive diaphragm is equipped with four silicon strain resistors, forming a Wheatstone bridge.The unique positioning and orientation of these resistors result in resistance changes that are opposite on adjacent arms of the bridge but identical on the diagonal arms.In an ideal scenario, the bridge's output voltage, Vout, would be directly proportional to the pressure if the sensitivity of the core remains constant.Nonetheless, the sensitivity and accuracy of the sensor are impacted by nonlinearity and temperature drift caused by changes in the temperature coefficient and piezo-resistance coefficient.Therefore, implementing thorough compensation strategies is crucial to maintain accuracy.

Principle of piezoresistive pressure sensor
This article details the design of a hardware solution for signal acquisition and processing, as shown in Figure 2. The core processor used is the STM32L1 microcontroller.The high-performance NSA2862X, a 24-bit Analog-to-Digital (A/D) converter chip, interfaces with the CPU through the Inter-Integrated Circuit (I 2 C) communication protocol.The NSA2862X integrates a 24-bit primary signal measurement channel and a 24-bit auxiliary temperature measurement channel, allowing for simultaneous data acquisition from both pressure and temperature sensors.After processing through the signal acquisition circuit, the thermocouple PT1000 embedded in the pressure module achieves an accuracy of 0.1 μ℃, enabling more precise experimental temperature measurements.

Deep learning on graphs
GNNs are described as a class of deep learning models designed to handle graph-structured data.Unlike traditional neural networks, GNNs can capture the dependency of nodes in a graph, making them suitable for applications where data is inherently relational, such as social networks, molecular structures, and communication networks.GNNs operate by aggregating information from a node's neighbors through layers, thereby learning node representations that capture both their own features and the structure of the surrounding graph.This approach allows GNNs to effectively process and interpret complex and interconnected data.

Graph convolutional networks.
The core function of a GCN is to extract features from data structured in graphs.GCN employs convolution operations on graphs, enabling features and messages to circulate and spread throughout the network.At its most basic level, this process involves state changes in each node that are proportional to the influence exerted by the surrounding graph structure, typically quantified using the graph's Laplacian operator.GCN has skillfully developed a technique to extract features from graph data.These extracted features can be used for node classification, graph classification, edge prediction, and representing the graph in an embedded form, making GCN widely applicable in various domains.
The structure of a GCN starts with a graph as input.In this graph, each node goes through a convolution process in one convolutional layer, where each node and its neighbors are convolved, updating the node based on this convolution.Subsequently, an activation function is applied.This sequence of convolution and activation is repeated until the network reaches its intended depth.In the end, an output function converts the states of the nodes into relevant output labels.In this model, each node continuously alters its state, influenced by its neighbors and more distant points in the graph, with closer neighbors having a more significant impact.The specific structure of the GCN is illustrated in Figure 3. GCNs represent a distinct layer within neural network architectures.It is assumed that we have a dataset comprising  nodes, with each node characterized by its unique attributes, constituting an  by  matrix X, with  signifying the attribute count for each node.Inter-node connections are encoded as another matrix of dimension  × , termed the adjacency matrix , which, together with  serves as the input to our model.The method for propagating information across GCN layers is described by the following formula: in this formula,  =  + , where  is the identity matrix. is the degree matrix of  , defined as  = ∑  . is the feature matrix for each layer, with  being  for the input layer. ( ) is a randomly initialized weight matrix. represents a nonlinear activation function.

Graph attention networks.
GAT, akin to GCN, is an advanced mechanism for extracting features from graph-structured data.What sets GAT apart is its integration of attention mechanisms, allowing for nuanced, adaptive feature aggregation from a node's neighbors, focusing on those most relevant to the task.In detail, GATs dynamically evaluate the importance of each node's neighbors using an attention mechanism, assigning scores that prioritize influential ones during feature aggregation.This process often employs a multi-head attention approach, enhancing stability and performance, and culminates in attention-weighted feature combinations, further refined through non-linear activation functions.This sophisticated approach enables GATs to effectively manage complex graph-structured tasks.The core formula of GAT can be expressed as: Here,  is the attention coefficient computed using a learnable weight vector  and the features of node  and its neighbor  .
in this formula,  ( ) represents the feature matrix of the nodes at layer . denotes the set of neighbors of node . ( ) is the learnable weight matrix at layer . is a non-linear activation function.
For regression tasks, while the attention mechanism (with  ) remains effective for computing attention scores, the final activation function in the feature update may need to be adjusted to suit the continuous nature of the output, as regression involves predicting continuous values rather than discrete classes.

Pressure data acquisition
The characterization experiment of the pressure sensor encompassed eleven distinct temperature points, with each temperature phase extending for a minimum of two hours.Maintaining this period was vital for the stability of the temperature's influence on the pressure sensor, which in turn helped to mitigate errors in measurement due to thermal inertia.Once the designated standard pressure was reached, each pressurization was maintained for at least 5 minutes to negate measurement inaccuracies arising from mechanical hysteresis.To reduce systemic errors, the mean of three measurements was calculated and used as the final experimental data.As evident from Figure 4, the output values of the pressure sensor (VAD) under varying pressures exhibited significant changes with temperature fluctuations.At a fixed pressure, VAD demonstrated a linear decrease with an increase in temperature.However, within the high-pressure range, the influence of temperature on VAD became increasingly pronounced, indicating a marked non-linearity of VAD across the entire range of pressure.According to Zhao et al.'s work [10], the maximum full-scale error is the most critical parameter for evaluating the performance of the pressure sensor, and it is defined as follows: where  represents the actual standard pressure value produced by the automatic pressure calibrator,  is the pressure value determined through calculation, and  denotes the complete pressure scale applicable to a specific sensor.Figure 5 presents a set of full-scale error measurements plotted as a function of temperature across various pressures.These findings indicate that the pressure sensor's practical applicability is limited due to its diminished accuracy and uncorrected output, which are primarily attributed to temperature-induced nonlinearity and drift.

Graph Data Generation
Temperature and VAD are utilized as input features, while the actual pressure values serve as the target output.An edge index, representing the relationships between data points, is constructed based on the observed changes in temperature and VAD values.The generated graph data is shown in Figure 6: by the convolution operation in the hidden layers: GCNConv typifies a GCN model, whereas GATConv characterizes a GAT model.The first hidden layer transforms the input features into a higherdimensional hidden representation, while the second layer further refines these representations.In the case of GATConv, it dynamically weights the importance of adjacent nodes within the graph, thereby delicately capturing the complex dependencies between nodes.A LeakyReLU activation function is applied following each hidden layer to introduce non-linearity, enabling the model to discern more intricate patterns within the graph data.The final output is procured via a linear layer that projects the hidden features onto the desired output dimensions.
Before training, the sample data is randomized to ensure unbiased learning, with a split into training and prediction groups at a ratio of 7:3.The batch size is set at 32, and the hidden layers are dimensioned at 128.The model is optimized using the Adam gradient descent algorithm, with a maximum of 200 iterations and an initial learning rate of 0.01.

Results
The data presented in Table 1 provides a succinct yet compelling comparative assessment of two distinct models: the GCN model and the GAT model.According to the table, the GAT model exhibits superior performance, with a maximum full-scale error (Max([%])) of only 0.0491%, a minimum full-scale error (Min([%])) of 0.0436%, and a mean full-scale error (Mean([%])) of 0.0460%.In contrast, the GCN model reports slightly higher errors across these metrics.These findings suggest that the GAT model's attention mechanism, which dynamically assigns importance to the nodes in the sensor's data graph, results in a more accurate representation of the sensor's response, reducing the full-scale error.Consequently, the GAT model's enhanced accuracy and lower error rates establish its potential for industrial applications where precise pressure measurements are crucial, affirming the significant benefits of utilizing GNNs in sensor technology.

Conclusion
This study focuses on enhancing the accuracy and reliability of piezoresistive pressure sensors under varying temperature conditions.By conducting a thorough analysis of the material properties of these sensors, particularly their nonlinear response and temperature drift when subjected to temperature changes, this research introduces a novel approach utilizing GNNs, specifically GCN and GAT, to address these challenges.
Through detailed experiments, we demonstrate the efficacy of GNNs in processing complex, interrelated data.Our findings reveal that the GAT model, employing an attention mechanism, exhibits higher precision and lower full-scale error compared to the traditional GCN when dealing with pressure sensor data.This discovery underscores the significant advantages of applying GNNs in sensor technology, especially in industrial applications where there is a growing demand for precise pressure measurement.

Figure 1 .
Figure 1.The main structure.The silicon-based piezoresistive pressure sensor consists of a core that senses pressure through the piezoresistive effect and a module for signal processing.Illustrated in Figure1(a), this sensor utilizes the piezoresistive properties of semiconductor materials within the core to detect pressure alterations.As shown in Figure1(b), the sensor's sensitive diaphragm is equipped with four silicon strain resistors, forming a Wheatstone bridge.The unique positioning and orientation of these resistors result in resistance changes that are opposite on adjacent arms of the bridge but identical on the diagonal arms.In an ideal scenario, the bridge's output voltage, Vout, would be directly proportional to the pressure if the sensitivity of the core remains constant.Nonetheless, the sensitivity and accuracy of the sensor are impacted by nonlinearity and temperature drift caused by changes in the temperature coefficient and piezo-resistance coefficient.Therefore, implementing thorough compensation strategies is crucial to maintain accuracy.This article details the design of a hardware solution for signal acquisition and processing, as shown in Figure2.The core processor used is the STM32L1 microcontroller.The high-performance NSA2862X, a 24-bit Analog-to-Digital (A/D) converter chip, interfaces with the CPU through the Inter-Integrated Circuit (I 2 C) communication protocol.The NSA2862X integrates a 24-bit primary signal measurement channel and a 24-bit auxiliary temperature measurement channel, allowing for simultaneous data acquisition from both pressure and temperature sensors.After processing through the signal acquisition circuit, the thermocouple PT1000 embedded in the pressure module achieves an accuracy of 0.1 μ℃, enabling more precise experimental temperature measurements.

Figure 2 .
Figure 2. Sensor and signal acquisition and processing circuit.

Figure 3 .
Figure 3.The structure of GCN.GCNs represent a distinct layer within neural network architectures.It is assumed that we have a dataset comprising  nodes, with each node characterized by its unique attributes, constituting an  by  matrix X, with  signifying the attribute count for each node.Inter-node connections are encoded as another matrix of dimension  × , termed the adjacency matrix , which, together with  serves as the input to our model.The method for propagating information across GCN layers is described by the following formula:

Figure 4 .
Figure 4. Output VAD with different pressures and temperature.

Figure 5 .
Figure 5. %FS at different temperatures and pressures.

Figure 6 .
Figure 6.Graph data structure3.3Training ModelAs depicted in Figure7, the training model consists of two hidden layers, two LeakyReLU activation layers, and a single linear layer.The nature of the model-whether it is a GCN or a GAT-is determined

Table 1 .
Comparison of metrics of each model.