A fault recording method, storage medium, system, motor controller and automobile
By embedding a fault recording method in the motor PWM interrupt, the problem of difficulty in recording motor faults in the existing technology is solved, more complete fault information recording and more efficient fault analysis are achieved, and the difficulty and cost of system modifications are reduced.
Patent Information
- Application Number
- CN202310287974.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-22
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2043-03-22
AI Technical Summary
In the prior art, fault snapshots based on UDS or OBD protocols are difficult to record fault information of motor faults that occur for a very short time, especially faults caused by current out of control.
A fault recording method is embedded in the PWM interrupt cycle of the motor. The motor fault information is recorded in each PWM interrupt until the information record is complete, and the latest information is cyclically overwritten in the storage device to control the information length. The motor fault information is recorded using the short cycle of the PWM interrupt.
It achieves more complete recording of motor fault information, improves the efficiency of fault cause analysis, and reduces the difficulty and cost of modifying the entire vehicle system.
Smart Images

Figure CN116434378B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of motor fault information detection, and in particular to a fault recording method, a storage medium, a system, a motor controller and an automobile. BACKGROUND
[0002] At present, in order to facilitate positioning of motor fault causes, some environmental variables at the time of fault occurrence are stored after the fault occurs, and the fault causes are determined by reading the environmental variables at the time of fault occurrence.
[0003] Among them, the fault recording program of the electric vehicle is mostly based on the UDS (Unified Diagnostic Services) or OBD (On-Board Diagnostics) diagnostic protocol of the electric vehicle, and the interval between two adjacent fault recording snapshots is 10 ms, and the fastest can only reach 1 ms. That is, the environmental variables can be recorded every 10 ms.
[0004] However, the duration of motor fault is very short, for example, when the motor current is out of control, two of the three-phase currents will rise to more than 1000 amperes within 200 microseconds, and the duration of the fault is very short, much less than 10 milliseconds, and the existing fault snapshot developed based on the UDS or OBD protocol is difficult to record. SUMMARY
[0005] The embodiments of the present application provide a fault recording method, a storage medium, a system, a motor and a vehicle to solve the problem that the fault snapshot developed based on the UDS or OBD protocol in the related art is difficult to record the rapidly occurring motor fault.
[0006] In a first aspect, a fault recording method is provided, which includes the following steps: determining whether the motor fault information is recorded completely in each PWM interrupt period; if yes, stopping recording the motor fault information, otherwise recording the motor fault information until the motor fault information is recorded completely. By embedding fault recording in PWM interruption, the motor fault information at the time is recorded in each PWM interruption, and the recording is maintained until the motor fault information is recorded completely before the motor fault information is recorded completely. Compared with recording the motor fault information in the UDS or OBD protocol of the whole vehicle, the cycle of PWM interruption is shorter, and the cycle period of PWM interruption is 100-125 microseconds, which is less than the fault duration when the motor current is out of control, and the motor fault occurrence information can be recorded more completely. And it does not need to change the UDS or OBD protocol of the whole vehicle, the program adjustment of the whole vehicle is less, the PWM interruption change is lower, the realization is faster, and the cost is lower.
[0007] In some embodiments, the recording motor fault information comprises: recording motor fault information in a storage device, when the recorded motor fault information data in the storage device reaches a first length, the latest motor fault information is overwritten on the earliest motor fault information; determining whether the recording length of the motor fault information after the fault reaches a second length, if yes, the motor fault information has been recorded complete, stop recording motor fault information, and the second length is less than the first length. The motor fault information is stored by the storage device, and when the motor fault information in the storage device reaches the first length, the length of the motor fault information in the storage device is kept at the first length by overwriting the latest motor fault information on the earliest motor fault information, avoiding insufficient storage space of the storage device due to the length of the motor fault information being too large. When the length of the motor fault information after the fault reaches the second length, it indicates that the motor fault information is complete, and since the second length is less than the first length, the storage device contains both the motor fault information before the fault and the motor fault information after the fault. By stopping recording the motor fault information after the motor fault information after the fault reaches the second length, the motor fault information before and after the fault can be obtained when searching for the fault information, which facilitates the maintenance personnel to compare the motor fault information before and after the fault to find out the fault reason of the motor. Compared with other embodiments, only the motor fault information after the fault is obtained to repair the motor fault reason, in this embodiment, more complete motor fault information can be saved, and the efficiency of repair is improved.
[0008] In some embodiments, whether the stored motor fault information reaches the first length is determined by the way of cycle counting, that is, after recording the motor fault information in each PWM interrupt, the second interrupt count value is increased by one, and when the second interrupt count value reaches a preset threshold value, it indicates that the motor fault information stored in the storage device reaches the first length, at this time the second interrupt count value is reset, and the corresponding motor fault information storage position is determined according to the reset second interrupt count value, so that the new motor fault information is overwritten on the earliest motor fault information. That is to say, the value of each second interrupt count value corresponds to a storage position of the storage device, and by cycling the second interrupt count value, the new motor fault information is overwritten on the old motor fault information.
[0009] In some embodiments, after the recording of the motor fault information is stopped, the fault recording method further comprises: dividing the motor fault information in the storage device into motor fault information before the fault and motor fault information after the fault according to the second length and the storage position of the latest motor fault information. The specific position of the motor fault information at the time of the fault in the storage device can be obtained by the latest storage position of the motor storage information and the second length, and the motor fault information stored in the storage device can be divided into motor fault information before the fault and motor fault information after the fault according to the motor fault information at the time of the fault. In order to compare the motor fault information before and after the fault during subsequent maintenance. In this embodiment, the storage position of the latest motor fault information can be accurately known based on the second count value. In some optional embodiments, the third count value can be confirmed together with the first count value and the second count value, so that the first count value and the second count value can be obtained by reading one data when reading data.
[0010] In some embodiments, the judgment of whether the recording length of the motor fault information after the fault reaches the second length comprises: judging whether the motor has failed, if yes, the first interrupt count value is counted once; judging whether the first interrupt count value reaches the first value, if no, continuing to judge whether the motor fault information is recorded completely in each PWM interrupt period, until the first interrupt count value reaches the first value, then resetting the first count value, and specifying that the recording length of the information after the fault reaches the second length. That is, after the motor fails, the first count value is counted once for each PWM interrupt. Since the first count value is not counted before the motor fails, it is only counted after the motor fails. And the counting frequency of the first count value is consistent with the frequency of the motor fault information storage. The value of the first count value corresponds to the motor fault information recorded after the motor fails. The length of the motor fault information stored after the motor fails can be judged by the second count value. In this embodiment, the motor fault code will change after the motor fails, and the motor fault can be judged by recognizing the motor fault code, so as to start the counting of the first count value.
[0011] In some embodiments, the recording of the motor fault information in the storage device comprises: recording the motor fault information in the working memory before the motor is powered off; recording the motor fault information recorded in the working memory into the internal memory after the motor is powered off, and directly recording the subsequent motor fault information in the internal memory. Recording the motor fault information in the working memory before the motor is powered off can record and overwrite information more quickly. Recording the motor fault information in the internal memory after the motor is powered off can prevent the loss of motor storage information after the storage device is powered off.
[0012] In some embodiments, the motor fault information includes motor rotating speed, bus voltage, three-phase current, internal excitation current, torque current and modulation coefficient. By recording the motor rotating speed, bus voltage, three-phase current, internal excitation current, torque current and modulation coefficient, the motor fault information can be comprehensively understood, and the motor fault cause can be understood faster after comparing the motor fault information before and after the fault.
[0013] In a second aspect, a computer readable storage medium is provided, which includes a stored computer program, wherein the computer readable storage medium controls a device where the computer readable storage medium is located to execute any of the above-mentioned fault recording methods when the computer program is running.
[0014] In a third aspect, a fault recording system is provided, which includes a first judging module for judging whether the motor fault information is recorded completely in each PWM interrupt cycle, and a recording module for recording the motor fault information when the first judging module judges that the fault information is not recorded completely.
[0015] In a fourth aspect, a motor controller is provided, which includes a processor and a memory, the memory is used for storing program instructions, and the processor realizes the above-mentioned fault information recording method when calling the program instructions.
[0016] In a fifth aspect, a vehicle is provided, which is equipped with the above-mentioned motor controller.
[0017] The technical scheme provided by the present application has the following beneficial effects:
[0018] The fault recording method, storage medium, system, motor and vehicle provided by the embodiments of the present application are based on the PWM interrupt cycle of the motor to judge whether the fault information is recorded completely, and the cycle period of the PWM interrupt is 100-125 microseconds, which is less than the fault duration of the current out of control of the motor, that is, as long as the motor has a fault, the fault duration of the motor will cross two PWM interrupt cycles, and the fault occurrence information of the motor can be recorded more completely. Moreover, the UDS or OBD protocol of the vehicle does not need to be changed, and the change of the UDS or OBD protocol is difficult and expensive. The present application avoids adjusting the UDS or OBD protocol, and can be developed faster and with lower development cost. Therefore, a more sensitive and short development cycle fault recording method is provided. BRIEF DESCRIPTION OF DRAWINGS
[0019] In order to make the technical solutions in the embodiments of the present application clearer, the accompanying drawings needed in the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description only represent some of the embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative effort based on these drawings.
[0020] Figure 1 A flow chart of a fault recording method provided by an embodiment of the present application is shown in FIG. 2.
[0021] Figure 2 A flow chart of another fault recording method provided by an embodiment of the present application is shown in FIG. 3. DETAILED DESCRIPTION
[0022] In order to make the technical solutions in the embodiments of the present application clearer, the accompanying drawings needed in the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description only represent some of the embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative effort based on these drawings.
[0023] At present, in order to facilitate positioning of motor fault causes, some environmental variables at the time of fault occurrence are stored after the fault occurs, and the fault causes are determined by reading the environmental variables at the time of fault occurrence.
[0024] Among them, the fault recording program of the electric vehicle is mostly based on the UDS (Unified Diagnostic Services) or OBD (On-Board Diagnostics) diagnostic protocol of the electric vehicle, and the interval between two adjacent fault recording snapshots is 10 ms, and the fastest can only reach 1 ms. That is, the environmental variables can be recorded once every 10 ms.
[0025] However, the duration of motor fault is very short, for example, when the motor current is out of control, two of the three-phase currents will rise to more than 1000 amperes within 200 microseconds, and the duration of the fault is very short, much less than 10 milliseconds, and the fault snapshot developed based on the existing UDS or OBD protocol is difficult to record.
[0026] The embodiments of the present application provide a fault recording method, a storage medium, a system, a motor controller and a vehicle, which can solve the problem that the fault snapshot developed based on the related art UDS or OBD protocol is difficult to record the fast-occurring motor fault.
[0027] The application provides a fault recording method, a storage medium, a system, a motor controller and a vehicle. In the non-conflicting case, the features in the following embodiments and implementation manners can be combined with each other.
[0028] Referring to Figure 1 As shown in the figure, a flow chart of a fault recording method provided by the application includes the following steps: judging whether the motor fault information is recorded completely in each PWM (Pulse width modulation) interrupt period; if yes, stopping recording the motor fault information, otherwise recording the motor fault information until the motor fault information is recorded completely. By embedding the fault recording in the PWM interrupt, the motor fault information at the time is recorded in each PWM interrupt, and the recording is kept until the motor fault information is recorded completely before the motor fault information is recorded completely. PWM refers to various pulse width modulation technologies, generally using a triangle wave with a frequency much higher than that of a sine wave as a carrier wave, the PWM interrupt in the example is an interrupt with the same period as the carrier wave, and the triggering mode is a timer trigger or an ADC conversion completion trigger. The interrupt is a common technology in motor control, and the interrupt is mainly used to realize a motor control algorithm, so a very fast speed is required, and the interrupt is the fastest interrupt in the motor controller. Compared with recording the motor fault information in the UDS or OBD protocol of the whole vehicle, the cycle of the PWM interrupt is shorter, the cycle of the PWM interrupt is 100-125 microseconds, which is less than the fault duration of the current out of control of the motor, and the motor fault information can be recorded more completely. Moreover, the UDS or OBD protocol of the whole vehicle does not need to be changed, the program of the whole vehicle needs to be adjusted less, the PWM interrupt is more difficult to change, the implementation is faster, and the cost is lower.
[0029] Referring to Figure 2In some optional embodiments, the recording motor fault information comprises: recording the motor fault information in the storage device, when the recorded motor fault information data in the storage device reaches a first length, covering the latest motor fault information with the earliest motor fault information; judging whether the recording length of the motor fault information after the fault reaches a second length, if yes, the motor fault information has been recorded completely, stopping recording the motor fault information, and the second length is smaller than the first length. The motor fault information is stored in the storage device, the motor fault information in the storage device reaches the first length, the length of the motor fault information in the storage device is kept at the first length by covering the latest motor fault information with the earliest motor fault information, and the storage space of the storage device is prevented from being insufficient due to the length of the motor fault information being too large. When the length of the motor fault information after the fault reaches the second length, it is indicated that the motor fault information is complete, and since the second length is smaller than the first length, the storage device contains the motor fault information before the fault and the motor fault information after the fault. By stopping recording the motor fault information after the motor fault information after the fault reaches the second length, the motor fault information before and after the fault can be obtained when the fault information is searched, and the maintenance personnel can compare the motor fault information before and after the fault to know the fault reason of the motor. Compared with other embodiments, only the motor fault information after the fault is obtained to maintain the motor fault reason, in this embodiment, more complete motor fault information can be saved, and the maintenance efficiency is improved.
[0030] In this embodiment, the motor fault information is stored in the storage device to facilitate subsequent reading of the stored motor fault information when the fault information is judged. In other embodiments, the motor fault information can be directly uploaded to the network to store more motor fault information.
[0031] In this embodiment, the motor fault information is stored in a cyclic covering manner, so that the storage device with fixed capacity can store motor fault information with a length meeting the requirements without occupying too much storage space. In other embodiments, the motor fault information can be uploaded to cloud storage, and the motor fault information is backed up regularly to expand the length of the motor fault information, facilitate the maintenance personnel to maintain the fault reason when encountering complex situations, and collect more information to help train the fault warning model.
[0032] In some embodiments, after the recording of the motor fault information is stopped, the fault recording method further comprises: dividing the motor fault information in the storage device into motor fault information before the fault and motor fault information after the fault according to the second length and the storage position of the latest motor fault information. The specific position of the motor fault information at the time of the fault in the storage device can be obtained by the latest storage position of the motor storage information and the second length, and the motor fault information stored in the storage device can be divided into motor fault information before the fault and motor fault information after the fault according to the motor fault information at the time of the fault. In order to compare the motor fault information before and after the fault during subsequent maintenance. In this embodiment, the storage position of the latest motor fault information can be accurately known based on the first count value. In some optional embodiments, the third count value can be confirmed together with the first count value and the second count value, so as to obtain the first count value and the second count value by reading one data when reading data.
[0033] In this embodiment, the occurrence time corresponding to the motor fault information is determined by the first count value. In other embodiments, a motor fault occurrence flag can be embedded in the motor fault information, such as a zero flag bit embedded in the motor fault information when no fault occurs, and a flag bit embedded in the motor fault information when recording the motor fault information when a fault occurs. The length of the motor fault information is lengthened to distinguish whether the motor fault information belongs to the motor fault information before the motor fault or the motor fault information after the motor fault. In this embodiment, the occurrence time of the motor fault information is determined by the first count value, which reduces the recording length of the motor fault information, reduces the occupation of the storage space of the storage device, and is simpler and lower in cost to implement.
[0034] In this embodiment, whether the stored motor fault information reaches the first length is determined by the cycle count, that is, the second interrupt count value is increased by one after recording the motor fault information in each PWM interrupt, and when the second interrupt count value reaches a preset threshold, it is indicated that the motor fault information stored in the storage device reaches the first length. At this time, the second interrupt count value is reset, and the corresponding motor fault information storage position is determined according to the reset second interrupt count value, so that the new motor fault information is overlaid on the earliest motor fault information. That is, the value of each second interrupt count value corresponds to a storage position of the storage device, and the new motor fault information is overlaid on the old motor fault information by cycling the second interrupt count value.
[0035] Referring to Figure 2In some optional embodiments, the judging whether the record length of the motor fault information after the fault reaches the second length comprises: judging whether the motor has failed, if yes, the first interruption count value is counted once; judging whether the first interruption count value reaches the first value, if no, the judging whether the motor fault information is recorded completely in each PWM interruption period is continued until the first interruption count value reaches the first value, then the first count value is reset, and it is specified that the record length of the information after the fault reaches the second length. That is, after the motor fails, the first count value is counted once for each PWM interruption. Since the first count value is not counted before the motor fails, it is only counted after the motor fails. The counting frequency of the first count value is consistent with the frequency of the motor fault information storage. The value of the first count value corresponds to the motor fault information recorded after the motor fails. The second count value can assist in judging whether the length of the motor fault information stored after the motor fails reaches the second length. In this embodiment, the motor fault code will change after the motor fails. By identifying the motor fault code, it can be judged whether the motor has failed, so as to start the counting of the first count value.
[0036] In some embodiments, the recording of the motor fault information in the storage device comprises: recording the motor fault information in the working memory before the motor is powered off; after the motor is powered off, the motor fault information recorded in the working memory is stored in the internal memory, and the subsequent motor fault information is directly recorded in the internal memory. Recording the motor fault information in the working memory before the motor is powered off can record and overwrite information more quickly. Recording the motor fault information in the internal memory after the motor is powered off can prevent the loss of motor storage information after the storage device is powered off. The working memory here refers to a read-only memory (ROM), and the internal memory refers to a random access memory (RAM).
[0037] In other embodiments, if the storage stability of the motor fault information is required to be higher, the motor fault information can also be directly stored in the internal memory to avoid the loss of motor fault information caused by sudden power-off of the motor.
[0038] In other embodiments, the motor fault information stored in the storage device can also be uploaded to the network cloud space for backup, so as to comprehensively analyze the motor fault reason for multiple motor failure phenomena in the future, and to adjust the driving mode or the motor control strategy more targetedly. The motor fault information uploaded to the network can be remotely sent to the repair agency, and the repair agency can remotely assist in judging the motor fault reason, thereby improving the efficiency of repair.
[0039] In some optional embodiments, the motor fault information includes motor rotating speed, bus voltage, three-phase current, internal excitation current, torque current and modulation coefficient. By recording the motor rotating speed, bus voltage, three-phase current, internal excitation current, torque current and modulation coefficient, the motor fault information can be comprehensively understood, and the motor fault cause can be more quickly understood by comparing the motor fault information before and after the fault.
[0040] The embodiment of the present application also provides a computer readable storage medium comprising a stored computer program, wherein the computer readable storage medium controls a device where the computer readable storage medium is located to execute the fault recording method described above when the computer program runs. Since the elements of the present application can be implemented in software, the present application can be implemented as computer readable code provided to a programmable device on any suitable carrier medium. The tangible carrier medium can include storage media such as floppy disks, CD-ROMs, hard disk drives, tape devices or solid state memory devices, etc. The transient carrier medium can include signals such as electrical signals, electronic signals, optical signals, acoustic signals, magnetic signals or electromagnetic signals (for example, microwave or RF signals). By embedding fault recording in PWM interruption, the motor fault information at the time is recorded in each PWM interruption, and the recording is kept until the motor fault information is recorded completely before the motor fault information is recorded completely. Compared with recording the motor fault information in the UDS or OBD protocol of the whole vehicle, the cycle of the PWM interruption is shorter, and the cycle period of the PWM interruption is 100-125 microseconds, which is less than the fault duration of the current out of control of the motor, and the motor fault occurrence information can be more completely recorded. And the UDS or OBD protocol of the whole vehicle does not need to be changed, the program of the whole vehicle is less adjusted, the PWM interruption is more difficult to change, the implementation is faster, and the cost is lower.
[0041] The embodiment of the present application also provides a fault recording system, which comprises: a first judgment module, the first judgment module is used for judging whether the motor fault information is recorded completely in each PWM interruption cycle; a recording module, when the first judgment module judges that the fault information is not recorded completely, the recording module records the motor fault information. By embedding fault recording in PWM interruption, the motor fault information at the time is recorded in each PWM interruption, and the recording is kept until the motor fault information is recorded completely before the motor fault information is recorded completely. Compared with recording the motor fault information in the UDS or OBD protocol of the whole vehicle, the cycle of the PWM interruption is shorter, and the cycle period of the PWM interruption is 100-125 microseconds, which is less than the fault duration of the current out of control of the motor, and the motor fault occurrence information can be more completely recorded. And the UDS or OBD protocol of the whole vehicle does not need to be changed, the program of the whole vehicle is less adjusted, the PWM interruption is more difficult to change, the implementation is faster, and the cost is lower.
[0042] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other manners. For example, the described apparatus embodiments are merely schematic. For example, the division of the modules is merely a logical function division. There can be another division manner for the actual implementation. For example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or modules, and can be electrical, mechanical or in other forms.
[0043] The modules illustrated as separated components can or can not be physically separated, and the components illustrated as modules can or can not be physical modules, i.e., can be located in one place or can be distributed to a plurality of network modules. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment.
[0044] The embodiment of the present application further provides a motor controller, which comprises a processor and a memory, wherein the memory is used for storing program instructions, and the processor realizes the above-mentioned motor fault information recording method when calling the program instructions. By embedding fault recording in PWM interruption, the motor fault information at the time is recorded in each PWM interruption, and the recording is kept until the motor fault information is recorded completely before the motor fault information is recorded completely. Compared with recording motor fault information in the UDS or OBD protocol of the whole vehicle, the cycle of PWM interruption is shorter, and the cycle period of PWM interruption is 100-125 microseconds, which is less than the fault duration of current out of control of the motor, so that the motor fault occurrence information can be recorded more completely. Moreover, the UDS or OBD protocol of the whole vehicle does not need to be changed, the program adjustment of the whole vehicle is less, the PWM interruption change is lower in difficulty, the implementation is faster, and the cost is lower. The motor controller can be integrated on the motor, or can be independently arranged outside the motor and connected with the motor with control.
[0045] The embodiment of the present application further provides a motor controller, which comprises a processor and a memory, wherein the memory is used for storing program instructions, and the processor realizes the above-mentioned motor fault information recording method when calling the program instructions. By embedding fault recording in PWM interruption, the motor fault information at the time is recorded in each PWM interruption, and the recording is kept until the motor fault information is recorded completely before the motor fault information is recorded completely. Compared with recording motor fault information in the UDS or OBD protocol of the whole vehicle, the cycle of PWM interruption is shorter, and the cycle period of PWM interruption is 100-125 microseconds, which is less than the fault duration of current out of control of the motor, so that the motor fault occurrence information can be recorded more completely. Moreover, the UDS or OBD protocol of the whole vehicle does not need to be changed, the program adjustment of the whole vehicle is less, the PWM interruption change is lower in difficulty, the implementation is faster, and the cost is lower. The motor controller can be integrated on the motor, or can be independently arranged outside the motor and connected with the motor with control.
[0046] In the description of the present application, it should be noted that the terms "upper", "lower", and the like are used for indicating the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. Unless otherwise explicitly specified and limited, the terms "mount", "connect", "connection" should be interpreted broadly, for example, can be fixed connection, can also be detachable connection, or integral connection; can be mechanical connection, can also be electrical connection; can be directly connected, can also be indirectly connected through an intermediate medium, can be internal communication of two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0047] It should be noted that in the present application, relational terms such as "first" and "second" and the like are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the sentence "including a" does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0048] The above is only a specific embodiment of the present application, which enables those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features applied herein.
Claims
1. A fault recording method, characterized in that: It includes: Determine whether the motor fault information is recorded completely in each PWM interrupt cycle; If yes, stop recording the motor fault information, otherwise record the motor fault information until the motor fault information is complete; The recording of motor fault information includes: Recording motor fault information in a storage device, and when the motor fault information data recorded in the storage device reaches a first length, overwriting the earliest motor fault information with the latest motor fault information; Determine whether the recording length of the motor fault information after the fault reaches a second length, if so, the motor fault information has been completely recorded, stop recording the motor fault information, and the second length is less than the first length; The determining whether the record length of the motor fault information after the fault reaches the second length includes: Determine whether the motor has failed, if so, count the first interrupt count value once; Determine whether the first interrupt count value reaches the first value. If not, continue to determine whether the motor fault information is recorded completely in each PWM interrupt cycle until the first interrupt count value reaches the first value, then reset the first count value and specify that the record length of the post-fault information reaches the second length.
2. The fault recording method according to claim 1, wherein: After stopping recording the motor fault information, the fault recording method further includes: The motor fault information in the storage device is divided into motor fault information before the fault and motor fault information after the fault according to the second length and the storage location of the latest motor fault information.
3. The fault recording method according to claim 1, wherein: Said recording of the motor fault information in the storage device comprises: Before the motor is powered off, the motor fault information is recorded in the memory; After the motor is powered off, the motor fault information recorded in the running memory is stored in the internal memory, and subsequent motor fault information is directly recorded in the internal memory.
4. The fault recording method according to claim 1, wherein: The motor fault information includes motor speed, bus voltage, three-phase current, internal excitation current, torque current and modulation coefficient.
5. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the fault recording method according to any one of claims 1 to 4.
6. A fault recording system, characterized in that: It includes: a first judgment module, configured to judge whether the motor fault information is recorded completely in each PWM interrupt cycle; a recording module, configured to record the motor fault information when the first judging module judges that the fault information is not recorded completely; The recording of motor fault information includes: Recording motor fault information in a storage device, and when the motor fault information data recorded in the storage device reaches a first length, overwriting the earliest motor fault information with the latest motor fault information; Determine whether the recording length of the motor fault information after the fault reaches a second length, if so, the motor fault information has been completely recorded, stop recording the motor fault information, and the second length is less than the first length; The determining whether the record length of the motor fault information after the fault reaches the second length includes: Determine whether the motor has failed, if so, count the first interrupt count value once; Determine whether the first interrupt count value reaches the first value. If not, continue to determine whether the motor fault information is recorded completely in each PWM interrupt cycle until the first interrupt count value reaches the first value, then reset the first count value and specify that the record length of the post-fault information reaches the second length.
7. A motor controller, characterized in that: The motor controller includes a processor and a memory, the memory is used to store program instructions, and when the processor calls the program instructions, the method for recording fault information according to any one of claims 1 to 4 is implemented.
8. An automobile, characterized in that: It is equipped with the motor controller as claimed in claim 7.
Citation Information
Patent Citations
Method for detecting faults of volatility memory module of microprocessor in motor control system
CN103744756A
Fault snapshot system
CN113778946A