Open Access book publisher

The utilization of renewable energy sources such as wind energy, or solar energy, among others, is currently of greater interest. Nevertheless, since their availability is arbitrary and unstable this can lead to frequency variation, to grid instability and to a total or partial loss of load power supply, being not appropriate sources to be directly connected to the main utility grid. Additionally, the presence of a static converter as output interface of the generating plants introduces voltage and current harmonics into the electrical system that negatively affect system power quality. By integrating distributed power generation systems closed to the loads in the electric grid, we can eliminate the need to transfer energy over long distances through the electric grid. In this book the reader will be introduced to different power generation and distribution systems with an analysis of some types of existing disturbances and a study of different industrial applications such as battery charges.

It is possible to integrate an APF function into a battery charger. For example, an uninterruptible power supply (UPS) with integrated APF capability has been proposed (C.-C.& Manjrekar, 2005;Wu & Jou, 1995). In both cases, a voltage-fed type APF is used and the battery is connected in parallel with the capacitor. For UPS, the battery is stationary; it always stays with the power supply system and operates in stand-by mode for emergency situation. For other battery charger such as EV charger, the battery is non-stationary; it only connects to the charger when it needs to be charged. Therefore the configuration where the capacitor is installed in parallel with the battery terminals, as suggested earlier (C.-C.& Manjrekar, 2005;Wu & Jou, 1995), cannot be used. It is because when the battery is removed from the charging terminals, a potential difference between the capacitor and the battery will be created. The worst scenario happens when next time the battery is depleted and putting back to the charging terminals to recharge, it has lower voltage than that of the capacitor. If one simply connects the battery to the charging terminals, a surge discharge current from the capacitor would occur. This will damage the circuitry, connectors and battery due to this high current. This chapter presents a simple and improved battery charger system with power quality improvement function. It solves the aforementioned parallel capacitor-battery issue by a proposed equal charge concept. And the circuit is simplified by integrating a two-switch dc/dc converter with a full-bridge converter/inverter and using only one inductor. The chapter is organized as follows. The proposed charger and its operation will be described in Section 2. The equal charge concept will be explained in Section 3. Design considerations of the charger will be given in Secion 4. Simulation results will be reported in Section 5 followed by conclusions in Section 6. Fig. 1 shows the proposed battery charger system with power factor correction (PFC) capability. It consists of an integrated full-bridge inverter/converter (S1 to S4), an inductor L o , a capacitor C o and a switch (S5). As compared to the two inductors and six switches used in the converter introduced in (Kisacikoglu, et al. (2001)), the proposed converter has fewer component counts. In summary, when charging the battery, it operates as a buck converter with input current shaping for PFC and when discharging the battery, it operates as a boost converter with reactive power compensation.

Circuit operation and analysis-battery charging
The converter operates as a buck (step-down) converter during charging mode. As the input voltage v in has a general expression of V m sinωt, its value changes from 0V to V m . Therefore current will flow from the grid to the converter to charge the battery only when the input voltage is higher than the battery voltage V batt . The current flow is controlled by the power switches S1 to S4 operating at high switching frequency and shaped by the inductor L o .N o w suppose at certain instant the input voltage at node A is higher than node B and v in > V batt is satisfied, S1 and S4 turn on to allow input current to flow into the circuit, as shown in Fig.  2(a). The voltage applied across the inductor is v in − V Co and the inductor is charging linearly with a rate equals

292
Electrical Generation and Distribution Systems and Power Quality Disturbances The inductor L o and capacitor C o ensure the high frequency current ripple to the battery has reduced. After certain interval, we need to reset the inductor to prevent it from saturation. There are a number of ways to discharge the inductor current: 1. Turn on S1 and S2 to provide a free wheeling path with V Lo = −V batt 2. Turn on S3 and S4 to provide a free wheeling path with V Lo = −V batt 3. Turn on S2 and S3 to provide a discharging path for the inductor with V Lo = −V batt − v in Fig. 2(b) shows the current path for option 2 as described above while Fig. 2(c) shows option 3. Comparing to the first two options, the third option with input voltage putting in series with the battery for discharging of inductor current would achieve a faster response in case a sudden decrease in the output loading condition occurs. But at the same time, comparing to options 1 and 2, option 3 will cause more switching losses because all four switches have to be in action during this mode while for the other two options only three switches are involved. Similiarly for opposite half of the line cycle, i.e., node B has higher potential than node A, and if v in > V batt is satisfied, S2 and S3 turn on to allow input current to flow into the circuit and charge the inductor. For the inductor discharging period, again there are three options to continue the inductor current flow similiar to the previous description. Apart from charging the battery, the converter in this mode has to provide power factor correction (PFC) according to the international standard such as IEC 61000-3-2 when the converter draws more than 75W of power from the ac line. To achieve PFC, L o is the main component to shape the input current and it can work in all three modes to achieve the PFC function, i.e. discontinuous conduction mode (DCM), boundary conduction mode (BCM) or continuous conduction mode (CCM). For DCM operation, the input current is shaped We can observe from (2) that the average input current, i in,avg (t), of the buck operating mode follows in phase and closely with input voltage v in if duty cycle D is constant but it is negatively offseted so there is a distortion in the current. And the lower the V batt , the better the power factor (PF) this mode can achieve as the conduction angle increases with reducing battery voltage for a given input line voltage. For BCM and CCM operations, the input current has to be sensed and controlled to follow the shape of the input voltage to achieve high PF. A peak current mode controller can be used for both BCM and CCM operations.

Circuit operation and analysis -battery discharging
The converter operates as a boost (step-up) converter during discharging mode. Unlike the buck mode operation, current from the battery can always flow to the ac line (or grid), v in ,via the boost action. Switch S5 remains closed in this mode and the inductor L o serves as energy storage element as well as shaping the current for reactive power compensation. Suppose at certain instant the potential at node A is higher than node B. To charge L o , we can turn on either switches pair S1/S2 or switches pair S3/S4. We will discuss what the difference is by switching particular pair soon but suppose at this point we select pair S3/S4. Once the switches pair is turned on, a voltage equals V Lo = −V batt is applied across the inductor. Therefore the inductor current flows from the battery to the switches with a rate equals Note that the capacitor C o does help to reduce the current ripple on the battery and serve to provide a fast response as usually the battery is of slow response, in particular to sudden surge of current demand. After a certain interval, the inductor has to be reset. To reset L o ,a voltage which equals V Co − v in needs to apply across the inductor and its rate of discharge equals To achieve this, S3 is turned off and S1 is turned on with S4 remains closed, as shown in Fig.  3 (b). From this transition we can observe that two switches are involved. If S1 and S2 were turned on first previously for the inductor charging, then S2 will turn off and S4 will turn on with S1 remains closed for the discharging interval. Hence there are still two switches involved. Apart from discharging the battery, the converter in this mode is able to improve the power quality of the grid. To achieve high power factor, L o is the main component to shape the input current and it can work again in all three modes to achieve the PFC function, i.e. DCM, BCM and CCM. The inductor current waveform is shown in Fig. 4. It works in DCM operation. The instantaneous average inductor current is equal to the instantaneous average input current, which is given byī

Fig. 3. Equivalent circuits for discharging mode operation
Using voltage-second balance on L o , the inductor discharging period, d 1 (t),isexpressedas Therefore the instantaneous average input current has the final form as follows As it can be seen from (7), the last term of on the right hand side is non-linear due to the time-varying input voltage v in (t). Hence the duty cycle has to vary in response to this varying voltage to maintain high power factor. In order to achieve unity power factor, i.e.,ī ac (t)= Fig. 4. Gate drive voltage and inductor current waveforms at the discharging mode.
v in (t)/R eq where R eq is the equivalent resistance of the converter, the duty cycle needs to be expressed as Fig . 5 shows the required duty cycle over a half line period, given V batt =72V and v in (t)=340sin(πt). It can be observed from the same figure that at the beginning and near the end of the line cycle, the duty cycle goes to infinity which is impossible in reality. This happens because, as it can be seen from (6) that, when v in (t) ≤ V batt is satisfied the boost mode is not operating as the input voltage is not enough to reset the inductor. To prevent this from happening, the simpliest way is to have duty cycle equals zero but this will create current distortion as will be shown from simulation later on.

Principle of operation
The equal charge concept is to deal with non-stationary battery where unequal charges are found on the battery and the battery charger. Since the battery will be plugged into the battery charger for charging in parallel, a potential difference between the battery and charger will create a large current (or surge current) flow at the instant of connection. The magnitude of this current depends on the state-of-charge on the battery; it ranges from slightly discharged to fully discharged depending on what type of battery the machine uses and how the battery is used. The larger the potential difference between the two points, the larger the magnitude of the surge current will flow. This could damage the connectors or cabling and other devices in which the surge current passes through. In order to deal with this problem, the equal concept is introduced. The idea is simple: it is to bring the potential difference between the charger and the battery to zero before the electrical connection and as a result there will be no surge current flow. The procedure is explained, with the aid of Fig. 1, as follows: Firstly, switch S5 has to be open. Then the battery is connected to the charger. The voltage of the battery, V batt is sensed and sent to the micro-controller as a reference voltage. The micro-controller compares this reference voltage and the voltage on C o .I fV Co > V batt is satisfied, then the charger operates in discharging mode (i.e., boost mode) to take away some charge on C o until its voltage is equal to V batt .I fV Co < V batt is satisfied, then the charger operates in charging mode (i.e., buck mode) to charge up C o until its voltage is equal to V batt . After the equal charge process has completed, S5 can be closed and the charger operation can be continued.

Simulation results
To illustrate the effectiveness of the equal charge concept, a series of simulations by a free circuit simulator LTSpiceIV (Linear Technology) have been carried out. The test circuit is based on an open-loop bi-directional dc/dc converter (S1, S3 and L2) with an output capacitor C1, a switch S2 mimiking a relay and a battery model (L1, R1 and V2), as shown in Fig. 6. In the first scenario, the effect of large surge current discharge if the voltages are not matached is shown. The power converter is not in operation but the output voltage at C1 is at 200V initially. The battery before the connection is at 72V. When S2 is closed, a large surge current with peak value at 630A is produced, as shown in Fig. 7. Although it only lasts for a short duration and the current drops to 0A after 5ms, it has enough energy to create a spark at the switch and could melt and wear the joint after a period of operation. In the second scenario, the equal charge concept is realized. The duty cycles of the bi-directional converter are set to produce an output of 74V before connecting the battery, as shown in Fig. 8. After S2 is closed, a maximum current of only 10A is generated and it drops to 5A to charge the battery. Of course one can use the same voltage as that of the battery before battery connection but in this scenario the capability of controlling of the output voltage to control the charging current is demonstrated. Since this converter works in an open-loop condition, the output voltage drops to 73V. But in a closed-loop control condition, the voltage can be regulated. Despite of this, it is still possible to observe that the charging current is limited by the resistance of the relay S2 and the internal resistance of the battery. Therefore the charging current is obtained as (73-72)V/(0.1+0.1)Ω = 5A. In order to control the charging current, another option is to replace the relay by a power bipolar junction transistor (BJT). However, apart from additional control circuit which increases the cost, the necessary saturation voltage across the collector and emittor also imposes a minimum charging current to the battery. Therefore the control is simplified by the proposed voltage control of the converter.

Design considerations 4.1 Practical power stage design
The simplified circuit diagram as shown in Fig. 1 and the previous explanation of the battery charging and discharging are based on the fullly bi-directional current blocking capability of the four switches. However both MOSFET and IGBT which are the commonly used power devices cannot be used as such because of their partial current blocking capacbility. For MOSFET, although current can flow in both directions, the body diode cannot be externally controlled. For IGBT, the current can only flow in one direction. In order to achieve the said bi-directional current blocking capability with minimum component count, Fig. 9 shows a practical power stage design. It consists of four IGBTs and two MOSFETs. Two IGBTs (i.e. S1/S2 and S3/S4) form a pair to allow bi-directional current blocking capability. Since an IGBT pair is inserted in each leg and controls the current direction at any time of the input voltage, one can simply use a MOSFET for the other part of each leg instead of another IGBT pair to save part and cost. With this circuit configuration it is convenient to control the current  direction. During the battery charging phase, switches S2, S4 and S6 (body diode) will come to operation during the positive half line cycle and S1, S3 and S5 (body diode) for the negative half cycle. During the battery discharging phase, switches S1, S3 and S6 will come to operation during the positive half line cycle while S2, S4 and S5 for the negative half cycle.

Current control
For the control stage as shown in Fig. 1, only voltage sensing at the output of the converter and the battery are shown. However, in practice it is useful to include a current sensing device to measure the battery current. It is because as mentioned earlier different battery has different charging/discharging profile. The current sensor and the micro-controller will work together S2 S1 to maintain the battery current profile, as well as to achieve current protection functions such as over-current protection (OCP). A current sensor will also help implement some superfast charging algorithm by constantly monitoring the battery current.

Need of paralleled capacitance
The capacitor placed in parallel with the battery is important, not only for achieving a faster response to compensate for the slow response of the battery current in response to fast current demand, but also for reducing the current ripple on the battery. Fig. 10(a) shows the battery charger in charging mode without a paralleled capacitor. Under this situation, the inductor current equals the battery charging current and so as the ripple current. This ripple current will heat up the battery due to the internal resistance. This results in shorter battery lifetime. Fig. 10(b) shows the same working condition but a capacitor is placed in parallel with the battery. Now, because the capacitor absorbs the current ripple from the inductor current, the current ripple on the battery is dramatically reduced. Note that this capacitor not only does reduce the high frequency ripple but also the low frequency ripple. But in general the high frequency ripple, especially when the inductor works in DCM, causes more losses than that of the low frequency ripple.

Simulation results of the proposed charger
To verify the power quality capability of the proposed battery charger, a series of simulations based on Fig. 1 have been carried out. The circuit parameters used are as follows: L o =50μH, C o = 2200μF, v in =240Vrms, V batt = 72V with 1Ω internal resistance and switching frequency f s = 100kHz. The inductor is working in DCM. Fig. 11 shows the key waveforms of the converter when it is working in charging (buck) mode over a few line period. It can be seen that there is an input distortion due to the fact that the input voltage is less than the battery voltage for some time of the line cycle, as discussed eariler. However, when input voltage is greater than the battery voltage, the inductor L o shapes the input current to follow the input voltage. Therefore it is possible for the proposed converter to achieve high power factor in buck operating mode. Fig. 12 shows the key waveforms of the converter when it is working in discharging (boost) mode over a half line period. It has been explained in Section 2.3 that for boost mode operation current can always flow to the ac line. However, the input voltage is lower than the battery voltage for some time during each line cycle and the boost mode requires the input ac voltage is larger than the battery voltage for proper operation, otherwise the inductor L o cannot be reset and it will saturate the inductor during this period. Therefore to protect the inductor from saturation the converter stops operation until v in is equal to and above V batt . In the current setting, the input voltage angle, θ, for this equality is calculated as   where V m is the peak input ac voltage. The time expression of the input voltage angle is hence 12 • /180 • × 10ms = 0.67ms. The introduction of dead time of input current will certainly create current distortion but again with the good input current shaping capability during the conduction period the converter still can deliver high quality current to the ac line. In order to further improve the input current quality during the discharging mode, the converter can run in BCM or CCM and use hysteresis current control or average current mode control to track the input current to follow the input voltage. In such case, variable switching frequency will be used.

Conclusion
In this chapter, a simple and integrated battery charger with power quality improvement is presented. It can draw and deliver high quality current from and to the ac line by the input current shaping technique on the inductor. Circuit operation analysis and design considerations of the power converter have been discussed. A equal charge concept together with practical implementation has been explained. Simulation results have been reported to verify the theoretical analysis. The utilization of renewable energy sources such as wind energy, or solar energy, among others, is currently of greater interest. Nevertheless, since their availability is arbitrary and unstable this can lead to frequency variation, to grid instability and to a total or partial loss of load power supply, being not appropriate sources to be directly connected to the main utility grid. Additionally, the presence of a static converter as output interface of the generating plants introduces voltage and current harmonics into the electrical system that negatively affect system power quality. By integrating distributed power generation systems closed to the loads in the electric grid, we can eliminate the need to transfer energy over long distances through the electric grid. In this book the reader will be introduced to different power generation and distribution systems with an analysis of some types of existing disturbances and a study of different industrial applications such as battery charges.