CN113422606B - AD converter error calibration method, device, controller and servo driver - Google Patents

AD converter error calibration method, device, controller and servo driver Download PDF

Info

Publication number
CN113422606B
CN113422606B CN202110770020.7A CN202110770020A CN113422606B CN 113422606 B CN113422606 B CN 113422606B CN 202110770020 A CN202110770020 A CN 202110770020A CN 113422606 B CN113422606 B CN 113422606B
Authority
CN
China
Prior art keywords
converter
temperature
conversion
calibrated
data
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.)
Active
Application number
CN202110770020.7A
Other languages
Chinese (zh)
Other versions
CN113422606A (en
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.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
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 Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202110770020.7A priority Critical patent/CN113422606B/en
Publication of CN113422606A publication Critical patent/CN113422606A/en
Application granted granted Critical
Publication of CN113422606B publication Critical patent/CN113422606B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M1/00Analogue/digital conversion; Digital/analogue conversion
    • H03M1/10Calibration or testing
    • H03M1/1009Calibration
    • H03M1/1014Calibration at one point of the transfer characteristic, i.e. by adjusting a single reference value, e.g. bias or gain error
    • H03M1/1023Offset correction
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Analogue/Digital Conversion (AREA)

Abstract

The application discloses an AD converter error calibration method, an AD converter error calibration device, a controller, a medium and a servo driver. The method comprises the following steps: reading conversion data output by an AD converter to be calibrated; acquiring the working temperature of an AD converter to be calibrated; determining a compensation coefficient corresponding to the working temperature according to the stored temperature drift curve and ideal conversion data of the AD converter to be calibrated corresponding to the preset input quantity; the temperature drift curve represents the relation between data of the preset input quantity after AD conversion and temperature; and carrying out error calibration on the conversion data by adopting the compensation coefficient to obtain the conversion data after calibration. By adopting the application, the error calibration accuracy of the AD converter is improved, and the data reading accuracy of the AD converter is higher, so that the conversion accuracy of the AD converter is improved.

Description

AD converter error calibration method, device, controller and servo driver
Technical Field
The application relates to the technical field of numerical control machine tools, in particular to an AD converter error calibration method, an AD converter error calibration device, a controller, a medium and a servo driver.
Background
The servo driver is one of important components of the numerical control machine tool and is used for driving the operation of the motor, and the control performance of the servo driver directly influences the machining precision of the numerical control machine tool. Generally, a servo control system adopts a three-ring control architecture, wherein a current ring is a system inner ring, and a speed ring and a position ring are system outer rings; as a multi-closed loop control system, the improvement of the performance of the outer loop of the system depends on the optimization of the inner loop of the system. Therefore, the current loop is a key to improving control precision and response speed and improving control performance in the servo control system, and in order to achieve a relatively accurate and rapid control effect of the servo control system, it is necessary to ensure that phase current can be accurately and rapidly sampled.
At present, the common current sampling scheme comprises a Hall current sensor and a sampling resistor, converts a current signal into a voltage signal, converts the voltage signal into a digital signal through an AD (analog-digital) converter, and performs control loop operation. The conversion accuracy of the AD converter directly affects the accuracy of the current sampling. The dc errors common in AD converters are offset errors and gain errors. Misalignment errors can cause motor torque to oscillate at stator current frequencies, gain errors can cause motor torque to oscillate at twice the stator current frequencies, and torque fluctuations can cause vibration, noise, and excessive wear of the machine, as well as rotational speed fluctuations.
In the conventional art, a user typically calibrates offset errors and gain errors at room temperature. However, the servo driver may operate at different ambient temperatures, and the variation of the operating temperature may cause offset errors and gain errors, resulting in inaccurate error calibration, and reducing the conversion accuracy of the AD converter, thereby affecting the accuracy of current sampling.
Disclosure of Invention
The application aims to solve the technical problems that: the accuracy of error calibration of the AD converter in the prior art is low, resulting in low conversion accuracy of the AD converter and thus low accuracy of current sampling.
In order to solve the technical problems, the application provides an AD converter error calibration method, an AD converter error calibration device, a controller, a medium and a servo driver.
An AD converter error calibration method, comprising:
reading conversion data output by an AD converter to be calibrated;
acquiring the working temperature of the AD converter to be calibrated;
determining a compensation coefficient corresponding to the working temperature according to the stored temperature drift curve and ideal conversion data of the AD converter to be calibrated corresponding to a preset input quantity; the temperature drift curve represents the relation between data of the preset input quantity after AD conversion and temperature;
and carrying out error calibration on the conversion data by adopting the compensation coefficient to obtain the conversion data after calibration.
In one embodiment, the obtaining the operating temperature of the AD converter to be calibrated includes:
the temperature monitoring device is arranged in the working environment where the AD converter to be calibrated is located;
and obtaining the working temperature of the AD converter to be calibrated according to the temperature monitored by the temperature monitoring device.
In one embodiment, the obtaining the working temperature of the AD converter to be calibrated according to the temperature monitored by the temperature monitoring device includes:
and calculating the sum of the temperature monitored by the temperature monitoring device and a preset relation coefficient to obtain the working temperature of the AD converter to be calibrated.
In one embodiment, before determining the compensation coefficient corresponding to the working temperature according to the stored temperature drift curve and the ideal conversion data corresponding to the preset input quantity of the AD converter to be calibrated, the method further includes:
taking an AD converter with the same model as the AD converter to be calibrated as a prototype, and collecting output data of the prototype for carrying out AD conversion on the preset input quantity at different temperatures;
and drawing a relation curve representing the change of the output data along with the temperature based on the output data at different temperatures, obtaining a temperature drift curve and storing the temperature drift curve.
In one embodiment, the temperature drift profile includes a offset drift profile and a gain drift profile; the compensation coefficient comprises a maladjustment error compensation coefficient and a gain error compensation coefficient; and performing error calibration on the conversion data by adopting the compensation coefficient to obtain calibrated conversion data, wherein the error calibration comprises the following steps:
performing offset error calibration on the conversion data by adopting the offset error compensation coefficient to obtain conversion data after offset error calibration;
and carrying out gain error calibration on the conversion data by adopting the gain error compensation coefficient to obtain conversion data after gain error calibration.
An AD converter error calibration apparatus comprising:
the data reading module is used for reading the conversion data output by the AD converter to be calibrated;
the temperature acquisition module is used for acquiring the working temperature of the AD converter to be calibrated;
the coefficient determining module is used for determining a compensation coefficient corresponding to the working temperature according to the stored temperature drift curve and ideal conversion data of the AD converter to be calibrated, which corresponds to the preset input quantity; the temperature drift curve represents the relation between data of the preset input quantity after AD conversion and temperature;
and the error calibration module is used for carrying out error calibration on the conversion data by adopting the compensation coefficient to obtain the conversion data after calibration.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
reading conversion data output by an AD converter to be calibrated;
acquiring the working temperature of the AD converter to be calibrated;
determining a compensation coefficient corresponding to the working temperature according to the stored temperature drift curve and ideal conversion data of the AD converter to be calibrated corresponding to a preset input quantity; the temperature drift curve represents the relation between data of the preset input quantity after AD conversion and temperature;
and carrying out error calibration on the conversion data by adopting the compensation coefficient to obtain the conversion data after calibration.
A controller comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
reading conversion data output by an AD converter to be calibrated;
acquiring the working temperature of the AD converter to be calibrated;
determining a compensation coefficient corresponding to the working temperature according to the stored temperature drift curve and ideal conversion data of the AD converter to be calibrated corresponding to a preset input quantity; the temperature drift curve represents the relation between data of the preset input quantity after AD conversion and temperature;
and carrying out error calibration on the conversion data by adopting the compensation coefficient to obtain the conversion data after calibration.
The servo driver comprises a power device, a current sampling circuit, an AD converter and the controller, wherein the AD converter is connected with the current sampling circuit and the controller, and the controller is also connected with the power device;
the current sampling circuit is used for sampling the current of the power device and outputting a current sampling analog quantity to the AD converter;
the AD converter is used for carrying out AD conversion on the input current sampling analog quantity, outputting conversion data and sending the conversion data to the controller;
and after obtaining the calibrated conversion data, the controller outputs a driving signal to the power device according to the calibrated conversion data.
In one embodiment, the servo driver further comprises a temperature monitoring device connected with the controller;
the temperature monitoring device is used for monitoring the temperature of the working environment where the AD converter is located and sending the temperature to the controller, and the controller obtains the working temperature of the AD converter according to the temperature monitored by the temperature monitoring device.
One or more embodiments of the above-described solution may have the following advantages or benefits compared to the prior art: monitoring the working temperature of the AD converter to be calibrated, determining a compensation coefficient under the working temperature based on the working temperature, carrying out error calibration on actual conversion data of the AD converter to be calibrated under the working temperature, realizing the error calibration through temperature compensation, solving the problem of error drift caused by the working temperature, improving the error calibration accuracy of the AD converter, and improving the data reading accuracy of the AD converter, thereby improving the conversion accuracy of the AD converter. When the AD converter is applied to a servo driver to convert a current sampling signal, the accuracy of current sampling can be improved, so that the servo control accuracy is improved, the rotation speed fluctuation and torque fluctuation of a servo system during working are reduced, and the stability of the system is improved.
Drawings
The scope of the present disclosure may be better understood by reading the following detailed description of exemplary embodiments in conjunction with the accompanying drawings. The drawings included herein are:
fig. 1 is a schematic diagram illustrating an AD converter offset error and a gain error;
FIG. 2 is a flow chart of an AD converter error calibration method according to one embodiment;
FIG. 3 is a logic block diagram of servo drive temperature monitoring;
FIG. 4 is a flowchart of an AD converter error calibration method according to another embodiment;
FIG. 5 is a block diagram of processing logic for AD converter error calibration in one embodiment;
FIG. 6 is a logic block diagram of a servo driver reading current values through temperature compensation;
FIG. 7 is a schematic diagram of offset drift curves in one embodiment;
FIG. 8 is a schematic diagram of a gain drift curve in one embodiment;
fig. 9 is a block diagram showing the structure of an AD converter error calibration apparatus in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the following detailed description of the implementation method of the present application will be given with reference to the accompanying drawings and examples, by which the technical means are applied to solve the technical problems, and the implementation process for achieving the technical effects can be fully understood and implemented accordingly.
The AD converter is a device for converting analog quantity into digital quantity, and when the AD converter is applied to a servo driver, a main chip in the servo driver can read the numerical value converted by the AD converter in real time when working. An AD converter with 16-bit precision, an analog input voltage range of-320 mV to +320mV and a rated operating voltage range of-250 mV to +250mV is taken as an example, and is shown in Table 1.
TABLE 1
Analog input -320mV -250mV 0V +250mV +320mV
Numerical value 0 7168 32768 58368 65536
The offset error of the AD converter is a difference between the actual digital quantity and the theoretical digital quantity (the 16-bit precision corresponding value is 32768) when the input analog quantity is 0V. The gain errors include a positive full-scale gain error and a negative full-scale gain error. The positive full-scale gain error is the difference between the actual digital quantity corresponding to the rated positive full-scale voltage (16-bit precision corresponds to +250 mV) and the theoretical digital quantity (16-bit precision corresponds to 58368); the negative full-scale gain error is the difference between the actual digital quantity corresponding to the nominal negative full-scale voltage (16-bit precision corresponds to-250 mV) and the theoretical digital quantity (16-bit precision corresponds to 7168).
As shown in fig. 1, the offset of the transfer function of the AD converter and the gain error are represented by the analog quantity on the ordinate and the digital quantity on the abscissa, the AD converter converts the analog quantity into the corresponding digital quantity according to the straight line shown in fig. 1, and the gain is understood as the slope of the straight line (d=kv+b, digital quantity D, gain k, analog quantity V, where analog quantity refers to voltage value, constant b).
In the prior art, users typically calibrate these errors at room temperature, but it has been found that, under the influence of temperature, the actual errors deviate from the theoretical errors, i.e. the offset errors and gain errors drift with temperature. In servo control applications, special attention is required to the offset error and the temperature drift of the gain error, which can affect the control accuracy of the system. Misalignment and gain errors with temperature change are more difficult to calibrate than absolute misalignment and gain errors.
Based on the above, the application provides a scheme for performing temperature compensation on the AD converter in current sampling, so as to realize error calibration on the AD converter.
In one embodiment, an AD converter error calibration method is provided that may be applied to a controller that reads the digital quantity of an AD converter, such as the controller may be the master chip in a servo driver. Taking the controller as an example, as shown in fig. 2, the AD converter error calibration method includes the following steps:
s110: the conversion data output from the AD converter to be calibrated is read.
The to-be-calibrated AD converter is an AD converter that needs to perform error calibration on the digital quantity, for example, the AD converter may be an AD converter in a finished servo driver, and in the working process of the servo driver, the AD converter needs to perform error calibration. Specifically, the conversion data output from the AD converter means a digital amount output from the AD converter after AD-converting the input analog amount; the input analog quantity may be a current sampling analog quantity output by a current sampling circuit for an AD converter in the servo driver.
S130: the operating temperature of the AD converter to be calibrated is acquired.
S150: and determining a compensation coefficient corresponding to the working temperature according to the stored temperature drift curve and ideal conversion data of the AD converter to be calibrated corresponding to the preset input quantity.
The temperature drift curve represents the relation between data of the preset input quantity after AD conversion and temperature; specifically, the temperature drift curve is a relation curve of data output after the AD converter to be calibrated performs AD conversion on the preset input amount and temperature, and may reflect data output after the AD conversion on the preset input amount at each different temperature. The ideal conversion data of the to-be-calibrated AD converter corresponding to the preset input amount refers to data output after the AD converter performs AD conversion on the preset input amount under theoretical conditions.
Wherein the preset input amount may include one or more. Specifically, the preset input may include 0V and a full scale voltage of the AD converter to be calibrated, and the full scale voltage may include a positive full scale voltage and a negative full scale voltage.
Specifically, the controller may search for data corresponding to the operating temperature based on the temperature drift curve, and then calculate the compensation coefficient according to the deviation between the searched data and the ideal conversion data. The compensation coefficient is equal to the deviation of the preset input quantity between the actual data after the AD conversion and the theoretical data, namely the deviation of the AD conversion performed by the AD converter when the input quantity is preset.
S170: and carrying out error calibration on the conversion data by adopting the compensation coefficient to obtain the conversion data after calibration.
And carrying out error calibration on the conversion data by adopting a compensation coefficient, namely carrying out temperature compensation on the actual conversion data of the AD converter at the working temperature by taking the deviation of AD conversion at the corresponding working temperature and the preset input quantity as a reference quantity, so as to realize error calibration.
According to the error calibration method for the AD converter, the working temperature of the AD converter to be calibrated is monitored, the compensation coefficient at the working temperature is determined based on the working temperature, the actual conversion data of the AD converter to be calibrated at the working temperature is subjected to error calibration, the error calibration is realized through temperature compensation, the problem of error drift caused by the working temperature is solved, the error calibration accuracy of the AD converter is improved, the data reading accuracy of the AD converter is higher, and therefore the conversion accuracy of the AD converter is improved. When the AD converter is applied to a servo driver to convert a current sampling signal, the accuracy of current sampling can be improved, so that the servo control accuracy is improved, the rotation speed fluctuation and torque fluctuation of a servo system during working are reduced, and the stability of the system is improved.
In one embodiment, step S130 includes a first step and a second step.
A first step of: collecting the temperature monitored by a temperature monitoring device; the temperature monitoring device is arranged in the working environment where the AD converter to be calibrated is located.
That is, the temperature monitoring device and the AD converter to be calibrated are in the same working environment, so that the temperature monitored by the temperature monitoring device is closer to the temperature of the AD converter to be calibrated. For example, the servo driver is generally provided with a temperature acquisition module, and the operation condition of the system is monitored, and the temperature acquisition module can be used as a temperature monitoring device for temperature monitoring.
And a second step of: and obtaining the working temperature of the AD converter to be calibrated according to the temperature monitored by the temperature monitoring device.
The temperature monitored by the temperature monitoring device is the same as the working environment of the AD converter to be calibrated, and the working temperature of the AD converter to be calibrated is obtained according to the monitored temperature, so that the accuracy is high.
In one embodiment, the second step comprises: and calculating the sum of the temperature monitored by the temperature monitoring device and a preset relation coefficient to obtain the working temperature of the AD converter to be calibrated.
The preset relation coefficient may be specifically set according to actual situations. For the temperature monitoring device and the AD converter belonging to the same servo driver, the temperature monitoring device is generally used for monitoring the temperature near the devices such as power devices and the like in the servo driver, and the temperature monitoring device and the AD converter of each servo driver can be considered to have a definite relation coefficient K because the servo driver is generally provided with a relatively closed shell to prevent dust from entering, so that the temperature of the working environment of the AD converter and the working environment of the power devices are close. As shown in fig. 3, assuming that the temperature monitored in real time is T1, the operation temperature t2=t1+k of the AD converter. In this way, the operating temperature of the AD converter to be calibrated can be obtained more accurately.
In one embodiment, referring to fig. 4, step S101 and step S103 are further included before step S150.
S101: taking an AD converter with the same model as the AD converter to be calibrated as a prototype, and collecting output data of the prototype for carrying out AD conversion on preset input quantities at different temperatures.
Specifically, a temperature test may be performed by using a prototype, placing the prototype in a thermostatic chamber capable of adjusting temperature, and testing output data of the prototype for AD conversion of a preset input amount at different temperatures.
S103: and drawing a relation curve representing the change of the output data along with the temperature based on the output data at different temperatures, obtaining a temperature drift curve and storing the temperature drift curve.
The AD converter with the same model as the AD converter to be calibrated is adopted in advance for testing, and a temperature drift curve is generated and stored according to the tested data, so that the subsequent use is facilitated. Preferably, step S101 and step S103 may be performed before step S110, a temperature drift curve corresponding to the AD converter to be calibrated is determined in a product development stage, and error calibration is performed by performing steps S110 to S170 in a product use stage.
Specifically, the number of prototypes may be plural. Sample data acquisition is carried out by adopting a plurality of prototypes, so that the obtained data is more reliable, and the drawn temperature drift curve is more accurate.
For example, taking 10 prototypes, wherein the preset input quantity comprises 0V and full-scale voltage as examples, taking 10 prototypes for temperature test, and the 10 prototypes are the same as the AD converter to be calibrated; 10 prototypes are put into the same thermostatic chamber, and at one temperature, the numerical values of all prototypes are read in real time only by powering on and not starting through setting the working state of a servo driver to which the prototypes belong, namely, the data read by the AD conversion is input at 0V, and the readings of a plurality of prototypes are averaged to obtain output data when the input at the temperature is 0V; and in the test process, the temperature in the constant temperature chamber is adjusted from-20 ℃ to 100 ℃, and a relation curve is drawn according to output data at different temperatures, so that a temperature drift curve when the preset input quantity is 0V is obtained. Similarly, at a temperature, the servo driver is enabled to work in a full-scale state (including a positive full-scale state and a negative full-scale state), the numerical value of each prototype is read in real time, namely, the data read when the input is the full-scale voltage is obtained through AD conversion, and the readings of a plurality of prototypes are averaged to obtain output data when the input is the full-scale voltage at the temperature; and regulating the temperature in the constant temperature chamber, and drawing a relation curve according to output data at different temperatures to obtain a temperature drift curve when the preset input quantity is full-scale voltage.
In one embodiment, the temperature drift curve includes a detuning drift curve and a gain drift curve; the compensation coefficients include offset error compensation coefficients and gain error compensation coefficients. The offset drift curve is a temperature drift curve with a preset input quantity of 0V, and represents the relation between data and temperature after AD conversion of 0V; the gain drift curve is a temperature drift curve when the preset input quantity is full-scale voltage, and represents the relation between data and temperature after AD conversion of the full-scale voltage. The offset error compensation coefficient is a compensation coefficient obtained according to an offset drift curve and ideal conversion data of which the input quantity corresponds to 0V and the AD converter to be calibrated corresponds to the preset input quantity, and the gain error compensation coefficient is a compensation coefficient obtained according to the gain drift curve and ideal conversion data of which the input quantity corresponds to the preset input quantity and is full-scale voltage.
In this embodiment, step S101 includes: and taking the AD converter with the same model as the AD converter to be calibrated as a prototype, and respectively collecting output data of the prototype for carrying out AD conversion on 0V and full-scale voltage at different temperatures to obtain 0V output data and full-scale output data.
Step S103 includes: and drawing a relation curve representing the change of the 0V output data along with the temperature based on the 0V output data at different temperatures, obtaining and storing a detuning drift curve. And drawing a relation curve representing the change of the full-scale output data along with the temperature based on the full-scale output data at different temperatures, and obtaining and storing a gain drift curve.
Specifically, step S170 includes: performing offset error calibration on the conversion data by adopting offset error compensation coefficients to obtain conversion data after offset error calibration; and carrying out gain error calibration on the conversion data by adopting the gain error compensation coefficient to obtain the conversion data after the gain error calibration.
As shown in fig. 5. The offset error compensation coefficient is adopted to calibrate the offset error of the conversion error, the calibrated conversion data is more approximate to ideal conversion data corresponding to 0V (the corresponding value of 16-bit precision is 32768), the gain error compensation coefficient is adopted to calibrate the gain error of the conversion data, the calibrated conversion data is more approximate to ideal conversion data corresponding to full-scale voltage (the corresponding value of 16-bit precision positive full-scale voltage is 58368 and the corresponding value of 16-bit precision negative full-scale voltage is 7168), and the offset error and the gain error are respectively calibrated, so that the calibration precision is high.
The compensation coefficient may be the difference between the data corresponding to the operating temperature in the temperature drift curve and the ideal conversion data. Specifically, the offset error compensation coefficient may be a value obtained by subtracting ideal conversion data corresponding to 0V from data corresponding to the operating temperature in the offset drift curve; correspondingly, the misalignment error correction may be a value calculated from the conversion data minus the misalignment error compensation factor. Specifically, the gain error compensation coefficient may be a value obtained by subtracting ideal conversion data corresponding to the full-scale voltage from data corresponding to the operating temperature in the gain drift curve; correspondingly, the gain error calibration may be calculating the conversion data minus the value of the gain error compensation coefficient.
For example, as shown in fig. 6, taking a 16-bit precision AD converter of the servo driver as an example, as shown in fig. 7, the ordinate value in the curve is the AD converted value corresponding to the voltage 0V at different operating temperatures of the AD converter. The voltage of 0V is 32768, but the values corresponding to different working temperatures deviate from 32768 due to the influence of temperature drift, and the deviation is an offset error. If the value read at 80 ℃ is 32760, the offset error is-8 and the offset error compensation coefficient is-8. Therefore, when the AD converter to be calibrated works at 80 ℃, the controller reads the AD converted data, compensates the difference value, and increases 8 on the basis of the read value, and the process is called temperature compensation and is also offset error calibration. As shown in FIG. 8, the ordinate value in the graph is the AD converted value corresponding to the positive full-scale voltage of 250mV at different operating temperatures of the AD converter. The same principle is that the difference between the actual read value and the ideal conversion data is compensated at different working temperatures, namely the gain error calibration.
Assuming that the AD converter operates at 80 ℃ and at a voltage of 0V, the data is 32760, the error is offset by-8, and if the error calibration is not performed, the controller considers that the voltage at that time is less than 0V, and the controller performs motor control operation according to the voltage value at that time, so that the control accuracy is affected. When the voltage changes, the actual data and the theoretical data are all different by-8. If the controller performs offset error calibration, 8 (compensation value) is added to the value read each time, and the theoretical value and the actual value are paired. Similarly, assuming that the AD converter is operating at 80℃ and voltage +250mV, the read data is 57780, but when the controller reads 58368, the actual voltage value is greater than 250mV, so the gain is reduced. If error calibration is not performed, the controller will always operate with a smaller gain. When the controller reads data, the deviation value is complemented by gain error calibration, so that the gain is correct, and the control precision is improved.
It should be understood that, although the steps in the flowcharts of fig. 2 and 4 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least a portion of the steps in fig. 2, 4 may include a plurality of steps or stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily sequential, but may be performed in rotation or alternatively with at least a portion of the steps or stages in other steps or other steps.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, or the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like.
In one embodiment, as shown in fig. 9, an AD converter error calibration apparatus is provided, which includes a data reading module 910, a temperature acquisition module 930, a coefficient determination module 950, and an error calibration module 970.
The data reading module 910 is configured to read conversion data output by the AD converter to be calibrated; the temperature acquisition module 930 is configured to acquire an operating temperature of the AD converter to be calibrated; the coefficient determining module 950 is configured to determine a compensation coefficient corresponding to the working temperature according to the stored temperature drift curve and ideal conversion data corresponding to a preset input amount of the AD converter to be calibrated; the temperature drift curve represents the relation between data of the preset input quantity after AD conversion and temperature; the error calibration module 970 is configured to perform error calibration on the conversion data using the compensation coefficient, so as to obtain the conversion data after calibration.
According to the AD converter error calibration device, the working temperature of the AD converter to be calibrated is monitored, the compensation coefficient under the working temperature is determined based on the working temperature, the actual conversion data of the AD converter to be calibrated under the working temperature is subjected to error calibration, the error calibration is realized through temperature compensation, the problem of error drift caused by the working temperature is solved, the error calibration accuracy of the AD converter is improved, the data reading accuracy of the AD converter is higher, and therefore the conversion accuracy of the AD converter is improved.
In one embodiment, the temperature acquisition module 930 acquires the temperature monitored by the temperature monitoring device; and obtaining the working temperature of the AD converter to be calibrated according to the temperature monitored by the temperature monitoring device. The temperature monitoring device is arranged in the working environment where the AD converter to be calibrated is located.
The temperature monitored by the temperature monitoring device is the same as the working environment of the AD converter to be calibrated, and the working temperature of the AD converter to be calibrated is obtained according to the monitored temperature, so that the accuracy is high.
In one embodiment, the temperature obtaining module 930 obtains the operating temperature of the AD converter to be calibrated according to the temperature monitored by the temperature monitoring device, including: and calculating the sum of the temperature monitored by the temperature monitoring device and a preset relation coefficient to obtain the working temperature of the AD converter to be calibrated.
In one embodiment, the above-mentioned error calibration device for an AD converter further includes a curve plotting module, configured to sample an AD converter of the same type as the AD converter to be calibrated, and collect output data of the sample for AD conversion of a preset input amount at different temperatures, before the coefficient determining module 950 performs a corresponding function; and drawing a relation curve representing the change of the output data along with the temperature based on the output data at different temperatures, obtaining a temperature drift curve and storing the temperature drift curve.
In one embodiment, the temperature drift curve includes a detuning drift curve and a gain drift curve; the compensation coefficients include offset error compensation coefficients and gain error compensation coefficients. The error calibration module 970 performs offset error calibration on the conversion data by using the offset error compensation coefficient to obtain conversion data after offset error calibration; and carrying out gain error calibration on the conversion data by adopting the gain error compensation coefficient to obtain the conversion data after the gain error calibration.
For specific limitations of the AD converter error calibration device, reference may be made to the above limitations of the AD converter error calibration method, and no further description is given here. The respective modules in the above-described AD converter error calibration apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the controller, or may be stored in software in a memory in the controller, so that the processor may call and execute operations corresponding to the above modules. It should be noted that, in the embodiment of the present application, the division of the modules is schematic, which is merely a logic function division, and other division manners may be implemented in actual implementation.
In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, which when executed by a processor, implements the steps of the method in the above embodiments.
The computer readable storage medium can improve the accuracy of error calibration and the conversion accuracy of the AD converter, since the steps of the method in each of the embodiments can be realized.
In one embodiment, a controller is provided that includes a memory having a computer program stored therein and a processor that when executing the computer program performs the steps of the methods of the embodiments described above.
The controller can realize the steps of the method in each embodiment, and similarly can improve the accuracy of error calibration and the conversion accuracy of the AD converter; when the servo control device is applied to a servo driver, the accuracy of current sampling can be improved, further servo control accuracy is improved, rotation speed fluctuation and torque fluctuation of a servo system during working are reduced, and the stability of the system is improved.
In one embodiment, a servo driver is provided, which comprises a power device, a current sampling circuit, an AD converter and the controller, wherein the AD converter is connected with the current sampling circuit and the controller, and the controller is also connected with the power device. The current sampling circuit is used for sampling the current of the power device and outputting a current sampling analog quantity to the AD converter; the AD converter is used for carrying out AD conversion on the input current sampling analog quantity, outputting conversion data and sending the conversion data to the controller; after obtaining the calibrated conversion data, the controller outputs a driving signal to the power device according to the calibrated conversion data.
The output current of the power device is equal to the current of the drive motor of the servo driver. The controller is used as a main chip in the servo driver, and when the controller works, conversion data output by the AD converter can be read in real time, a current value sampled by the current sampling circuit is obtained according to the conversion data, and a driving signal is output to the power device according to the current value, so that driving control is realized.
The servo driver adopts the controller capable of realizing the method in each embodiment, and the like, so that the accuracy of current sampling can be improved, further the servo control accuracy is improved, the rotation speed fluctuation and torque fluctuation of a servo system during working are reduced, and the stability of the system is improved.
In one embodiment, the servo driver further comprises a temperature monitoring device connected with the controller; the temperature monitoring device is used for monitoring the temperature of the working environment where the AD converter is located and sending the temperature to the controller, and the controller obtains the working temperature of the AD converter according to the temperature monitored by the temperature monitoring device. Specifically, the temperature monitoring device is arranged in the working environment where the AD converter is located. For example, the servo driver comprises a closed shell, and the power device, the current sampling circuit, the AD converter, the controller and the temperature monitoring device are all arranged in the shell, wherein the working temperature of the AD converter is close to the temperature monitored by the temperature monitoring device.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
Although the embodiments of the present application are disclosed above, the embodiments are only used for the convenience of understanding the present application, and are not intended to limit the present application. Any person skilled in the art can make any modification and variation in form and detail without departing from the spirit and scope of the present disclosure, but the scope of the present disclosure is still subject to the scope of the present disclosure as defined by the appended claims.

Claims (9)

1. An AD converter error calibration method, comprising:
reading conversion data output by an AD converter to be calibrated;
acquiring the working temperature of the AD converter to be calibrated;
subtracting ideal conversion data corresponding to the AD converter to be calibrated when the input quantity is 0V from data corresponding to the working temperature in the existing offset drift curve to obtain an offset error compensation coefficient; wherein the offset drift curve characterizes the relationship between data after AD conversion of 0V and temperature; subtracting the offset error compensation coefficient from the conversion data to perform offset error calibration on the conversion data;
subtracting ideal conversion data corresponding to the AD converter to be calibrated when the input quantity is full-scale voltage from data corresponding to the working temperature in the stored gain drift curve to obtain a gain error compensation coefficient; the gain drift curve represents the relation between data and temperature after AD conversion of full-scale voltage;
the gain error compensation coefficient is subtracted from the conversion data to perform gain error calibration on the conversion data.
2. The method according to claim 1, wherein said obtaining the operating temperature of the AD converter to be calibrated comprises:
the temperature monitoring device is arranged in the working environment where the AD converter to be calibrated is located;
and obtaining the working temperature of the AD converter to be calibrated according to the temperature monitored by the temperature monitoring device.
3. The method according to claim 2, wherein the obtaining the operating temperature of the AD converter to be calibrated from the temperature monitored by the temperature monitoring device comprises:
and calculating the sum of the temperature monitored by the temperature monitoring device and a preset relation coefficient to obtain the working temperature of the AD converter to be calibrated.
4. The method according to claim 1, wherein the method further comprises:
taking an AD converter with the same model as the AD converter to be calibrated as a prototype, and collecting output data of the prototype for carrying out AD conversion on 0V at different temperatures;
based on output data of AD conversion on 0V at different temperatures, describing a relation curve representing the change of the output data of AD conversion on 0V along with the temperature, obtaining and storing a detuning drift curve;
taking an AD converter with the same model as the AD converter to be calibrated as a prototype, and collecting output data of the prototype for carrying out AD conversion on full-scale voltage at different temperatures;
and drawing a relation curve representing the change of the output data for carrying out AD conversion on the full-scale voltage along with the temperature based on the output data for carrying out AD conversion on the full-scale voltage at different temperatures, obtaining and storing a gain drift curve.
5. An AD converter error calibration apparatus, comprising:
the data reading module is used for reading the conversion data output by the AD converter to be calibrated;
the temperature acquisition module is used for acquiring the working temperature of the AD converter to be calibrated;
the coefficient determining module is used for subtracting ideal conversion data corresponding to the AD converter to be calibrated when the input quantity is 0V from data corresponding to the working temperature in the stored offset drift curve to obtain an offset error compensation coefficient; wherein the offset drift curve characterizes the relationship between data after AD conversion of 0V and temperature;
the coefficient determining module is further used for subtracting ideal conversion data corresponding to the AD converter to be calibrated when the input quantity is full-scale voltage from data corresponding to the working temperature in the stored gain drift curve to obtain a gain error compensation coefficient; the gain drift curve represents the relation between data and temperature after AD conversion of full-scale voltage;
the error calibration module is used for subtracting the offset error compensation coefficient from the conversion data so as to calibrate the offset error of the conversion data;
the error calibration module is further configured to subtract the gain error compensation coefficient from the conversion data to perform gain error calibration on the conversion data.
6. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 4.
7. A controller comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 4 when the computer program is executed.
8. A servo driver, comprising a power device, a current sampling circuit, an AD converter, and the controller of claim 7, wherein the AD converter connects the current sampling circuit and the controller, and the controller is further connected to the power device;
the current sampling circuit is used for sampling the current of the power device and outputting a current sampling analog quantity to the AD converter;
the AD converter is used for carrying out AD conversion on the input current sampling analog quantity, outputting conversion data and sending the conversion data to the controller;
and after obtaining the calibrated conversion data, the controller outputs a driving signal to the power device according to the calibrated conversion data.
9. The servo drive of claim 8 further comprising a temperature monitoring device connected to the controller;
the temperature monitoring device is used for monitoring the temperature of the working environment where the AD converter is located and sending the temperature to the controller, and the controller obtains the working temperature of the AD converter according to the temperature monitored by the temperature monitoring device.
CN202110770020.7A 2021-07-06 2021-07-06 AD converter error calibration method, device, controller and servo driver Active CN113422606B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110770020.7A CN113422606B (en) 2021-07-06 2021-07-06 AD converter error calibration method, device, controller and servo driver

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110770020.7A CN113422606B (en) 2021-07-06 2021-07-06 AD converter error calibration method, device, controller and servo driver

Publications (2)

Publication Number Publication Date
CN113422606A CN113422606A (en) 2021-09-21
CN113422606B true CN113422606B (en) 2023-08-11

Family

ID=77720542

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110770020.7A Active CN113422606B (en) 2021-07-06 2021-07-06 AD converter error calibration method, device, controller and servo driver

Country Status (1)

Country Link
CN (1) CN113422606B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114440934A (en) * 2022-03-11 2022-05-06 恒玄科技(上海)股份有限公司 Method, device, equipment and storage medium for temperature compensation of measurement result

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5488368A (en) * 1993-05-28 1996-01-30 Technoview Inc. A/D converter system and method with temperature compensation
JP2006340042A (en) * 2005-06-02 2006-12-14 Mitsubishi Electric Corp Calibration device and calibration method
CN102478823A (en) * 2010-11-22 2012-05-30 大连创达技术交易市场有限公司 Novel system and method for compensating temperature of numerical control machine tool
CN206431454U (en) * 2016-12-15 2017-08-22 清能德创电气技术(北京)有限公司 A kind of servo-driver of AD correction coefficient self-correcting
WO2020255218A1 (en) * 2019-06-17 2020-12-24 三菱電機株式会社 Analog-to-digital conversion device, and control program for analog-to-digital conversion device
CN112332845A (en) * 2020-11-04 2021-02-05 南京理工大学 High-precision current frequency conversion circuit
CN112444271A (en) * 2020-11-11 2021-03-05 许继集团有限公司 Method for dynamically compensating measurement error in high-temperature and low-temperature environment
CN112583405A (en) * 2019-09-30 2021-03-30 珠海格力电器股份有限公司 ADC error automatic correction method, device, analog-to-digital conversion circuit and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5488368A (en) * 1993-05-28 1996-01-30 Technoview Inc. A/D converter system and method with temperature compensation
JP2006340042A (en) * 2005-06-02 2006-12-14 Mitsubishi Electric Corp Calibration device and calibration method
CN102478823A (en) * 2010-11-22 2012-05-30 大连创达技术交易市场有限公司 Novel system and method for compensating temperature of numerical control machine tool
CN206431454U (en) * 2016-12-15 2017-08-22 清能德创电气技术(北京)有限公司 A kind of servo-driver of AD correction coefficient self-correcting
WO2020255218A1 (en) * 2019-06-17 2020-12-24 三菱電機株式会社 Analog-to-digital conversion device, and control program for analog-to-digital conversion device
CN112583405A (en) * 2019-09-30 2021-03-30 珠海格力电器股份有限公司 ADC error automatic correction method, device, analog-to-digital conversion circuit and storage medium
CN112332845A (en) * 2020-11-04 2021-02-05 南京理工大学 High-precision current frequency conversion circuit
CN112444271A (en) * 2020-11-11 2021-03-05 许继集团有限公司 Method for dynamically compensating measurement error in high-temperature and low-temperature environment

Also Published As

Publication number Publication date
CN113422606A (en) 2021-09-21

Similar Documents

Publication Publication Date Title
CN108474820B (en) Reference circuit for a metrology system
US9857782B2 (en) Output value correction method for physical quantity sensor apparatus, output correction method for physical quantity sensor, physical quantity sensor apparatus and output value correction apparatus for physical quantity sensor
US20210356329A1 (en) Device and Method for Determining a Temperature or a Temperature-Dependent Value Usable for Determining the Temperature, Temperature Sensor, Pressure Sensor and Combination Sensor
JP2008513766A (en) Digital temperature sensor and its calibration
JP2007164865A (en) Semiconductor memory device
TWI742133B (en) Stress-impaired signal correction circuit
CN113422606B (en) AD converter error calibration method, device, controller and servo driver
CN113951859B (en) Intracranial pressure sensor signal conditioning method
CN112688687A (en) Method and device for acquiring physical information to be tested, computer equipment and storage medium
CN109029791B (en) Temperature sensor calibration method for resisting reverse early effect
CN114499521A (en) Signal calibration method and device, computer equipment and storage medium
CN101753139B (en) Switching unit for generating an output voltage as a function of a digital data valve and method for calibrating the switching unit
CN115166492A (en) Chip parameter acquisition circuit
CN110857890A (en) High-precision temperature detection method and device
CN111982357B (en) Algorithm and system for stabilizing temperature test value of temperature sensor
CN112393814B (en) Wide-range temperature calculation method, wide-range temperature calculation system, temperature sensor and temperature measurement method
CN112782425A (en) Acceleration measurement channel temperature compensation method and system of laser strapdown inertial measurement unit
CN111551771A (en) IF chip and digital compensation method thereof
CN114675074B (en) VDDA correction device and correction method of MCU
CN113612478B (en) ADC key circuit calibration method, system, storage medium and key circuit
JP2019015526A (en) Temperature detection device and error correction method
CN110771029A (en) Method and device for moving an actuator of an actuator device into a nominal position, and actuator device
JP2011198466A (en) Semiconductor memory device
KR20190047556A (en) Autonomic Calibration method in Sensor Measuring Device
CN117938161A (en) High-precision automatic compensation testing method

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
GR01 Patent grant
GR01 Patent grant