CN115684870A - Constant current source loop with self-calibration function and self-calibration method thereof - Google Patents

Constant current source loop with self-calibration function and self-calibration method thereof Download PDF

Info

Publication number
CN115684870A
CN115684870A CN202211120434.6A CN202211120434A CN115684870A CN 115684870 A CN115684870 A CN 115684870A CN 202211120434 A CN202211120434 A CN 202211120434A CN 115684870 A CN115684870 A CN 115684870A
Authority
CN
China
Prior art keywords
duty ratio
output
digital waveform
current
circuit
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202211120434.6A
Other languages
Chinese (zh)
Inventor
马伟东
吴胜华
杨春瑜
田海波
王丹麟
许天骄
张楠帧
刘斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Guodian Nanzi Weimeide Automation Co ltd
Original Assignee
Nanjing Guodian Nanzi Weimeide Automation Co ltd
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 Nanjing Guodian Nanzi Weimeide Automation Co ltd filed Critical Nanjing Guodian Nanzi Weimeide Automation Co ltd
Priority to CN202211120434.6A priority Critical patent/CN115684870A/en
Publication of CN115684870A publication Critical patent/CN115684870A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a constant current source loop with a self-calibration function and a self-calibration method thereof, wherein the method comprises the following steps: the PWM wave generation current drive circuit is connected with the current load circuit for driving self-calibration and generates output current load voltage; the output current load voltage is sent into a high/low limit comparison circuit, and is compared with the high/low limit comparison reference voltage sent by the high/low limit comparison reference voltage circuit in the comparison circuit and a digital waveform is output; the comparison output digital waveform is sent to the comparison loop to output the digital waveform duty ratio detection loop to detect the waveform duty ratio, and the detected duty ratio is sent to the current drive PWM wave generation and duty ratio regulation loop.

Description

Constant current source loop with self-calibration function and self-calibration method thereof
Technical Field
The invention relates to a constant current source loop with a self-calibration function and a self-calibration method thereof, belonging to the technical field of industrial control.
Background
In industrial process control, especially in continuous processes, it is often required to control some physical quantities such as temperature, pressure, flow rate, etc. These physical quantities are all continuously variable over time. These physical quantities that change continuously with time are called analog quantities in the control domain.
The current signal has strong anti-interference capability, is not easy to be interfered by external factors and can be remotely transmitted, so the current signal is more applied to industrial sensors. Because the distance between the site and the control room is far, when the ground resistance of the connecting wire is large, if the voltage source signal is used for remote transmission, a large error is generated due to the voltage division of the wire resistance and the input resistance of the receiving instrument, and the constant current source signal is used for remote transmission, as long as the transmission loop is not branched, the current in the loop cannot change along with the length of the wire, thereby ensuring the transmission precision.
The generation industry of the driving current signal generally uses various ways, such as using a dedicated digital-to-analog conversion chip device capable of directly generating a current signal, building a current output loop using a discrete element, using a PWM wave to cooperate with the discrete element to realize current output, and the like.
The current driving output is realized by the design of generating a current loop through PWM waves by using the PWM waves, and the current driving output is widely applied due to the characteristics of low cost and simple principle, the precision can reach 0.1 level generally, and the current driving output can meet most industrial application occasions.
However, the initial accuracy of the PWM wave generation current loop is too high to directly meet the design accuracy requirement, the loop is calibrated before shipping, the loop records and stores the internal parameter value (usually, PWM wave duty ratio) meeting the accuracy requirement, and the internal parameter value is used to output the current signal in the subsequent operation, so as to meet the output design requirement. For example: the precision requirement of a certain PWM wave generation current loop is 0.1 level, but the output precision of the device after factory welding is only 0.2 level, and the device does not meet the 0.1 level requirement, and zero and full degree calibration needs to be carried out on the output of the device so that the output precision meets the 0.1 level requirement.
For how to guarantee the output accuracy of the circuit, the following method is generally used in the industry:
1. when the circuit is designed, a high-precision component with the magnitude order higher than the design precision requirement is used for building the circuit, and the initial precision of the module, the device and the like after the production can meet the design requirement without extra calibration operation. However, the design circuit has the characteristics of high design difficulty level, high precision level of required components, good consistency and high cost.
2. The initial precision of the loop leaving factory exceeds the precision requirement limit, the duty ratio of the PWM wave is changed through manual fine adjustment, when the precision of the output signal crosses the precision requirement range, the duty ratio of the PWM wave signal at the moment is recorded, the zero degree and the full degree are respectively operated, and the recorded duty ratio of the zero degree and the full degree is used as the duty ratio reference value of the zero degree and the full degree in the subsequent loop working process, so that the loop meeting the precision requirement can be obtained. Such operation requires manual calibration of the loop when leaving the factory to meet the design accuracy requirement, and after years of field use, the current output accuracy will exceed the limit again due to aging of parts in the loop and accuracy change.
Disclosure of Invention
The invention aims to overcome the defects in the prior art, provides a constant current source loop with a self-calibration function and a self-calibration method thereof, and solves the technical problem.
In order to achieve the purpose, the invention is realized by adopting the following technical scheme:
in a first aspect, the present invention provides a constant current source circuit with self-calibration function, including:
the PWM wave generation current driving loop is connected with the current driving PWM wave generation and duty ratio regulation loop and is used for generating driving current and sending the driving current to the self-calibration current load loop;
the self-calibration current load loop is connected with the PWM wave generation current drive loop and used for receiving the drive current, generating output current load voltage and sending the output current load voltage to the high/low limit comparison loop;
the high/low limit comparison loop is connected with the self-calibration current load loop and used for receiving the output current load voltage, comparing the output current load voltage with the high/low limit comparison reference voltage sent by the high/low limit comparison reference voltage loop and outputting a digital waveform to the comparison loop to output a digital waveform duty ratio detection loop;
the high/low limit comparison reference voltage loop is connected with the high/low limit comparison loop and used for generating high/low limit comparison reference voltage and sending the high/low limit comparison reference voltage to the high/low limit comparison loop;
the comparison circuit outputs a digital waveform duty ratio detection circuit, is connected with the high/low limit comparison circuit and is used for receiving a digital waveform, detecting the duty ratio of the digital waveform and sending the detected digital waveform duty ratio into a current drive PWM wave generation and duty ratio regulation circuit;
the current driving PWM wave generation and duty ratio regulation loop is connected with the comparison loop output digital waveform duty ratio detection loop and used for detecting the digital waveform duty ratio, comparing the digital waveform duty ratio with a preset digital waveform duty ratio reference value and regulating the PWM wave duty ratio generated by the current driving PWM wave generation and output by the duty ratio regulation loop according to a comparison difference value so as to change the magnitude of the driving current and further change the digital waveform duty ratio output by the comparison loop until the digital waveform duty ratio reaches the digital waveform duty ratio reference value range.
In a second aspect, the present invention provides a self-calibration method for a constant current source loop with a self-calibration function, including:
the PWM wave generation current driving circuit generates driving current and sends the driving current to the self-calibration current load circuit;
receiving the driving current from the current load loop for calibration, generating output current load voltage and sending the output current load voltage to the high/low limit comparison loop;
the high/low limit comparison circuit receives the output current load voltage and compares the output current load voltage with the high/low limit comparison reference voltage sent by the high/low limit comparison reference voltage circuit, and outputs a digital waveform to the comparison circuit to output a digital waveform duty ratio detection circuit;
the comparison circuit outputs a digital waveform duty ratio detection circuit to receive the digital waveform, detect the duty ratio of the digital waveform and send the detected digital waveform duty ratio into a current drive PWM wave generation and duty ratio regulation circuit;
the current driving PWM wave generation and duty ratio regulation circuit receives the digital waveform duty ratio and compares the digital waveform duty ratio with a preset digital waveform duty ratio reference value, and the current driving PWM wave generation and duty ratio regulation circuit outputs the PWM wave duty ratio according to the comparison result, so that the driving current is changed, the comparison circuit is changed to output the digital waveform duty ratio until the digital waveform duty ratio reaches the digital waveform duty ratio reference value range.
Further, the driving current generated by the PWM wave generating current driving circuit is a direct current, and exhibits a saw-tooth wave-like/sine wave characteristic having the same frequency as the PWM wave near an effective value of the output current;
the output current load voltage is direct current voltage, and the output current load voltage shows sawtooth wave-like/sine wave-like characteristics with the same frequency as the PWM wave near the effective voltage value.
Further, the high/low limit comparison loop receives the output current load voltage and compares the output current load voltage with the high/low limit comparison reference voltage sent by the high/low limit comparison reference voltage loop to output a digital waveform, including:
when the output current load voltage is smaller than the high/low limit comparison reference voltage, the high/low limit comparison loop outputs logic low voltage;
when the output current load voltage is greater than the high/low limit comparison reference voltage, the high/low limit comparison loop outputs logic high voltage;
when the wave crest or the wave trough of the sawtooth wave/sine wave of the output current load voltage is far away from the high/low limit comparison reference voltage, the output of the high/low limit comparison loop is in a single level form;
when the wave crest or the wave trough of the quasi-sawtooth wave/sine wave of the output current load voltage crosses the high/low limit comparison reference voltage from a certain direction, the output of the high/low limit comparison loop shows an inversion form, at the moment, in one period of the quasi-sawtooth wave/sine wave, the output of the high/low limit comparison loop is subjected to level inversion twice, the high/low limit comparison loop outputs a digital waveform, and the digital waveform output by the high/low limit comparison loop has different duty ratios according to the difference of the amplitude/duration of the output current load voltage when the wave crest or the wave trough crosses the comparison reference voltage.
Further, the high/low limit comparison reference voltage sent by the high/low limit comparison reference voltage loop includes:
the lower limit comparison reference voltage value is the product of the lower limit theoretical value of the driving output current and the current load for self-calibration;
the high-limit comparison reference voltage value is the product of the driving output current high-limit theoretical value and the self-calibration current load.
Furthermore, the comparison circuit outputs a digital waveform duty ratio detection circuit to receive the digital waveform, and when the digital waveform duty ratio is detected, the digital waveform is subjected to jitter elimination and filtering, and multi-cycle detection is performed to obtain more accurate duty ratio data.
Further, the current-driven PWM wave generation and duty ratio regulation circuit receives the digital waveform duty ratio and compares the digital waveform duty ratio with a preset digital waveform duty ratio reference value, and regulates the PWM wave duty ratio output by the current-driven PWM wave generation and duty ratio regulation circuit according to the comparison result, so as to change the magnitude of the driving current, and further change the digital waveform duty ratio output by the comparison circuit until the digital waveform duty ratio reaches the digital waveform duty ratio reference value range, including:
the current drive PWM wave generation and duty ratio regulation circuit compares the actual value of the duty ratio of the digital waveform output by the comparison circuit with the reference value of the duty ratio of the digital waveform output by the comparison circuit corresponding to the high/low limit drive current, calculates the difference value, and if the difference value is larger than the preset threshold value, regulates and changes the duty ratio of the current drive PWM wave in a stepping mode to change the effective value of the output of the drive current, thereby changing the difference value of two input ends of the comparator, and changing the duty ratio of the comparison output digital waveform until the duty ratio of the digital waveform output by the comparison circuit reaches the reference value range of the duty ratio of the digital waveform output by the comparison circuit.
Furthermore, the generation of the current-driven PWM wave and the adjustment of the duty ratio of the current-driven PWM wave by the duty ratio adjusting circuit adopt a stepping mode, and the magnitude of the stepping value and the magnitude of the deviation of the actual value of the digital waveform duty ratio output by the comparing circuit from the reference value of the digital waveform duty ratio output by the comparing circuit are in a positive correlation.
Further, after the comparison circuit outputs the digital waveform duty ratio to reach the reference value range of the comparison circuit output digital waveform duty ratio, the current drive PWM wave duty ratio at the moment is stored, and the stored current drive PWM wave duty ratio is used as the high/low limit current output duty ratio in the subsequent work.
Furthermore, each design case needs to use a plurality of data samples according to the actual loop to obtain a comparison loop output digital waveform duty ratio reference value which meets the final design precision requirement, and the reference value is used for calibrating other cases designed with the design case.
Compared with the prior art, the invention has the following beneficial effects:
the invention provides a constant current source loop with a self-calibration function and a self-calibration method thereof, which can realize the factory self-calibration function of the loop without manually and finely adjusting the duty ratio of a PWM wave, so that the loop can meet the requirement of design precision when being delivered; meanwhile, if the circuit needs to be calibrated secondarily when the circuit is used in an engineering field, the calibration can be automatically completed only by installing a simple driving current external self-calibration load circuit, complex manual stepping calibration operation is not needed, and the durability of the output precision of the circuit can be kept.
Drawings
FIG. 1 is a schematic view of the drive current generated by a PWM wave, both in whole and in partial enlargement;
FIG. 2 is a diagram illustrating a calibration method of a PWM wave generation driving current loop commonly used in the prior art;
FIG. 3 is a schematic diagram of a self-calibration design and implementation of a PWM wave generation circuit of the present invention;
fig. 4 is a schematic diagram illustrating implementation of a constant current source loop having a self-calibration function and a calibration method thereof according to an embodiment of the present invention.
Detailed Description
The invention is further described below with reference to the accompanying drawings. The following examples are only for illustrating the technical solutions of the present invention more clearly, and the protection scope of the present invention is not limited thereby.
Example 1
As shown in fig. 4, the present embodiment introduces a constant current source circuit having a self-calibration function, including:
the PWM wave generation current driving loop is connected with the current driving PWM wave generation and duty ratio regulation loop and is used for generating driving current and sending the driving current to the self-calibration current load loop;
the self-calibration current load loop is connected with the PWM wave generation current drive loop and used for receiving the drive current, generating output current load voltage and sending the output current load voltage to the high/low limit comparison loop;
the high/low limit comparison circuit is connected with the self-calibration current load circuit and used for receiving the output current load voltage, comparing the output current load voltage with high/low limit comparison reference voltage sent by the high/low limit comparison reference voltage circuit and outputting a digital waveform to the comparison circuit to output a digital waveform duty ratio detection circuit;
the high/low limit comparison reference voltage loop is connected with the high/low limit comparison loop and used for generating high/low limit comparison reference voltage and sending the high/low limit comparison reference voltage to the high/low limit comparison loop;
the comparison circuit outputs a digital waveform duty ratio detection circuit, is connected with the high/low limit comparison circuit and is used for receiving a digital waveform, detecting the duty ratio of the digital waveform and sending the detected digital waveform duty ratio into a current drive PWM wave generation and duty ratio regulation circuit;
the current driving PWM wave generation and duty ratio regulation loop is connected with the comparison loop output digital waveform duty ratio detection loop and used for receiving the digital waveform duty ratio, comparing the digital waveform duty ratio with a preset digital waveform duty ratio reference value, and regulating the current driving PWM wave generation and duty ratio output by the duty ratio regulation loop according to a comparison result so as to change the magnitude of the driving current and further change the digital waveform duty ratio output by the comparison loop until the digital waveform duty ratio reaches the digital waveform duty ratio reference value range.
Example 2
As shown in fig. 4, the present embodiment provides a self-calibration method of a constant current source loop having a self-calibration function according to embodiment 1, including:
the PWM wave generation current driving circuit generates a driving current and sends the driving current to the self-calibration current load circuit;
receiving the driving current from the current load loop for calibration, generating an output current load voltage and sending the output current load voltage to the high/low limit comparison loop;
the high/low limit comparison loop receives the output current load voltage and compares the output current load voltage with the high/low limit comparison reference voltage sent by the high/low limit comparison reference voltage loop, and outputs a digital waveform to the comparison loop to output a digital waveform duty ratio detection loop;
the comparison circuit outputs a digital waveform duty ratio detection circuit to receive the digital waveform, detects the digital waveform duty ratio and sends the detected digital waveform duty ratio into a current drive PWM wave generation and duty ratio regulation circuit;
the current driving PWM wave generation and duty ratio regulation circuit receives the digital waveform duty ratio and compares the digital waveform duty ratio with a preset digital waveform duty ratio reference value, and the current driving PWM wave generation and duty ratio regulation circuit outputs the PWM wave duty ratio according to the comparison result, so that the driving current is changed, the comparison circuit is changed to output the digital waveform duty ratio until the digital waveform duty ratio reaches the digital waveform duty ratio reference value range.
The self-calibration method of the constant current source loop with the self-calibration function provided by the embodiment specifically relates to the following steps:
the PWM wave generation current driving loop is connected with the current load loop for driving self-calibration and generates output current load voltage; the output current load voltage is sent into a high/low limit comparison circuit, and is compared with the high/low limit comparison reference voltage sent by the high/low limit comparison reference voltage circuit in the comparison circuit and a digital waveform is output; and the comparison output digital waveform is sent into a comparison circuit to output a digital waveform duty ratio detection circuit to detect the waveform duty ratio, and the detected duty ratio is sent into a current drive PWM wave generation and duty ratio regulation circuit.
The drive current generated by the PWM wave generation current drive circuit appears as a direct current, but it appears as a sawtooth-like wave/sine wave characteristic having the same frequency as the PWM wave in the vicinity of the effective value of the output current.
The drive current output generated by the PWM wave generation current drive circuit drives a self-calibration current load circuit, and generates an output current load voltage on the load circuit.
Although the output current load voltage is expressed as a direct-current voltage, the output current load voltage exhibits a sawtooth-like wave/sine wave characteristic having the same frequency as a PWM wave in the vicinity of the effective value of the voltage.
The output current load voltage is sent into a high/low limit comparison circuit, and is compared with the high/low limit comparison reference voltage sent by the high/low limit comparison reference voltage circuit in the comparison circuit;
when the output current load voltage is smaller than the high/low limit comparison reference voltage, the comparison loop outputs logic low (high) voltage;
when the output current load voltage is larger than the high/low limit comparison reference voltage, the comparison loop outputs logic high (low) voltage;
the high/low limit comparison reference voltage output by the high/low limit comparison reference voltage loop is as follows:
lower limit comparison reference voltage value: the product of the lower limit theoretical value of the driving output current and the current load for self-calibration.
High-limit comparison reference voltage value: the product of the driving output current upper limit theoretical value and the self-calibration current load.
When the wave crest or the wave trough of the sawtooth wave/sine wave of the output current load voltage is far away from the high/low limit comparison reference voltage, the output of the high/low limit comparison loop is in a single level form.
When the wave crest or the wave trough of the quasi-sawtooth wave/sine wave of the output current load voltage crosses the high/low limit comparison reference voltage from a certain direction, the output of the high/low limit comparison loop shows an inversion form, and at the moment, the output of the high/low limit comparison loop is subjected to level inversion twice in one period of the quasi-sawtooth wave/sine wave. Therefore, eventually, the high/low limit comparison loop output appears as a digital waveform (also typically in the form of a PWM waveform). According to the amplitude of the output current load voltage, the wave crest or the wave trough of the sawtooth-like wave/sine wave crosses the comparison reference voltage, the digital waveform output by the high/low limit comparison loop has different duty ratios.
The comparison loop outputs a digital waveform duty ratio detection loop to detect and calculate the duty ratio of the digital waveform from the high/low limit comparison loop, and the duty ratio value is sent to a current drive PWM wave generation and duty ratio regulation loop.
The measurement and calculation process of the duty cycle by the duty cycle detection loop usually requires the algorithm assistance of the processor, for example: jitter elimination and filtering of the burr signals, multi-period measurement of the digital waveform to obtain more accurate duty ratio data and the like;
the current drive PWM wave generation and duty ratio regulation circuit compares the actual value of the duty ratio of the digital waveform output by the comparison circuit with the reference value of the duty ratio of the digital waveform output by the comparison circuit corresponding to the high/low limit drive current, if the difference value between the actual value and the reference value of the duty ratio of the digital waveform output by the comparison circuit is too large, the duty ratio of the current drive PWM wave is correspondingly regulated to change the effective value of the output drive current, so that the difference value of the two input ends of the comparator is changed, and the duty ratio of the digital waveform output by the comparison circuit is changed until the duty ratio of the digital waveform output by the comparison circuit reaches the reference value range of the duty ratio of the digital waveform output by the comparison circuit. And storing the current driving PWM wave duty ratio at the moment, namely obtaining the high/low limit current driving PWM wave duty ratio value of a certain example individual (module, device and system), and using the stored current driving PWM wave duty ratio value as the high/low limit current output duty ratio value when the example individual works subsequently.
The drive current output generated by the PWM wave generation current drive circuit with different design schemes has different sawtooth wave/sine wave-like characteristics near the effective value, so that output current load voltages with different characteristics are generated on the self-calibration current load circuit, compared output digital waveforms with different characteristics are output by the high/low limit comparison circuit, and finally different compared circuit output digital waveform duty ratio reference values are expressed under the condition of meeting the design requirements of each circuit case.
Each design case needs to use a plurality of data samples according to the actual loop to obtain a comparison loop output digital waveform duty ratio reference value which meets the final design requirement of the design case, and the reference value is used for calibrating other cases designed.
Different example individuals under the design of the PWM wave generation current driving loop also have different sawtooth wave/sine wave-like characteristics, but the characteristic difference can usually meet the requirement of using a fixed comparison loop to output a digital waveform duty ratio reference value so as to meet the design precision requirement of all the example individuals. If the design precision level is high, the individual difference of different examples under the same design scheme causes that the individual precision of all examples cannot be guaranteed to meet the design requirement by using a fixed comparison loop to output a digital waveform duty ratio reference value, and at the moment, the self-calibration scheme is not suitable for the scheme design.
The current drive PWM wave generation and duty ratio regulation loop regulates the duty ratio of the current drive PWM wave generally in a stepping mode.
When the actual value of the duty ratio of the digital waveform output by the comparison circuit deviates from the reference value of the duty ratio of the digital waveform output by the comparison circuit to be larger, a larger step value can be adopted for the duty ratio adjustment of the current-driven PWM wave, so that the actual value of the duty ratio of the digital waveform output by the comparison circuit is quickly close to the reference value of the duty ratio of the digital waveform output by the comparison circuit.
When the actual value of the duty ratio of the digital waveform output by the comparison circuit deviates from the reference value of the duty ratio of the digital waveform output by the comparison circuit and is smaller, a smaller step value can be adopted for the duty ratio adjustment of the current-driven PWM wave, so that the actual value of the duty ratio of the digital waveform output by the comparison circuit is closer to the reference value of the duty ratio of the digital waveform output by the comparison circuit more finely. So as to finally obtain a more accurate reference value of the duty ratio of the current-driven PWM wave.
Some example individual self-calibration procedure:
firstly, the control current drives the PWM wave generation and the duty ratio regulation loop to generate current output far away from the theoretical value of the high/low limit driving current, and at the moment, the comparison loop compares and outputs the duty ratio reference value of the digital waveform when the digital waveform does not oscillate or the duty ratio is far away from the comparison loop when the digital waveform oscillates.
And then, regulating and controlling the current to drive the PWM wave duty ratio output in a stepping mode, so that the comparison output digital waveform of the comparison loop oscillates and the duty ratio of the comparison output digital waveform is changed.
And then keeping and adopting a stepping mode to adjust and control the output of the current drive PWM wave duty ratio until the comparison output digital waveform of the comparison loop oscillates and the actual duty ratio value reaches the reference value of the comparison output digital waveform of the comparison loop, and recording and storing the current control current drive PWM wave duty ratio.
At this point, the self-calibration process is complete.
Finally, in the subsequent operation of the individual in the embodiment, the stored control current driving PWM wave duty ratio is used as the high/low limit driving current output duty ratio.
The contents designed in the above embodiments will be described below with reference to a preferred embodiment.
As shown in fig. 1, the drive current generated by the PWM wave generation current drive circuit appears as a direct current, but it appears as a sawtooth-like wave/sine wave characteristic having the same frequency as the PWM wave in the vicinity of the effective value of the output current. The PWM wave generating current drive circuit with different design schemes generates drive current output with different sawtooth wave/sine wave-like characteristics near the effective value. It may be a more regular triangle wave, sawtooth wave, sine wave, etc., depending on the circuit design, but with the same waveform period as the PWM wave.
As shown in fig. 2, in a calibration method for a driving current loop generated by PWM waves commonly used in the prior art, a pre-set PWM duty ratio is set and output (53.3% in the figure) in an individual loop example, at this time, the actual driving current output is measured, usually, the precision is out of limit, and at this time, the PWM duty ratio needs to be manually adjusted and it needs to be manually determined when the actual output current value meets the design precision requirement. If the actual output current value is larger than the output theoretical value, the PWM wave output duty ratio is generally required to be reduced in principle; if the actual output current value is smaller than the output theoretical value, the PWM wave output duty ratio is generally increased in principle; the adjustment is usually performed for many times, so that the actual output current value gradually approaches the theoretical value until the final current output value meets the precision range and is as close to the theoretical output value as possible, the duty ratio (40% in the legend) of the PWM wave at the moment is recorded and stored, and the current output precision can be ensured by reading and using the recorded PWM wave as the reference value when the instance individual is powered on to work at each subsequent time.
As shown in fig. 3, the PWM wave generating circuit generates a PWM wave and sends the PWM wave to the PWM wave generating driving current circuit, the PWM wave generating driving current circuit generates a dc current output, and assuming that the current output expected value in the illustrated embodiment is 100ma, the PWM generating driving current circuit superposes sawtooth waves with a peak-to-peak value of 0.5mA when the driving current output has a current value of 100mA, that is, the current output theoretical value is close to 99.75mA to 100.25mA in trough and peak. The driving current drives the self-calibration load, which has a resistance of 100 ohms in the illustrated embodiment, so that the theoretical voltage generated at the self-calibration load resistance is 10V, and the voltage generated at the self-calibration load resistance also exhibits a sawtooth waveform due to the presence of the current output sawtooth waveform, with the theoretical voltage having troughs and peaks close to 9.975V and 10.025V.
The comparison reference voltage value generated by the comparison reference voltage Vref generation circuit is equal to the product of the self-calibration load resistance value and the driving current output limit, and thus in this embodiment, is equal to the product of 100ohm and 100mA, and the theoretical value is 10V.
The voltage (9.975-10.025V) generated from the calibration load resistance value and the comparison reference voltage (10V) are sent to the comparison circuit for comparison.
According to the amplitude of the output current load voltage, the wave crest or the wave trough of the sawtooth-like wave/sine wave crosses the comparison reference voltage, the digital waveform output by the high/low limit comparison loop has different duty ratios.
The digital waveform output by the comparison loop is subjected to duty ratio measurement and calculation in the comparison output digital waveform duty ratio calculation loop, and in the embodiment, the digital waveform duty ratio is calculated by performing high-frequency multi-point sampling on N waveform periods and finally checking the number of high levels and the number of low levels in all sampling points to perform proportional calculation. The manner of calculating the duty ratio is not limited to that used in the present embodiment.
The samples in the design are tested, the digital waveform duty ratio output by the comparison circuit which can meet the requirement that the driving current output precision of all the samples meets the design precision requirement is recorded and searched, and the duty ratio value is assumed to be 53% in the embodiment.
For this embodiment, the simulated drive current output self-calibration process is as follows:
first, the control current drives the PWM wave generation and the duty ratio regulation circuit to generate a current output far away from the theoretical value (100 mA) of the driving current, for example, when the duty ratio of the driving current PWM wave is 60%, the driving current output is about 95mA, the final sawtooth wave voltage range generated on the 100ohm self-calibration load circuit by the 95mA current is 9.475-9.525V, because the sawtooth wave crest and trough voltage values are both less than the comparison reference voltage 10V, the comparison circuit output does not generate oscillation and keeps a single level unchanged.
Then, the duty ratio output of the PWM wave is controlled and increased in a step-by-step manner, for example, from 60% to 61% -62% -63%, and at this time, the driving current output will increase accordingly, for example, in this embodiment, the output current value will go through 96mA-97mA-98mA-99mA, and the final sawtooth voltage range generated on the self-calibration load circuit is 9.950V to 10.000V because of the existence of the output sawtooth wave until the effective value of the output current increases to 99.75mA, and the comparison circuit output starts to generate a flip action because the sawtooth wave peak value starts to touch the comparison reference voltage 10V, but the duty ratio of the comparison output digital waveform is very small because the duty ratio of the sawtooth wave waveform in the whole sawtooth wave period crosses 10V from less than 10V, for example: 1 percent.
The duty ratio output of the PWM wave driven by the control current is adjusted and continuously increased in a stepping mode, at the moment, the driving current output is increased, the effective value of the final sawtooth wave voltage generated on the self-calibration load circuit is further increased, the duty ratio of the sawtooth wave waveform in the whole sawtooth wave period is increased when the sawtooth wave waveform crosses 10V from less than 10V, and the duty ratio of the comparison output digital waveform is increased, for example: from the 1% duty cycle, 5% -9% -15% -22% -30% -40% and the like. Until the duty ratio of the control current driving PWM wave is increased to 65%, the duty ratio of the comparison output digital wave is changed to the expected 53% duty ratio. At this time, the driving current precision output already meets the design requirement.
And recording and storing the duty ratio of the current control current driving PWM wave, which is 65%.
At this point, the self-calibration process is complete.
Finally, in the subsequent operation of the individual in the embodiment, the stored control current drive PWM wave duty value of 65% is used as the reference value of the drive current output duty ratio, and then the 100mA current output meeting the precision requirement can be obtained.
The constant current source loop with the self-calibration function and the self-calibration method thereof designed according to the method are successfully applied to actual engineering of analog quantity current output modules of a distributed control system at present, the debugging workload of the modules when the modules leave a factory is saved through self-calibration operation which can be completed without manual fine operation, secondary self-calibration can be performed at any time according to requirements in subsequent engineering application for years, and good engineering use effects are obtained.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, several modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A constant current source circuit with self calibration, comprising:
the PWM wave generation current driving circuit is connected with the current driving PWM wave generation and duty ratio regulation circuit and is used for generating driving current and sending the driving current to the self-calibration current load circuit;
the self-calibration current load loop is connected with the PWM wave generation current drive loop and used for receiving the drive current, generating output current load voltage and sending the output current load voltage to the high/low limit comparison loop;
the high/low limit comparison circuit is connected with the self-calibration current load circuit and used for receiving the output current load voltage, comparing the output current load voltage with high/low limit comparison reference voltage sent by the high/low limit comparison reference voltage circuit and outputting a digital waveform to the comparison circuit to output a digital waveform duty ratio detection circuit;
the high/low limit comparison reference voltage loop is connected with the high/low limit comparison loop and used for generating high/low limit comparison reference voltage and sending the high/low limit comparison reference voltage to the high/low limit comparison loop;
the comparison circuit outputs a digital waveform duty ratio detection circuit, is connected with the high/low limit comparison circuit and is used for receiving a digital waveform, detecting the duty ratio of the digital waveform and sending the detected digital waveform duty ratio into a current drive PWM wave generation and duty ratio regulation circuit;
the current driving PWM wave generating and duty ratio regulating circuit is connected with the comparison circuit output digital waveform duty ratio detection circuit and used for detecting the digital waveform duty ratio, comparing the digital waveform duty ratio with a preset digital waveform duty ratio reference value and regulating the current driving PWM wave generating and duty ratio output by the duty ratio regulating circuit according to a comparison difference value so as to change the driving current and further change the digital waveform duty ratio output by the comparison circuit until the digital waveform duty ratio reaches the range of the digital waveform duty ratio reference value.
2. A self-calibration method of a constant current source loop with self-calibration function according to claim 1, comprising:
the PWM wave generation current driving circuit generates driving current and sends the driving current to the self-calibration current load circuit;
receiving the driving current from the current load loop for calibration, generating output current load voltage and sending the output current load voltage to the high/low limit comparison loop;
the high/low limit comparison circuit receives the output current load voltage and compares the output current load voltage with the high/low limit comparison reference voltage sent by the high/low limit comparison reference voltage circuit, and outputs a digital waveform to the comparison circuit to output a digital waveform duty ratio detection circuit;
the comparison circuit outputs a digital waveform duty ratio detection circuit to receive the digital waveform, detect the duty ratio of the digital waveform and send the detected digital waveform duty ratio into a current drive PWM wave generation and duty ratio regulation circuit;
the current driving PWM wave generation and duty ratio regulation circuit receives the digital waveform duty ratio and compares the digital waveform duty ratio with a preset digital waveform duty ratio reference value, and the current driving PWM wave generation and duty ratio regulation circuit outputs the PWM wave duty ratio according to the comparison result, so that the driving current is changed, the comparison circuit is changed to output the digital waveform duty ratio until the digital waveform duty ratio reaches the digital waveform duty ratio reference value range.
3. The calibration method according to claim 2, wherein the driving current generated by the PWM wave generating current driving circuit is a direct current, which exhibits a saw-tooth wave/sine wave-like characteristic having the same frequency as the PWM wave in the vicinity of the effective value of the output current;
the output current load voltage is direct current voltage, and the output current load voltage shows sawtooth wave-like/sine wave-like characteristics with the same frequency as the PWM wave near the effective voltage value.
4. The calibration method of claim 2, wherein the high/low limit comparison loop receives the output current load voltage and compares the output current load voltage with a high/low limit comparison reference voltage provided by a high/low limit comparison reference voltage loop to output a digital waveform, comprising:
when the output current load voltage is smaller than the high/low limit comparison reference voltage, the high/low limit comparison loop outputs logic low voltage;
when the output current load voltage is greater than the high/low limit comparison reference voltage, the high/low limit comparison loop outputs logic high voltage;
when the wave crest or the wave trough of the sawtooth wave/sine wave of the output current load voltage is far away from the high/low limit comparison reference voltage, the output of the high/low limit comparison loop is in a single level form;
when the wave crest or the wave trough of the quasi-sawtooth wave/sine wave of the output current load voltage crosses the high/low limit comparison reference voltage from a certain direction, the output of the high/low limit comparison loop shows an overturning form, at the moment, in one period of the quasi-sawtooth wave/sine wave, the output of the high/low limit comparison loop is subjected to level overturning twice, the high/low limit comparison loop outputs a digital waveform, and the digital waveform output by the high/low limit comparison loop has different duty ratios according to the difference of the amplitude/duration that the wave crest or the wave trough of the quasi-sawtooth wave/sine wave of the output current load voltage crosses the comparison reference voltage.
5. The calibration method of claim 2, wherein the step of sending the high/low limit comparison reference voltage from the high/low limit comparison reference voltage loop comprises:
the lower limit comparison reference voltage value is the product of the lower limit theoretical value of the driving output current and the current load for self-calibration;
the high-limit comparison reference voltage value is the product of the high-limit theoretical value of the driving output current and the self-calibration current load.
6. The calibration method according to claim 2, wherein the comparison circuit outputs a digital waveform duty cycle detection circuit to receive the digital waveform, and when detecting the duty cycle of the digital waveform, the digital waveform is filtered to remove jitter, and multi-cycle detection is performed to obtain more accurate duty cycle data.
7. The calibration method according to claim 2, wherein the current-driven PWM wave generation and duty ratio regulation circuit receives the digital waveform duty ratio and compares the digital waveform duty ratio with a preset digital waveform duty ratio reference value, and regulates the PWM wave duty ratio output by the current-driven PWM wave generation and duty ratio regulation circuit according to the comparison result, so as to change the magnitude of the driving current, and further change the digital waveform duty ratio output by the comparison circuit until the digital waveform duty ratio reaches the digital waveform duty ratio reference value range, comprising:
the current drive PWM wave generation and duty ratio regulation circuit compares the actual value of the digital waveform duty ratio output by the comparison circuit with the reference value of the digital waveform duty ratio output by the comparison circuit corresponding to the high/low limit drive current, calculates the difference value, and adjusts and changes the duty ratio of the current drive PWM wave in a stepping mode to change the effective value output by the drive current if the difference value is larger than the preset threshold value, thereby changing the difference value of two input ends of the comparator, changing the duty ratio of the comparison output digital waveform until the duty ratio of the digital waveform output by the comparison circuit reaches the reference value range of the digital waveform duty ratio output by the comparison circuit.
8. The calibration method according to claim 7, wherein the current-driven PWM wave generation and the duty cycle regulation circuit regulate the duty cycle of the current-driven PWM wave in a stepping manner, and the magnitude of the stepping value is in positive correlation with the magnitude of the deviation of the actual value of the duty cycle of the digital waveform output by the comparison circuit from the reference value of the duty cycle of the digital waveform output by the comparison circuit.
9. The calibration method according to claim 7, wherein the comparison circuit outputs a digital waveform duty ratio to reach the comparison circuit output digital waveform duty ratio reference value range, then the current drive PWM wave duty ratio at that time is stored, and the stored current drive PWM wave duty ratio value is used as the high/low limit current output duty ratio value in the subsequent work.
10. The calibration method according to claim 7, wherein each design case needs to use multiple data samples to obtain the comparison loop output digital waveform duty cycle reference value in accordance with its final design precision requirement according to its actual loop, and calibrate with the reference value other design cases.
CN202211120434.6A 2022-09-15 2022-09-15 Constant current source loop with self-calibration function and self-calibration method thereof Pending CN115684870A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211120434.6A CN115684870A (en) 2022-09-15 2022-09-15 Constant current source loop with self-calibration function and self-calibration method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211120434.6A CN115684870A (en) 2022-09-15 2022-09-15 Constant current source loop with self-calibration function and self-calibration method thereof

Publications (1)

Publication Number Publication Date
CN115684870A true CN115684870A (en) 2023-02-03

Family

ID=85062364

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211120434.6A Pending CN115684870A (en) 2022-09-15 2022-09-15 Constant current source loop with self-calibration function and self-calibration method thereof

Country Status (1)

Country Link
CN (1) CN115684870A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117388673A (en) * 2023-12-11 2024-01-12 珠海芯业测控有限公司 ATE equipment and chip testing method thereof, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117388673A (en) * 2023-12-11 2024-01-12 珠海芯业测控有限公司 ATE equipment and chip testing method thereof, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109845084B (en) Micro-stepping control circuit, control method and stepping motor system
CN1741359A (en) Method and apparatus for calibrating a ramp signal
CN115684870A (en) Constant current source loop with self-calibration function and self-calibration method thereof
CN1834825A (en) Digital double-loop output voltage regulation
CN109765502B (en) Program-controlled direct current electronic load
CN107645233A (en) For producing the method and circuit of pulse-width signal
JP2629077B2 (en) Automatic calibration system for lamp voltage generator
CN104076830A (en) Mass flow control device, system and method used for integrated gas delivery system
CN1897429A (en) Single pin multi-function signal detection method and structure therefor
CN106773652A (en) A kind of PID systems and its parameter automatic adjusting method
CN103124141B (en) A kind of electric power overhaul testing equipment metering verifies special high stability variable-frequency power sources
CN104022772A (en) Close-loop analog quantity output method and circuit capable of zero setting automatically
CN108445948B (en) Automatic current calibrating device
US7813885B2 (en) Method and apparatus for measurement of AC voltages in an HVAC system
US6570779B2 (en) Pulse with modulation inverter generation using a correction co-efficient and a reference to the ratio to obtain a real duty ratio
JPH0570762B2 (en)
US20170237337A1 (en) Method And Device For Regulating A Dead Time In Switching Power Supply Units
CN106323391B (en) Flow rate measuring device and flow rate control device
RU2239225C2 (en) Method for control of impulse voltage regulator
JP5598507B2 (en) Power supply
CN1114112C (en) Calibration method for electronic electricity meter
US20140049234A1 (en) Regulator for controlling output voltage
JP2005091206A (en) Instrument and method for measuring pulse width
CN113985756B (en) Method, device and storage medium for controlling pulse energy of continuous laser
TWI835550B (en) A power device with a mechanism of programmable switch for verifying output voltage and a system thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination