Motor position angle calibration method, device and equipment
By obtaining and comparing the nominal and actual position angle values and identification codes of the motor, the problem of inaccurate position angle matching in the motor system is solved, and the accurate update and storage of position angle values in the motor system is achieved.
Patent Information
- Application Number
- CN202111395711.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-22
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2041-11-22
AI Technical Summary
In the prior art, the accuracy of matching the motor with position angle is low, especially after the replacement of the motor system components, the position angle reading mismatch is prone to occur.
By obtaining the nominal position angle value and identification code of the target motor, as well as the actual position angle value and identification code in the motor controller, the calibration algorithm is used to compare and update the stored data in the motor controller to ensure the accurate matching of the position angle value.
Improve the accuracy of matching between the motor and the position angle, avoid the failure of the position angle value during storage, and ensure the effectiveness of the position angle value during the life cycle of the motor system.
Smart Images

Figure CN114296989B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of motor control technology, and in particular to a method, device and equipment for calibrating a motor position angle. Background Art
[0002] During electric vehicle production, the motor controller (MCU) and the motor itself that make up the drive motor system need to be paired and calibrated. In other words, the motor system's "initial rotor position offset angle" parameter (hereinafter referred to as the position angle, abbreviated as PA) needs to be calibrated and compensated.
[0003] Currently, the calibration and compensation of the position angle mainly improves the detection method to improve the detection accuracy of the position angle, but does not improve the position angle storage. When the components in the motor system are replaced, position angle reading mismatch is likely to occur. Summary of the Invention
[0004] The embodiments of the present invention solve the technical problem of low accuracy in matching the motor and the position angle in the related art by providing a method, device and equipment for calibrating the motor position angle.
[0005] In the first aspect, the present invention provides a motor position angle verification method through an embodiment of the present invention, including: obtaining the nominal target position angle value and target identification code of the target motor; obtaining the actual identification code currently stored in the motor controller, and the actual position angle value currently used to control the target motor; based on the target position angle value, the actual position angle value, the target identification code and the actual identification code, determining the position angle verification result of the target motor; if the position angle verification result is judged to be mismatched, updating the actual identification code and actual position angle value currently stored in the motor controller according to the target position angle value and the target identification code.
[0006] Preferably, the position angle verification result is determined based on the target position angle value, the actual position angle value, the target identification code and the actual identification code, including: using the target position angle value to determine the target position angle value verification code; using the target identification code to determine the target identification code verification code; using the actual position angle value to determine the actual position angle value verification code; using the actual identification code to determine the actual identification code verification code; comparing the actual position angle value verification code with the target position angle value verification code to obtain a first comparison result; comparing the actual identification code verification code with the target identification code verification code to obtain a second comparison result; and obtaining the position angle verification result based on the first comparison result and the second comparison result.
[0007] Preferably, the position angle verification result is obtained based on the first comparison result and the second comparison result, including: if it is detected that the actual position angle value verification code is different from the target position angle value verification code, and the actual identification code verification code is the same as the target identification code verification code, then the position angle verification result is determined to be mismatched; if it is detected that the actual position angle value verification code is the same as the target position angle value verification code, and the actual identification code verification code is different from the target identification code verification code, then the position angle verification result is determined to be mismatched.
[0008] Preferably, before obtaining the position angle verification result based on the first comparison result and the second comparison result, it also includes: using the target position angle value to determine the target effective range of the target position angle value; using the actual position angle value to determine the actual effective range of the actual position angle value; comparing the actual effective range with the effective range to obtain a third comparison result; obtaining the position angle verification result based on the first comparison result and the second comparison result includes: obtaining the position angle verification result based on the first comparison result, the second comparison result and the third comparison result.
[0009] Preferably, the position angle verification result is obtained based on the first comparison result, the second comparison result and the third comparison result, including: if it is detected that the actual identification code verification code is different from the identification code verification code, then the position angle verification result is determined to be mismatched; if it is detected that the actual position angle value verification code is different from the position angle value verification code, and / or the actual valid range is different from the target valid range, then the position angle verification result is determined to be mismatched.
[0010] Preferably, before determining the position angle verification result of the target motor based on the target position angle value, the actual position angle value, the target identification code and the actual identification code, it also includes: if the actual position angle value is detected to be the initial position angle value, then determining that the position angle verification result of the target motor is mismatched; otherwise, executing the step of determining the position angle verification result of the target motor based on the target position angle value, the actual position angle value, the target identification code and the actual identification code.
[0011] Preferably, if the position angle verification result is detected to be mismatched, the target position angle value is used to determine the target position angle value verification code and the target valid range of the target position angle value; the target identification code is used to determine the target identification code verification code; the target position angle value, the target valid range, the target position angle value verification code and the target identification code verification code are written into the position angle data storage unit of the motor controller to overwrite the currently stored actual identification code and actual position angle value; wherein, the position angle data storage unit includes a position angle segment, a position angle range segment, a position angle verification segment and an identification code verification segment.
[0012] Preferably, writing the target position angle value, the valid range, the target position angle value check code and the target identification code check code into the position angle data storage unit of the motor controller includes: writing the target position angle value into the position angle segment, writing the valid range into the position angle range segment, writing the target position angle value check code into the position angle check segment, and writing the target identification code check code into the identification code check segment.
[0013] In a second aspect, the present invention provides a motor position angle calibration device according to an embodiment of the present invention, the device comprising:
[0014] A first data acquisition unit is used to acquire a nominal target position angle value and a target identification code of a target motor;
[0015] a second data acquisition unit, configured to acquire an actual identification code currently stored in the motor controller and an actual position angle value currently used to control the target motor;
[0016] a verification unit, configured to determine a position angle verification result of the target motor based on the target position angle value, the actual position angle value, the target identification code, and the actual identification code;
[0017] A data writing unit is used to update the actual identification code and actual position angle value currently stored in the motor controller according to the target position angle value and the target identification code when it is determined that the position angle verification result is mismatched.
[0018] In a third aspect, the present invention provides a motor position angle calibration device through an embodiment of the present invention, wherein the motor position angle calibration device includes a memory, a processor, and a code stored on the memory and executable on the processor, wherein the processor implements any one of the implementations in the first aspect when executing the code.
[0019] One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages:
[0020] The embodiment of the present invention obtains the nominal target position angle value and target identification code of the target motor; obtains the actual identification code currently stored in the motor controller, and the actual position angle value currently used to control the target motor; and determines the position angle verification result of the target motor based on the target position angle value, the actual position angle value, the target identification code and the actual identification code; if the position angle verification result is judged to be mismatched, the actual identification code and the actual position angle value currently stored in the motor controller are updated according to the target position angle value and the target identification code, thereby improving the matching accuracy of the motor and the position angle. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0022] Figure 1 Flowchart of a method for calibrating a motor position angle according to an embodiment of the present invention;
[0023] Figure 2 Schematic diagram of the position angle data storage unit structure in an embodiment of the present invention;
[0024] Figure 3 Schematic diagram of the structure of a motor position angle calibration device according to an embodiment of the present invention;
[0025] Figure 4 Schematic diagram of the structure of the motor position angle calibration device in an embodiment of the present invention. DETAILED DESCRIPTION
[0026] The embodiments of the present invention solve the technical problem of low accuracy in matching the motor and the position angle in the related art by providing a method, device and equipment for calibrating the motor position angle.
[0027] The technical solution provided by the embodiments of the present invention is to solve the above technical problems, and the overall idea is as follows:
[0028] First, the nominal target position angle value and target identification code of the target motor are obtained. The actual identification code currently stored in the motor controller and the actual position angle value currently used to control the target motor are also obtained. Based on the target position angle value, actual position angle value, target identification code, and actual identification code, the position angle verification result of the target motor is determined. If the position angle verification result is determined to be mismatched, the actual identification code and actual position angle value currently stored in the motor controller are updated based on the target position angle value and target identification code.
[0029] In order to better understand the above technical solution, the above technical solution will be described in detail below with reference to the accompanying drawings and specific implementation methods.
[0030] First, the term "and / or" as used herein simply describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A alone, A and B together, or B alone. Furthermore, the character " / " in this document generally indicates an "or" relationship between the associated objects.
[0031] It should be noted that the terms "first," "second," and the like in the specification and claims of the present invention and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, such that the embodiments of the present invention described herein can be implemented in an order other than that illustrated or described herein.
[0032] In the first aspect, the present invention provides a motor position angle verification method through an embodiment of the present invention. The motor position angle verification method verifies the position angle to ensure that the position angle value is written safely and reliably without increasing hardware and / or mechanical costs, thereby ensuring that the position angle value matches the target motor; and can also monitor the stored position angle value in real time to avoid failure of the stored position angle value, thereby ensuring that the stored position angle value is valid during the life cycle of the drive motor system.
[0033] See Figure 1 As shown, the motor position angle calibration method includes the following steps:
[0034] Step S101: obtaining a nominal target position angle value and a target identification code of a target motor; obtaining an actual identification code currently stored in a motor controller, and an actual position angle value currently used to control the target motor.
[0035] Specifically, after the vehicle's motor system is repaired or parts are replaced, or before the vehicle leaves the factory, the motor system needs to be initially debugged. After the motor system is assembled, the target position angle value and target identification code can be obtained using a calibration tool.
[0036] In practice, a calibration tool, such as an offline electrical inspection device or diagnostic instrument, can be used to scan the position angle value on the motor system housing label to obtain the target position angle value. The target identification code can then be obtained by scanning the VIN (Vehicle Identification Number) of the vehicle equipped with the motor. Alternatively, the target identification code can be the target motor's code.
[0037] Correspondingly, in a specific implementation process, a calibration tool may be used to directly read the actual identification code and actual position angle value stored in the motor control unit (MCU).
[0038] Unlike the above embodiment, during daily vehicle use, the motor system can monitor the stored status of the position angle value through a power-on self-test each time the vehicle is started. Therefore, the target position angle value and target identification code of the target motor can be directly obtained through the motor system.
[0039] In the specific implementation process, after starting the vehicle, the motor system enters the self-test phase and starts to read the actual identification code and actual position angle value stored in the motor controller; and reads the target position angle value stored in the target motor storage unit, and reads the vehicle's VIN code to obtain the target identification code.
[0040] It should be noted that the actual identification code and the actual position angle value can be written into the motor controller in advance using a preset program.
[0041] Step S102: Determine a position angle verification result of the target motor based on the target position angle value, the actual position angle value, the target identification code, and the actual identification code.
[0042] Specifically, the target position angle value can be used to determine the target position angle value check code; the target identification code can be used to determine the target identification code check code; the actual position angle value can be used to determine the actual position angle value check code; and the actual identification code can be used to determine the actual identification code check code.
[0043] In a specific implementation process, a verification algorithm, such as a CRC algorithm (Cyclic Redundancy Check) or an MD5 algorithm (Message-Digest Algorithm 5), may be used to process the target position angle value to determine a target position angle value verification code.
[0044] In a specific implementation process, a verification algorithm, such as a CRC algorithm or an MD5 algorithm, may also be used to process the target identification code to determine a target identification code verification code.
[0045] Based on the same implementation mode, the actual position angle value can be used to determine the actual position angle value check code; and the actual identification code can be used to determine the actual identification code check code.
[0046] Then, the actual position angle value check code can be compared with the target position angle value check code to obtain a first comparison result; the actual identification code check code can be compared with the target identification code check code to obtain a second comparison result, and then, based on the first comparison result and the second comparison result, the position angle check result is obtained.
[0047] During the specific implementation process, if the first comparison result is detected as: the actual position angle value verification code is different from the target position angle value verification code, and the second comparison result is detected as: the actual identification code verification code is the same as the target identification code verification code, then the position angle verification result is determined to be mismatched, and it indicates that the motor body in the motor system installed in the vehicle has been replaced, and the position angle parameters have not yet matched, and the position angle value needs to be recalibrated.
[0048] During the specific implementation process, if the first comparison result is detected as: the actual position angle value check code is the same as the target position angle value check code, and the second comparison result is detected as: the actual identification code check code is different from the target identification code check code, then the position angle check result is determined to be mismatched, and it indicates that the motor controller in the motor system of the vehicle has been replaced, and the replaced motor controller is an old controller, and the position angle value needs to be recalibrated.
[0049] As an optional implementation, before obtaining the position angle verification result based on the first comparison result and the second comparison result, it may also include: using the target position angle value to determine the target effective range of the target position angle value; using the actual position angle value to determine the actual effective range of the actual position angle value; and comparing the actual effective range with the effective range to obtain a third comparison result.
[0050] In a specific implementation, the target effective range is the upper and lower limits of the target position angle value. The upper and lower limits of the target position angle value can be calculated using the preset angle compensation accuracy and the position angle detection value, thereby determining the target effective range of the target position angle value. Based on the same implementation method, the actual position angle value can be used to determine the actual effective range of the actual position angle value. The preset angle compensation accuracy can be set to 1 electrical degree, which is converted to a digital value and then added or subtracted based on the motor system position angle detection value to obtain the upper and lower limits.
[0051] Correspondingly, obtaining a position angle verification result based on the first comparison result and the second comparison result may further include obtaining a position angle verification result based on the first comparison result, the second comparison result and the third comparison result.
[0052] If the second comparison result is detected as: the actual identification code check code is different from the identification code check code, then the position angle verification result is determined to be mismatched, which can be recorded as "parameter mismatch" in the diagnostic module of the motor system. The cause of the fault is that the replaced old motor controller does not match the current motor. The motor system starts the derating protection function and lights up the "performance limited light" on the vehicle instrument to remind the user that the current motor system is abnormal.
[0053] If the first comparison result indicates that the actual position angle value check code differs from the position angle value check code, and / or the third comparison result indicates that the actual valid range differs from the target valid range, the position angle check result is determined to be a mismatch, indicating that the position angle data has changed during storage. An "MCU memory fault" may be recorded in the motor system's diagnostic module. The cause of the fault is an abnormality in the motor controller's memory unit, resulting in storage failure. The motor system activates zero output protection, stops outputting power, and illuminates a "critical fault light" on the vehicle's instrument panel to remind the user to replace the motor controller.
[0054] It should be noted that after obtaining the actual position angle value, if it is detected that the target position angle value and / or the target identification code cannot be read, it will be recorded as "MCU memory failure" in the diagnostic module of the motor system. The cause of the failure is damage to the memory of the motor controller.
[0055] In addition, after obtaining the actual position angle value, the actual position angle value can be directly verified. If the actual position angle value is detected to be the initial position angle value, the position angle verification result of the target motor is determined to be mismatched. The initial position angle value can be an uncommon position angle value.
[0056] For example, after using offline electrical inspection equipment to read the actual position angle value stored in the motor controller, if the actual position angle value is detected to be 0xFF, the position angle verification result of the target motor is determined to be mismatched. This indicates that the vehicle is equipped with a new motor controller, and the new motor controller has not yet matched the position angle parameters of the target motor.
[0057] When the actual position angle value is not detected to be the initial position angle value, the above step S102 may be performed.
[0058] Step S103: If it is determined that the position angle verification result is mismatched, the actual identification code and actual position angle value currently stored in the motor controller are updated according to the target position angle value and the target identification code.
[0059] Specifically, if the position angle verification result is detected as mismatch, the target position angle value is used to determine the target position angle value verification code and the target effective range of the target position angle value; the target identification code is used to determine the target identification code verification code.
[0060] Next, the target position angle value, target effective range, target position angle value check code and target identification code check code are written into the position angle data storage unit of the motor controller to overwrite the currently stored actual identification code and actual position angle value.
[0061] See Figure 2 As shown, the position angle data storage unit includes a position angle segment 201 , a position angle range segment 202 , a position angle verification segment 203 and an identification code verification segment 204 .
[0062] During the specific implementation process, the target position angle value can be written into the position angle segment 201, the valid range can be written into the position angle range segment 202, the target position angle value check code can be written into the position angle check segment 203, and the target identification code check code can be written into the identification code check segment 204.
[0063] The position angle value stored in the position angle segment 201 can be provided by the motor manufacturer after detection; the position angle value check code stored in the position angle check segment 203 can be calculated using the algorithm specified by the host manufacturer and the motor manufacturer; the identification check code of the identification code check segment 204 can be calculated by the host manufacturer using a preset check algorithm; the effective range of the position angle range segment 202 can be obtained by calculating the accuracy error (set by the design requirements of the host manufacturer and the motor manufacturer) and the position angle value.
[0064] For example, a preset program may be used to allocate a position angle data storage unit with a fixed length in the memory space of the motor controller, such as a position angle data storage unit with a length of 9 bytes.
[0065] Among them, the length of the position angle segment 201 can be set according to the structure of the position sensor and the detection accuracy, and the length of the data segment can be adjusted according to actual conditions. For example, the default length can be set to 2 bytes; for example, the length of the position angle range segment 202 can be 4 bytes; for example, the length of the position angle check segment 203 can be 1 byte; for example, the length of the identification code check segment 204 can be 2 bytes.
[0066] In a second aspect, the present invention provides a motor position angle calibration device through an embodiment of the present invention. Figure 3 As shown, the motor position angle calibration device includes:
[0067] The first data acquisition unit 301 is configured to acquire a nominal target position angle value and a target identification code of a target motor.
[0068] The second data acquisition unit 302 is used to acquire the actual identification code currently stored in the motor controller and the actual position angle value currently used to control the target motor.
[0069] The verification unit 303 is configured to determine a position angle verification result of the target motor based on the target position angle value, the actual position angle value, the target identification code, and the actual identification code.
[0070] The data writing unit 304 is configured to update the actual identification code and actual position angle value currently stored in the motor controller according to the target position angle value and the target identification code when determining that the position angle verification result is mismatched.
[0071] As an optional implementation, the second data acquisition unit 302 includes:
[0072] The first data calculation subunit is used to determine the target position angle value check code using the target position angle value; determine the target identification code check code using the target identification code; determine the actual position angle value check code using the actual position angle value; and determine the actual identification code check code using the actual identification code.
[0073] The first data comparison subunit is used to compare the actual position angle value check code with the target position angle value check code to obtain a first comparison result; and compare the actual identification code check code with the target identification code check code to obtain a second comparison result.
[0074] The first result determination subunit is configured to obtain a position angle verification result based on the first comparison result and the second comparison result.
[0075] As an optional implementation manner, the result determination subunit is specifically configured to:
[0076] If it is detected that the actual position angle value check code is different from the target position angle value check code, and the actual identification code check code is the same as the target identification code check code, the position angle check result is determined to be mismatched; if it is detected that the actual position angle value check code is the same as the target position angle value check code, and the actual identification code check code is different from the target identification code check code, the position angle check result is determined to be mismatched.
[0077] As an optional implementation, the second data acquisition unit 302 further includes:
[0078] The second data calculation subunit is used to determine a target effective range of the target position angle value using the target position angle value; and to determine an actual effective range of the actual position angle value using the actual position angle value.
[0079] The second data comparison subunit is used to compare the actual effective range with the effective range to obtain a third comparison result.
[0080] The second result determination subunit is used to obtain a position angle verification result based on the first comparison result, the second comparison result and the third comparison result.
[0081] As an optional implementation manner, the second result determination subunit is specifically configured to:
[0082] If it is detected that the actual identification code check code is different from the identification code check code, the position angle check result is determined to be mismatched; if it is detected that the actual position angle value check code is different from the position angle value check code, and / or the actual valid range is different from the target valid range, the position angle check result is determined to be mismatched.
[0083] As an optional implementation manner, the verification unit 304 is further configured to:
[0084] When it is detected that the actual position angle value is the initial position angle value, it is determined that the position angle verification result of the target motor does not match.
[0085] As an optional implementation manner, the data writing unit 304 is specifically configured to:
[0086] If the position angle verification result is detected as a mismatch, the target position angle value is used to determine the target position angle value verification code and the target effective range of the target position angle value; the target identification code is used to determine the target identification code verification code; the target position angle value, the target effective range, the target position angle value verification code and the target identification code verification code are written into the position angle data storage unit of the motor controller to overwrite the currently stored actual identification code and actual position angle value; wherein the position angle data storage unit includes a position angle segment, a position angle range segment, a position angle verification segment and an identification code verification segment.
[0087] As an optional implementation manner, the data writing unit 304 is further configured to:
[0088] Write the target position angle value into the position angle segment, write the valid range into the position angle range segment, write the target position angle value check code into the position angle check segment, and write the target identification code check code into the identification code check segment.
[0089] Since the motor position angle calibration method described in this embodiment is the method used to implement the motor position angle calibration device in the embodiment of the present invention, those skilled in the art will be able to understand the specific implementation methods and various variations of the method in this embodiment based on the motor position angle calibration method described in the embodiment of the present invention. Therefore, how this method implements the method in the embodiment of the present invention will not be described in detail here. As long as those skilled in the art can implement the method used in the motor position angle calibration device in the embodiment of the present invention, it falls within the scope of protection of the present invention.
[0090] In a third aspect, based on the same inventive concept, an embodiment of the present invention provides a motor position angle calibration device.
[0091] actual Figure 4 As shown, the motor position angle calibration device provided by an embodiment of the present invention includes: a memory 401, a processor 402 and a code stored in the memory and executable on the processor 402. When executing the code, the processor 402 implements any implementation of the motor position angle calibration method described above.
[0092] Among them, Figure 4 In the embodiment of the present invention, a bus architecture (represented by bus 400) is shown. Bus 400 may include any number of interconnected buses and bridges, and bus 400 links together various circuits including one or more processors represented by processor 402 and memory represented by memory 401. Bus 400 may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. Bus interface 405 provides an interface between bus 400 and receiver 403 and transmitter 404. Receiver 403 and transmitter 404 may be the same component, namely a transceiver, which provides a unit for communicating with various other devices over a transmission medium. Processor 402 is responsible for managing bus 400 and general processing, while memory 401 may be used to store data used by processor 402 when performing operations.
[0093] The technical solutions in the above embodiments of the present invention have at least the following technical effects or advantages:
[0094] By obtaining the nominal target position angle value and target identification code of the target motor; obtaining the actual identification code currently stored in the motor controller, and the actual position angle value currently used to control the target motor; and determining the position angle verification result of the target motor based on the target position angle value, the actual position angle value, the target identification code and the actual identification code; if it is judged that the position angle verification result is mismatched, the actual identification code and the actual position angle value currently stored in the motor controller are updated according to the target position angle value and the target identification code, so as to avoid the position angle value used to control the motor being different from the position angle value calibrated by the motor, thereby improving the matching accuracy of the motor and the position angle.
[0095] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable code.
[0096] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as combinations of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer instructions. These computer instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0097] These computer instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0098] These computer instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0099] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0100] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.
Claims
1. A method for calibrating a motor position angle, characterized in that: include: Obtain the nominal target position angle value and target identification code of the target motor; Obtaining an actual identification code currently stored in the motor controller and an actual position angle value currently used to control the target motor; Determining a position angle verification result of the target motor based on the target position angle value, the actual position angle value, the target identification code, and the actual identification code; If it is determined that the position angle verification result is mismatched, updating the actual identification code and actual position angle value currently stored in the motor controller according to the target position angle value and the target identification code; The determining the position angle verification result based on the target position angle value, the actual position angle value, the target identification code, and the actual identification code includes: Using the target position angle value, a target position angle value check code is determined; using the target identification code, a target identification code check code is determined; using the actual position angle value, an actual position angle value check code is determined; using the actual identification code, an actual identification code check code is determined; Comparing the actual position angle value check code with the target position angle value check code to obtain a first comparison result; comparing the actual identification code check code with the target identification code check code to obtain a second comparison result; Obtaining the position angle verification result based on the first comparison result and the second comparison result; Before obtaining the position angle verification result based on the first comparison result and the second comparison result, the method further includes: Using the target position angle value, determining a target effective range of the target position angle value; using the actual position angle value, determining an actual effective range of the actual position angle value; Comparing the actual effective range with the effective range to obtain a third comparison result; The obtaining the position angle verification result based on the first comparison result and the second comparison result includes: Obtaining the position angle verification result based on the first comparison result, the second comparison result, and the third comparison result; If the second comparison result is detected as: the actual identification code check code is different from the identification code check code, the position angle check result is determined to be mismatched. If the first comparison result is detected as: the actual position angle value check code is different from the position angle value check code, and / or the third comparison result is detected as: the actual valid range is different from the target valid range, then it is an MCU memory failure.
2. The method according to claim 1, wherein The obtaining the position angle verification result based on the first comparison result and the second comparison result includes: If it is detected that the actual position angle value check code is different from the target position angle value check code, and the actual identification code check code is the same as the target identification code check code, then the position angle check result is determined to be mismatched; If it is detected that the actual position angle value check code is the same as the target position angle value check code, and the actual identification code check code is different from the target identification code check code, then the position angle check result is determined to be mismatched.
3. The method according to claim 1, wherein The obtaining the position angle verification result based on the first comparison result, the second comparison result, and the third comparison result includes: If it is detected that the actual identification code verification code is different from the identification code verification code, determining that the position angle verification result is mismatched; If it is detected that the actual position angle value check code is different from the position angle value check code, and / or the actual effective range is different from the target effective range, the position angle check result is determined to be mismatched.
4. The method according to claim 1, wherein Before determining the position angle verification result of the target motor based on the target position angle value, the actual position angle value, the target identification code, and the actual identification code, the method further includes: If it is detected that the actual position angle value is the initial position angle value, determining that the position angle verification result of the target motor is mismatched; Otherwise, the step of determining a position angle verification result of the target motor based on the target position angle value, the actual position angle value, the target identification code, and the actual identification code is performed.
5. The method according to any one of claims 1 to 4, characterized in that: If the position angle verification result is detected as mismatch, the target position angle value is used to determine a target position angle value verification code and a target valid range of the target position angle value; the target identification code is used to determine a target identification code verification code; Writing the target position angle value, the target effective range, the target position angle value check code, and the target identification code check code into the position angle data storage unit of the motor controller to overwrite the currently stored actual identification code and actual position angle value; The position angle data storage unit includes a position angle segment, a position angle range segment, a position angle verification segment, and an identification code verification segment.
6. The method according to claim 5, wherein Writing the target position angle value, the valid range, the target position angle value check code, and the target identification code check code into the position angle data storage unit of the motor controller includes: The target position angle value is written into the position angle segment, the valid range is written into the position angle range segment, the target position angle value check code is written into the position angle check segment, and the target identification code check code is written into the identification code check segment.
7. A motor position angle calibration device, characterized in that: The device comprises: A first data acquisition unit is used to acquire a nominal target position angle value and a target identification code of a target motor; a second data acquisition unit, configured to acquire an actual identification code currently stored in the motor controller and an actual position angle value currently used to control the target motor; The second data acquisition unit includes: The first data calculation subunit is used to determine the target position angle value check code using the target position angle value; determine the target identification code check code using the target identification code; determine the actual position angle value check code using the actual position angle value; and determine the actual identification code check code using the actual identification code; The first data comparison subunit is used to compare the actual position angle value check code with the target position angle value check code to obtain a first comparison result; and compare the actual identification code check code with the target identification code check code to obtain a second comparison result; A first result determination subunit, configured to obtain a position angle verification result based on the first comparison result and the second comparison result; The second data calculation subunit is used to determine a target effective range of the target position angle value using the target position angle value; and to determine an actual effective range of the actual position angle value using the actual position angle value; a second data comparison subunit, configured to compare the actual valid range with the valid range to obtain a third comparison result; A second result determination subunit is configured to obtain a position angle verification result based on the first comparison result, the second comparison result, and the third comparison result; If the second comparison result is detected as: the actual identification code check code is different from the identification code check code, then the position angle check result is determined to be mismatched. If the first comparison result is detected as: the actual position angle value check code is different from the position angle value check code, and / or the third comparison result is detected as: the actual valid range is different from the target valid range, then the MCU memory is faulty. a verification unit, configured to determine a position angle verification result of the target motor based on the target position angle value, the actual position angle value, the target identification code, and the actual identification code; A data writing unit is used to update the actual identification code and actual position angle value currently stored in the motor controller according to the target position angle value and the target identification code when it is determined that the position angle verification result is mismatched.
8. A motor position angle calibration device, comprising a memory, a processor, and a code stored in the memory and executable on the processor, wherein: When executing the code, the processor implements the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Panoramic image calibration method for after-sales vehicle
CN112669390A