Short circuit protection method and system based on FPGA self-learning
Through the self-learning short-circuit protection method based on FPGA, the current and voltage waveform diagrams are collected and compared in real time, and the problem of misjudgment of traditional microcontrollers when load abnormalities is solved, improving the safety and timeliness of the system.
Patent Information
- Application Number
- CN202411773750.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-03-21
AI Technical Summary
Traditional microcontrollers cannot collect load voltage and current at the same time when load abnormalities are not available, resulting in high misjudgment and reducing the safety and timeliness of the system.
The self-learning short-circuit protection method based on FPGA is adopted to collect the output current and voltage waveform diagrams in real time and compare them with the pre-stored waveform diagrams to determine whether there is a short circuit phenomenon, and drive the switching device to quickly disconnect the device.
It improves the ability to respond quickly and judge and handle after interruption, reduces the chance of misjudgment, and improves the security and timeliness of the system.
Smart Images

Figure CN119674858A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of short circuit protection, and in particular to a short circuit protection method and system based on FPGA self-learning. Background Art
[0002] In traditional MCUs, whether it is the von Neumann architecture or the Harvard architecture, it first takes address and then executes. The execution process is essentially sequential execution. When there is a special situation, it is interrupted, but after the interrupt is executed, the subsequent service program is still executed sequentially. This execution method cannot collect the load voltage and current at the same time for judgment and processing when the load is abnormal, and the misjudgment is high, thus reducing the safety and timeliness of the system. Summary of the invention
[0003] The purpose of the present invention is to overcome the deficiencies in the prior art and provide a short-circuit protection method and system based on FPGA self-learning, which can improve rapid response and continue judgment and processing after interruption, reduce the probability of misjudgment, and improve the safety and timeliness of the system.
[0004] The objective of the present invention is achieved through the following technical solutions: The present invention provides a short-circuit protection method based on FPGA self-learning, comprising the following steps: The system starts, reads the FLASH storage waveform, and closes the switch device; Collecting an output current waveform and an output voltage waveform, and comparing the output current waveform and the output voltage waveform with a pre-stored current waveform and a pre-stored voltage waveform respectively; If the output current waveform is different from the pre-stored current waveform and the output voltage waveform is different from the pre-stored voltage waveform, it is determined to be a short circuit and the switch device is driven to quickly disconnect the device.
[0005] In one of the embodiments, it also includes: running the circuit system in a simulator to save a number of current waveform diagrams and voltage waveform diagrams of normal operation in the circuit.
[0006] In one embodiment, the step of saving the current waveform diagram and the voltage waveform diagram of the normal operation of the circuit specifically includes: A current waveform database and a voltage waveform database are established in FLASH, and normal current waveform diagrams and voltage waveform diagrams are saved in the current waveform database and the voltage waveform database respectively, and named as pre-stored current waveform diagram and pre-stored voltage waveform diagram.
[0007] In one embodiment, the switching device includes an IGBT switch, a MOSFET switch, or a SIC switch.
[0008] In one embodiment, after the step of driving the switch device to quickly disconnect the device, the method further comprises: The short-circuit current waveform or voltage waveform is judged, and if it is determined to be a short-circuit waveform, it is not saved; otherwise, the current waveform or voltage waveform is saved respectively.
[0009] In one embodiment, the step of determining the short-circuit current waveform or voltage waveform is specifically as follows: The system is manually restarted to determine whether the current or voltage exceeds the preset value. If so, it is determined to be a short circuit, and the corresponding current or voltage waveform is the short-circuit current waveform diagram and the short-circuit voltage waveform diagram.
[0010] In one embodiment, after the step of driving the switch device to quickly disconnect the device, the method further comprises: The short-circuit current waveform or voltage waveform is judged, and if it is determined to be a short-circuit waveform, it is saved in the short-circuit waveform database; otherwise, the current waveform or voltage waveform is saved in FLASH respectively.
[0011] In one embodiment, the steps are also included: A short-circuit waveform database is established in FLASH, and the short-circuit current waveform diagram and voltage waveform diagram are saved in the short-circuit waveform database.
[0012] In one embodiment, the short-circuit waveform database includes a short-circuit current waveform database and a short-circuit voltage waveform database.
[0013] The present invention also provides a short circuit protection system, comprising the method as described above.
[0014] The advantages and beneficial effects of the present invention compared to the prior art are as follows: The present invention is a short-circuit protection method and system based on FPGA self-learning. Since FPGA is based on gate-level logic devices and triggers, it can complete the edge triggering of the clock, thereby realizing concurrent processing in the true sense. Through the parallel processing capability of FPGA, all collected data are compared with the data in FLSAH at the same time to determine whether the back-end load has a short-circuit phenomenon. If the load has a short-circuit, the switch tube is directly driven to turn off quickly; if the back-end load is a capacitive or inductive load, resulting in a false alarm of a short circuit due to excessive starting current, the voltage and current waveform data of this time are saved through the high-speed processing capability of FPGA. If the same load is started next time, it will be output normally. The more various loads are recorded with the same principle, the lower the misjudgment rate of load short circuit is through continuous learning of FPGA. The short-circuit protection method and system based on FPGA self-learning of the present invention improves rapid response and can continue to judge and process after interruption, reduces the probability of misjudgment, and improves the safety and timeliness of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a flow chart of a short-circuit protection method based on FPGA self-learning according to an embodiment of the present invention; Figure 2 A current and voltage waveform diagram of one embodiment of the present invention; Figure 3 A current and voltage waveform diagram of another embodiment of the present invention; Figure 4 A current and voltage waveform diagram of another embodiment of the present invention; Figure 5 A current and voltage waveform diagram of another embodiment of the present invention; Figure 6 This is a current and voltage waveform diagram of yet another embodiment of the present invention. DETAILED DESCRIPTION
[0016] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. The preferred embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thoroughly understood.
[0017] See also Figure 1 The present invention provides a short-circuit protection method based on FPGA self-learning, comprising the following steps: S100, the system starts, reads the FLASH storage waveform, and closes the switch device.
[0018] It can be understood that when the system starts, the FPGA (field programmable gate array) as the core processor first communicates with the FLASH memory through its built-in SPI (serial peripheral interface) or similar communication protocols.
[0019] The firmware running inside the FPGA is responsible for reading the current and voltage waveforms stored in the FLASH under normal working conditions. These waveforms are obtained through previous testing or learning phases and represent the electrical characteristics of the device under normal load. After reading the waveform data, the FPGA will control the switching devices such as relays or MOSFETs to close, so that the circuit enters the working state and prepares for the next step of monitoring.
[0020] This step provides reference data for subsequent waveform comparison, ensuring the accuracy of short-circuit detection. Closing the switch device is the prerequisite for the normal operation of the device and the starting point for the short-circuit protection mechanism to start monitoring.
[0021] Suppose we have a motor control system. At startup, the FPGA will read the current and voltage waveforms of the motor during normal startup and operation from the FLASH, and then close the switch connected to the motor to start the motor.
[0022] S200, collecting an output current waveform and an output voltage waveform, and comparing them with pre-stored waveforms.
[0023] It can be understood that FPGA collects output current and voltage signals in real time through the ADC (Analog-to-Digital Converter) module. The internal algorithm of FPGA digitizes the collected analog signals and generates real-time current waveforms and voltage waveforms.
[0024] By utilizing the high-speed processing capability of the FPGA, the waveform image collected in real time is compared point by point or feature point by feature point with the pre-stored waveform image read in step S100.
[0025] Real-time waveform acquisition and comparison can timely detect abnormal changes in circuit status, providing a direct basis for short-circuit judgment. By comparing with pre-stored waveforms, normal load changes and short-circuit faults can be distinguished, improving the accuracy and sensitivity of protection.
[0026] During motor operation, if the load suddenly increases, the current and voltage waveforms may change, but this change is usually similar to the pre-stored waveform and will not trigger the short-circuit protection. However, if a short circuit occurs, the current will increase sharply and the voltage may drop, resulting in a waveform that is significantly different from the pre-stored waveform.
[0027] S300: If the output current waveform is different from the pre-stored current waveform and the output voltage waveform is different from the pre-stored voltage waveform, it is determined to be a short circuit, and the switch device is driven to quickly disconnect the device.
[0028] It can be understood that: based on the comparison result of step S200, if the logic judgment unit inside the FPGA detects that both the current waveform and the voltage waveform are significantly different from the pre-stored waveforms, it is determined to be a short circuit event.
[0029] Once a short circuit is confirmed, the FPGA will immediately send a disconnect signal to the switching device through GPIO (general purpose input output) or other control interface.
[0030] Switching devices (such as IGBT switches, MOSFET switches, SIC switches, and relays) respond quickly to cut off the circuit and prevent the short-circuit current from continuing to damage the equipment.
[0031] The quick response of short-circuit protection can minimize the damage to equipment and systems caused by short-circuit events. The accuracy and reliability of protection are ensured through precise waveform comparison and logical judgment.
[0032] In a motor control system, if a short circuit occurs in the motor line, the FPGA will quickly detect the abnormal increase in current and drop in voltage, and then immediately disconnect the motor power supply to prevent the short-circuit current from burning the motor or related circuit components.
[0033] Through the detailed description of the above steps, it can be seen that this short-circuit protection method based on FPGA self-learning provides an efficient and reliable short-circuit protection mechanism for electrical equipment through real-time waveform acquisition and comparison, precise logic judgment and fast protection action.
[0034] In one embodiment, it also includes: running the circuit system in a simulator, and saving a plurality of current waveform diagrams and voltage waveform diagrams of normal operation in the circuit.
[0035] It should be noted that a simulator (such as circuit simulation software or hardware-in-the-loop simulation system) is used to simulate the operation of the circuit system. The simulator software is responsible for running the circuit model and outputting current and voltage data in real time.
[0036] In the simulator, by adjusting parameters such as load and input voltage, the normal operation of the circuit under different working conditions is simulated, and the current waveform and voltage waveform under these working conditions are recorded and saved. This provides abundant normal waveform data for FPGA self-learning and improves the accuracy and generalization ability of short-circuit detection. Through simulator testing, the effectiveness of the short-circuit protection method can be verified without damaging the actual hardware.
[0037] In the power management system, a simulator is used to simulate the current and voltage changes of the circuit under different load conditions, and these normal waveforms are saved for subsequent FPGA self-learning and short-circuit detection.
[0038] In one embodiment, the step of saving the current waveform diagram and the voltage waveform diagram of the normal operation of the circuit specifically includes: A current waveform database and a voltage waveform database are established in FLASH, and normal current waveform diagrams and voltage waveform diagrams are saved in the current waveform database and the voltage waveform database respectively, and named as pre-stored current waveform diagram and pre-stored voltage waveform diagram.
[0039] It should be noted that FPGA communicates with FLASH memory through its built-in SPI interface. The internal firmware of FPGA is responsible for creating the current waveform database and voltage waveform database in FLASH. The normal current waveform diagram and voltage waveform diagram saved in the simulator are saved to the current waveform database and voltage waveform database in FLASH respectively, and named as the pre-stored current waveform diagram and the pre-stored voltage waveform diagram.
[0040] Provide FPGA with a quick way to access normal waveform data, improving the real-time performance of short-circuit detection. Manage waveform data through a database to facilitate subsequent data analysis and troubleshooting.
[0041] In this embodiment, the switch device includes an IGBT switch, a MOSFET switch, and a SIC switch. These switch devices have the characteristics of fast response and low loss, and are suitable for short-circuit protection scenarios. Different switch devices are suitable for different circuit systems and application scenarios. Selecting a suitable switch device can improve the efficiency and reliability of short-circuit protection.
[0042] It should be noted that after the step of driving the switching device to quickly disconnect the device, it also includes: judging the short-circuit current waveform or voltage waveform. If it is determined to be a short-circuit waveform, it will not be saved; otherwise, the current waveform or voltage waveform will be saved respectively.
[0043] It should also be noted that the step of judging the short-circuit current waveform or voltage waveform is specifically: manually restarting the system to determine whether the current or voltage exceeds the preset value. If it exceeds, it is determined to be a short circuit, and the corresponding current or voltage waveform is the short-circuit current waveform and the short-circuit voltage waveform.
[0044] After driving the switch device to quickly disconnect the device, the FPGA will capture and record the current waveform and voltage waveform when the short circuit occurs. Through manual judgment or preset rules, if these waveforms are determined to be short-circuit waveforms, they will not be saved; otherwise, they will be saved to the current waveform database or voltage waveform database in FLASH respectively. In this way, the short-circuit waveform data can be prevented from contaminating the normal waveform database, improving the accuracy of subsequent short-circuit detection.
[0045] In another embodiment, a short-circuit waveform database (including a short-circuit current waveform database and a short-circuit voltage waveform database) is established in FLASH. After the driving switch device is disconnected, the FPGA will judge and record the short-circuit waveform, and then save it to the short-circuit waveform database. If manual confirmation is required, the system can be restarted and the current or voltage can be observed to determine whether a short circuit occurs. If it exceeds, it is determined to be a short-circuit waveform. In this way, the short-circuit waveform database provides valuable data resources for fault analysis and circuit optimization. The accuracy and integrity of the short-circuit waveform data can be ensured through manual judgment or preset rules.
[0046] In a power transmission system, when a short circuit is detected, the FPGA will quickly record the short circuit waveform and save it to the short circuit waveform database. Later, engineers can analyze these waveform data to find out the cause of the short circuit and optimize the circuit design or protection measures.
[0047] Through the detailed description of the above additional embodiments, it can be seen that this short-circuit protection method based on FPGA self-learning not only has efficient short-circuit detection capability, but also further improves its accuracy and reliability through simulator testing, waveform database management, switch device selection, and short-circuit waveform judgment and storage. These steps work together to form a complete and efficient short-circuit protection system.
[0048] Furthermore, after the step of driving the switch device to quickly disconnect the device, the method further comprises: The short-circuit current waveform or voltage waveform is judged, and if it is determined to be a short-circuit waveform, it is saved in the short-circuit waveform database; otherwise, the current waveform or voltage waveform is saved in FLASH respectively.
[0049] It should be noted that, as the core processor, FPGA collects current and voltage signals through its built-in ADC module and communicates with the FLASH memory through the SPI interface.
[0050] The firmware running inside the FPGA is responsible for processing the collected signals, generating current and voltage waveforms, and performing short-circuit judgment.
[0051] Specifically: After the switch device is driven to quickly disconnect the device, the FPGA will immediately capture and record the current and voltage waveforms at the moment the short circuit occurs. The FPGA internal algorithm will analyze these waveforms to determine whether they are short-circuit waveforms. The judgment may include the degree of match between the characteristic points, slope, peak value and other parameters of the waveform and the preset short-circuit characteristics.
[0052] If it is judged to be a short-circuit waveform, the FPGA will save the waveform diagram to the pre-established short-circuit waveform database in FLASH through the SPI interface; if it is judged to be a non-short-circuit waveform (which may be normal operation or other abnormal conditions), it will be saved in the current waveform database or voltage waveform database in FLASH respectively.
[0053] By establishing a short-circuit waveform database, data resources of short-circuit events can be accumulated to provide strong support for subsequent fault analysis, circuit optimization and improvement of short-circuit protection algorithms. Distinguishing short-circuit waveforms from non-short-circuit waveforms can avoid misjudging normal waveforms as short-circuit waveforms, thereby improving the accuracy and reliability of short-circuit protection.
[0054] In a motor drive system, when a short circuit occurs in the motor line, the FPGA will quickly detect the short circuit and disconnect the switch device. At the same time, the FPGA will capture and record the short circuit waveform and save it to the short circuit waveform database. Later, engineers can analyze these waveforms to find out the cause of the short circuit and optimize the design or protection measures of the motor drive circuit.
[0055] In addition, the method also includes the steps of: establishing a short-circuit waveform database in FLASH, and saving the short-circuit current waveform diagram and voltage waveform diagram into the short-circuit waveform database.
[0056] The short-circuit waveform database includes a short-circuit current waveform database and a short-circuit voltage waveform database.
[0057] When the FPGA firmware is initialized, it will check whether the short-circuit waveform database already exists in the FLASH. If not, a new short-circuit current waveform database and short-circuit voltage waveform database will be created. When a short-circuit event occurs and the FPGA captures the short-circuit waveform, the FPGA will save the waveform to the corresponding short-circuit waveform database based on the judgment result.
[0058] In this way, the establishment of the short-circuit waveform database provides a convenient data access method for subsequent short-circuit event analysis. By classifying and storing short-circuit waveforms, these valuable fault data resources can be managed and utilized more effectively.
[0059] The two embodiments work together to form a complete short-circuit waveform processing flow. After detecting a short-circuit event, the FPGA will immediately capture and record the short-circuit waveform, and save it to the corresponding database based on the judgment result. In this way, the timeliness of short-circuit protection is guaranteed, and valuable short-circuit event data resources are accumulated, providing strong support for subsequent analysis and optimization.
[0060] Through the detailed description of the above specific embodiments, we can see that this short-circuit protection method based on FPGA self-learning not only has efficient short-circuit detection capability, but also further improves its fault analysis and circuit optimization capabilities through the steps of judging and saving the short-circuit waveform diagram and establishing the short-circuit waveform database. These steps work together to form a complete and efficient short-circuit protection system.
[0061] The present invention is a short-circuit protection method based on FPGA self-learning designed to solve this problem.
[0062] The present invention adopts a high-speed ADC sampling chip, FPGA, a high-speed switch device, and a memory, and utilizes the high-speed ADC acquisition chip to collect the voltage and current of the load end into the chip.
[0063] Since FPGAs are based on gate-level logic devices and triggers, they can complete edge triggering of the clock, thereby achieving true concurrent processing. Through the parallel processing capability of FPGA, all data collected by ADC chips U29 and U16 are compared with the data in FLSAH in U31 to determine whether the back-end load has a short circuit. If the load has a short circuit, the switch tube (Sic, MOSFET, IGBT, etc.) is directly driven to shut down quickly; if the back-end load is capacitive or inductive, resulting in a false alarm of a short circuit due to excessive startup current, the voltage and current waveform data of this time are saved through the high-speed processing capability of FPGA. If the same load is started next time, it will output normally. The more various loads are recorded based on the same principle, the lower the misjudgment rate of load short circuit will be through continuous learning of FPGA.
[0064] See also Figure 2~Figure 6 In the judgment of the method of the present invention, a slope threshold K is preset, and the collected current or voltage slope is compared and judged with the preset slope threshold K to determine whether a short circuit occurs. Specifically, Figure 2 The normal current slope K1 is lower than the current slope threshold K. If the current slope K2 is higher than the current slope threshold K, compare the database graph, change the current from point A to point B and the voltage from point C to point D at time T1, and compare them with the waveforms in the database. If there are the same waveforms, it means that the circuit is a normal start-up load. Otherwise, Figure 3 shown.
[0065] exist Figure 4If the database does not have the same waveform, the switch tube is repeatedly turned on and off for multiple samplings to see if the voltage is always below 50V. If not, it indicates that this high current is a normal high current startup. The FPGA automatically records the voltage and current waveforms within a cycle into the database. Restart again; because the waveform has been recorded, the waveform will be successfully matched when compared again, and it can start normally.
[0066] exist Figure 5 If the database does not have the same waveform, the switch tube is repeatedly turned on and off for multiple samplings to see if the voltage is always below 50V. If not, and the current gradually decreases, it indicates that the large current is a capacitive load startup. The FPGA automatically records the current and voltage waveforms within a cycle into the database. Restart again; since the waveform has been recorded, it will successfully match the waveform when compared again, and it can start normally. Otherwise, Figure 5 Shown exist Figure 6 If the switch is repeatedly switched on and off N times (the number of N times can be determined by a large amount of experimental data) and the current of the switch tube continues to rise, and the voltage remains below 50V, then it is determined that this large current is a short circuit.
[0067] The above-mentioned embodiments only express several embodiments of the present invention, and the description is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be based on the attached claims.
Claims
1. A short-circuit protection method based on FPGA self-learning, characterized in that: The steps include: The system starts, reads the FLASH storage waveform, and closes the switch device; Collecting an output current waveform and an output voltage waveform, and comparing the output current waveform and the output voltage waveform with a pre-stored current waveform and a pre-stored voltage waveform respectively; If the output current waveform is different from the pre-stored current waveform and the output voltage waveform is different from the pre-stored voltage waveform, it is determined to be a short circuit and the switch device is driven to quickly disconnect the device.
2. The short-circuit protection method based on FPGA self-learning according to claim 1, characterized in that: Also includes: Run the circuit system in the simulator and save several current waveforms and voltage waveforms of normal operation in the circuit.
3. The short-circuit protection method based on FPGA self-learning according to claim 2 is characterized in that: The step of saving the current waveform diagram and the voltage waveform diagram of the normal operation of the circuit specifically includes: A current waveform database and a voltage waveform database are established in FLASH, and normal current waveform diagrams and voltage waveform diagrams are saved in the current waveform database and the voltage waveform database respectively, and named as pre-stored current waveform diagram and pre-stored voltage waveform diagram.
4. The short-circuit protection method based on FPGA self-learning according to claim 1, characterized in that: The switch devices include IGBT switches, MOSFET switches and SIC switches.
5. The short-circuit protection method based on FPGA self-learning according to claim 1, characterized in that: After the step of driving the switch device to quickly disconnect the device, the method further includes: The short-circuit current waveform or voltage waveform is judged, and if it is determined to be a short-circuit waveform, it is not saved; otherwise, the current waveform or voltage waveform is saved respectively.
6. The short-circuit protection method based on FPGA self-learning according to claim 5, characterized in that: The step of judging the short-circuit current waveform or voltage waveform is specifically as follows: The system is manually restarted to determine whether the current or voltage exceeds the preset value. If so, it is determined to be a short circuit, and the corresponding current or voltage waveform is the short-circuit current waveform diagram and the short-circuit voltage waveform diagram.
7. The short-circuit protection method based on FPGA self-learning according to claim 1, characterized in that: After the step of driving the switch device to quickly disconnect the device, the method further includes: The short-circuit current waveform or voltage waveform is judged, and if it is determined to be a short-circuit waveform, it is saved in the short-circuit waveform database; otherwise, the current waveform or voltage waveform is saved in FLASH respectively.
8. The short-circuit protection method based on FPGA self-learning according to claim 7, characterized in that: Also includes the steps: A short-circuit waveform database is established in FLASH, and the short-circuit current waveform diagram and voltage waveform diagram are saved in the short-circuit waveform database.
9. The short-circuit protection method based on FPGA self-learning according to claim 8, characterized in that: The short-circuit waveform database includes a short-circuit current waveform database and a short-circuit voltage waveform database.
10. A short circuit protection system, characterized in that: The method comprises the method according to any one of claims 1 to 9.