WO2024113451A1 - Rotational-speed pulse signal adjustment circuit and method - Google Patents

Rotational-speed pulse signal adjustment circuit and method Download PDF

Info

Publication number
WO2024113451A1
WO2024113451A1 PCT/CN2022/143272 CN2022143272W WO2024113451A1 WO 2024113451 A1 WO2024113451 A1 WO 2024113451A1 CN 2022143272 W CN2022143272 W CN 2022143272W WO 2024113451 A1 WO2024113451 A1 WO 2024113451A1
Authority
WO
WIPO (PCT)
Prior art keywords
value
signal
adjustment signal
capture
adjustment
Prior art date
Application number
PCT/CN2022/143272
Other languages
French (fr)
Chinese (zh)
Inventor
徐凯敏
张洪
唐冠
Original Assignee
赛卓电子科技(上海)股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 赛卓电子科技(上海)股份有限公司 filed Critical 赛卓电子科技(上海)股份有限公司
Publication of WO2024113451A1 publication Critical patent/WO2024113451A1/en

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E10/00Energy generation through renewable energy sources
    • Y02E10/70Wind energy
    • Y02E10/72Wind turbines with rotation axis in wind direction

Definitions

  • the present invention relates to the technical field of electronic circuits, and in particular to a regulating circuit and method for a rotation speed pulse signal.
  • the common Hall speed sensor switches between high and low levels by sensing the changes in the magnetic field caused by the magnetic flux lines of the back magnet when the metal object moves. It is mainly used to measure the rotation of gears or the movement of metal objects made of ferromagnetic materials.
  • gear sensors used to detect gear speed need to add a magnet on the back of the chip, called a back magnet.
  • the magnetic field of the back magnet is very strong, so the signal generated by the back magnet needs to be subtracted from the signal detected by the gear sensor to get the correct value.
  • the speed pulse signal adjustment circuit and method provided by the present invention are used to solve the problem in the prior art that there is a certain deviation between the actual measured value of the back magnetic field and the rated value, and the back magnetic field is not a uniform magnetic field, which leads to the defect that the gear speed detected by the gear sensor is inaccurate.
  • the purpose of reducing the influence of factors such as inaccurate and uneven back magnetic field on the gear pulse signal is achieved, so that the adjusted gear pulse signal is more accurate.
  • the present invention provides a speed pulse signal regulating circuit, which is applied to a gear sensor and includes:
  • the operational amplifier module 110 is used to amplify the received magnetic field signals of multiple channels between the back magnet of the gear sensor and the gear to generate an amplified signal;
  • the processing module 120 is connected to the operational amplifier module 110.
  • the processing module 120 determines the capture value and the gain value of each channel according to the amplified signal, and generates a first adjustment signal and a second adjustment signal, and generates a speed pulse signal of the gear according to the first adjustment signal and the amplified signals of the multiple channels;
  • the adjustment module 130 is connected to the processing module 120 and the operational amplifier module 110, and is used to adjust the gain value, the magnetic field signal and the offset value of any channel in the operational amplifier module 110 according to the second adjustment signal.
  • the regulating circuit further includes:
  • a magnetic induction component 140 wherein the magnetic induction component 140 comprises at least three magnetic induction elements arranged in sequence and spaced apart from each other, each of the magnetic induction elements being used to collect an initial magnetic field signal between the back magnet of the gear sensor and the gear;
  • the subtraction module 150 is connected between the magnetic induction component 140 and the operational amplifier module 110 , and is used to subtract the initial magnetic field signals collected by two adjacent magnetic induction elements, generate a magnetic field signal of any channel, and transmit it to the operational amplifier module 110 .
  • the operational amplifier module 110 includes at least two operational amplifiers;
  • the processing module 120 includes at least two analog-to-digital converters and a digital processor;
  • each operational amplifier is connected to the input end of each analog-to-digital converter respectively, the output end of each analog-to-digital converter is connected to the input end of the digital processor respectively, and the output end of the digital processor is connected to the input end of the adjustment module 130;
  • the analog-to-digital converter is used to digitally convert the amplified signal of any of the channels, generate a digital signal of any of the channels, and transmit the digital signal to the digital processor;
  • the digital processor is used to determine the capture value and the gain value of each channel according to the digital signal of each channel, and generate the first adjustment signal and the second adjustment signal, and then adjust the offset value of the digital signal of each channel through the first adjustment signal to generate the speed pulse signal of the gear.
  • the present invention also provides a method for adjusting a rotation speed pulse signal, which is applied to any of the above-mentioned rotation speed pulse signal adjustment circuits, comprising:
  • the gain value, the magnetic field signal and the offset value of any channel are adjusted according to the second adjustment signal.
  • the first adjustment signal when the gear is in the startup stage, the first adjustment signal includes a first startup adjustment signal, the second adjustment signal includes a second startup adjustment signal, and the capture threshold is a first capture threshold;
  • analyzing the capture value and gain value of each channel to generate a first adjustment signal and a second adjustment signal including:
  • the capture value of any of the channels is not less than the first capture threshold of any of the channels, and the gain value of any of the channels is not a minimum value, generating the first power-on adjustment signal and the second power-on adjustment signal;
  • the second power-on adjustment signal is used to instruct the adjustment module 130 to adjust the gain value of any of the channels and the offset value of the magnetic field signal.
  • the method further includes:
  • a first target capture value of any of the channels is determined according to the offset value.
  • the first adjustment signal when the gear is in a calibration stage, the first adjustment signal includes a first calibration adjustment signal, the second adjustment signal includes a second calibration adjustment signal and a third calibration adjustment signal, the capture threshold is a second capture threshold, the channel includes a first channel and a second channel, the capture value includes: a first capture value of the first channel, and a second capture value of the second channel; the gain value includes: a first gain value of the first channel, and a second gain value of the second channel;
  • analyzing the capture value and gain value of each channel to generate a first adjustment signal and a second adjustment signal including:
  • the flag bit of the operational amplifier module 110 is adjusted, and the first calibration adjustment signal and the second calibration adjustment signal are generated; the second calibration adjustment signal is used to instruct the adjustment module 130 to adjust the gain value of the target operational amplifier, and the target operational amplifier is determined based on the first gain value and the second gain value;
  • the third calibration adjustment signal is generated; the third calibration adjustment signal is used to instruct the adjustment module 130 to adjust the gain value of the operational amplifier corresponding to any one of the values.
  • the first adjustment signal when it is determined that any one of the first captured value and the second captured value has not reached a peak value, the first adjustment signal includes a fourth calibration adjustment signal;
  • the method of setting a capture threshold and analyzing the capture value and gain value of each channel to generate a first adjustment signal further includes:
  • a fourth calibration adjustment signal is generated according to the extreme value of any of the values, and the fourth calibration adjustment signal is used to adjust the offset value of the digital signal of the channel corresponding to any of the values.
  • the first adjustment signal when the gear is in the running stage, the first adjustment signal includes a first running adjustment signal, the second adjustment signal includes a second running adjustment signal, and the capture threshold is a third capture threshold;
  • analyzing the capture value and gain value of each channel to generate a first adjustment signal and a second adjustment signal including:
  • the second operation adjustment signal is used to instruct the adjustment module 130 to adjust the gain value of any one of the channels.
  • the method further includes:
  • a second target capture value of any one of the channels is determined according to the offset value.
  • the present invention also provides a gear sensor, which is used to be arranged between a back magnet and a gear, and includes a regulating circuit for a rotation speed pulse signal as described in any one of the above.
  • the present invention also provides a digital processor, comprising:
  • a determination module used to determine the capture values of the at least two channels according to the digital signals of the gear speeds sent by the analog-to-digital converters of the at least two channels, and determine the gain values of the operational amplifiers of the at least two channels in the operational amplifier module 110;
  • a first generating module configured to analyze the capture values and the gain values of the at least two channels based on a capture threshold value to generate a first adjustment signal and a second adjustment signal; the second adjustment signal is configured to instruct the adjustment module 130 to adjust the gain value, the magnetic field signal and the offset value of the operational amplifier of the at least two channels;
  • the second generating module is used to adjust the offset value of the digital signal using the first adjusting signal to generate a speed pulse signal of the gear.
  • the present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements a method for adjusting a speed pulse signal as described above.
  • the present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored.
  • the computer program is executed by a processor, the method for adjusting the speed pulse signal as described in any one of the above is implemented.
  • the present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for adjusting the speed pulse signal as described above is implemented.
  • the speed pulse signal adjustment circuit and method provided by the present invention can effectively reduce the influence of factors such as inaccurate and uneven back magnetic field on the gear pulse signal by processing the obtained signal and then adjusting and feeding back the signal according to the processing result, so as to make the adjusted gear pulse signal more accurate.
  • FIG1 is a circuit block diagram of a speed pulse signal regulating circuit provided by the present invention.
  • FIG2 is a schematic diagram of the installation position of the gear sensor provided by the present invention.
  • FIG3 is another circuit block diagram of the speed pulse signal regulating circuit provided by the present invention.
  • FIG4 is a circuit diagram of an embodiment of a speed pulse signal regulating circuit provided by the present invention shown in FIG3 ;
  • FIG5 is a schematic diagram of a flow chart of a method for adjusting a speed pulse signal provided by the present invention
  • FIG. 6 is a second flow chart of the method for adjusting the speed pulse signal provided by the present invention.
  • FIG8 is a fourth flow chart of the method for adjusting the speed pulse signal provided by the present invention.
  • FIG9 is a schematic diagram of the structure of a digital processor provided by the present invention.
  • FIG. 10 is a schematic diagram of the structure of an electronic device provided by the present invention.
  • 100 regulating circuit of speed pulse signal; 110: operational amplifier module; 120: processing module; 130: regulating module; 140: magnetic induction component; 150: subtraction module; 200: gear; 210: tooth peak; 220: tooth valley; 300: back magnetism.
  • Hall sensors can sense magnetic fields, positions or currents without contact, which makes them widely used in consumer electronics and automotive fields such as electric vehicles, autonomous driving, smart meters and power inverters as magnetometers, position sensors and current sensors. They are also components of safety systems, Electric Power Steering (EPS) systems and body electronic systems. In this context, it is extremely important to improve the performance of Hall sensors and design Hall sensors with high precision, high stability and high reliability.
  • EPS Electric Power Steering
  • FIG1 is a circuit block diagram of a speed pulse signal regulating circuit provided by the present invention, which is applied to a gear sensor, as shown in FIG1 , and includes:
  • the operational amplifier module 110 is used to amplify the received magnetic field signals of multiple channels between the back magnet of the gear sensor and the gear to generate an amplified signal;
  • the processing module 120 is connected to the operational amplifier module 110.
  • the processing module 120 determines the capture value and the gain value of each channel according to the amplified signal, and generates a first adjustment signal and a second adjustment signal, and generates a speed pulse signal of the gear according to the first adjustment signal and the amplified signals of the multiple channels;
  • the operational amplifier module 110 may be provided with at least two operational amplifiers, each operational amplifier is used to perform operations such as signal amplification and bias adjustment on the magnetic field signal of a channel, obtain an amplified signal corresponding to the magnetic field signal, and output the amplified signal to the processing module 120.
  • the operational amplifier module 110 receives magnetic field signals of two channels, a first channel and a second channel.
  • the operational amplifier module 110 includes at least an operational amplifier AMP1 of the first channel and an operational amplifier AMP2 of the second channel; AMP1 amplifies and adjusts the magnetic field signal of the first channel, and AMP2 amplifies and adjusts the magnetic field signal of the second channel.
  • the processing module 120 After receiving an amplified signal of a channel, the processing module 120 obtains a gain value of the operational amplifier in the channel and a capture value of the amplified signal according to the amplified signal, and generates a first adjustment signal and a second adjustment signal of the amplified signal.
  • the first adjustment signal is a general term for the signal that the processing module 120 finely adjusts the amplified signal
  • the second adjustment signal is a general term for the signal that the processing module 120 adjusts the operational amplifier module 110 through the adjustment module 130 .
  • the first adjustment signal is used to instruct to finely adjust the amplified signal, thereby generating a more accurate pulse adjustment signal.
  • the second adjustment signal is used to instruct the adjustment module 130 to roughly adjust the gain value of the operational amplifier in the operational amplifier module 110 so that the amplified signal can be captured by the processing module 120 .
  • the operational amplifier module 110 includes at least two operational amplifiers;
  • the processing module 120 includes at least two analog-to-digital converters and a digital processor;
  • each operational amplifier is connected to the input end of each analog-to-digital converter respectively, the output end of each analog-to-digital converter is connected to the input end of the digital processor respectively, and the output end of the digital processor is connected to the input end of the adjustment module 130;
  • the analog-to-digital converter is used to digitally convert the amplified signal of any of the channels, generate a digital signal of any of the channels, and transmit the digital signal to the digital processor;
  • the digital processor is used to determine the capture value and the gain value of each channel according to the digital signal of each channel, and generate the first adjustment signal and the second adjustment signal, and then adjust the offset value of the digital signal of each channel through the first adjustment signal to generate the speed pulse signal of the gear.
  • the amplified signal is an analog signal
  • an analog-to-digital converter ADC is used to digitally convert the amplified signal of a single channel, generate a digital signal of a single channel, and send the digital signal of the single channel to the digital processor (DP);
  • the digital processor DP After receiving the digital signals of each channel, the digital processor DP analyzes the digital signals of each channel to generate a first adjustment signal and a second adjustment signal, and adjusts the digital signal using the first adjustment signal to obtain a speed pulse signal of the gear.
  • DP's signal conditioning is divided into three stages: power-on stage, calibration stage, and operation stage.
  • DP sets the capture threshold K2 of the analog-to-digital converter ADC, and adjusts the offset value of the digital signal and the final gain value of the power-on phase by comparing the capture value U of the analog-to-digital converter ADC with the capture threshold K2, and then adjusts the offset value according to the extreme difference value, thereby achieving the purpose of calibration;
  • DP adjusts the gain value based on the final gain value of the calibration phase, and adjusts the offset value of the digital signal to adjust the offset that may occur when the gear works normally.
  • FIG. 2 is a schematic diagram of the installation position of the gear sensor provided by the present invention.
  • the gear sensor 100 is an IC, which is a Hall effect rotational speed sensor (Hall effect rotational speed sensor), which is arranged between the gear 200 and the back magnet 300.
  • the gear sensor 100 is provided with magnetic sensing elements H1, H2 and H3 parallel to the back magnet 300, and the gear 200 on the upper side of the gear sensor 100 is provided with tooth peaks 210 and tooth valleys 220.
  • the back magnet 300 may be a permanent magnet.
  • the speed pulse signal adjustment circuit and method provided by the present invention can effectively reduce the influence of factors such as inaccurate and uneven back magnetic field on the gear pulse signal by processing the obtained signal and then adjusting and feeding back the signal according to the processing result, so as to make the adjusted gear pulse signal more accurate.
  • the regulating circuit further includes:
  • a magnetic induction component 140 wherein the magnetic induction component 140 comprises at least three magnetic induction elements arranged in sequence and spaced apart from each other, each of the magnetic induction elements being used to collect an initial magnetic field signal between the back magnet of the gear sensor and the gear;
  • the subtraction module 150 is connected between the magnetic induction component 140 and the operational amplifier module 110 , and is used to subtract the initial magnetic field signals collected by two adjacent magnetic induction elements, generate a magnetic field signal of any channel, and transmit it to the operational amplifier module 110 .
  • the subtraction module 150 includes at least two subtractors, each of which is used to perform difference calculation on the initial magnetic field signals collected by two adjacent magnetic sensing elements in a single channel, generate a magnetic field signal of the channel, and transmit the magnetic field signal to the operational amplifier of the channel in the operational amplifier module 110.
  • FIG3 is another circuit block diagram of the speed pulse signal regulating circuit provided by the present invention. As shown in FIG3 , the regulating circuit includes the following structures:
  • the magnetic induction component 140 , the subtraction module 150 , the operational amplifier module 110 and the processing module 120 are connected in sequence, and the adjustment module 130 is connected to the operational amplifier module 110 and the processing module 120 respectively.
  • FIG. 4 is a circuit diagram of an embodiment of a speed pulse signal regulating circuit provided by the present invention shown in FIG. 3 .
  • the regulating circuit includes the following structure:
  • the magnetic induction component 140 includes three magnetic induction elements H1, H2 and H3, which are used to collect initial magnetic field signals;
  • the subtraction module 150 includes two subtractors MINUS1 and MINUS2, which are used to eliminate the common-mode interference of the back magnetic field in the initial magnetic field signal to obtain a magnetic field signal; ideally, the magnetic field strength of the back magnetic field of each magnetic sensing element is the same, that is, the magnetic field of the back magnetic field is uniform, and the subtractor will completely eliminate the influence of the magnetic field of the back magnetic field. However, in fact, since the magnetic field strength of the back magnetic field is uneven, its influence cannot be completely eliminated;
  • the operational amplifier module 110 includes two operational amplifiers AMP1 and AMP2. Since the induction value collected by the magnetic induction element is very small, the magnetic field signal needs to be amplified by the operational amplifier to obtain an amplified signal, which is convenient for collection and subsequent data processing;
  • the processing module 120 includes two analog-to-digital converters ADC1 and ADC2, and a digital processor DP. Since the algorithm of analog signals is complex and difficult to implement, the analog signal such as the amplified signal is converted into a digital signal by the analog-to-digital converter ADC, so as to facilitate rapid operation of the digital signal in the DP, generate a first adjustment signal and a second adjustment signal, and can quickly eliminate the bias voltage caused by the uneven back magnetism in the initialization stage;
  • the adjustment module 130 includes two offset/gain adjusters ADJ1 and ADJ2. Failure to eliminate back magnetism will cause signal offset, and the offset/gain adjuster is used to adjust the offset value Y of the magnetic field signal of the amplifier in the operational amplifier AMP1 and AMP2 and the gain value G of the operational amplifier according to the second adjustment signal, so as to move the offset signal back to the correct position.
  • connection relationship of the above structure is as follows:
  • the magnetic induction element H1 and the magnetic induction element H2 are respectively connected to the two input ends of the subtractor MINUS1, and the initial magnetic field signals collected by H1 and H2 are subjected to difference calculation in MINUS1 to obtain the magnetic field signal of the first channel;
  • the magnetic induction element H2 and the magnetic induction element H3 are respectively connected to the two input ends of the subtractor MINUS2, and the initial magnetic field signals collected by H2 and H3 are subjected to difference calculation in MINUS2 to obtain the magnetic field signal of the second channel;
  • the output end of the subtractor MINUS1 is connected to the input end of the operational amplifier AMP1, and AMP1 amplifies and adjusts the magnetic field signal of the first channel to obtain the amplified signal of the first channel;
  • the output end of the subtractor MINUS2 is connected to the input end of the operational amplifier AMP2, and AMP2 amplifies and adjusts the magnetic field signal of the second channel to obtain the amplified signal of the second channel;
  • the adjustment terminal of the operational amplifier AMP1 is connected to the output terminal of the offset/gain adjuster ADJ1, and the output terminal thereof is connected to the input terminal of the analog-to-digital converter ADC1.
  • ADC1 performs analog-to-digital conversion on the amplified signal of the first channel to obtain the digital signal of the first channel.
  • the adjustment terminal of the operational amplifier AMP2 is connected to the output terminal of the offset/gain adjuster ADJ2, and the output terminal thereof is connected to the input terminal of the analog-to-digital converter ADC2.
  • ADC2 performs analog-to-digital conversion on the amplified signal of the second channel to obtain the digital signal of the second channel.
  • the output end of the analog-to-digital converter ADC1 is connected to an input end of the digital processor DP; the output end of the analog-to-digital converter ADC2 is connected to the other input end of the digital processor DP.
  • DP analyzes and processes the digital signals of the first channel and the second channel respectively to generate the first adjustment signal and the second adjustment signal of the first channel, and the first adjustment signal and the second adjustment signal of the second channel.
  • DP adjusts the digital signal of the first channel according to the first adjustment signal of the first channel to obtain the speed pulse signal of the gear of the first channel; DP also adjusts the digital signal of the second channel according to the first adjustment signal of the second channel to obtain the speed pulse signal of the gear of the second channel; generally, the speed pulse signal of the first channel is the same as the speed pulse signal of the second channel.
  • the input end of the offset/gain regulator ADJ1 is connected to an output end of the digital processor DP, and ADJ1 adjusts the gain value, magnetic field signal and offset value in AMP1 according to the second adjustment signal of the first channel;
  • the input end of the offset/gain regulator ADJ2 is connected to the other output end of the digital processor DP, and ADJ2 adjusts the gain value, magnetic field signal and offset value in AMP2 according to the second adjustment signal of the second channel.
  • the magnetic induction elements H1 and H2 send the collected initial magnetic field signals to the subtractor MINUS1.
  • the subtractor MINUS1 performs difference calculation on the initial magnetic field signals collected by H1 and H2 to obtain the magnetic field signal of the first channel, and sends the magnetic field signal to the operational amplifier AMP1 of the first channel in the operational amplifier module 110.
  • the collected original signal is subtracted by a subtractor, so that the common mode interference caused by the back magnetic field in the magnetic field signal can be effectively removed.
  • the following is a description of the method for adjusting the rotation speed pulse signal provided by the present invention.
  • the method for adjusting the rotation speed pulse signal described below and the adjustment circuit for the rotation speed pulse signal described above can refer to each other.
  • FIG5 is one of the flow charts of the method for adjusting the speed pulse signal provided by the present invention.
  • the adjustment circuit of the speed pulse signal applied in the above embodiment includes but is not limited to the following steps:
  • step S1 the received magnetic field signals of multiple channels between the back magnet of the gear sensor and the gear are amplified to generate amplified signals.
  • the operational amplifier module 110 may be provided with at least two operational amplifiers, each operational amplifier is used to perform operations such as signal amplification and bias adjustment on the magnetic field signal of a channel, obtain an amplified signal corresponding to the magnetic field signal, and output the amplified signal to the processing module 120.
  • step S2 the capture value and gain value of each channel are determined according to the amplified signal.
  • the capture values of the at least two channels are determined, and the gain values of the operational amplifiers of the at least two channels in the operational amplifier module are determined.
  • DP when DP receives the digital signal of gear speed sent by the analog-to-digital converter ADC1 of the first channel, it can determine the capture value U of the first channel at any time based on the digital signal, and determine the gain value G1 of the operational amplifier AMP1.
  • the adjustment method of the speed pulse signal is applied to the startup stage, calibration stage and operation stage respectively.
  • the gain adjustment of the operational amplifier in the calibration phase is performed on the basis of the gain adjusted in the startup phase, and the gain adjustment of the operational amplifier in the operation phase is performed on the basis of the gain adjusted in the calibration phase.
  • step S3 by setting a capture threshold, the capture value and gain value of each channel are analyzed to generate a first adjustment signal and a second adjustment signal.
  • the first capture threshold K1 in the startup phase, the second capture threshold K2 in the calibration phase, and the third capture threshold K3 in the operation phase satisfy K1 ⁇ K2 ⁇ K3.
  • the first adjustment signal includes a first startup adjustment signal
  • the second adjustment signal includes a second startup adjustment signal
  • the capture threshold is a first capture threshold
  • analyzing the capture value and gain value of each channel to generate a first adjustment signal and a second adjustment signal including:
  • the capture value of any of the channels is not less than the first capture threshold of any of the channels, and the gain value of any of the channels is not a minimum value, generating the first power-on adjustment signal and the second power-on adjustment signal;
  • the second power-on adjustment signal is used to instruct the adjustment module 130 to adjust the gain value of any of the channels and the offset value of the magnetic field signal.
  • FIG. 6 is a second flow chart of the method for adjusting the speed pulse signal provided by the present invention, as shown in FIG. 6 , comprising:
  • DP When the capture value U of the analog-to-digital converter of any channel is not less than the first capture threshold K1, and the gain value G of the channel is not the minimum gain value Gmin, DP generates a first power-on adjustment signal and a second power-on adjustment signal, and sends the second power-on adjustment signal to the adjustment module 130 to instruct the adjustment module 130 to adjust the gain value G of the operational amplifier in the channel and the offset value of the magnetic field signal.
  • the method further includes:
  • a first target capture value of any of the channels is determined according to the offset value.
  • the circuit is reset first, and after the reset, the gain value of the operational amplifier AMP1 of the first channel is set to G1, the gain value of the operational amplifier AMP2 is set to G2, and the first capture threshold value K1 of the analog-to-digital converters ACD1 and ADC2 is set;
  • analog-to-digital converters ADC1 and ADC2 are turned on to collect data respectively, and the captured values U1 and U2 of the current channel are obtained, and the captured values U1 and U2 are sent to the digital processor DP for digital processing;
  • the captured values U1 and U2 are first compared with the set first capture threshold K1. If U1 ⁇ K1 and the gain value G1 of AMP1 is not the minimum gain value Gmin, the offset/gain adjuster ADJ1 adjusts the gain value of AMP1 according to the second power-on adjustment signal until U1 ⁇ K1;
  • the offset/gain adjuster ADJ2 adjusts the gain value of AMP2 according to the second power-on adjustment signal until U2 ⁇ K2.
  • the offset values Y1 and Y2 of the offset/gain adjusters ADJ1 and ADJ2 are set as the capture values of ADC1 and ADC2 respectively, and the power-on stage ends.
  • the operational amplifier module is set and adjusted to correct the magnetic field signal, eliminate the offset of the magnetic field signal, and thus obtain the correct gear rotation speed.
  • the first adjustment signal includes a first calibration adjustment signal
  • the second adjustment signal includes a second calibration adjustment signal and a third calibration adjustment signal
  • the capture threshold is a second capture threshold
  • the channel includes a first channel and a second channel
  • the capture value includes: a first capture value of the first channel, and a second capture value of the second channel
  • the gain value includes: a first gain value of the first channel, and a second gain value of the second channel
  • analyzing the capture value and gain value of each channel to generate a first adjustment signal and a second adjustment signal including:
  • the flag bit of the operational amplifier module 110 is adjusted, and the first calibration adjustment signal and the second calibration adjustment signal are generated; the second calibration adjustment signal is used to instruct the adjustment module 130 to adjust the gain value of the target operational amplifier, and the target operational amplifier is determined based on the first gain value and the second gain value;
  • the third calibration adjustment signal is generated; the third calibration adjustment signal is used to instruct the adjustment module 130 to adjust the gain value of the operational amplifier corresponding to any one of the values.
  • the target operational amplifier is an operational amplifier with a higher gain value. For example, if G1>G2, AMP1 is the target operational amplifier.
  • FIG. 7 is a third flow chart of the method for adjusting the speed pulse signal provided by the present invention, as shown in FIG. 7 , comprising:
  • the first gain value G1 of AMP1 and the second gain value G2 of AMP2 are determined at this time;
  • the flag bit AMP_DIFF_FLAG of the operational amplifier module 110 is adjusted to 1, and a second calibration adjustment signal is generated to instruct the adjustment module 130 to adjust the gain value of the target operational amplifier with a higher gain value.
  • a third calibration adjustment signal is generated to instruct the adjustment module 130 to adjust the gain value of the operational amplifier corresponding to the capture value.
  • the first adjustment signal includes a fourth calibration adjustment signal
  • the method of setting a capture threshold and analyzing the capture value and gain value of each channel to generate a first adjustment signal further includes:
  • a fourth calibration adjustment signal is generated according to the extreme value of any of the values, and the fourth calibration adjustment signal is used to adjust the offset value of the digital signal of the channel corresponding to any of the values.
  • the range value is the difference between the maximum and minimum values in the captured values.
  • a fourth calibration adjustment signal is generated according to the extreme difference ⁇ U of any value, so that the adjustment module 130 can adjust the offset value Y of the operational amplifier in the channel corresponding to any value.
  • the gears start to rotate, and the debugging phase begins.
  • the second capture threshold K2 of ADC1 and ADC2 is set.
  • ADC1 and ADC2 collect the first capture value U1 and the second capture value U2 of the current channel, and send the capture values U1 and U2 to the digital processor DP for digital processing.
  • the digital processor DP it is first determined whether the first captured value U1 of ADC1 and the second captured value U2 of ADC2 have reached a peak value;
  • the captured values U1 and U2 do not reach the peak value, further determine whether the current captured values of ADC1 and ADC2 are greater than or equal to the second capture threshold K2. If any captured value U ⁇ K2, reduce any captured value U.
  • the influence of the uneliminated back magnetism can be calculated, and the signal can be moved to the correct position through the offset value.
  • the first adjustment signal includes a first running adjustment signal
  • the second adjustment signal includes a second running adjustment signal
  • the capture threshold is a third capture threshold
  • analyzing the capture value and gain value of each channel to generate a first adjustment signal and a second adjustment signal including:
  • the second operation adjustment signal is used to instruct the adjustment module 130 to adjust the gain value of any one of the channels.
  • the target number is the number of times the capture value U of the channel is greater than the third capture threshold K3.
  • the capture value U of any channel is compared with the third capture threshold K3 to determine the number of times the capture value U of the channel is greater than the third capture threshold K3; the waveform change includes: the capture value of the digital signal changes from a monotonically rising value to a monotonically falling value, or from a monotonically falling value to a monotonically rising value.
  • a first operation adjustment signal and a second operation adjustment signal are generated.
  • DP generates a speed pulse signal of the channel by adjusting the offset value of the digital signal according to the first operation adjustment signal.
  • the second operation adjustment signal is used to instruct the adjustment module 130 to adjust the gain value G of the operational amplifier of the channel.
  • FIG8 is a fourth flow chart of the method for adjusting the speed pulse signal provided by the present invention, as shown in FIG8 , comprising:
  • the DP adjusts the possible offsets that may occur when the gears work normally during the operation phase.
  • the third capture threshold K3 of ADC1 and ADC2 is set, and the counter that counts the ADC peak value exceeding the third capture threshold K3 is reset;
  • the digital processor DP collects the capture values U1 and U2 of the current channel according to ADC1 and ADC2 to determine whether the waveform edge has changed.
  • the captured values U1 and U2 of ADC1 and ADC2 exceed the third capture threshold K3 after the last edge change is detected when the gain values G1 and G2 of AMP1 and AMP2 remain unchanged. If any captured value of ADC1 and ADC2 exceeds the third capture threshold K3, the number of times the ADC peak value exceeds the third capture threshold K3 on the channel is counted by 1, and the execution process returns to the waveform edge change detection. Otherwise, the counter for the ADC peak value exceeding the third capture threshold K3 is reset.
  • the method further includes:
  • a second target capture value of any one of the channels is determined according to the offset value.
  • the captured values of the current channel collected by ADC1 and ADC2 are judged and it is found that the waveform edge has changed, it is further judged whether the captured values of ADC1 and ADC2 are less than or equal to the third capture threshold K3. If the captured values are less than or equal to the third capture threshold K3, the execution process returns to the waveform edge change detection. Otherwise, it is further judged whether the counter of the ADC peak value exceeding the third capture threshold K3 is not less than 1. If it is not less than 1 and the gains of AMP1 and AMP2 have reached the minimum value, an error is reported;
  • the method for adjusting the speed pulse signal provided by the present invention, by adjusting the gain and offset values during the operation phase, it is possible to effectively avoid the situation where the sensor value may change and cause overflow due to reasons such as vibration during the operation of the gear.
  • step S4 a speed pulse signal of the gear is generated according to the first adjustment signal and the amplified signals of the multiple channels.
  • the analog-to-digital converter converts the amplified signal into a digital signal, and the DP fine-tunes the offset value of the digital signal according to the first adjustment signal, so as to generate a more accurate gear speed pulse signal.
  • step S5 the gain value, the magnetic field signal and the offset value of any channel are adjusted according to the second adjustment signal.
  • the DP can capture the digital signal, and the speed pulse signal of the gear generated is more accurate.
  • the method for adjusting the speed pulse signal provided by the present invention processes the obtained signal and then adjusts and feeds back the signal according to the processing result, which can effectively reduce the influence of factors such as inaccurate and uneven back magnetic field on the gear pulse signal, thereby making the adjusted gear pulse signal more accurate.
  • the gear sensor provided by the present invention is described below.
  • the gear sensor described below and the regulating circuit of the rotation speed pulse signal described above can be referred to each other.
  • the present invention also provides a gear sensor, which is used to be arranged between a back magnet and a gear, and includes a regulating circuit for a rotation speed pulse signal as described in any of the above embodiments.
  • the gear sensor provided by the present invention processes the obtained signal and then adjusts and feeds back the signal according to the processing result, which can effectively reduce the influence of factors such as inaccurate and uneven back magnetic field on the gear pulse signal, making the adjusted gear pulse signal more accurate.
  • the digital processor provided by the present invention is described below.
  • the digital processor described below and the method for adjusting the speed pulse signal described above can be referred to each other.
  • FIG9 is a schematic diagram of the structure of a digital processor provided by the present invention, as shown in FIG9 , comprising:
  • the determination module 901 is used to determine the captured values of the at least two channels according to the digital signals of the gear speeds sent by the analog-to-digital converters of the at least two channels, and determine the gain values of the operational amplifiers of the at least two channels in the operational amplifier module 110;
  • a first generating module 902 is used to analyze the capture values and the gain values of the at least two channels based on a capture threshold value to generate a first adjustment signal and a second adjustment signal; the second adjustment signal is used to instruct the adjustment module 130 to adjust the gain value, magnetic field signal and offset value of the operational amplifier of the at least two channels;
  • the second generating module 903 is used to adjust the offset value of the digital signal using the first adjusting signal to generate a speed pulse signal of the gear.
  • the determination module 901 determines the capture values of the at least two channels according to the digital signals of the gear speed sent by the analog-to-digital converters of the at least two channels, and determines the gain values of the operational amplifiers of the at least two channels in the operational amplifier module 110; the first generation module 902 analyzes the capture values and the gain values of the at least two channels based on the capture threshold to generate a first adjustment signal and a second adjustment signal; the second adjustment signal is used to instruct the adjustment module 130 to adjust the gain value, magnetic field signal and offset value of the operational amplifiers of the at least two channels; the second generation module 903 is used to use the first adjustment signal to adjust the offset value of the digital signal to generate a speed pulse signal of the gear.
  • the digital processor provided in the present application processes the obtained signal and then adjusts and feeds back the signal according to the processing result, which can effectively reduce the influence of factors such as inaccurate and uneven back magnetic field on the gear pulse signal, making the adjusted gear pulse signal more accurate.
  • FIG10 is a schematic diagram of the structure of an electronic device provided by the present invention.
  • the electronic device may include: a processor 1010, a communication interface 1020, a memory 1030 and a communication bus 1040, wherein the processor 1010, the communication interface 1020 and the memory 1030 communicate with each other through the communication bus 1040.
  • the processor 1010 may call the logic instructions in the memory 1030 to execute the method for adjusting the speed pulse signal, which method includes: amplifying the magnetic field signals of multiple channels between the back magnet of the gear sensor and the gear received to generate an amplified signal; determining the capture value and gain value of each channel according to the amplified signal; analyzing the capture value and gain value of each channel by setting a capture threshold to generate a first adjustment signal and a second adjustment signal; generating a speed pulse signal of the gear according to the first adjustment signal and the amplified signals of the multiple channels; adjusting the gain value, the magnetic field signal and the offset value of any channel according to the second adjustment signal.
  • the logic instructions in the above-mentioned memory 1030 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.
  • the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
  • the present invention also provides a computer program product, which includes a computer program.
  • the computer program can be stored on a non-transitory computer-readable storage medium.
  • the computer can execute the speed pulse signal adjustment method provided by the above methods, which method includes: amplifying the magnetic field signals of multiple channels between the back magnet of the gear sensor and the gear to generate an amplified signal; determining the capture value and gain value of each channel based on the amplified signal; analyzing the capture value and gain value of each channel by setting a capture threshold to generate a first adjustment signal and a second adjustment signal; generating a speed pulse signal of the gear based on the first adjustment signal and the amplified signals of the multiple channels; and adjusting the gain value, the magnetic field signal and the offset value of any channel based on the second adjustment signal.
  • the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the speed pulse signal adjustment method provided by the above-mentioned methods, the method comprising: amplifying the magnetic field signals of multiple channels between the back magnet of the received gear sensor and the gear to generate an amplified signal; determining the capture value and gain value of each of the channels based on the amplified signal; analyzing the capture value and gain value of each of the channels by setting a capture threshold to generate a first adjustment signal and a second adjustment signal; generating a speed pulse signal of the gear based on the first adjustment signal and the amplified signals of the multiple channels; and adjusting the gain value, the magnetic field signal and the offset value of any channel based on the second adjustment signal.
  • the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.
  • each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware.
  • the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM/RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

Landscapes

  • Transmission And Conversion Of Sensor Element Output (AREA)

Abstract

The present invention belongs to the technical field of electronic circuits. Provided are a rotational-speed pulse signal adjustment circuit and method. The circuit comprises: an operational amplification module, which amplifies received magnetic field signals of a plurality of channels between a back magnet of a gear sensor and a gear, so as to generate amplified signals; a processing module, which determines a capture value and a gain value of each channel according to the amplified signals, generates a first adjustment signal and a second adjustment signal, and generates a rotational-speed pulse signal of the gear according to the first adjustment signal and the amplified signals of the plurality of channels; and an adjustment module, which is used for adjusting the gain value, a magnetic field signal and an offset value of any channel in the operational amplification module according to the second adjustment signal. By processing signals and then performing adjustment and feedback on the signals, the rotational-speed pulse signal adjustment circuit and method provided in the present invention can effectively reduce the impact of factors such as inaccuracy and non-uniformity of a magnetic field of a back magnet on a pulse signal of a gear, thus making an adjusted pulse signal of the gear more accurate.

Description

转速脉冲信号的调节电路及方法Adjustment circuit and method of speed pulse signal 技术领域Technical Field
本发明涉及电子电路技术领域,尤其涉及转速脉冲信号的调节电路及方法。The present invention relates to the technical field of electronic circuits, and in particular to a regulating circuit and method for a rotation speed pulse signal.
背景技术Background technique
常见的霍尔速度传感器,通过感应金属物体移动时带动背磁磁铁的磁感线产生的磁场变化而进行高低电平切换,主要用于测量齿轮旋转或者铁磁性材料的金属物体的运动。The common Hall speed sensor switches between high and low levels by sensing the changes in the magnetic field caused by the magnetic flux lines of the back magnet when the metal object moves. It is mainly used to measure the rotation of gears or the movement of metal objects made of ferromagnetic materials.
为了产生磁场,用于检测齿轮转速的齿轮传感器都需要在芯片背面加上一个磁铁,称为背磁。背磁的磁场很强,因此需要将齿轮传感器检测到的信号减掉背磁产生的信号,才能得到正确的值。In order to generate a magnetic field, gear sensors used to detect gear speed need to add a magnet on the back of the chip, called a back magnet. The magnetic field of the back magnet is very strong, so the signal generated by the back magnet needs to be subtracted from the signal detected by the gear sensor to get the correct value.
然而,在实际应用场景中,背磁磁场的实际测量值与额定值会存在一定偏差,且背磁磁场不是均匀磁场,进而导致得到的齿轮传感器检测的齿轮转速并不准确。However, in practical application scenarios, there will be a certain deviation between the actual measured value of the back magnetic field and the rated value, and the back magnetic field is not a uniform magnetic field, which results in the gear speed detected by the gear sensor being inaccurate.
发明内容Summary of the invention
本发明提供的转速脉冲信号的调节电路及方法,用以解决现有技术中背磁磁场的实际测量值与额定值会存在一定偏差,且背磁磁场不是均匀磁场,进而导致得到的齿轮传感器检测的齿轮转速并不准确的缺陷,实现降低背磁磁场不准确、不均匀等因素对齿轮脉冲信号影响的目的,使得调节后的齿轮脉冲信号更加准确。The speed pulse signal adjustment circuit and method provided by the present invention are used to solve the problem in the prior art that there is a certain deviation between the actual measured value of the back magnetic field and the rated value, and the back magnetic field is not a uniform magnetic field, which leads to the defect that the gear speed detected by the gear sensor is inaccurate. The purpose of reducing the influence of factors such as inaccurate and uneven back magnetic field on the gear pulse signal is achieved, so that the adjusted gear pulse signal is more accurate.
本发明提供的一种转速脉冲信号的调节电路,应用于齿轮传感器,包括:The present invention provides a speed pulse signal regulating circuit, which is applied to a gear sensor and includes:
运放模块110,用于将接收的齿轮传感器的背磁与齿轮之间的多个通道的磁场信号进行放大,以产生放大信号;The operational amplifier module 110 is used to amplify the received magnetic field signals of multiple channels between the back magnet of the gear sensor and the gear to generate an amplified signal;
处理模块120,与所述运放模块110连接,所述处理模块120根据所述放大信号,确定每个所述通道的捕获值和增益值,并生成第一调节信号和第二调节信号,且根据所述第一调节信号和所述多个通道的放大信号,生成齿轮的转速脉冲信号;The processing module 120 is connected to the operational amplifier module 110. The processing module 120 determines the capture value and the gain value of each channel according to the amplified signal, and generates a first adjustment signal and a second adjustment signal, and generates a speed pulse signal of the gear according to the first adjustment signal and the amplified signals of the multiple channels;
调节模块130,与所述处理模块120、所述运放模块110连接,用于根据所述第二调节信号,调节运放模块110中任一所述通道的所述增益值、所述磁场信号及偏移值。The adjustment module 130 is connected to the processing module 120 and the operational amplifier module 110, and is used to adjust the gain value, the magnetic field signal and the offset value of any channel in the operational amplifier module 110 according to the second adjustment signal.
根据本发明提供的一种转速脉冲信号的调节电路,所述调节电路还包括:According to a speed pulse signal regulating circuit provided by the present invention, the regulating circuit further includes:
磁感应组件140,所述磁感应组件140包括至少三个依次间隔设置的磁感应元件,每个所述磁感应元件用于采集齿轮传感器的背磁与齿轮之间的初始磁场信号;A magnetic induction component 140, wherein the magnetic induction component 140 comprises at least three magnetic induction elements arranged in sequence and spaced apart from each other, each of the magnetic induction elements being used to collect an initial magnetic field signal between the back magnet of the gear sensor and the gear;
减法模块150,连接于所述磁感应组件140和所述运放模块110之间,用于将相邻两个所述磁感应元件采集的所述初始磁场信号相减,生成任一所述通道的磁场信号,并传输至所述运放模块110。The subtraction module 150 is connected between the magnetic induction component 140 and the operational amplifier module 110 , and is used to subtract the initial magnetic field signals collected by two adjacent magnetic induction elements, generate a magnetic field signal of any channel, and transmit it to the operational amplifier module 110 .
根据本发明提供的一种转速脉冲信号的调节电路,所述运放模块110包括至少两个运算放大器;所述处理模块120包括至少两个模数转换器和数字处理器;According to a speed pulse signal regulation circuit provided by the present invention, the operational amplifier module 110 includes at least two operational amplifiers; the processing module 120 includes at least two analog-to-digital converters and a digital processor;
每个所述运算放大器的输出端分别对应与每个所述模数转换器的输入端连接,每个所述模数转换器的输出端分别与所述数字处理器的输入端连接,所述数字处理器的输出端与所述调节模块130的输入端连接;The output end of each operational amplifier is connected to the input end of each analog-to-digital converter respectively, the output end of each analog-to-digital converter is connected to the input end of the digital processor respectively, and the output end of the digital processor is connected to the input end of the adjustment module 130;
所述模数转换器,用于对任一所述通道的所述放大信号进行数字化转换,生成任一所述通道的数字信号,并传输至所述数字处理器;The analog-to-digital converter is used to digitally convert the amplified signal of any of the channels, generate a digital signal of any of the channels, and transmit the digital signal to the digital processor;
所述数字处理器,用于根据每个所述通道的所述数字信号,确定每个所述通道的所述捕获值和所述增益值,并生成所述第一调节信号和所述第二调节信号,进而通过所述第一调节信号,对每个所述通道的所述数字信号的偏移值进行调节,以生成齿轮的所述转速脉冲信号。The digital processor is used to determine the capture value and the gain value of each channel according to the digital signal of each channel, and generate the first adjustment signal and the second adjustment signal, and then adjust the offset value of the digital signal of each channel through the first adjustment signal to generate the speed pulse signal of the gear.
本发明还提供的一种转速脉冲信号的调节法,应用于如上述任一种所述转速脉冲信号的调节电路,包括:The present invention also provides a method for adjusting a rotation speed pulse signal, which is applied to any of the above-mentioned rotation speed pulse signal adjustment circuits, comprising:
将接收的齿轮传感器的背磁与齿轮之间的多个通道的磁场信号进行放大,以产生放大信号;Amplifying the received magnetic field signals of multiple channels between the back magnet of the gear sensor and the gear to generate an amplified signal;
根据所述放大信号,确定每个所述通道的捕获值和增益值;Determining a capture value and a gain value of each of the channels according to the amplified signal;
通过设置捕获阈值,对每个所述通道的捕获值和增益值进行分析,以生成第一调节信号和第二调节信号;By setting a capture threshold, analyzing the capture value and gain value of each channel to generate a first adjustment signal and a second adjustment signal;
根据所述第一调节信号和所述多个通道的放大信号,生成齿轮的转速脉冲信号;Generate a speed pulse signal of a gear according to the first adjustment signal and the amplified signals of the multiple channels;
根据所述第二调节信号调节任一通道的所述增益值、所述磁场信号和偏移值。The gain value, the magnetic field signal and the offset value of any channel are adjusted according to the second adjustment signal.
根据本发明提供的一种转速脉冲信号的调节方法,在所述齿轮处于开机阶段的情况下,所述第一调节信号包括第一开机调节信号,所述第二调节信号包括第二开机调节信号,所述捕获阈值为第一捕获阈值;According to a method for adjusting a speed pulse signal provided by the present invention, when the gear is in the startup stage, the first adjustment signal includes a first startup adjustment signal, the second adjustment signal includes a second startup adjustment signal, and the capture threshold is a first capture threshold;
通过设置捕获阈值,对每个所述通道的捕获值和增益值进行分析,以生成第一调节信号和第二调节信号,包括:By setting a capture threshold, analyzing the capture value and gain value of each channel to generate a first adjustment signal and a second adjustment signal, including:
在任一所述通道的所述捕获值不小于任一所述通道的所述第一捕获阈值,且任一所述通道的所述增益值不为最小值的情况下,生成所述第一开机调节信号和所述第二开机调节信号;When the capture value of any of the channels is not less than the first capture threshold of any of the channels, and the gain value of any of the channels is not a minimum value, generating the first power-on adjustment signal and the second power-on adjustment signal;
所述第二开机调节信号用于指示所述调节模块130调整任一所述通道的所述增益值和所述磁场信号的偏移值。The second power-on adjustment signal is used to instruct the adjustment module 130 to adjust the gain value of any of the channels and the offset value of the magnetic field signal.
根据本发明提供的一种转速脉冲信号的调节方法,在生成所述第二开机调节信号之后,还包括:According to a method for adjusting a speed pulse signal provided by the present invention, after generating the second power-on adjustment signal, the method further includes:
将所述第二开机调节信号发送至所述调节模块130;Sending the second power-on adjustment signal to the adjustment module 130;
接收任一所述通道的新的捕获值,直至所述新的捕获值小于所述第一捕获阈值,以确定所述任一通道的数字信号的偏移值;receiving a new capture value of any of the channels until the new capture value is less than the first capture threshold, so as to determine an offset value of the digital signal of any of the channels;
根据所述偏移值,确定任一所述通道的第一目标捕获值。A first target capture value of any of the channels is determined according to the offset value.
根据本发明提供的一种转速脉冲信号的调节方法,在齿轮处于校准阶段的情况下,所述第一调节信号包括第一校准调节信号,所述第二调节信号包括第二校准调节信号和第三校准调节信号,所述捕获阈值为第二捕获阈值,所述通道包括第一通道和第二通道,所述捕获值包括:第一通道的第一捕获值,以及第二通道的第二捕获值;所述增益值包括:所述第一通道的第一增益值,以及第二通道的第二增益值;According to a method for adjusting a speed pulse signal provided by the present invention, when the gear is in a calibration stage, the first adjustment signal includes a first calibration adjustment signal, the second adjustment signal includes a second calibration adjustment signal and a third calibration adjustment signal, the capture threshold is a second capture threshold, the channel includes a first channel and a second channel, the capture value includes: a first capture value of the first channel, and a second capture value of the second channel; the gain value includes: a first gain value of the first channel, and a second gain value of the second channel;
通过设置捕获阈值,对每个所述通道的捕获值和增益值进行分析,以生成第一调节信号和第二调节信号,包括:By setting a capture threshold, analyzing the capture value and gain value of each channel to generate a first adjustment signal and a second adjustment signal, including:
在确定所述第一捕获值达到峰值,且所述第二捕获值达到峰值的情况下,确定所述第一增益值,以及所述第二增益值;In the case where it is determined that the first captured value reaches a peak value and the second captured value reaches a peak value, determining the first gain value and the second gain value;
在确定所述第一增益值与所述第二增益值之差大于1的情况下,调节所述运放模块110的标志位,并生成所述第一校准调节信号和第二校准调节信号;所述第二校准调节信号,用于指示所述调节模块130调整目标运算放大器的增益值,所述目标运算放大器是基于所述第一增益值和所述第二增益值确定的;When it is determined that the difference between the first gain value and the second gain value is greater than 1, the flag bit of the operational amplifier module 110 is adjusted, and the first calibration adjustment signal and the second calibration adjustment signal are generated; the second calibration adjustment signal is used to instruct the adjustment module 130 to adjust the gain value of the target operational amplifier, and the target operational amplifier is determined based on the first gain value and the second gain value;
在确定所述第一捕获值和所述第二捕获值中任一值未达到峰值,且所述任一值不小于所述第二捕获阈值的情况下,生成所述第三校准调节信号;所述第三校准调节信号,用于指示所述调节模块130调整与所述任一值相对应的运算放大器的增益值。When it is determined that any one of the first capture value and the second capture value has not reached a peak value and any one of the values is not less than the second capture threshold, the third calibration adjustment signal is generated; the third calibration adjustment signal is used to instruct the adjustment module 130 to adjust the gain value of the operational amplifier corresponding to any one of the values.
根据本发明提供的一种转速脉冲信号的调节方法,在确定所述第一捕获值和所述第二捕获值中任一值未达到峰值的情况下,所述第一调节信号包括第四校准调节信号;According to a method for adjusting a speed pulse signal provided by the present invention, when it is determined that any one of the first captured value and the second captured value has not reached a peak value, the first adjustment signal includes a fourth calibration adjustment signal;
所述通过设置捕获阈值,对每个所述通道的捕获值和增益值进行分析,以生成第一调节信号,还包括:The method of setting a capture threshold and analyzing the capture value and gain value of each channel to generate a first adjustment signal further includes:
若所述第一捕获值和所述第二捕获值均小于所述第二捕获阈值,则根据所述任一值的极差值,生成第四校准调节信号,所述第四校准调节信号,用于调节与所述任一值对应的通道的数字信号的偏移值。If the first capture value and the second capture value are both less than the second capture threshold, a fourth calibration adjustment signal is generated according to the extreme value of any of the values, and the fourth calibration adjustment signal is used to adjust the offset value of the digital signal of the channel corresponding to any of the values.
根据本发明提供的一种转速脉冲信号的调节方法,在所述齿轮处于运行阶段的情况下,所述第一调节信号包括第一运行调节信号,所述第二调节信号包括第二运行调节信号,所述捕获阈值为第三捕获阈值;According to a method for adjusting a speed pulse signal provided by the present invention, when the gear is in the running stage, the first adjustment signal includes a first running adjustment signal, the second adjustment signal includes a second running adjustment signal, and the capture threshold is a third capture threshold;
通过设置捕获阈值,对每个所述通道的捕获值和增益值进行分析,以生成第一调节信号和第二调节信号,包括:By setting a capture threshold, analyzing the capture value and gain value of each channel to generate a first adjustment signal and a second adjustment signal, including:
将所述任一通道的捕获值与所述第三捕获阈值进行对比,确定所述任一通道的目标次数,所述目标次数用于指示所述任一通道的捕获值不小于所述第三捕获阈值的次数;Comparing the capture value of any one of the channels with the third capture threshold, determining a target number of times for any one of the channels, the target number of times being used to indicate the number of times the capture value of any one of the channels is not less than the third capture threshold;
在所述任一通道的捕获值不小于所述第三捕获阈值,且目标次数大于预设次数的情况下,生成所述第一运行调节信号和所述第二运行调节信号;generating the first operation adjustment signal and the second operation adjustment signal when the capture value of any channel is not less than the third capture threshold and the target number of times is greater than a preset number of times;
所述第二运行调节信号,用于指示所述调节模块130调整所述任一通道的所述增益值。The second operation adjustment signal is used to instruct the adjustment module 130 to adjust the gain value of any one of the channels.
根据本发明提供的一种转速脉冲信号的调节方法,在所述生成所述第一运行调节信号和第二运行调节信号之后,还包括:According to a method for adjusting a speed pulse signal provided by the present invention, after generating the first operation adjustment signal and the second operation adjustment signal, the method further includes:
将所述第二运行调节信号发送至所述调节模块130;Sending the second operation adjustment signal to the adjustment module 130;
接收所述任一通道的新的捕获值,直至所述新的捕获值小于所述第三捕获阈值,确定所述任一通道的偏移值;receiving a new capture value of any one of the channels until the new capture value is less than the third capture threshold, and determining an offset value of any one of the channels;
根据所述偏移值,确定所述任一通道的第二目标捕获值。A second target capture value of any one of the channels is determined according to the offset value.
本发明还提供一种齿轮传感器,用于设置于背磁和齿轮之间,包括如上任一种所述的转速脉冲信号的调节电路。The present invention also provides a gear sensor, which is used to be arranged between a back magnet and a gear, and includes a regulating circuit for a rotation speed pulse signal as described in any one of the above.
本发明还提供一种数字处理器,包括:The present invention also provides a digital processor, comprising:
确定模块,用于根据至少两个通道的模数转换器发送的齿轮转速的数字信号,确定所述至少两个通道的捕获值,并确定运放模块110中所述至少两个通道的运算放大器的增益值;A determination module, used to determine the capture values of the at least two channels according to the digital signals of the gear speeds sent by the analog-to-digital converters of the at least two channels, and determine the gain values of the operational amplifiers of the at least two channels in the operational amplifier module 110;
第一生成模块,用于基于捕获阈值,对所述至少两个通道的捕获值和所述增益值进行分析,以生成第一调节信号第二调节信号;所述第二调节信号用于指示调节模块130调整所述至少两个通道的运算放大器的增益值、磁场信号及偏移值;A first generating module, configured to analyze the capture values and the gain values of the at least two channels based on a capture threshold value to generate a first adjustment signal and a second adjustment signal; the second adjustment signal is configured to instruct the adjustment module 130 to adjust the gain value, the magnetic field signal and the offset value of the operational amplifier of the at least two channels;
第二生成模块,用于利用第一调节信号调节数字信号的偏移值,生成所述齿轮的转速脉冲信号。The second generating module is used to adjust the offset value of the digital signal using the first adjusting signal to generate a speed pulse signal of the gear.
本发明还提供一种电子设备,包括存储器、处理器及存储在存储器上并可 在处理器上运行的计算机程序,所述处理器执行所述程序时实现如上述任一种所述转速脉冲信号的调节方法。The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements a method for adjusting a speed pulse signal as described above.
本发明还提供一种非暂态计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如上述任一种所述转速脉冲信号的调节方法。The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method for adjusting the speed pulse signal as described in any one of the above is implemented.
本发明还提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现如上述任一种所述转速脉冲信号的调节方法。The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for adjusting the speed pulse signal as described above is implemented.
本发明提供的转速脉冲信号的调节电路及方法,通过对得到的信号进行处理,进而根据处理结果对信号进行调节和反馈,能够有效降低背磁磁场不准确、不均匀等因素对齿轮脉冲信号的影响,使得调节后的齿轮脉冲信号更加准确。The speed pulse signal adjustment circuit and method provided by the present invention can effectively reduce the influence of factors such as inaccurate and uneven back magnetic field on the gear pulse signal by processing the obtained signal and then adjusting and feeding back the signal according to the processing result, so as to make the adjusted gear pulse signal more accurate.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本发明或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
图1是本发明提供的转速脉冲信号的调节电路的一种电路框图;FIG1 is a circuit block diagram of a speed pulse signal regulating circuit provided by the present invention;
图2是本发明提供的齿轮传感器的安装位置示意图;FIG2 is a schematic diagram of the installation position of the gear sensor provided by the present invention;
图3是本发明提供的转速脉冲信号的调节电路的另一种电路框图;FIG3 is another circuit block diagram of the speed pulse signal regulating circuit provided by the present invention;
图4是图3所示的本发明提供的转速脉冲信号的调节电路的一种实施例的电路图;FIG4 is a circuit diagram of an embodiment of a speed pulse signal regulating circuit provided by the present invention shown in FIG3 ;
图5是本发明提供的转速脉冲信号的调节方法的流程示意图之一;FIG5 is a schematic diagram of a flow chart of a method for adjusting a speed pulse signal provided by the present invention;
图6是本发明提供的转速脉冲信号的调节方法的流程示意图之二;6 is a second flow chart of the method for adjusting the speed pulse signal provided by the present invention;
图7是本发明提供的转速脉冲信号的调节方法的流程示意图之三;7 is a third flow chart of the method for adjusting the speed pulse signal provided by the present invention;
图8是本发明提供的转速脉冲信号的调节方法的流程示意图之四;FIG8 is a fourth flow chart of the method for adjusting the speed pulse signal provided by the present invention;
图9是本发明提供的数字处理器的结构示意图;FIG9 is a schematic diagram of the structure of a digital processor provided by the present invention;
图10是本发明提供的电子设备的结构示意图。FIG. 10 is a schematic diagram of the structure of an electronic device provided by the present invention.
其中,附图标记为:Wherein, the accompanying drawings are marked as follows:
100:转速脉冲信号的调节电路;110:运放模块;120:处理模块;130:调节模块;140:磁感应组件;150:减法模块;200:齿轮;210:齿峰;220:齿谷;300:背磁。100: regulating circuit of speed pulse signal; 110: operational amplifier module; 120: processing module; 130: regulating module; 140: magnetic induction component; 150: subtraction module; 200: gear; 210: tooth peak; 220: tooth valley; 300: back magnetism.
具体实施方式Detailed ways
为使本发明的目的、技术方案和优点更加清楚,下面将结合本发明中的附图,对本发明中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域 普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
霍尔传感器可以无接触地感应磁场、位置或电流,这使得霍尔传感器作为磁力计、位置传感器和电流传感器被广泛应用于电动汽车、自动驾驶、智能电表和功率逆变器等消费电子领域和汽车领域,是安全系统、电动助力转向(Electric Power Steering,EPS)系统和车身电子系统的组成部分。在此背景下,提高霍尔传感器的各项性能,设计高精度、高稳定性和高可靠性的霍尔传感器显得极为关键。Hall sensors can sense magnetic fields, positions or currents without contact, which makes them widely used in consumer electronics and automotive fields such as electric vehicles, autonomous driving, smart meters and power inverters as magnetometers, position sensors and current sensors. They are also components of safety systems, Electric Power Steering (EPS) systems and body electronic systems. In this context, it is extremely important to improve the performance of Hall sensors and design Hall sensors with high precision, high stability and high reliability.
本申请的描述中,需要理解的是,术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”等的特征可以明示或者隐含地包括一个或者更多个该特征。在本申请的描述中,除非另有说明,“多个”的含义是两个或两个以上。In the description of this application, it should be understood that the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first", "second", etc. may explicitly or implicitly include one or more of the feature. In the description of this application, unless otherwise specified, "plurality" means two or more.
下面结合图1至图10描述本发明的实施例所提供的转速脉冲信号的调节电路及方法。The following describes the speed pulse signal adjustment circuit and method provided by the embodiments of the present invention in conjunction with FIG. 1 to FIG. 10 .
图1是本发明提供的转速脉冲信号的调节电路的一种电路框图,应用于齿轮传感器,如图1所示,包括:FIG1 is a circuit block diagram of a speed pulse signal regulating circuit provided by the present invention, which is applied to a gear sensor, as shown in FIG1 , and includes:
运放模块110,用于将接收的齿轮传感器的背磁与齿轮之间的多个通道的磁场信号进行放大,以产生放大信号;The operational amplifier module 110 is used to amplify the received magnetic field signals of multiple channels between the back magnet of the gear sensor and the gear to generate an amplified signal;
处理模块120,与所述运放模块110连接,所述处理模块120根据所述放大信号,确定每个所述通道的捕获值和增益值,并生成第一调节信号和第二调节信号,且根据所述第一调节信号和所述多个通道的放大信号,生成齿轮的转速脉冲信号;The processing module 120 is connected to the operational amplifier module 110. The processing module 120 determines the capture value and the gain value of each channel according to the amplified signal, and generates a first adjustment signal and a second adjustment signal, and generates a speed pulse signal of the gear according to the first adjustment signal and the amplified signals of the multiple channels;
调节模块130,与所述处理模块120、所述运放模块110连接,用于根据所述第二调节信号,调节运放模块110中任一所述通道的所述增益值、所述磁场信号及偏移值。The adjustment module 130 is connected to the processing module 120 and the operational amplifier module 110, and is used to adjust the gain value, the magnetic field signal and the offset value of any channel in the operational amplifier module 110 according to the second adjustment signal.
其中,运放模块110中可以设有至少两个运算放大器,每个运算放大器用于对一个通道的磁场信号进行信号放大和偏置调整等操作,得到与该磁场信号对应的放大信号,并将放大信号输出至处理模块120。Among them, the operational amplifier module 110 may be provided with at least two operational amplifiers, each operational amplifier is used to perform operations such as signal amplification and bias adjustment on the magnetic field signal of a channel, obtain an amplified signal corresponding to the magnetic field signal, and output the amplified signal to the processing module 120.
例如,运放模块110接收第一通道和第二通道这两个通道的磁场信号,对应地,运放模块110至少包括第一通道的运算放大器AMP1和第二通道的运算放大器AMP2;AMP1对第一通道的磁场信号进行放大调整,AMP2对第二通道的磁场信号进行放大调整。For example, the operational amplifier module 110 receives magnetic field signals of two channels, a first channel and a second channel. Correspondingly, the operational amplifier module 110 includes at least an operational amplifier AMP1 of the first channel and an operational amplifier AMP2 of the second channel; AMP1 amplifies and adjusts the magnetic field signal of the first channel, and AMP2 amplifies and adjusts the magnetic field signal of the second channel.
处理模块120在收到一个通道的放大信号之后,根据放大信号得到该通道 中运算放大器的增益值,以及对该放大信号的捕获值,生成该放大信号的第一调节信号和第二调节信号。After receiving an amplified signal of a channel, the processing module 120 obtains a gain value of the operational amplifier in the channel and a capture value of the amplified signal according to the amplified signal, and generates a first adjustment signal and a second adjustment signal of the amplified signal.
第一调节信号为处理模块120对放大信号精细调节的信号的总称,第二调节信号为处理模块120通过调节模块130对运放模块110进行调节的信号的总称。The first adjustment signal is a general term for the signal that the processing module 120 finely adjusts the amplified signal, and the second adjustment signal is a general term for the signal that the processing module 120 adjusts the operational amplifier module 110 through the adjustment module 130 .
第一调节信号用于指示对该放大信号进行精细调节,进而生成更加准确的脉冲调节信号。The first adjustment signal is used to instruct to finely adjust the amplified signal, thereby generating a more accurate pulse adjustment signal.
第二调节信号用于指示调节模块130对运放模块110中运算放大器的增益值进行粗略调整,使得放大信号能够被处理模块120捕捉到。The second adjustment signal is used to instruct the adjustment module 130 to roughly adjust the gain value of the operational amplifier in the operational amplifier module 110 so that the amplified signal can be captured by the processing module 120 .
可选地,所述运放模块110包括至少两个运算放大器;所述处理模块120包括至少两个模数转换器和数字处理器;Optionally, the operational amplifier module 110 includes at least two operational amplifiers; the processing module 120 includes at least two analog-to-digital converters and a digital processor;
每个所述运算放大器的输出端分别对应与每个所述模数转换器的输入端连接,每个所述模数转换器的输出端分别与所述数字处理器的输入端连接,所述数字处理器的输出端与所述调节模块130的输入端连接;The output end of each operational amplifier is connected to the input end of each analog-to-digital converter respectively, the output end of each analog-to-digital converter is connected to the input end of the digital processor respectively, and the output end of the digital processor is connected to the input end of the adjustment module 130;
所述模数转换器,用于对任一所述通道的所述放大信号进行数字化转换,生成任一所述通道的数字信号,并传输至所述数字处理器;The analog-to-digital converter is used to digitally convert the amplified signal of any of the channels, generate a digital signal of any of the channels, and transmit the digital signal to the digital processor;
所述数字处理器,用于根据每个所述通道的所述数字信号,确定每个所述通道的所述捕获值和所述增益值,并生成所述第一调节信号和所述第二调节信号,进而通过所述第一调节信号,对每个所述通道的所述数字信号的偏移值进行调节,以生成齿轮的所述转速脉冲信号。The digital processor is used to determine the capture value and the gain value of each channel according to the digital signal of each channel, and generate the first adjustment signal and the second adjustment signal, and then adjust the offset value of the digital signal of each channel through the first adjustment signal to generate the speed pulse signal of the gear.
其中,由于放大信号为模拟信号,需要利用模数转换器ADC根据内部的时钟信号对某一通道的放大信号进行采样,将所有捕获到的电压值作为捕获值,进而可以根据捕获值,得到该通道的数字信号。Among them, since the amplified signal is an analog signal, it is necessary to use an analog-to-digital converter ADC to sample the amplified signal of a certain channel according to an internal clock signal, and use all captured voltage values as captured values, and then the digital signal of the channel can be obtained according to the captured values.
例如,模数转换器ADC,用于对单个通道的放大信号进行数字化转换,生成单个通道的数字信号,并将单个通道的数字信号发送至所述数字处理器(Digital Processor,DP);For example, an analog-to-digital converter ADC is used to digitally convert the amplified signal of a single channel, generate a digital signal of a single channel, and send the digital signal of the single channel to the digital processor (DP);
所述数字处理器DP在接收到各个通道的数字信号后,对每个通道的数字信号进行分析,以生成第一调节信号和第二调节信号,并利用第一调节信号对数字信号进行调节,进而得到齿轮的转速脉冲信号。After receiving the digital signals of each channel, the digital processor DP analyzes the digital signals of each channel to generate a first adjustment signal and a second adjustment signal, and adjusts the digital signal using the first adjustment signal to obtain a speed pulse signal of the gear.
例如,DP对信号的调节分为三个阶段:开机阶段、校准阶段和运行阶段。For example, DP's signal conditioning is divided into three stages: power-on stage, calibration stage, and operation stage.
在开机阶段,DP设置运放模块110的增益值G和模数转换器ADC的捕获阈值K1,并通过调节数字信号的偏移值和运算放大器的增益值,使得模数转换器ADC捕获值小于设定的捕获阈值K1;In the power-on phase, DP sets the gain value G of the operational amplifier module 110 and the capture threshold value K1 of the analog-to-digital converter ADC, and adjusts the offset value of the digital signal and the gain value of the operational amplifier so that the capture value of the analog-to-digital converter ADC is less than the set capture threshold value K1;
在校准阶段,开始进行校准,DP设置模数转换器ADC的捕获阈值K2,并 通过将模数转换器ADC的捕获值U与捕获阈值K2比较,以调节数字信号的偏移值和开机阶段最后的增益值,然后根据极差值调节偏移值,从而达到校准的目的;In the calibration phase, calibration begins, DP sets the capture threshold K2 of the analog-to-digital converter ADC, and adjusts the offset value of the digital signal and the final gain value of the power-on phase by comparing the capture value U of the analog-to-digital converter ADC with the capture threshold K2, and then adjusts the offset value according to the extreme difference value, thereby achieving the purpose of calibration;
在运行阶段,DP在校准阶段最后的增益值的基础上进行增益值调节,并调节数字信号的偏移值,以调节齿轮正常工作时可能产生的偏移。During the operation phase, DP adjusts the gain value based on the final gain value of the calibration phase, and adjusts the offset value of the digital signal to adjust the offset that may occur when the gear works normally.
图2是本发明提供的齿轮传感器的安装位置示意图,如图2所示,齿轮传感器100为IC,是一种霍尔效应转速传感器(Hall effect rotational speed sensor),设置于齿轮200和背磁300之间,齿轮传感器100中设有与背磁300平行的磁感应元件H1、H2和H3,齿轮传感器100上侧的齿轮200设有齿峰210和齿谷220。Figure 2 is a schematic diagram of the installation position of the gear sensor provided by the present invention. As shown in Figure 2, the gear sensor 100 is an IC, which is a Hall effect rotational speed sensor (Hall effect rotational speed sensor), which is arranged between the gear 200 and the back magnet 300. The gear sensor 100 is provided with magnetic sensing elements H1, H2 and H3 parallel to the back magnet 300, and the gear 200 on the upper side of the gear sensor 100 is provided with tooth peaks 210 and tooth valleys 220.
背磁300可以为永磁体。The back magnet 300 may be a permanent magnet.
本发明提供的转速脉冲信号的调节电路及方法,通过对得到的信号进行处理,进而根据处理结果对信号进行调节和反馈,能够有效降低背磁磁场不准确、不均匀等因素对齿轮脉冲信号的影响,使得调节后的齿轮脉冲信号更加准确。The speed pulse signal adjustment circuit and method provided by the present invention can effectively reduce the influence of factors such as inaccurate and uneven back magnetic field on the gear pulse signal by processing the obtained signal and then adjusting and feeding back the signal according to the processing result, so as to make the adjusted gear pulse signal more accurate.
可选地,所述调节电路还包括:Optionally, the regulating circuit further includes:
磁感应组件140,所述磁感应组件140包括至少三个依次间隔设置的磁感应元件,每个所述磁感应元件用于采集齿轮传感器的背磁与齿轮之间的初始磁场信号;A magnetic induction component 140, wherein the magnetic induction component 140 comprises at least three magnetic induction elements arranged in sequence and spaced apart from each other, each of the magnetic induction elements being used to collect an initial magnetic field signal between the back magnet of the gear sensor and the gear;
减法模块150,连接于所述磁感应组件140和所述运放模块110之间,用于将相邻两个所述磁感应元件采集的所述初始磁场信号相减,生成任一所述通道的磁场信号,并传输至所述运放模块110。The subtraction module 150 is connected between the magnetic induction component 140 and the operational amplifier module 110 , and is used to subtract the initial magnetic field signals collected by two adjacent magnetic induction elements, generate a magnetic field signal of any channel, and transmit it to the operational amplifier module 110 .
在磁感应组件140中,磁感应元件等间距分布在背磁与齿轮之间,能够使得获取的初始磁场信号偏差更小。In the magnetic induction assembly 140 , the magnetic induction elements are evenly spaced between the back magnet and the gear, which can reduce the deviation of the acquired initial magnetic field signal.
减法模块150包括至少两个减法器,每个减法器用于对单个通道中相邻两个磁感应元件采集的初始磁场信号进行差值计算,生成该通道的磁场信号,并将磁场信号传输至运放模块110中该通道的运算放大器。The subtraction module 150 includes at least two subtractors, each of which is used to perform difference calculation on the initial magnetic field signals collected by two adjacent magnetic sensing elements in a single channel, generate a magnetic field signal of the channel, and transmit the magnetic field signal to the operational amplifier of the channel in the operational amplifier module 110.
图3是本发明提供的转速脉冲信号的调节电路的另一种电路框图,如图3所示,调节电路包括以下结构:FIG3 is another circuit block diagram of the speed pulse signal regulating circuit provided by the present invention. As shown in FIG3 , the regulating circuit includes the following structures:
依次连接的磁感应组件140、减法模块150、运放模块110和处理模块120,调节模块130又分别与运放模块110和处理模块120连接。The magnetic induction component 140 , the subtraction module 150 , the operational amplifier module 110 and the processing module 120 are connected in sequence, and the adjustment module 130 is connected to the operational amplifier module 110 and the processing module 120 respectively.
图4是图3所示的本发明提供的转速脉冲信号的调节电路的一种实施例的电路图,如图4所示,调节电路包括以下结构:FIG. 4 is a circuit diagram of an embodiment of a speed pulse signal regulating circuit provided by the present invention shown in FIG. 3 . As shown in FIG. 4 , the regulating circuit includes the following structure:
磁感应组件140,包括三个磁感应元件H1、H2和H3,用于采集初始磁场信号;The magnetic induction component 140 includes three magnetic induction elements H1, H2 and H3, which are used to collect initial magnetic field signals;
减法模块150,包括两个减法器MINUS1和MINUS2,用于消除初始磁场信号中背磁磁场的共模干扰,得到磁场信号;理想情况下每个磁感应元件的背磁的磁场强度都是一样的,即背磁的磁场是均匀的,减法器会把背磁的磁场影响完全消除,而实际上,由于背磁的磁场强度是不均匀的,其影响无法全部消除;The subtraction module 150 includes two subtractors MINUS1 and MINUS2, which are used to eliminate the common-mode interference of the back magnetic field in the initial magnetic field signal to obtain a magnetic field signal; ideally, the magnetic field strength of the back magnetic field of each magnetic sensing element is the same, that is, the magnetic field of the back magnetic field is uniform, and the subtractor will completely eliminate the influence of the magnetic field of the back magnetic field. However, in fact, since the magnetic field strength of the back magnetic field is uneven, its influence cannot be completely eliminated;
运放模块110,包括两个运算放大器AMP1和AMP2,由于磁感应元件采集的感应值很小,需要通过运算放大器对磁场信号进行放大,得到放大信号,便于采集和后续的数据处理;The operational amplifier module 110 includes two operational amplifiers AMP1 and AMP2. Since the induction value collected by the magnetic induction element is very small, the magnetic field signal needs to be amplified by the operational amplifier to obtain an amplified signal, which is convenient for collection and subsequent data processing;
处理模块120,包括两个模数转换器ADC1和ADC2,以及数字处理器DP,由于模拟信号的算法复杂,且很难实现,而通过模数转换器ADC将放大信号这种模拟信号转换为数字信号,方便在DP中对数字信号的进行快速运算,生成第一调节信号和第二调节信号,能够在初始化阶段快速消除了由于背磁不均匀产生的偏置电压;The processing module 120 includes two analog-to-digital converters ADC1 and ADC2, and a digital processor DP. Since the algorithm of analog signals is complex and difficult to implement, the analog signal such as the amplified signal is converted into a digital signal by the analog-to-digital converter ADC, so as to facilitate rapid operation of the digital signal in the DP, generate a first adjustment signal and a second adjustment signal, and can quickly eliminate the bias voltage caused by the uneven back magnetism in the initialization stage;
调节模块130,包括两个偏移/增益调节器ADJ1和ADJ2,由于未消除背磁会导致信号偏移,而偏移/增益调节器用于根据第二调节信号调节运算放大器AMP1和AMP2中放大器的磁场信号的偏移值Y以及运算放大器的增益值G,能够把偏移的信号移回正确位置。The adjustment module 130 includes two offset/gain adjusters ADJ1 and ADJ2. Failure to eliminate back magnetism will cause signal offset, and the offset/gain adjuster is used to adjust the offset value Y of the magnetic field signal of the amplifier in the operational amplifier AMP1 and AMP2 and the gain value G of the operational amplifier according to the second adjustment signal, so as to move the offset signal back to the correct position.
上述结构的连接关系具体如下:The connection relationship of the above structure is as follows:
磁感应元件H1和磁感应元件H2分别接在减法器MINUS1的两个输入端,H1和H2采集的初始磁场信号在MINUS1进行差值计算,得到第一通道的磁场信号;磁感应元件H2和磁感应元件H3分别接在减法器MINUS2的两个输入端,H2和H3采集的初始磁场信号在MINUS2进行差值计算,得到第二通道的磁场信号;The magnetic induction element H1 and the magnetic induction element H2 are respectively connected to the two input ends of the subtractor MINUS1, and the initial magnetic field signals collected by H1 and H2 are subjected to difference calculation in MINUS1 to obtain the magnetic field signal of the first channel; the magnetic induction element H2 and the magnetic induction element H3 are respectively connected to the two input ends of the subtractor MINUS2, and the initial magnetic field signals collected by H2 and H3 are subjected to difference calculation in MINUS2 to obtain the magnetic field signal of the second channel;
减法器MINUS1的输出端接在运算放大器AMP1的输入端,AMP1对第一通道的磁场信号进行放大调整处理,得到第一通道的放大信号;减法器MINUS2的输出端接在运算放大器AMP2的输入端,AMP2对第二通道的磁场信号进行放大调整处理,得到第二通道的放大信号;The output end of the subtractor MINUS1 is connected to the input end of the operational amplifier AMP1, and AMP1 amplifies and adjusts the magnetic field signal of the first channel to obtain the amplified signal of the first channel; the output end of the subtractor MINUS2 is connected to the input end of the operational amplifier AMP2, and AMP2 amplifies and adjusts the magnetic field signal of the second channel to obtain the amplified signal of the second channel;
运算放大器AMP1的调节端接在偏移/增益调节器ADJ1的输出端,其输出端接在模数转换器ADC1的输入端,ADC1对第一通道的放大信号进行模数转换,得到第一通道的数字信号;运算放大器AMP2的调节端接在偏移/增益调节器ADJ2的输出端,其输出端接在模数转换器ADC2的输入端,ADC2对第二通道的放大信号进行模数转换,得到第二通道的数字信号;The adjustment terminal of the operational amplifier AMP1 is connected to the output terminal of the offset/gain adjuster ADJ1, and the output terminal thereof is connected to the input terminal of the analog-to-digital converter ADC1. ADC1 performs analog-to-digital conversion on the amplified signal of the first channel to obtain the digital signal of the first channel. The adjustment terminal of the operational amplifier AMP2 is connected to the output terminal of the offset/gain adjuster ADJ2, and the output terminal thereof is connected to the input terminal of the analog-to-digital converter ADC2. ADC2 performs analog-to-digital conversion on the amplified signal of the second channel to obtain the digital signal of the second channel.
模数转换器ADC1的输出端接在数字处理器DP的一个输入端;模数转换器ADC2的输出端接在数字处理器DP的另一个输入端,DP分别对第一通道和第 二通道的数字信号进行分析处理,以生成第一通道的第一调节信号、第二调节信号,以及第二通道的第一调节信号、第二调节信号,DP根据第一通道的第一调节信号对第一通道的数字信号进行调节,得到第一通道的齿轮的转速脉冲信号;DP还根据第二通道的第一调节信号对第二通道的数字信号进行调节,得到第二通道的齿轮的转速脉冲信号;一般情况下,第一通道的转速脉冲信号和第二通道的转速脉冲信号相同。The output end of the analog-to-digital converter ADC1 is connected to an input end of the digital processor DP; the output end of the analog-to-digital converter ADC2 is connected to the other input end of the digital processor DP. DP analyzes and processes the digital signals of the first channel and the second channel respectively to generate the first adjustment signal and the second adjustment signal of the first channel, and the first adjustment signal and the second adjustment signal of the second channel. DP adjusts the digital signal of the first channel according to the first adjustment signal of the first channel to obtain the speed pulse signal of the gear of the first channel; DP also adjusts the digital signal of the second channel according to the first adjustment signal of the second channel to obtain the speed pulse signal of the gear of the second channel; generally, the speed pulse signal of the first channel is the same as the speed pulse signal of the second channel.
偏移/增益调节器ADJ1的输入端接在数字处理器DP的一个输出端,ADJ1根据第一通道的第二调节信号,对AMP1中的增益值、磁场信号和偏移值进行调节;偏移/增益调节器ADJ2的输入端接在数字处理器DP的另一个输出端,ADJ2根据第二通道的第二调节信号,对AMP2中的增益值、磁场信号和偏移值进行调节。The input end of the offset/gain regulator ADJ1 is connected to an output end of the digital processor DP, and ADJ1 adjusts the gain value, magnetic field signal and offset value in AMP1 according to the second adjustment signal of the first channel; the input end of the offset/gain regulator ADJ2 is connected to the other output end of the digital processor DP, and ADJ2 adjusts the gain value, magnetic field signal and offset value in AMP2 according to the second adjustment signal of the second channel.
如图4所示,磁感应元件H1和H2将采集的初始磁场信号发送至减法器MINUS1,减法器MINUS1对H1和H2采集的初始磁场信号进行差值计算,可以得到第一通道的磁场信号,并将磁场信号发送至运放模块110中第一通道的运算放大器AMP1。As shown in FIG4 , the magnetic induction elements H1 and H2 send the collected initial magnetic field signals to the subtractor MINUS1. The subtractor MINUS1 performs difference calculation on the initial magnetic field signals collected by H1 and H2 to obtain the magnetic field signal of the first channel, and sends the magnetic field signal to the operational amplifier AMP1 of the first channel in the operational amplifier module 110.
根据发明提供的转速脉冲信号的调节电路,通过减法器对采集的原始信号进行减法运算,能够有效去除磁场信号中背磁磁场带来的共模干扰。According to the adjustment circuit of the rotation speed pulse signal provided by the invention, the collected original signal is subtracted by a subtractor, so that the common mode interference caused by the back magnetic field in the magnetic field signal can be effectively removed.
下面对本发明提供的转速脉冲信号的调节方法进行描述,下文描述的转速脉冲信号的调节方法与上文描述的转速脉冲信号的调节电路可相互对应参照。The following is a description of the method for adjusting the rotation speed pulse signal provided by the present invention. The method for adjusting the rotation speed pulse signal described below and the adjustment circuit for the rotation speed pulse signal described above can refer to each other.
图5是本发明提供的转速脉冲信号的调节方法的流程示意图之一,如图5所示,应用于上述实施例中的转速脉冲信号的调节电路,包括但不限于以下步骤:FIG5 is one of the flow charts of the method for adjusting the speed pulse signal provided by the present invention. As shown in FIG5 , the adjustment circuit of the speed pulse signal applied in the above embodiment includes but is not limited to the following steps:
首先,在步骤S1中,将接收的齿轮传感器的背磁与齿轮之间的多个通道的磁场信号进行放大,以产生放大信号。First, in step S1 , the received magnetic field signals of multiple channels between the back magnet of the gear sensor and the gear are amplified to generate amplified signals.
其中,运放模块110中可以设有至少两个运算放大器,每个运算放大器用于对一个通道的磁场信号进行信号放大和偏置调整等操作,得到与该磁场信号对应的放大信号,并将放大信号输出至处理模块120。Among them, the operational amplifier module 110 may be provided with at least two operational amplifiers, each operational amplifier is used to perform operations such as signal amplification and bias adjustment on the magnetic field signal of a channel, obtain an amplified signal corresponding to the magnetic field signal, and output the amplified signal to the processing module 120.
进一步地,在步骤S2中,根据所述放大信号,确定每个所述通道的捕获值和增益值。Further, in step S2, the capture value and gain value of each channel are determined according to the amplified signal.
根据至少两个通道的模数转换器发送的齿轮转速的数字信号,确定所述至少两个通道的捕获值,并确定运放模块中所述至少两个通道的运算放大器的增益值。According to the digital signals of the gear rotation speed sent by the analog-to-digital converters of at least two channels, the capture values of the at least two channels are determined, and the gain values of the operational amplifiers of the at least two channels in the operational amplifier module are determined.
例如,DP在接收到第一通道的模数转换器ADC1发送的齿轮转速的数字信号,可以根据该数字信号确定任一时刻得到第一通道的捕获值U,并确定运算 放大器AMP1的运算放大器的增益值G1。For example, when DP receives the digital signal of gear speed sent by the analog-to-digital converter ADC1 of the first channel, it can determine the capture value U of the first channel at any time based on the digital signal, and determine the gain value G1 of the operational amplifier AMP1.
根据齿轮的启动时序,转速脉冲信号的调节方法分别应用于开机阶段、校准阶段和运行阶段。According to the starting sequence of the gears, the adjustment method of the speed pulse signal is applied to the startup stage, calibration stage and operation stage respectively.
其中,校准阶段对运算放大器的增益的调整,是在开机阶段对运算放大器调整后的增益的基础上进行的,运行阶段对运算放大器的增益的调整,是在校准阶段对运算放大器调整后的增益的基础上进行的。The gain adjustment of the operational amplifier in the calibration phase is performed on the basis of the gain adjusted in the startup phase, and the gain adjustment of the operational amplifier in the operation phase is performed on the basis of the gain adjusted in the calibration phase.
进一步地,在步骤S3中,通过设置捕获阈值,对每个所述通道的捕获值和增益值进行分析,以生成第一调节信号和第二调节信号。Furthermore, in step S3, by setting a capture threshold, the capture value and gain value of each channel are analyzed to generate a first adjustment signal and a second adjustment signal.
可以理解的是,为了使齿轮的转速脉冲信号逐步精准,需要在信号调节的过程之中从粗调到精调,因此,开机阶段的第一捕获阈值K1、校准阶段的第二捕获阈值K2和运行阶段的第三捕获阈值K3,满足K1<K2<K3。It can be understood that in order to make the speed pulse signal of the gear gradually more accurate, it is necessary to go from coarse adjustment to fine adjustment during the signal adjustment process. Therefore, the first capture threshold K1 in the startup phase, the second capture threshold K2 in the calibration phase, and the third capture threshold K3 in the operation phase satisfy K1<K2<K3.
可选地,在所述齿轮处于开机阶段的情况下,所述第一调节信号包括第一开机调节信号,所述第二调节信号包括第二开机调节信号,所述捕获阈值为第一捕获阈值;Optionally, when the gear is in the startup stage, the first adjustment signal includes a first startup adjustment signal, the second adjustment signal includes a second startup adjustment signal, and the capture threshold is a first capture threshold;
通过设置捕获阈值,对每个所述通道的捕获值和增益值进行分析,以生成第一调节信号和第二调节信号,包括:By setting a capture threshold, analyzing the capture value and gain value of each channel to generate a first adjustment signal and a second adjustment signal, including:
在任一所述通道的所述捕获值不小于任一所述通道的所述第一捕获阈值,且任一所述通道的所述增益值不为最小值的情况下,生成所述第一开机调节信号和所述第二开机调节信号;When the capture value of any of the channels is not less than the first capture threshold of any of the channels, and the gain value of any of the channels is not a minimum value, generating the first power-on adjustment signal and the second power-on adjustment signal;
所述第二开机调节信号用于指示所述调节模块130调整任一所述通道的所述增益值和所述磁场信号的偏移值。The second power-on adjustment signal is used to instruct the adjustment module 130 to adjust the gain value of any of the channels and the offset value of the magnetic field signal.
图6是本发明提供的转速脉冲信号的调节方法的流程示意图之二,如图6所示,包括:FIG. 6 is a second flow chart of the method for adjusting the speed pulse signal provided by the present invention, as shown in FIG. 6 , comprising:
在任一通道的模数转换器的捕获值U不小于第一捕获阈值K1,且该通道的增益值G不为增益值的最小值Gmin的情况下,DP生成第一开机调节信号和第二开机调节信号,将第二开机调节信号发送至调节模块130,以指示调节模块130对该通道中运算放大器的增益值G和磁场信号的偏移值进行调整。When the capture value U of the analog-to-digital converter of any channel is not less than the first capture threshold K1, and the gain value G of the channel is not the minimum gain value Gmin, DP generates a first power-on adjustment signal and a second power-on adjustment signal, and sends the second power-on adjustment signal to the adjustment module 130 to instruct the adjustment module 130 to adjust the gain value G of the operational amplifier in the channel and the offset value of the magnetic field signal.
可选地,在生成所述第二开机调节信号之后,还包括:Optionally, after generating the second power-on adjustment signal, the method further includes:
将所述第二开机调节信号发送至所述调节模块130;Sending the second power-on adjustment signal to the adjustment module 130;
接收任一所述通道的新的捕获值,直至所述新的捕获值小于所述第一捕获阈值,以确定所述任一通道的数字信号的偏移值;receiving a new capture value of any of the channels until the new capture value is less than the first capture threshold, so as to determine an offset value of the digital signal of any of the channels;
根据所述偏移值,确定任一所述通道的第一目标捕获值。A first target capture value of any of the channels is determined according to the offset value.
将第二开机调节信号发送至偏移/增益调节器ADJ1和偏移/增益调节器ADJ2;Sending a second power-on adjustment signal to the offset/gain adjuster ADJ1 and the offset/gain adjuster ADJ2;
接收任一通道的新的捕获值U,直至新的捕获值U小于第一捕获阈值K1,确定该通道中的偏移/增益调节器的偏移值Y=(Umax+Umin)/2;Receive a new capture value U of any channel until the new capture value U is less than the first capture threshold K1, and determine the offset value Y=(Umax+Umin)/2 of the offset/gain adjuster in the channel;
将偏移值Y设置为任一通道的模数转换器第一目标捕获值。Set the offset value Y to the first target capture value of the analog-to-digital converter of any channel.
具体地,首先进行电路复位,复位之后设置第一通道的运算放大器AMP1的增益值为G1,运算放大器AMP2的增益值为G2,设置模数转换器ACD1和ADC2的第一捕获阈值K1;Specifically, the circuit is reset first, and after the reset, the gain value of the operational amplifier AMP1 of the first channel is set to G1, the gain value of the operational amplifier AMP2 is set to G2, and the first capture threshold value K1 of the analog-to-digital converters ACD1 and ADC2 is set;
然后开启模数转换器ADC1和ADC2分别进行采集,获得当前通道的捕获值U1和U2,并将捕获值U1和U2送到数字处理器DP进行数字化处理;Then the analog-to-digital converters ADC1 and ADC2 are turned on to collect data respectively, and the captured values U1 and U2 of the current channel are obtained, and the captured values U1 and U2 are sent to the digital processor DP for digital processing;
在数字处理器DP中,先将捕获值U1和U2与设定的第一捕获阈值K1进行比较,如果U1≥K1,并且AMP1的增益值G1不为增益值的最小值Gmin的情况下,偏移/增益调节器ADJ1根据第二开机调节信号调节AMP1的增益值,直至U1<K1;In the digital processor DP, the captured values U1 and U2 are first compared with the set first capture threshold K1. If U1≥K1 and the gain value G1 of AMP1 is not the minimum gain value Gmin, the offset/gain adjuster ADJ1 adjusts the gain value of AMP1 according to the second power-on adjustment signal until U1<K1;
同理,如果U2≥K2,并且AMP2的增益值G2不为增益值的最小值Gmin的情况下,偏移/增益调节器ADJ2根据第二开机调节信号调节AMP2的增益值,直至U2<K2。Similarly, if U2≥K2, and the gain value G2 of AMP2 is not the minimum gain value Gmin, the offset/gain adjuster ADJ2 adjusts the gain value of AMP2 according to the second power-on adjustment signal until U2<K2.
最后设定偏移/增益调节器ADJ1和偏移/增益调节器ADJ2的偏移值Y1和Y2分别作为ADC1和ADC2的捕获值,开机阶段结束。Finally, the offset values Y1 and Y2 of the offset/gain adjusters ADJ1 and ADJ2 are set as the capture values of ADC1 and ADC2 respectively, and the power-on stage ends.
根据本发明提供的转速脉冲信号的调节方法,通过对运放模块进行设置和调节,从而对磁场信号进行校正,消除磁场信号偏移,进而得到正确的齿轮转速。According to the method for adjusting the rotation speed pulse signal provided by the present invention, the operational amplifier module is set and adjusted to correct the magnetic field signal, eliminate the offset of the magnetic field signal, and thus obtain the correct gear rotation speed.
可选地,在齿轮处于校准阶段的情况下,所述第一调节信号包括第一校准调节信号,所述第二调节信号包括第二校准调节信号和第三校准调节信号,所述捕获阈值为第二捕获阈值,所述通道包括第一通道和第二通道,所述捕获值包括:第一通道的第一捕获值,以及第二通道的第二捕获值;所述增益值包括:所述第一通道的第一增益值,以及第二通道的第二增益值;Optionally, when the gear is in a calibration stage, the first adjustment signal includes a first calibration adjustment signal, the second adjustment signal includes a second calibration adjustment signal and a third calibration adjustment signal, the capture threshold is a second capture threshold, the channel includes a first channel and a second channel, the capture value includes: a first capture value of the first channel, and a second capture value of the second channel; the gain value includes: a first gain value of the first channel, and a second gain value of the second channel;
通过设置捕获阈值,对每个所述通道的捕获值和增益值进行分析,以生成第一调节信号和第二调节信号,包括:By setting a capture threshold, analyzing the capture value and gain value of each channel to generate a first adjustment signal and a second adjustment signal, including:
在确定所述第一捕获值达到峰值,且所述第二捕获值达到峰值的情况下,确定所述第一增益值,以及所述第二增益值;In the case where it is determined that the first captured value reaches a peak value and the second captured value reaches a peak value, determining the first gain value and the second gain value;
在确定所述第一增益值与所述第二增益值之差大于1的情况下,调节所述运放模块110的标志位,并生成所述第一校准调节信号和第二校准调节信号;所述第二校准调节信号,用于指示所述调节模块130调整目标运算放大器的增益值,所述目标运算放大器是基于所述第一增益值和所述第二增益值确定的;When it is determined that the difference between the first gain value and the second gain value is greater than 1, the flag bit of the operational amplifier module 110 is adjusted, and the first calibration adjustment signal and the second calibration adjustment signal are generated; the second calibration adjustment signal is used to instruct the adjustment module 130 to adjust the gain value of the target operational amplifier, and the target operational amplifier is determined based on the first gain value and the second gain value;
在确定所述第一捕获值和所述第二捕获值中任一值未达到峰值,且所述任 一值不小于所述第二捕获阈值的情况下,生成所述第三校准调节信号;所述第三校准调节信号,用于指示所述调节模块130调整与所述任一值相对应的运算放大器的增益值。When it is determined that any one of the first capture value and the second capture value has not reached a peak value and any one of the values is not less than the second capture threshold, the third calibration adjustment signal is generated; the third calibration adjustment signal is used to instruct the adjustment module 130 to adjust the gain value of the operational amplifier corresponding to any one of the values.
目标运算放大器为增益值更高的运算放大器,例如,若G1>G2,则AMP1为目标运算放大器。The target operational amplifier is an operational amplifier with a higher gain value. For example, if G1>G2, AMP1 is the target operational amplifier.
将新捕获的值与之前捕获的值比较,如果之前捕获到的值都是逐渐增大,但是现在捕获到的值却比前一个值小,那么前一个值就是最大值,该最大值记为峰值,最小值亦然。Compare the newly captured value with the previously captured value. If the previously captured values were gradually increasing, but the value captured now is smaller than the previous value, then the previous value is the maximum value, which is recorded as the peak value, and the same applies to the minimum value.
图7是本发明提供的转速脉冲信号的调节方法的流程示意图之三,如图7所示,包括:FIG. 7 is a third flow chart of the method for adjusting the speed pulse signal provided by the present invention, as shown in FIG. 7 , comprising:
例如,在DP确定所述第一捕获值U1达到峰值U 1峰,且所述第二捕获值U2达到峰值U 2峰的情况下,确定此时的AMP1的第一增益值G1,以及AMP2的第二增益值G2; For example, when DP determines that the first captured value U1 reaches a peak value U1 peak , and the second captured value U2 reaches a peak value U2 peak , the first gain value G1 of AMP1 and the second gain value G2 of AMP2 are determined at this time;
在DP确定|G1-G2|>1的情况下,调节所述运放模块110的标志位AMP_DIFF_FLAG=1,并生成第二校准调节信号,以指示调节模块130调整增益值更高的目标运算放大器的增益值。When DP determines that |G1-G2|>1, the flag bit AMP_DIFF_FLAG of the operational amplifier module 110 is adjusted to 1, and a second calibration adjustment signal is generated to instruct the adjustment module 130 to adjust the gain value of the target operational amplifier with a higher gain value.
在确定第一捕获值U1和所述第二捕获值U2中任一值未达到峰值,且该捕获值不小于第二捕获阈值K2的情况下,生成第三校准调节信号,以指示调节模块130调整与该捕获值相对应的运算放大器的增益值。When it is determined that any one of the first capture value U1 and the second capture value U2 has not reached a peak value and the capture value is not less than the second capture threshold K2, a third calibration adjustment signal is generated to instruct the adjustment module 130 to adjust the gain value of the operational amplifier corresponding to the capture value.
可选地,在确定所述第一捕获值和所述第二捕获值中任一值未达到峰值的情况下,所述第一调节信号包括第四校准调节信号;Optionally, in a case where it is determined that any one of the first captured value and the second captured value does not reach a peak value, the first adjustment signal includes a fourth calibration adjustment signal;
所述通过设置捕获阈值,对每个所述通道的捕获值和增益值进行分析,以生成第一调节信号,还包括:The method of setting a capture threshold and analyzing the capture value and gain value of each channel to generate a first adjustment signal further includes:
若所述第一捕获值和所述第二捕获值均小于所述第二捕获阈值,则根据所述任一值的极差值,生成第四校准调节信号,所述第四校准调节信号,用于调节与所述任一值对应的通道的数字信号的偏移值。If the first capture value and the second capture value are both less than the second capture threshold, a fourth calibration adjustment signal is generated according to the extreme value of any of the values, and the fourth calibration adjustment signal is used to adjust the offset value of the digital signal of the channel corresponding to any of the values.
其中,极差值为得到的捕获值中最大值和最小值之差。The range value is the difference between the maximum and minimum values in the captured values.
若第一捕获值U1和第二捕获值U2均小于第二捕获阈值K2,则根据任一值的极差值△U,生成第四校准调节信号,以供调节模块130调节与任一值对应的通道中运算放大器的偏移值Y。If both the first capture value U1 and the second capture value U2 are less than the second capture threshold K2, a fourth calibration adjustment signal is generated according to the extreme difference ΔU of any value, so that the adjustment module 130 can adjust the offset value Y of the operational amplifier in the channel corresponding to any value.
当开机阶段结束后,齿轮开始转动,此时调试阶段开始;首先设置ADC1和ADC2的第二捕获阈值K2,随着齿轮转动,ADC1和ADC2进行采集当前通道的第一捕获值U1和第二捕获值U2,并将捕获值U1和U2送到数字处理器DP进行数字化处理;When the power-on phase is over, the gears start to rotate, and the debugging phase begins. First, the second capture threshold K2 of ADC1 and ADC2 is set. As the gears rotate, ADC1 and ADC2 collect the first capture value U1 and the second capture value U2 of the current channel, and send the capture values U1 and U2 to the digital processor DP for digital processing.
在数字处理器DP中,先判断当前ADC1的第一捕获值U1和ADC2的第二捕获值U2是否达到了峰值;In the digital processor DP, it is first determined whether the first captured value U1 of ADC1 and the second captured value U2 of ADC2 have reached a peak value;
如果达到峰值,且AMP1和AMP2增益值之差不小于1,那么设置标志位AMP_DIFF_FLAG=1,同时调节运算放大器AMP1和AMP2增益值较高的一路G,使之增益值G=G-1,直到AMP1和AMP2增益值之差|G1-G2|≤1;If the peak value is reached and the difference between the gain values of AMP1 and AMP2 is not less than 1, then set the flag AMP_DIFF_FLAG = 1, and adjust the higher gain value of the operational amplifier AMP1 and AMP2 G to make the gain value G = G-1, until the difference between the gain values of AMP1 and AMP2 |G1-G2|≤1;
如果捕获值U1和U2未达到峰值,则进一步判断当前ADC1和ADC2的捕获值是否大于等于第二捕获阈值K2,如果任一捕获值U≥K2,则减小任一捕获值U;If the captured values U1 and U2 do not reach the peak value, further determine whether the current captured values of ADC1 and ADC2 are greater than or equal to the second capture threshold K2. If any captured value U≥K2, reduce any captured value U.
如果ADC1和ADC2的捕获值U1和U2未超过第二捕获阈值K2,则数字处理器DP根据任一捕获值U的极差值△U=Umax-Umin,生成第四校准调节信号,以控制调节模块130调节该捕获值对应通道的偏移值Y,调试阶段。If the captured values U1 and U2 of ADC1 and ADC2 do not exceed the second capture threshold K2, the digital processor DP generates a fourth calibration adjustment signal according to the extreme difference value △U=Umax-Umin of any captured value U to control the adjustment module 130 to adjust the offset value Y of the channel corresponding to the captured value, the debugging stage.
测出的偏移值Y会通过ADJ移动输入信号的偏置电压,把信号移动到Y=0的位置。The measured offset value Y will shift the bias voltage of the input signal through ADJ and move the signal to the position of Y=0.
根据本发明提供的转速脉冲信号的调节方法,能够计算出未消除的背磁的影响,并通过偏移值,把信号移动到正确位置。According to the method for adjusting the rotation speed pulse signal provided by the present invention, the influence of the uneliminated back magnetism can be calculated, and the signal can be moved to the correct position through the offset value.
可选地,在所述齿轮处于运行阶段的情况下,所述第一调节信号包括第一运行调节信号,所述第二调节信号包括第二运行调节信号,所述捕获阈值为第三捕获阈值;Optionally, when the gear is in the running stage, the first adjustment signal includes a first running adjustment signal, the second adjustment signal includes a second running adjustment signal, and the capture threshold is a third capture threshold;
通过设置捕获阈值,对每个所述通道的捕获值和增益值进行分析,以生成第一调节信号和第二调节信号,包括:By setting a capture threshold, analyzing the capture value and gain value of each channel to generate a first adjustment signal and a second adjustment signal, including:
将所述任一通道的捕获值与所述第三捕获阈值进行对比,确定所述任一通道的目标次数,所述目标次数用于指示所述任一通道的捕获值不小于所述第三捕获阈值的次数;Comparing the capture value of any one of the channels with the third capture threshold, determining a target number of times for any one of the channels, the target number of times being used to indicate the number of times the capture value of any one of the channels is not less than the third capture threshold;
在所述任一通道的捕获值不小于所述第三捕获阈值,且目标次数大于预设次数的情况下,生成所述第一运行调节信号和所述第二运行调节信号;generating the first operation adjustment signal and the second operation adjustment signal when the capture value of any channel is not less than the third capture threshold and the target number of times is greater than a preset number of times;
所述第二运行调节信号,用于指示所述调节模块130调整所述任一通道的所述增益值。The second operation adjustment signal is used to instruct the adjustment module 130 to adjust the gain value of any one of the channels.
目标次数为通道的捕获值U大于第三捕获阈值K3的次数。The target number is the number of times the capture value U of the channel is greater than the third capture threshold K3.
在任一通道的数字信号的波形发生变化,且运算放大器的增益值G不变的情况下,将任一通道的捕获值U与所述第三捕获阈值K3进行对比,确定该通道的捕获值U大于第三捕获阈值K3的次数;波形发生变化包括:数字信号的捕获值从单调上升变成了单调下降,或是由单调下降变成单调上升。When the waveform of the digital signal of any channel changes and the gain value G of the operational amplifier remains unchanged, the capture value U of any channel is compared with the third capture threshold K3 to determine the number of times the capture value U of the channel is greater than the third capture threshold K3; the waveform change includes: the capture value of the digital signal changes from a monotonically rising value to a monotonically falling value, or from a monotonically falling value to a monotonically rising value.
在U≤K3,且通道的捕获值U大于第三捕获阈值K3的次数大于1的情况下,生成第一运行调节信号和第二运行调节信号,DP根据第一运行调节信号, 对调节数字信号的偏移值,生成该通道的转速脉冲信号,第二运行调节信号用于指示调节模块130调整该通道的运算放大器的增益值G。When U≤K3, and the capture value U of the channel is greater than the third capture threshold K3 for a number of times greater than 1, a first operation adjustment signal and a second operation adjustment signal are generated. DP generates a speed pulse signal of the channel by adjusting the offset value of the digital signal according to the first operation adjustment signal. The second operation adjustment signal is used to instruct the adjustment module 130 to adjust the gain value G of the operational amplifier of the channel.
图8是本发明提供的转速脉冲信号的调节方法的流程示意图之四,如图8所示,包括:FIG8 is a fourth flow chart of the method for adjusting the speed pulse signal provided by the present invention, as shown in FIG8 , comprising:
当调节阶段结束,进入运行阶段,DP在运行阶段调节齿轮正常工作时可能产生的偏移。首先设置ADC1和ADC2的第三捕获阈值K3,同时对统计ADC峰值超过第三捕获阈值K3的计数器进行复位;When the adjustment phase ends and the operation phase begins, the DP adjusts the possible offsets that may occur when the gears work normally during the operation phase. First, the third capture threshold K3 of ADC1 and ADC2 is set, and the counter that counts the ADC peak value exceeding the third capture threshold K3 is reset;
然后数字处理器DP根据ADC1和ADC2采集当前通道的捕获值U1和U2来判断波形边沿是否发生了变化。Then the digital processor DP collects the capture values U1 and U2 of the current channel according to ADC1 and ADC2 to determine whether the waveform edge has changed.
如果发生了变化,则进一步判断在AMP1和AMP2增益值G1和G2未变的情况下,检测到上一次边沿变化后,ADC1和ADC2的捕获值U1和U2是否超过了第三捕获阈值K3,如果ADC1和ADC2的任一捕获值超过了第三捕获阈值K3,则在该通道上ADC峰值超过第三捕获阈值K3的次数计数加1,执行流程回到波形边沿变化检测,否则对ADC峰值超过第三捕获阈值K3的计数器进行复位。If a change occurs, it is further determined whether the captured values U1 and U2 of ADC1 and ADC2 exceed the third capture threshold K3 after the last edge change is detected when the gain values G1 and G2 of AMP1 and AMP2 remain unchanged. If any captured value of ADC1 and ADC2 exceeds the third capture threshold K3, the number of times the ADC peak value exceeds the third capture threshold K3 on the channel is counted by 1, and the execution process returns to the waveform edge change detection. Otherwise, the counter for the ADC peak value exceeding the third capture threshold K3 is reset.
可选地,在所述生成所述第一运行调节信号和第二运行调节信号之后,还包括:Optionally, after generating the first operation adjustment signal and the second operation adjustment signal, the method further includes:
将所述第二运行调节信号发送至所述调节模块130;Sending the second operation adjustment signal to the adjustment module 130;
接收所述任一通道的新的捕获值,直至所述新的捕获值小于所述第三捕获阈值,确定所述任一通道的偏移值;receiving a new capture value of any one of the channels until the new capture value is less than the third capture threshold, and determining an offset value of any one of the channels;
根据所述偏移值,确定所述任一通道的第二目标捕获值。A second target capture value of any one of the channels is determined according to the offset value.
如果通过对ADC1和ADC2进行采集当前通道的捕获值进行判断,发现波形边沿发生了变化,则进一步判断ADC1和ADC2的捕获值是否小于等于第三捕获阈值K3,如果捕获值小于等于第三捕获阈值K3,则执行流程回到波形边沿变化检测,否则进一步判断ADC峰值超过第三捕获阈值K3的计数器是否不小于1,如果不小于1且AMP1和AMP2增益达到了最小值,则进行报错;If the captured values of the current channel collected by ADC1 and ADC2 are judged and it is found that the waveform edge has changed, it is further judged whether the captured values of ADC1 and ADC2 are less than or equal to the third capture threshold K3. If the captured values are less than or equal to the third capture threshold K3, the execution process returns to the waveform edge change detection. Otherwise, it is further judged whether the counter of the ADC peak value exceeding the third capture threshold K3 is not less than 1. If it is not less than 1 and the gains of AMP1 and AMP2 have reached the minimum value, an error is reported;
如果ADC峰值超过第三捕获阈值K3的计数不小于1,且AMP1和AMP2增益值G1和G2均未达到最小值,则G1=G1-1,G2=G2-1,并通过控制ADJ1和ADJ2调节偏移值Y1和Y2,Y1=(U1max+U1min)/2,Y2=(U2max+U2min)/2,调节之后对ADC峰值超过第三捕获阈值K3的计数器进行复位,运行阶段结束。If the count of the ADC peak value exceeding the third capture threshold K3 is not less than 1, and the AMP1 and AMP2 gain values G1 and G2 have not reached the minimum value, then G1=G1-1, G2=G2-1, and the offset values Y1 and Y2 are adjusted by controlling ADJ1 and ADJ2, Y1=(U1max+U1min)/2, Y2=(U2max+U2min)/2, after adjustment, the counter of the ADC peak value exceeding the third capture threshold K3 is reset, and the operation phase ends.
根据本发明提供的转速脉冲信号的调节方法,通过在运行阶段对增益和偏移值的调节,能够有效避免齿轮运行过程中的振动等原因,传感器的值可能发生变化导致溢出的状况。According to the method for adjusting the speed pulse signal provided by the present invention, by adjusting the gain and offset values during the operation phase, it is possible to effectively avoid the situation where the sensor value may change and cause overflow due to reasons such as vibration during the operation of the gear.
进一步地,在步骤S4中,根据所述第一调节信号和所述多个通道的放大信号,生成齿轮的转速脉冲信号。Further, in step S4, a speed pulse signal of the gear is generated according to the first adjustment signal and the amplified signals of the multiple channels.
在处理模块120中,模数转换器将放大信号转换成数字信号,DP根据第一调节信号对数字信号的偏移值进行微调,可以生成较为精准的齿轮的转速脉冲信号。In the processing module 120, the analog-to-digital converter converts the amplified signal into a digital signal, and the DP fine-tunes the offset value of the digital signal according to the first adjustment signal, so as to generate a more accurate gear speed pulse signal.
进一步地,在步骤S5中,根据所述第二调节信号调节任一通道的所述增益值、所述磁场信号和偏移值。Further, in step S5, the gain value, the magnetic field signal and the offset value of any channel are adjusted according to the second adjustment signal.
调节模块130根据第二调节信号对运放模块110的增益值、磁场信号及偏移值进行粗调之后,可以使DP能够捕获到数字信号,进而生成的齿轮的转速脉冲信号更加精准。After the adjustment module 130 roughly adjusts the gain value, magnetic field signal and offset value of the operational amplifier module 110 according to the second adjustment signal, the DP can capture the digital signal, and the speed pulse signal of the gear generated is more accurate.
本发明提供的转速脉冲信号的调节方法,通过对得到的信号进行处理,进而根据处理结果对信号进行调节和反馈,能够有效降低背磁磁场不准确、不均匀等因素对齿轮脉冲信号的影响,使得调节后的齿轮脉冲信号更加准确。The method for adjusting the speed pulse signal provided by the present invention processes the obtained signal and then adjusts and feeds back the signal according to the processing result, which can effectively reduce the influence of factors such as inaccurate and uneven back magnetic field on the gear pulse signal, thereby making the adjusted gear pulse signal more accurate.
下面对本发明提供的齿轮传感器进行描述,下文描述的齿轮传感器与上文描述的转速脉冲信号的调节电路可相互对应参照。The gear sensor provided by the present invention is described below. The gear sensor described below and the regulating circuit of the rotation speed pulse signal described above can be referred to each other.
本发明还提供一种齿轮传感器,用于设置于背磁和齿轮之间,包括如上任一实施例所述的转速脉冲信号的调节电路。The present invention also provides a gear sensor, which is used to be arranged between a back magnet and a gear, and includes a regulating circuit for a rotation speed pulse signal as described in any of the above embodiments.
本发明提供的齿轮传感器,通过对得到的信号进行处理,进而根据处理结果对信号进行调节和反馈,能够有效降低背磁磁场不准确、不均匀等因素对齿轮脉冲信号的影响,使得调节后的齿轮脉冲信号更加准确。The gear sensor provided by the present invention processes the obtained signal and then adjusts and feeds back the signal according to the processing result, which can effectively reduce the influence of factors such as inaccurate and uneven back magnetic field on the gear pulse signal, making the adjusted gear pulse signal more accurate.
下面对本发明提供的数字处理器进行描述,下文描述的数字处理器与上文描述的转速脉冲信号的调节方法可相互对应参照。The digital processor provided by the present invention is described below. The digital processor described below and the method for adjusting the speed pulse signal described above can be referred to each other.
图9是本发明提供的数字处理器的结构示意图,如图9所示,包括:FIG9 is a schematic diagram of the structure of a digital processor provided by the present invention, as shown in FIG9 , comprising:
确定模块901,用于根据至少两个通道的模数转换器发送的齿轮转速的数字信号,确定所述至少两个通道的捕获值,并确定运放模块110中所述至少两个通道的运算放大器的增益值;The determination module 901 is used to determine the captured values of the at least two channels according to the digital signals of the gear speeds sent by the analog-to-digital converters of the at least two channels, and determine the gain values of the operational amplifiers of the at least two channels in the operational amplifier module 110;
第一生成模块902,用于基于捕获阈值,对所述至少两个通道的捕获值和所述增益值进行分析,以生成第一调节信号第二调节信号;所述第二调节信号用于指示调节模块130调整所述至少两个通道的运算放大器的增益值、磁场信号及偏移值;A first generating module 902 is used to analyze the capture values and the gain values of the at least two channels based on a capture threshold value to generate a first adjustment signal and a second adjustment signal; the second adjustment signal is used to instruct the adjustment module 130 to adjust the gain value, magnetic field signal and offset value of the operational amplifier of the at least two channels;
第二生成模块903,用于利用第一调节信号调节数字信号的偏移值,生成所述齿轮的转速脉冲信号。The second generating module 903 is used to adjust the offset value of the digital signal using the first adjusting signal to generate a speed pulse signal of the gear.
在数字处理器运行的过程中,确定模块901根据至少两个通道的模数转换器发送的齿轮转速的数字信号,确定所述至少两个通道的捕获值,并确定运放 模块110中所述至少两个通道的运算放大器的增益值;第一生成模块902基于捕获阈值,对所述至少两个通道的捕获值和所述增益值进行分析,以生成第一调节信号第二调节信号;所述第二调节信号用于指示调节模块130调整所述至少两个通道的运算放大器的增益值、磁场信号及偏移值;第二生成模块903,用于利用第一调节信号调节数字信号的偏移值,生成所述齿轮的转速脉冲信号。During the operation of the digital processor, the determination module 901 determines the capture values of the at least two channels according to the digital signals of the gear speed sent by the analog-to-digital converters of the at least two channels, and determines the gain values of the operational amplifiers of the at least two channels in the operational amplifier module 110; the first generation module 902 analyzes the capture values and the gain values of the at least two channels based on the capture threshold to generate a first adjustment signal and a second adjustment signal; the second adjustment signal is used to instruct the adjustment module 130 to adjust the gain value, magnetic field signal and offset value of the operational amplifiers of the at least two channels; the second generation module 903 is used to use the first adjustment signal to adjust the offset value of the digital signal to generate a speed pulse signal of the gear.
本申请提供的数字处理器,通过对得到的信号进行处理,进而根据处理结果对信号进行调节和反馈,能够有效降低背磁磁场不准确、不均匀等因素对齿轮脉冲信号的影响,使得调节后的齿轮脉冲信号更加准确。The digital processor provided in the present application processes the obtained signal and then adjusts and feeds back the signal according to the processing result, which can effectively reduce the influence of factors such as inaccurate and uneven back magnetic field on the gear pulse signal, making the adjusted gear pulse signal more accurate.
图10是本发明提供的电子设备的结构示意图,如图10所示,该电子设备可以包括:处理器(processor)1010、通信接口(Communications Interface)1020、存储器(memory)1030和通信总线1040,其中,处理器1010,通信接口1020,存储器1030通过通信总线1040完成相互间的通信。处理器1010可以调用存储器1030中的逻辑指令,以执行转速脉冲信号的调节方法,该方法包括:将接收的齿轮传感器的背磁与齿轮之间的多个通道的磁场信号进行放大,以产生放大信号;根据所述放大信号,确定每个所述通道的捕获值和增益值;通过设置捕获阈值,对每个所述通道的捕获值和增益值进行分析,以生成第一调节信号和第二调节信号;根据所述第一调节信号和所述多个通道的放大信号,生成齿轮的转速脉冲信号;根据所述第二调节信号调节任一通道的所述增益值、所述磁场信号和偏移值。FIG10 is a schematic diagram of the structure of an electronic device provided by the present invention. As shown in FIG10 , the electronic device may include: a processor 1010, a communication interface 1020, a memory 1030 and a communication bus 1040, wherein the processor 1010, the communication interface 1020 and the memory 1030 communicate with each other through the communication bus 1040. The processor 1010 may call the logic instructions in the memory 1030 to execute the method for adjusting the speed pulse signal, which method includes: amplifying the magnetic field signals of multiple channels between the back magnet of the gear sensor and the gear received to generate an amplified signal; determining the capture value and gain value of each channel according to the amplified signal; analyzing the capture value and gain value of each channel by setting a capture threshold to generate a first adjustment signal and a second adjustment signal; generating a speed pulse signal of the gear according to the first adjustment signal and the amplified signals of the multiple channels; adjusting the gain value, the magnetic field signal and the offset value of any channel according to the second adjustment signal.
此外,上述的存储器1030中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。In addition, the logic instructions in the above-mentioned memory 1030 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
另一方面,本发明还提供一种计算机程序产品,所述计算机程序产品包括计算机程序,计算机程序可存储在非暂态计算机可读存储介质上,所述计算机程序被处理器执行时,计算机能够执行上述各方法所提供的转速脉冲信号的调节方法,该方法包括:将接收的齿轮传感器的背磁与齿轮之间的多个通道的磁场信号进行放大,以产生放大信号;根据所述放大信号,确定每个所述通道的捕获值和增益值;通过设置捕获阈值,对每个所述通道的捕获值和增益值进行 分析,以生成第一调节信号和第二调节信号;根据所述第一调节信号和所述多个通道的放大信号,生成齿轮的转速脉冲信号;根据所述第二调节信号调节任一通道的所述增益值、所述磁场信号和偏移值。On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the speed pulse signal adjustment method provided by the above methods, which method includes: amplifying the magnetic field signals of multiple channels between the back magnet of the gear sensor and the gear to generate an amplified signal; determining the capture value and gain value of each channel based on the amplified signal; analyzing the capture value and gain value of each channel by setting a capture threshold to generate a first adjustment signal and a second adjustment signal; generating a speed pulse signal of the gear based on the first adjustment signal and the amplified signals of the multiple channels; and adjusting the gain value, the magnetic field signal and the offset value of any channel based on the second adjustment signal.
又一方面,本发明还提供一种非暂态计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现以执行上述各方法提供的转速脉冲信号的调节方法,该方法包括:将接收的齿轮传感器的背磁与齿轮之间的多个通道的磁场信号进行放大,以产生放大信号;根据所述放大信号,确定每个所述通道的捕获值和增益值;通过设置捕获阈值,对每个所述通道的捕获值和增益值进行分析,以生成第一调节信号和第二调节信号;根据所述第一调节信号和所述多个通道的放大信号,生成齿轮的转速脉冲信号;根据所述第二调节信号调节任一通道的所述增益值、所述磁场信号和偏移值。On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the speed pulse signal adjustment method provided by the above-mentioned methods, the method comprising: amplifying the magnetic field signals of multiple channels between the back magnet of the received gear sensor and the gear to generate an amplified signal; determining the capture value and gain value of each of the channels based on the amplified signal; analyzing the capture value and gain value of each of the channels by setting a capture threshold to generate a first adjustment signal and a second adjustment signal; generating a speed pulse signal of the gear based on the first adjustment signal and the amplified signals of the multiple channels; and adjusting the gain value, the magnetic field signal and the offset value of any channel based on the second adjustment signal.
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM/RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

  1. 一种转速脉冲信号的调节电路,应用于齿轮传感器,其特征在于,包括:A speed pulse signal regulating circuit, applied to a gear sensor, is characterized by comprising:
    运放模块(110),用于将接收的齿轮传感器的背磁与齿轮之间的多个通道的磁场信号进行放大,以产生放大信号;An operational amplifier module (110) is used to amplify the received magnetic field signals of multiple channels between the back magnet of the gear sensor and the gear to generate an amplified signal;
    处理模块(120),与所述运放模块(110)连接,所述处理模块(120)根据所述放大信号,确定每个所述通道的捕获值和增益值,并生成第一调节信号和第二调节信号,且根据所述第一调节信号和所述多个通道的放大信号,生成齿轮的转速脉冲信号;A processing module (120) is connected to the operational amplifier module (110), wherein the processing module (120) determines the capture value and gain value of each channel according to the amplified signal, and generates a first adjustment signal and a second adjustment signal, and generates a speed pulse signal of a gear according to the first adjustment signal and the amplified signals of the multiple channels;
    调节模块(130),与所述处理模块(120)、所述运放模块(110)连接,用于根据所述第二调节信号,调节运放模块(110)中任一所述通道的所述增益值、所述磁场信号及偏移值。The adjustment module (130) is connected to the processing module (120) and the operational amplifier module (110), and is used to adjust the gain value, the magnetic field signal and the offset value of any channel in the operational amplifier module (110) according to the second adjustment signal.
  2. 根据权利要求1所述的转速脉冲信号的调节电路,其特征在于,所述调节电路还包括:The speed pulse signal regulating circuit according to claim 1, characterized in that the regulating circuit further comprises:
    磁感应组件(140),所述磁感应组件(140)包括至少三个依次间隔设置的磁感应元件,每个所述磁感应元件用于采集齿轮传感器的背磁与齿轮之间的初始磁场信号;A magnetic induction component (140), the magnetic induction component (140) comprising at least three magnetic induction elements arranged in sequence and spaced apart, each of the magnetic induction elements being used to collect an initial magnetic field signal between a back magnet of a gear sensor and a gear;
    减法模块(150),连接于所述磁感应组件(140)和所述运放模块(110)之间,用于将相邻两个所述磁感应元件采集的所述初始磁场信号相减,生成任一所述通道的磁场信号,并传输至所述运放模块(110)。A subtraction module (150) is connected between the magnetic induction component (140) and the operational amplifier module (110) and is used to subtract the initial magnetic field signals collected by two adjacent magnetic induction elements to generate a magnetic field signal of any one of the channels and transmit the signal to the operational amplifier module (110).
  3. 根据权利要求2所述的转速脉冲信号的调节电路,其特征在于,所述运放模块(110)包括至少两个运算放大器;所述处理模块(120)包括至少两个模数转换器和数字处理器;The speed pulse signal regulating circuit according to claim 2, characterized in that the operational amplifier module (110) includes at least two operational amplifiers; the processing module (120) includes at least two analog-to-digital converters and a digital processor;
    每个所述运算放大器的输出端分别对应与每个所述模数转换器的输入端连接,每个所述模数转换器的输出端分别与所述数字处理器的输入端连接,所述数字处理器的输出端与所述调节模块(130)的输入端连接;The output end of each operational amplifier is respectively connected to the input end of each analog-to-digital converter, the output end of each analog-to-digital converter is respectively connected to the input end of the digital processor, and the output end of the digital processor is connected to the input end of the adjustment module (130);
    所述模数转换器,用于对任一所述通道的所述放大信号进行数字化转换,生成任一所述通道的数字信号,并传输至所述数字处理器;The analog-to-digital converter is used to digitally convert the amplified signal of any of the channels, generate a digital signal of any of the channels, and transmit the digital signal to the digital processor;
    所述数字处理器,用于根据每个所述通道的所述数字信号,确定每个所述通道的所述捕获值和所述增益值,并生成所述第一调节信号和所述第二调节信号,进而通过所述第一调节信号,对每个所述通道 的所述数字信号的偏移值进行调节,以生成齿轮的所述转速脉冲信号。The digital processor is used to determine the capture value and the gain value of each channel according to the digital signal of each channel, and generate the first adjustment signal and the second adjustment signal, and then adjust the offset value of the digital signal of each channel through the first adjustment signal to generate the speed pulse signal of the gear.
  4. 一种转速脉冲信号的调节方法,应用于如权利要求1-3任一项所述转速脉冲信号的调节电路,其特征在于,包括:A method for adjusting a rotation speed pulse signal, applied to a rotation speed pulse signal adjustment circuit as claimed in any one of claims 1 to 3, characterized in that it comprises:
    将接收的齿轮传感器的背磁与齿轮之间的多个通道的磁场信号进行放大,以产生放大信号;Amplifying the received magnetic field signals of multiple channels between the back magnet of the gear sensor and the gear to generate an amplified signal;
    根据所述放大信号,确定每个所述通道的捕获值和增益值;Determining a capture value and a gain value of each of the channels according to the amplified signal;
    通过设置捕获阈值,对每个所述通道的捕获值和增益值进行分析,以生成第一调节信号和第二调节信号;By setting a capture threshold, analyzing the capture value and gain value of each channel to generate a first adjustment signal and a second adjustment signal;
    根据所述第一调节信号和所述多个通道的放大信号,生成齿轮的转速脉冲信号;Generate a speed pulse signal of a gear according to the first adjustment signal and the amplified signals of the multiple channels;
    根据所述第二调节信号调节任一通道的所述增益值、所述磁场信号和偏移值。The gain value, the magnetic field signal and the offset value of any channel are adjusted according to the second adjustment signal.
  5. 根据权利要求4所述的转速脉冲信号的调节方法,其特征在于,在所述齿轮处于开机阶段的情况下,所述第一调节信号包括第一开机调节信号,所述第二调节信号包括第二开机调节信号,所述捕获阈值为第一捕获阈值;The method for adjusting the speed pulse signal according to claim 4 is characterized in that, when the gear is in the startup stage, the first adjustment signal includes a first startup adjustment signal, the second adjustment signal includes a second startup adjustment signal, and the capture threshold is a first capture threshold;
    通过设置捕获阈值,对每个所述通道的捕获值和增益值进行分析,以生成第一调节信号和第二调节信号,包括:By setting a capture threshold, analyzing the capture value and gain value of each channel to generate a first adjustment signal and a second adjustment signal, including:
    在任一所述通道的所述捕获值不小于任一所述通道的所述第一捕获阈值,且任一所述通道的所述增益值不为最小值的情况下,生成所述第一开机调节信号和所述第二开机调节信号;When the capture value of any of the channels is not less than the first capture threshold of any of the channels, and the gain value of any of the channels is not a minimum value, generating the first power-on adjustment signal and the second power-on adjustment signal;
    所述第二开机调节信号用于指示所述调节模块(130)调整任一所述通道的所述增益值和所述磁场信号的偏移值。The second power-on adjustment signal is used to instruct the adjustment module (130) to adjust the gain value of any one of the channels and the offset value of the magnetic field signal.
  6. 根据权利要求5所述的转速脉冲信号的调节方法,其特征在于,在生成所述第二开机调节信号之后,还包括:The method for adjusting the speed pulse signal according to claim 5, characterized in that after generating the second power-on adjustment signal, it further comprises:
    将所述第二开机调节信号发送至所述调节模块(130);Sending the second power-on adjustment signal to the adjustment module (130);
    接收任一所述通道的新的捕获值,直至所述新的捕获值小于所述第一捕获阈值,以确定所述任一通道的数字信号的偏移值;receiving a new capture value of any of the channels until the new capture value is less than the first capture threshold, so as to determine an offset value of the digital signal of any of the channels;
    根据所述偏移值,确定任一所述通道的第一目标捕获值。A first target capture value of any of the channels is determined according to the offset value.
  7. 根据权利要求6所述的转速脉冲信号的调节方法,其特征在于,在齿轮处于校准阶段的情况下,所述第一调节信号包括第一校准调节信号,所述第二调节信号包括第二校准调节信号和第三校准调节信号,所述捕获阈值为第二捕获阈值,所述通道包括第一通道和第二通道,所述捕获值包括:第一通道的第一捕获值,以及第二通道的第 二捕获值;所述增益值包括:所述第一通道的第一增益值,以及第二通道的第二增益值;The method for adjusting the speed pulse signal according to claim 6 is characterized in that, when the gear is in the calibration stage, the first adjustment signal includes a first calibration adjustment signal, the second adjustment signal includes a second calibration adjustment signal and a third calibration adjustment signal, the capture threshold is a second capture threshold, the channel includes a first channel and a second channel, the capture value includes: a first capture value of the first channel, and a second capture value of the second channel; the gain value includes: a first gain value of the first channel, and a second gain value of the second channel;
    通过设置捕获阈值,对每个所述通道的捕获值和增益值进行分析,以生成第一调节信号和第二调节信号,包括:By setting a capture threshold, analyzing the capture value and gain value of each channel to generate a first adjustment signal and a second adjustment signal, including:
    在确定所述第一捕获值达到峰值,且所述第二捕获值达到峰值的情况下,确定所述第一增益值,以及所述第二增益值;In the case where it is determined that the first captured value reaches a peak value and the second captured value reaches a peak value, determining the first gain value and the second gain value;
    在确定所述第一增益值与所述第二增益值之差大于1的情况下,调节所述运放模块(110)的标志位,并生成所述第一校准调节信号和第二校准调节信号;所述第二校准调节信号,用于指示所述调节模块(130)调整目标运算放大器的增益值,所述目标运算放大器是基于所述第一增益值和所述第二增益值确定的;When it is determined that the difference between the first gain value and the second gain value is greater than 1, the flag bit of the operational amplifier module (110) is adjusted, and the first calibration adjustment signal and the second calibration adjustment signal are generated; the second calibration adjustment signal is used to instruct the adjustment module (130) to adjust the gain value of a target operational amplifier, and the target operational amplifier is determined based on the first gain value and the second gain value;
    在确定所述第一捕获值和所述第二捕获值中任一值未达到峰值,且所述任一值不小于所述第二捕获阈值的情况下,生成所述第三校准调节信号;所述第三校准调节信号,用于指示所述调节模块(130)调整与所述任一值相对应的运算放大器的增益值。When it is determined that any one of the first capture value and the second capture value has not reached a peak value and any one of the values is not less than the second capture threshold, the third calibration adjustment signal is generated; the third calibration adjustment signal is used to instruct the adjustment module (130) to adjust the gain value of the operational amplifier corresponding to any one of the values.
  8. 根据权利要求7所述的转速脉冲信号的调节方法,其特征在于,在确定所述第一捕获值和所述第二捕获值中任一值未达到峰值的情况下,所述第一调节信号包括第四校准调节信号;The method for adjusting the speed pulse signal according to claim 7, characterized in that, when it is determined that any one of the first captured value and the second captured value has not reached a peak value, the first adjustment signal includes a fourth calibration adjustment signal;
    所述通过设置捕获阈值,对每个所述通道的捕获值和增益值进行分析,以生成第一调节信号,还包括:The method of setting a capture threshold and analyzing the capture value and gain value of each channel to generate a first adjustment signal further includes:
    若所述第一捕获值和所述第二捕获值均小于所述第二捕获阈值,则根据所述任一值的极差值,生成第四校准调节信号,所述第四校准调节信号,用于调节与所述任一值对应的通道的数字信号的偏移值。If the first capture value and the second capture value are both less than the second capture threshold, a fourth calibration adjustment signal is generated according to the extreme value of any of the values, and the fourth calibration adjustment signal is used to adjust the offset value of the digital signal of the channel corresponding to any of the values.
  9. 根据权利要求7或8所述的转速脉冲信号的调节方法,其特征在于,在所述齿轮处于运行阶段的情况下,所述第一调节信号包括第一运行调节信号,所述第二调节信号包括第二运行调节信号,所述捕获阈值为第三捕获阈值;The method for adjusting the speed pulse signal according to claim 7 or 8, characterized in that, when the gear is in the running stage, the first adjustment signal includes a first running adjustment signal, the second adjustment signal includes a second running adjustment signal, and the capture threshold is a third capture threshold;
    通过设置捕获阈值,对每个所述通道的捕获值和增益值进行分析,以生成第一调节信号和第二调节信号,包括:By setting a capture threshold, analyzing the capture value and the gain value of each channel to generate a first adjustment signal and a second adjustment signal, including:
    将所述任一通道的捕获值与所述第三捕获阈值进行对比,确定所述任一通道的目标次数,所述目标次数用于指示所述任一通道的捕获值不小于所述第三捕获阈值的次数;Comparing the capture value of any one of the channels with the third capture threshold, determining a target number of times for any one of the channels, the target number of times being used to indicate the number of times the capture value of any one of the channels is not less than the third capture threshold;
    在所述任一通道的捕获值不小于所述第三捕获阈值,且目标次数大于预设次数的情况下,生成所述第一运行调节信号和所述第二运行 调节信号;When the capture value of any of the channels is not less than the third capture threshold value and the target number of times is greater than a preset number of times, the first operation adjustment signal and the second operation adjustment signal are generated;
    所述第二运行调节信号,用于指示所述调节模块(130)调整所述任一通道的所述增益值。The second operation adjustment signal is used to instruct the adjustment module (130) to adjust the gain value of any one of the channels.
  10. 根据权利要求9所述的转速脉冲信号的调节方法,其特征在于,在所述生成所述第一运行调节信号和第二运行调节信号之后,还包括:The method for adjusting the speed pulse signal according to claim 9, characterized in that after generating the first operation adjustment signal and the second operation adjustment signal, it further comprises:
    将所述第二运行调节信号发送至所述调节模块(130);sending the second operation adjustment signal to the adjustment module (130);
    接收所述任一通道的新的捕获值,直至所述新的捕获值小于所述第三捕获阈值,确定所述任一通道的偏移值;receiving a new capture value of any one of the channels until the new capture value is less than the third capture threshold, and determining an offset value of any one of the channels;
    根据所述偏移值,确定所述任一通道的第二目标捕获值。A second target capture value of any one of the channels is determined according to the offset value.
PCT/CN2022/143272 2022-12-02 2022-12-29 Rotational-speed pulse signal adjustment circuit and method WO2024113451A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211542758.9 2022-12-02
CN202211542758.9A CN115951087A (en) 2022-12-02 2022-12-02 Regulating circuit and method for rotating speed pulse signal

Publications (1)

Publication Number Publication Date
WO2024113451A1 true WO2024113451A1 (en) 2024-06-06

Family

ID=87289840

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/143272 WO2024113451A1 (en) 2022-12-02 2022-12-29 Rotational-speed pulse signal adjustment circuit and method

Country Status (2)

Country Link
CN (1) CN115951087A (en)
WO (1) WO2024113451A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110298447A1 (en) * 2010-06-03 2011-12-08 Allegro Microsystems, Inc. Motion Sensor, Method, and Computer-Readable Storage Medium Providing a Motion Sensor with a State Processor Having a Reduced Amount of State Chatter
CN103528625A (en) * 2013-10-18 2014-01-22 无锡乐尔科技有限公司 Gear sensor
CN110864709A (en) * 2018-08-27 2020-03-06 鑫雁电子科技(上海)有限公司 Self-adaptive differential input Hall circuit
CN210441810U (en) * 2019-08-09 2020-05-01 泰科电子科技(苏州工业园区)有限公司 Displacement sensor capable of resisting magnetic field interference, motor assembly and gearbox
CN113238070A (en) * 2021-05-19 2021-08-10 南京高华科技股份有限公司 Sensor for measuring reciprocating rotation speed of hydraulic motor
CN115060353A (en) * 2022-06-10 2022-09-16 西安水木芯邦半导体设计有限公司 Method and system for detecting vibration of target object by using magnetic field sensor

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110298447A1 (en) * 2010-06-03 2011-12-08 Allegro Microsystems, Inc. Motion Sensor, Method, and Computer-Readable Storage Medium Providing a Motion Sensor with a State Processor Having a Reduced Amount of State Chatter
CN103528625A (en) * 2013-10-18 2014-01-22 无锡乐尔科技有限公司 Gear sensor
CN110864709A (en) * 2018-08-27 2020-03-06 鑫雁电子科技(上海)有限公司 Self-adaptive differential input Hall circuit
CN210441810U (en) * 2019-08-09 2020-05-01 泰科电子科技(苏州工业园区)有限公司 Displacement sensor capable of resisting magnetic field interference, motor assembly and gearbox
CN113238070A (en) * 2021-05-19 2021-08-10 南京高华科技股份有限公司 Sensor for measuring reciprocating rotation speed of hydraulic motor
CN115060353A (en) * 2022-06-10 2022-09-16 西安水木芯邦半导体设计有限公司 Method and system for detecting vibration of target object by using magnetic field sensor

Also Published As

Publication number Publication date
CN115951087A (en) 2023-04-11

Similar Documents

Publication Publication Date Title
US7795967B2 (en) AGC circuit
JP5427658B2 (en) Comparator offset correction device
US7218258B2 (en) Method and system for mixed analog-digital automatic gain control
US6900750B1 (en) Signal conditioning system with adjustable gain and offset mismatches
US20060238253A1 (en) Sensitivity switchable detection circuit and method
US9350370B2 (en) Sensor signal processing apparatus and sensor apparatus
JP6372623B2 (en) Switching power supply device and error correction method
CN109654125B (en) Displacement correction device, magnetic suspension bearing system and displacement correction method thereof
US20030178989A1 (en) Magnetic gear tooth sensor with hall cell detector
WO2024113451A1 (en) Rotational-speed pulse signal adjustment circuit and method
JP2543177B2 (en) Clamping device and automatic gain control device
JP2003050270A (en) Output correction method of magnetic sensor and its correction circuit
US20060071841A1 (en) Automatic gain control system and method
JP6550675B2 (en) Pulse height analyzer
JP5277492B2 (en) AD converter
CN109618270B (en) Microphone input offset calibration method and microphone offset device
US7876173B2 (en) Signal output device, signal output control method, program and recording medium
JP6389161B2 (en) Sensor interface calibration device
CN112986873B (en) Signal processing circuit and signal processing method for Hall sensor
WO2021205942A1 (en) Signal processing circuit and load detection device
JP2004320553A (en) Compensating circuit
CN108519115B (en) Offset voltage correction method applied to Hall device
JP3413793B2 (en) Cascade A / D converter
JP2812132B2 (en) Multiplication circuit with calibration function
JP3950793B2 (en) Digital / analog conversion method and apparatus