Reduction of transients in switches using embedded machine learning

P. Suresh1, S. George Fernandez2, S. Vidyasagar3, V. Kalyanasundaram4, K. Vijayakumar5, Vaidheeswaran Archana6, Soham Chatterjee7 1,2,3,4,5 Faculty of Electrical and Electronics Engineering, SRM Institute of Science and Technology, India 6 Department of Electrical and Electronics Engineering, National university of Singapore, Singapore 7 Department of Electronics and Communication Engineering, Nanyang Technical University, Singapore


INTRODUCTION
Transients are random and rapid fluctuations in voltages caused by changing loads and fast switching devices. Transients are very harmful in a circuit because they can cause heating and improper firing of solid state switches. Transients can also cause poor power factor, increase current in the neutral conductor, increase losses due to hysteresis and eddy current in motors and it can also sometimes interfere with telephone networks. Transients are very steep voltage steps that occur in electrical circuits due to the sudden release of a previously stored energy, either inductive or capacitive, which results in a high voltage transient, or surge being created. This sudden release of energy back into the circuit due to some switching action creates a transient voltage spike in the form of a steep impulse of energy which can in theory be of any infinite value. We must also realize that voltage transients do not always start at zero volts or at the beginning of a cycle, but can be superimposed onto another voltage level. Either way, transients are bad as they can damage electronic equipment and therefore need to be suppressed or controlled. Transient suppression devices can take on many forms from arc contacts, to filters, to solid state semiconductor devices. Discrete semiconductor transient suppression devices such as the Metal-oxide Varistor, or MOV, are by far the most common as they are available in a variety of energy absorbing and voltage ratings making it possible to exercise tight control over unwanted and potentially destructive transients or over voltage spikes. The most common transient is the "oscillatory transient". It is sometimes described as "ringing transient". This type of transients is characterized by swings above and below the normal line voltage. The other type (impulse) transient generated in induction motor [1], is more easily explained as a "one-shot" type of event, and it is characterized by having more than 77% of it being one pulse above the line voltage [2]. A lightning strike can be composed of multiple transients of this type. It is because of all these problems that researchers are trying to find ways to reduce transients in circuits. One of the ways is by having filters in the circuits that can reduce and smoothen the effects of these transients. However, filters are typically large and they also consume a lot of power and have losses due to heat. A better method to reduce transients is by giving proper gate pulses to the solid state switches like IGBTs and MOSFETs. However, it is difficult to judge what the proper switching voltages have to be and it is also difficult to design a controller that can react quickly enough to change the switching voltage based on the input voltages [3].These are used in various applications such as electric vehicle charging and induction cooking applications [4][5][6][7].Our approach is to use a Neural Network based controller that can quickly react to the voltage transients and can reduce the transients by giving proper switching gate signals.

LITERATURE REVIEW
Transient activity is believed to account for 80% of all electrically-related downtime. Lightning accounts at least 5% of Insurance claims and costs an average of $13,000 per occurrence [8]. Effective transient voltage suppression equipment can double or triple the life of electrical and electronic equipment.
Transients are very steep voltage steps that occur in electrical circuits due to the sudden release of a previously stored energy, either inductive or capacitive, which results in a high voltage transient, or surge being created. This sudden release of energy back into the circuit due to some switching action creates a transient voltage spike in the form of a steep impulse of energy which can in theory be of any infinite value. Transient suppression devices can take on many forms from arc contacts, to filters, to solid state semiconductor devices. Discrete semi conductor transient suppression devices such as the Metal-oxide Varistor, or MOV, are by far the most common as the year available in a variety of energy absorbing and voltage ratings making it possible to exercise tight control over unwanted and potentially destructive transients or over voltage spikes. Figure 1 shows the methods of reduction of transients.

Figure 1. Previous methods of reduction of transients
Diverting a transient is usually accomplished using a voltage-clamping type device or by using what are commonly called a crowbar type device. These parallel connected devices exhibit a nonlinear impedance characteristic as the current flowing through them is not linear to the voltage across their terminals as given by OhmsLaw. A voltage-clamping device such as an MOV, has a variable impedance depending on the current flowing through the device or on the voltage across its terminal. Under normal steady-state operating conditions, the device offers a high impedance and has therefore no effect on the connected circuit.
However, when a voltage transient occurs, the impedance of the device changes increasing the current drawn through the device as the voltage across it rises. The result is an apparent clamping of the transient voltage. The volt-ampere characteristic of a clamping devices is generally time-dependent as the large increase in current results in the device dissipating a lot of energy.
Crowbar devices are another type of transient suppression device which diverts over voltage spikes away from a circuit as a result of a switching type turn-on action. Crowbar devices are similar in operation to a Zener diode in that under normal steady-state conditions they have no effect on the circuit. When a transient is detected, they rapidly switch ON offering a very low impedance path which diverts the transient away from the parallel-connected load. Transients on an AC power line can range from a few volts to over and control these unwanted transients is to use a low-pass filter section between the source and the load. Low pass filters, such as an LC filter, can be used to attenuate any high frequency transients and allow the lowfrequency power or signal to pass through undisturbed. The simplest form of transient suppression filter is that of a resistor-capacitor RC filter placed directly across the power line to attenuate any high frequencies transients.

CIRCUIT
The Voltage Measurement Circuit is used to measure the output voltage across the switch. This is then fed into the micro controller. The Micro controller is a Raspberry Pi that has a neural network inside it. The neural network takes as input the output of the Voltage Sensing Element. It then predicts the value. Figure 2 and Figure 3 show the soft switching by using high value gate resistor of the gate driver voltage and the block diagram of transient reduction system using ML. The output of the neural network will be across the GPIO pins of the Raspberry Pi. This output will be in the form of a voltage. The output is then fed into the Gate Driver circuit of the inverter. There are two modes in the circuit:

Mode 1:
In this mode, a High pulse is given to the first and fourth IGBT sin the inverter circuit. The DC current flows [10] through the first IGBT, the load and then through the fourth IGBT. The voltage output that we get is the positive half of the Square wave AC output. The pulses across the other two IGBTs are low and they are in the switched OFF condition where they do not let any current pass through. In this mode, a High Pulse is given to IGBTs two and three. In this case the current flows through IGBT 2 first and then across the load and then IGBT 3. In this case, the output voltage across the Load is reversed and we get the second half of the output across the load. The other IGBTs are in the switched OFF condition and they do not let any current through. Care must be taken not to switch ON two IGBTs in the same leg, so as to not cause a short circuit.

MACHINE LEARNING
We use Neural Networks to model the transients in the switches [11]. The neural network is trained using open source training data that is freely available. The data is divided into three parts. 80% of the data is used for training the neural network [12]. The 15% is used for testing and the rest is used for validation. Figure 4 and Figure 5 show the block diagram of training procedure for neural network and the flow chart of the proposed system. The data is divided into batches during training to reduce the training time and to decrease the computational resources required to train deep learning [13] the neural network. We use a Feed Forward Neural Network in this work. The network is trained using Gradient Descent based Back Propagation. Back Propagation is used to update the weights to increase the accuracy of the neural network. The loss used to train the network is Mean Absolute Error.

SIMULATION
To test our system, an inverter circuit with the proposed Machine Learning model was simulated in MATLAB for two types of load. The neural network was trained using MATLABs Neural Network Tool kit and was used to predict the gate pulses that are required to reduce the transients in the switches. The simulation results are shown in the figures. The vertical axis represents the voltage whereas the horizontal axis is the time. The first graph shows the Gate Pulses and the Second Graph shows the reduction in transients as the neural network trains. The second graph shows the Gate Pulses and the first Graph shows the reduction in transients as the neural network trains. From the Figures it can be seen that the transients are more in the first half of the graph. This is because this is the time when the neural network is training. During this time, the gate pulses are also very erratic and fluctuating. Figure 6 to Figure 8 show the simulation diagram, simulation results for RL load and R load. After the Neural Network has completed training, the gate pulses are more stable and the output has a lesser number of transients and fluctuations.

HARDWARE IMPLEMENTATION
There are three major parts to the hardware implementation which is shown in Figure 9: a. Inverter Circuit: The Inverter is an electrical device which converts direct current (DC) to alternate current (AC). The inverter is used for emergency backup power in a home. The inverter is used in some aircraft systems to convert a portion of the aircraft DC [14] power to AC. The AC power is used mainly for electrical devices like lights, radar, radio, motor, and other devices. A H-bridge bridge inverter was used in the project. H bridges are available as integrated circuits, or can be built from discrete components. The term H bridge is derived from the typical graphical representation of such a circuit. An H bridge is built with four switches [15] (solid-state or mechanical). When the switches [16] S1 and S4 (according to the Figure 1) are closed (and S2 and S3 are open) a positive voltage will be applied across the motor. By opening S1 and S4 switches and closing S2 and S3 switches, this voltage is reversed, allowing reverse operation of the motor. Many applications are given in [17][18][19][20][21][22][23][24]. b. Raspberry Pi: A Raspberry Pi is a credit card-sized computer originally designed for education, inspired by the 1981 BBC Micro. Creator Eben Upton's goal was to create a low-cost device that would improve programming skills and hardware understanding at the pre-university level. But thanks to its small size and accessible price, it was quickly adopted by tinkerers, makers, and electronics enthusiasts for projects that require more than a basic microcontroller (such as Arduino devices c. Power Circuit: The power to the circuit is given by a transformer [25]. The output from the transformer is rectified using a full wave rectifier. It is then filtered using capacitors to give a DC input to the Inverter. Figure 9. Hardware Implementation of Transients Reduction using ML

HARDWARE RESULTS
The results from the hardware are shown Figure 10 and Figure 11. The graph shown in Figure 10 is the output of the inverter without our neural network model. In this graph, the transients are more and they have a high peak of about 17V. This can lead to false switching in the switches and it can also cause faster failure and degradation of switches.
The vertical axis in the graph is the voltage and the horizontal axis is the time. In the Figure 11, however, the transient peak has been reduced and it can be seen that the maximum transients is just 15 V. Figure 10. Simulation output without neural network Figure 11. Simulation output of inverter with neural network

CONCLUSION
In this paper a circuit for reducing transients in switches was proposed using neural networks. This was done by using a hardware implemented inverter circuit along with raspberry pi which is used for running the neural network on it. This neural network further was successful in reducing the transients and obtaining an accuracy of 80%. This circuit was simulated in MATLAB to backt he results.