Fault detection method, device, power supply module and storage medium

By defining a structure in the preset cache area of ​​the power module, obtaining and processing information such as the total fault code, fault code offset, and data to be detected, a unified processing flow for multiple fault detections of the power module is realized, solving the problems of large code volume, low reuse rate, and high error rate in the existing technology, and improving the code reuse rate and detection efficiency.

CN116520181BActive Publication Date: 2025-09-19SHIJIAZHUANG TONHE ELECTRONICS TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310399116.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-14
Publication Date
2025-09-19
Estimated Expiration
2043-04-14

AI Technical Summary

Technical Problem

When implementing multiple fault detection of a power module in the prior art, the code volume is large, the code reuse rate is low, and the error rate is easily increased.

Method used

By defining a structure in the power module's preset buffer area, the system retrieves the total fault code, fault code offset, data to be detected, preset fault detection information, and preset filtering information. Based on this information, fault detection and filtering are performed, unifying the processing flow to detect multiple target faults.

Benefits of technology

The code size and writing process are simplified, the modification complexity and error rate are reduced, the code reuse rate is improved, and different fault detections do not interfere with each other.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116520181B_ABST
    Figure CN116520181B_ABST
Patent Text Reader

Abstract

The present invention provides a fault detection method, device, power supply module, and storage medium. The method comprises: obtaining, for each location in a preset cache area of ​​the power supply module, a total fault code stored at the current location, a current fault code offset, data to be detected, preset fault detection information, and preset filtering information; performing fault detection on the data to be detected based on the preset fault detection information to obtain a current fault detection result for a target fault corresponding to the current location; filtering the current fault detection result based on the preset filtering information to obtain a current fault detection filtering result for the target fault; and updating the total fault code based on the current fault detection filtering result and the current fault code offset, thereby determining the current fault state of the target fault of the power supply module based on the updated total fault code. The present invention can simplify the code size and writing process, reduce modifications, lower the code error rate that may be caused by redundant and complex code modification and writing processes, and improve code reuse.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power module design, and in particular to a fault detection method, device, power module and storage medium. Background Art

[0002] Whether it's power modules used in electric vehicles and their charging stations, onboard power modules, or military or electric power modules, they all require comprehensive fault handling mechanisms. These mechanisms can promptly notify the user when a fault occurs and await a response. Alternatively, in the event of a major fault, the user can be notified and a rapid protection mechanism, such as a rapid shutdown, can be implemented simultaneously. This ensures the power module's self-protection in abnormal situations, ensuring stable operation, reducing failure rates, and preventing major accidents.

[0003] However, in the process of implementing the present invention, the inventors discovered that the traditional fault detection method usually compares each detected signal with a fault threshold. If a fault signal is detected n times in a row, it is considered that a fault has occurred. At the same time, each detected signal is compared with a recovery threshold. If a recovery signal is detected m times in a row, it is considered that the fault has recovered, where m and n can be set by the user. For multiple fault detections, since the detection processes are similar, but the fault content and fault type to be detected are different, for each fault, the code corresponding to the above-mentioned fault detection method is modified one by one to achieve multiple fault detections. However, this method of achieving multiple fault detections for the power module will result in a large amount of code and a low code reuse rate. In addition, the redundant and complex code modification and writing process may also lead to the problem of increased error rate. Summary of the Invention

[0004] Embodiments of the present invention provide a fault detection method, device, power module and storage medium to solve the problems of large code size, low code reuse rate and high error rate in current methods for realizing multiple fault detection of power modules.

[0005] In a first aspect, an embodiment of the present invention provides a fault detection method, including:

[0006] For each position in the preset cache area of ​​the power module, obtain the total fault code stored at the current position, the current fault code offset, the data to be detected, the preset fault detection information and the preset filtering information;

[0007] Performing fault detection on the data to be detected based on the preset fault detection information to obtain a current fault detection result of the target fault corresponding to the current position;

[0008] Filtering the current fault detection result according to the preset filtering information to obtain a current fault detection filtering result of the target fault;

[0009] The total fault code is updated according to the current fault detection filtering result and the current fault code offset, so as to determine the current fault state of the target fault of the power module based on the updated total fault code.

[0010] In a possible implementation, the preset fault detection information includes a fault threshold, a recovery threshold, and a fault detection function of a target fault corresponding to the current position;

[0011] The performing fault detection on the to-be-detected data based on the preset fault detection information to obtain a current fault detection result of a target fault corresponding to a current position includes:

[0012] Comparing the data to be detected with the fault threshold according to the fault detection function to obtain a first comparison result;

[0013] If the first comparison result indicates that the target fault has occurred, recording the current fault detection result as a fault;

[0014] If the first comparison result indicates that the target fault has not occurred, comparing the data to be detected with the recovery threshold to obtain a second comparison result;

[0015] If the second comparison result indicates that the target fault has been recovered, the current fault detection result is recorded as not having a fault.

[0016] In a possible implementation, the preset fault detection information further includes the last fault state of the target fault corresponding to the current position;

[0017] After comparing the data to be detected with the restoration threshold to obtain a second comparison result, the method further includes:

[0018] If the second comparison result indicates that the target fault has not been recovered, the last fault state is determined as the current fault detection result.

[0019] In a possible implementation, after filtering the current fault detection result according to the preset filtering information to obtain the current fault detection filtering result of the target fault, the method further includes:

[0020] The last fault status is updated as the current fault detection filtering result.

[0021] In one possible implementation, the preset filtering information includes a filtering times threshold, a filtering function, and a filtering times count value for filtering a current fault detection result of a target fault corresponding to a current location, a filtering cumulative sum for accumulating the current fault detection result, and a previous fault detection filtering result of the target fault corresponding to the current location;

[0022] The filtering the current fault detection result according to the preset filtering information to obtain the current fault detection filtering result of the target fault includes:

[0023] Incrementing the filtering times count value to obtain the filtering times count value after the self-increment;

[0024] Adding the current fault detection result as the current value to be filtered to the filtered cumulative sum to obtain an updated filtered cumulative sum;

[0025] Determine whether the filtering times count value after self-increment is greater than or equal to the filtering times threshold;

[0026] If the filtering times count value after the self-increment is less than the filtering times threshold, the last fault detection filtering result is determined as the current fault detection filtering result;

[0027] If the self-incremented filtering times count value is greater than or equal to the filtering times threshold, then based on the filtering function, the current fault detection filtering result of the target fault is obtained according to the updated filtering cumulative sum and the filtering times threshold.

[0028] In one possible implementation, the filtering function includes average value filtering;

[0029] The obtaining, based on the filtering function and according to the updated filtering cumulative sum and the filtering times threshold, a current fault detection filtering result of the target fault includes:

[0030] Calculating the ratio of the updated filtered cumulative sum to the filtering times threshold;

[0031] The ratio is rounded, and a rounded result is determined as a current fault detection filtering result of the target fault.

[0032] In a possible implementation, after obtaining the current fault detection filtering result of the target fault according to the updated filtered cumulative sum and the filtering number threshold, the method further includes:

[0033] The count value of the number of filtering times after the self-increment and the updated filtering accumulation are respectively summed and cleared, and the last fault detection filtering result is updated as the current fault detection filtering result.

[0034] In a second aspect, an embodiment of the present invention provides a fault detection device, including:

[0035] An acquisition module is used to acquire, for each position in a preset buffer area of ​​the power module, a total fault code stored at the current position, a current fault code offset, data to be detected, preset fault detection information, and preset filtering information;

[0036] A detection module, configured to perform fault detection on the data to be detected based on the preset fault detection information, and obtain a current fault detection result of a target fault corresponding to a current position;

[0037] A filtering module, configured to filter the current fault detection result according to the preset filtering information to obtain a current fault detection filtering result of the target fault;

[0038] An updating module is configured to update the total fault code according to the current fault detection filtering result and the current fault code offset, so as to determine a current fault state of a target fault of a power module based on the updated total fault code.

[0039] In a third aspect, an embodiment of the present invention provides a power module comprising a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the steps of the method described in the first aspect or any possible implementation of the first aspect.

[0040] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the method described in the first aspect or any possible implementation of the first aspect.

[0041] The embodiments of the present invention provide a fault detection method, device, power module, and storage medium. The method comprises: obtaining, for each position in a preset buffer area of ​​the power module, a total fault code stored at the current position, a current fault code offset, data to be detected, preset fault detection information, and preset filtering information; performing fault detection on the data to be detected based on the preset fault detection information to obtain a current fault detection result of a target fault corresponding to the current position; filtering the current fault detection result based on the preset filtering information to obtain a current fault detection filtering result of the target fault; updating the total fault code based on the current fault detection filtering result and the current fault code offset, and determining the current fault state of the target fault of the power module based on the updated total fault code. The detection process for each target fault that the power module needs to detect can be unified into a processing process for the total fault code, current fault code offset, data to be detected, preset fault detection information, and preset filtering information stored at each position in the preset buffer area of ​​the power module. Thus, multiple target faults that the power module needs to detect can be detected based on the unified processing process, thereby simplifying the amount of code and the writing process, reducing modifications, ensuring that different fault detections do not interfere with each other, are uniformly processed externally, and are internally independent, thereby reducing the code error rate that may be caused by redundant and complex code modification and writing processes. Moreover, by dividing the unified processing flow into a detection process for performing fault detection on the data to be detected based on preset fault detection information, and a filtering process for filtering the current fault detection result according to preset filtering information, the traditional fault detection process can be decoupled into the process of fault detection, filtering, and updating the total fault code, so that the functional modules that implement fault detection, filtering, and updating the total fault code can be reused by other modules, thereby improving the code reuse rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only 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.

[0043] Figure 1 is a flowchart of an implementation of a fault detection method provided by an embodiment of the present invention;

[0044] Figure 2 is a schematic structural diagram of a preset buffer area provided by an embodiment of the present invention;

[0045] Figure 3 This is a fault detection block diagram provided by an embodiment of the present invention;

[0046] Figure 4 This is a flowchart of the implementation of the traditional "over" fault detection provided by the embodiment of the present invention;

[0047] Figure 5 This is a flowchart of the implementation of traditional "over" fault recovery detection provided by an embodiment of the present invention;

[0048] Figure 6 This is a flow chart of an implementation of the "pass" detection function provided by an embodiment of the present invention;

[0049] Figure 7 is a flowchart of the implementation of the filtering process provided by an embodiment of the present invention;

[0050] Figure 8 is a structural diagram of a fault detection device provided by an embodiment of the present invention;

[0051] Figure 9 is a schematic diagram of a power module provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0052] In the following description, specific details such as particular system structures and techniques are provided for purposes of illustration, not limitation, to facilitate a thorough understanding of the embodiments of the present invention. However, it will be apparent to those skilled in the art that the present invention may be practiced in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.

[0053] In order to make the purpose, technical solutions and advantages of the present invention more clear, specific embodiments will be described below with reference to the accompanying drawings.

[0054] See also Figure 1 , which shows a flowchart of the implementation of the fault detection method provided by an embodiment of the present invention, and is described in detail as follows:

[0055] In step 101 , for each position in a preset buffer area of ​​a power module, the total fault code, current fault code offset, data to be detected, preset fault detection information and preset filtering information stored at the current position are obtained.

[0056] like Figure 2 As shown, the preset buffer area of ​​the power module is a buffer area defined according to the preset structure. For example, each unit length (i.e., each position) of the preset buffer area can store information required for various functions in the fault detection process, such as the total fault variable pointer, the current fault code offset, the pointer to the variable to be measured, the fault detection type variable, and the filter type variable, as shown in structure 1.

[0057] Among them, the total fault code corresponding to the current unit length (ie, current position) of the preset cache area can be obtained through the total fault variable pointer, and the total fault code can represent the total fault flag to which the target fault corresponding to the current position belongs.

[0058] The current fault code offset may indicate the offset of the target fault corresponding to the current position in the total fault flag.

[0059] To further understand the total fault variable and the current fault code offset, the total fault variable shown in Table 1 is used for illustration. As shown in Table 1, the total fault variable can be a 32-bit variable, and each bit of the variable can represent a fault. For example, Bit 0 represents an output undervoltage fault, Bit 1 represents an output overvoltage fault, Bit 2 represents an input undervoltage fault, Bit 3 represents an input overvoltage fault, and so on.

[0060] Table 1

[0061] In this embodiment, each target fault to be detected by the power module shares a common variable, namely the total fault variable. This solves the problem of excessive memory usage caused by too many variables, as opposed to using a separate variable for each fault. Since each target fault shares a common total fault variable, the fault-related information stored at each location in the preset buffer needs to be labeled with the position of the fault corresponding to that location within the total fault variable. Therefore, the current fault code offset indicates the position of the fault corresponding to the current location within the total fault variable. Taking the total fault variable shown in Table 1 as an example, shifting the total fault variable right by one bit represents an output overvoltage fault. When the current location in the preset buffer stores information related to an output overvoltage fault, the corresponding current fault code offset is 1. Shifting the total fault variable right by two bits represents an input undervoltage fault. When the current location in the preset buffer stores information related to an input undervoltage fault, the corresponding current fault code offset is 2. The same applies to other faults. It should be noted that this embodiment is intended only to further understand the total fault variable and the current fault code offset and does not limit the specific number of bits in the total fault variable, the fault corresponding to each bit, or the current fault code offset stored at each location in the preset buffer.

[0062] The data to be detected corresponding to the current position can be obtained through the pointer of the variable to be detected. The data to be detected is the data used to detect the target fault corresponding to the current position, such as the voltage data or current data to be detected.

[0063] A fault detection type variable can correspond to a fault detection type structure. This variable can be used to retrieve preset fault detection information corresponding to the current location, such as the fault threshold indicated by the fault threshold pointer, the recovery threshold indicated by the fault recovery threshold pointer, the previous fault state / default fault state, and the fault detection function indicated by the fault detection function pointer. After each fault detection is completed, the previous fault state can be updated using the current fault detection filter result. The default fault state can be set by the user at power-on, for example, to a value indicating that the target fault corresponding to the current location has not occurred. The fault detection function for detecting the target fault corresponding to the current location can be selected as needed. For example, if the target fault corresponding to the current location is an "over" type fault such as overvoltage or overcurrent, the "over" detection function is selected. If the target fault corresponding to the current location is an "under" type fault such as input undervoltage or output undervoltage, the "under" detection function is selected. If the target fault corresponding to the current location is an "equal" type fault such as a hardware fault, the "equal" detection function is selected.

[0064] A filter type variable corresponds to a filter structure. This variable can be used to retrieve the preset filter information corresponding to the current position, such as the filter threshold, the filter function indicated by the filter function pointer, the filter count, the cumulative filter sum, and the last fault detection filter result, among other parameters related to the filtering process. The filter function can be customized based on different filtering methods, such as average filtering or sliding filtering. After each fault detection, the current fault detection filter result can be used to update the previous fault detection filter result.

[0065] Among them, using a fault detection type structure to define a fault detection type variable, and using a filter structure to define a filter type variable can further modularize the code and improve the code reuse rate.

[0066] Optionally, when the code reuse rate is not required to be high, a structure 2 including the total fault code, the current fault code offset, the data to be detected, the fault threshold in the preset fault detection information, the recovery threshold, the last fault status / default fault status, the fault detection function, and the filtering times threshold, filtering function, filtering times count value, filtering cumulative sum, and the last fault detection filtering result in the preset filtering information can be used to define each unit length of the preset cache area.

[0067] Among them, combined Figure 3As shown, after defining each unit length of the preset cache area according to the preset structure, the various faults that need to be detected by the power module can be first taken as target faults (for example, fault 1 to fault n), and the relevant information of each target fault can be registered in each position in the preset cache area (for example, the structure 1 cache area), and then the fault-related information stored in each position in the preset cache area can be traversed according to the data processing process of steps 101 to 104.

[0068] In this embodiment, by using a cache area, relevant information of the target fault is registered in a preset cache area, which can adapt to multiple faults of the power module and prevent the problem of a subsequent fault overwriting relevant information of a previous fault.

[0069] In step 102 , fault detection is performed on the data to be detected based on preset fault detection information to obtain a current fault detection result of a target fault corresponding to the current position.

[0070] Combine Figure 4 and Figure 5 As shown, in traditional fault detection methods, taking "over" fault detection as an example, both the fault detection and fault recovery detection processes compare the test data with the fault threshold (or recovery threshold). Based on the comparison result, the fault count value (or recovery count value) is accumulated or cleared. When the accumulated fault count value (or recovery count value) reaches the filtering time, the fault detection result flag (or recovery detection result flag) is set; otherwise, it is cleared. In other words, in traditional fault detection methods, the test data comparison process and the comparison result filtering process are coupled, which is not conducive to improving code reuse.

[0071] In this embodiment, fault detection is performed directly on the data to be detected based on the preset fault detection information to obtain the current fault detection result for the target fault corresponding to the current location. This does not consider whether a fault signal or a recovery signal has been detected multiple times in a row. In other words, the filtering process after comparing the data to be detected with the fault threshold and the recovery threshold is not considered. This decouples the coupled comparison and filtering process into a detection process for fault detection of the data to be detected based on the preset fault detection information and a subsequent filtering process for filtering the current fault detection result based on the preset filtering information, thereby facilitating improved code reuse.

[0072] Optionally, the preset fault detection information may include a fault threshold, a recovery threshold, and a fault detection function of a target fault corresponding to the current position.

[0073] On this basis, fault detection is performed on the data to be detected based on the preset fault detection information to obtain the current fault detection result of the target fault corresponding to the current position, which may include:

[0074] According to the fault detection function, the data to be detected is compared with the fault threshold to obtain a first comparison result.

[0075] If the first comparison result indicates that the target fault has occurred, the current fault detection result is recorded as a fault.

[0076] If the first comparison result indicates that the target fault has not occurred, the data to be detected is compared with the recovery threshold to obtain a second comparison result.

[0077] If the second comparison result indicates that the target fault has been recovered, the current fault detection result is recorded as not having a fault.

[0078] Combine Figure 6 As shown, taking the "over" detection function as an example, the process of performing fault detection on the data to be detected based on preset fault detection information can be as follows: determining whether the data to be detected is greater than the fault threshold. If the data to be detected is greater than the fault threshold, that is, the first comparison result indicates that the target fault has occurred, the result flag is set, that is, the result flag is used to indicate the current fault detection result, and the result flag is set to 1 to indicate that the current fault detection result is a fault. If the data to be detected is not greater than the fault threshold, it is necessary to determine whether the data to be detected is less than the recovery threshold. If the data to be detected is less than the recovery threshold, that is, the second comparison result indicates that the target fault has recovered, the result flag is cleared to 0, that is, the result flag is set to 0 to indicate that the current fault detection result is not a fault. The detection process of the "under" detection function is similar to that of the "equal" detection function. Replace "determining whether the data to be detected is greater than the fault threshold" with "determining whether the data to be detected is less than the fault threshold" or "determining whether the data to be detected is equal to the fault threshold", and replace "determining whether the data to be detected is less than the recovery threshold" with "determining whether the data to be detected is greater than the recovery threshold" or "determining whether the data to be detected is equal to the recovery threshold".

[0079] In this embodiment, the current fault detection result of the target fault corresponding to the current position is obtained directly based on the fault detection function, fault threshold, recovery threshold and the data to be detected in the preset fault detection information, without considering whether the fault signal is detected multiple times in succession or the recovery signal is detected multiple times in succession, thereby decoupling the coupled comparison filtering process into a detection process for fault detection on the data to be detected based on the preset fault detection information, which is conducive to improving the code reuse rate.

[0080] Optionally, the preset fault detection information may further include the last fault status of the target fault corresponding to the current position.

[0081] On this basis, after comparing the data to be detected with the recovery threshold to obtain a second comparison result, the method may further include: if the second comparison result indicates that the target fault has not been recovered, determining the last fault state as the current fault detection result.

[0082] The previous fault status of the target fault corresponding to the current location can be updated using the current fault detection filtering result after each fault detection is completed. Specifically, assuming the previous fault status during fault detection was 1 (indicating that the target fault corresponding to the current location has occurred), and the current fault detection filtering result obtained after fault detection is completed is 0 (indicating that the target fault corresponding to the current location has recovered / not occurred), the previous fault status is updated to 0 after fault detection is completed. This allows the current fault detection result to be determined based on the updated previous fault status during the next fault detection.

[0083] Combine Figure 6 As shown, still taking the "over" detection function as an example, under normal circumstances, the fault threshold in the "over" detection function will be greater than the recovery threshold to ensure the reliability of the current fault detection result. However, the data to be detected may be less than or equal to the fault threshold, but greater than the recovery threshold. In this case, according to the judgment of the "over" detection function, the data to be detected is neither greater than the fault threshold nor less than the recovery threshold. In other words, the first comparison result indicates that the target fault has not occurred, while the second comparison result indicates that the target fault has not recovered. To ensure the accuracy of the current fault detection result in this case, the last fault state can be determined as the current fault detection result. Other detection functions are similar and will not be described in detail here.

[0084] In step 103, the current fault detection result is filtered according to preset filtering information to obtain the current fault detection filtering result of the target fault.

[0085] In this embodiment, after the above steps decouple the coupled comparison filtering process into a detection process for performing fault detection on the data to be detected based on preset fault detection information, a filtering process is performed to filter the current fault detection result according to the preset filtering information, so that the coupled comparison filtering process is decoupled into a separate data comparison and filtering function, so that the data comparison and filtering functions can be applied not only in the fault detection process, but also in other locations where they are needed, such as applying the filtering function to the display module of the sampled data, thereby improving the code reuse rate.

[0086] Optionally, the preset filtering information may include a filtering times threshold, a filtering function and a filtering times count value for filtering the current fault detection result of the target fault corresponding to the current position, a filtering cumulative sum for accumulating the current fault detection result, and the last fault detection filtering result of the target fault corresponding to the current position.

[0087] On this basis, filtering the current fault detection result according to the preset filtering information to obtain the current fault detection filtering result of the target fault may include:

[0088] The filtering times count value is incremented to obtain the filtering times count value after the increment.

[0089] The current fault detection result is added to the filtered cumulative sum as the current value to be filtered to obtain an updated filtered cumulative sum.

[0090] Determine whether the filter count value after self-increment is greater than or equal to the filter threshold.

[0091] If the filtering times count value after the self-increment is less than the filtering times threshold, the last fault detection filtering result is determined as the current fault detection filtering result.

[0092] If the filter count value after self-increment is greater than or equal to the filter threshold, the current fault detection filter result of the target fault is obtained based on the filter function and the updated filter cumulative sum and the filter threshold.

[0093] Combine Figure 7 As shown, during the filtering process, the filtering times count value is first accumulated (that is, the filtering times count value is self-incremented) to count the filtering times. Then the current fault detection result is added to the filtering cumulative sum as the current value to be filtered, so as to determine the filtering result (that is, the current fault detection filtering result) based on different filtering functions and the updated filtering cumulative sum. For fault detection, when the statistical filtering times count value is less than the filtering times threshold value, it means that the number of times the fault signal or recovery signal is detected has not reached the required number, so the uploaded fault detection filtering result can be directly used as the current fault detection filtering result. When the statistical filtering times count value is greater than or equal to the filtering times threshold value, it means that the number of times the fault signal or recovery signal is detected has reached the required number. At this time, based on the different filtering functions, the updated filtering cumulative sum can be processed differently to obtain the current fault detection filtering result.

[0094] Optionally, the filtering function may include a mean value filter.

[0095] On this basis, based on the filtering function, according to the updated filtering cumulative sum and the filtering times threshold, the current fault detection filtering result of the target fault is obtained, which may include:

[0096] Calculate the ratio of the updated filtered cumulative sum to the filtering times threshold.

[0097] The comparison value is rounded, and the rounded result is determined as the current fault detection filtering result of the target fault.

[0098] This embodiment is illustrated by average value filtering. At this time, if the self-incremented filter count value is greater than or equal to the filter count threshold, the ratio of the updated filter cumulative sum to the filter count threshold can be calculated, the comparison value can be rounded, and the rounded result can be determined as the current fault detection filtering result of the target fault.

[0099] Combine Figure 6 and Figure 7 In this embodiment, the current fault detection filtering result is determined by average value filtering. Taking the result flag of the current data to be detected (i.e., the current fault detection result) as 1 or 0 as an example, when the data to be detected fluctuates over a continuous period of time, sometimes being greater than the fault threshold, sometimes less than the recovery threshold, and sometimes being in the last fault state, according to the calculation method of the filtered cumulative sum, the updated filtered cumulative sum must be less than the filtering times threshold. The current fault detection filtering result obtained by rounding the ratio of the updated filtered cumulative sum to the filtering times threshold is 0. Only when the data to be detected is continuously greater than the fault threshold over a continuous period of time, so that the updated filtered cumulative sum is equal to the filtering times threshold, the current fault detection filtering result is 1. This can avoid the situation where the fault or recovery flag is repeatedly triggered due to fluctuations of the data to be detected near the fault threshold or the recovery threshold.

[0100] It should be noted that when applying this filtering function to other modules such as the display of sampled data, the filtering function can be changed to filter according to the requirements of other modules without having to write filtering function code for each module that needs filtering, thereby improving code reuse rate.

[0101] Optionally, after obtaining the current fault detection filtering result of the target fault according to the updated filtered cumulative sum and the filtering number threshold, the following steps may also be included:

[0102] The count value of the number of filtering times after the self-increment and the updated filtering accumulation are respectively cleared, and the last fault detection filtering result is updated as the current fault detection filtering result.

[0103] In this embodiment, after obtaining the current fault detection filtering result of the target fault based on the updated filtering cumulative sum and the filtering times threshold, the self-incremented filtering times count value and the updated filtering cumulative sum are cleared respectively, and the last fault detection filtering result is updated to the current fault detection filtering result, so that the last fault detection filtering result can be updated in real time, so that when the filtering function is used next time, if the self-incremented filtering times count value is less than the filtering times threshold, there is no need for calculation, and the last fault detection filtering result can be directly used as the current fault detection filtering result.

[0104] Optionally, after filtering the current fault detection result according to the preset filtering information to obtain the current fault detection filtering result of the target fault, the following steps may also be included:

[0105] Update the last fault status to the current fault detection filtering result.

[0106] In this embodiment, the previous fault status is the data in the preset fault detection information, and the current fault detection filtering result is the data from the filtering process. After filtering the current fault detection result according to the preset filtering information to obtain the current fault detection filtering result for the target fault, the previous fault status is updated to the current fault detection filtering result, thus linking the comparison process and the filtering process.

[0107] In step 104 , the total fault code is updated according to the current fault detection filtering result and the current fault code offset, so as to determine the current fault state of the target fault of the power module based on the updated total fault code.

[0108] In this embodiment, the current fault detection filtering result is the accurate result of fault detection on the target fault corresponding to the current position. Therefore, the total fault code is updated according to the current fault detection filtering result and the current fault code offset to update the fault status of the target fault of the power module in real time.

[0109] Among them, for each position in the preset cache area, it can be processed according to the data comparison, filtering, result assignment, and updating of the total fault code in the above steps 101 to 104 until all data in the preset cache area are traversed.

[0110] The embodiment of the present invention obtains the total fault code, current fault code offset, data to be detected, preset fault detection information, and preset filtering information stored at each position in a preset buffer area of ​​a power module; performs fault detection on the data to be detected based on the preset fault detection information to obtain a current fault detection result of the target fault corresponding to the current position; filters the current fault detection result according to the preset filtering information to obtain a current fault detection filtering result of the target fault; updates the total fault code according to the current fault detection filtering result and the current fault code offset, and determines the current fault state of the target fault of the power module based on the updated total fault code. The detection process of each target fault that the power module needs to detect can be unified into a processing process for the total fault code, current fault code offset, data to be detected, preset fault detection information, and preset filtering information stored at each position in the preset buffer area of ​​the power module, thereby enabling detection of multiple target faults that the power module needs to detect based on the unified processing process, thereby simplifying the amount of code and the writing process, reducing modifications, ensuring that different fault detections do not interfere with each other, are uniformly processed externally, and are internally independent, thereby reducing the code error rate that may be caused by redundant and complex code modification and writing processes. Moreover, by dividing the unified processing flow into a detection process for performing fault detection on the data to be detected based on preset fault detection information, and a filtering process for filtering the current fault detection result according to preset filtering information, the traditional fault detection process can be decoupled into the process of fault detection, filtering, and updating the total fault code, so that the functional modules that implement fault detection, filtering, and updating the total fault code can be reused by other modules, thereby improving the code reuse rate.

[0111] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0112] The following are device embodiments of the present invention. For details not fully described therein, reference may be made to the corresponding method embodiments described above.

[0113] Figure 8 A schematic diagram of the structure of a fault detection device provided by an embodiment of the present invention is shown. For ease of explanation, only the parts related to the embodiment of the present invention are shown, which are described in detail as follows:

[0114] like Figure 8 As shown, the fault detection device includes: an acquisition module 81 , a detection module 82 , a filtering module 83 and an updating module 84 .

[0115] An acquisition module 81 is configured to acquire, for each location in a preset buffer area of ​​the power module, the total fault code stored at the current location, the current fault code offset, the data to be detected, the preset fault detection information, and the preset filtering information;

[0116] A detection module 82 is configured to perform fault detection on the data to be detected based on the preset fault detection information, and obtain a current fault detection result of a target fault corresponding to a current position;

[0117] A filtering module 83 is configured to filter the current fault detection result according to the preset filtering information to obtain a current fault detection filtering result of the target fault;

[0118] The updating module 84 is configured to update the total fault code according to the current fault detection filtering result and the current fault code offset, so as to determine the current fault state of the target fault of the power module based on the updated total fault code.

[0119] The embodiment of the present invention obtains the total fault code, current fault code offset, data to be detected, preset fault detection information, and preset filtering information stored at each position in a preset buffer area of ​​a power module; performs fault detection on the data to be detected based on the preset fault detection information to obtain a current fault detection result of the target fault corresponding to the current position; filters the current fault detection result according to the preset filtering information to obtain a current fault detection filtering result of the target fault; updates the total fault code according to the current fault detection filtering result and the current fault code offset, and determines the current fault state of the target fault of the power module based on the updated total fault code. The detection process of each target fault that the power module needs to detect can be unified into a processing process for the total fault code, current fault code offset, data to be detected, preset fault detection information, and preset filtering information stored at each position in the preset buffer area of ​​the power module, thereby enabling detection of multiple target faults that the power module needs to detect based on the unified processing process, thereby simplifying the amount of code and the writing process, reducing modifications, ensuring that different fault detections do not interfere with each other, are uniformly processed externally, and are internally independent, thereby reducing the code error rate that may be caused by redundant and complex code modification and writing processes. Moreover, by dividing the unified processing flow into a detection process for performing fault detection on the data to be detected based on preset fault detection information, and a filtering process for filtering the current fault detection result according to preset filtering information, the traditional fault detection process can be decoupled into the process of fault detection, filtering, and updating the total fault code, so that the functional modules that implement fault detection, filtering, and updating the total fault code can be reused by other modules, thereby improving the code reuse rate.

[0120] In one possible implementation, the preset fault detection information includes a fault threshold, a recovery threshold, and a fault detection function of the target fault corresponding to the current location; the detection module 82 may be configured to compare the data to be detected with the fault threshold according to the fault detection function to obtain a first comparison result;

[0121] If the first comparison result indicates that the target fault has occurred, recording the current fault detection result as a fault;

[0122] If the first comparison result indicates that the target fault has not occurred, comparing the data to be detected with the recovery threshold to obtain a second comparison result;

[0123] If the second comparison result indicates that the target fault has been recovered, the current fault detection result is recorded as not having a fault.

[0124] In one possible implementation, the preset fault detection information also includes the last fault status of the target fault corresponding to the current position; the detection module 82 can also be used to determine the last fault status as the current fault detection result if the second comparison result indicates that the target fault has not been recovered.

[0125] In a possible implementation, the updating module 84 may also be configured to update the last fault status to the current fault detection filtering result.

[0126] In one possible implementation, the preset filtering information includes a filtering times threshold, a filtering function, and a filtering times count value for filtering a current fault detection result of a target fault corresponding to a current location, a filtering cumulative sum for accumulating the current fault detection result, and a previous fault detection filtering result of the target fault corresponding to the current location; the filtering module 83 may be configured to auto-increment the filtering times count value to obtain an auto-incremented filtering times count value;

[0127] Adding the current fault detection result as the current value to be filtered to the filtered cumulative sum to obtain an updated filtered cumulative sum;

[0128] Determine whether the filtering times count value after self-increment is greater than or equal to the filtering times threshold;

[0129] If the filtering times count value after the self-increment is less than the filtering times threshold, the last fault detection filtering result is determined as the current fault detection filtering result;

[0130] If the self-incremented filtering times count value is greater than or equal to the filtering times threshold, then based on the filtering function, the current fault detection filtering result of the target fault is obtained according to the updated filtering cumulative sum and the filtering times threshold.

[0131] In a possible implementation, the filtering function includes an average value filter; the filtering module 83 may be configured to calculate a ratio of an updated filtered cumulative sum to the filtering times threshold;

[0132] The ratio is rounded, and a rounded result is determined as a current fault detection filtering result of the target fault.

[0133] In a possible implementation, the filtering module 83 may also be configured to respectively clear the self-incremented filtering count value and the updated filtering accumulation, and update the last fault detection filtering result as the current fault detection filtering result.

[0134] Figure 9 FIG is a schematic diagram of a power module provided by an embodiment of the present invention. Figure 9 As shown, the power module 9 of this embodiment includes: a processor 90, a memory 91, and a computer program 92 stored in the memory 91 and executable on the processor 90. When the processor 90 executes the computer program 92, the steps in the above-mentioned various fault detection method embodiments are implemented, such as Figure 1 Steps 101 to 104 shown, or Figure 6 and Figure 7 Alternatively, when the processor 90 executes the computer program 92, the functions of the modules / units in the above-mentioned device embodiments are realized, for example Figure 8 Functions of the modules / units 81 to 84 are shown.

[0135] Exemplarily, the computer program 92 may be divided into one or more modules / units, one or more modules / units being stored in the memory 91 and executed by the processor 90 to implement the present invention. One or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program 92 in the power module 9. For example, the computer program 92 may be divided into Figure 8 Modules / units 81 to 84 are shown.

[0136] The power module 9 may include, but is not limited to, a processor 90 and a memory 91. Those skilled in the art will appreciate that Figure 9 It is only an example of the power module 9 and does not constitute a limitation of the power module 9. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the power module may also include input and output devices, network access devices, buses, etc.

[0137] The processor 90 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0138] The memory 91 can be an internal storage unit of the power module 9, such as the hard drive or memory of the power module 9. The memory 91 can also be an external storage device of the power module 9, such as a plug-in hard drive, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. equipped on the power module 9. Furthermore, the memory 91 can include both the internal storage unit of the power module 9 and an external storage device. The memory 91 is used to store computer programs and other programs and data required by the power module. The memory 91 can also be used to temporarily store data that has been output or is about to be output.

[0139] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0140] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0141] Those skilled in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0142] In the embodiments provided by the present invention, it should be understood that the disclosed device / power module and method can be implemented in other ways. For example, the device / power module embodiments described above are merely illustrative. For example, the division of modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0143] Units described as separate components may or may not be physically separate, and 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 these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0144] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0145] If the integrated module / unit is implemented in the form of 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 present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, it can implement the steps of the above-mentioned various fault detection method embodiments. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form. Computer-readable media may include: any entity or device that can carry computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc.

[0146] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the scope of protection of the present invention.

Claims

1. A fault detection method, characterized in that: include: For each position in the preset cache area of ​​the power module, obtain the total fault code stored at the current position, the current fault code offset, the data to be detected, the preset fault detection information and the preset filtering information; Performing fault detection on the data to be detected based on the preset fault detection information to obtain a current fault detection result of the target fault corresponding to the current position; Filtering the current fault detection result according to the preset filtering information to obtain a current fault detection filtering result of the target fault; updating the total fault code according to the current fault detection filtering result and the current fault code offset, so as to determine a current fault state of the target fault of the power module based on the updated total fault code; The preset filtering information includes a filtering times threshold, a filtering function, and a filtering times count value for filtering the current fault detection result of the target fault corresponding to the current position, a filtering cumulative sum for accumulating the current fault detection result, and a previous fault detection filtering result of the target fault corresponding to the current position; The filtering the current fault detection result according to the preset filtering information to obtain the current fault detection filtering result of the target fault includes: Incrementing the filtering times count value to obtain the filtering times count value after the self-increment; Adding the current fault detection result as the current value to be filtered to the filtered cumulative sum to obtain an updated filtered cumulative sum; Determine whether the filtering times count value after self-increment is greater than or equal to the filtering times threshold; If the filtering times count value after the self-increment is less than the filtering times threshold, the last fault detection filtering result is determined as the current fault detection filtering result; If the self-incremented filtering times count value is greater than or equal to the filtering times threshold, then based on the filtering function, the current fault detection filtering result of the target fault is obtained according to the updated filtering cumulative sum and the filtering times threshold.

2. The fault detection method according to claim 1, characterized in that: The preset fault detection information includes a fault threshold, a recovery threshold, and a fault detection function of the target fault corresponding to the current position; The performing fault detection on the to-be-detected data based on the preset fault detection information to obtain a current fault detection result of a target fault corresponding to a current position includes: Comparing the data to be detected with the fault threshold according to the fault detection function to obtain a first comparison result; If the first comparison result indicates that the target fault has occurred, recording the current fault detection result as a fault; If the first comparison result indicates that the target fault has not occurred, comparing the data to be detected with the recovery threshold to obtain a second comparison result; If the second comparison result indicates that the target fault has been recovered, the current fault detection result is recorded as not having a fault.

3. The fault detection method according to claim 2, characterized in that: The preset fault detection information also includes the last fault status of the target fault corresponding to the current position; After comparing the data to be detected with the restoration threshold to obtain a second comparison result, the method further includes: If the second comparison result indicates that the target fault has not been recovered, the last fault state is determined as the current fault detection result.

4. The fault detection method according to claim 3, characterized in that: After filtering the current fault detection result according to the preset filtering information to obtain the current fault detection filtering result of the target fault, the method further includes: The last fault status is updated as the current fault detection filtering result.

5. The fault detection method according to claim 1, characterized in that: The filtering function includes a mean value filter; The obtaining, based on the filtering function and according to the updated filtering cumulative sum and the filtering times threshold, a current fault detection filtering result of the target fault includes: Calculating the ratio of the updated filtered cumulative sum to the filtering times threshold; The ratio is rounded, and a rounded result is determined as a current fault detection filtering result of the target fault.

6. The fault detection method according to claim 1, characterized in that: After obtaining the current fault detection filtering result of the target fault according to the updated filtered cumulative sum and the filtering times threshold, the method further includes: The count value of the number of filtering times after the self-increment and the updated filtering accumulation are respectively summed and cleared, and the last fault detection filtering result is updated as the current fault detection filtering result.

7. A fault detection device, characterized in that: include: An acquisition module is used to acquire, for each position in a preset buffer area of ​​the power module, a total fault code stored at the current position, a current fault code offset, data to be detected, preset fault detection information, and preset filtering information; A detection module, configured to perform fault detection on the data to be detected based on the preset fault detection information, and obtain a current fault detection result of a target fault corresponding to a current position; A filtering module, configured to filter the current fault detection result according to the preset filtering information to obtain a current fault detection filtering result of the target fault; an updating module, configured to update the total fault code according to the current fault detection filtering result and the current fault code offset, so as to determine a current fault state of a target fault of the power module based on the updated total fault code; The preset filtering information includes a filtering times threshold, a filtering function, and a filtering times count value for filtering the current fault detection result of the target fault corresponding to the current position, a filtering cumulative sum for accumulating the current fault detection result, and a previous fault detection filtering result of the target fault corresponding to the current position; The filtering module is specifically used for: Incrementing the filtering times count value to obtain the filtering times count value after the self-increment; Adding the current fault detection result as the current value to be filtered to the filtered cumulative sum to obtain an updated filtered cumulative sum; Determine whether the filtering times count value after self-increment is greater than or equal to the filtering times threshold; If the filtering times count value after the self-increment is less than the filtering times threshold, the last fault detection filtering result is determined as the current fault detection filtering result; If the self-incremented filtering times count value is greater than or equal to the filtering times threshold, then based on the filtering function, the current fault detection filtering result of the target fault is obtained according to the updated filtering cumulative sum and the filtering times threshold.

8. A power module, characterized in that: The method comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Unified processing method and device for different types of faults and power supply module

    CN114690064A