Off-line calibration method of controller, resolver signal correction method and device, and vehicle

By normalizing and calibrating the sine and cosine signals of the motor rotation signal, the angle inaccuracy caused by the offset and gain error of the normal cosine signal in the motor control system is solved, and the stability optimization of the motor control system is achieved.

CN119536204APending Publication Date: 2025-02-28BEIJING ELECTRIC VEHICLE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411461834.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

In the prior art, the offset and gain error caused by various factors in the motor control system leads to inaccurate calculation of the motor angle, which increases the cost and complexity of the controller.

Method used

By normalizing the sine signal and cosine signal of the motor rotation signal during the controller's downline calibration process, the respective gain values ​​and offset values ​​are calculated, and used as the controller's downline calibration value, the offset and gain of the rotation rotation cosine signal are realized.

Benefits of technology

It realizes calibration of the offset and gain of the rotation cosine signal when the controller is offline, optimizes the stability of the motor control system, solves the problem of motor angle inaccurate caused by the error of the cosine signal, and does not occupy the load during the running of the controller.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119536204A_ABST
    Figure CN119536204A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of vehicles, in particular to an offline calibration method of a controller, a resolver signal correction method and device and a vehicle, and the method comprises the steps: obtaining a sine signal and a cosine signal of a motor resolver signal in the offline calibration process of the controller; carrying out normalization processing on the sine signal and the cosine signal of the motor rotary transformer signal; and calculating respective gain values and offset values of the sinusoidal signal and the cosine signal of the controller according to the normalized sinusoidal signal and the normalized cosine signal, and taking the respective gain values and the offset values of the sinusoidal signal and the cosine signal as offline calibration values of the controller. Therefore, the problem that the actually calculated motor angle is inaccurate due to the error of sine and cosine signals in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicle technology, and in particular to an offline calibration method of a controller, a resolver signal correction method, a device and a vehicle. Background Art

[0002] In the soft decoding solution based on the DSADC (Delta-Sigma Analog-to-Digital Converter) module, after the resolver sine and cosine signals are processed by a series of circuits, offset and gain errors will inevitably occur due to various factors. These signals are first excited by the excitation circuit, then converted into electrical signals related to the rotation angle by the resolver, and then further processed by the buffer circuit. In this process, due to the non-ideal characteristics of the excitation circuit, resolver, and buffer circuit, such as nonlinear effects, temperature drift and other factors, the output sine and cosine signals will have offset and gain deviations.

[0003] The error of the sine and cosine signals directly affects the accuracy of the subsequent angle solution, which in turn affects the performance of the motor control system. In the actual development process, offline calibration is usually used to calculate the offset and gain of the sine and cosine. However, due to the individual differences between the hardware components of the controller, even the controllers of the same batch may have subtle differences in the characteristics of their internal circuits, which leads to the actual offset and gain of each controller not being completely consistent. Therefore, even if offline calibration is performed, the same set of offset and gain values ​​cannot be directly applied to every controller, otherwise it may still lead to inaccurate angle solution. This requires individual calibration and calibration of each controller to ensure that each controller can achieve the best performance, which greatly increases the cost and complexity.

[0004] In the related art, by calculating the offset gain of Sin and Cos in real time, the real-time signal error can be output for angle calculation. However, the microsecond-level real-time error calculation is too high for the motor controller that meets the functional safety mass production, which is not conducive to the stable operation of the controller. In addition, the calibration scheme of this method is based on one of the Sin / Cos signals for calibration, which cannot reflect the actual offset and gain of sin and cos.

[0005] Therefore, the related technology still cannot effectively solve the problem that the error of sine and cosine signals will lead to inaccurate actual calculated motor angle. Summary of the invention

[0006] The present application provides a controller offline calibration method, a resolver signal correction method, a device and a vehicle to solve the problem in the prior art that the error of the sine and cosine signals may lead to inaccurate actual calculated motor angle.

[0007] The first aspect of the present application provides a method for offline calibration of a controller, comprising the following steps: obtaining the sine signal and cosine signal of a motor resolver signal during the offline calibration of the controller; normalizing the sine signal and cosine signal of the motor resolver signal; calculating the gain value and offset value of the sine signal and cosine signal of the controller according to the normalized sine signal and cosine signal, and using the gain value and offset value of the sine signal and cosine signal as the offline calibration value of the controller.

[0008] Optionally, the calculation formula of the gain value and the offset value of the sinusoidal signal is:

[0009]

[0010] Among them, SinGain1 is the gain value of the sinusoidal signal; Sin1 is the modulated sinusoidal signal; θ is the angle variable; sin(θ) is the sine wave.

[0011]

[0012] Among them, SinOffset1 is the offset value of the sinusoidal signal; Sin1 is the modulated sinusoidal signal.

[0013] Optionally, the gain value and offset value of the cosine signal are calculated as follows:

[0014]

[0015] Among them, CosGain1 is the gain value of the cosine signal; Cos1 is the modulated sine signal, θ is the angle variable; and cos(θ) is the cosine wave.

[0016]

[0017] Wherein, CosOffset1 is the offset value of the cosine signal; Cos1 is the modulated cosine signal.

[0018] Optionally, before using the respective gain values ​​and offset values ​​of the sine signal and the cosine signal as the offline calibration values ​​of the controller, it also includes: calculating a first ratio of the respective gain values ​​of the sine signal and the cosine signal; calculating a second ratio of the respective offset values ​​of the sine signal and the cosine signal; if the first ratio or the second ratio is greater than the corresponding abnormal threshold, the controller is determined to be abnormal, and the offline calibration of the controller is terminated.

[0019] A second aspect of the present application provides a method for correcting a motor resolver signal, comprising the following steps: detecting a motor resolver signal of a controller; obtaining an offline calibration value of the controller, identifying the gain value and offset value of the sine signal and cosine signal of the controller in the offline calibration value, and correcting the motor resolver signal according to the gain value and offset value of the sine signal and cosine signal.

[0020] Optionally, the correction formula of the motor resolver signal is:

[0021] Sin2=SinGain1*(Sin1-SinOffset1),

[0022] Cos2=CosGain1*(Cos1-CosOffset1),

[0023] Among them, Sin2 represents the corrected sinusoidal signal of the motor resolver signal, SinGain1 is the gain value of the sinusoidal signal; Sin1 is the modulated sinusoidal signal; SinOffset1 is the offset value of the sinusoidal signal; Cos2 represents the corrected cosine signal of the motor resolver signal; CosGain1 is the gain value of the cosine signal; Cos1 is the modulated cosine signal; CosOffset1 is the offset value of the cosine signal.

[0024] Optionally, after correcting the motor resolver signal according to the respective gain values ​​and offset values ​​of the sine signal and the cosine signal, the method further includes: calculating at least one of the angle and the rotation speed of the motor according to the corrected motor resolver signal.

[0025] The third aspect of the present application provides an offline calibration device for a controller, including: an acquisition module, used to acquire the sine signal and cosine signal of the motor resolver signal during the offline calibration of the controller; a processing module, used to normalize the sine signal and cosine signal of the motor resolver signal; a calibration module, used to calculate the gain value and offset value of the sine signal and cosine signal of the controller according to the normalized sine signal and cosine signal, and use the gain value and offset value of the sine signal and cosine signal as the offline calibration value of the controller.

[0026] The fourth aspect of the present application provides a motor resolver signal correction device, including: a detection module, used to detect the motor resolver signal of a controller; an identification module, used to obtain the offline calibration value of the controller, identify the gain value and offset value of the sine signal and cosine signal of the controller in the offline calibration value, and a correction module, used to correct the motor resolver signal according to the gain value and offset value of the sine signal and cosine signal.

[0027] The fifth aspect of the present application provides a vehicle, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the off-line calibration method of the controller of the first aspect, or the motor resolver signal correction method of the second aspect.

[0028] Therefore, this application includes the following beneficial effects:

[0029] The embodiment of the present application performs normalization processing on the sine signal and cosine signal of the motor resolver signal during the offline calibration process of the controller, and calculates the gain value and offset value of the sine signal and cosine signal of the controller according to the normalized sine signal and cosine signal, and finally uses the gain value and offset value of the sine signal and cosine signal as the offline calibration value of the controller, so as to realize the calibration of the offset and gain of the resolver sine and cosine signal by using the offline controller, and does not occupy the load when the controller is running, thereby optimizing the stability of the motor control system. Thus, the problem that the error of the sine and cosine signals in the prior art will lead to the inaccuracy of the actual calculated motor angle is solved.

[0030] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0032] Figure 1 is a flow chart of an offline calibration method of a controller according to an embodiment of the present application;

[0033] Figure 2 This is an example diagram of a motor resolver signal correction method according to an embodiment of the present application;

[0034] Figure 3 is an image of a modulated sine and cosine signal according to one embodiment of the present application;

[0035] Figure 4 A comparison diagram of angle calculation based on sine and cosine signals according to an embodiment of the present application;

[0036] Figure 5 This is a structural example diagram of an offline calibration device of a controller according to an embodiment of the present application;

[0037] Figure 6 1 is a structural example diagram of a motor resolver signal correction device according to an embodiment of the present application;

[0038] Figure 7 This is an example diagram of a vehicle structure according to an embodiment of the present application. DETAILED DESCRIPTION

[0039] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0040] The following describes the offline calibration method of the controller, the motor resolver signal correction method, the device and the vehicle of the embodiment of the present application with reference to the accompanying drawings. In view of the problem that the error of the prior art sine and cosine signals mentioned in the above background technology will cause the actual calculated motor angle to be inaccurate, the present application provides a method for offline calibration of a controller, in which the sine signal and cosine signal of the motor resolver signal in the offline calibration process of the controller are normalized, and the gain value and offset value of the sine signal and cosine signal of the controller are calculated according to the normalized sine signal and cosine signal, and finally the gain value and offset value of the sine signal and cosine signal are used as the offline calibration value of the controller, so that the calibration of the resolver sine and cosine signal offset and gain can be performed by using the controller offline, and the load when the controller is running is not occupied, and the stability of the motor control system is optimized. Thus, the problem that the error of the prior art sine and cosine signals will cause the actual calculated motor angle to be inaccurate is solved.

[0041] Specifically, Figure 1 A flowchart of an offline calibration method for a controller provided in an embodiment of the present application.

[0042] like Figure 1 As shown, the off-line calibration method of the controller includes the following steps:

[0043] In step S101, a sine signal and a cosine signal of a motor resolver signal are obtained during an offline calibration process of a controller.

[0044] Among them, the motor resolver signal includes the sine signal and cosine signal output by the resolver. These two signals are the sine and cosine functions of the angular position and can be used to determine the position of the rotor. The motor resolver signal can be obtained by directly reading it through a hardware interface.

[0045] It can be understood that the embodiments of the present application can obtain the sine signal and cosine signal of the motor resolver signal during the controller offline calibration process by directly reading through a hardware interface.

[0046] In step S102, the sine signal and the cosine signal of the motor resolver signal are normalized.

[0047] Among them, normalization processing can make the data more standardized and convenient for algorithm processing. Normalization methods include linear transformation, maximum value normalization, decimal calibration normalization and many other methods. The corresponding normalization method can be adopted as needed.

[0048] It can be understood that the embodiment of the present application can normalize the sine signal and cosine signal of the acquired motor resolver signal, so as to make the data more standardized and facilitate subsequent work.

[0049] In step S103, the gain value and offset value of the sine signal and cosine signal of the controller are calculated according to the normalized sine signal and cosine signal, and the gain value and offset value of the sine signal and cosine signal are used as the offline calibration value of the controller.

[0050] The gain value refers to the degree to which the signal is amplified or reduced; the offset value refers to the amount of vertical translation of the signal.

[0051] It can be understood that the embodiments of the present application can perform relevant calculations based on the normalized sine signal and cosine signal. The calculation process will be described below. The gain value and offset value of the sine signal and the cosine signal are obtained by calculation, and the gain value and offset value of the sine signal and the cosine signal are used as the offline calibration value of the controller.

[0052] In the embodiment of the present application, the calculation formulas for the gain value and the offset value of the sinusoidal signal are:

[0053]

[0054] Among them, SinGain1 is the gain value of the sinusoidal signal; Sin1 is the modulated sinusoidal signal; θ is the angle variable; sin(θ) is the sine wave.

[0055]

[0056] Among them, SinOffset1 is the offset value of the sinusoidal signal; Sin1 is the modulated sinusoidal signal.

[0057] It is understandable that the embodiments of the present application can use the above two formulas to calculate the gain value of the sinusoidal signal by the modulated sinusoidal signal and the sinusoidal wave, and calculate the offset value of the sinusoidal signal by integrating the modulated sinusoidal signal.

[0058] In the embodiment of the present application, the calculation formulas for the gain value and the offset value of the cosine signal are:

[0059]

[0060] Among them, CosGain1 is the gain value of the cosine signal; Cos1 is the modulated sine signal, θ is the angle variable; and cos(θ) is the cosine wave.

[0061]

[0062] Wherein, CosOffset1 is the offset value of the cosine signal; Cos1 is the modulated cosine signal.

[0063] It is understandable that the embodiments of the present application can use the above two formulas to calculate the gain value of the cosine signal by the modulated cosine signal and the cosine wave, and calculate the offset value of the cosine signal by integrating the modulated cosine signal.

[0064] In an embodiment of the present application, before using the gain value and offset value of the sine signal and the cosine signal respectively as the offline calibration value of the controller, it also includes: calculating a first ratio of the gain values ​​of the sine signal and the cosine signal respectively; calculating a second ratio of the offset values ​​of the sine signal and the cosine signal respectively; if the first ratio or the second ratio is greater than the corresponding abnormal threshold, the controller is determined to be abnormal, and the offline calibration of the controller is terminated.

[0065] Among them, the first ratio refers to the ratio of the gain value of the sine signal to the gain value of the cosine signal; the second ratio refers to the ratio of the offset value of the sine signal to the offset value of the cosine signal; the abnormal threshold includes two values, one of which corresponds to the ratio of the gain values, and the other corresponds to the ratio of the offset values. When one of the first ratio and the second ratio is greater than the abnormal threshold, the controller is judged to be abnormal. The value of the abnormal threshold is determined according to actual needs and is not specifically limited here.

[0066] It can be understood that before using the respective gain values ​​and offset values ​​of the sine signal and the cosine signal as the offline calibration value of the controller, the embodiment of the present application needs to obtain a first ratio of the gain value of the sine signal to the gain value of the cosine signal, and obtain a second ratio of the offset value of the sine signal to the offset value of the cosine signal, and compare the two with the corresponding abnormal thresholds. When one of the first ratio and the second ratio is greater than the abnormal threshold, the controller is determined to be abnormal and the offline calibration of the controller is terminated.

[0067] According to the offline calibration method of the controller proposed in the embodiment of the present application, the sine signal and cosine signal of the motor resolver signal in the process of offline calibration of the controller can be normalized, and the gain value and offset value of the sine signal and cosine signal of the controller can be calculated based on the normalized sine signal and cosine signal. Finally, the gain value and offset value of the sine signal and cosine signal can be used as the offline calibration value of the controller, so that the offset and gain of the resolver sine and cosine signals can be calibrated when the controller is offline, and the load of the controller during operation is not occupied, thereby optimizing the stability of the motor control system.

[0068] The offline calibration method of the controller proposed in the embodiment of the present application is further described below through a specific example.

[0069] In the relevant pure electric vehicle motor controller, a software decoding method based on the DSADC module is used to obtain the motor angle and speed. DSADC is a high-resolution analog-to-digital converter. In the soft decoding solution based on the DSADC module, after the resolver sine and cosine signals pass through the excitation circuit, the resolver, and the buffer circuit, the output sine and cosine signals will inevitably have offset and gain errors.

[0070] The steps based on DSADC soft decoding are:

[0071] 1. DSADC generates an excitation high-frequency signal which passes through a filtering circuit and reaches the rotary transformer;

[0072] 2. The rotary transformer of the motor senses and outputs sine and cosine signals;

[0073] 3. After the sine and cosine pass through the buffer circuit, the DSADC samples, filters, shapes and integrates the sine and cosine return signals;

[0074] 4. The modulated sine signal Sin1 and cosine signal Cos1 are transmitted to the application layer software for angle analysis;

[0075] 5. Calibrate Sin1 and Cos1 for offset and gain to obtain Sin2 and Cos2;

[0076] 6. Use Sin2 and Cos2 to perform inverse tangent and angle calculation of second-order observer.

[0077] like Figure 2 They are the modulated sine signal Sin1 and cosine signal Cos1.

[0078] By comparison, it can be found that the amplitude of the Sin1 and Cos1 signals and the 0 reference of the positive and negative peak values ​​have upper and lower offsets.

[0079] It is necessary to calibrate the amplitude, 0-reference gain, and offset of Sin1 and Cos1 to ensure that the amplitude and 0-reference of Sin2 and Cos2 are consistent after calibration.

[0080] The following formula 1 is the calculation method of Sin2 and Cos2.

[0081] Formula 1:

[0082] Sin2=SinGain1*(Sin1-SinOffset1),

[0083] Cos2=CosGain1*(Cos1-CosOffset1),

[0084] like Figure 3 This is a comparison of the angle calculated by the uncorrected signal Sin1 and Cos1 and the angle calculated by the corrected Sin2 and Cos2. The curve shown in the upper half of the image is the motor angle calculated directly using Sin1 and Cos1, and the curve shown in the lower half of the image is the motor angle calculated using the corrected Sin2 and Cos2. It can be seen that the angle obtained by the corrected signal is more accurate.

[0085] The gain Sin / CosGain1 and offset Sin / CosOffset1 in formula 1 are different due to the manufacturing errors of different batches of controller samples. Considering that the sine and cosine gain and offset of each controller will basically not change during the operation of the controller, the real-time calculation of gain and offset will occupy the controller chip load. Therefore, a method is proposed to open the function of calculating gain and offset in the motor controller software through the 2E service diagnosed by UDS (Unified Diagnostic Services) when the controller is offline. In the UDS protocol, 2E service refers to "routine control". After obtaining the value, the value is written to EEPROM (electrically erasable programmable read-only memory) through the 2E service diagnosed by UDS, and then the calculation function is turned off through the 2E service diagnosed by UDS. When the controller is running normally, the gain and offset values ​​in the EEPROM are directly read without occupying the chip load.

[0086] The embodiment of the present application proposes a method for calculating offset and gain, which can calibrate Sin1 and Cos1 at the same time. The method normalizes all Sin1 and Cos1 signals, and obtains SinGain1 and CosGain1 through formulas 2 and 3, and obtains SinOffset1 and CosOffset1 through formulas 4 and 5.

[0087] Formula 2:

[0088] Formula 3:

[0089] Formula 4:

[0090] Formula 5:

[0091] According to formula 1, Sin2 and Cos2 are normalized, and the amplitude range is [-1,1]. This method normalizes the signal, and the calculated gain offset value can truly feedback the actual error of the current controller components. According to its gain and offset values, it can be used to judge the fault of the component hardware: when SinGain1 / CosGain1 is greater than threshold A or SinOffset1 / CosOffset1 is greater than threshold B, the current controller is judged to be abnormal, thereby improving the reliability of the controller. The normalized Sin2 and Cos2 signals are used in step 6 based on DSADC soft decoding, that is, using Sin2 and Cos2 to perform the inverse tangent and angle calculation of the second-order observer, and perform angle calculation and speed calculation.

[0092] Based on the offline calibration method of the controller proposed in this embodiment, the offset and gain of the resolver sine and cosine signals can be calibrated when the controller is offline, and the load during the operation of the controller is not occupied, thereby optimizing the stability of the motor control system; the method for calculating gain and offset proposed in this article can not only reflect the actual error situation of the controller components, but also make fault judgments based on the calculation results, thereby improving the accuracy of the soft decoding angle and the reliability of the controller.

[0093] Next, a motor resolver signal correction method proposed according to an embodiment of the present application is described with reference to the accompanying drawings.

[0094] Figure 4 A schematic flow chart of a motor resolver signal correction method provided in an embodiment of the present application.

[0095] like Figure 4 As shown, the motor resolver signal correction method includes the following steps:

[0096] In step S201, the motor resolver signal of the controller is detected.

[0097] The motor resolver signal may be detected by directly reading it through a hardware interface.

[0098] It is understandable that the embodiments of the present application can directly read the motor resolver signal of the controller through the hardware interface.

[0099] In step S202, the off-line calibration value of the controller is obtained, and the gain value and offset value of the sine signal and the cosine signal of the controller in the off-line calibration value are identified.

[0100] Among them, the offline calibration value of the controller is obtained by the above-mentioned offline calibration method of the controller, which includes the gain value and offset value of the sine signal and cosine signal of the motor resolver signal after normalization.

[0101] It can be understood that the embodiments of the present application can obtain the controller offline calibration value obtained by the above-mentioned controller offline calibration method, and identify the gain value and offset value of the sine signal and cosine signal respectively contained in the controller offline calibration value.

[0102] In step S203, the motor resolver signal is corrected according to the gain value and offset value of the sine signal and the cosine signal respectively.

[0103] It can be understood that the embodiments of the present application can correct the motor resolver signal through the gain value and offset value of the sine signal and the cosine signal respectively, reduce the error of the sine and cosine signals, and increase the accuracy of the actual calculated motor angle.

[0104] In the embodiment of the present application, the correction formula of the motor resolver signal is:

[0105] Sin2=SinGain1*(Sin1-SinOffset1),

[0106] Cos2=CosGain1*(Cos1-CosOffset1),

[0107] Among them, Sin2 represents the corrected sinusoidal signal of the motor resolver signal, SinGain1 is the gain value of the sinusoidal signal; Sin1 is the modulated sinusoidal signal; SinOffset1 is the offset value of the sinusoidal signal; Cos2 represents the corrected cosine signal of the motor resolver signal; CosGain1 is the gain value of the cosine signal; Cos1 is the modulated cosine signal; CosOffset1 is the offset value of the cosine signal.

[0108] It can be understood that the embodiments of the present application can use the above two formulas to calculate the modulated sine signal and cosine signal, the gain value of the sine signal and cosine signal, and the offset value of the sine signal and cosine signal to obtain the corrected sine signal and cosine signal of the motor resolver signal.

[0109] In an embodiment of the present application, after correcting the motor resolver signal according to the gain values ​​and offset values ​​of the sine signal and the cosine signal respectively, it also includes: calculating at least one of the angle and the rotation speed of the motor according to the corrected motor resolver signal.

[0110] It can be understood that after the motor resolver signal is corrected through a formula, the embodiment of the present application can calculate the angle or speed of the motor according to the corrected motor resolver signal to obtain a more accurate value.

[0111] It should be noted that the above explanation of the offline calibration method embodiment of the controller is also applicable to the motor resolver signal correction method of this embodiment, and will not be repeated here.

[0112] According to the motor resolver signal correction method proposed in the embodiment of the present application, the motor resolver signal of the controller can be detected and the offline calibration value of the controller can be obtained. The motor resolver signal can be corrected by identifying the gain value and offset value of the sine signal and the cosine signal in the offline calibration value. The offset and gain calibration of the resolver signal can be achieved when the controller is assembled offline without occupying the load during the operation of the controller, thereby optimizing the stability of the motor control system.

[0113] The present application also provides an offline calibration device for a controller, such as Figure 5 As shown, the device 10 includes an acquisition module 301 , a processing module 302 and a calibration module 303 .

[0114] Among them, the acquisition module 301 is used to obtain the sine signal and cosine signal of the motor resolver signal during the offline calibration process of the controller; the processing module 302 is used to normalize the sine signal and cosine signal of the motor resolver signal; the calibration module 303 is used to calculate the gain value and offset value of the sine signal and cosine signal of the controller according to the normalized sine signal and cosine signal, and use the gain value and offset value of the sine signal and cosine signal as the offline calibration value of the controller.

[0115] In the embodiment of the present application, the calculation formulas for the gain value and the offset value of the sinusoidal signal are:

[0116]

[0117] Among them, SinGain1 is the gain value of the sinusoidal signal; Sin1 is the modulated sinusoidal signal; θ is the angle variable; sin(θ) is the sine wave.

[0118]

[0119] Among them, SinOffset1 is the offset value of the sinusoidal signal; Sin1 is the modulated sinusoidal signal.

[0120] In the embodiment of the present application, the calculation formulas for the gain value and the offset value of the cosine signal are:

[0121]

[0122] Among them, CosGain1 is the gain value of the cosine signal; Cos1 is the modulated sine signal, θ is the angle variable; and cos(θ) is the cosine wave.

[0123]

[0124] Wherein, CosOffset1 is the offset value of the cosine signal; Cos1 is the modulated cosine signal.

[0125] In an embodiment of the present application, a calculation module is also included. The calculation module is used to, before using the gain value and offset value of the sine signal and the cosine signal as the offline calibration value of the controller, also include: calculating a first ratio of the gain values ​​of the sine signal and the cosine signal; calculating a second ratio of the offset values ​​of the sine signal and the cosine signal; if the first ratio or the second ratio is greater than the corresponding abnormal threshold, the controller is determined to be abnormal and the offline calibration of the controller is terminated.

[0126] It should be noted that the above explanation of the embodiment of the offline calibration method of the controller is also applicable to the offline calibration device of the controller of this embodiment, and will not be repeated here.

[0127] According to the offline calibration device of the controller proposed in the embodiment of the present application, the sine signal and cosine signal of the motor resolver signal in the offline calibration process of the controller are normalized through the acquisition module, the processing module and the calibration module, and the gain value and offset value of the sine signal and cosine signal of the controller are calculated according to the normalized sine signal and cosine signal, and finally the gain value and offset value of the sine signal and cosine signal are used as the offline calibration value of the controller, so that the offset and gain of the resolver sine and cosine signals can be calibrated by taking the controller offline without occupying the load when the controller is running, thereby optimizing the stability of the motor control system.

[0128] The present application also provides a motor resolver signal correction device, such as Figure 6 As shown, the device 20 includes a detection module 401 , an identification module 402 and a correction module 403 .

[0129] Among them, the detection module 401 is used to detect the motor resolver signal of the controller; the identification module 402 is used to obtain the offline calibration value of the controller, and identify the gain value and offset value of the sine signal and cosine signal of the controller in the offline calibration value; the correction module 403 is used to correct the motor resolver signal according to the gain value and offset value of the sine signal and cosine signal respectively.

[0130] In the embodiment of the present application, the correction formula of the motor resolver signal is:

[0131] Sin2=SinGain1*(Sin1-SinOffset1),

[0132] Cos2=CosGain1*(Cos1-CosOffset1),

[0133] Among them, Sin2 represents the corrected sinusoidal signal of the motor resolver signal, SinGain1 is the gain value of the sinusoidal signal; Sin1 is the modulated sinusoidal signal; SinOffset1 is the offset value of the sinusoidal signal; Cos2 represents the corrected cosine signal of the motor resolver signal; CosGain1 is the gain value of the cosine signal; Cos1 is the modulated cosine signal; CosOffset1 is the offset value of the cosine signal.

[0134] In an embodiment of the present application, a calculation module is also included. After correcting the motor resolver signal according to the gain value and offset value of the sine signal and the cosine signal respectively, the calculation module also includes: calculating at least one of the angle and the rotation speed of the motor according to the corrected motor resolver signal.

[0135] It should be noted that the above explanation of the offline calibration method embodiment of the controller is also applicable to the motor resolver signal correction device of this embodiment, and will not be repeated here.

[0136] According to the motor resolver signal correction device proposed in the embodiment of the present application, the motor resolver signal of the controller can be detected and the offline calibration value of the controller can be obtained through the detection module, the identification module and the correction module. The motor resolver signal is corrected by identifying the gain value and offset value of the sine signal and the cosine signal in the offline calibration value. The offset and gain calibration of the resolver signal can be realized when the controller is assembled offline without occupying the load during the operation of the controller, thereby optimizing the stability of the motor control system.

[0137] Figure 7 A schematic diagram of the structure of a vehicle provided in an embodiment of the present application. The vehicle may include:

[0138] A memory 501 , a processor 502 , and a computer program stored in the memory 501 and executable on the processor 502 .

[0139] When the processor 502 executes the program, the offline calibration method of the controller and the motor resolver signal correction method provided in the above embodiments are implemented.

[0140] Furthermore, the vehicle also includes:

[0141] The communication interface 503 is used for communication between the memory 501 and the processor 502 .

[0142] The memory 501 is used to store computer programs that can be executed on the processor 502 .

[0143] The memory 501 may include a high-speed RAM (Random Access Memory) memory, and may also include a non-volatile memory, such as at least one disk memory.

[0144] If the memory 501, the processor 502 and the communication interface 503 are implemented independently, the communication interface 503, the memory 501 and the processor 502 can be connected to each other through a bus and communicate with each other. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0145] Optionally, in a specific implementation, if the memory 501, the processor 502 and the communication interface 503 are integrated on a chip, the memory 501, the processor 502 and the communication interface 503 can communicate with each other through an internal interface.

[0146] The processor 502 may be a CPU (Central Processing Unit), or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.

[0147] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms are not necessarily directed to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0148] In addition, 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, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0149] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or N executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0150] It should be understood that the various parts of the present application can be implemented in hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, the steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array, a field programmable gate array, etc.

[0151] A person of ordinary skill in the art may understand that all or part of the steps carried by the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the above-mentioned program may be stored in a computer-readable storage medium, which, when executed, includes one of the steps of the method embodiment or a combination thereof.

[0152] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A controller offline calibration method, characterized in that: The following steps are involved: Obtain the sine and cosine signals of the motor resolver signal during the controller offline calibration process; Normalizing the sine signal and the cosine signal of the motor resolver signal; The gain value and offset value of the sine signal and the cosine signal of the controller are calculated according to the normalized sine signal and the cosine signal, and the gain value and the offset value of the sine signal and the cosine signal are used as the lower line calibration value of the controller.

2. The off-line calibration method of the controller according to claim 1, characterized in that: The calculation formula of the gain value and offset value of the sinusoidal signal is: Among them, SinGain1 is the gain value of the sinusoidal signal; Sin1 is the modulated sinusoidal signal; θ is the angle variable; sin(θ) is the sine wave. Among them, SinOffset1 is the offset value of the sinusoidal signal; Sin1 is the modulated sinusoidal signal.

3. The off-line calibration method of the controller according to claim 1, characterized in that: The calculation formula of the gain value and offset value of the cosine signal is: Among them, CosGain1 is the gain value of the cosine signal; Cos1 is the modulated sine signal, θ is the angle variable; and cos(θ) is the cosine wave. Wherein, CosOffset1 is the offset value of the cosine signal; Cos1 is the modulated cosine signal.

4. The off-line calibration method of the controller according to claim 1, characterized in that: Before using the gain value and the offset value of the sine signal and the cosine signal as the lower line calibration value of the controller, the method further includes: Calculating a first ratio of the gain values ​​of the sine signal and the cosine signal; Calculating a second ratio of the offset values ​​of the sine signal and the cosine signal; If the first ratio or the second ratio is greater than the corresponding abnormal threshold, the controller is determined to be abnormal, and the off-line calibration of the controller is terminated.

5. A method for correcting a motor resolver signal, characterized in that: The following steps are involved: Detect the motor resolver signal of the controller; Acquire the offline calibration value of the controller, and identify the gain value and offset value of the sine signal and cosine signal of the controller in the offline calibration value; The motor resolver signal is corrected according to the gain value and offset value of the sine signal and the cosine signal respectively.

6. The motor resolver signal correction method according to claim 5, characterized in that: The correction formula of the motor resolver signal is: Sin2=SinGain1*(Sin1-SinOffset1), Cos2=CosGain1*(Cos1-CosOffset1), Among them, Sin2 represents the corrected sinusoidal signal of the motor resolver signal, SinGain1 is the gain value of the sinusoidal signal; Sin1 is the modulated sinusoidal signal; SinOffset1 is the offset value of the sinusoidal signal; Cos2 represents the corrected cosine signal of the motor resolver signal; CosGain1 is the gain value of the cosine signal; Cos1 is the modulated cosine signal; CosOffset1 is the offset value of the cosine signal.

7. The motor resolver signal correction method according to claim 5, characterized in that: After correcting the motor resolver signal according to the gain value and offset value of the sine signal and the cosine signal respectively, the method further includes: At least one of the angle and the rotation speed of the motor is calculated according to the corrected motor resolver signal.

8. An offline calibration device for a controller, characterized in that: include: An acquisition module is used to acquire the sine signal and cosine signal of the motor resolver signal during the offline calibration of the controller; A processing module, used for normalizing the sine signal and the cosine signal of the motor resolver signal; The calibration module is used to calculate the gain value and offset value of the sine signal and the cosine signal of the controller according to the normalized sine signal and the cosine signal, and use the gain value and the offset value of the sine signal and the cosine signal as the offline calibration value of the controller.

9. A motor resolver signal correction device, characterized in that: include: A detection module, used to detect the motor resolver signal of the controller; An identification module, used for obtaining a lower-line calibration value of the controller, and identifying a gain value and an offset value of a sine signal and a cosine signal of the controller in the lower-line calibration value; The correction module is used to correct the motor resolver signal according to the gain value and offset value of the sine signal and the cosine signal respectively.

10. A vehicle, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the offline calibration method of the controller described in any one of claims 1 to 4, or the motor resolver signal correction method described in any one of claims 5 to 7.