A calibration system and method for closed-loop self-calibration of motors.
By designing a combination of angle sensors and controllers in the closed-loop control system of the motor, the angle correction parameters are automatically calibrated under normal working conditions, solving the problems of nonlinear errors and additional equipment, and improving system stability and efficiency.
Patent Information
- Application Number
- CN202411231480.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2044-09-04
AI Technical Summary
In the prior art, the angle sensor has nonlinear error in the closed-loop control system, which affects the stability of the system and requires calibration of angle correction parameters in the non-operating state, adding additional equipment and the system temporarily becomes open-loop state. demand.
Design a calibration system for closed-loop self-calibration of motors, including angle sensors and controllers. The angle sensor has an angle correction module, which can automatically calibrate angle correction parameters in normal working conditions, and is stable through parameter calculator, error correction device, and system Components such as monitors and nonvolatile memory enable self-calibration.
It realizes automatic calibration of angle correction parameters without removing additional equipment in the normal working state of the motor, which improves system stability and efficiency and avoids the defect of the system temporarily becoming open-loop state.
Smart Images

Figure CN118739954B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of encoders, and in particular to a calibration system and method for closed-loop self-calibration of a motor. Background Art
[0002] Angle sensors (encoders) play a key role in closed-loop control systems, but they generally have nonlinear errors. These errors affect the stability of the system and usually appear as periodic fluctuations in speed.
[0003] Nonlinear error refers to the error caused by the nonlinear relationship between the encoder measurement output and the actual physical quantity. Nonlinear error occurs when the relationship between the encoder output and the actual physical quantity is not a simple linear relationship. This error is usually caused by some factors in the design, manufacturing or installation process of the encoder, such as the nonlinear characteristics of the optical system, magnetic system or mechanical structure.
[0004] The relationship between the encoder output angle and the actual angle is not a simple linear relationship and cannot be expressed by a function. It is necessary to create a lookup table to record some key reference points and their angle correction parameters to map the encoder output to the actual position or angle. The angle between key reference points can be fitted to the nonlinear output of the encoder using a polynomial function in a local range. By finding an appropriate polynomial fit, nonlinear errors can be reduced over the entire measurement range. The order of the polynomial fit can be selected according to the specific situation.
[0005] When the angle correction parameters need to be calibrated, a reference encoder (such as an optical encoder) can be used for calibration. This method is called "Torching".
[0006] refer to Figure 1 , Figure 1 The following is a block diagram of a system that implements the "drag-and-drop" method to calibrate a motor. The basic principle of drag-and-drop is to superimpose an additional reference encoder on the actual output of the encoder to be calibrated. The purpose of this is to measure the actual output of the encoder to be calibrated and compare it with the accurate output of the reference encoder.
[0007] exist Figure 1In the system block diagram shown, the calibration system includes a motor, a driver for driving the motor, and a controller for controlling the driver. In addition to installing an angle sensor (i.e., a magnet and an encoder to be calibrated) on the motor, an additional reference encoder needs to be superimposed. Both the reference encoder and the encoder to be calibrated are used to detect the rotation angle of the motor; the reference encoder can be an encoder with higher measurement accuracy than the encoder to be calibrated. Generally, a calibrated optical encoder is selected to output an accurate reference angle. At the same time, a computer host computer is also included, which is used to determine the angle error based on the reference angle sent by the reference encoder and the angle to be calibrated sent by the encoder to be calibrated, and send the angle error to the encoder to be calibrated to complete the calibration. When the calibration is completed, the reference encoder and the computer host computer need to be removed, and then the motor will run again.
[0008] It can be seen that in the above-mentioned related technology system, the inventor believes that there are the following problems: 1. It is necessary to compare and calibrate with the reference encoder, which adds additional equipment; 2. It is necessary to temporarily change the closed-loop system into an open-loop system, and calibrate the angle correction parameters in the non-working state where the motor is running at a constant speed. That is, it is necessary to suspend the normal working state, and install additional equipment such as a reference encoder and a host computer before calibrating the angle correction parameters in the non-working state; after the calibration is completed, it is necessary to remove the additional equipment such as the reference encoder and the host computer before resuming the normal working state. The normal working state and the non-working state here cannot be transformed in a senseless manner by internal instructions.
[0009] Therefore, there is a need for a calibration system that can automatically calibrate angle correction parameters under normal working conditions without removing additional equipment. Summary of the invention
[0010] In order to automatically calibrate the angle correction parameters under normal working conditions, the present application provides a calibration system and method for motor closed-loop self-calibration.
[0011] In a first aspect, the present application provides a calibration system for closed-loop self-calibration of a motor, which adopts the following technical solution: a calibration system for closed-loop self-calibration of a motor comprises: an angle sensor, which is arranged on the motor, and is used to detect the rotation angle of the motor, wherein the angle sensor comprises an angle correction module, and the angle correction module is used to correct the rotation angle according to an angle correction parameter and then output a real-time angle, and the angle correction module has an angle correction parameter self-calibration function to self-calibrate the angle correction parameter according to a preset calibration mode; and a controller, which is communicatively connected to the angle sensor, and the controller is configured to receive the real-time angle, generate a drive signal according to the real-time angle, and send the drive signal to a driver for driving the motor to operate, and the drive signal is used to control the driver to adjust at least one physical parameter to adjust the rotation of the motor.
[0012] A further solution is that the angle correction module includes: a parameter calculator, which is used to receive the rotation angle, and output a new angle correction parameter after calculating the angle correction parameter based on the rotation angle according to the preset calibration mode.
[0013] A further solution is that the angle correction module also includes: an error corrector, which is communicatively connected to the parameter calculator to receive the new angle correction parameter, and outputs the real-time angle after correcting the rotation angle according to the new angle correction parameter; wherein the rotation angle is simultaneously input into the angle input end of the parameter calculator and the angle input end of the error corrector, the output end of the parameter calculator is connected to the parameter input end of the error corrector, and the output end of the error corrector is used to output the real-time angle.
[0014] A further solution is that the angle correction module also includes: a system stability monitor, which is used to receive the rotation angle, and determine whether the system is stable based on the rotation angle, and enable the parameter calculator when the system is stable; wherein the rotation angle is first input into the system stability monitor, and then input into the parameter calculator through the system stability monitor, and the output end of the system stability monitor is connected to the angle input end of the parameter calculator.
[0015] A further solution is that the angle correction module also includes: a first timer, which cyclically outputs the timing time and provides the timing time to the system stability monitor; a trigger button, which accepts the input of the operator and is used to manually trigger the calibration of the angle correction parameters in an initial state or an error state, and its output end is connected to the first timer or the parameter calculator.
[0016] A further solution is that the output end of the trigger button is connected to the first timer and the parameter calculator at the same time.
[0017] A further solution is that the angle correction module further includes: a non-volatile memory for storing the new angle correction parameters and providing them to the parameter calculator after the system is powered on again.
[0018] A further solution is that the controller further includes an angle stabilizer for receiving the real-time angle, eliminating unstable jitters of the real-time angle, and providing the real-time angle after the jitters are eliminated to the drive signal generator.
[0019] A further solution is that the angle stabilizer is a filter.
[0020] A further solution is that the filter is a digital filter.
[0021] A further solution is that the digital filter is a low-pass filter.
[0022] A further solution is that the filter is an analog filter.
[0023] A further solution is that the preset calibration mode includes a timed calibration mode, and the calibration system for motor closed-loop self-calibration periodically self-calibrates the angle correction parameters under normal working conditions.
[0024] A further solution is to further include a second timer for regularly starting the angle correction parameter self-calibration function.
[0025] A further solution is that when the angle correction module further includes a first timer, the first timer and the second timer are the same timer.
[0026] A further solution is that it also includes an oscillator for providing a stable clock for the first timer or the second timer.
[0027] A further solution is that the preset calibration mode includes a real-time calibration mode, and the calibration system for motor closed-loop self-calibration performs self-calibration on the angle correction parameters in real time under normal working conditions.
[0028] A further solution is that the preset calibration mode includes a single calibration mode, and the calibration system for motor closed-loop self-calibration performs self-calibration on the angle correction parameters in an initial state or an error state.
[0029] A further solution is that the angle sensor is one of a magnetic angle sensor, a photoelectric angle sensor, and a resistive angle sensor.
[0030] In a second aspect, the present application also provides a calibration method for closed-loop self-calibration of a motor, which adopts the following technical solution: a calibration method for closed-loop self-calibration of a motor, comprising: setting an angle sensor on the motor, the angle sensor being used to detect the rotation angle of the motor, wherein the angle sensor comprises an angle correction module, and the angle correction module has an angle correction parameter self-calibration function; self-calibrating the angle correction parameter according to a preset calibration mode; using the angle sensor to correct the rotation angle according to the calibrated angle correction parameter and then output a real-time angle; and communicatively connecting a controller to the angle sensor, the controller being configured to receive the real-time angle, generate a drive signal according to the real-time angle, and send the drive signal to a driver for driving the motor to operate, the drive signal being used to control the driver to adjust at least one physical parameter to adjust the rotation of the motor.
[0031] To sum up, the present application does not require the suspension of the motor operation, nor does it require the installation or removal of additional equipment such as reference encoders and host computers, and can start and complete the self-calibration of the angle correction parameters in the normal working state of the motor closed-loop control process. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 The figure is a system block diagram for realizing “drag-and-drop” calibration in the prior art.
[0033] Figure 2 This is a block diagram of the calibration system used for motor closed-loop self-calibration in this application.
[0034] Figure 3 This is a block diagram of the internal structure of an angle correction module according to an embodiment of the present application.
[0035] Figure 4 This is a block diagram of the internal structure of an angle correction module according to another embodiment of the present application.
[0036] Figure 5 This is a block diagram of the internal structure of an angle correction module according to another embodiment of the present application. DETAILED DESCRIPTION
[0037] It should be noted that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features.
[0038] The following describes an embodiment of the present application in conjunction with the drawings in the specification, but the embodiment should not be construed as limiting the present application.
[0039] refer to Figure 2 , Figure 2 The block diagram of the calibration system for closed-loop self-calibration of a motor in the present application is shown in FIG. The embodiment of the present application provides a calibration system for closed-loop self-calibration of a motor, including an angle sensor and a controller.
[0040] The driver is used to drive the motor to run, and the controller is communicatively connected to the angle sensor. The controller is configured to receive the real-time angle, generate a drive signal according to the real-time angle (for example, in some embodiments, the drive signal can be a drive current value), and send the drive signal to the driver. The drive signal is used to control the driver to adjust at least one physical parameter to adjust the rotation of the motor. For example, the driver can adjust the motor operating current, voltage, etc. to adjust the rotation speed of the motor. In the driver of the motor system, the controller, driver, drive tube and other devices can be integrated on the same PCB board or can be separately set, and this application does not limit it.
[0041] The angle sensor can be a magnetic angle sensor, a photoelectric angle sensor, a resistive angle sensor, etc., and the physical quantity sensed by the sensor is not limited. For the convenience of explanation, the embodiment of the present application uses a magnetic angle sensor (i.e., a magnetic encoder) for specific introduction. The magnetic encoder is fixedly arranged on the motor mover or stator. In the embodiment of the present application, the magnetic encoder is fixed relative to the stator of the motor, and the motor shaft is provided with a magnet, which rotates synchronously with the shaft, and the magnetic encoder is used to detect the rotation angle of the magnet. In other embodiments of the present application, an optical encoder can also be used to implement it. For example, the optical encoder can be fixed relative to the stator of the motor, and the motor shaft is provided with a grating, which rotates synchronously with the shaft, and the optical encoder is used to detect the rotation angle of the magnet.
[0042] Regarding the position of the magnetic encoder relative to the magnet, the magnetic encoder can adopt an on-axis detection scheme or an off-axis detection scheme. On-axis detection and off-axis detection are two different ways of magnetic induction detection in the art. It is understandable that the magnetic encoder provided in the present application adopts an on-axis detection scheme, and the magnetic encoder is located on the axial side of the magnet along the output shaft of the motor to obtain a higher angle detection accuracy.
[0043] It can be understood that in the embodiment of the present application, the angle sensor includes an angle correction module, which has an angle correction parameter self-calibration function, for correcting the rotation angle according to the angle correction parameter and then outputting the real-time angle, and self-calibrating the angle correction parameter according to a preset calibration mode.
[0044] Under normal working conditions of the embodiment of the present application, the angle sensor detects the rotation angle of the motor in real time, and sends the real-time angle generated according to the rotation angle to the controller. The controller generates a drive signal according to the real-time angle and sends the drive signal to the driver. The driver adjusts the rotation of the motor in real time according to the drive signal.
[0045] When the real-time angle is generated according to the rotation angle, it can be determined whether the angle correction parameter needs to be self-calibrated according to the preset calibration mode. When the angle correction parameter does not need to be self-calibrated, the angle correction module will correct the rotation angle according to the set angle correction parameter and output the real-time angle; when the angle correction parameter needs to be self-calibrated, the angle correction module will calculate the set angle correction parameter according to the rotation angle and the set angle correction parameter and output a new angle correction parameter, and the angle correction module will correct the rotation angle according to the new angle correction parameter and output the real-time angle, wherein the new angle correction parameter will also replace the set angle correction parameter, and it will be continuously updated in this way, so as to obtain more and more accurate angle correction parameters, and realize the self-calibration function of the angle correction parameter.
[0046] Reference Figure 3 , Figure 3 This is a block diagram of the internal structure of an angle correction module of an embodiment of the present application. The angle correction module may include a parameter calculator and an error corrector. As shown in the figure, the rotation angle is simultaneously input to the angle input end of the parameter calculator and the angle input end of the error corrector, the output end of the parameter calculator is connected to the parameter input end of the error corrector, and the output end of the error corrector is used to output the real-time angle. Among them, the parameter calculator is used to receive the rotation angle, and output a new angle correction parameter after calculating the angle correction parameter based on the rotation angle according to a preset calibration mode. The error corrector is communicatively connected to the parameter calculator to receive the new angle correction parameter, and outputs the real-time angle after correcting the rotation angle according to the new angle correction parameter.
[0047] The rotation angle is simultaneously input to the angle input end of the parameter calculator and the angle input end of the error corrector, the output end of the parameter calculator is connected to the parameter input end of the error corrector, and the output end of the error corrector is used to output the real-time angle.
[0048] For the implementation of parameter calculator and error trimmer, please refer to the attached Figure 4 Description.
[0049] Reference Figure 4 , Figure 4 This is a block diagram of the internal structure of the angle correction module of another embodiment of the present application. In this embodiment, the angle correction module includes a parameter calculator, an error corrector, a system stability monitor, a non-volatile memory, a timer (in this embodiment, the first timer and the second timer are the same), an oscillator (such as a crystal oscillator or an oscillator made inside a CMOS chip) and a trigger button.
[0050] Continue to refer to Figure 4In this embodiment, the rotation angle is simultaneously input to the input end of the system stability monitor and the angle input end of the error corrector. The output end of the system stability monitor is connected to the angle input end of the parameter calculator. The system stability monitor is used to receive the rotation angle, and judge whether the system is stable according to the rotation angle, and enable the parameter calculator when the system is stable. The output end of the parameter calculator is connected to the parameter input end of the error corrector. The parameter calculator is used to receive the rotation angle, and output a new angle correction parameter after calculating the angle correction parameter based on the rotation angle according to the preset calibration mode. The error corrector is used to receive the rotation angle, and output the real-time angle after correcting the rotation angle according to the new angle correction parameter. There is a two-way communication between the parameter calculator and the non-volatile memory. The parameter calculator can write the new angle correction parameter into the non-volatile memory, and can also read the stored angle correction parameter from the non-volatile memory. The trigger button output end can be connected to the trigger end of the timer to trigger the start of the timer. Therefore, professionals can make a more professional judgment on whether to start the system stability monitoring according to different use environments and conditions. This judgment can also indirectly trigger whether to self-calibrate the angle correction parameter and / or whether to correct the error of the rotation angle. The trigger button output end can also be connected to the trigger end of the parameter calculator to trigger the parameter calculator to calculate the angle correction parameter to complete the self-calibration. In this way, in some scenarios where the calibration error is too large, this function can be manually turned off, and the angle correction parameter stored in the system before can be used to correct the error of the rotation angle output by the magnetic encoder; it can also be used to indirectly trigger whether to correct the error of the rotation angle; it can also be used to trigger the parameter calculator to write new angle correction parameters to the non-volatile memory or read the stored angle correction parameters from the non-volatile memory. Professionals can decide whether to read or store the angle correction parameters according to the current correction effect. The timer cyclically outputs the timing time, and the oscillator (such as a crystal oscillator or an oscillator made inside a CMOS chip) provides a stable clock for the timer. At the same time, in an embodiment including a system stability monitor, if the system stability monitor is implemented by a method based on a timestamp register to judge the stability of the magnetic encoder, a stable clock source can also be provided for the timestamp register in the method.
[0051] There are many ways to implement the system stability monitor. You can use a speed stability detection sensor commonly used in the field, or you can use a self-detection method disclosed in the patent with publication number CN116892970A to detect speed stability. The method is as follows. Set N angle reference points {ref[0], ref[1]...ref[n-1], ref[n]...ref[N-1]} in sequence from 0 to 360 degrees, and record the time points {TS[0], TS[1]...TS[n-1], TS[n]...TS[N-1]} when the angle output value of the magnetic encoder passes through each angle reference point. These time points are called timestamps. For the angle reference point ref[n], the qth period of the shaft passing through ref[n] is recorded as Pq. Ref[n] is measured multiple times and the period of the shaft is recorded to form a period data set: {P1, P2…Pq-1, Pq…PQ}. Taking ref[n] as an example, the time when the angle output value of the magnetic encoder passes through ref[n] for the second and first time is the period P1 of the shaft measured by ref[n]; when the angle output value of the magnetic encoder passes through ref[n] for the third and second time, it is the period P2 of the shaft measured by ref[n], and so on. Then the period set {P1, P2…Pq-1, Pq…PQ} is calculated to obtain the average period P of the shaft. The system can also use the average period P of the shaft as an indicator for judging the stability of the magnetic encoder. Then, the system can be judged according to one of the following methods to determine whether it meets the prerequisites for entering a stable state: (1) Calculate whether the absolute value of the difference between the current period Pq and the previous period Pq-1 is less than the first preset value Rlim1, that is, determine whether the formula |Pq-Pq-1|<Rlim1 is established; (2) Determine by the relationship between the difference between the timestamps TS[n] and TS[n-1] of two adjacent reference points ref[n] and ref[n-1] and the angle between the two reference points ref[n] and ref[n-1], that is, determine whether the formula |Pq-Pq-1|<Rlim1 is established; (3) Determine by the relationship between the timestamps TS[n] and TS[n-1] of two adjacent reference points ref[n] and ref[n-1] and the angle between the two reference points ref[n] and ref[n-1]. (3) Calculate whether the absolute value of the difference between the current period Pq and P is less than the third preset value Rlim3, that is, determine whether the formula |Pq-P|<Rlim3 is established. When the corresponding formula is established according to one of the above methods (the system meets the prerequisite for entering a stable state), and the formula continues to be established for a certain number of times, it is determined that the system has entered a stable state.
[0052] The above method disclosed in the patent CN116892970A mainly determines whether the rotation speed value of the rotating shaft is stable by calculating the difference between each cycle, thereby realizing the detection of stable speed and overcoming the influence of the jitter of the magnetic encoder angle output value caused by noise. Under the guidance of this method, those skilled in the art can easily adjust the method to design other self-detection methods with the same principle but different specific operation steps. For example, the variance of the cycle or speed can be calculated. When the number of times the variance of the cycle or speed is less than a preset value reaches a predetermined number within a certain period of time, it is judged to be in a stable state; or, the respective period data sets can be calculated for multiple angle reference points ref[n], and when using one of the methods (1)-(3) to judge whether the system has entered a stable state, the period data calculated for each of the multiple angle reference points ref[n] are considered; or, after judging that the corresponding formula is established according to one of the methods (1)-(3) (judging that the system meets the prerequisite for entering a stable state), although the formula cannot be established continuously for a certain number of times, it is also judged that the system has entered a stable state under the premise of meeting certain conditions. Those skilled in the art can also use non-self-calibration methods to determine whether the rotation speed is stable, such as setting a certain signal source on the motor rotor or stator, setting a detection device for the signal source at the other end of the rotor or stator, and calculating the motor rotation period or speed by detecting whether the relative position between the signal source and the detection device returns to the initial state, and judging whether the rotation is stable based on the calculated rotation period or speed. This application is not limited here.
[0053] There are also many ways to implement the parameter calculator. For example, patent application CN117168530A discloses a self-calibration method for a magnetic encoder, which is described as follows. For example, in order to obtain the angle correction parameters in this application, N angle reference points are set in sequence from 0 to 360 degrees, and the initial values of N nonlinear angle error reference values are set accordingly. The time point when the angle output value of the magnetic encoder passes through each angle reference point is recorded. This time point is called a timestamp. This time point is actually affected by noise and is not stable, but the noise is suppressed by subsequent multiple iterative averaging filtering calculations (such as the low-pass filtering calculation introduced later). Then, it is determined whether the rotation of the shaft is in a uniform rotation state. If so, the N nonlinear angle error reference values are iterated, specifically based on the prior angle reference point. and at the rear angle reference point The nonlinear angle error reference value at the next angle reference point is calculated based on the difference in the corresponding timestamps, the rotation period P of the shaft, and the nonlinear angle error reference value corresponding to the previous angle reference point. Calculate the actual angle of rotation from the previous angle reference point to the next angle reference point , and then use Calculate the rear angle reference point The corresponding new nonlinear angle error reference value is: is the timestamp corresponding to the previous angle reference point, is the timestamp corresponding to the subsequent angle reference point, P is the rotation period, and the calculation method of P is described in the subsequent part of this patent application. Then, the nonlinear angle error reference values obtained in the past are filtered and calculated, for example, using low-pass filtering to obtain the filtered nonlinear angle error reference value, and this operation is performed on all angle reference points. For example, the low-pass filtering calculation can be specifically used ,in, for The filtered value, Angle reference point The corresponding nonlinear angle error reference value obtained last time, Angle reference point The corresponding new nonlinear angle error reference value, is the low-pass filter coefficient, and 0< ≤1. Then, the average value of the nonlinear angle error reference value after filtering at each angle reference point is taken. Specifically, , and subtract the average value from each filtered nonlinear angle error reference value. Specifically, , thereby eliminating the zero offset of the nonlinear angle error reference value. , as the nonlinear angle error reference value of the final output (equivalent to the "angle correction parameter" in this application).
[0054] In the above method disclosed in CN117168530A, the calculation method of the rotation period P is as follows: first calculate the difference between two time stamps of two adjacent rotations of the same angle reference point. If this difference is greater than a certain threshold value Pmin (due to the presence of noise, the signal has a small probability of rapidly shaking left and right near the angle reference point, such as near 22.5 degrees, which may cause the time of passing 22.5 degrees twice to be recorded, but the time interval between these two times is very small and is not a cycle. In order to exclude this situation, a minimum threshold value Pmin is set according to the maximum speed that may be encountered in actual use of the motor. Only when the time of passing a certain angle reference value twice is greater than Pmin, the difference between the two times is considered as a cycle), then the difference is used as the rotation period obtained based on the angle reference point to exclude the influence of excessive noise on the calculation result; the rotation period can be taken as the period of the next round of rotation, or the rotation period obtained based on multiple angle reference points can be averaged and processed to obtain the period of the next round of rotation. Then the periods obtained from the previous rotations are low-pass filtered to obtain the filtered period as the rotation period P outputted by the final calculation.
[0055] For another example, patent application CN115355937A also discloses a self-calibration method for a magnetic encoder, which is specifically as follows. For example, in order to obtain the angle correction parameter in this application, the angle value θdet(ij) outputted by the magnetic encoder for the jth time in the i-th round is low-pass filtered to improve the linearity of the detection data; the filtered value θfilt(ij) obtained after filtering is regarded as the result of the linearity correction of the detection value θdet(ij). N reference points θref(n) are set within 0 to 360 degrees, and the detection value θdet(ij) closest to each reference point θref(n) in each cycle is selected, and θcal(in)=θfilt(ij)-θdet(ij) is taken as the difference between the correction result and the measurement result, which is used as the adjustment value of the i-th cycle of the reference point θref(n). For each reference point, there are p corresponding adjustment values in p periods. Averaging the p adjustment values can obtain a more accurate target adjustment value θcal(n). Thus, each reference point can obtain the corresponding target adjustment value θcal(n), thereby forming an adjustment reference table (equivalent to the "angle correction parameter" in this application).
[0056] For another example, the parameter calculator can also perform a Z transform on the angle error to calculate the coefficients of each harmonic component, so that the coefficients of each harmonic component are used to compensate the input angle in the error corrector to obtain a corrected real-time angle value.
[0057] It can be understood that the preset calibration mode includes a timed calibration mode, a real-time calibration mode and a single calibration mode. The parameter calculator calculates the angle correction parameters according to the preset calibration mode and based on the rotation angle and outputs new angle correction parameters. The new angle correction parameters can be specifically divided into the following situations according to the different preset calibration modes adopted.
[0058] When the timing calibration mode is adopted, the calibration system for the motor closed-loop self-calibration calibrates the angle correction parameters regularly under normal working conditions, wherein a timer can be added to the calibration system for the motor closed-loop self-calibration, and the timer cyclically outputs the timing time; in an embodiment including a system stability monitor, the timer is a first timer, and the timing time can be provided to the system stability monitor for timing to start the system stability detection, and automatically start the parameter calculator to perform the angle correction parameter self-calibration function after the system is stable; in an embodiment not including a system stability monitor, for example, reference Figure 5 , this timer is the second timer, and the timing time can be provided to the parameter calculator for timing the start of the angle correction parameter self-calibration function; of course, in an embodiment including a system stability monitor, the first timer and the second timer can also be included at the same time, and the first timer and the second timer can also be the same timer.
[0059] When the real-time calibration mode is used, the calibration system for closed-loop self-calibration of the motor calibrates the angle correction parameters in real time under normal working conditions. It is understandable that in most usage scenarios, the timed calibration mode can solve the problem. However, if the actual usage environment has a greater impact on the system, the real-time calibration mode can be used to keep the angle correction parameters up to date in real time. It is understandable that in the real-time calibration mode, it is better to use the system stability monitor to judge the stability of the system and perform self-calibration when the system is stable.
[0060] When the single calibration mode is adopted, the calibration system for the motor closed-loop self-calibration can calibrate the angle correction parameter in the initial state or in the error state. The trigger button is used to manually trigger the calibration of the angle correction parameter in the initial state or in the error state, wherein the output end of the trigger button can be connected to the trigger end of the first timer to trigger the start of the first timer, thereby triggering the system stability monitor.
[0061] It is understandable that in many cases, we only need to use a single calibration mode to calibrate the angle correction parameters in the initial state or error state. It should be noted that the single calibration mode of the embodiment of the present application is also carried out under the normal working state of the calibration system for motor closed-loop self-calibration, without pausing the motor operation, and without installing or removing additional equipment such as reference encoders and host computers, etc., and the self-calibration of the angle correction parameters can be started and completed in the normal working state of the motor closed-loop control process.
[0062] In an embodiment of the present application, the system stability monitor is used to monitor the stability of the system to ensure that calibration is performed only when the system is stable, thereby reducing the storage or use of erroneous or more erroneous angle correction parameters as new angle correction parameters when the system is unstable.
[0063] It is understandable that after the system has been running stably for a period of time, the new angle correction parameters that are continuously calculated (i.e., self-calibrated) by the parameter calculator are the optimal parameters that are more in line with the current usage environment and system. However, when the system loses power, the above-mentioned optimal parameters will be lost, and the system needs to continue calculating (i.e., self-calibrating) to obtain the optimal parameters again. In order to reduce the loss of optimal parameters, a non-volatile memory is added. The non-volatile memory is used to store the new angle correction parameters (optimal parameters) and provide them to the parameter calculator after the system is powered on again.
[0064] It is understandable that in a motor system, especially a high-speed motor system, when the high-speed motor is in a normal working state, it is difficult for the high-speed motor to be in an unstable state. Therefore, it is appropriate to consider whether to add a system stability monitor in this usage scenario.
[0065] It is understandable that the system stability monitor, non-volatile memory, timer (including the first timer and the second timer), oscillator (such as a crystal oscillator or an oscillator made inside a CMOS chip), trigger button and other devices in this embodiment can be selected according to the needs of the actual use environment, and this application does not limit it. For example, you can choose to include a system stability monitor and a non-volatile memory, or you can choose to include a system stability monitor, a timer and a crystal oscillator, or you can choose to include a system stability monitor, a timer and a trigger button, or you can choose to include a system stability monitor and a trigger button, or you can choose to include a non-volatile memory and a trigger button and other different combinations.
[0066] In the actual application of the embodiment of the present application, due to the influence of environmental factors, the real-time angle information sent by the motor to the controller often has certain fluctuations, and this fluctuation is sometimes relatively large, which is easy to introduce certain errors in the subsequent generation of the drive signal. In order to reduce such errors, the controller can also include an angle stabilizer (please also refer to Figure 2 ), which is used to receive the real-time angle, eliminate the unstable jitter of the real-time angle, and provide the real-time angle after the jitter is eliminated to the drive signal generator. Among them, the angle stabilizer is essentially a filter that filters out high frequencies. It can be a digital filter or an analog filter. When the motor sends a digital signal, a digital filter such as a low-pass filter can be used; when the motor sends an analog signal, an analog filter such as an active filter or a passive filter can be used.
[0067] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the above-described system, device and unit can refer to the corresponding process in the above-mentioned method embodiment, and will not be repeated here.
[0068] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. If the integrated unit is implemented in the form of a software functional unit and sold or used as a separate product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a computer device or processor to perform all or part of the steps of the method described in each embodiment of the present application.
[0069] The above embodiments are only used to introduce the technical solution of the present application in detail, but the description of the above embodiments is only used to help understand the method and core idea of the present application and should not be understood as limiting the present application. Any changes or substitutions that can be easily thought of by technicians in this technical field within the technical scope disclosed in the present application should be included in the protection scope of the present application.
Claims
1. A calibration system for closed-loop self-calibration of a motor, characterized in that: include: An angle sensor is provided on the motor and is used to detect the rotation angle of the motor, wherein the angle sensor comprises an angle correction module, the angle correction module is used to correct the rotation angle according to an angle correction parameter and then output a real-time angle, and the angle correction module has an angle correction parameter self-calibration function to self-calibrate the angle correction parameter according to a preset calibration mode; and a controller, communicatively connected to the angle sensor, the controller being configured to receive the real-time angle, generate a drive signal according to the real-time angle, and send the drive signal to a driver for driving the motor to operate, the drive signal being used to control the driver to adjust at least one physical parameter to adjust the rotation of the motor; Wherein, the angle correction module comprises: a parameter calculator, configured to receive the rotation angle, calculate the angle correction parameter based on the rotation angle according to the preset calibration mode, and then output a new angle correction parameter; and a system stability monitor, configured to receive the rotation angle, determine whether the system is stable according to the rotation angle, and enable the parameter calculator when the system is stable; And wherein, the controller further comprises an angle stabilizer for receiving the real-time angle, eliminating unstable jitter of the real-time angle, and providing the real-time angle after the jitter is eliminated to the driving signal generator.
2. The calibration system for closed-loop self-calibration of a motor according to claim 1, characterized in that: The angle correction module comprises: The parameter calculator is used to receive the rotation angle, calculate the angle correction parameter based on the rotation angle according to the preset calibration mode, and then output a new angle correction parameter.
3. The calibration system for closed-loop self-calibration of a motor as claimed in claim 2, characterized in that: The angle correction module also includes: an error corrector, communicatively connected to the parameter calculator to receive the new angle correction parameter, and correct the rotation angle according to the new angle correction parameter and then output the real-time angle; Among them, the rotation angle is simultaneously input into the angle input end of the parameter calculator and the angle input end of the error corrector, the output end of the parameter calculator is connected to the parameter input end of the error corrector, and the output end of the error corrector is used to output the real-time angle.
4. The calibration system for closed-loop self-calibration of a motor as claimed in claim 3, characterized in that: The rotation angle is first input into the system stability monitor, and then input into the parameter calculator through the system stability monitor, and the output end of the system stability monitor is connected to the angle input end of the parameter calculator.
5. The calibration system for closed-loop self-calibration of a motor according to claim 1, characterized in that: The angle correction module also includes: a first timer which cyclically outputs a timing time and provides the timing time to the system stability monitor; A trigger button receives input from an operator and is used to manually trigger calibration of the angle correction parameter in an initial state or an error state, and an output end of the trigger button is connected to the first timer or the parameter calculator.
6. The calibration system for closed-loop self-calibration of a motor as claimed in claim 5, characterized in that: The output end of the trigger button is connected to the first timer and the parameter calculator at the same time.
7. The calibration system for closed-loop self-calibration of a motor according to claim 1, characterized in that: The angle correction module also includes: The non-volatile memory is used to store the new angle correction parameters and provide them to the parameter calculator after the system is powered on again.
8. The calibration system for closed-loop self-calibration of a motor according to claim 1, characterized in that: The angle stabilizer is a filter.
9. The calibration system for closed-loop self-calibration of a motor according to claim 8, characterized in that: The filter is a digital filter.
10. The calibration system for closed-loop self-calibration of a motor according to claim 9, characterized in that: The digital filter is a low pass filter.
11. The calibration system for closed-loop self-calibration of a motor according to claim 8, characterized in that: The filter is an analog filter.
12. The calibration system for closed-loop self-calibration of a motor according to any one of claims 1 to 11, characterized in that: The preset calibration mode includes a timing calibration mode, and the calibration system for motor closed-loop self-calibration performs self-calibration on the angle correction parameters at regular intervals under normal working conditions.
13. The calibration system for closed-loop self-calibration of a motor according to claim 12, characterized in that: It also includes a second timer, which is used to start the angle correction parameter self-calibration function at a fixed time.
14. The calibration system for closed-loop self-calibration of a motor according to claim 13, characterized in that: When the angle correction module further includes a first timer, the first timer and the second timer are the same timer.
15. The calibration system for closed-loop self-calibration of a motor according to claim 14, characterized in that: An oscillator is also included for providing a stable clock for the first timer or the second timer.
16. The calibration system for closed-loop self-calibration of a motor according to any one of claims 1 to 11, characterized in that: The preset calibration mode includes a real-time calibration mode, and the calibration system for motor closed-loop self-calibration performs self-calibration on the angle correction parameters in real time under normal working conditions.
17. The calibration system for closed-loop self-calibration of a motor according to any one of claims 1 to 11, characterized in that: The preset calibration mode includes a single calibration mode, and the calibration system for motor closed-loop self-calibration performs self-calibration on the angle correction parameter in an initial state or an error state.
18. The calibration system for closed-loop self-calibration of a motor according to any one of claims 1 to 11, characterized in that: The angle sensor is one of a magnetic angle sensor, a photoelectric angle sensor, and a resistive angle sensor.
19. A calibration method for closed-loop self-calibration of a motor, characterized in that: include: An angle sensor is arranged on the motor, the angle sensor is used to detect the rotation angle of the motor, wherein the angle sensor comprises an angle correction module, and the angle correction module has an angle correction parameter self-calibration function, the angle correction module comprises a parameter calculator and a system stability monitor, wherein the parameter calculator is used to receive the rotation angle, and output a new angle correction parameter after calculating the angle correction parameter based on the rotation angle according to a preset calibration mode; the system stability monitor determines whether the system is stable according to the rotation angle, and enables the parameter calculator when the system is stable; Self-calibrating the angle correction parameters according to a preset calibration mode; Using the angle sensor to correct the rotation angle according to the calibrated angle correction parameter and then output a real-time angle; and A controller is communicatively connected to the angle sensor, and the controller is configured to receive the real-time angle, generate a drive signal according to the real-time angle, and send the drive signal to a driver for driving the motor to operate, wherein the drive signal is used to control the driver to adjust at least one physical parameter to adjust the rotation of the motor; the controller also includes an angle stabilizer, which is used to receive the real-time angle, eliminate unstable jitter of the real-time angle, and provide the real-time angle after the jitter is eliminated to the drive signal generator.
