Method and device for obtaining output current of a DC current source

Through digital-to-analog conversion, DC conversion and feedback adjustment, the problem of low stability of DC current source is solved, and the accuracy and stability of the output current is achieved.

CN116719378BActive Publication Date: 2025-08-05GUANGDONG POWER GRID CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310682173.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-09
Publication Date
2025-08-05
Estimated Expiration
2043-06-09

AI Technical Summary

Technical Problem

The existing DC current source has low stability, large adjustment steps and is not easy to adjust accurately, resulting in fluctuations in the output current.

Method used

By obtaining the digital signal set by the user, digital-analog conversion and amplification, the target circuit signal is generated; converting the AC mains power DC, obtaining series negative feedback circuits for feedback adjustment, and performing systematic error correction and voltage stabilization on the feedback signal to obtain a stable current.

Benefits of technology

It improves the stability of the DC current source and the accuracy of the output current, and enhances the performance of the current source.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116719378B_ABST
    Figure CN116719378B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for obtaining the output current of a direct current source. The method comprises the following steps: obtaining a digital signal set by a user, performing digital-to-analog conversion on the digital signal to obtain an analog signal, amplifying the analog signal to obtain an amplified signal, and generating a target signal of a target circuit based on the amplified signal; performing direct current conversion on alternating current mains to obtain a direct current voltage, and obtaining an initial voltage signal of the target circuit based on the target signal and the direct current voltage; obtaining a series negative feedback circuit of the target circuit, and performing feedback adjustment on the initial voltage signal based on the series negative feedback circuit to obtain a feedback signal; performing system error correction on the feedback signal to obtain a correction signal, and performing voltage stabilization processing on the correction signal to obtain a stable current of the target circuit, and using the stable current as the output current of the direct current source; compared with the prior art, the technical solution of the present invention can improve the stability of the direct current source.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of artificial intelligence, and in particular to a method and device for obtaining the output current of a direct current source. Background Art

[0002] In recent years, with the continuous advancement of digitalization and intelligence, the advantages of digital source meters have become increasingly prominent. Digital source meters are new instruments that integrate high-precision signal sources, high-precision multimeters, programmable electronic loads and other instruments. Therefore, the development trend of digital source meters is actually the development trend of technologies such as high-precision voltage and current output, high-precision data acquisition, and active loads. Among them, DC current source is an important component of digital source meters.

[0003] Early DC current sources mostly used a purely analog control method, adjusting the output current by changing the resistance of a potentiometer connected to the circuit. Although this design is relatively simple to implement, its biggest problem is that the adjustment step is large and difficult to adjust accurately, which can easily cause large fluctuations in the output current. Therefore, improving the stability of DC current sources has become a pressing issue. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a method and device for obtaining the output current of a direct current source, thereby improving the stability of the direct current source.

[0005] In order to solve the above technical problems, the present invention provides a method for obtaining the output current of a direct current source, comprising:

[0006] Acquire a digital signal set by a user, perform digital-to-analog conversion on the digital signal to obtain an analog signal, amplify the analog signal to obtain an amplified signal, and generate a target signal of a target circuit based on the amplified signal;

[0007] Performing DC conversion on the AC mains to obtain a DC voltage, and obtaining an initial voltage signal of the target circuit according to the target signal and the DC voltage;

[0008] Obtaining a series negative feedback circuit of the target circuit, and performing feedback adjustment on the initial voltage signal based on the series negative feedback circuit to obtain a feedback signal;

[0009] The feedback signal is subjected to system error correction to obtain a correction signal, and the correction signal is subjected to voltage stabilization processing to obtain a stable current of the target circuit, and the stable current is used as the output current of the direct current source.

[0010] In one possible implementation, performing digital-to-analog conversion on the digital signal to obtain an analog signal specifically includes:

[0011] The digital signal is subjected to digital-to-analog conversion processing based on a preset digital-to-analog conversion algorithm to obtain an analog signal, wherein the digital-to-analog conversion algorithm is as follows:

[0012]

[0013] Among them, I 设定 It is a digital signal set by the user, in amperes, R 采样 P is the sampling resistance value in the feedback loop under the current range, in ohms; 放大 To adjust the circuit program-controlled magnification, V DA is the analog signal of the digital signal, and V is the bias term in the feedback loop.

[0014] In one possible implementation, the AC mains is converted to DC to obtain a DC voltage, specifically including:

[0015] Stepping down the AC mains power to obtain industrial frequency AC power;

[0016] Performing high-frequency rectification on the industrial frequency alternating current to obtain pulsating direct current of the industrial frequency alternating current;

[0017] performing filtering processing on the pulsating direct current to obtain a filtered voltage of the pulsating direct current;

[0018] The filtered voltage is stabilized to obtain a DC voltage of the filtered voltage.

[0019] In a possible implementation, performing system error correction on the feedback signal to obtain a correction signal of the feedback signal specifically includes:

[0020] Performing a primary correction on the feedback signal based on a preset dynamic window sliding average filtering algorithm to obtain a primary signal of the feedback signal;

[0021] A secondary correction is performed on the primary signal based on a preset segmented interpolation error correction algorithm to obtain a secondary signal of the primary signal, and the secondary signal is used as a correction signal for the feedback signal.

[0022] In one possible implementation, performing a first-level correction on the feedback signal based on a preset dynamic window sliding average filter algorithm to obtain a first-level signal of the feedback signal specifically includes:

[0023] generating a data buffer of a preset length according to the feedback signal, and generating a target filtering processing window for the data buffer according to a first-in-first-out queue method;

[0024] An arithmetic mean value of the target filtering processing window is obtained according to the valid data of the target filtering processing window, and a primary signal of the feedback signal is generated according to the arithmetic mean value.

[0025] In a possible implementation, obtaining a series negative feedback circuit of the target circuit and performing feedback adjustment on the initial voltage signal based on the series negative feedback circuit to obtain a feedback signal specifically includes:

[0026] Generate a hardware regulator according to a preset control algorithm, and generate a series negative feedback circuit of the target circuit based on the hardware regulator and a preset voltage sampling and conditioning circuit;

[0027] Based on the voltage sampling and conditioning circuit in the series negative feedback circuit, the initial voltage signal is sampled to obtain a standard voltage signal of the initial voltage signal;

[0028] Inputting the standard voltage signal into the hardware regulator in the series negative feedback circuit to obtain a feedback value of the standard voltage signal;

[0029] A difference between the feedback value and the digital signal is calculated, and the initial voltage signal is dynamically adjusted according to the difference to obtain a feedback signal of the initial voltage signal.

[0030] In a possible implementation, a hardware regulator is generated according to a preset control algorithm, wherein the preset control algorithm is as follows:

[0031]

[0032] Among them, K p is the proportionality coefficient, T i is the integral coefficient, e(t) is the curve of the deviation between the set value and the actual value changing with time, and u(t) is the curve of the proportional integral output value changing with time.

[0033] The present invention also provides a device for obtaining the output current of a DC current source, comprising: a digital-to-analog conversion module, an AC-to-DC conversion module, a feedback regulation module, and an error correction module;

[0034] The digital-to-analog conversion module is configured to obtain a digital signal set by a user, perform digital-to-analog conversion on the digital signal to obtain an analog signal, amplify the analog signal to obtain an amplified signal, and generate a target signal of a target circuit based on the amplified signal;

[0035] The AC-DC conversion module is used to convert the AC mains power into DC to obtain a DC voltage, and obtain the initial voltage signal of the target circuit according to the target signal and the DC voltage;

[0036] The feedback adjustment module is configured to obtain a series negative feedback circuit of the target circuit, and perform feedback adjustment on the initial voltage signal based on the series negative feedback circuit to obtain a feedback signal;

[0037] The error correction module is used to perform system error correction on the feedback signal to obtain a correction signal, and to perform voltage stabilization on the correction signal to obtain a stable current of the target circuit, and to output the stable current as the current of the DC current source.

[0038] In a possible implementation, the digital-to-analog conversion module is configured to perform digital-to-analog conversion on the digital signal to obtain an analog signal, specifically including:

[0039] The digital signal is subjected to digital-to-analog conversion processing based on a preset digital-to-analog conversion algorithm to obtain an analog signal, wherein the digital-to-analog conversion algorithm is as follows:

[0040]

[0041] Among them, I 设定 It is a digital signal set by the user, in amperes, R 采样 P is the sampling resistance value in the feedback loop under the current range, in ohms; 放大 To adjust the circuit program-controlled magnification, V DA is the analog signal of the digital signal, and V is the bias term in the feedback loop.

[0042] In one possible implementation, the AC-DC conversion module is configured to convert AC mains power into DC to obtain a DC voltage, specifically including:

[0043] Stepping down the AC mains power to obtain industrial frequency AC power;

[0044] Performing high-frequency rectification on the industrial frequency alternating current to obtain pulsating direct current of the industrial frequency alternating current;

[0045] performing filtering processing on the pulsating direct current to obtain a filtered voltage of the pulsating direct current;

[0046] The filtered voltage is stabilized to obtain a DC voltage of the filtered voltage.

[0047] In a possible implementation, the error correction module is configured to perform system error correction on the feedback signal to obtain a correction signal of the feedback signal, specifically including:

[0048] Performing a primary correction on the feedback signal based on a preset dynamic window sliding average filtering algorithm to obtain a primary signal of the feedback signal;

[0049] A secondary correction is performed on the primary signal based on a preset segmented interpolation error correction algorithm to obtain a secondary signal of the primary signal, and the secondary signal is used as a correction signal for the feedback signal.

[0050] In one possible implementation, the error correction module is configured to perform a primary correction on the feedback signal based on a preset dynamic window sliding average filter algorithm to obtain a primary signal of the feedback signal, specifically including:

[0051] generating a data buffer of a preset length according to the feedback signal, and generating a target filtering processing window for the data buffer according to a first-in-first-out queue method;

[0052] An arithmetic mean value of the target filtering processing window is obtained according to the valid data of the target filtering processing window, and a primary signal of the feedback signal is generated according to the arithmetic mean value.

[0053] In one possible implementation, the feedback adjustment module is configured to obtain a series negative feedback circuit of the target circuit and perform feedback adjustment on the initial voltage signal based on the series negative feedback circuit to obtain a feedback signal, specifically including:

[0054] Generate a hardware regulator according to a preset control algorithm, and generate a series negative feedback circuit of the target circuit based on the hardware regulator and a preset voltage sampling and conditioning circuit;

[0055] Based on the voltage sampling and conditioning circuit in the series negative feedback circuit, the initial voltage signal is sampled to obtain a standard voltage signal of the initial voltage signal;

[0056] Inputting the standard voltage signal into the hardware regulator in the series negative feedback circuit to obtain a feedback value of the standard voltage signal;

[0057] A difference between the feedback value and the digital signal is calculated, and the initial voltage signal is dynamically adjusted according to the difference to obtain a feedback signal of the initial voltage signal.

[0058] In a possible implementation, the feedback regulation module is configured to generate a hardware regulator according to a preset control algorithm, wherein the preset control algorithm is as follows:

[0059]

[0060] Among them, K p is the proportionality coefficient, T iis the integral coefficient, e(t) is the curve of the deviation between the set value and the actual value changing with time, and u(t) is the curve of the proportional integral output value changing with time.

[0061] The present invention also provides a terminal device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the method for obtaining the output current of the DC current source as described in any one of the above items is implemented.

[0062] The present invention also provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the method for obtaining the output current of the direct current source as described in any one of the above.

[0063] The method and device for obtaining the output current of a direct current source according to the embodiment of the present invention have the following beneficial effects compared with the prior art:

[0064] By obtaining a digital signal set by a user, performing digital-to-analog conversion on the digital signal to obtain an analog signal, and amplifying the analog signal to obtain an amplified signal, and based on the amplified signal, generating a target signal of the target circuit; performing DC conversion on the AC mains to obtain a DC voltage, and obtaining an initial voltage signal of the target circuit according to the target signal and the DC voltage; obtaining a series negative feedback circuit of the target circuit, and performing feedback adjustment on the initial voltage signal based on the series negative feedback circuit to obtain a feedback signal; performing system error correction on the feedback signal to obtain a correction signal, and performing voltage stabilization on the correction signal to obtain a stable current of the target circuit, and using the stable current as the output current of the DC current source; compared with the prior art, the technical solution of the present invention ensures the accuracy of the output current of the DC current source by performing system error correction and voltage stabilization on the obtained feedback signal, further enhances the performance of the DC current source, and can improve the stability of the DC current source. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] Figure 1 This is a flow chart of an embodiment of a method for obtaining the output current of a direct current source provided by the present invention;

[0066] Figure 2 It is a structural schematic diagram of an embodiment of a device for obtaining output current of a direct current source provided by the present invention. DETAILED DESCRIPTION

[0067] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.

[0068] Example 1, see Figure 1 , Figure 1 FIG. 1 is a flow chart of an embodiment of a method for obtaining the output current of a DC current source provided by the present invention, as shown in FIG. Figure 1 As shown, the method includes steps 101 to 104, which are specifically as follows:

[0069] Step 101: Acquire a digital signal set by a user, perform digital-to-analog conversion on the digital signal to obtain an analog signal, amplify the analog signal to obtain an amplified signal, and generate a target signal of a target circuit based on the amplified signal.

[0070] In one embodiment, the digital signal is a current value set by a user through a human-computer interaction system interface, wherein the human-computer interaction system interface includes an embedded panel and a communication interface.

[0071] In one embodiment, since the signal values obtained by various sensors and the input of the electromechanical device are analog voltages or analog currents, and these analog signals are not compatible with digital signals, it is necessary to perform digital-to-analog conversion on the digital signal set by the user.

[0072] In one embodiment, when performing digital-to-analog conversion on the digital signal, the digital-to-analog conversion is mainly performed on the digital signal based on a preset digital-to-analog conversion algorithm to obtain an analog signal, wherein the digital-to-analog conversion algorithm is as follows:

[0073]

[0074] Among them, I 设定 It is a digital signal set by the user, in amperes, R 采样 P is the sampling resistance value in the feedback loop under the current range, in ohms; 放大 To adjust the circuit program-controlled magnification, V DA is the analog signal of the digital signal, and V is the bias term in the feedback loop.

[0075] In one embodiment, since the current source system can output both positive full-scale and negative full-scale, it uses 2V as the midpoint (i.e., zero point) between the positive full-scale and negative full-scale, a signal greater than 2V is a positive output, and a signal less than 2V is a negative output. Therefore, in the above-mentioned digital-to-analog conversion algorithm, the product of the three is divided by 2 and a 2V bias term is added to ensure that the obtained analog signal satisfies the positive output.

[0076] Preferably, the bias term refers to the bias current. The DC current between the electrodes is usually called the bias current. A certain value of DC current flows in advance at the input of the signal to be amplified. In this way, even if the waveform of the input signal becomes negative, since there is always a positive voltage between the base and the emitter, a slight change in the input signal will cause a relatively small change in the base potential. Therefore, the slight change in the input signal can also be faithfully taken out as a larger change across the output resistor.

[0077] In one embodiment, since the signal directly output by the digital-to-analog converter and the signal directly measured by the analog-to-digital converter are both voltage signals, a current / voltage conversion circuit is required to convert the current signal into a voltage signal.

[0078] In one embodiment, a signal level set by a user is obtained, the analog signal is conditioned and amplified according to the signal level to obtain an amplified signal of the analog signal, and a target signal of a target circuit is generated according to the amplified signal.

[0079] In one embodiment, the signal gear refers to the current range displayed on the human-machine interaction panel of the transformer. Preferably, the signal gear may be 0.6A, or 3A.

[0080] In one embodiment, the analog signal is conditioned and amplified according to the signal position. Specifically, the amplification factor of the analog signal is determined according to the signal position. An instrument amplifier is generated using preset resistors, and the resistance value of the analog signal is switched according to the analog switch in the instrument amplifier and the amplification factor to obtain an amplified signal, wherein the resistors are a combination of resistors with a fixed number and fixed resistance value.

[0081] In one embodiment, the amplification factor of the analog signal is determined according to the signal gear; specifically, the conversion of the signal gear is achieved by controlling the resistance, and the amplification factor can be greater than 1 or less than 1. When the signal gear is switched from 0.6A to 3A, the amplification factor of the analog signal is determined to be 5, and when the signal gear is switched from 3A to 0.6A, the amplification factor of the analog signal is determined to be 0.2.

[0082] In one embodiment, the instrument amplifier is a closed-loop gain component having a differential input and a single-ended output relative to a reference end; the analog switch in the instrument amplifier controls a resistor set in the instrument amplifier, wherein the resistor set includes a plurality of fixed resistors and fixed-value resistors connected in parallel with the fixed resistors, and the current in the circuit is controlled by the number and state of the fixed-value resistors connected to the circuit, thereby realizing resistance value switching.

[0083] In one embodiment, when the analog signal is conditioned and amplified according to the signal position, an isolation amplifier can be generated using a preset operational amplifier and a preset isolation circuit, and the analog signal is conditioned and amplified according to the isolation amplifier and the signal position to obtain an amplified signal of the analog signal.

[0084] Specifically, the preset operational amplifier is a circuit unit with a very high amplification factor. It is an amplifier with a special coupling circuit and feedback. Its output signal can be the result of mathematical operations such as addition, subtraction, differentiation, and integration of the input signal. An ideal operational amplifier must have the following characteristics: infinite input impedance, zero output impedance, infinite open-loop gain, infinite common-mode rejection ratio, and infinite bandwidth. When an operational amplifier is usually used, its output end is connected to its inverting input end to form a negative feedback configuration. The reason is that the voltage gain of the operational amplifier is very large, ranging from hundreds to tens of thousands of times. Only by using negative feedback can the stable operation of the circuit be guaranteed. The interior of the preset operational amplifier is composed of a precision op amp and metal-plated resistors with excellent temperature coefficients, which can effectively suppress temperature drift and common-mode interference.

[0085] Specifically, for the preset isolation circuit, there is no direct electrical connection between the two circuits, that is, the two circuits are insulated from each other while ensuring that the two circuits maintain an energy transmission relationship.

[0086] Specifically, the isolation amplifier is a special measurement amplifier circuit, in which there is no direct circuit coupling between its input, output and power supply circuit, that is, there is no common ground terminal during the signal transmission process, and there is an ohmic isolation device between the input circuit and the amplifier output.

[0087] In one embodiment, when generating a target signal of a target circuit based on the amplified signal, the amplified signal is mainly used as the target signal of the target circuit.

[0088] Step 102: performing DC conversion on the AC mains to obtain a DC voltage, and obtaining an initial voltage signal of the target circuit according to the target signal and the DC voltage.

[0089] In one embodiment, the AC mains is subjected to a voltage reduction process to obtain industrial frequency AC power of the AC mains; the industrial frequency AC power is subjected to a high frequency rectification process to obtain pulsating DC power of the industrial frequency AC power; the pulsating DC power is subjected to a filtering process to obtain a filtered voltage of the pulsating DC power; and the filtered voltage is subjected to a voltage stabilization process to obtain a DC voltage of the filtered voltage.

[0090] In one embodiment, the current magnitude and direction of the AC mains power vary with time, while the current magnitude and direction of the DC power remain constant.

[0091] Preferably, a transformer is used to reduce the voltage of the AC mains.

[0092] Preferably, filtering the pulsating direct current is to reduce the amplitude of the current cycle change to make the waveform smooth.

[0093] Preferably, the voltage stabilization process adopts a negative feedback technology, which can further stabilize the rectified DC voltage.

[0094] Preferably, the rectifier circuit is conducive to high-frequency rectification of the industrial frequency alternating current, wherein the rectifier circuit includes multiple diodes for converting positive and negative voltages into unidirectional voltages; the rectifier circuit usually uses a bridge rectifier circuit, and the bridge rectifier circuit can be composed of 4 diodes, and the diodes have unidirectional conductivity, that is, the current can only flow from one end to the other end, and the current cannot flow in the opposite direction; and the rectification can be divided into several forms such as half-wave rectification, full-wave rectification, and bridge rectification.

[0095] In one embodiment, when the initial voltage signal of the target circuit is obtained based on the target signal and the DC voltage, the signal value of the initial voltage signal is determined based on the target signal, and a first DC voltage of corresponding size is output according to the signal value, and the first DC voltage is used as the initial voltage signal.

[0096] Step 103: Obtain a series negative feedback circuit of the target circuit, and perform feedback adjustment on the initial voltage signal based on the series negative feedback circuit to obtain a feedback signal.

[0097] In one embodiment, a hardware regulator is generated according to a preset control algorithm; a series negative feedback circuit of the target circuit is generated based on the hardware regulator and a preset voltage sampling and conditioning circuit; the initial voltage signal is sampled based on the voltage sampling and conditioning circuit in the series negative feedback circuit to obtain a standard voltage signal of the initial voltage signal; the standard voltage signal is input into the hardware regulator in the series negative feedback circuit to obtain a feedback value of the standard voltage signal; the difference between the feedback value and the digital signal is calculated, and the initial voltage signal is dynamically adjusted according to the difference to obtain a feedback signal of the initial voltage signal.

[0098] In one embodiment, the preset control algorithm is as follows:

[0099]

[0100] Among them, K p is the proportionality coefficient, T i is the integral coefficient, e(t) is the curve of the deviation between the set value and the actual value changing with time, and u(t) is the curve of the proportional integral output value changing with time.

[0101] Specifically, the hardware regulator determines a specific control relationship by adjusting the proportional coefficient and the integral coefficient, so that the controlled object performs self-feedback control according to the set logic. The use of the hardware regulator control does not require the establishment of an accurate model of the controlled object. It only needs to track the output to converge the controlled quantity within the allowable error range near the given value. The structure is simple and the reliability is high.

[0102] Specifically, after determining the proportional coefficient, set a larger integral coefficient. This integral coefficient is then gradually reduced until the system experiences oscillations. Then, the integral coefficient is gradually increased until the oscillations cease. By recording the integral coefficient value at this point, it can be preliminarily determined that the integral coefficient of the preset control algorithm should be 150%-180% of the current value. Finally, based on experience and data, the proportional and integral coefficients are fine-tuned to meet the expected performance requirements, completing the tuning of the two parameters.

[0103] In one embodiment, the preset voltage sampling and conditioning circuit is used to sample the voltage. The sampling result is transmitted to the hardware regulator as a feedback signal to achieve real-time dynamic and precise self-adjustment of the output voltage. On the other hand, it is sent to the measurement readback module as a signal to be measured to achieve readback display of the output voltage.

[0104] In one embodiment, sampling the initial voltage signal refers to selecting an initial voltage signal within a certain signal interval, using the voltage sampling and conditioning circuit to read the initial voltage signal, scaling it to an appropriate range, and inputting it to an effective value detection chip, and determining the output value of the effective value detection chip as the standard voltage signal of the initial voltage signal.

[0105] In one embodiment, the standard voltage signal is inputted into the hardware regulator of the series feedback circuit in order to implement feedback regulation of the standard voltage signal.

[0106] In one embodiment, the difference between the feedback value and the digital signal is expressed as an error between the digital signal and the initial voltage signal; the feedback signal is obtained by performing difference compensation on the initial voltage signal; the difference reflects the stability of the current in the circuit, and the smaller the difference, the higher the stability of the current.

[0107] In one embodiment, the difference between the feedback value and the digital signal is calculated, and the initial voltage signal is dynamically adjusted according to the difference to obtain a feedback signal of the initial voltage signal; specifically, after obtaining the difference, the digital signal is updated according to the difference to obtain an updated digital signal, and the updated digital signal is used as the feedback signal of the initial voltage signal.

[0108] Preferably, the smaller the current fluctuation is, the smaller the update amplitude of the digital signal is.

[0109] In one embodiment, since the feedback value is the feedback value of the standard voltage signal and the digital signal is a current signal, a current / voltage conversion circuit is required to convert the current signal into a voltage signal.

[0110] Step 104: performing system error correction on the feedback signal to obtain a correction signal, performing voltage stabilization processing on the correction signal to obtain a stable current of the target circuit, and using the stable current as the output current of the DC current source.

[0111] In one embodiment, the system errors in the circuit are mainly composed of linear errors, such as zero-point drift and gain error caused by the sampling and conditioning network, series negative feedback control, etc., which may cause deviations between the set output value, the actual output value and the measured readback value after linear combination. In addition, nonlinear system errors may also exist. If hardware circuits are used to compensate for them, it may lead to complex circuit design and reduced reliability. Therefore, it is necessary to design a software algorithm to compensate and correct the system errors to ensure system accuracy.

[0112] In one embodiment, the feedback signal is subjected to system error correction to obtain a correction signal. Specifically, a first-level correction is performed on the feedback signal based on a preset dynamic window sliding average filtering algorithm to obtain a first-level signal of the feedback signal; and a second-level correction is performed on the first-level signal based on a preset segmented interpolation error correction algorithm to obtain a second-level signal of the first-level signal, and the second-level signal is used as the correction signal of the feedback signal.

[0113] In one embodiment, the feedback signal is corrected at the first level based on a preset dynamic window sliding average filtering algorithm to obtain a first-level signal of the feedback signal. Specifically, a data buffer of a preset length is generated according to the feedback signal, and a target filtering processing window of the data buffer is generated according to a first-in-first-out queue method; based on the valid data of the target filtering processing window, the arithmetic mean of the target filtering processing window is obtained, and the first-level signal of the feedback signal is generated according to the arithmetic mean.

[0114] Specifically, for a data buffer of a preset length, a first-in-first-out (FIFO) queue is used to organize and manage it. Whenever new data arrives, if the FIFO buffer is not full, the data is directly added to the end of the queue. If the FIFO buffer is full, the new data is added to the end of the queue while the earliest data at the head of the queue is discarded. It can be supplemented by removing extreme values and other means to further filter out possible accidental erroneous data, and finally all valid data in the buffer are summed and averaged. In this way, new data is continuously stored in the buffer, and it is combined with the old data in the previous period to perform average calculation as the final output, which can effectively improve the smoothness of the data.

[0115] In one embodiment, the sliding average filter is a common digital filtering algorithm suitable for scenarios such as microprocessors and sensors that require a large number of continuous sampling. It can perform real-time and dynamic processing on the sampled measurement values, has good filtering effects, and the algorithm is simple to implement. The disadvantage of the sliding average filter algorithm is that its processing window size is fixed, so when the sampling rate is low, the system dynamic response is slow, and when the data fluctuates greatly in a short period of time, it may not be able to respond in time; for this reason, the fixed window of the sliding average filter is further optimized to a dynamic window, and when the signal fluctuation is small, the window is expanded and the number of filter points is increased, and when the signal fluctuation is large, the window is reduced and the number of filter points is reduced; through window adaptive adjustment, the number of filter points selected by the program in real time is always as suitable as possible for the current situation, which can not only improve the signal-to-noise ratio when the signal is stable, but also ensure that it can quickly respond to large fluctuations in the signal.

[0116] In one embodiment, the piecewise interpolation error correction algorithm refers to a method of determining the unknown coordinate points between two known coordinate points by approximately replacing the original function with a straight line connecting the two coordinate points. The interpolation function is a first-order polynomial y=kx+b, which is simple to implement and does not require a large amount of CPU resources.

[0117] Specifically, the piecewise interpolation error correction algorithm is used to perform secondary correction on the primary signal. When the piecewise interpolation error correction algorithm is used for the first time, it is necessary to establish parameters for correcting the piecewise interpolation error correction algorithm. After the system output established according to the piecewise interpolation error correction algorithm stabilizes, the current actual output of the system and the corresponding sampled measurement value are measured with the help of external precision instruments. The two are used as y values and x values respectively. According to experience and test data, the primary signal is divided into several intervals from the negative maximum value to the positive maximum value, and several calibration points are determined accordingly. The correction effect is enhanced by segmented processing, so that the correction result is more accurate. The calibration points and the parameters of the piecewise interpolation error correction algorithm can form a standard correction straight line. The primary signal is determined as the input value, and the output value is determined according to the correction straight line. The output value is the secondary signal of the primary signal.

[0118] In one embodiment, when the correction signal is stabilized to obtain the stable current of the target circuit, the correction signal is stabilized mainly based on a preset linear voltage stabilization unit; wherein, the preset linear voltage stabilization unit refers to the current size actually set by the user for voltage stabilization, and the excess voltage energy is consumed in the form of heat; the current output by the linear voltage stabilization is collected, amplified, and filtered by the sampling and conditioning circuit and transmitted as a feedback value to the hardware regulator, in the hardware regulator, the feedback value is compared with the user set value and the difference is fed back to the linear voltage stabilization link, thereby dynamically adjusting the current currently output, so as to achieve the effect that the output current is consistent with the user set current and the output accuracy is high and the stability is good.

[0119] In summary, the present invention provides a method for obtaining the output current of a DC current source. By performing digital-to-analog conversion on a digital signal, the digital signal can be converted into an analog signal that can be understood by the input end of a DC current source device. A hardware regulator is generated using a preset control algorithm, and a series negative feedback circuit of the target circuit is generated based on the hardware regulator. In principle, the accuracy and stability of the current output are greatly improved. At the same time, the obtained feedback signal is subjected to system error correction and voltage stabilization processing to ensure the accuracy of the output current of the DC current source, further enhance the performance of the DC current source, and solve the problem of low stability of the DC current source.

[0120] Example 2, see Figure 2 , Figure 2FIG. 1 is a schematic structural diagram of an embodiment of a device for obtaining a DC current source output current provided by the present invention. Figure 2 As shown, the device includes a digital-to-analog conversion module 201, an AC-to-DC conversion module 202, a feedback adjustment module 203 and an error correction module 204, which are specifically as follows:

[0121] The digital-to-analog conversion module 201 is used to obtain a digital signal set by a user, perform digital-to-analog conversion on the digital signal to obtain an analog signal, amplify the analog signal to obtain an amplified signal, and generate a target signal of a target circuit based on the amplified signal.

[0122] The AC-DC conversion module 202 is configured to convert the AC mains power into a DC power to obtain a DC voltage, and obtain an initial voltage signal of the target circuit according to the target signal and the DC voltage.

[0123] The feedback adjustment module 203 is configured to obtain a series negative feedback circuit of the target circuit, and perform feedback adjustment on the initial voltage signal based on the series negative feedback circuit to obtain a feedback signal.

[0124] The error correction module 204 is configured to perform system error correction on the feedback signal to obtain a correction signal, perform voltage stabilization on the correction signal to obtain a stable current of the target circuit, and output the stable current as the current of the DC current source.

[0125] In one embodiment, the digital-to-analog conversion module 201 is configured to perform digital-to-analog conversion on the digital signal to obtain an analog signal, specifically comprising: performing digital-to-analog conversion processing on the digital signal based on a preset digital-to-analog conversion algorithm to obtain an analog signal, wherein the digital-to-analog conversion algorithm is as follows:

[0126]

[0127] Among them, I 设定 It is a digital signal set by the user, in amperes, R 采样 P is the sampling resistance value in the feedback loop under the current range, in ohms; 放大 To adjust the circuit program-controlled magnification, V DA is the analog signal of the digital signal, and V is the bias term in the feedback loop.

[0128] In one embodiment, the AC-DC conversion module 202 is used to convert the AC mains power to DC to obtain a DC voltage, specifically including: stepping down the AC mains power to obtain the industrial frequency AC power of the AC mains power; performing high-frequency rectification on the industrial frequency AC power to obtain the pulsating DC power of the industrial frequency AC power; filtering the pulsating DC power to obtain the filtered voltage of the pulsating DC power; and stabilizing the filtered voltage to obtain the DC voltage of the filtered voltage.

[0129] In one embodiment, the error correction module 204 is used to perform system error correction on the feedback signal to obtain a correction signal of the feedback signal, specifically including: performing a first-level correction on the feedback signal based on a preset dynamic window sliding average filtering algorithm to obtain a first-level signal of the feedback signal; performing a second-level correction on the first-level signal based on a preset segmented interpolation error correction algorithm to obtain a second-level signal of the first-level signal, and using the second-level signal as the correction signal of the feedback signal.

[0130] In one embodiment, the error correction module 204 is used to perform a first-level correction on the feedback signal based on a preset dynamic window sliding average filtering algorithm to obtain a first-level signal of the feedback signal, specifically including: generating a data buffer of a preset length according to the feedback signal, and generating a target filtering processing window of the data buffer according to a first-in-first-out queue method; obtaining the arithmetic mean of the target filtering processing window according to the valid data of the target filtering processing window, and generating the first-level signal of the feedback signal according to the arithmetic mean.

[0131] In one embodiment, the feedback adjustment module 203 is used to obtain the series negative feedback circuit of the target circuit, and perform feedback adjustment on the initial voltage signal based on the series negative feedback circuit to obtain a feedback signal, specifically including: generating a hardware regulator according to a preset control algorithm, and generating the series negative feedback circuit of the target circuit based on the hardware regulator and a preset voltage sampling and conditioning circuit; sampling the initial voltage signal based on the voltage sampling and conditioning circuit in the series negative feedback circuit to obtain a standard voltage signal of the initial voltage signal; inputting the standard voltage signal into the hardware regulator in the series negative feedback circuit to obtain a feedback value of the standard voltage signal; calculating the difference between the feedback value and the digital signal, and dynamically adjusting the initial voltage signal according to the difference to obtain a feedback signal of the initial voltage signal.

[0132] In one embodiment, the feedback adjustment module 203 is configured to generate a hardware regulator according to a preset control algorithm, wherein the preset control algorithm is as follows:

[0133]

[0134] Among them, K p is the proportionality coefficient, T i is the integral coefficient, e(t) is the curve of the deviation between the set value and the actual value changing with time, and u(t) is the curve of the proportional integral output value changing with time.

[0135] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.

[0136] It should be noted that the above-described embodiment of the device for obtaining the output current of a DC current source is merely illustrative, wherein the modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of this embodiment.

[0137] Based on the above-mentioned embodiment of the method for obtaining the output current of a DC current source, another embodiment of the present invention provides a terminal device for obtaining the output current of a DC current source. The terminal device for obtaining the output current of a DC current source includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the method for obtaining the output current of a DC current source according to any embodiment of the present invention is implemented.

[0138] For example, in this embodiment, the computer program may be divided into one or more modules, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program in the terminal device for obtaining the output current of the DC current source.

[0139] The terminal device for obtaining the output current of the DC current source may be a computing device such as a desktop computer, a notebook computer, a PDA, a cloud server, etc. The terminal device for obtaining the output current of the DC current source may include, but is not limited to, a processor and a memory.

[0140] The processor may be a central processing unit (CPU), or other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device for obtaining the output current of the DC current source, and utilizes various interfaces and lines to connect various parts of the terminal device for obtaining the output current of the DC current source.

[0141] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the terminal device for obtaining the output current of the DC current source by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage device.

[0142] Based on the above-mentioned embodiments of the method for obtaining the output current of a DC current source, another embodiment of the present invention provides a storage medium, wherein the storage medium includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the method for obtaining the output current of a DC current source of any embodiment of the present invention.

[0143] In this embodiment, the storage medium is a computer-readable storage medium, and the computer program includes computer program code, which may be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0144] In summary, the present invention provides a method and device for obtaining the output current of a DC current source, which obtains a digital signal set by the user, performs digital-to-analog conversion on the digital signal to obtain an analog signal, amplifies the analog signal to obtain an amplified signal, and generates a target signal of the target circuit based on the amplified signal; performs DC conversion on the AC mains to obtain a DC voltage, and obtains the initial voltage signal of the target circuit based on the target signal and the DC voltage; obtains a series negative feedback circuit of the target circuit, and performs feedback adjustment on the initial voltage signal based on the series negative feedback circuit to obtain a feedback signal; performs system error correction on the feedback signal to obtain a correction signal, and performs voltage stabilization on the correction signal to obtain a stable current of the target circuit, and uses the stable current as the output current of the DC current source; compared with the prior art, the technical solution of the present invention can improve the stability of the DC current source.

[0145] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and substitutions can be made without departing from the technical principles of the present invention. These improvements and substitutions should also be regarded as the scope of protection of the present invention.

Claims

1. A method for obtaining the output current of a direct current source, characterized in that: include: Acquire a digital signal set by a user, perform digital-to-analog conversion on the digital signal to obtain an analog signal, amplify the analog signal to obtain an amplified signal, and generate a target signal of a target circuit based on the amplified signal; Performing DC conversion on the AC mains to obtain a DC voltage, and obtaining an initial voltage signal of the target circuit according to the target signal and the DC voltage; Obtaining a series negative feedback circuit of the target circuit, and performing feedback adjustment on the initial voltage signal based on the series negative feedback circuit to obtain a feedback signal; Performing system error correction on the feedback signal to obtain a correction signal, performing voltage stabilization on the correction signal to obtain a stable current of the target circuit, and using the stable current as the output current of the DC current source; The obtaining of the series negative feedback circuit of the target circuit and performing feedback adjustment on the initial voltage signal based on the series negative feedback circuit to obtain a feedback signal specifically includes: Generate a hardware regulator according to a preset control algorithm, and generate a series negative feedback circuit of the target circuit based on the hardware regulator and a preset voltage sampling and conditioning circuit; Based on the voltage sampling and conditioning circuit in the series negative feedback circuit, the initial voltage signal is sampled to obtain a standard voltage signal of the initial voltage signal; Inputting the standard voltage signal into the hardware regulator in the series negative feedback circuit to obtain a feedback value of the standard voltage signal; Calculating a difference between the feedback value and the digital signal, and dynamically adjusting the initial voltage signal according to the difference to obtain a feedback signal of the initial voltage signal; The hardware regulator is generated according to a preset control algorithm, wherein the preset control algorithm is as follows: ; in, is the proportionality coefficient, is the integration coefficient, is the curve of the deviation between the set value and the actual value changing with time, It is the curve of proportional integral output value changing with time; The voltage stabilization processing of the correction signal to obtain the stable current of the target circuit includes: voltage stabilization processing of the correction signal based on a preset linear voltage stabilization unit; wherein, the preset linear voltage stabilization unit refers to the current size actually set by the user for voltage stabilization, and the excess voltage energy is consumed in the form of heat; the current output by the linear voltage stabilization is collected, amplified, and filtered by the sampling and conditioning circuit and transmitted as a feedback value to the hardware regulator, in which the feedback value is compared with the user set value and the difference is fed back to the linear voltage stabilization link.

2. The method for obtaining the output current of a direct current source according to claim 1, wherein: Performing digital-to-analog conversion on the digital signal to obtain an analog signal specifically includes: The digital signal is subjected to digital-to-analog conversion processing based on a preset digital-to-analog conversion algorithm to obtain an analog signal, wherein the digital-to-analog conversion algorithm is as follows: ; in, It is a digital signal set by the user, in amperes. It is the sampling resistance value in the feedback loop under the current range, in ohms; To adjust the circuit programmable magnification, is the analog signal of the digital signal, is the bias term in the feedback loop.

3. The method for obtaining the output current of a direct current source according to claim 1, wherein: Convert AC mains power to DC to obtain DC voltage, specifically including: Stepping down the AC mains power to obtain industrial frequency AC power; Performing high-frequency rectification on the industrial frequency alternating current to obtain pulsating direct current of the industrial frequency alternating current; performing filtering processing on the pulsating direct current to obtain a filtered voltage of the pulsating direct current; The filtered voltage is stabilized to obtain a DC voltage of the filtered voltage.

4. The method for obtaining the output current of a direct current source according to claim 1, wherein: The performing system error correction on the feedback signal to obtain a correction signal of the feedback signal specifically includes: Performing a primary correction on the feedback signal based on a preset dynamic window sliding average filtering algorithm to obtain a primary signal of the feedback signal; A secondary correction is performed on the primary signal based on a preset segmented interpolation error correction algorithm to obtain a secondary signal of the primary signal, and the secondary signal is used as a correction signal for the feedback signal.

5. The method for obtaining the output current of a direct current source according to claim 4, wherein: Performing a first-level correction on the feedback signal based on a preset dynamic window sliding average filtering algorithm to obtain a first-level signal of the feedback signal specifically includes: generating a data buffer of a preset length according to the feedback signal, and generating a target filtering processing window for the data buffer according to a first-in-first-out queue method; An arithmetic mean value of the target filtering processing window is obtained according to the valid data of the target filtering processing window, and a primary signal of the feedback signal is generated according to the arithmetic mean value.

6. A device for obtaining output current of a direct current source, characterized in that: include: Digital-to-analog conversion module, AC-to-DC conversion module, feedback regulation module and error correction module; The digital-to-analog conversion module is configured to obtain a digital signal set by a user, perform digital-to-analog conversion on the digital signal to obtain an analog signal, amplify the analog signal to obtain an amplified signal, and generate a target signal of a target circuit based on the amplified signal; The AC-DC conversion module is used to convert the AC mains power into DC to obtain a DC voltage, and obtain the initial voltage signal of the target circuit according to the target signal and the DC voltage; The feedback adjustment module is configured to obtain a series negative feedback circuit of the target circuit, and perform feedback adjustment on the initial voltage signal based on the series negative feedback circuit to obtain a feedback signal; The error correction module is used to perform system error correction on the feedback signal to obtain a correction signal, and to perform voltage stabilization on the correction signal to obtain a stable current of the target circuit, and to output the stable current as a current of a DC current source; The feedback adjustment module is used to obtain the series negative feedback circuit of the target circuit, and perform feedback adjustment on the initial voltage signal based on the series negative feedback circuit to obtain a feedback signal, specifically including: generating a hardware regulator according to a preset control algorithm, and generating the series negative feedback circuit of the target circuit based on the hardware regulator and a preset voltage sampling and conditioning circuit; sampling the initial voltage signal based on the voltage sampling and conditioning circuit in the series negative feedback circuit to obtain a standard voltage signal of the initial voltage signal; inputting the standard voltage signal into the hardware regulator in the series negative feedback circuit to obtain a feedback value of the standard voltage signal; calculating the difference between the feedback value and the digital signal, and dynamically adjusting the initial voltage signal according to the difference to obtain the feedback signal of the initial voltage signal; The feedback regulation module is used to generate a hardware regulator according to a preset control algorithm, wherein the preset control algorithm is as follows: ; in, is the proportionality coefficient, is the integration coefficient, is the curve of the deviation between the set value and the actual value changing with time, It is the curve of proportional integral output value changing with time; The voltage stabilization processing of the correction signal to obtain the stable current of the target circuit includes: voltage stabilization processing of the correction signal based on a preset linear voltage stabilization unit; wherein, the preset linear voltage stabilization unit refers to the current size actually set by the user for voltage stabilization, and the excess voltage energy is consumed in the form of heat; the current output by the linear voltage stabilization is collected, amplified, and filtered by the sampling and conditioning circuit and transmitted as a feedback value to the hardware regulator, in which the feedback value is compared with the user set value and the difference is fed back to the linear voltage stabilization link.

7. A terminal device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the method for obtaining the output current of the direct current source according to any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for obtaining the output current of a direct current source according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Multi-way and multi-gear digital type AC constant current source and gear regulating and gating control method thereof

    CN104536502A

  • High-stability direct current source and control system

    CN113359920A