Digital signal processing method, device and medium for hall element
By constructing a neural network model to process the discrete voltage signal sequence of Hall element, obtaining the time-series feature vector and outputting the confidence score, anti-interference and stable decision-making in complex environments are achieved, and the noise interference problem in Hall element signal processing is solved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING ZHONGXU ELECTRONICS SCI & TECH
- Filing Date
- 2025-10-20
- Publication Date
- 2026-07-31
AI Technical Summary
Existing Hall elements are susceptible to noise in complex environments such as temperature fluctuations, electromagnetic interference, and changes in mechanical stress. The digital signals are also affected by noise, and the signal processing lacks temporal correlation, making it difficult to distinguish between instantaneous noise and real magnetic field changes.
The original discrete voltage signal sequence of the Hall element is obtained by analog-to-digital converter, a target neural network model is constructed, the time-series feature vector is obtained, the instantaneous discrimination value and confidence score are output, multi-strategy decision is made based on the confidence score, and the digital switching signal is output.
It improves the anti-interference capability and decision stability of Hall element digital signal processing, avoids the shortcomings of traditional single threshold judgment, and balances the response speed and reliability of signal processing.
Smart Images

Figure CN121333317B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Hall element signal processing, and more particularly to a digital signal processing method, device and medium for Hall elements. Background Technology
[0002] Hall effect sensors, as magnetoelectric conversion devices based on the Hall effect, are widely used in position detection, speed measurement, and current sensing. During operation, they convert changes in the external magnetic field into voltage signals, which are then processed into digital switching signals, providing decision-making support for subsequent control equipment.
[0003] However, existing digital signal processing methods for Hall elements are susceptible to noise in complex environments such as temperature fluctuations, electromagnetic interference, and changes in mechanical stress, leading to misjudgment of digital signals. At the same time, the signal processing lacks temporal correlation and often uses a single-moment signal threshold for judgment, which fails to capture the temporal dimension characteristics of the signal and makes it difficult to distinguish between instantaneous noise and real magnetic field changes. Summary of the Invention
[0004] This application provides a digital signal, device, and medium for a Hall element.
[0005] To achieve the above objectives, this application adopts the following technical solution: In a first aspect, this application proposes a digital signal processing method for a Hall element, the method comprising: The original discrete voltage signal sequence generated by the Hall element is obtained by an analog-to-digital converter, and the time-series feature vector is obtained based on the original discrete voltage signal sequence. Construct a target neural network model, input the temporal feature vector into the target neural network model, and output the instantaneous discriminant value and confidence score with temporal features based on the output of the target neural network model; The initial digital output signal is obtained based on the instantaneous discriminant value, and its temporal correspondence with the confidence score is established. Based on the confidence score and the initial digital output signal, a digital switch signal is output. If the confidence score corresponding to the target time window is higher than the first preset threshold, the initial digital output signal is immediately used as the digital switch signal. If the confidence score corresponding to the target time window is lower than the first preset threshold but higher than the second preset threshold, then a delayed confirmation is performed. If the confidence score corresponding to the target time window is lower than the second preset threshold, the output state of the previous target time window will remain unchanged.
[0006] Optionally, in some implementations, the method further includes: If the confidence score corresponding to the target time window is lower than the second preset threshold, resampling is triggered.
[0007] Optionally, in some implementations, if the confidence score corresponding to the target time window is lower than a second preset threshold, resampling is triggered, including: Increase the sampling frequency of the analog-to-digital converter.
[0008] Optionally, in some implementations, if the confidence score corresponding to the target time window is lower than a first preset threshold but higher than a second preset threshold, a delayed confirmation is performed, including: Start the counter and monitor the state of the initial digital output signal and its corresponding confidence score over the subsequent K consecutive sampling periods, where K is a natural number greater than 1; If the initial digital output signal remains constant within K sampling periods and its corresponding confidence score is consistently higher than the first preset threshold, then when the counter expires, the current initial digital output signal will be confirmed as a digital switch signal. If the initial digital output signal state changes or its corresponding confidence score drops within K sampling periods, the counter is immediately reset and the judgment is repeated.
[0009] Optionally, in some implementations, the target neural network model is a hybrid architecture comprising long short-term memory network units and one-dimensional convolutional layers, wherein the long short-term memory network units are used to capture long-term dependencies in the temporal feature vector, and the one-dimensional convolutional layers are used to extract local features in the temporal feature vector.
[0010] Optionally, in some implementations, before constructing a target neural network model, inputting the temporal feature vector into the target neural network model, and outputting the instantaneous discriminant value and confidence score with temporal features based on the output of the target neural network model, the following steps are included: The output signal sequences of Hall elements under different temperatures, electromagnetic interference intensities, and mechanical stress conditions were obtained to form a training dataset; The output signal sequences in the training dataset are labeled, and the labeling information includes the ideal switching state and the corresponding confidence label; Based on the training dataset, the parameters of the target neural network model are optimized using the backpropagation algorithm.
[0011] Optionally, in some embodiments, the original discrete voltage signal sequence generated by the Hall element is obtained through an analog-to-digital converter, and a timing feature vector is obtained based on the original discrete voltage signal sequence, including: The original discrete voltage signal sequence is standardized and preprocessed. The standardized original discrete signal sequence is divided into overlapping time windows of fixed length; Obtain the statistical characteristics of the signal within each time window, wherein the statistical characteristics include at least one of the following: mean, variance, and zero-crossing rate; The statistical features are concatenated to form a time-series feature vector.
[0012] Secondly, this application proposes a digital signal processing device using a Hall element, the device being configured as follows: The original discrete voltage signal sequence generated by the Hall element is obtained by an analog-to-digital converter, and the time-series feature vector is obtained based on the original discrete voltage signal sequence. Construct a target neural network model, input the temporal feature vector into the target neural network model, and output the instantaneous discriminant value and confidence score with temporal features based on the output of the target neural network model; The initial digital output signal is obtained based on the instantaneous discriminant value, and its temporal correspondence with the confidence score is established. Based on the confidence score and the initial digital output signal, a digital switch signal is output. If the confidence score corresponding to the target time window is higher than the first preset threshold, the initial digital output signal is immediately used as the digital switch signal. If the confidence score corresponding to the target time window is lower than the first preset threshold but higher than the second preset threshold, then a delayed confirmation is performed. If the confidence score corresponding to the target time window is lower than the second preset threshold, the output state of the previous target time window will remain unchanged.
[0013] In conjunction with the second aspect, optionally, the device is configured as follows: If the confidence score corresponding to the target time window is lower than the second preset threshold, resampling is triggered.
[0014] In conjunction with the second aspect, optionally, the device is configured as follows: If the confidence score corresponding to the target time window is lower than the second preset threshold, resampling is triggered, including: Increase the sampling frequency of the analog-to-digital converter.
[0015] In conjunction with the second aspect, optionally, the device is configured as follows: If the confidence score corresponding to the target time window is lower than the first preset threshold but higher than the second preset threshold, a delayed confirmation is performed, including: Start the counter and monitor the state of the initial digital output signal and its corresponding confidence score over the subsequent K consecutive sampling periods, where K is a natural number greater than 1; If the initial digital output signal remains constant within K sampling periods and its corresponding confidence score is consistently higher than the first preset threshold, then when the counter expires, the current initial digital output signal will be confirmed as a digital switch signal. If the initial digital output signal state changes or its corresponding confidence score drops within K sampling periods, the counter is immediately reset and the judgment is repeated.
[0016] In conjunction with the second aspect, optionally, the device is configured as follows: The target neural network model is a hybrid architecture that includes long short-term memory network units and one-dimensional convolutional layers. The long short-term memory network units are used to capture long-term dependencies in the temporal feature vector, while the one-dimensional convolutional layers are used to extract local features in the temporal feature vector.
[0017] In conjunction with the second aspect, optionally, the device is configured as follows: Before constructing the target neural network model, inputting the temporal feature vector into the target neural network model, and outputting the instantaneous discriminant value and confidence score with temporal features based on the output of the target neural network model, the following steps are taken: The output signal sequences of Hall elements under different temperatures, electromagnetic interference intensities, and mechanical stress conditions were obtained to form a training dataset; The output signal sequences in the training dataset are labeled, and the labeling information includes the ideal switching state and the corresponding confidence label; Based on the training dataset, the parameters of the target neural network model are optimized using the backpropagation algorithm.
[0018] In conjunction with the second aspect, optionally, the device is configured as follows: The original discrete voltage signal sequence generated by the Hall element is obtained through an analog-to-digital converter, and a time-series feature vector is obtained based on the original discrete voltage signal sequence, including: The original discrete voltage signal sequence is standardized and preprocessed. The standardized original discrete signal sequence is divided into overlapping time windows of fixed length; Obtain the statistical characteristics of the signal within each time window, wherein the statistical characteristics include at least one of the following: mean, variance, and zero-crossing rate; The statistical features are concatenated to form a time-series feature vector.
[0019] A third aspect of this invention provides an electronic device, which includes: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method proposed in the first aspect of the present invention.
[0020] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in the first aspect of the present invention.
[0021] In summary, the above method and apparatus have the following technical effects: This application proposes a digital signal processing method and device for Hall elements. First, it acquires the original discrete voltage signal sequence generated by the Hall element through an analog-to-digital converter, and obtains a time-series feature vector based on this sequence. Then, it constructs a target neural network model, inputting the time-series feature vector into the model to output instantaneous discrimination values and confidence scores with time-series characteristics. Subsequently, it obtains an initial digital output signal based on the instantaneous discrimination value and makes it correspond to the confidence score in a time window sequence. Finally, based on the confidence score of the target time window, it outputs a digital switching signal using a multi-strategy approach. This method and device for Hall elements captures the time dimension characteristics of the signal through a time-series feature vector, improves the accuracy of switch state discrimination by combining it with a target neural network model, and implements multi-strategy decision-making with the confidence score as the core. This avoids the problem that traditional single-threshold judgment cannot distinguish between instantaneous noise and real magnetic field changes, while balancing the response speed and reliability of signal processing, and improving the anti-interference capability and decision stability of Hall element digital signal processing. Attached Figure Description
[0022] Figure 1 This is a flowchart illustrating a digital signal processing method for a Hall element proposed in an embodiment of this application. Detailed Implementation
[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0024] This application provides a digital signal processing method for a Hall element, applicable to a digital signal processing device for a Hall element. The device can be a server, computer, integrated processor, etc., and is not limited thereto. Please refer to... Figure 1 The method includes the following steps: S101: Obtain the original discrete voltage signal sequence generated by the Hall element through an analog-to-digital converter, and obtain the timing feature vector based on the original discrete voltage signal sequence.
[0025] Understandably, the core function of a Hall element is to convert changes in an external magnetic field into a continuous analog voltage signal. When the strength of the external magnetic field changes, the charge carriers inside the Hall element are deflected by the Lorentz force, and a continuous analog voltage positively correlated with the magnetic field strength is generated at the output. However, continuous signals cannot be directly recognized and calculated by a processor. At the same time, the voltage signal is affected by temperature, electromagnetic interference, and mechanical stress, and noise is superimposed on it, such as instantaneous voltage jumps and baseline drift.
[0026] For example, long sequences can be split into multiple short time windows to facilitate the extraction of local features. Overlapping designs can ensure the temporal continuity of adjacent windows; for instance, a voltage change at a certain moment can be covered by two windows, avoiding the loss of temporal correlation due to window segmentation.
[0027] For example, the original discrete voltage signal sequence can be preprocessed by standardization. The position of each number in the sequence corresponds to the acquisition time, reflecting the voltage change trend over time. Therefore, the voltage digital quantity in the original sequence may drift in amplitude due to environmental changes, and standardization is required.
[0028] The standardized original discrete signal sequence is divided into fixed-length overlapping time windows. In some implementations, using non-overlapping windows may lead to breakage of the temporal correlation between adjacent windows. Therefore, overlapping time windows can be used.
[0029] Obtain the statistical characteristics of the signal within each time window. The statistical characteristics include at least one of the following: mean, variance, and zero-crossing rate. Finally, concatenate the statistical characteristics to form a time series feature vector.
[0030] For example, if there are three overlapping windows, with the first window having features of [1.65, 0.02, 0.2], the second [1.68, 0.01, 0.18], and the third [1.70, 0.03, 0.19], then the temporal feature vector would be [1.65, 0.02, 0.2, 1.68, 0.01, 0.18, 1.70, 0.03, 0.19, ...]. Understandably, standardization suppresses amplitude drift caused by environmental factors, and overlapping windows and multiple statistical features capture the essential patterns of the signal, reducing the impact of noise on subsequent decisions from the source.
[0031] S102: Construct the target neural network model, input the temporal feature vector into the target neural network model, and output the instantaneous discriminant value and confidence score with temporal features based on the output of the target neural network model.
[0032] For example, a hybrid architecture of Long Short-Term Memory (LSTM) network and one-dimensional convolutional layer can be used instead of a single model, thus simultaneously addressing the dual needs of capturing long-term dependencies and extracting local features in temporal feature vectors.
[0033] For example, a one-dimensional convolutional layer can be configured with two convolutional kernels, with sizes of 3 and 5 respectively. The size refers to the number of feature dimensions covered by the convolutional kernel, corresponding to 3 or 5 consecutive feature values in the temporal feature vector. The activation function is ReLU.
[0034] Understandably, local details can be extracted from the time-series feature vector. For example, a sudden increase in the variance of several consecutive windows in the time-series feature vector corresponds to signal fluctuations caused by instantaneous electromagnetic interference, a sudden increase in the zero-crossing rate, and a local segment of rapid changes in the magnetic field.
[0035] If a segment in the temporal feature vector is [1.65, 0.02, 0.2, 1.68, 0.5, 0.18], the fifth value "0.5" represents a sudden increase in variance. A convolutional kernel of size 3 can quickly capture this local anomaly "0.2, 1.68, 0.5" and identify it as an interference signal.
[0036] The LSTM unit can be configured with 2 layers of LSTM, each with 32 neurons. The activation function is tanh (hyperbolic tangent function, output range -1 to 1) to adapt to the gradual changes in temporal trends.
[0037] Therefore, it can capture long-term temporal correlations in temporal feature vectors. For example, when the magnetic field changes slowly, the mean of multiple consecutive time windows gradually increases, such as from 1.65→1.68→1.70→1.72. LSTM can retain the mean features of previous windows through memory units, avoiding missing trend changes due to judgment of a single window.
[0038] Compared to a single model: if only convolutional layers are used, the long-term trend of gradually increasing mean will be ignored; if only LSTM is used, it will be sensitive to local interference signals. The hybrid architecture can ensure that local details are not missed while long-term trend features are not lost.
[0039] Prior to this, the training process of a neural network can be achieved by acquiring the output signal sequences of Hall elements under different temperatures, electromagnetic interference intensities, and mechanical stress conditions to form a training dataset. Then, the output signal sequences in the training dataset are labeled, including ideal switching states and corresponding confidence labels. Finally, based on the training dataset, the parameters of the target neural network model are optimized using the backpropagation algorithm.
[0040] Understandably, obtaining Hall element output signal sequences under multiple environments can construct a training dataset with strong generalization capabilities, thus avoiding overfitting caused by training only under a single environment.
[0041] For example, as an example: Under each environmental combination, such as 25℃+5V / m+20N, -40℃+10V / m+50N, there are a total of 17×5×6=510 combinations. The external magnetic field strength is controlled to change according to a preset law, such as gradually increasing from 0T to 1T and then decreasing to 0T, simulating the actual scenario of a magnet approaching and moving away. The ADC sampling frequency is set to 1kHz to acquire the analog voltage signal output by the Hall element. The ADC converts the signal into a sequence of original discrete voltage signals, such as 1000 digital values per second in hexadecimal format. For each environmental combination, the original discrete voltage signal sequence is transformed into a corresponding time-series feature vector. For example, each sequence corresponds to 100 overlapping windows, and each window contains three features: mean, variance, and zero-crossing rate. The vector length is 300. The temporal feature vectors from all environmental combinations are aggregated to form the input part of the training dataset.
[0042] Understandably, by iteratively calculating and adjusting the internal parameters of the target neural network, the instantaneous discriminant value output by the model can be made as close as possible to the ideal switching state, and the output confidence score can be as close as possible to the confidence label.
[0043] Specifically, the temporal feature vectors from the training dataset are input into the model, passing sequentially through a one-dimensional convolutional layer, an LSTM layer, and a fully connected layer to obtain the instantaneous discriminant value and confidence score for each sample. Then, starting from the output layer, the partial derivatives of the total loss with respect to each model parameter, i.e., the gradient, are calculated using the chain rule. The gradient direction is the direction in which the loss increases. The Adam optimizer adjusts each parameter based on the gradient direction and the learning rate; for example, the convolution kernel weights are calculated as: original weights - learning rate × gradient, shifting the total loss in the direction of decreasing loss.
[0044] Repeat the forward propagation, loss calculation, backpropagation, and parameter update process until the target iteration is completed or the total loss value stabilizes below the preset threshold. At this point, the model parameters reach the optimal state and have the ability to accurately output discrimination results and confidence scores in multiple environments.
[0045] S103: Obtain the initial digital output signal based on the instantaneous discrimination value and correlate it with the time sequence of the confidence score.
[0046] Understandably, the instantaneous discriminant value is the initial judgment of the target neural network model on the switching state. However, subsequent control systems, such as industrial PLCs and automotive ECUs, require high and low level digital signals for recognition. Therefore, the instantaneous discriminant value must first be converted into an initial digital output signal that meets the hardware interface requirements. The target neural network will synchronously output one instantaneous discriminant value and one confidence score for each time window's timing feature vector. Understandably, the confidence score reflects the reliability of the instantaneous discriminant value, and the two are time-corresponded on a time-window basis.
[0047] S104: Based on the confidence score and the initial digital output signal, output a digital switch signal, wherein if the confidence score corresponding to the target time window is higher than the first preset threshold, the initial digital output signal is immediately used as the digital switch signal.
[0048] S105: If the confidence score corresponding to the target time window is lower than the first preset threshold but higher than the second preset threshold, then a delayed confirmation is performed.
[0049] S106: If the confidence score corresponding to the target time window is lower than the second preset threshold, then the output state of the previous target time window remains unchanged.
[0050] For example, let's take specific parameters as an example: High reliability: SNR≥30dB (clear signal, minimal interference, such as 25℃+1V / m+0N environment), confidence level label≥0.8 (such as 0.8, 0.9, 1.0); Medium reliability: 10dB < SNR < 30dB (signal contains a small amount of interference, such as 25℃ +5V / m +20N environment), confidence level label between 0.3 and 0.8 (e.g. 0.4, 0.5, 0.7). Low reliability: SNR≤10dB (signal subjected to strong interference, such as -40℃ +10V / m +50N environment), confidence label≤0.3 (e.g. 0.1, 0.2, 0.3) For example, for a target time window, such as the 5th window, corresponding to the 45~55ms time period, the time-series feature vector, such as [1.72, 0.01, 0.15, ...], is input into the trained hybrid neural network. The confidence score of this window (0.85) is compared with the first preset threshold (0.8), confirming that "0.85 > 0.8". Without needing to start a counter or wait for subsequent sampling, the high or low level can be directly output as the final digital switch signal to the subsequent control system.
[0051] At this time, the network outputs an instantaneous discriminant value of 1 and a confidence score of 0.85 for the window (> the first preset threshold of 0.8).
[0052] For example, if the initial low-level signal corresponds to a confidence level of 0.75 (between 0.3 and 0.8), subsequent decisions require "delayed confirmation"; The initial low-level signal in window 4 corresponds to a confidence level of 0.28 (< the second threshold of 0.3), and subsequent decisions require "maintaining the previous state".
[0053] Optionally, for the delayed confirmation process, a counter can be started, and the state of the initial digital output signal and its corresponding confidence score can be monitored over K consecutive sampling periods. If the state of the initial digital output signal remains constant and its corresponding confidence score remains higher than a first preset threshold over the K sampling periods, then the current initial digital output signal is confirmed as a digital switch signal when the counter expires. If the state of the initial digital output signal changes or its corresponding confidence score falls back over the K sampling periods, the counter is immediately reset and the judgment is repeated.
[0054] For example, when the confidence score of the target time window falls into the range of 0.3 to 0.8, the processor immediately starts the cycle counter and sets the upper limit of the count to K. For example, K=5, so K=5 means "continuously monitor 5 sampling cycles".
[0055] The counter is used to force the setting of the monitoring duration, avoid unlimited waiting, and ensure that the response speed is within an acceptable range.
[0056] Understandably, during the counter counting period (within 5 sampling periods), the processor needs to simultaneously monitor two key indicators, and both must meet the following conditions for the result to be considered valid: The initial digital output signal state, such as whether the initial signal is high or low in each sampling period, is determined to be qualified if the state is completely consistent within 5 periods and the score is greater than the first preset threshold (0.8) within 5 periods.
[0057] For example, the initial signal for the target time window (e.g., the 8th window, 75~85ms) is "high level" with a confidence level of 0.7 (falling into the range of 0.3~0.8). After starting the counter: First sampling period (85~86ms): Initial signal high level, confidence level 0.82 (>0.8) → qualified; Second sampling period (86~87ms): Initial signal high level, confidence level 0.85 (>0.8) → qualified; Third sampling period (87~88ms): Initial signal high level, confidence level 0.81 (>0.8) → qualified; Fourth sampling period (88~89ms): Initial signal high level, confidence level 0.83 (>0.8) → qualified; 5th sampling period (89~90ms): Initial signal high level, confidence level 0.84 (>0.8) → qualified.
[0058] Understandably, if both conditions are met for all 5 cycles, proceed to the next step to confirm the output. If, within K sampling cycles, the initial digital output signal remains constant and the confidence score consistently exceeds the first preset threshold, it indicates that: The initial signal is a stable state caused by real magnetic field changes rather than transient interference, or the signal interference has been weakened, and the reliability of the model's judgment is improved to a high reliability level (confidence level > 0.8). At this point, when the counter counts to K (e.g., 5), the processor immediately confirms the current initial digital output signal as the final digital switch signal and outputs it. For example, if all 5 cycles are qualified, the counter will output a high level when it reaches its full value, and the subsequent control system will execute the corresponding action.
[0059] If either of the following two situations occurs within K sampling periods, it indicates that the initial signal may be a fluctuation caused by transient interference, and the current monitoring should be terminated and reassessed.
[0060] If the confidence score corresponding to the target time window is lower than the second preset threshold, the signal noise ratio is high or the model's judgment is unreliable. For example, at this time, the Hall element is affected by low temperature, and the sensitivity drift is severe, resulting in a large amount of random noise superimposed on the output voltage signal. For instance, when the magnetic field is <0.5T, the output should be ≤1.0V, but in reality, it jumps to 2.2V due to noise, causing the instantaneous judgment value to deviate significantly from the true magnetic field state. Or, although the model outputs an instantaneous judgment value, if the confidence score is ≤0.3, it means that the model itself judges that the result may be a false high level caused by electromagnetic interference or a false low level caused by temperature drift, and it cannot distinguish between noise and the true magnetic field change. Therefore, based on the design principle of "system stability first", the previous state can be maintained to avoid outputting unreliable signals that cause malfunctions. Of course, in some other embodiments, the output can also be paused.
[0061] This application proposes a digital signal processing method for Hall elements. First, it acquires the original discrete voltage signal sequence generated by the Hall element through an analog-to-digital converter, and obtains a time-series feature vector based on this sequence. Then, it constructs a target neural network model, inputting the time-series feature vector into the model to output instantaneous discrimination values and confidence scores with time-series characteristics. Subsequently, it obtains an initial digital output signal based on the instantaneous discrimination value and makes it correspond to the confidence score in a time window sequence. Finally, based on the confidence score of the target time window, it outputs a digital switching signal using a multi-strategy approach. This method for Hall elements captures the time dimension characteristics of the signal through a time-series feature vector, improves the accuracy of switching state discrimination by combining it with a target neural network model, and implements multi-strategy decision-making with the confidence score as the core. This avoids the problem that traditional single-threshold judgment cannot distinguish between instantaneous noise and real magnetic field changes, while balancing the response speed and reliability of signal processing, and improving the anti-interference capability and decision stability of Hall element digital signal processing.
[0062] Based on the same inventive concept, this application also proposes a digital signal processing device for a Hall element, the device being configured as follows: The original discrete voltage signal sequence generated by the Hall element is obtained by an analog-to-digital converter, and the time-series feature vector is obtained based on the original discrete voltage signal sequence. Construct a target neural network model, input the temporal feature vector into the target neural network model, and output the instantaneous discriminant value and confidence score with temporal features based on the output of the target neural network model; The initial digital output signal is obtained based on the instantaneous discriminant value, and its temporal correspondence with the confidence score is established. Based on the confidence score and the initial digital output signal, a digital switch signal is output. If the confidence score corresponding to the target time window is higher than the first preset threshold, the initial digital output signal is immediately used as the digital switch signal. If the confidence score corresponding to the target time window is lower than the first preset threshold but higher than the second preset threshold, then a delayed confirmation is performed. If the confidence score corresponding to the target time window is lower than the second preset threshold, the output state of the previous target time window will remain unchanged.
[0063] In conjunction with the second aspect, optionally, the device is configured as follows: If the confidence score corresponding to the target time window is lower than the second preset threshold, resampling is triggered.
[0064] In conjunction with the second aspect, optionally, the device is configured as follows: If the confidence score corresponding to the target time window is lower than the second preset threshold, resampling is triggered, including: Increase the sampling frequency of the analog-to-digital converter.
[0065] In conjunction with the second aspect, optionally, the device is configured as follows: If the confidence score corresponding to the target time window is lower than the first preset threshold but higher than the second preset threshold, a delayed confirmation is performed, including: Start the counter and monitor the state of the initial digital output signal and its corresponding confidence score over the subsequent K consecutive sampling periods, where K is a natural number greater than 1; If the initial digital output signal remains constant within K sampling periods and its corresponding confidence score is consistently higher than the first preset threshold, then when the counter expires, the current initial digital output signal will be confirmed as a digital switch signal. If the initial digital output signal state changes or its corresponding confidence score drops within K sampling periods, the counter is immediately reset and the judgment is repeated.
[0066] In conjunction with the second aspect, optionally, the device is configured as follows: The target neural network model is a hybrid architecture that includes long short-term memory network units and one-dimensional convolutional layers. The long short-term memory network units are used to capture long-term dependencies in the temporal feature vector, while the one-dimensional convolutional layers are used to extract local features in the temporal feature vector.
[0067] In conjunction with the second aspect, optionally, the device is configured as follows: Before constructing the target neural network model, inputting the temporal feature vector into the target neural network model, and outputting the instantaneous discriminant value and confidence score with temporal features based on the output of the target neural network model, the following steps are taken: The output signal sequences of Hall elements under different temperatures, electromagnetic interference intensities, and mechanical stress conditions were obtained to form a training dataset; The output signal sequences in the training dataset are labeled, and the labeling information includes the ideal switching state and the corresponding confidence label; Based on the training dataset, the parameters of the target neural network model are optimized using the backpropagation algorithm.
[0068] In conjunction with the second aspect, optionally, the device is configured as follows: The original discrete voltage signal sequence generated by the Hall element is obtained through an analog-to-digital converter, and a time-series feature vector is obtained based on the original discrete voltage signal sequence, including: The original discrete voltage signal sequence is standardized and preprocessed. The standardized original discrete signal sequence is divided into overlapping time windows of fixed length; Obtain the statistical characteristics of the signal within each time window, wherein the statistical characteristics include at least one of the following: mean, variance, and zero-crossing rate; The statistical features are concatenated to form a time-series feature vector.
[0069] This application proposes a digital signal processing device for a Hall element. First, it acquires the original discrete voltage signal sequence generated by the Hall element through an analog-to-digital converter, and obtains a time-series feature vector based on this sequence. Then, it constructs a target neural network model, inputting the time-series feature vector into the model to output instantaneous discrimination values and confidence scores with time-series characteristics. Subsequently, it obtains an initial digital output signal based on the instantaneous discrimination value and makes it correspond to the confidence score in a time window sequence. Finally, based on the confidence score of the target time window, it outputs a digital switching signal using a multi-strategy approach. This Hall element digital signal processing device captures the time dimension characteristics of the signal through a time-series feature vector, improves the accuracy of switch state discrimination by combining it with a target neural network model, and implements multi-strategy decision-making with the confidence score as the core. This avoids the problem that traditional single-threshold judgment cannot distinguish between instantaneous noise and real magnetic field changes, while balancing the response speed and reliability of signal processing, and improving the anti-interference capability and decision stability of Hall element digital signal processing.
[0070] Based on the same inventive concept, embodiments of this application also propose an electronic device, which includes: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the digital signal processing method of the Hall element according to the embodiments of this application.
[0071] Furthermore, to achieve the above objectives, embodiments of this application also propose a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the digital signal processing method of the Hall element according to embodiments of this application.
[0072] The following is a detailed introduction to the various components of the electronic device: In this context, the processor is the control center of the electronic device. It can be a single processor or a collective term for multiple processing elements. For example, a processor can be one or more central processing units (CPUs), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention, such as one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs).
[0073] Alternatively, the processor can perform various functions of the electronic device by running or executing software programs stored in memory and by calling data stored in memory.
[0074] The memory is used to store the software program that executes the solution of the present invention, and the execution is controlled by the processor. The specific implementation method can be referred to the above method embodiment, which will not be repeated here.
[0075] Optionally, the memory can be read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions, random access memory (RAM) or other types of dynamic storage devices capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory can be integrated with the processor or exist independently and coupled to the processor through an interface circuit of an electronic device; the embodiments of the present invention do not specifically limit this.
[0076] A transceiver is used to communicate with network devices or with terminal devices.
[0077] Optionally, the transceiver may include a receiver and a transmitter. The receiver is used to implement the receiving function, and the transmitter is used to implement the sending function.
[0078] Optionally, the transceiver can be integrated with the processor or exist independently and coupled to the processor through the router's interface circuit. This embodiment of the invention does not specifically limit this.
[0079] Furthermore, the technical effects of the electronic device can be referred to the technical effects of the data transmission method in the above method embodiments, and will not be repeated here.
[0080] It should be understood that the processor in the embodiments of the present invention can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0081] It should also be understood that the memory in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDRSDRAM), enhanced synchronous DRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DRRAM).
[0082] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the flow or function according to the embodiments of the present invention is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. A computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. Available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media. Semiconductor media can be solid-state drives.
[0083] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. A and B can be singular or plural. Additionally, the character " / " in this article generally indicates an "or" relationship between the preceding and following related objects, but it can also represent an "and / or" relationship. Please refer to the context for a more accurate understanding.
[0084] In this invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of a single item or a plurality of items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be a single item or multiple items.
[0085] It should be understood that, in various embodiments of the present invention, the order of the above-mentioned process numbers does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0086] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
Claims
1. A digital signal processing method for a Hall element, characterized in that, The method includes: The original discrete voltage signal sequence generated by the Hall element is obtained by an analog-to-digital converter, and a timing feature vector is obtained based on the original discrete voltage signal sequence. Construct a target neural network model, input the time-series feature vector into the target neural network model, and output instantaneous discriminant values and confidence scores with time-series features based on the output results of the target neural network model; The initial digital output signal is obtained based on the instantaneous discrimination value, and its temporal correspondence is matched with the confidence score. Based on the confidence score and the initial digital output signal, a digital switch signal is output, wherein if the confidence score corresponding to the target time window is higher than a first preset threshold, the initial digital output signal is immediately used as the digital switch signal. If the confidence score corresponding to the target time window is lower than the first preset threshold but higher than the second preset threshold, then a delayed confirmation is performed, including: Start the counter and monitor the state of the initial digital output signal and its corresponding confidence score over the subsequent K consecutive sampling periods, where K is a natural number greater than 1; If the initial digital output signal remains constant and its corresponding confidence score is consistently higher than the first preset threshold within K sampling periods, then when the counter expires, the current initial digital output signal will be confirmed as the digital switch signal. If the initial digital output signal state changes or its corresponding confidence score drops within K sampling periods, the counter is immediately reset and the judgment is repeated. If the confidence score corresponding to the target time window is lower than the second preset threshold, the output state of the previous target time window remains unchanged.
2. The digital signal processing method for a Hall element according to claim 1, characterized in that, The method further includes: If the confidence score corresponding to the target time window is lower than the second preset threshold, resampling is triggered.
3. The digital signal processing method for a Hall element according to claim 2, characterized in that, If the confidence score corresponding to the target time window is lower than the second preset threshold, resampling is triggered, including: Increase the sampling frequency of the analog-to-digital converter.
4. The digital signal processing method for a Hall element according to claim 1, characterized in that, The target neural network model is a hybrid architecture containing long short-term memory network units and one-dimensional convolutional layers. The long short-term memory network units are used to capture long-term dependencies in the temporal feature vector, and the one-dimensional convolutional layers are used to extract local features in the temporal feature vector.
5. The digital signal processing method for a Hall element according to claim 1, characterized in that, Before constructing a target neural network model, inputting the temporal feature vector into the target neural network model, and outputting the instantaneous discriminant value and confidence score with temporal features based on the output of the target neural network model, the process includes: The output signal sequences of the Hall element under different temperatures, different electromagnetic interference intensities, and different mechanical stress conditions are obtained to form a training dataset; The output signal sequence in the training dataset is labeled, wherein the label includes ideal switching states and corresponding confidence labels; Based on the training dataset, the parameters of the target neural network model are optimized using the backpropagation algorithm.
6. The digital signal processing method for a Hall element according to claim 1, characterized in that, The original discrete voltage signal sequence generated by the Hall element is obtained through an analog-to-digital converter, and a time-series feature vector is obtained based on the original discrete voltage signal sequence, including: The original discrete voltage signal sequence is subjected to standardization preprocessing; The standardized original discrete signal sequence is divided into overlapping time windows of fixed length; Obtain the statistical characteristics of the signal within each time window, wherein the statistical characteristics include at least one of the following: mean, variance, and zero-crossing rate; The statistical features are concatenated to form the time-series feature vector.
7. An electronic device, characterized in that, include: At least one processor; And, a memory communicatively connected to at least one of the processors; The memory stores instructions executable by at least one of the processors, which are executed to enable the at least one processor to perform a digital signal processing device method for a Hall element as claimed in any one of claims 1-6.
8. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements a digital signal processing device method for a Hall element as claimed in any one of claims 1-6.