A MOSFET open circuit and short circuit detection device and method for use in excitation coil control scenarios
By designing the MOSFET open circuit and short circuit detection device for generator excitation coil control system, the MCU module, MOSFET drive module and fault detection module are used to realize live detection and continuous detection, solving the problems of large workload, poor flexibility and poor real-time performance in the existing methods, and improving the reliability and safety of the system.
Patent Information
- Application Number
- CN202211077327.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-05
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2042-09-05
AI Technical Summary
The existing MOSFET fault detection methods are large in workload, poor in flexibility, and poor in real time, and cannot realize live detection and continuous detection, resulting in insufficient reliability and safety of the generator excitation coil control system.
A MOSFET open and short-circuit detection device including an MCU module, a MOSFET driver module and a fault detection module is designed. The MOSFET is turned on and off through the timer TIM2 output PWM, and the signal is collected in real time through the timer TIM1 and the GPIO pin for fault analysis and alarm.
It realizes live detection and continuous detection without affecting the normal operation of the MOSFET, which reduces the workload of on-site maintenance personnel and improves the reliability and safety of the generator excitation control system.
Smart Images

Figure CN115407175B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of generator excitation coil control, and in particular to a MOSFET open circuit and short circuit detection device and method for use in an excitation coil control scenario. Background Art
[0002] In the generator excitation control system, the microcontroller (MCU) controls the power MOSFET on and off by outputting PWM to control the current of the generator excitation coil and maintain the stability of the generator output voltage. Therefore, fast and reliable fault detection of the power MOSFET is very important to prevent the generator output from shutting down or losing control due to excessive output caused by power MOSFET damage.
[0003] At present, there are two methods for MOSFET fault detection: off-line detection and on-line detection. The traditional MOSFET detection method is off-line detection. The operation method is to use the diode position of a digital multimeter to measure the status between the pins of the MOSFET for judgment. This method requires the operator to first power off the board where the MOSFET is located, and then perform the detection. This method is only applicable to the factory inspection of the board, not to some real-time online detection scenarios, and the detection process is complicated, which increases the workload of personnel. Patent CN106199369A: A method and system for online detection of OR-ing MOSFET faults A method and system for detecting MOSFET power in an OR-ing scenario is proposed: turn off the gate drive of the OR-ing MOSFET, detect V D-S , V D-S The voltage is compared with the preset fault threshold voltage to determine whether an interrupt is generated. If an interrupt is generated, the timer is triggered to start timing. Otherwise, the MCU will issue a MOSFET failure alarm and the MOSFET driver will be turned on. After the MOSFET driver off time expires, the gate driver is turned on again, and V D-S If it is less than 100mV, the level flip triggers the MCU external interrupt, and the timer ends the timing; it is determined whether the timer count time is greater than half of the duration of the MOSFET driver shutdown. If so, the MCU reports that the MOSFET is normal, otherwise a new round of detection is performed. This method realizes the detection of MOSFET devices under the OR-ing scenario, which reduces the workload of maintenance personnel and reduces maintenance costs. However, this method relies more on the engineer's experience value to set the fault threshold voltage for comparison. Different models of MOSFET and different loads connected to the MOSFET's rear stage will result in different fault threshold voltage values, which lacks flexibility; and this method needs to stop the machine for detection to detect the MOSFET fault state, that is, suspend the normal working state of the MOSFET and use a special software program for detection. Therefore, this method can detect under power, but cannot achieve continuous detection.
[0004] In view of this, there is an urgent need for a convenient and reliable MOSFET open circuit and short circuit detection device method to overcome the shortcomings of existing MOSFET fault detection methods such as large workload, poor flexibility, and low real-time performance, so as to improve the reliability and safety of the generator excitation coil control system. Summary of the invention
[0005] The purpose of the present invention is to provide a convenient and reliable MOSFET open circuit and short circuit fault detection device and method for use in generator excitation coil control scenarios, overcoming the difficulties of inability to detect under power, large workload, poor flexibility, and inability to detect continuously, so as to improve the safety and reliability of generator excitation coil control.
[0006] The technical solution of the present invention is: a MOSFET open circuit and short circuit detection device in an excitation coil control scenario, comprising an MCU module, a MOSFET driving module and a fault detection module; the MCU module is used to make excitation decisions, output PWM with a suitable duty cycle, and perform fault analysis and alarm according to the PWM output feedback signal and the fault detection module output signal;
[0007] The MCU module includes 3 GPIO pins, 1 timer TIM2 resource pin and 1 timer TIM1 resource pin; the timer TIM2 resource pin is configured as PWM output mode, which is used to output PWM for controlling the on and off of the MOSFET driver module. The preset PWM period in this technical solution is 500Hz and the duty cycle is 30%; the timer TIM1 resource pin is configured as input capture mode, and the falling edge triggers interrupt, which is used to monitor whether the excitation signal output by the fault detection module triggers an interrupt, and perform fault analysis and alarm in the TIM1 interrupt function; the 3 GPIO pins are configured as input mode, which are used to detect the PWM output feedback signal, the excitation coil power supply status signal and the MOSFET driver chip power supply status signal in the TIM1 interrupt function respectively;
[0008] The MOSFET driver module includes an optocoupler, a MOSFET driver chip and a power MOSFET; the PWM output from the timer TIM2 resource pin of the MCU module enters the MOSFET driver chip through optocoupler isolation, and then drives the power MOSFET to turn on and off, thereby controlling the current of the subsequent excitation coil and maintaining the stability of the generator output voltage; the PWM feedback in the MOSFET driver module is output to one of the GPIO pins of the MCU module; the optocoupler in the MOSFET driver module plays an isolation role to prevent the subsequent circuit from affecting the previous circuit; the MOSFET driver chip plays a role in enhancing the driving capability, amplifying the weak PWM signal output by the MCU module to a strong PWM signal that can drive the power MOSFET;
[0009] The fault detection module includes 3 digital input circuits, 3 optocouplers and XOR gate logic circuits; the digital input circuit and optocoupler are used to detect the status of each part of the MOSFET when it is working and output them to the MCU module and logic gate circuit through the optocoupler respectively; the logic gate circuit is used for signal logic transformation and output to the MCU module for fault diagnosis; the three digital input circuits respectively collect the excitation coil power supply signal, the drive chip power supply signal, and the signal at both ends of the excitation coil in real time; the excitation coil power supply signal includes coil power supply + and coil power supply -; the drive chip power supply signal includes drive chip power supply + and drive chip power supply -; the signals at both ends of the excitation coil include LC_110V and LC_OUT; the excitation coil power supply signal and the MOSFET drive chip power supply status signal are output as LC_PWROK_110V signal and LC_PWROK_12V signal through the optocoupler respectively, and then connected to the other two GPIO pins of the MCU module; the signal at both ends of the excitation coil is output as LC_ON signal through the optocoupler, and then enters the XOR logic gate circuit at the same time as the PWM output signal to output as LC_ON_1 signal, that is
[0010]
[0011] Finally, the LC_ON_1 signal is connected to the timer TIM1 resource pin of the MCU module.
[0012] The MOSFET open circuit and short circuit detection method using the MOSFET open circuit and short circuit detection device in the excitation coil control scenario specifically includes the following steps:
[0013] S1, MCU module initialization, configure timer TIM2 to PWM output mode; configure timer TIM1 to input capture mode; configure 3 GPIO pins to input mode;
[0014] S2, the power MOSFET is in normal working state, and the MCU module outputs PWM to control the power MOSFET to turn on and off periodically through the optocoupler and MOSFET driver chip;
[0015] S3, determine whether the timer TIM1 triggers an interrupt, if there is a TIM1 interrupt, go to step S4; otherwise go to step S2;
[0016] S4, determine whether the interrupt triggered by the timer TIM1 is an input capture interrupt of the excitation coil signal connection pin. If it is determined to be yes, go to step S5, otherwise go to step S2;
[0017] S5, determining whether the level of the GPIO pin fed back by the PWM output in the MCU module is high level, if it is high level, go to step S6, otherwise go to step S8;
[0018] S6, determining whether the levels of the two GPIO pins of the MCU module corresponding to the power supply state of the excitation coil and the power supply state of the driver chip are both low, if both are low, go to step S7, otherwise go to step S9;
[0019] S7, the open circuit state of the MOSFET driver module is the start of counting. When the open circuit state of the MOSFET driver module lasts for 1 second, the MCU module issues an open circuit alarm for the MOSFET driver module and goes to step S9;
[0020] S8, the short-circuit state of the MOSFET driver module is the start of counting. When the short-circuit state of the MOSFET driver module lasts for 200mS, the MCU module issues a MOSFET short-circuit alarm and goes to step S9;
[0021] S9, clear the timer TIM1 input capture interrupt pending bit, prepare for the next interrupt, and go to step S2.
[0022] Beneficial effects of the invention: The invention provides a MOSFET open circuit and short circuit detection device and method in the excitation coil control scenario, which performs live detection and continuous detection on the MOSFET in normal working state, collects MOSFET related signals without affecting its normal operation, and analyzes in real time whether a fault occurs and the type of fault. The method has the characteristics of live detection and continuous detection, reduces the workload of on-site maintenance personnel, can quickly alarm fault conditions, and improves the reliability and safety of the generator excitation control system. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a block diagram of the composition of a MOSFET open circuit and short circuit detection device in an excitation coil control scenario according to an embodiment of the present invention;
[0024] Figure 2 is a flow chart of a MOSFET open circuit and short circuit detection method according to an embodiment of the present invention;
[0025] Figure 3 The present invention is a signal waveform diagram of the MOSFET in the working state and fault state of the embodiment of the present invention, (a) is a comparison waveform diagram of the PWM output signal, LC_ON signal and LC_ON_1 signal under the normal working state of the power MOSFET; (b) is a comparison waveform diagram of the PWM output signal, LC_ON signal and LC_ON_1 signal under the power MOSFET open circuit condition / no excitation coil power supply condition / no driver chip power supply condition; (c) is a comparison waveform diagram of the PWM output signal, LC_ON signal and LC_ON_1 signal under the power MOSFET short circuit condition. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, other embodiments obtained by ordinary technicians in this field without creative work are all within the scope of protection of the present invention.
[0027] The embodiment of the present invention provides a MOSFET open circuit and short circuit detection device in an excitation coil control scenario, such as Figure 1 The figure shows the detailed composition block diagram of the MOSFET open circuit and short circuit detection device, which includes three parts: MCU module, MOSFET drive module and fault detection module.
[0028] The resources used by the MCU module include 3 general GPIO pins, 1 timer TIM2 resource pin, and 1 timer TIM1 resource pin. The timer TIM2 resource pin is configured as PWM output mode, which is used to output PWM to control the on and off of the MOSFET driver module, with a period of 500Hz and a duty cycle of 30%. The timer TIM1 resource pin is configured as input capture mode, with a falling edge triggering interrupt, which is used to monitor whether the excitation signal output by the fault detection module triggers an interrupt, and perform fault analysis and alarm in the TIM1 interrupt function. The 3 GPIO pins are configured as input mode, which are used to detect the PWM output feedback signal, the excitation coil power supply status signal, and the MOSFET driver chip power supply status signal in the TIM1 interrupt function to assist in fault analysis.
[0029] The MOSFET driver module includes an optocoupler, a MOSFET driver chip, and a power MOSFET. The PWM output from the MCU module timer TIM2 pin enters the MOSFET driver chip through optocoupler isolation, and then drives the power MOSFET to turn on and off, thereby controlling the current of the subsequent excitation coil and maintaining the stability of the generator output voltage. The optocoupler plays an isolation role to prevent the subsequent circuit from affecting the previous circuit. The driver chip plays a role in enhancing the driving capability, amplifying the weak PWM signal output by the MCU module to a strong PWM signal that can drive the power MOSFET.
[0030] The fault detection module includes 3 digital input circuits, 3 optocouplers and 1 XOR gate logic circuit. The three digital input circuits respectively collect the power supply signals of the excitation coil in real time, which are coil power supply + and coil power supply -, the drive chip power supply signals including drive chip power supply + and drive chip power supply -, and the signals at both ends of the excitation coil including LC_110V and LC_OUT. The excitation coil power supply signal and the drive chip power supply signal are respectively output through the optocoupler as LC_PWROK_110V signal and LC_PWROK_12V signal, and then connected to the GPIO pin of the MCU module, while the signals at both ends of the excitation coil are output as LC_ON signal through the optocoupler, and then enter the XOR logic gate circuit at the same time as the PWM output signal to output as LC_ON_1 signal, that is,
[0031]
[0032] Finally, the LC_ON_1 signal is connected to the timer TIM1 pin of the MCU module.
[0033] The implementation principle of the MOSFET open circuit and short circuit detection method provided by the embodiment of the present invention is: when the power MOSFET used as a "switch" in the excitation coil control system is in a normal working state, the MCU module will not trigger an interrupt response. The normal working state of the MOSFET driver module refers to the situation where the excitation coil is powered normally, the driver chip is powered normally, and the power MOSFET is normal, and the MCU module outputs a PWM drive of a certain period and a certain duty cycle to turn the power MOSFET on and off. If the LC_ON_1 signal output by the fault detection module triggers the input capture falling edge interrupt of the MCU module timer TIM1 pin, the MCU module GPIO pin level state corresponding to the excitation coil power supply signal, the driver chip power supply signal, and the PWM output feedback signal is read in the TIM1 interrupt function, and the MOSFET fault information is analyzed and an alarm is issued.
[0034] like Figure 2 As shown, the present invention provides a flow chart of a MOSFET open circuit and short circuit detection method based on the above detection device, which specifically includes the following steps:
[0035] S1, MCU module initialization; configure 3 GPIO pins to input mode, configure timer TIM2 to PWM output mode, the preset PWM period in this technical solution is 500Hz, and the duty cycle is 30%; configure the timer TIM1 pin connected to the LC_ON_1 signal to input capture mode, falling edge trigger interrupt, and configure the sampling frequency and digital filter bandwidth of the input mode;
[0036] Among them, the LC_ON_1 signal corresponds to the CH3 channel of the MCU module timer TIM1, and the timer TIM1 is mounted on the APB2 bus of the MCU module clock tree. The maximum clock frequency of the APB2 timer is 168MHz. If the APB2 bus does not reduce the frequency, the maximum filter length of the input capture filter is calculated as:
[0037] t filter =1 / (APB2timerClocks / TIM_CKD_DIV / TIM_ICFilter)
[0038] t filter =1 / (168MHz / 4 / (32*8))≈6.096uS
[0039] APB2timerClocks is the maximum frequency of the APB2 timer clock, TIM_CKD_DIV is the division ratio of the sampling clock of the input capture filter to the timer clock; TIM_ICFilter is the sampling frequency of the input capture filter.
[0040] like Figure 3 (a) in the figure shows the comparison waveforms of the PWM output signal, LC_ON signal and LC_ON_1 signal under normal working conditions of the power MOSFET. Since the transmission path of the LC_ON signal includes an optocoupler, the rising and falling edges of its waveform will have different degrees of edge degradation relative to the PWM output signal. Therefore, the XOR logic gate output shows that there are two falling edges in one cycle of the LC_ON_1 signal and the actual maximum measured low level length is 30uS. In order to prevent the timer TIM1 from entering the input capture interrupt under normal working conditions, it is necessary to reasonably configure the timer input filter. It can be seen from the above formula that when the APB2 clock frequency is 168MHz, the maximum input filter length is 6.096uS. Therefore, it is necessary to reasonably increase the input capture filter length according to the actual waveform conditions, that is, it is necessary to reduce the frequency of the APB2 bus. In the embodiment of the present invention, the APB2 bus clock is reduced to 10.5MHz, that is, the APB2 timer clock is 21MHz, then the input filter length is 48.7uS>30uS, and it is much smaller than the PWM dead time, which meets the requirements.
[0041] like Figure 3 (b) shows the comparison waveforms of the PWM output signal, LC_ON signal, and LC_ON_1 signal when the power MOSFET is disconnected / no excitation coil power is supplied / no driver chip power is supplied. Figure 3As shown in (b), when the power MOSFET is open circuited or there is no excitation coil power supply or no driver chip power supply, the LC_ON_1 signal will have a falling edge, and the low level length is greater than the input filter length, thus triggering the MCU module timer TIM1 input capture interrupt, and fault analysis and diagnosis are performed in the interrupt function.
[0042] like Figure 3 (c) in the figure shows the comparison waveforms of the PWM output signal, LC_ON signal, and LC_ON_1 signal when the power MOSFET is short-circuited. As can be seen from the figure, when the power MOSFET is short-circuited, LC_ON_1 will have a falling edge, and the low level length is greater than the input filter length, so it will trigger the MCU module timer TIM1 input capture interrupt, and perform fault analysis and diagnosis in the interrupt function;
[0043] S2, the power MOSFET is in normal working state; in this technical solution, the MCU module outputs a PWM with a preset period of 500Hz and a duty cycle of 30% to the optocoupler through the PWM mode of the timer TIM2, and the PWM of the optocoupler controls the MOSFET to be periodically turned on and off through the driver chip;
[0044] S3, determine whether the timer TIM1 triggers an interrupt. If the timer TIM1 interrupt exists, go to S4; otherwise go to S2;
[0045] S4, determine whether the interrupt triggered by the timer TIM1 is the LC_ON_1 signal connection pin input capture interrupt, if so, go to S5, otherwise go to S2;
[0046] S5, determine whether the level of the PWM output feedback GPIO pin of the MCU module is high, if so, go to S6, otherwise go to S8;
[0047] S6, determine whether the levels of the two GPIO pins of the MCU module corresponding to the power supply status of the excitation coil and the power supply status of the driver chip are both low. If so, go to S7, otherwise go to S9;
[0048] S7, MOSFET open circuit status bit starts counting. When the MOSFET open circuit state lasts for 1S, the MCU module issues a MOSFET open circuit alarm. If the open circuit state is interrupted within 1S, it needs to be counted again. Using 1S as the continuous detection time of the MOSFET open circuit state is to avoid false triggering caused by interference such as static electricity and electromagnetic pulses, so that the detection is reliable. The MCU module issues a MOSFET driver module open circuit alarm and goes to S9;
[0049] S8, MOSFET short-circuit state is the start of counting. When the MOSFET short-circuit state lasts for 200mS, the MCU module will issue a MOSFET short-circuit alarm. If the short-circuit state is interrupted within 200mS, it needs to be counted again. 200mS is used as the short-circuit state continuous detection time to avoid false triggering caused by disturbances and other situations. Compared with the open-circuit state, the continuous detection time is shorter because the impact caused by the MOSFET short circuit is much greater than that caused by the open circuit. The MCU module issues a MOSFET short-circuit alarm and goes to S9;
[0050] S9, clear the timer TIM1 input capture interrupt pending bit to prepare for the next interrupt. Go to S2.
[0051] With the above-mentioned ideal embodiments of the present invention as inspiration, through the above-mentioned description, those skilled in the art can make various changes and modifications without departing from the technical concept of the present invention. The technical scope of the present invention is not limited to the contents of the specification, and its technical scope must be determined according to the scope of the claims.
Claims
1. A MOSFET open circuit and short circuit detection device in an excitation coil control scenario, characterized in that: The MOSFET open circuit and short circuit detection device comprises an MCU module, a MOSFET driving module and a fault detection module; The MCU module includes 3 GPIO pins, 1 timer TIM2 resource pin and 1 timer TIM1 resource pin; the timer TIM2 resource pin is configured as PWM output mode, which is used to output PWM for controlling the on and off of the MOSFET driver module; the timer TIM1 resource pin is configured as input capture mode, and the falling edge triggers interrupt, which is used to monitor whether the excitation signal output by the fault detection module triggers an interrupt, and perform fault analysis and alarm in the timer TIM1 interrupt function; the 3 GPIO pins are configured as input mode, which are used to detect the output feedback signal of PWM, the power supply status signal of the excitation coil and the power supply status signal of the MOSFET driver chip in the TIM1 interrupt function respectively; The MOSFET driver module includes an optocoupler, a MOSFET driver chip, and a power MOSFET; the PWM output from the timer TIM2 resource pin of the MCU module enters the MOSFET driver chip through optocoupler isolation, and then drives the power MOSFET to turn on and off; the PWM feedback in the MOSFET driver module is output to one of the GPIO pins of the MCU module; the optocoupler in the MOSFET driver module plays an isolation role to prevent the subsequent circuit from affecting the previous circuit; the MOSFET driver chip plays a role in enhancing the driving capability, amplifying the weak PWM signal output by the MCU module to a strong PWM signal that can drive the power MOSFET; The fault detection module includes 3 digital input circuits, 3 optocouplers and 1 XOR gate logic circuit; the 3 digital input circuits respectively collect the power supply status signal of the excitation coil, the power supply signal of the MOSFET driver chip, and the signal at both ends of the excitation coil in real time; the power supply status signal of the excitation coil includes coil power supply + and coil power supply -; the MOSFET driver chip power supply signal includes driver chip power supply + and driver chip power supply -; the signals at both ends of the excitation coil include LC_110V and LC_OUT; the power supply status signal of the excitation coil and the power supply status signal of the MOSFET driver chip are output as LC_PWROK_110V signal and LC_PWROK_12V signal through the optocoupler respectively, and then connected to the other two GPIO pins of the MCU module; the signal at both ends of the excitation coil is output as LC_ON signal through the optocoupler, and then enters the XOR logic gate circuit at the same time as the PWM output signal to output as LC_ON_1 signal, that is Finally, the LC_ON_1 signal is connected to the timer TIM1 resource pin of the MCU module.
2. A MOSFET open circuit and short circuit detection method using the MOSFET open circuit and short circuit detection device in the excitation coil control scenario according to claim 1, characterized in that: The specific steps include: S1, MCU module initialization, configure timer TIM2 to PWM output mode; configure timer TIM1 to input capture mode; configure 3 GPIO pins to input mode; S2, the power MOSFET is in normal working state, and the MCU module outputs PWM to control the power MOSFET to turn on and off periodically through the optocoupler and MOSFET driver chip; S3, determine whether the timer TIM1 triggers an interrupt, if the timer TIM1 interrupt exists, go to step S4; Otherwise, go to step S2; S4, determine whether the interrupt triggered by the timer TIM1 is an interrupt captured by the input of the excitation coil signal connection pin. If it is determined to be yes, go to step S5, otherwise go to step S2; S5, determining whether the level of the GPIO pin fed back by the PWM output in the MCU module is high level, if it is high level, go to step S6, otherwise go to step S8; S6, determining whether the levels of the two GPIO pins of the MCU module corresponding to the power supply state of the excitation coil and the power supply state of the driver chip are both low, if both are low, go to step S7, otherwise go to step S9; S7, the open circuit state of the MOSFET driver module is the start of counting. When the open circuit state of the MOSFET driver module lasts for 1 second, the MCU module issues an open circuit alarm for the MOSFET driver module and goes to step S9; S8, the short-circuit state of the MOSFET driver module is the start of counting. When the short-circuit state of the MOSFET driver module lasts for 200mS, the MCU module issues a MOSFET short-circuit alarm and goes to step S9; S9, clear the timer TIM1 input capture interrupt pending bit, prepare for the next interrupt, and go to step S2.
Citation Information
Patent Citations
OR-ing MOSFET fault online detection method and system
CN106199369A
Insulated gate bipolar transistor (IGBT) fault detection circuit
CN103033732A
New method for diagnosing IGBT (Insulated Gate Bipolar Translator) open-circuit faults in HBSMs (Half Bridge Sub-modules)
CN109541377A