Unified detection method, power module and storage medium for different types of faults
A unified detection method is used to handle the "over" and "under" type faults of the power module. The detection difference is calculated using the fault type flag values with opposite signs and the difference value. This solves the problems of large code size and high error rate in the existing technology, and achieves simplified code writing and fault protection.
Patent Information
- Application Number
- CN202210323061.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-29
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2042-03-29
AI Technical Summary
Existing power module fault detection methods require writing code for different types of faults one by one, resulting in a large amount of code and a high error rate.
A unified detection method is adopted. By obtaining the operating data to be tested, the fault type flag value, and the current working status of the power module, the difference is calculated. The detection difference is calculated using the fault type flag value with opposite signs and the difference. This unified processing handles the detection process of "over" and "under" type faults, simplifying the code writing process.
It realizes unified detection of different types of faults, simplifies the amount of code and the writing process, reduces the error rate, and is suitable for the fault protection mechanism of the power module.
Smart Images

Figure CN114646896B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power module design, and in particular to a unified detection method for different types of faults, a power module and a storage medium. Background Art
[0002] With the advancement of power electronics technology, power modules are increasingly used in charging stations, onboard power supplies for electric vehicles, and in power systems. The fault protection mechanism in power modules can stabilize module operation when a fault is detected, reducing the module's failure rate and enabling self-protection, thereby preventing major accidents.
[0003] However, in the process of realizing the present invention, the inventors discovered that there are many types of faults that need to be detected by the power supply module, such as "over" type faults (such as input overvoltage, output overvoltage, etc.), "under" type faults (such as input undervoltage, output undervoltage, etc.) and "equal" type faults (such as hardware faults that determine the fault when the data to be detected is equal to the detection threshold, etc.), and the detection methods corresponding to different types of faults are different. Even for the same type of fault, the corresponding detection methods are different when the working state of the power supply module is different before and after the fault occurs. Therefore, traditional fault detection methods usually require writing fault detection codes one by one for different types of faults. On the one hand, it increases the workload of R&D personnel and results in a large amount of code; on the other hand, the redundant and complex writing process may also lead to the problem of high error rate of fault detection code. Summary of the Invention
[0004] The embodiments of the present invention provide a unified detection method for different types of faults, a power module, and a storage medium to solve the current problem of needing to write fault detection codes one by one for different types of faults, resulting in a large amount of code and a high error rate.
[0005] In a first aspect, an embodiment of the present invention provides a unified method for detecting different types of faults, including:
[0006] Obtain the power module's operating data to be tested, fault type flag value, and current working status;
[0007] Determine a preset detection threshold corresponding to the current working state, and calculate the difference between the operating data to be detected and the preset detection threshold;
[0008] Determining whether the fault type to be detected is an "etc." type fault according to the fault type flag value;
[0009] If the fault type to be detected is not an "equal" type fault, a detection difference value for detecting fault occurrence or recovery is calculated based on the fault type flag value and the difference value; wherein the fault type flag values of an "over" type fault and an "under" type fault are non-zero and have opposite signs;
[0010] Comparing the detection difference with a first preset value, updating the detection time corresponding to each working state according to the comparison result, and recording the updated detection time corresponding to the current working state as the waiting detection time;
[0011] The working state reversal flag value is determined according to the detection time and the preset detection time corresponding to the current working state, so as to determine whether the working state corresponding to the current power module is a normal state or a fault state according to the working state reversal flag value.
[0012] In a possible implementation, calculating, based on the fault type flag value and the difference value, a detection difference value for detecting fault occurrence or recovery includes:
[0013] The product of the fault type flag value and the difference value is calculated to obtain a detection difference value for detecting the occurrence or recovery of a fault.
[0014] In a possible implementation, the detection time corresponding to the normal state is the fault occurrence time, and the detection time corresponding to the fault state is the fault recovery time;
[0015] The comparing the detection difference with the first preset value and updating the detection time corresponding to each working state according to the comparison result includes:
[0016] When the fault type flag value of the "over" type fault is positive and the fault type flag value of the "under" type fault is negative, the detection difference is compared with the first preset value;
[0017] If the detection difference is greater than or equal to the first preset value, the fault occurrence time is accumulated and the fault recovery time is updated to a first initial value;
[0018] If the detection difference is less than the first preset value, the fault recovery time is accumulated and the fault occurrence time is updated to a second initial value.
[0019] In a possible implementation, the detection time corresponding to the normal state is the fault occurrence time, and the detection time corresponding to the fault state is the fault recovery time;
[0020] The comparing the detection difference with the first preset value and updating the detection time corresponding to each working state according to the comparison result includes:
[0021] When the fault type flag value of the "over" type fault is a negative value and the fault type flag value of the "under" type fault is a positive value, the detection difference is compared with the first preset value;
[0022] If the detection difference is less than or equal to the first preset value, the fault occurrence time is accumulated and the fault recovery time is updated to a third initial value;
[0023] If the detection difference is greater than the first preset value, the fault recovery time is accumulated and the fault occurrence time is updated to a fourth initial value.
[0024] In a possible implementation, after determining whether the fault type to be detected is an "etc." type fault according to the fault type flag value, the method further includes:
[0025] If the fault type to be detected is an "etc." type fault, the difference is compared with the second preset value, and the detection time corresponding to the current working state is updated according to the comparison result and recorded as the time to be detected.
[0026] In one possible implementation, obtaining the current working status of the power module includes:
[0027] Obtain the current working status flag value corresponding to the current working status of the power module;
[0028] Determining the preset detection threshold corresponding to the current working state includes:
[0029] The preset threshold value in the address corresponding to the current working state flag value in the preset threshold value buffer area is obtained as the preset detection threshold value.
[0030] In a possible implementation, comparing the difference with a second preset value and updating the detection time corresponding to the current working state according to the comparison result includes:
[0031] comparing the difference with a second preset value;
[0032] If the difference is equal to the second preset value, the time in the address corresponding to the current working state flag value in the preset time buffer is accumulated;
[0033] If the difference is not equal to the second preset value, the time in the address corresponding to the current working state flag value in the preset time buffer is updated to a fifth initial value.
[0034] In a possible implementation, determining the working state reversal flag value according to the to-be-detected time and the preset detection time corresponding to the current working state includes:
[0035] Determine whether the detection time reaches the preset detection time corresponding to the current working state;
[0036] If the detection time reaches the preset detection time corresponding to the current working state, a first working state reversal flag value is output to indicate that the current working state is reversed from the normal state to the abnormal state, or reversed from the abnormal state to the normal state;
[0037] If the detection time does not reach the preset detection time corresponding to the current working state, a second working state flip flag value is output to indicate that the current working state remains unchanged.
[0038] In a second aspect, an embodiment of the present invention provides a power supply module, comprising a control device, the control device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method described in the first aspect or any possible implementation of the first aspect are implemented.
[0039] In a third 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.
[0040] The embodiment of the present invention provides a unified detection method for different types of faults, a power supply module and a storage medium. On the one hand, by calculating the difference between the operating data to be detected and the preset detection threshold corresponding to the current working state, that is, when the current working state is normal, the difference between the operating data to be detected and the preset detection threshold corresponding to the normal state is calculated; when the current working state is a fault state, the difference between the operating data to be detected and the preset detection threshold corresponding to the fault state is calculated. In the subsequent detection process, it is only necessary to compare the difference with the corresponding detection condition, without having to set different detection processes for different working states; on the other hand, in the process of the test data to be detected, the detection threshold value is calculated. When the fault type detected is not an "equal" type fault, since the detection processes of "over" type faults and "under" type faults are usually opposite, for example, "over" type faults usually require detection of whether the operating data to be detected is greater than the corresponding preset detection threshold, while "under" type faults usually require detection of whether the operating data to be detected is less than the corresponding preset detection threshold, the present application first calculates the difference between the operating data to be detected and the corresponding preset detection threshold, and then uses the fault type flag value with opposite signs and the difference calculation to obtain the detection difference used to detect the occurrence or recovery of the fault, which can unify the detection processes of "over" type faults and "under" type faults. This achieves the purpose of unified detection of "over" type faults, "under" type faults and different working states under each fault type, simplifies the code volume and writing process of different types of fault detection codes, and at the same time solves the problem of high error rate that may be caused by redundant and complex writing processes, which is conducive to reducing code modifications. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] 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.
[0042] Figure 1 This is a flowchart of an implementation method for unified detection of different types of faults provided by an embodiment of the present invention;
[0043] Figure 2 This is a flowchart of an implementation method for unified detection of different types of faults provided by an embodiment of the present invention;
[0044] Figure 3 1 is a schematic diagram of the structure of a unified detection device for different types of faults provided by an embodiment of the present invention;
[0045] Figure 4 Schematic diagram of a control device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0046] 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.
[0047] 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.
[0048] The types of faults that power modules need to detect can generally be divided into "overload," "underload," and "equal" faults. Different fault types require different detection methods. For example, if the power module's current operating state is normal, and the operating data to be compared is greater than the fault threshold, and remains greater after a series of filtering delays (i.e., the preset fault occurrence time corresponding to the fault type to be detected), an "overload" fault is considered to have occurred (i.e., the power module's current operating state has changed to a fault state). If the power module's current operating state is a fault, and the operating data to be compared is less than the recovery threshold, and remains below the recovery threshold after a certain period of time (i.e., the preset fault recovery time corresponding to the fault type to be detected), the "overload" fault is considered to have recovered (i.e., the power module's current operating state has returned to normal). Similarly, if the fault type to be detected is an "under" fault, if the power module is currently operating in a normal state, the operating data to be compared is less than the fault threshold, and after a series of filtering delays, it remains less than the fault threshold, then an "under" fault is considered to have occurred. If the power module is currently operating in a fault state, and the operating data to be compared is greater than the recovery threshold, and after a certain period of time, it remains greater than the fault threshold, then the "under" fault is considered to have recovered. If the fault type to be detected is an "equal" fault, if the power module is currently operating in a normal state, the operating data to be compared is equal to the fault threshold, and after a series of filtering delays, it remains equal to the fault threshold, then an "equal" fault is considered to have occurred. If the power module is currently operating in a fault state, and the operating data to be compared is equal to the recovery threshold, and after a certain period of time, it remains equal to the fault threshold, then the "equal" fault is considered to have recovered.
[0049] The fault types, fault flags (that is, the current working status flag values) and the judgment methods required for fault detection are statistically analyzed, and the following Table 1 is obtained:
[0050] Table 1 Different types of fault detection processes
[0051]
[0052] In Table 1, a fault flag set to 1 indicates that the corresponding operating state is a fault state, and a fault flag cleared to 0 indicates that the corresponding operating state is normal. That is, a current operating state flag value of 1 indicates that the operating state is a fault state, and a current operating state flag value of 0 indicates that the current operating state is normal. This is just an example of the correspondence between the operating state flag value and the corresponding operating state, and is not limiting. For example, a current operating state flag value of 0 could also indicate a fault state, and a current operating state flag value of 1 could indicate a normal state, as long as the corresponding operating state can be distinguished based on the operating state flag value.
[0053] Table 1 shows that different types of fault detection processes require different judgment methods, detection thresholds (fault thresholds or recovery thresholds), and detection times (preset fault recovery times or preset fault occurrence times). Furthermore, for the same type of fault detection process, the judgment method, detection threshold, and detection time also vary due to different fault signs.
[0054] Therefore, in order to better adapt to different types of fault handling requirements, unify different types of fault detection processes, and use the same fault detection process for processing, it is necessary to solve the problems of different judgment methods, different detection thresholds, and different detection times in the above-mentioned different types of fault detection processes, as well as the problem that in the same type of fault detection process, due to different fault signs, the judgment methods, detection thresholds, and detection times are also different.
[0055] See also Figure 1 , which shows a flowchart of the implementation of the unified detection method for different types of faults provided by an embodiment of the present invention, and is detailed as follows:
[0056] In step 101, the operating data to be detected, the fault type flag value and the current working state of the power module are obtained.
[0057] The power module's operating data to be tested refers to data related to the power module's operation and corresponding to the fault type to be tested. For example, if the fault type to be tested is an overvoltage fault within the "over" fault type, the operating data to be tested is voltage data; if the fault type to be tested is an overcurrent fault within the "over" fault type, the operating data to be tested is current data, and so on.
[0058] The fault type flag value of the power module indicates whether the fault type to be detected by the power module is an "overload" fault, an "underload" fault, or an "equal" fault.
[0059] From Table 1 above, we can see that different fault types have different judgment symbols (i.e., whether the judgment symbol is greater than, less than, or equal to). The specific judgment symbol used is related to the fault type to be detected and the fault sign:
[0060] ① When the fault flag is set, the judgment symbol for "over" type fault is less than, and the judgment symbol for "under" type fault is greater than.
[0061] ② When the fault flag is cleared to 0, the judgment symbol for "over" type fault is greater than, and the judgment symbol for "under" type fault is less than.
[0062] ③ Regardless of whether the fault flag is set or cleared, the judgment symbol for the "equal" type fault is equal.
[0063] Therefore, for the above 1 and 2, in order to unify the judgment symbols for "over" type faults and "under" type faults, the fault type flag values for "over" type faults and "under" type faults are set to non-zero and opposite signs. For example, the fault type flag value for "over" type faults can be 1, and the fault type flag value for "under" type faults can be "-1". The fault detection process for different types of faults after using the fault type flag values is shown in Table 2:
[0064] Table 2 Different types of fault detection processes after using fault type flag values
[0065]
[0066] Table 2 shows that, after using the fault type flag values for "over" and "under" type faults, the same judgment method can be used for both "over" and "under" type faults. For example, when the fault flag is set, the determination is made by dividing (fault type flag value of the fault type to be detected) by (operating data to be compared - recovery threshold) by less than 0. When the fault flag is cleared, the determination is made by dividing (fault type flag value of the fault type to be detected) by (operating data to be compared - fault threshold) by greater than 0. In other words, using the fault type flag values for "over" and "under" type faults solves the problem of different judgment methods for different fault detection methods.
[0067] The current operating state of the power module can be either a fault state or a normal state. Table 1 shows that the detection thresholds used in different fault type determination methods are related to whether the fault flag is set, and are independent of the fault type being detected. Similarly, the detection times used in different fault type determination methods are also related to whether the fault flag is set, and are independent of the fault type being detected. Specifically:
[0068] ③ When the fault flag is set, the detection threshold (i.e., the subsequent preset detection threshold) is the recovery threshold corresponding to the fault type to be detected; when the fault flag is cleared to 0, the detection threshold is the fault threshold corresponding to the fault type to be detected.
[0069] ④ When the fault flag is set, the detection time (i.e., the subsequent preset detection time) is the preset fault recovery threshold corresponding to the fault type to be detected; when the fault flag is cleared to 0, the detection time is the preset fault occurrence time corresponding to the fault type to be detected.
[0070] Therefore, for the above items ③ and ④, in order to distinguish the detection threshold and detection time used, the detection threshold and detection time used can be set as variables related to the fault flag. For example, when the fault flag is set, the corresponding recovery threshold and preset fault recovery time can be obtained as the corresponding preset detection threshold and preset detection time; when the fault flag is cleared, the corresponding fault threshold and preset fault occurrence time can be obtained as the corresponding preset detection threshold and preset detection time.
[0071] Combined with the above-mentioned fault type flag value, whether it is an "over" type fault or an "under" type fault, and whether the current working state is a fault state or a normal state, a judgment method can be used, for example: judging whether (fault type flag value of the fault type to be detected) * (operating data to be compared - preset detection threshold corresponding to the current working state) is less than 0, if it is less than 0, the preset detection time corresponding to the current working state is used to process the fault recovery process, and if it is greater than 0, the preset detection time corresponding to another working state other than the current working state is used to process the fault occurrence process. Alternatively, judging whether (fault type flag value of the fault type to be detected) * (operating data to be compared - preset detection threshold corresponding to the current working state) is greater than 0, if it is greater than 0, the preset detection time corresponding to the current working state is used to process the fault occurrence process, and if it is less than 0, the preset detection time corresponding to another working state other than the current working state is used to process the fault recovery process. In other words, after setting the preset detection threshold and the preset detection time as variables related to the current working state, the problem of different judgment methods, different detection thresholds, and different detection times used in different types of fault detection processes or the same type of fault detection process is solved.
[0072] Therefore, obtaining the fault type flag value and current working status of the power module is conducive to the unified detection of different fault types and different working states, thereby simplifying the code volume and writing process of different types of fault detection codes, and at the same time solving the problem of high error rate that may be caused by redundant and complex writing processes, which is conducive to reducing code modifications.
[0073] Optionally, obtain the current working status of the power module, which may include:
[0074] Get the current working status flag value corresponding to the current working status of the power module.
[0075] In this embodiment, the current working state of the power supply module can be represented by the current working state flag value. The current working state flag value is used to represent the current working state of the power supply module, so that the preset detection threshold and the preset detection time are set as variables related to the current working state. For example, when the current working state flag value is 1, it represents that the power supply module is in a fault state, and when the current working state flag value is 0, it represents that the power supply module is in a normal state. Then, let 1 be associated with the recovery threshold and the preset fault recovery time, and let 0 be associated with the fault threshold and the preset fault occurrence time. When the current working state flag value is 1, the recovery threshold and the preset fault recovery time corresponding to 1 are taken as the preset detection threshold and the preset detection time. When the current working state flag value is 0, the fault threshold and the preset fault occurrence time corresponding to 0 are taken as the preset detection threshold and the preset detection time.
[0076] In step 102, a preset detection threshold corresponding to the current working state is determined, and a difference between the operating data to be detected and the preset detection threshold is calculated.
[0077] As can be seen from the above description, regardless of whether the fault is an "over," "under," or "equal" type, fault detection requires comparing the operating data to be tested with the corresponding detection threshold to determine whether the fault will recover in a faulty state or whether the fault will reoccur in a normal state. Therefore, this embodiment calculates the difference between the operating data to be tested and the preset detection threshold to detect different fault types based on the difference, eliminating the need to compare the operating data to be tested with the corresponding detection threshold for each fault type.
[0078] Optionally, determining a preset detection threshold corresponding to the current working state may include:
[0079] The preset threshold value in the address corresponding to the current working state flag value in the preset threshold value buffer area is obtained as the preset detection threshold value.
[0080] In this embodiment, for each fault type that the power module needs to detect, a preset threshold cache area and a preset time cache area can be set respectively, and the cache area addresses in the preset threshold cache area and the preset time cache area are associated with the current working status flag value. The current working status flag value is used to distinguish the detection threshold and detection time required for different working states, that is, the "current working status flag value" plays the role of a function code.
[0081] For example, a preset threshold buffer area and a preset time buffer area may be as shown in Table 3:
[0082] Table 3
[0083] Cache address First address (0 position address) Next address (1 position address) Preset threshold buffer Fault threshold Recovery threshold Preset time buffer Preset fault occurrence time Preset fault recovery time
[0084] Since when the current working status flag value is 1, that is, when the current working status is a fault state, it is necessary to detect whether the fault will be restored, that is, it is necessary to use the recovery threshold and the preset fault recovery time for detection, so the next address (1 position address) of the preset threshold buffer area and the preset time buffer area stores the recovery threshold and the preset fault recovery time.
[0085] Since when the current working status flag value is 0, that is, when the current working status is normal, it is necessary to detect whether a fault will occur, that is, it is necessary to use the fault threshold and the preset fault occurrence time for detection, so the first address (0 position address) of the preset threshold buffer area and the preset time buffer area stores the fault threshold and the preset fault occurrence time.
[0086] The association between the buffer addresses in the preset threshold buffer and the preset time buffer and the current working state flag value is merely an example of an embodiment of the present invention. The specific detection threshold and detection time in the buffer addresses in the preset threshold buffer and the preset time buffer can be determined based on the actual meaning of the current working state flag value. For example, if the current working state flag value is 1, indicating that the current working state is normal, and if the current working state flag value is 0, indicating that the current working state is faulty, then the recovery threshold and the preset fault recovery time should be stored in the address at position 0 in Table 3 above, and the fault threshold and the preset fault occurrence time should be stored in the address at position 1.
[0087] In step 103, it is determined whether the fault type to be detected is an "etc." type fault according to the fault type flag value.
[0088] As can be seen from Table 1 above, the judgment method for "equal" type faults is unrelated to the judgment methods for the other two types of faults. Therefore, the fault type flag value for "equal" type faults can be set to be different from the fault type flag values for "over" type faults and "under" type faults. For example, the fault type flag for "equal" type faults can be set to 0. Based on the fault type flag value, it can be first determined whether the fault type to be detected is an "equal" type fault. If the fault type to be detected is not an "equal" type fault, the "over" type fault and "under" type faults are detected according to the unified detection process.
[0089] In step 104, if the fault type to be detected is not an "etc." type fault, a detection difference value for detecting the occurrence or recovery of the fault is calculated based on the fault type flag value and the difference value.
[0090] Among them, the fault type flag values of "over" type fault and "under" type fault are not zero and have opposite signs.
[0091] Based on the description of step 101 above, it can be seen that if the fault type to be detected is not an "equal" type fault, that is, the fault type to be detected is an "over" type fault or an "under" type fault, the judgment symbols in the judgment method of the "over" type fault and the "under" type fault in the prior art are different. Therefore, this embodiment calculates the detection difference for detecting the occurrence or recovery of the fault based on the fault type flag value and the difference, so that when fault detection is performed based on the detection difference, the same judgment method can be used to detect the "over" type fault and the "under" type fault.
[0092] Optionally, calculating a detection difference value for detecting fault occurrence or recovery based on the fault type flag value and the difference value may include:
[0093] The product of the fault type flag value and the difference value is calculated to obtain a detection difference value used to detect the occurrence or recovery of the fault.
[0094] This embodiment calculates the product of the fault type flag value and the difference value to obtain a detection difference value for detecting the occurrence or recovery of a fault. Since the fault type flag values of the "over" type fault and the "under" type fault are not zero and have opposite signs, and the judgment signs in the judgment method of the "over" type fault and the "under" type fault in the prior art are also opposite, the detection difference value obtained by multiplying the fault type flag value and the difference value can use the same judgment sign to detect the "over" type fault and the "under" type fault, that is, the difference value is marked with the fault type flag value, and there is no need to distinguish between the "over" and "under" fault types, and the "over" and "under" types can be processed using the same method.
[0095] In step 105, the detection difference is compared with a first preset value, the detection time corresponding to each working state is updated according to the comparison result, and the updated detection time corresponding to the current working state is recorded as the waiting detection time.
[0096] In step 106, the working state reversal flag value is determined according to the detection time and the preset detection time corresponding to the current working state, so as to determine whether the working state corresponding to the current power module is normal or faulty according to the working state reversal flag value.
[0097] In this embodiment, after obtaining a detection difference value by multiplying the fault type flag value and the difference value, the detection difference value is compared with a first preset value. If the current operating state of the power module is normal and the comparison result indicates that a fault has occurred in the current power module, it is necessary to further determine whether the time of fault occurrence has reached the preset fault occurrence time based on the preset fault occurrence time corresponding to the normal state. When the time of fault occurrence reaches the preset fault occurrence time, the current operating state is switched from the normal state to the fault state. If the current operating state of the power module is a fault state and the comparison result indicates that the fault has been recovered from, it is necessary to further determine whether the time of fault recovery has reached the preset fault recovery time based on the preset fault recovery time corresponding to the fault state. When the time of fault recovery reaches the preset fault recovery time, the current operating state is switched from the fault state to the normal state. Alternatively, if the time of fault occurrence has not reached the preset fault occurrence time, or the time of fault recovery has not reached the preset fault recovery time, the current operating state remains normal if it is normal, and remains faulty if it is a faulty state, i.e., the current operating state does not switch.
[0098] The embodiment of the present invention first obtains the operating data to be detected, the fault type flag value and the current working state of the power module, then determines the preset detection threshold corresponding to the current working state, and calculates the difference between the operating data to be detected and the preset detection threshold, and then determines whether the fault type to be detected is an "etc." type fault according to the fault type flag value. When the fault type to be detected is not an "etc." type fault, a detection difference for detecting the occurrence or recovery of the fault is calculated according to the fault type flag value and the difference, and compares the detection difference with the first preset value. The detection time corresponding to each working state is updated according to the comparison result, and the detection time corresponding to the updated current working state is recorded as the time to be detected. The working state reversal mark value is determined according to the time to be detected and the preset detection time corresponding to the current working state, so as to determine whether the working state corresponding to the current power module is a normal state or a fault state according to the working state reversal mark value. This embodiment can unify the detection process of "over" type faults and "under" type faults based on the fault type flag value and the current working status, and solve the problem of inconsistent code writing in the detection process of different types of faults, which requires different writing according to different types. It can be applied to the fault protection mechanism of any power module in different car factories, charging stations, military power supplies and electric power supplies, to achieve unified detection of different types of faults, simple code and unified detection mechanism, which is conducive to reducing code modification, simplifying the code amount and writing process, and at the same time solving the problem of increased error rate caused by redundant and complex writing processes.
[0099] As an embodiment of the present invention, assuming that the detection time corresponding to the normal state is the fault occurrence time, and the detection time corresponding to the fault state is the fault recovery time, on this basis, the specific implementation process of the above step 105 may include:
[0100] When the fault type flag value of the "over" type fault is a positive value and the fault type flag value of the "under" type fault is a negative value, the detection difference is compared with the first preset value.
[0101] If the detection difference is greater than or equal to the first preset value, the fault occurrence time is accumulated and the fault recovery time is updated to the first initial value.
[0102] If the detection difference is less than the first preset value, the fault recovery time is accumulated and the fault occurrence time is updated to a second initial value.
[0103] Combine Figure 2 Among them, "over" type faults and "under" type faults usually require detecting whether the operating data to be detected is greater than the corresponding preset detection threshold or whether it is less than the corresponding preset detection threshold. Therefore, after calculating the difference between the operating data to be detected and the corresponding preset detection threshold, and calculating the detection difference based on the product of the fault type flag value and the difference, the detection difference can be compared with 0, that is, the first preset value can be 0.
[0104] like Figure 2 As shown, the fault occurrence time can be accumulated by adding the fault occurrence time from 0 according to the fault detection interval, or by subtracting the fault occurrence time from the corresponding preset fault occurrence time according to the fault detection interval. Similarly, the fault recovery time can also be accumulated by adding the fault occurrence time from 0 or by subtracting the fault recovery time from the corresponding preset fault recovery time.
[0105] For example, the preset fault occurrence time corresponding to an "over" type fault in a normal state is 3s, and the fault detection interval is 5ms. When accumulating the fault occurrence time, each time a detection is performed and the fault is confirmed to have occurred based on the detection difference, the fault occurrence time is accumulated from 0 by 5ms until the fault occurrence time reaches 3s, or is accumulated from 3s by 5ms until the fault occurrence time reaches 0.
[0106] Alternatively, the fault occurrence time or fault recovery time can be accumulated based on the number of detections. For example, if the default fault occurrence time for an "over" fault in the normal state is 3 seconds and the fault detection interval is 5 ms, then if 600 detections are performed and each confirms a fault, the current operating state should be reversed. That is, after each detection and confirmation of a fault based on the detection difference, the fault occurrence time is incremented by 1 until the fault occurrence time reaches 600. Alternatively, after each detection and confirmation of a fault based on the detection difference, the fault occurrence time is decremented by 1 until the fault occurrence time reaches 0.
[0107] The above-mentioned method of accumulating the fault occurrence time or the fault recovery time is an example of this embodiment, and this embodiment is not limited to this. As long as the fault occurrence time or the fault recovery time can be counted, it will suffice.
[0108] The first initial value and the second initial value may be determined by accumulating the fault occurrence time or the fault recovery time. For example, the first initial value may be a preset fault recovery time corresponding to the fault type to be detected or 0, and the second initial value may be a preset fault occurrence time corresponding to the fault type to be detected or 0. This embodiment is also not limited to this.
[0109] Optionally, after comparing the detection difference with the first preset value, a difference flag value can also be set. If the detection difference is greater than or equal to the first preset value, the difference flag value can be 0. If the detection difference is less than the first preset value, the difference flag value can be 1. Then, the time within the address corresponding to the difference flag value in the preset time buffer is accumulated, and the time outside the address corresponding to the difference flag value in the preset time buffer is updated to the corresponding initial value.
[0110] This embodiment updates the detection time corresponding to each working state by setting the difference flag value, which is beneficial to further reduce the amount of code.
[0111] Optional, such as Figure 2 As shown, after accumulating the fault occurrence time or the fault recovery time, the accumulated fault occurrence time or the accumulated fault recovery time can be clipped to prevent the fault occurrence time or the fault recovery time from being negative. For example, the fault occurrence time or the fault recovery time can be clipped to a value greater than or equal to 0.
[0112] As another embodiment of the present invention, assuming that the detection time corresponding to the normal state is the fault occurrence time, and the detection time corresponding to the fault state is the fault recovery time, on this basis, the specific implementation process of the above step 105 may include:
[0113] When the fault type flag value of the "over" type fault is a negative value and the fault type flag value of the "under" type fault is a positive value, the detection difference is compared with the first preset value.
[0114] If the detection difference is less than or equal to the first preset value, the fault occurrence time is accumulated and the fault recovery time is updated to a third initial value.
[0115] If the detection difference is greater than the first preset value, the fault recovery time is accumulated and the fault occurrence time is updated to a fourth initial value.
[0116] The first initial value in this embodiment corresponds to the first initial value in the above embodiment. The method of accumulating the fault occurrence time or accumulating the fault recovery time, as well as the third initial value and the fourth initial value, also have the same meaning as in the above embodiment. However, due to the difference in the fault type flag values of the "over" type fault and the "under" type fault, the processing after comparing the detection difference with the first preset value is different, which will not be repeated here.
[0117] As another embodiment of the present invention, after determining whether the fault type to be detected is an "etc." type fault according to the fault type flag value, the following steps may be further included:
[0118] If the fault type to be detected is an "equal" type fault, the difference is compared with the second preset value, and the detection time corresponding to the current working state is updated according to the comparison result and recorded as the time to be detected.
[0119] In this embodiment, since when performing fault detection for "etc." type faults, it is necessary to determine whether the operating data to be detected is equal to the corresponding preset detection threshold value regardless of whether the current working state is a fault state or a working state, it is impossible to unify the detection process with the "over" type fault and "under" type fault. Therefore, it is possible to first determine whether the fault type to be detected is an "etc." type fault based on the fault type flag value, so as to detect the "etc." type fault through another processing branch of the judgment result.
[0120] For "equal" type faults, no matter whether the fault is recovered in the fault state or whether the fault occurs in the normal state, only an equal judgment is performed, that is, it is only necessary to compare whether the difference between the operating data to be detected and the corresponding preset detection threshold is 0. Therefore, the second preset value can be 0.
[0121] As another embodiment of the present invention, comparing the difference value with a second preset value, and updating the detection time corresponding to the current working state according to the comparison result may specifically include:
[0122] The difference is compared with a second preset value.
[0123] If the difference is equal to the second preset value, the time in the address corresponding to the current working state flag value in the preset time buffer is accumulated.
[0124] If the difference is not equal to the second preset value, the time in the address corresponding to the current working state flag value in the preset time buffer is updated to a fifth initial value.
[0125] In this embodiment, the method for accumulating the time within the address corresponding to the current working status flag value in the preset time buffer is similar to the method for accumulating fault recovery time or the method for accumulating fault occurrence time described above, and can be selected based on actual circumstances. Similarly, the fifth initial value can be 0 or the preset fault occurrence time or preset fault recovery time corresponding to an "equal" type fault, specifically determined based on the method for accumulating the time within the address corresponding to the current working status flag value in the preset time buffer.
[0126] As another embodiment of the present invention, the specific implementation process of the above step 106 may include:
[0127] Determine whether the detection time reaches the preset detection time corresponding to the current working state.
[0128] If the detection time reaches the preset detection time corresponding to the current working state, the first working state reversal mark value is output to indicate that the current working state is reversed from the normal state to the abnormal state, or the current working state is reversed from the abnormal state to the normal state.
[0129] If the detection time does not reach the preset detection time corresponding to the current working state, the second working state flip flag value is output to indicate that the current working state remains unchanged.
[0130] In this embodiment, it is determined whether the detection time reaches the preset detection time corresponding to the current working state, that is, whether the time of fault occurrence reaches the corresponding preset fault occurrence time, or whether the time of fault recovery reaches the corresponding preset fault recovery time. When the detection time reaches the preset detection time corresponding to the current working state, it indicates that the current working state should be flipped.
[0131] like Figure 2 As shown, the first working state flip mark value can be 1, and the second working state flip mark value can be 0. This embodiment does not limit the specific numerical values of the first working state flip mark value and the second working state flip mark value. As long as the first working state flip mark value can indicate that the current working state is flipped, the second working state flip mark value can indicate that the current working state remains unchanged.
[0132] The embodiment of the present invention associates the current working status flag value with the preset threshold buffer area of the corresponding fault type to be detected and the address of the detection threshold and detection time stored in the preset time buffer area. At the same time, when the fault type to be detected is not an "etc." type fault, the detection difference is calculated by the fault type flag value and the difference, so that no matter what type of fault detection, unified processing can be achieved. There is no need to distinguish between "over", "under" and "etc." fault types, no need to distinguish which detection threshold and which detection time to use, and no need to make modifications according to different fault types. All types of faults are processed in a unified mode, the operation is simple, the amount of code is greatly reduced, the memory usage is reduced, and the problem of users writing too much code and operating errors is reduced.
[0133] 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.
[0134] 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.
[0135] Figure 3 A schematic diagram of the structure of a unified detection device for different types of faults 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 detailed as follows:
[0136] like Figure 3 As shown, the unified detection device for different types of faults includes: an acquisition module 31 , a first calculation module 32 , a judgment module 33 , a second calculation module 34 , a first processing module 35 and a second processing module 36 .
[0137] An acquisition module 31 is configured to acquire the operating data to be detected, the fault type flag value, and the current working state of the power module;
[0138] A first calculation module 32 is used to determine a preset detection threshold corresponding to the current working state and calculate the difference between the operating data to be detected and the preset detection threshold;
[0139] The judging module 33 is used to judge whether the fault type to be detected is an "etc." type fault according to the fault type flag value;
[0140] A second calculation module 34 is configured to calculate a detection difference value for detecting fault occurrence or recovery based on the fault type flag value and the difference value if the fault type to be detected is not an "equal" type fault; wherein the fault type flag values of an "over" type fault and an "under" type fault are non-zero and have opposite signs;
[0141] A first processing module 35 is configured to compare the detection difference with a first preset value, update the detection time corresponding to each working state according to the comparison result, and record the updated detection time corresponding to the current working state as the waiting detection time;
[0142] The second processing module 36 is used to determine the working state reversal mark value according to the detection time and the preset detection time corresponding to the current working state, so as to determine whether the working state corresponding to the current power module is normal state or fault state according to the working state reversal mark value.
[0143] The embodiment of the present invention first obtains the operating data to be detected, the fault type flag value and the current working state of the power module, then determines the preset detection threshold corresponding to the current working state, and calculates the difference between the operating data to be detected and the preset detection threshold, and then determines whether the fault type to be detected is an "etc." type fault according to the fault type flag value. When the fault type to be detected is not an "etc." type fault, a detection difference for detecting the occurrence or recovery of the fault is calculated according to the fault type flag value and the difference, and compares the detection difference with the first preset value. The detection time corresponding to each working state is updated according to the comparison result, and the detection time corresponding to the updated current working state is recorded as the time to be detected. The working state reversal mark value is determined according to the time to be detected and the preset detection time corresponding to the current working state, so as to determine whether the working state corresponding to the current power module is a normal state or a fault state according to the working state reversal mark value. This embodiment can unify the detection process of "over" type faults and "under" type faults based on the fault type flag value and the current working status, and solve the problem of inconsistent code writing in the detection process of different types of faults, which requires different writing according to different types. It can be applied to the fault protection mechanism of any power module in different car factories, charging stations, military power supplies and electric power supplies, to achieve unified detection of different types of faults, simple code and unified detection mechanism, which is conducive to reducing code modification, simplifying the code amount and writing process, and at the same time solving the problem of increased error rate caused by redundant and complex writing processes.
[0144] In a possible implementation, the second calculation module 34 may be configured to calculate the product of the fault type flag value and the difference value to obtain a detection difference value for detecting the occurrence or recovery of a fault.
[0145] In a possible implementation, the detection time corresponding to the normal state is the fault occurrence time, and the detection time corresponding to the fault state is the fault recovery time; the first processing module 35 may be configured to compare the detection difference with a first preset value when the fault type flag value of the "over" type fault is positive and the fault type flag value of the "under" type fault is negative;
[0146] If the detection difference is greater than or equal to the first preset value, the fault occurrence time is accumulated and the fault recovery time is updated to a first initial value;
[0147] If the detection difference is less than the first preset value, the fault recovery time is accumulated and the fault occurrence time is updated to a second initial value.
[0148] In a possible implementation, the detection time corresponding to the normal state is the fault occurrence time, and the detection time corresponding to the fault state is the fault recovery time; the first processing module 35 may be configured to compare the detection difference with a first preset value when the fault type flag value of an "over" type fault is a negative value and the fault type flag value of an "under" type fault is a positive value;
[0149] If the detection difference is less than or equal to the first preset value, accumulating the fault occurrence time and updating the fault recovery time to a third initial value;
[0150] If the detection difference is greater than the first preset value, the fault recovery time is accumulated and the fault occurrence time is updated to a fourth initial value.
[0151] In one possible implementation, after determining whether the fault type to be detected is an "etc." type fault based on the fault type flag value, the first processing module 35 can also be used to compare the difference with the second preset value if the fault type to be detected is an "etc." type fault, and update the detection time corresponding to the current working state according to the comparison result, and record it as the time to be detected.
[0152] In one possible implementation, the acquisition module 31 can be used to obtain the current working status flag value corresponding to the current working status of the power supply module; the first calculation module 32 can be used to obtain the preset threshold value in the address corresponding to the current working status flag value in the preset threshold value cache area as the preset detection threshold value.
[0153] In a possible implementation, the first processing module 35 may be configured to compare the difference with a second preset value;
[0154] If the difference is equal to the second preset value, the time in the address corresponding to the current working state flag value in the preset time buffer is accumulated;
[0155] If the difference is not equal to the second preset value, the time in the address corresponding to the current working state flag value in the preset time buffer is updated to a fifth initial value.
[0156] In a possible implementation, the second processing module 36 may be configured to determine whether the detection time reaches a preset detection time corresponding to the current working state;
[0157] If the detection time reaches the preset detection time corresponding to the current working state, a first working state reversal flag value is output to indicate that the current working state is reversed from the normal state to the abnormal state, or reversed from the abnormal state to the normal state;
[0158] If the detection time does not reach the preset detection time corresponding to the current working state, a second working state flip flag value is output to indicate that the current working state remains unchanged.
[0159] Figure 4 Schematic diagram of the control device provided by the embodiment of the present invention. Figure 4 As shown, the control device 4 of this embodiment includes: a processor 40, a memory 41, and a computer program 42 stored in the memory 41 and executable on the processor 40. When the processor 40 executes the computer program 42, the steps in the above-mentioned unified detection method for different types of faults are implemented, for example Figure 1 Alternatively, when the processor 40 executes the computer program 42, the functions of the modules / units in the above-mentioned device embodiments are realized, for example Figure 3 Functions of the modules / units 31 to 36 are shown.
[0160] For example, the computer program 42 may be divided into one or more modules / units, one or more modules / units being stored in the memory 41 and executed by the processor 40 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 42 in the control device 4. For example, the computer program 42 may be divided into Figure 3 Modules / units 31 to 36 are shown.
[0161] The control device 4 may include, but is not limited to, a processor 40 and a memory 41. Those skilled in the art will appreciate that Figure 4 It is only an example of the control device 4 and does not constitute a limitation on the control device 4. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal may also include input and output devices, network access devices, buses, etc.
[0162] The processor 40 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.
[0163] The memory 41 can be an internal storage unit of the control device 4, such as the hard disk or memory of the control device 4. The memory 41 can also be an external storage device of the control device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. equipped on the control device 4. Furthermore, the memory 41 can include both the internal storage unit of the control device 4 and an external storage device. The memory 41 is used to store computer programs and other programs and data required by the terminal. The memory 41 can also be used to temporarily store data that has been output or is about to be output.
[0164] 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.
[0165] 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.
[0166] 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.
[0167] In the embodiments provided herein, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are merely illustrative. For example, the division of modules or units is merely a logical functional division. In actual implementation, other division methods may be used, such as multiple units or components being combined or integrated into another system, or some features being ignored or not implemented. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interface, or the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0168] 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.
[0169] 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.
[0170] If the integrated module / unit 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 present invention can implement all or part of the process steps in the above-mentioned embodiment method by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program can implement the steps of the above-mentioned unified detection method for different types of faults. The computer program includes computer program code, which can be in source code form, object code form, executable file, or some intermediate form. Computer-readable media can include: any entity or device capable of carrying computer program code, recording medium, USB flash drive, mobile hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased based on the requirements of legislation and patent practice in a jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media does not include electric carrier signals and telecommunication signals.
[0171] 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 unified detection method for different types of faults, characterized in that: include: Obtain the power module's operating data to be tested, fault type flag value, and current working status; Determine a preset detection threshold corresponding to the current working state, and calculate the difference between the operating data to be detected and the preset detection threshold; Determine whether the fault type to be detected is an "etc." type fault according to the fault type flag value; If the fault type to be detected is not an "equal" type fault, a detection difference value for detecting fault occurrence or recovery is calculated based on the fault type flag value and the difference value; wherein the fault type flag values of an "over" type fault and an "under" type fault are non-zero and have opposite signs; Comparing the detection difference with a first preset value, updating the detection time corresponding to each working state according to the comparison result, and recording the updated detection time corresponding to the current working state as the waiting detection time; Determine a working state reversal flag value according to the to-be-detected time and the preset detection time corresponding to the current working state, so as to determine whether the working state corresponding to the current power module is a normal state or a fault state according to the working state reversal flag value; The step of calculating a detection difference value for detecting fault occurrence or recovery based on the fault type flag value and the difference value includes: The product of the fault type flag value and the difference value is calculated to obtain a detection difference value for detecting the occurrence or recovery of a fault.
2. The unified detection method for different types of faults according to claim 1, characterized in that: The detection time corresponding to the normal state is the fault occurrence time, and the detection time corresponding to the fault state is the fault recovery time; The comparing the detection difference with the first preset value and updating the detection time corresponding to each working state according to the comparison result includes: When the fault type flag value of the "over" type fault is a positive value and the fault type flag value of the "under" type fault is a negative value, the detection difference is compared with the first preset value; If the detection difference is greater than or equal to the first preset value, the fault occurrence time is accumulated and the fault recovery time is updated to a first initial value; If the detection difference is less than the first preset value, the fault recovery time is accumulated and the fault occurrence time is updated to a second initial value.
3. The unified detection method for different types of faults according to claim 1, characterized in that: The detection time corresponding to the normal state is the fault occurrence time, and the detection time corresponding to the fault state is the fault recovery time; The comparing the detection difference with the first preset value and updating the detection time corresponding to each working state according to the comparison result includes: When the fault type flag value of the "over" type fault is a negative value and the fault type flag value of the "under" type fault is a positive value, the detection difference is compared with the first preset value; If the detection difference is less than or equal to the first preset value, accumulating the fault occurrence time and updating the fault recovery time to a third initial value; If the detection difference is greater than the first preset value, the fault recovery time is accumulated and the fault occurrence time is updated to a fourth initial value.
4. The unified detection method for different types of faults according to any one of claims 1 to 3, characterized in that: After determining whether the fault type to be detected is an "etc." type fault according to the fault type flag value, the method further includes: If the fault type to be detected is an "etc." type fault, the difference is compared with the second preset value, and the detection time corresponding to the current working state is updated according to the comparison result and recorded as the time to be detected.
5. The unified detection method for different types of faults according to claim 4, characterized in that: Get the current working status of the power module, including: Obtain the current working status flag value corresponding to the current working status of the power module; Determining the preset detection threshold corresponding to the current working state includes: The preset threshold value in the address corresponding to the current working state flag value in the preset threshold value buffer area is obtained as the preset detection threshold value.
6. The unified detection method for different types of faults according to claim 5, characterized in that: The comparing the difference with a second preset value and updating the detection time corresponding to the current working state according to the comparison result includes: comparing the difference with a second preset value; If the difference is equal to the second preset value, the time in the address corresponding to the current working state flag value in the preset time buffer is accumulated; If the difference is not equal to the second preset value, the time in the address corresponding to the current working state flag value in the preset time buffer is updated to a fifth initial value.
7. The unified detection method for different types of faults according to claim 1, characterized in that: The determining of the working state reversal flag value according to the to-be-detected time and the preset detection time corresponding to the current working state includes: Determine whether the detection time reaches the preset detection time corresponding to the current working state; If the detection time reaches the preset detection time corresponding to the current working state, a first working state reversal flag value is output to indicate that the current working state is reversed from the normal state to the fault state, or the current working state is reversed from the fault state to the normal state; If the detection time does not reach the preset detection time corresponding to the current working state, a second working state flip flag value is output to indicate that the current working state remains unchanged.
8. A power module, characterized in that: The invention comprises a control device, wherein the control device 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 7.
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 7 are implemented.
Citation Information
Patent Citations
Method and device for testing fault protection function, equipment and storage medium
CN108427044A
Control system fault monitoring method and device
CN111381583A