Signal processing method, chip and electronic equipment
By reducing noise and phase correction processing of Hall sensor output signals, the phase hysteresis problem introduced by traditional filters is solved, and detection accuracy and product quality are improved.
Patent Information
- Application Number
- CN202411646969.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-03-04
AI Technical Summary
The signals output by Hall sensors in the field of low-frequency displacement change measurement are noise. The traditional filter noise reduction method will introduce phase lag, affecting the detection accuracy.
By obtaining the original signal output from the Hall sensor, performing noise reduction processing and phase correction, using the preset phase debugging parameter set to determine the appropriate phase debugging parameters, adjust the phase of the noise reduction signal, and performing gain adjustment on the corrected signal to ensure that the phase difference and amplitude difference between the signal and the original signal are less than the threshold.
It effectively reduces the phase lag of the signal after Hall sensor noise reduction, improves detection accuracy, and improves the product quality and accuracy of Hall sensors used.
Smart Images

Figure CN119561519A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of noise reduction, and in particular to a signal processing method, a chip and an electronic device. Background Art
[0002] The Hall sensor is a sensor based on the Hall effect, which refers to the phenomenon that when the current in a conductor passes through a magnetic field perpendicular to the surface of the conductor, an electric potential difference is generated on both sides of the conductor. Hall sensors can be used to measure parameters such as displacement, pressure, and acceleration. Due to the semiconductor characteristics of the Hall sensor itself, and its susceptibility to the influence of manufacturing process, ambient temperature, etc., there is a certain degree of noise in the signal output by the Hall sensor in actual application. For example, in order to solve the noise problem existing in the application of the Hall sensor in the field of low-frequency displacement change measurement (detection), in some schemes, the noise problem of the Hall sensor is improved by using the traditional filter noise reduction method, but the traditional filter noise reduction method will introduce a more serious phase lag, which will affect the accuracy of the Hall sensor detection result, thereby affecting the control accuracy of the control system (such as a high-precision servo control system) based on the Hall sensor detection result.
[0003] Therefore, how to solve the hysteresis problem of the Hall sensor signal after noise reduction in the field of low-frequency displacement change measurement is an urgent problem to be solved. Summary of the invention
[0004] To solve the above problems, the present application provides a signal processing method, a chip and an electronic device.
[0005] In a first aspect, the present application provides a signal processing method, which is applied to an electronic device, and the method includes: obtaining an original signal output by a Hall sensor; performing noise reduction processing on the original signal to obtain a noise-reduced signal; obtaining a first phase debugging parameter, which is used to adjust the phase of the noise-reduced signal; adjusting the noise-reduced signal based on the first phase debugging parameter to obtain a first correction signal, wherein the phase difference between the first correction signal and the original signal is less than a first threshold; and performing gain adjustment on the first correction signal to obtain a target signal.
[0006] Based on the above scheme, the phase of the Hall sensor's noise-reduced signal can be corrected to reduce the phase lag of the Hall sensor's noise-reduced signal, solve the lag problem of the Hall sensor's noise-reduced signal in the field of low-frequency displacement change measurement, and effectively improve the detection accuracy of the Hall sensor in the field of low-frequency displacement change measurement, thereby improving the quality and accuracy of products using Hall sensors.
[0007] In a possible implementation of the first aspect above, a method for determining a first phase debugging parameter includes: determining a phase debugging parameter set, wherein the phase debugging parameter set includes multiple groups of phase debugging parameters; adjusting the noise reduced signal based on each phase debugging parameter in the phase debugging parameter set in turn, and obtaining the adjusted signal; and taking the phase debugging parameter that makes the phase difference between the adjusted signal and the original signal less than a first threshold for the first time as the first phase debugging parameter.
[0008] Based on the above scheme, by determining a phase debugging parameter from a preset phase debugging parameter set, and adjusting the noise-reduced signal of the Hall sensor according to the determined phase debugging parameter, the problem of phase lag generated by the noise-reduced signal of the Hall sensor can be effectively improved, thereby effectively improving the detection accuracy of the Hall sensor, and further improving the quality and accuracy of products using the Hall sensor.
[0009] In a possible implementation of the first aspect above, performing noise reduction processing on the original signal to obtain a noise-reduced signal includes: amplifying the original signal to obtain an amplified signal; performing analog-to-digital conversion processing on the amplified signal to obtain a digital signal; and performing noise reduction processing on the digital signal to obtain a noise-reduced signal.
[0010] In a possible implementation of the first aspect above, performing noise reduction processing on a digital signal to obtain a noise-reduced signal includes: obtaining a first noise reduction debugging parameter, where the first noise reduction debugging parameter is used to reduce a noise signal in the digital signal; and adjusting the digital signal based on the first noise reduction debugging parameter to obtain the noise-reduced signal, where a noise signal ratio of the noise-reduced signal is less than a second threshold.
[0011] In a possible implementation of the first aspect above, the method for determining the first noise reduction debugging parameter includes: determining a noise reduction debugging parameter set; adjusting the digital signal based on each noise reduction debugging parameter in the noise reduction debugging parameter set in turn, and obtaining the adjusted signal; and using the noise reduction debugging parameter that makes the noise signal ratio of the adjusted signal less than a second threshold for the first time as the first noise reduction debugging parameter.
[0012] In a possible implementation of the first aspect above, the gain of the first correction signal is adjusted to obtain a target signal, including: obtaining a first gain parameter, the first gain parameter being used to adjust the amplitude of the first correction signal; adjusting the first correction signal based on the first gain adjustment parameter to obtain the target signal, the amplitude difference between the target signal and the original signal being less than a third threshold.
[0013] In a possible implementation of the first aspect, determining the first gain tuning parameter includes:
[0014] Determine a gain debugging parameter set, wherein the gain debugging parameter set includes multiple groups of gain debugging parameters; adjust the first correction signal based on each gain debugging parameter in the gain debugging parameter set in turn, and obtain an adjusted signal; and use the gain debugging parameter that makes the amplitude difference between the adjusted signal and the original signal smaller than a third threshold for the first time as the first gain debugging parameter.
[0015] In the second aspect, the embodiment of the present application provides an electronic device, including: an acquisition module, used to acquire the original signal output by the Hall sensor; a noise processing module, used to perform noise reduction processing on the original signal to acquire the noise-reduced signal; a phase adjustment module, used to acquire a first phase adjustment parameter, the first phase adjustment parameter is used to adjust the phase of the noise-reduced signal; the phase adjustment module is used to adjust the noise-reduced signal based on the first phase adjustment parameter to acquire a first correction signal, wherein the phase difference between the first correction signal and the original signal is less than a first threshold. A gain adjustment module is used to adjust the gain of the first correction signal to acquire a target signal.
[0016] In a third aspect, the present application provides a chip, which is used to execute the signal processing method of the first aspect.
[0017] In a fourth aspect, the present application provides an electronic device, comprising: a memory for storing instructions; and a processor for executing instructions to implement the signal processing method of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 According to some embodiments provided by the present application, a schematic diagram of Hall sensor noise measured in a static state is shown;
[0019] Figure 2 According to some embodiments provided by the present application, a structural schematic diagram of an electronic device is shown;
[0020] Figure 3 According to some embodiments provided by the present application, a flow chart of a signal processing method is shown;
[0021] Figure 4A According to some embodiments provided by the present application, a schematic diagram of noise reduction effect of a frequency sweep signal is shown;
[0022] Figure 4B According to some embodiments provided by the present application, a schematic diagram of a local enlargement of the noise reduction effect of a frequency sweep signal is shown;
[0023] Figure 5A According to some embodiments provided by the present application, a schematic diagram of a phase correction effect of a frequency sweep signal is shown;
[0024] Figure 5BAccording to some embodiments provided by the present application, a schematic diagram of a partial enlargement of the phase correction effect of a frequency sweep signal is shown;
[0025] Fig. 6A According to some embodiments provided by the present application, a schematic diagram of a sweep frequency signal gain correction effect is shown;
[0026] Figure 6B According to some embodiments provided by the present application, a schematic diagram of a local amplification of a sweep frequency signal gain correction effect is shown;
[0027] Fig. 7A According to some embodiments provided by the present application, a schematic diagram of comparing the noise reduction effects of a frequency sweep signal is shown;
[0028] Figure 7B According to some embodiments provided in the present application, a schematic diagram of a local enlargement of a comparison of the noise reduction effect of a swept frequency signal is shown. DETAILED DESCRIPTION
[0029] The illustrative embodiments of the present application include but are not limited to a signal processing method, a chip, and an electronic device, etc. The specific implementation process of the technical solution provided by the embodiments of the present application is described in detail below in conjunction with the accompanying drawings.
[0030] It can be understood that the signal processing method of the embodiment of the present application can be applied to the noise reduction scenario based on the measurement of the corresponding signal by the Hall sensor in any electronic device.
[0031] As mentioned above, in some solutions, when measuring based on Hall sensors, due to the semiconductor characteristics of the Hall sensors themselves, and the susceptibility to the influence of manufacturing process, ambient temperature, etc., there is noise in the signal output by the Hall sensors in actual applications. For example, Figure 1 The figure shows a schematic diagram of the noise signal in the output signal of a Hall sensor measured in a static state. The horizontal axis is the sampling time, and the vertical axis is the noise signal. Since the noise will cause the output signal of the Hall sensor to have a phase lag, the measurement accuracy of the Hall sensor will be low.
[0032] In view of the noise problem existing in the application of Hall sensors in the field of low-frequency displacement change measurement, in some solutions, the traditional filter noise reduction method is used to improve the noise problem of the Hall sensor, but the traditional filter noise reduction method will introduce a more serious phase lag. In high-precision servo control systems, the phase lag introduced by the Hall sensor noise reduction method has a greater impact on the control accuracy of the closed-loop control system. Therefore, how to solve the lag problem of the Hall sensor signal after noise reduction in the field of low-frequency displacement change measurement is an urgent problem to be solved.
[0033] In order to solve the above problems, an embodiment of the present application provides a signal processing method, which includes: obtaining an original signal output by a Hall sensor; performing noise reduction processing on the original signal to obtain a noise-reduced signal; obtaining a first phase debugging parameter, which is used to adjust the phase of the noise-reduced signal; adjusting the noise-reduced signal based on the first phase debugging parameter to obtain a first correction signal, wherein the phase difference between the first correction signal and the original signal is less than a first threshold; and performing gain adjustment on the first correction signal to obtain a target signal.
[0034] Based on the above scheme, the phase of the Hall sensor's noise-reduced signal can be corrected to reduce the phase lag of the Hall sensor's noise-reduced signal, solve the lag problem of the Hall sensor's noise-reduced signal in the field of low-frequency displacement change measurement, and effectively improve the detection accuracy of the Hall sensor in the field of low-frequency displacement change measurement, thereby improving the quality and accuracy of products using Hall sensors.
[0035] Below, the electronic device mentioned in this application is first introduced.
[0036] Figure 2 FIG. 1 shows a schematic diagram of the structure of an electronic device. Figure 2 As shown, the electronic device may include a Hall sensor 10 , an operational amplifier 20 , an analog-to-digital converter (ADC) 30 , and a noise reduction module 40 .
[0037] Among them, the Hall sensor 10 can be used to output an analog signal to the operational amplifier 20; the operational amplifier 20 is a circuit unit with a high amplification factor. After receiving the analog signal, the operational amplifier 20 can perform calculus processing on the analog signal to obtain an amplified analog signal, and send the amplified analog signal to the analog-to-digital converter 30; it can be understood that the Hall sensor can be used in measurement fields such as pressure, acceleration, displacement, speed, vibration, etc., and therefore, the corresponding analog signal can be output based on the detected pressure, acceleration, displacement, speed, vibration and other information.
[0038] The analog-to-digital converter 30 receives the amplified analog signal, converts the analog signal into a digital signal and sends it to the noise reduction module 40;
[0039] The noise reduction module 40 can be used to receive the digital signal sent by the analog-to-digital converter 30, and perform noise reduction processing, phase correction processing, gain correction processing, etc. on the digital signal in sequence to obtain the target signal. For example, the noise reduction module 40 can be used to perform noise reduction processing on the digital signal to obtain a noise-reduced signal; and obtain a first phase adjustment parameter, adjust the noise-reduced signal based on the first phase adjustment parameter, obtain a first correction signal, and perform gain adjustment on the first correction signal to obtain the target signal.
[0040] The noise reduction module 40 may be a filter integrated with a data processing function, or may be any electronic device with a data processing function in an electronic device, such as a processor, which is not limited here.
[0041] The signal processing method mentioned in this application is introduced in detail below.
[0042] According to some embodiments of the present application, Figure 3 A flow chart of a signal processing method is shown. The signal processing method can be executed by an electronic device, such as Figure 3 As shown, the specific process of the signal processing method may include:
[0043] S101: Obtain the original signal output by the Hall sensor.
[0044] It can be understood that the original signal output by the Hall sensor mentioned in the embodiment of the present application may be an analog signal output by the Hall sensor.
[0045] S102: Perform noise reduction processing on the original signal to obtain a noise-reduced signal.
[0046] In some embodiments of the present application, when the original signal output by the Hall sensor is an analog signal, the original signal is subjected to noise reduction processing to obtain a noise-reduced signal, which may include: after obtaining the original signal output by the Hall sensor, the original signal may be amplified to obtain an amplified signal, and the amplified signal may be subjected to analog-to-digital conversion processing to obtain a digital signal, and the digital signal may be subjected to noise reduction processing to obtain a noise-reduced signal.
[0047] In some embodiments of the present application, the Hall sensor may also be integrated with the function of converting digital signals. In this case, the original signal output by the Hall sensor is a digital signal, and the digital signal may be directly subjected to noise reduction processing to obtain a noise-reduced signal.
[0048] In some embodiments of the present application, as mentioned above Figure 2 As shown, if the original signal output by the Hall sensor 10 is an analog electrical signal (or called an analog signal), the original signal can be sent to the operational amplifier 20. The operational amplifier 20 is a circuit unit with a high amplification factor. After receiving the original signal, the operational amplifier 20 can perform calculus processing on the original signal to obtain an amplified signal, and send the amplified signal to the analog-to-digital converter 30. The analog-to-digital converter 30 receives the amplified signal and can convert the amplified signal into a digital signal, and send it to the noise reduction module 40 for noise reduction processing.
[0049] It can be understood that after receiving the amplified signal, the analog-to-digital converter 30 can use formula (1) to calculate the digital signal obtained by analog-to-digital conversion of the amplified signal. Among them, ADC is used to represent the output of the analog-to-digital converter 30, that is, the digital electrical signal; VHall is used to represent the Hall voltage value measured by the Hall sensor; Vref is used to represent the measurement range of the Hall sensor, that is, the voltage variation range of the Hall electrical signal; n represents the number of bits of the ADC, 2 n -1 indicates a numeric precision.
[0050]
[0051] In some embodiments of the present application, a digital signal is subjected to noise reduction processing to obtain a noise-reduced signal, including: obtaining a first noise reduction debugging parameter, the first noise reduction debugging parameter being used to reduce a noise signal in the digital signal; adjusting the digital signal based on the first noise reduction debugging parameter to obtain a noise-reduced signal, the noise signal ratio of the noise-reduced signal being less than a second threshold.
[0052] Among them, determining the first noise reduction debugging parameter includes: determining a noise reduction debugging parameter set; adjusting the digital signal based on each noise reduction debugging parameter in the noise reduction debugging parameter set in turn, and obtaining an adjusted signal; and using the noise reduction debugging parameter that makes the noise signal ratio in the adjusted signal less than a second threshold for the first time as the first noise reduction debugging parameter.
[0053] In some embodiments, determining the first noise reduction debugging parameter may also include randomly inputting a set of noise reduction parameters, adjusting the digital signal based on the noise reduction parameters, and obtaining the adjusted signal. If the noise signal ratio in the adjusted signal is less than the second threshold, the noise reduction debugging parameter is used as the first noise reduction debugging parameter, and the digital signal is adjusted based on the noise reduction parameter, and the obtained adjusted signal is used as the noise-reduced signal. When the noise signal ratio in the adjusted signal is not less than the second threshold, the noise reduction debugging parameter is adjusted, and the digital signal is adjusted based on the adjusted noise reduction debugging parameter until the noise signal ratio in the adjusted signal is less than the second threshold, and the noise reduction debugging parameter that first makes the noise signal ratio in the adjusted signal less than the second threshold is used as the first noise reduction debugging parameter.
[0054] The above-mentioned method of performing noise reduction processing on a digital signal is described below by way of example.
[0055] The noise reduction module 40 can be a filter, and the filter has the function of noise suppression, so noise reduction can be achieved through the filter. As shown in formula (2), formula (2) is an expression of a filter transfer function. The filter transfer function refers to the influence of external signal information on the filter state information in the internal wireless system when the signal in the filter undergoes function transformation. The transfer function can be expressed as a real or complex polynomial, or it can be expressed by expanding to the complex plane. The transfer function can be used to measure the performance of the filter, especially the lag delay, gain and filter response of the filter at different frequencies, and can also be used to suppress interference, form transformation and gain adjustment. In formula (2), G(s) represents the filter transfer function, M0-M5, N0-N5 are the filter parameters in the filter transfer function, and s is the differential operator. In order to achieve noise reduction for digital signals, the filter parameters M0-M5 and N0-N5 in the filter transfer function can be set, as shown in formula (3), where a1-a3 and b1-b3 are noise reduction adjustment parameters, k1-k2 are phase adjustment parameters, and c1-c3 and d1-d3 are gain adjustment parameters.
[0056] It can be understood that in some embodiments of the present application, the digital signal is debugged for noise reduction, and the method for determining the first noise reduction debugging parameter can be: first obtain a noise reduction debugging parameter set, wherein the noise reduction debugging parameter set can be multiple groups of {a1, a2, a3, b1, b2, b3} parameters, and each group of {a1, a2, a3, b1, b2, b3} parameters has at least one parameter value that is different. For example, in the first group of noise reduction debugging parameters: {a1=1, a2=2, a3=3, b1=1, b2=2, b3=3}, in the second group of noise reduction debugging parameters: {a1=1, a2=1, a3=2, b1=1, b2=2, b3=2}, which is not limited here.
[0057] Then, the digital signal is adjusted based on each group of noise reduction adjustment parameters in turn, and an adjusted signal is obtained; and the noise reduction adjustment parameter that first makes the noise signal ratio of the adjusted signal less than the second threshold is used as the first noise reduction adjustment parameter.
[0058] In other embodiments, it is also possible not to obtain a set of noise reduction debugging parameters in advance. Instead, after generating a set of noise reduction debugging parameters, the digital signal is adjusted based on the set of noise reduction debugging parameters. When the adjusted signal does not satisfy the condition that the noise signal ratio is less than the second threshold, the next set of noise reduction debugging parameters is generated until there is a noise reduction debugging parameter in the set of noise reduction debugging parameters that can make the adjusted signal satisfy the condition that the noise signal ratio is less than the second threshold, the signal after noise reduction is obtained, and the noise reduction debugging parameter is used as the first noise reduction debugging parameter.
[0059]
[0060] Figure 4A According to some embodiments of the present application, taking the case where the noise reduction module 40 can be a filter as an example, a schematic diagram of the noise reduction effect of a frequency sweep signal after the noise reduction debugging parameters are adjusted is shown. Figure 4B A partial enlarged schematic diagram of a frequency sweep signal noise reduction effect is shown. A frequency sweep signal refers to a signal whose frequency changes continuously from high to low (or from low to high) within a frequency band (eg, 0-20 Hz).
[0061] refer to Figure 4A It can be seen that the noise reduction debugging can effectively reduce the noise of digital electrical signals with 5% noise. Figure 4A It includes the digital signal before noise reduction, the ideal digital signal without noise, and the signal after noise reduction. It can be understood that the original signal is also a digital signal. Figure 4B From the local enlarged schematic diagram, it can be seen that the noise of the digital signal before noise reduction is effectively suppressed after noise reduction debugging.
[0062] It can be understood that the signal processing method of the present application can perform noise reduction processing on a signal with 5% noise, and can also perform noise reduction processing on other signals with different degrees of noise, which is not limited here.
[0063] It can be understood that the transfer function refers to the relationship between the input and output of an object with linear characteristics, expressed by a function (the ratio of the Laplace transform of the output waveform to the Laplace transform of the input waveform).
[0064] S103: Obtain a first phase adjustment parameter, where the first phase adjustment parameter is used to adjust the phase of the noise-reduced signal.
[0065] In some embodiments of the present application, a method for determining a first phase debugging parameter includes: determining a phase debugging parameter set, wherein the phase debugging parameter set includes multiple groups of phase debugging parameters; adjusting the noise reduced signal based on each phase debugging parameter in the phase debugging parameter set in turn, and obtaining the adjusted signal; and using the phase debugging parameter that for the first time makes the phase difference between the adjusted signal and the original signal or the digital signal corresponding to the original signal less than a first threshold as the first phase debugging parameter.
[0066] It can be understood that in some embodiments of the present application, the phase of the noise-reduced signal is adjusted, and the method for determining the first phase adjustment parameter can be: first obtain a phase adjustment parameter set, wherein the phase adjustment parameter set can be multiple groups of {k1, k2} parameters, wherein each group of {k1, k2} parameters has at least one parameter value that is different. For example, in the first group of phase adjustment parameters, {k1=3, k2=5}, and in the second group of phase adjustment parameters, {k1=1, k2=3}, which is not limited here.
[0067] Then, the noise-reduced signal is adjusted based on each group of phase adjustment parameters in turn, and the adjusted signal is obtained; the phase adjustment parameter that makes the phase difference between the adjusted signal and the original signal less than the first threshold for the first time is used as the first phase adjustment parameter, and the adjusted signal is used as the first correction signal.
[0068] In other embodiments, it is also possible not to obtain a set of phase debugging parameters in advance. Instead, after generating a set of phase debugging parameters, the noise reduction signal is adjusted based on the set of phase debugging parameters. When the adjusted signal does not satisfy the phase difference with the original signal being less than the first threshold, the next set of phase debugging parameters is continuously generated until there is a phase debugging parameter in the set of phase debugging parameters that can make the adjusted signal satisfy the phase difference with the noise reduction signal being less than the first threshold, and the first correction signal is obtained. The phase debugging parameter is the first phase debugging parameter.
[0069] S104: Adjust the noise-reduced signal based on the first phase adjustment parameter to obtain a first correction signal, wherein a phase difference between the first correction signal and the original signal is less than a first threshold.
[0070] In some embodiments of the present application, the noise reduced signal can be adjusted based on the first phase adjustment parameter to obtain a first correction signal, wherein the phase difference between the first correction signal and the original signal is less than a first threshold, or the phase difference between the first correction signal and the digital signal corresponding to the original signal is less than a preset threshold.
[0071] The following is an example of the above-mentioned method of adjusting the noise-reduced signal to obtain the first correction signal.
[0072] Based on the noise reduction module 40, it can be a filter, and the filter has the function of noise suppression, so the signal can be phase-adjusted based on the discretized filter transfer function. As shown in formula (4), formula (4) is the discretized filter transfer function expression of the filter transfer function of formula (2) after z-transformation. It can be understood that z-transformation is a mathematical transformation of a discrete sequence to obtain a corresponding discretized expression. Discretization refers to segmenting continuous data into a discrete interval, the purpose of which is to convert continuous problems into discrete problems that can be processed by computers. Here, a bilinear change is taken as an example, that is, let s = (z-1) / (z + 1), substitute it into formula (2) to obtain formula (4), that is, formula (4) is a discretized expression of formula (2). Correspondingly, formula (5) is a discretized expression of formula (3). In formula (4), G (z) represents the discretized filter transfer function expression after z-transformation, where m0-m5 and n0-n5 are respectively the discrete filter parameters in the discretized filter transfer function.
[0073]
[0074] It can be understood that the bilinear transformation is a conformal mapping (i.e. mapping one region to another region for study through an analytical function), which can be used to convert the transfer function of the filter in the continuous time domain into the transfer function of the filter in the discrete time domain.
[0075] It can be understood that the z domain is a description of a discrete time system, which is derived from the Laplace transform of a continuous system, and the z transform is a deformation of the Laplace transform of a sampling function. After sampling a continuous time system, the sampled signal can be processed.
[0076] For example Figure 5A and Figure 5B , Figure 5A According to some embodiments of the present application, a schematic diagram of the phase correction effect of a frequency sweep signal after adjusting the phase debugging parameters is shown. Figure 5B A locally enlarged schematic diagram of the phase correction effect of a frequency sweep signal is shown.
[0077] pass Figure 4A , Figure 4B and Figure 5A , Figure 5B By comparison, we can see that through phase debugging, the phase lag of the signal after phase correction relative to the ideal digital signal is smaller than that of the signal after noise reduction relative to the ideal digital signal. Figure 5A The signal includes the noise-reduced signal before phase correction, the ideal digital signal without noise, and the first correction signal after phase correction. It can be understood that the noise-reduced signal is also a digital signal. Figure 5B From the local enlarged schematic diagram, it can be seen that the phase lag of the noise-reduced signal is effectively corrected after phase correction.
[0078] S105: Perform gain adjustment on the first correction signal to obtain a target signal.
[0079] In some embodiments of the present application, the noise-reduced signal may also have amplitude attenuation. Therefore, after performing phase correction on the noise-reduced signal to obtain a first correction signal, the first correction signal may be gain-adjusted to obtain a target signal.
[0080] Performing gain adjustment on the first correction signal to obtain a target signal includes: obtaining a first gain parameter, the first gain parameter being used to adjust the amplitude of the first correction signal; adjusting the first correction signal based on the first gain adjustment parameter to obtain the target signal, wherein the amplitude difference between the target signal and the original signal is less than a third threshold, or the amplitude difference between the target signal and the digital signal corresponding to the original signal is less than the third threshold.
[0081] The method for determining a first gain debugging parameter includes: determining a gain debugging parameter set, wherein the gain debugging parameter set includes multiple groups of gain debugging parameters; adjusting a first correction signal based on each gain debugging parameter in the gain debugging parameter set in turn, and obtaining an adjusted signal; and using the gain debugging parameter that makes the amplitude difference between the adjusted signal and the original signal less than a third threshold for the first time as the first gain debugging parameter.
[0082] The above-mentioned method of adjusting the gain of the first correction signal is described below by way of example.
[0083] It can be understood that in some embodiments of the present application, the first correction signal is gain adjusted, and the method for determining the gain adjustment parameter set can be: first obtain the gain adjustment parameter set, wherein the gain adjustment parameter set can be multiple groups of {c1, c2, c3, d1, d2, d3} parameters, wherein each group of {c1, c2, c3, d1, d2, d3} parameters has at least one parameter value that is different, for example. In the first group of gain adjustment parameters, {c1=2, c2=1, c3=1, d1=2, d2=1, d3=2}, and in the second group of noise reduction adjustment parameters, {c1=1, c2=3, c3=3, d1=2, d2=2, d3=1}, which is not limited here.
[0084] Then, the first correction signal is adjusted based on each group of gain adjustment parameters in turn, and an adjusted signal is obtained; and the gain adjustment parameter that makes the amplitude difference between the adjusted signal and the original signal smaller than the third threshold for the first time is used as the first gain adjustment parameter.
[0085] In other embodiments, it is also possible not to obtain a set of gain debugging parameters in advance. Instead, after generating a set of gain debugging parameters, the first correction signal is adjusted based on the set of gain debugging parameters. When the adjusted signal does not satisfy the condition that the amplitude difference with the original signal is less than a third threshold, the next set of gain debugging parameters is continuously generated until there is a gain debugging parameter in the set of gain debugging parameters that can make the adjusted signal satisfy the condition that the amplitude difference with the original signal is less than the third threshold, and the target signal is obtained, and the gain debugging parameter is the first gain debugging parameter.
[0086] For example Fig. 6A and Figure 6B , Fig. 6A According to some embodiments of the present application, a schematic diagram of a gain correction effect of a swept frequency signal after adjustment of a gain debugging parameter is shown. Figure 6B A schematic diagram of a local enlargement of the gain correction effect of a swept frequency signal is shown.
[0087] refer to Fig. 6A , Fig. 6AIt includes the first correction signal before gain adjustment, the ideal electrical signal without noise, and the target signal after gain correction. Fig. 6A It can be seen that the gain adjustment can achieve a smaller amplitude difference between the gain-adjusted signal and the noise-free ideal signal than the signal without gain adjustment. Figure 6B It can be seen from the local enlarged schematic diagram that the amplitude of the signal is attenuated less after the gain adjustment.
[0088] In some embodiments, the scanning signal can be denoised by a second-order low-pass filter, which is an electronic filtering device that allows signals below the cut-off frequency to pass, but not signals above the cut-off frequency. For example, the sampling rate for sampling the sweep signal can be set to 5KHz and the cut-off frequency to 32Hz. In some embodiments, the second-order low-pass filter can include a second-order low-pass filter in the form of a Butterworth second-order low-pass filter, a Chebyshev second-order low-pass filter, an elliptical second-order low-pass filter, a flattest second-order low-pass filter, and the like.
[0089] Fig. 7A A comparison diagram of the noise reduction effect of a signal processing method provided by an embodiment of the present application and noise reduction of a swept frequency signal based on other second-order low-pass filters is shown. Fig. 7A As shown, from top to bottom are respectively a waveform diagram of the noise reduction effect using the signal processing method of the present application, a waveform diagram of the noise reduction effect using a Butterworth second-order low-pass filter, a waveform diagram of the noise reduction effect using a Chebyshev second-order low-pass filter, a waveform diagram of the noise reduction effect using an elliptical second-order low-pass filter, and a waveform diagram of the noise reduction effect using the flattest second-order low-pass filter.
[0090] Refer to Figure 7B , Figure 7B for Fig. 7A Schematic diagram of partial enlargement of the noise reduction effect comparison of the swept frequency signal. It can be seen that compared with the noise reduction effect of the swept frequency signal by the Butterworth second-order low-pass filter, the Chebyshev second-order low-pass filter, the elliptical second-order low-pass filter, and the flattest second-order low-pass filter, the swept frequency signal is denoised by the signal processing method provided in the embodiment of the present application. While effectively reducing the noise of the swept frequency signal, the phase lag in the low-frequency segment (for example, 0 to 20 Hz) is smaller, and the error introduced by the phase lag is also effectively reduced, which can effectively improve the problem of low measurement accuracy of the Hall sensor during the measurement process.
[0091] Through the signal processing method of the present application, the phase lag problem of the noise-reduced signal obtained after the noise reduction debugging of the original signal can be improved by adjusting one or more phase debugging parameters in the phase debugging parameter set, so that the phase difference between the first correction signal obtained after the phase correction of the noise-reduced signal and the original signal is less than a certain threshold, and the phase correction effect is obvious. In addition, for the problem that the amplitude value of the first correction signal obtained by the noise reduction debugging and the phase debugging is first reduced relative to the original signal, the gain can be adjusted so that the amplitude difference between the target signal obtained after the gain adjustment of the first correction signal and the original signal is less than a certain threshold. Based on the above, the problem that the output signal of the Hall sensor generates a phase lag due to noise, thereby causing the Hall sensor to have a low measurement accuracy is improved, and the measurement accuracy of the Hall sensor is improved.
[0092] It is understood that the signal processing method in the embodiments of the present application can be applied to electronic devices that use Hall sensors for measurement, such as mobile phones (including camera modules in mobile phones, etc.), computers, tablets and other electronic devices, without limitation. In some embodiments of the present application, the electronic device can be a filter.
[0093] An embodiment of the present application provides an electronic device, including: an acquisition module, used to acquire an original signal output by a Hall sensor; a noise processing module, used to perform noise reduction processing on the original signal to acquire a noise-reduced signal; a phase debugging module, used to acquire a first phase debugging parameter, the first phase debugging parameter being used to adjust the phase of the noise-reduced signal; the phase debugging module, used to adjust the noise-reduced signal based on the first phase debugging parameter to acquire a first correction signal, wherein a phase difference between the first correction signal and the original signal is less than a first threshold; and a gain debugging module, used to perform gain adjustment on the first correction signal to acquire a target signal.
[0094] The present application also provides an electronic device, comprising: a memory for storing instructions; and a processor for executing instructions to implement the above-mentioned signal processing method.
[0095] The present application also provides a chip, which is used to execute the signal processing method provided in the embodiments of the present application.
[0096] The various embodiments of the mechanism disclosed in the present application can be implemented in hardware, software, firmware or a combination of these implementation methods. The embodiments of the present application can be implemented as a computer program or program code executed on a programmable system, which includes at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device and at least one output device.
[0097] Program code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.
[0098] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.
[0099] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, instructions may be distributed over a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, including, but not limited to, floppy disks, optical disks, optical disks, read-only memories (CD-ROMs), magneto-optical disks, read-only memories (ROMs), random access memories (RAMs), erasable programmable read-only memories (EPROMs), electrically erasable programmable read-only memories (EEPROMs), magnetic or optical cards, flash memory, or a tangible machine-readable memory for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in electrical, optical, acoustic, or other forms of propagation signals. Therefore, machine-readable media include any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a machine (e.g., computer) readable form.
[0100] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments of the present application, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a specific figure does not mean that such features are required in all embodiments, and in some embodiments of the present application, these features may not be included or may be combined with other features.
[0101] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation method of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units / modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units / modules in the above-mentioned device embodiments.
[0102] It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "includes" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "includes one" do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0103] Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be apparent to those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present application.
Claims
1. A signal processing method, characterized in that: Applied to electronic equipment, the method comprises: Get the original signal output by the Hall sensor; Performing noise reduction processing on the original signal to obtain a noise-reduced signal; Acquire a first phase adjustment parameter, where the first phase adjustment parameter is used to adjust the phase of the noise-reduced signal; Adjusting the noise-reduced signal based on a first phase adjustment parameter to obtain a first correction signal, wherein a phase difference between the first correction signal and the original signal is less than a first threshold; Perform gain adjustment on the first correction signal to obtain a target signal.
2. The method according to claim 1, characterized in that The method for determining the first phase debugging parameter includes: Determining a phase debugging parameter set, wherein the phase debugging parameter set includes multiple groups of phase debugging parameters; adjusting the noise-reduced signal based on each phase adjustment parameter in the phase adjustment parameter set in turn, and obtaining an adjusted signal; The phase adjustment parameter that first makes the phase difference between the adjusted signal and the original signal smaller than the first threshold is used as the first phase adjustment parameter.
3. The method according to claim 1, characterized in that Performing noise reduction processing on the original signal to obtain a noise-reduced signal includes: Amplifying the original signal to obtain an amplified signal; Performing analog-to-digital conversion on the amplified signal to obtain a digital signal; Perform noise reduction processing on the digital signal to obtain the noise-reduced signal.
4. The method according to claim 3, characterized in that The performing noise reduction processing on the digital signal to obtain the noise-reduced signal includes: Acquire a first noise reduction debugging parameter, where the first noise reduction debugging parameter is used to reduce a noise signal in the digital signal; The digital signal is adjusted based on the first noise reduction debugging parameter to obtain the noise-reduced signal, and the noise signal ratio in the noise-reduced signal is less than a second threshold.
5. The method according to claim 4, characterized in that The method of determining the first noise reduction debugging parameter includes: Determine the noise reduction debugging parameter set; adjusting the digital signal based on each noise reduction tuning parameter in the noise reduction tuning parameter set in turn, and obtaining an adjusted signal; The noise reduction adjustment parameter that first makes the noise signal ratio of the adjusted signal smaller than the second threshold is used as the first noise reduction adjustment parameter.
6. The method according to claim 1, characterized in that The step of performing gain adjustment on the first correction signal to obtain a target signal includes: Acquire a first gain parameter, where the first gain parameter is used to adjust the amplitude of the first correction signal; The first correction signal is adjusted based on the first gain adjustment parameter to obtain a target signal, and the amplitude difference between the target signal and the original signal is less than a third threshold.
7. The method according to claim 6, characterized in that The method of determining the first gain adjustment parameter includes: Determining a gain debugging parameter set, wherein the gain debugging parameter set includes multiple groups of gain debugging parameters; adjusting the first correction signal based on each gain adjustment parameter in the gain adjustment parameter set in sequence, and obtaining an adjusted signal; The gain adjustment parameter that first makes the amplitude difference between the adjusted signal and the original signal smaller than the third threshold is used as the first gain adjustment parameter.
8. An electronic device, characterized in that: include: An acquisition module is used to obtain the original signal output by the Hall sensor; A noise processing module, used to perform noise reduction processing on the original signal to obtain a noise-reduced signal; A phase adjustment module, used for obtaining a first phase adjustment parameter, where the first phase adjustment parameter is used for adjusting the phase of the noise-reduced signal; The phase adjustment module is used to adjust the noise-reduced signal based on the first phase adjustment parameter to obtain a first correction signal, wherein the phase difference between the first correction signal and the original signal is less than a first threshold; The gain debugging module is used to adjust the gain of the first correction signal to obtain a target signal.
9. A chip, characterized in that: The chip is used to execute the method according to any one of claims 1 to 7.
10. An electronic device, characterized in that: include: The memory is used to store instructions; the processor is used to execute the instructions to implement the signal processing method according to any one of claims 1 to 7.