Motor fault protection methods, systems, equipment and computer-readable media
By recording fault information in the motor fault protection system and saving it to a readable memory, the problem of traditional motors being unable to save fault information after protection shutdown is solved, realizing long-term storage and backtracking of fault information and supporting fault cause analysis.
Patent Information
- Application Number
- CN202310009059.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-04
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2043-01-04
AI Technical Summary
Traditional permanent magnet synchronous motors cannot record and save fault information after protection shutdown, making fault analysis difficult.
A motor fault protection system was designed, including a fault detection module, a fault processing module, and a fault protection module, which is used to detect motor faults, record fault information to a readable memory, generate a fault code table, and store it for a long time.
It achieves non-volatile storage of fault information and traceability of historical information, and can restore fault information after protection shutdown, providing persistent data support for fault analysis.
Smart Images

Figure CN116388616B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of motor control technology, and in particular to a method, system, device and computer-readable medium for motor fault protection. Background Technology
[0002] With the mature development of home appliance technology and the rapid advancement of power electronics technology, electric motors are widely used as power sources in devices such as fans, aerators, and electric vehicles. Permanent magnet synchronous motors (PMSMs), a type of motor, use the magnetic interaction between the magnetic field generated by a coil carrying current and the magnetic field generated by a permanent magnet to rotate the rotor. PMSMs are becoming increasingly popular due to their advantages such as low cost, high efficiency, and low noise. However, the fault protection mechanism of traditional PMSMs cannot record and save corresponding fault information after a protective shutdown, making it difficult to analyze the cause of motor failures and greatly hindering troubleshooting.
[0003] There is currently no effective solution to the problem of not being able to record and save the corresponding fault information after a protection shutdown. Summary of the Invention
[0004] This application provides a method, system, device, and computer-readable medium for motor fault protection, to solve the technical problem that the corresponding fault information cannot be recorded and saved after a protective shutdown.
[0005] According to one aspect of the embodiments of this application, this application provides a motor fault protection system, including: a fault detection module for detecting whether a target motor has a fault; a fault processing module for recording fault information according to the fault occurrence type and fault occurrence order when a fault is detected in the target motor, thereby obtaining a fault code table; and a fault protection module for storing the current fault code table in a readable storage device for long-term preservation.
[0006] Optionally, the fault code table is a two-dimensional array. The row number of the two-dimensional array is used to indicate the order in which the target motor experiences faults before the shutdown protection, and the column number of the two-dimensional array is used to indicate the fault type of all faults that may occur in the target motor.
[0007] Optionally, there are multiple fault handling modules, each set in its corresponding fault interrupt service function. Specifically, the fault handling module is used to: when the fault detection module detects a target fault in the target motor, enter the corresponding interrupt service function to calculate the cumulative fault value of the target fault; determine the target column number of the target fault and the current maximum row number in the fault code table; locate the latest information recording unit of the target fault using the target column number and the maximum row number; record the cumulative fault value of the target fault in the latest information recording unit, and increment the maximum row number as the new maximum row number for the next fault occurrence.
[0008] Optionally, the fault handling module calculates the cumulative fault value of the target fault by: when the fault handling module enters the corresponding interrupt service function, incrementing the corresponding cumulative fault value by 1 according to the fault type of the currently entered interrupt service function.
[0009] Optionally, the system also includes a fault signal encoding output module, used for: reading a fault code table from a readable storage device or directly receiving fault codes sent by the fault processing module; extracting fault data from the fault code table; encoding the fault data into a fault signal according to a fixed encoding format; and outputting the fault signal to a host computer so that the host computer receives the fault signal and performs fault processing on the target motor according to the fault signal.
[0010] Optionally, the fault signal encoding output module extracts fault data from the fault code table by: creating a first array and a second array, both of which are one-dimensional arrays; traversing the data of non-empty cells in the fault code table row by row, so as to record the fault type of each fault in the first array according to the order in which each fault occurs, and record the cumulative fault value of each fault in the second array.
[0011] Optionally, the fault signal encoding output module encodes fault data into a fault signal according to a fixed encoding format, specifically including: creating a character array; counting the number of non-zero elements in the first array to obtain the total number of faults, and encoding the packet header and the total number of faults into a single byte of data and storing it in the character array; extracting multiple sets of data one by one from the first array and the second array, wherein the same set of data comes from the same position in the first array and the second array; encoding each set of data into a single byte of data, and storing the encoded data into the character array in the order of the data sets; encoding the packet tail into a single byte of data and storing it in the character array to obtain the fault signal.
[0012] According to another aspect of the embodiments of this application, this application provides a motor fault protection method, including: detecting whether a target motor has a fault; when a fault is detected in the target motor, recording fault information according to the fault occurrence type and fault occurrence order to obtain a fault code table; and storing the current fault code table in a readable storage for long-term preservation.
[0013] According to another aspect of the embodiments of this application, this application provides an electronic device, including a memory, a processor, a communication interface and a communication bus. The memory stores a computer program that can run on the processor. The memory and the processor communicate with each other through the communication bus and the communication interface. When the processor executes the computer program, it implements the steps of the above method.
[0014] According to another aspect of the embodiments of this application, this application also provides a computer-readable medium having processor-executable non-volatile program code that causes the processor to perform the above-described method.
[0015] Compared with related technologies, the technical solutions provided in this application have the following advantages:
[0016] This application provides a motor fault protection system, comprising: a fault detection module for detecting whether a target motor has experienced a fault; a fault processing module for recording fault information according to the fault type and fault occurrence sequence when a fault is detected, thereby obtaining a fault code table; and a fault protection module for storing the current fault code table in a readable storage medium for long-term preservation. This application can record the fault type and fault occurrence sequence in the fault code table, which can be stored in a readable storage medium, ensuring the non-volatility of fault information storage and the traceability of historical information. Even after protection shutdown, fault information generated before the shutdown protection can be restored, providing persistent data support and historical information backtracking support for analyzing the causes of motor faults, and solving the technical problem of not being able to record and save corresponding fault information after protection shutdown. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0018] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without creative effort.
[0019] Figure 1This is a schematic diagram of an optional motor fault protection system provided according to an embodiment of this application;
[0020] Figure 2 This is an overall architecture diagram of an optional motor fault protection system provided according to an embodiment of this application;
[0021] Figure 3 This is an optional fault code representation provided according to an embodiment of this application;
[0022] Figure 4 This is yet another optional fault code representation provided according to an embodiment of this application;
[0023] Figure 5 This is a schematic diagram of the execution flow of an optional fault handling module according to an embodiment of this application;
[0024] Figure 6 This is a schematic diagram of an optional fault accumulation value calculation process provided according to an embodiment of this application;
[0025] Figure 7 This is a schematic diagram of an optional fault data extraction process provided according to an embodiment of this application;
[0026] Figure 8 This is a schematic diagram of an optional fault data encoding process provided according to an embodiment of this application;
[0027] Figure 9 This is a schematic diagram of an optional fault signal data packet provided according to an embodiment of this application;
[0028] Figure 10 This is a schematic flowchart of an optional motor fault protection method provided according to an embodiment of this application;
[0029] Figure 11 This is a schematic diagram of the complete flow of an optional motor fault protection main program according to an embodiment of this application;
[0030] Figure 12 This is a schematic diagram of an optional fault code table storage process provided according to an embodiment of this application;
[0031] Figure 13 This is a schematic diagram of an optional electronic device structure provided in an embodiment of this application. Detailed Implementation
[0032] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0033] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustration and has no specific meaning in itself. Therefore, "module" and "part" may be used interchangeably.
[0034] In related technologies, the fault protection mechanism of traditional permanent magnet synchronous motors cannot record and save the corresponding fault information after the motor is shut down for protection. This makes it difficult to analyze the cause of the motor fault after it occurs, which greatly hinders the resolution of the motor fault.
[0035] To address the problems mentioned in the background art, according to one aspect of an embodiment of this application, an embodiment of a motor fault protection system is provided, such as... Figure 1 As shown, the system includes:
[0036] Fault detection module 101 is used to detect whether the target motor has a fault;
[0037] The fault handling module 103 is used to record fault information according to the fault type and fault occurrence sequence when a fault is detected in the target motor, and obtain a fault code table.
[0038] The fault protection module 105 is used to store the current fault code table in a readable storage device for long-term preservation.
[0039] This application can record the fault type and fault occurrence sequence in a fault code table, which can be stored in a readable storage medium, ensuring the non-volatile nature of fault information storage and the traceability of historical information. Even after protection shutdown, the fault information generated before the shutdown protection can be restored, providing persistent data support and historical information backtracking support for analyzing the causes of motor faults, and solving the technical problem of not being able to record and save the corresponding fault information after protection shutdown.
[0040] Optionally, this application may have multiple fault detection modules and fault handling modules, each set in its corresponding fault interrupt service function, such as... Figure 2 The diagram shows the overall architecture of the motor fault protection system provided in this application. The overall architecture of the motor fault protection system of this application is described below.
[0041] like Figure 2 As shown, [1] is a permanent magnet synchronous motor; [2] is a fault detection module, whose main function is to detect whether various types of faults have occurred; [3] is a fault processing module, whose main function is to complete the fault code table according to the fault occurrence type and fault occurrence order; [4] is a fault code table, which is a two-dimensional array that stores the fault information when the permanent magnet synchronous motor fails, including the total number of faults, the fault occurrence type, the fault occurrence order, etc. [5] is a readable storage medium (FLASH), used to ensure that the data recorded in the fault code table is not lost after the motor protection shutdown controller loses power; [6] is a fault signal encoding output module, whose function is to extract data from the fault code table and encode it into a fault signal for output according to a fixed encoding format; [7] is a host computer, used to receive and process the fault signals output by the motor controller.
[0042] Optionally, such as Figure 3 As shown, the fault code table is a two-dimensional array. The row number of the two-dimensional array is used to indicate the order in which the target motor experiences faults before the shutdown protection, and the column number of the two-dimensional array is used to indicate the fault type of all faults that may occur in the target motor.
[0043] In this embodiment, the row numbers of the two-dimensional array array[Time][ERR] represent the order in which faults occur before shutdown protection, with Time1 indicating the first fault and Time9 indicating the last fault. The column numbers of the two-dimensional array array[Time][ERR] represent the types of all faults, and the correspondence can be set by the user, for example as follows: ERR1 - overvoltage protection, ERR2 - undervoltage protection, ERR3 - phase A loss, ERR4 - phase B loss, ERR5 - phase C loss, ERR6 - overheat protection, ERR7 - overcurrent protection, ERR8 - Hall effect fault, ERR9 - operational amplifier fault. The data filled in the x-row and y-column array represents the cumulative fault value of type y fault that occurred in the x-th occurrence. If no fault occurred, the cumulative fault value is the initial value of 0.
[0044] In practical use, each row in this fault code table should contain only one non-empty data point, because only one type of fault can occur at any given time, and the probability of multiple faults occurring simultaneously is extremely low. Therefore, the generated fault code table can be as follows: Figure 4 As shown. This application can record the sequence of motor faults and the type of each fault through a fault code table, and then store the fault code table in a readable storage device for long-term preservation. This ensures the non-volatility of fault information storage and the traceability of historical information, resulting in high storage efficiency and low storage space usage.
[0045] The following is a detailed explanation of how the fault handling module records the sequence and type of fault occurrence.
[0046] Optionally, there are multiple fault handling modules, each set in its corresponding fault interrupt service function. Specifically, the fault handling module is used to: when the fault detection module detects a target fault in the target motor, enter the corresponding interrupt service function to calculate the cumulative fault value of the target fault; determine the target column number of the target fault and the current maximum row number in the fault code table; locate the latest information recording unit of the target fault using the target column number and the maximum row number; record the cumulative fault value of the target fault in the latest information recording unit, and increment the maximum row number as the new maximum row number for the next fault occurrence.
[0047] In the embodiments of this application, such as Figure 4 and Figure 5 As shown, each fault handling module subroutine is placed within its corresponding fault interrupt service function. When a fault is detected, the corresponding interrupt service function is automatically entered to execute the fault handling module subroutine, completing the fault code table according to the fault type and order. Taking ERR7-overcurrent protection as an example, if the first fault is overcurrent protection, the row number of array[Time][ERR] is 1 (i.e., the maximum row number is 1). After entering the subroutine, the fault cumulative value calculation subroutine is first executed to calculate the current overcurrent protection fault cumulative value, and then the fault cumulative value is stored in the first row and seventh column of the fault code table array[Time][ERR]. After completing the recording operation, the row number of array[Time][ERR] is incremented by 1.
[0048] In this embodiment, the total number of faults that the fault code table can record is limited. Therefore, to avoid data overwriting, the current fault code table can be stored in a readable storage immediately after it is full. If the total number of faults that the fault code table can record is 9, then after incrementing the row number of array[Time][ERR] by 1 for the last time, if the row number is already equal to 10, it means that the current table is full, and a table full signal is issued, thereby immediately storing the current fault code table in a readable storage to avoid overwriting previously recorded data.
[0049] Optionally, the fault handling module calculates the cumulative fault value of the target fault by: when the fault handling module enters the corresponding interrupt service function, incrementing the corresponding cumulative fault value by 1 according to the fault type of the currently entered interrupt service function.
[0050] In this embodiment of the application, the process from detecting a fault to determining that a target fault has occurred, and finally calculating the cumulative fault value of the target fault, is as follows: Figure 6 As shown. Figure 6In this application, multiple cases represent fault types. Faults of different types can be judged based on their frequency of occurrence, with higher-frequency faults being prioritized. Alternatively, they can be judged based on their importance, with higher-importance faults being prioritized. When a target fault is detected, the corresponding interrupt service function is automatically entered. Each entry into this interrupt service function indicates that the fault has occurred once, and the corresponding fault accumulation value is incremented by 1 based on the fault type of the currently entered interrupt service function.
[0051] Optionally, the system also includes a fault signal encoding output module, used for: reading a fault code table from a readable storage device or directly receiving fault codes sent by the fault processing module; extracting fault data from the fault code table; encoding the fault data into a fault signal according to a fixed encoding format; and outputting the fault signal to a host computer so that the host computer receives the fault signal and performs fault processing on the target motor according to the fault signal.
[0052] Optionally, the fault signal encoding output module extracts fault data from the fault code table by: creating a first array and a second array, both of which are one-dimensional arrays; traversing the data of non-empty cells in the fault code table row by row, so as to record the fault type of each fault in the first array according to the order in which each fault occurs, and record the cumulative fault value of each fault in the second array.
[0053] like Figure 7 As shown, array x is the first array mentioned above, and array y is the second array mentioned above. Array x stores the types of faults that have occurred, and array y stores the cumulative fault values that have occurred. The values stored in the two arrays have a one-to-one correspondence and are arranged in the order of fault occurrence. When a duplicate fault type is encountered, the cumulative fault value extracted the second time is used to replace the corresponding cumulative fault record value in array y. Specifically, the entire process includes: starting data extraction, creating arrays x and y, each with 9 elements, corresponding to the maximum total number of faults in the fault code table. Taking the row number variable i, starting from i=1, removing and saving the data in the i-th row of the fault code table, and incrementing i by 1. At this point, check if there is any non-zero data in the i-th row. If so, find the non-zero data and record its corresponding column number. Then check if the column number already exists in array x. If it does, record the position of the data with the same column number in array x as j, and store the data in the j-th position of array y. If it does not exist, store the corresponding column number in the (i-1)-th position of array x, and then store the data in the (i-1)-th position of array y. Finally, check if i equals 9. If not, continue extracting the next row of data for the check. If it equals 9, issue a data extraction completion signal, and the data extraction ends.
[0054] Optionally, the fault signal encoding output module encodes fault data into a fault signal according to a fixed encoding format, specifically including: creating a character array; counting the number of non-zero elements in the first array to obtain the total number of faults, and encoding the packet header and the total number of faults into a single byte of data and storing it in the character array; extracting multiple sets of data one by one from the first array and the second array, wherein the same set of data comes from the same position in the first array and the second array; encoding each set of data into a single byte of data, and storing the encoded data into the character array in the order of the data sets; encoding the packet tail into a single byte of data and storing it in the character array to obtain the fault signal.
[0055] like Figure 8 As shown, when a data extraction completion signal is detected, the total number of faults n to be encoded is obtained by calculating the number of non-zero elements in array x, and the encoding process begins. During encoding, the packet header and the total number of faults n are inserted first, then the fault type and cumulative fault count are inserted according to the order in which the faults occurred. After all the fault information has been encoded, the packet tail is inserted, and the encoding process ends. Specifically, the entire encoding process includes: at the start of encoding, determining if there is a data extraction completion signal; if so, recording the number of non-zero elements in array x as n, i.e., the total number of faults. A character array `error` is created with 2+n elements. The index k is taken, and content is filled into the character array starting from k=0 (the first element). First, the packet header and the total number of faults n are encoded into one byte of data and stored in the 0th position of the character array `error`. Then, the kth data from arrays x and y are encoded into one byte of data and stored in the (k+1)th position of the character array `error`. Encode each element of arrays x and y one by one in the same way and fill them into the character array. Finally, encode the packet tail into a byte of data and store it in the (n+1)th position of the character array error. Output the character array error to end the encoding.
[0056] The encoding format of the fault signal is as follows: Figure 9 As shown, a complete fault signal consists of a packet header, a total number of faults, sequentially coded fault information, and a packet tail.
[0057] This application uses a unified encoding to output fault information, which facilitates the transmission and parsing of fault signals, and does not require the use of special parsing tools when reading fault information.
[0058] According to another aspect of the embodiments of this application, such as Figure 10 As shown, a motor fault protection method is provided, including:
[0059] Step S1002: Detect whether the target motor has malfunctioned;
[0060] Step S1004: If a fault is detected in the target motor, record the fault information according to the fault type and the order of fault occurrence to obtain a fault code table;
[0061] Step S1006: Store the current fault code table in a readable storage device for long-term storage.
[0062] This application can record the fault type and fault occurrence sequence in a fault code table, which can be stored in a readable storage medium, ensuring the non-volatile nature of fault information storage and the traceability of historical information. Even after protection shutdown, the fault information generated before the shutdown protection can be restored, providing persistent data support and historical information backtracking support for analyzing the causes of motor faults, and solving the technical problem of not being able to record and save the corresponding fault information after protection shutdown.
[0063] The complete main program flow of the motor fault protection system is described below, such as... Figure 11 As shown, when the permanent magnet synchronous motor is in a non-started state, the motor controller initializes each module, and the initialization of each module is completed.
[0064] Afterwards, the permanent magnet synchronous motor enters the running state, and the motor controller enters the fault detection state. At this time, the motor controller will perform real-time detection of various types of faults through various fault detection modules. Once a fault is detected,
[0065] The controller enters fault handling mode. At this time, the controller executes fault accumulation value subroutines in each fault handling module to accumulate the corresponding fault accumulation values. Simultaneously, according to the fault type and order of occurrence, the accumulated fault values are filled into the corresponding positions in the fault code table. When the fault code table is full, a fault code is issued.
[0066] Fault code table full signal. During fault handling, the filled fault code table is stored at short intervals. If a fault code table full signal is received within the interval, the fault code table will be immediately updated.
[0067] Storage. After storing the fault code table, the fault signal encoding output module encodes the fault signals to generate fixed-format fault signals for the host computer to receive and process. Simultaneously, the motor controller triggers the fault protection action corresponding to the first detected fault, stopping the permanent magnet synchronous motor until the fault is cleared.
[0068] The specific control logic is as follows: 5. After the motor controller is initialized, parameters such as bias voltage and bus voltage are collected and ensured.
[0069] These parameters are all within the normal error range. The bias voltage should be within 1.65V ± 10%, and the bus voltage should be within 540V ± 20V. Then, initialize all modules and flag bits of the fault protection system, and clear the fault code table and other arrays used for data storage. After initialization, the controller...
[0070] The state machine switches to fault detection mode. Subsequently, the motor controller performs real-time detection of various type 0 faults through each fault detection module. Once a fault is detected, the controller state machine switches to fault handling mode.
[0071] Each fault handling module subroutine is placed within its corresponding fault interrupt service function. When a fault is detected, the corresponding interrupt service function is automatically executed to run the fault handling module subroutine, completing the fault code table according to the fault type and order of occurrence. Taking ERR7 overcurrent protection as an example, if the first fault is overcurrent...
[0072] When the protection is activated, the row number of array[Time][ERR] is 1. After entering the subroutine, the fault accumulation value calculation subroutine will be executed first to calculate the current fault accumulation value of the overcurrent protection, and then the fault accumulation value will be stored in the fault code.
[0073] The data is in the first row and seventh column of the table array[Time][ERR]. After completing the record operation, array[Time][ERR] will be...
[0074] The row number is incremented by 1; if the row number is already equal to 10, it means the current table is full, and a table full signal is issued to prevent previously recorded data from being overwritten; when the controller state machine is in fault handling state, the fault code table storage control subroutine will be executed periodically in the timer interrupt. If no fault code table full signal is received, a fault code table completion flag will be issued after a 1ms interval, and the currently recorded information will be displayed in table form.
[0075] Stored to readable storage space. If a fault code table full signal is received, the table will be immediately stored to readable storage space. The fault code table already stored in readable storage space is then processed in the fault signal encoding output subroutine.
[0076] It will be decomposed into two one-dimensional arrays, array x and array y. Array x stores the types of faults that have occurred, and array y stores the cumulative value of faults that have occurred. The values stored in the two arrays have a one-to-one correspondence and are arranged in the order of fault occurrence. During the extraction process, duplicate fault classes may be encountered.
[0077] When the fault type is being processed, the fault cumulative record value corresponding to that fault type in array y is replaced with the fault cumulative value extracted the second time. After data extraction is complete, the number of non-zero elements in array x is calculated to obtain the faults that need to be encoded.
[0078] Given the total number of faults, n, proceed to the encoding process. During encoding, first insert the packet header and the total number of faults, n. Then, insert the fault type and cumulative count of each fault according to the order in which they occurred, extracting the required data sequentially from arrays x and y. After all the fault information has been encoded, insert the packet tail, and the encoding process ends.
[0079] Ultimately, the fault signals generated by the encoding will be transmitted to the host computer for processing, while the raw data of the fault information will be stored long-term in a readable storage medium (FLASH) in the format of a 5-fault code table.
[0080] In this embodiment of the application, after a fault is detected, the motor controller issues a fault code of the corresponding type according to the order in which the faults occurred. The code can also be transmitted to a database for classification and storage using Ethernet or other communication methods for subsequent analysis and processing.
[0081] In the embodiments of this application, such as Figure 12 As shown, during fault handling, the fault code table, which has been filled with 0s, is stored at short time intervals. If a signal indicating that the fault code table is full is received within the time interval, it will be immediately...
[0082] Store the fault code table.
[0083] This application can record the fault type and fault occurrence sequence in a fault code table, which can be stored in a readable storage medium, ensuring the non-volatility of fault information storage and the recoverability of historical information.
[0084] The system provides traceability, enabling the reconstruction of fault information generated before the protection shutdown even after a protection shutdown has been initiated. This provides persistent data support and historical information backtracking support for analyzing the causes of motor 5 faults, solving the problem of faults occurring after a protection shutdown.
[0085] Technical issues preventing the recording and saving of corresponding fault information.
[0086] According to another aspect of the embodiments of this application, this application provides an electronic device, such as... Figure 4 As shown, the system includes a memory 401, a processor 403, a communication interface 405, and a communication bus 407. The memory 401 stores a computer program that can run on the processor 403. The memory 401 and the processor 403 communicate through the communication interface 405 and the communication bus 407. When the processor 403 executes the computer program, it implements the steps of the above method.
[0087] The memory and processor in the aforementioned electronic devices communicate with each other via a communication bus and a communication interface. The communication bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc.
[0088] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0089] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0090] According to another aspect of the embodiments of this application, a computer program product or computer program is also provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps of any of the above embodiments.
[0091] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated here.
[0092] In specific implementation, the embodiments of this application can be referred to the above embodiments and have corresponding technical effects.
[0093] It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or combinations thereof.
[0094] For software implementation, the techniques described herein can be implemented by units that perform the functions described herein. The software code can be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor.
[0095] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0096] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0097] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0098] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0099] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0100] If the aforementioned function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks. It should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. In the absence of further restrictions, an element defined by the phrase "comprising a..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0101] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. An electric machine fault protection system, characterized in that, include: The fault detection module is used to detect whether the target motor has a fault; The fault handling module is used to record fault information according to the fault type and fault occurrence order when a fault is detected in the target motor, and obtain a fault code table. The fault protection module is used to store the current fault code table in a readable storage device for long-term preservation. The system further includes a fault signal encoding output module, used for: reading the fault code table from the readable storage, or directly receiving the fault code sent by the fault processing module; extracting fault data from the fault code table; encoding the fault data into a fault signal according to a fixed encoding format; and outputting the fault signal to a host computer, so that the host computer receives the fault signal and performs fault processing on the target motor according to the fault signal. The fault signal encoding output module extracts fault data from the fault code table by: creating a first array and a second array, wherein the first array and the second array are both one-dimensional arrays; traversing the data of the non-empty cells in the fault code table row by row, so as to record the fault type of each fault in the first array according to the order in which each fault occurs, and record the cumulative fault value of each fault in the second array; The fault signal encoding output module encodes the fault data into a fault signal according to a fixed encoding format, specifically including: creating a character array; counting the number of non-zero elements in the first array to obtain the total number of faults, and encoding the packet header and the total number of faults into a single byte of data and storing it in the character array; extracting multiple sets of data one by one from the first array and the second array, wherein the same set of data comes from the same position in the first array and the second array; encoding each set of data into a single byte of data, and storing the encoded data into the character array in the order of the data sets; encoding the packet tail into a single byte of data and storing it in the character array to obtain the fault signal.
2. The system of claim 1, wherein, The fault code table is a two-dimensional array. The row number of the two-dimensional array is used to indicate the order in which the target motor experiences faults before the shutdown protection. The column number of the two-dimensional array is used to indicate the fault type of all faults that may occur in the target motor.
3. The system of claim 2, wherein, There are multiple fault handling modules, each set in its corresponding fault interrupt service function. Specifically, each fault handling module is used for: When the fault detection module detects a target fault in the target motor, the fault handling module enters the corresponding interrupt service function to calculate the cumulative fault value of the target fault. Determine the target column number where the target fault is located and the current maximum row number in the fault code table; The latest information recording unit for the target fault is located using the target column number and the maximum row number; The cumulative value of the target fault is recorded in the latest information recording unit, and the maximum row number is incremented to serve as the new maximum row number when the fault occurs again.
4. The system of claim 3, wherein, The fault handling module calculates the cumulative fault value of the target fault specifically by including: When the fault handling module enters the corresponding interrupt service function, it increments the corresponding fault accumulation value by 1 according to the fault type of the currently entered interrupt service function.
5. A method for motor fault protection, applied to the motor fault protection system according to any one of claims 1 to 4, characterized in that, include: Detect whether the target motor is malfunctioning; When a fault is detected in the target motor, the fault information is recorded according to the fault type and the order of fault occurrence to obtain a fault code table; The current fault code table is stored in a readable storage device for long-term preservation.
6. An electronic device comprising a memory, a processor, a communication interface and a communication bus, the memory having stored therein a computer program executable on the processor, the memory, the processor being in communication via the communication bus and the communication interface, characterized in that, When the processor executes the computer program, it implements the steps of the method described in claim 5.
7. A computer-readable medium having processor-executable non-volatile program code, characterized in that, The program code causes the processor to execute the method of claim 5.
Citation Information
Patent Citations
Data communication apparatus for vehicle remote control diagonosis system
CN101464218A
Household appliance, fault positioning method and fault positioning device thereof, and storage medium
CN114646825A
System for detecting the malfunction of a CPU including a watchdog timer circuit and a memory for storing a malfunction count
US5398332A
