# Patent

## Title
Systems and methods for providing power to a load based upon a control strategy

## Abstract

Systems and methods are provided for an electrical system. The electrical system, for example, includes a first load, an interface configured to receive a voltage from a voltage source, and a controller configured to receive the voltage through the interface and to provide a voltage and current to the first load. The controller may be further configured to, receive information on a second load electrically connected to the voltage source, determine an amount of reactive current to return to the voltage source such that a current drawn by the electrical system and the second load from the voltage source is substantially real, and provide the determined reactive current to the voltage source.

## Background
STATEMENT REGARDING FEDERALLY SPONSORED RESEARCH OR DEVELOPMENT
This invention was made with Government support under Agreement No. DE-FC26-07NT43123, awarded by the United States Department of Energy. The Government has certain rights in this invention.


TECHNICAL FIELD
Embodiments of the subject matter described herein relate generally to electrical systems in automotive vehicles, and more particularly, embodiments of the subject matter relate to a control strategy for energy delivery systems.
BACKGROUND
Plug-in Hybrid and fully electric vehicles have become increasingly popular in recent years. These vehicles typically have large battery systems which can take many hours to charge while consuming large amounts of power. Current charging systems have a fixed charging strategy that requires that the vehicle be plugged in to a residential or commercial power grid.
Accordingly, it is desirable to have a flexible and efficient electrical system and method for providing power to a load. Other desirable features and characteristics will become apparent from the subsequent detailed description and the appended claims, taken in conjunction with the accompanying drawings and this background.
BRIEF SUMMARY
In accordance with one embodiment, a charging system is provided. The charging system includes a rechargeable battery, an interface configured to receive a voltage from a voltage source, and a controller configured to receive the voltage from the voltage source through the interface and to recharge the rechargeable battery using the received voltage. The controller is further configured to, receive information on an alternating current (AC) load electrically connected to the voltage source, determine an amount of reactive current to return to the voltage source such that a current drawn by the charging system and the AC load from the voltage source is substantially real, and provide the determined reactive current to the voltage source while the rechargeable battery is being recharged.
In accordance with another embodiment, an electrical system, is provided. The electrical system includes a first load, an interface configured to receive a voltage from a voltage source, and a controller configured to receive the voltage through the interface and to provide a voltage and current to the first load. Further, the controller may be further configured to receive information on a second load electrically connected to the voltage source, determine an amount of reactive current to return to the voltage source such that a current drawn by the electrical system and the second load from the voltage source is substantially real, and provide the determined reactive current to the voltage source.
In yet another embodiment, a method of providing, by a controller, a voltage and current to a first load is provided. The method includes, providing, when the controller is in a constant current mode, a constant current charge to the first load, providing, when the controller is in a constant voltage mode, a constant voltage to the first load, providing, when the controller is in a constant power mode, a constant power charge to the first load, and providing, when the controller is in the constant current mode, the constant voltage mode or the constant power mode, a reactive current to the voltage source such that the current drawn from the voltage source is substantially real.
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter.



BRIEF DESCRIPTION OF THE DRAWINGS
A more complete understanding of the subject matter may be derived by referring to the detailed description and claims when considered in conjunction with the following figures, wherein like reference numbers refer to similar elements throughout the figures.
FIG. 1 is a block diagram of electrical system in accordance with one embodiment;
FIG. 2 is a schematic diagram of another electrical system suitable for use in a vehicle in accordance with one embodiment;
FIG. 3 is a flow diagram of control process suitable for use with the electrical system of FIG. 2 in accordance with one embodiment; and
FIG. 4. illustrates a control strategy for use with the electrical system of FIG. 2 in accordance with one embodiment.



DETAILED DESCRIPTION
The following detailed description is merely illustrative in nature and is not intended to limit the embodiments of the subject matter or the application and uses of such embodiments. As used herein, the word “exemplary” means “serving as an example, instance, or illustration.” Any implementation described herein as exemplary is not necessarily to be construed as preferred or advantageous over other implementations. Furthermore, there is no intention to be bound by any expressed or implied theory presented in the preceding technical field, background, brief summary or the following detailed description.
The following description refers to elements or nodes or features being “connected” or “coupled” together. As used herein, unless expressly stated otherwise, “connected” means that one element/node/feature is directly joined to (or directly communicates with) another element/node/feature, and not necessarily mechanically. Likewise, unless expressly stated otherwise, “coupled” means that one element/node/feature is directly or indirectly joined to (or directly or indirectly communicates with) another element/node/feature, and not necessarily mechanically. Thus, although the figures may depict one exemplary arrangement of elements, additional intervening elements, devices, features, or components may be present in an embodiment of the depicted subject matter. In addition, certain terminology may also be used in the following description for the purpose of reference only, and thus is not intended to be limiting. The terms “first”, “second” and other such numerical terms referring to structures do not imply a sequence or order unless clearly indicated by the context.
As used herein, a “node” means any internal or external reference point, connection point, junction, signal line, conductive element, or the like, at which a given signal, logic level, voltage, data pattern, current, or quantity is present. Furthermore, two or more nodes may be realized by one physical element (and two or more signals can be multiplexed, modulated, or otherwise distinguished even though received or output at a common node).
FIG. 1 illustrates an exemplary embodiment of an electrical system 100. The electrical system 100 includes a voltage or current source 110, an electrical control system 120 and a load 130.
The voltage or current source 110 may be, for example, an electrical grid, such as one provided to a home or business by a power company, a generator, such as a diesel engine generator, a solar power system, a wind turbine system or any other type of power generation system, a battery system or any combination thereof The voltage or current source provides a voltage, represented by arrow 112, and a current, represented by arrow 114, to the control system 120.
The control system 120, which may include, for example, a power converter and a controller, is connected between the voltage or current source 110 and the load 130 and provides a voltage, represented by arrow 150, and a current, represented by arrow 140, to the load as described in further detail below.
In one embodiment the load 130 may be a battery and the electrical control system 120 may control how the battery is charged using the voltage or current source 110. In another embodiment, the load 130 may be, for example, a power grid or an electronic device, and the electrical control system 120 controls how power is supplied to the load 130.
The electrical control system 120 has three modes which can be implemented based upon a type of load 130, a state of the load 130, a type of the voltage or current source 110 and a state of the voltage or current source 110. The state of the load 130 may be, for example, a current voltage across the load 130. The state of the voltage or current source may be, for example, a cost associated with drawing power from the voltage or current source 110 and/or an amount of power currently available from the voltage or current source 110. The mode that the electrical control system is in may also be adjusted by a user, system administrator or the like.
In a first mode, the electrical control system 120 provides a constant current (indicated by arrow 140) to the load 130. A constant current mode is useful, for example, for charging a battery when the battery state of charge is low. In a second mode, the electrical control system 120 provides a constant voltage (represented by arrow 150) to the load 130. A constant voltage is useful, for example, to charge a battery when the battery is close to a full charge and to a variety of electronic and passive loads that have voltage supply requirement. In one embodiment, if the load 130 is a battery, the electrical control system 120 may switch between the first and second modes based upon the state of the battery, for example, the charge level of the battery. In many cases, a battery is charged most efficiently by providing a constant current when the battery is low and providing a constant voltage when the battery is close to a full charge.
In a third mode, the electrical control system provides a constant power to the load 130, where the amount of power provided to the load 130 is the amount of current 140 provided to the load 130 multiplied by the amount of voltage 150 provided to the load 130. As discussed in further detail below, the constant power can be provided by providing a fixed current 140 and a fixed voltage 150 to the load 130, or by controlling the product of the current 140 and voltage 150 provided to the load 130.
By providing a constant power to the load 130, the electrical control system 120 can limit the amount of power drawn from the voltage or current source 110. This mode has numerous advantages and uses. If, for example, the voltage source or current source 110 is a power grid, a user can select a maximum amount of power that can be drawn from the grid at any given time. For example, if the cost of drawing power from the grid varies (e.g., based upon the time of day), the user can reduce a maximum draw during the peak hours and increase the maximum draw during off hours to reduce their electric bill. In another embodiment, if the voltage or current source 110 supplies a variable amount of power (i.e., if the voltage or current source 110 is a solar, wind or battery system), the electric system controller can adjust the amount of power being supplied to the load 130 based upon the available power.
As discussed above, the voltage or current source 110 may be a residential or commercial grid, which provides alternating current (AC) power. When the control system 120 is providing the current and voltage to the load 130 in any of the modes discussed above, a real (or active) power is pulled from the voltage or current source 110 as well as a reactive power. An apparent power is the magnitude of the vector sum of real and reactive power. The power factor for the electrical system 100 is a ratio of the real power to the apparent power, and is usually a value between zero and one. As the power factor approaches one the reactive, or nonworking, power approaches zero, which means that less energy in the power distribution system is being wasted.
As discussed in further detail below, the control system may pull extra reactive power from the voltage or current source 110 or return extra reactive power to the voltage or current source 110 such that substantially only real power is perceived to be drawn from the voltage or current source 110 from the load 130 (i.e., the power factor is, or is close to, one).
Further, the electrical system 100 may also include another AC load 160 receiving a voltage 162 and a current 164 from the voltage or current source 110. The AC load 160 may also pull a real and reactive power from the voltage or current source 110. The power factor for the entire electrical system 100 is preferably close to one where there is little to no wasted power. The load 130 and AC load 160 may pull different amounts of reactive power from the voltage or current source 110. Accordingly, in one embodiment, for example, the control system may pull extra reactive power from the voltage or current source 110 or return extra reactive power to the voltage or current source 110 such that only real power is perceived to be drawn from the voltage or current source 110 from both the load 130 and AC load 160. In other embodiments, any number of AC loads 160 may be connected to the voltage or current source 110. Accordingly, the control system 120 can be configured to return extra reactive power to the voltage or current source 110 or pull extra reactive power from the voltage or current source 110 such that the perceived power drawn from the voltage or current source 110, from load 130 and all of the AC loads 160 is substantially only real power.
In one embodiment, for example, the AC load 160 could be within the same residential or commercial complex as the load 130. For example, the AC load 160 may be an appliance such as a refrigerator or a washing machine, or any other AC load on the same grid as the load 130 which uses AC power. In another embodiment, the AC load 160 may be in a different residential or commercial complex than the load 130, but connected to the same voltage or current source 110 as the load 130.
FIG. 2 depicts an exemplary embodiment of an electrical system 200 (or alternatively, a charging system, charger or charging module) suitable for use in a vehicle, such as, for example, an electric and/or hybrid vehicle. While the description below relates to a charging system for an electric and/or hybrid vehicle, one of ordinary skill in the art would recognize that other electrical systems could be created or modified to take advantage of the features discussed herein.
The electrical system 200 includes, without limitation, a first interface 202, a first energy conversion module 204, an isolation module 206, a second energy conversion module 208, an inductive element 210, a capacitive element 212, a second interface 214, and a control module 216. The first interface 202 generally represents the physical interface (e.g., terminals, connectors, and the like) for coupling the electrical system 200 to a DC energy source 218 and the second interface 214 generally represents the physical interface (e.g., terminals, connectors, and the like) for coupling the electrical system 200 to an alternating current (AC) energy source 220. Accordingly, for convenience, the first interface 202 may be referred to herein as the DC interface and the second interface 214 may be referred to herein as the AC interface. In an exemplary embodiment, the control module 216 is coupled to the conversion modules 204, 208 and operates the conversion modules 204, 208 to achieve a desired power flow from the AC energy source 220 to the DC energy source 218, as described in greater detail below.
In an exemplary embodiment, the DC energy source 218 (or alternatively, the energy storage source or ESS) is capable of receiving a direct current (iDC) (indicated by arrow 250) from the electrical system 200 at a particular DC voltage level (VDC) (indicated by arrow 260). In accordance with one embodiment, the DC energy source 218 is realized as a rechargeable high-voltage battery pack having a nominal DC voltage range from about 200 to about 500 Volts DC. In this regard, the DC energy source 218 may comprise the primary energy source for another electrical system and/or an electric motor in a vehicle. For example, the DC energy source 218 may be coupled to a power inverter that is configured to provide voltage and/or current to the electric motor, which, in turn, may engage a transmission to drive the vehicle in a conventional manner. In other embodiments, the DC energy source 218 may be realized as a battery, a fuel cell, an ultracapacitor, or another suitable energy storage element.
The AC energy source 220 (or power source) is configured to provide an AC current (iAC) (indicated by arrow 270) to the charging system 200 at a particular AC voltage level (VAC) (indicated by arrow 280) and may be realized as a main power supply or main electrical system for a building, residence, or another structure within an electric power grid (e.g., mains electricity or grid power). In accordance with one embodiment, the AC energy source 220 comprises a single-phase power supply, as is common to most residential structures, which varies depending on the geographic region. For example, in the United States, the AC energy source 220 may be realized as 220 Volts (RMS) or 240 Volts (RMS) at 60 Hz, while in other regions the AC energy source 220 may be realized as 210 Volts (RMS) or 220 Volts (RMS) at 50 Hz. In alternative embodiments, the AC energy source 220 may be realized as any AC energy source suitable for operation with the charging system 200.
As described in greater detail below, the DC interface 202 is coupled to the first conversion module 204 and the AC interface 214 is coupled to the second conversion module 208 via the inductive element 210. The isolation module 206 is coupled between the conversion modules 204, 208 and provides galvanic isolation between the two conversion modules 204, 208. The control module 216 is coupled to the conversion modules 204, 208 and operates the second conversion module 208 to convert energy from the AC energy source 220 to high-frequency energy across the isolation module 206 which is then converted to DC energy at the DC interface 202 by the conversion module 204. It should be understood that although the subject matter may be described herein in the context of a grid-to-vehicle application (e.g., the AC energy source 220 delivering energy to the DC energy source 218) for purposes of explanation, in other embodiments, the subject matter described herein may be implemented and/or utilized in vehicle-to-grid applications (e.g., the DC energy source 218 delivering energy to the AC interface 214 and/or AC energy source 220).
In order to charge the DC energy source 218, the first conversion module 204 converts high-frequency energy at nodes 222 and 224 to DC energy that is provided to the DC energy source 218 at the DC interface 202. In this regard, the first conversion module 204 operates as a rectifier when converting high frequency AC energy to DC energy. In the illustrated embodiment, the first conversion module 204 comprises four switching elements 52, 54, 56 and 58 with each switching element having a diode 60, 62, 64 and 68 configured antiparallel to the respective switching element to accommodate bidirectional energy delivery. As shown, a capacitor 226 is configured electrically in parallel across the DC interface 202 to reduce voltage ripple at the DC interface 202, as will be appreciated in the art.
In an exemplary embodiment, the switching elements 52, 54, 56 and 58 are transistors, and may be realized using any suitable semiconductor transistor switch, such as an insulated gate bipolar transistor, a metal-oxide semiconductor field effect transistor (e.g., a MOSFET), or any other comparable device known in the art. The switches and diodes are antiparallel, meaning the switch and diode are electrically in parallel with reversed or inverse polarity. The antiparallel configuration allows for bidirectional current flow while blocking voltage unidirectionally, as will be appreciated in the art. In this configuration, the direction of current through the switches is opposite to the direction of allowable current through the respective diodes. The antiparallel diodes are connected across each switch to provide a path for current to the DC energy source 218 for charging the DC energy source 218 when the respective switch is off As described in greater detail below, in an exemplary embodiment, the control module 216 operates the switches of the first conversion module 204 to provide a path for current from the DC energy source 218 to the isolation module 206 to provide an injection current at nodes 234, 236 of the second conversion module 208.
In the illustrated embodiment, switch 52 is connected between node 228 of the DC interface 202 and node 222 and configured to provide a path for current flow from node 228 to node 222 when switch is closed. Diode 60 is connected between node 222 and node 228 and configured to provide a path for current flow from node 222 to node 228 (e.g., diode 60 is antiparallel to switch 52). Switch 54 is connected between node 230 of the DC interface 202 and node 222 and configured to provide a path for current flow from node 222 to node 230 when switch 54 is closed, while diode 62 is connected between node 222 and node 230 and configured to provide a path for current flow from node 230 to node 222. In a similar manner, switch 56 is connected between node 228 and node 224 and configured to provide a path for current flow from node 228 to node 224 when switch 56 is closed, diode 64 is connected between node 224 and the DC interface 202 and configured to provide a path for current flow from node 224 to node 228, switch 58 is connected between node 230 and node 224 and configured to provide a path for current flow from node 224 to node 230 when switch 58 is closed, and diode 66 is connected between node 224 and the DC interface 202 and configured to provide a path for current flow from the node 230 to node 224.
In an exemplary embodiment, the second conversion module 208 facilitates the flow of current (or energy) from the AC energy source 220 and/or inductive element 210 to the isolation module 206. In the illustrated embodiment, the second conversion module 208 is realized as a front end single-phase matrix converter comprising eight switching elements 20, 22, 24, 26, 28, 30, 32 and 34 with each switching element having a diode 36, 38, 40, 42, 44, 46, 48 and 50 configured antiparallel to the respective switching element, in a similar manner as set forth above in regards to the first conversion module 204. For convenience, but without limitation, the second conversion module 208 may alternatively be referred to herein as a matrix conversion module (or matrix converter) or a cycloconverter. As described in greater detail below, the control module 216 modulates (e.g., opens and/or closes) the switches 20, 22, 24, 26, 28, 30, 32 and 34 of the matrix converter 208 to produce a high-frequency voltage at nodes 222, 224 that achieves a desired power flow to the DC interface 202 and/or DC energy source 218.
In the illustrated embodiment of FIG. 2, a first pair of switches 20 and 22 and diodes 36 and 38 are coupled between node 232 and node 234, with the first pair of switch and antiparallel diode (e.g., 20 and 36) being configured with opposite polarity as the second pair of switch and antiparallel diode (e.g., 22 and 38). In this manner, switch 20 and diode 38 are configured to provide a path for current flow from node 234 through switch 20 and diode 38 to node 232 when switch 20 is closed, turned on, or otherwise activated and the voltage at node 234 is more positive than the voltage at node 232. Switch 22 and diode 36 are configured to provide a path for current flow from node 232 through switch 22 and diode 36 to node 234 when switch 22 is closed, turned on, or otherwise activated and the voltage at node 232 is more positive than the voltage at node 234. In a similar manner, a second pair of switches 24 and 26 and diodes 40 and 42 are coupled between node 236 and node 238, a third pair of switches 28 and 30 and diodes 44 and 46 are coupled between node 232 and node 236, a fourth pair of switches 32 and 34 and diodes 48 and 50 are coupled between node 234 and node 238.
In the illustrated embodiment, switches 20, 24, 28, and 32 comprise a first set of switches which are capable of commutating the current through the inductive element 210 (iL) (indicated by arrow 290) from node 232 to node 238 when the current through the inductive element 210 is flowing in a negative direction (e.g., iL<0) and switches 22, 26, 30, and 34 comprise a second set of switches that are capable of commutating the current through the inductive element 210 from node 238 to node 232 when the current through the inductive element 210 is flowing in a positive direction (e.g., iL>0), as described in greater detail below. In other words, switches 20, 24, 28 and 32 are capable of conducting at least a portion of current flowing in a negative direction through the inductive element 210 (e.g., iL<0) and switches 22, 26, 30 and 34 are capable of conducting at least a portion of current flowing in a positive direction through the inductive element 210 (e.g., iL>0). As used herein, commutating should be understood as the process of cycling the current through the inductive element 210 through switches and diodes of the matrix converter 208 such that the flow of current through the inductive element 210 is not interrupted.
In an exemplary embodiment, the isolation module 206 comprises a first set of windings 244 connected between nodes 222, 224 of the first conversion module 204 and a second set of windings 246 connected between nodes 234, 236. For purposes of explanation, the windings 246 may be referred to herein as comprising the primary winding stage (or primary windings) and the sets of windings 244 may be referred to herein as comprising the secondary winding stage (or secondary windings). The windings 244, 246 provide inductive elements that are magnetically coupled in a conventional manner to form a transformer, as will be appreciated in the art. In an exemplary embodiment, the isolation module 206 is realized as a high-frequency transformer. In this regard, the isolation module 206 comprises a transformer designed for a particular power level at a high-frequency, such as the switching frequency of the switches of the conversion modules 204, 208 (e.g., 50 kHz), resulting in the physical size of the transformer being reduced relative to a transformer designed for the same power level at a lower frequency, such as the frequency of the AC energy source 220 (e.g., the mains frequency).
In an exemplary embodiment, the inductive element 210 is realized as an inductor configured electrically in series between node 232 of the matrix converter 208 and a node 240 of the AC interface 214. Accordingly, for convenience, but without limitation, the inductive element 210 is referred to herein as an inductor. The inductor 210 functions as a high-frequency inductive energy storage element during operation of the electrical system 200. The capacitive element 212 is realized as a capacitor coupled between node 240 and node 242 of the AC interface 214, and the capacitor 212 and inductor 210 are cooperatively configured to provide a high frequency filter to minimize voltage ripple at the AC interface 214, as will be appreciated in the art.
The control module 216 generally represents the hardware, firmware and/or software configured to operate and/or modulate the switches of the conversion modules 204, 208 to achieve a desired power flow from the AC energy source 220 to the DC energy source 218. Depending on the embodiment, the control module 216 may be implemented or realized with a general purpose processor, a microprocessor, a microcontroller, a content addressable memory, a digital signal processor, an application specific integrated circuit, a field programmable gate array, any suitable programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof, designed to support and/or perform the functions described herein.
During normal operation for grid-to-vehicle applications, the control module 216 determines pulse-width modulated (PWM) command signals that control the timing and duty cycles of the switches 20-34 of the matrix converter 208 to produce a high-frequency AC voltage across the primary windings 246 of the isolation module 206 which induces a voltage across the secondary windings 244 at nodes 222, 224 that results in a desired current (iDC) flowing to the DC interface 202 to charge the DC energy source 218. For example, in accordance with one embodiment, the control module 216 generates a sinusoidal PWM variable duty cycle control signal that controls state machine transitions, and thereby, the duty cycle of the switches (20-34) to implement the appropriate switching pattern during a switching interval (e.g., the inverse of the switching frequency). The control module 216 obtains, monitors, or otherwise samples voltage at the DC interface 202 (VDC) and compares the obtained DC voltage with a reference voltage (e.g., the desired voltage the DC interface 202) to obtain an error signal that is compared with high frequency carrier signal that corresponds to the switching frequency (e.g., 50 kHz) to obtain the sinusoidal PWM modulated duty cycle. When the error signal is less than the carrier signal, the control module 216 operates the switches 20-34 to effectively short-circuit nodes 232, 238 and cycle energy through the matrix converter 208 to apply a voltage across the inductor 210. When the error signal is greater than the carrier signal, the control module 216 operates the switches (20-34) to release the stored energy and/or voltage of the inductor 210 (alternatively, the fly-back voltage). The sum of the fly-back voltage and the voltage at the AC interface 214 is applied to the primary windings 246 of the isolation module 206, resulting in a power transfer to nodes 222, 224 and/or DC energy source 218. The control module 216 repeats the steps of operating the switches (20-34) to cycle energy through the matrix converter 208 when the error signal becomes less than the carrier signal and releasing the stored energy of the inductor 210 when the error signal is greater than the carrier signal. In this manner, the matrix converter 208 alternates between cycling energy through the inductor 210 and delivering energy to the isolation module 206 and/or DC interface 202 as needed throughout operation of the charging system 200.
The AC energy source 220 is also connected to an AC load 292. As discussed above, the AC load 292 may be any electrical device which uses AC power and is connected to the same AC energy source 220 as the electrical system 200. As discussed in further detail below, the control module 216 determines the active and reactive power used by the electrical system 200 and the AC load 292 and either pulls more reactive power or returns more reactive power such that the power drawn by the electrical system 200 and AC load 292 is substantially real from the perspective of the AC energy source.
It should be understood that FIG. 2 is a simplified representation of a electrical system 200 for purposes of explanation and is not intended to limit the scope or applicability of the subject matter described herein in any way. Thus, although FIG. 2 depicts direct electrical connections between circuit elements and/or terminals, alternative embodiments may employ intervening circuit elements and/or components while functioning in a substantially similar manner Additionally, although the electrical system 200 is described herein in the context of a matrix converter 208 for a vehicle, the subject matter is not intended to be limited to vehicular and/or automotive applications, and the subject matter described herein may be implemented in any application where an energy conversion module (e.g., buck converters, boost converters, power inverters, current source inverters and/or converters, voltage source inverters and/or converters, and the like) is utilized to transfer energy using switching elements.
Referring now to FIG. 3, in an exemplary embodiment, an electrical system may be configured to perform a control process 300 and additional tasks, functions, and operations described below. The various tasks may be performed by software, hardware, firmware, or any combination thereof. For illustrative purposes, the following description may refer to elements mentioned above in connection with FIG. 2. In practice, the tasks, functions, and operations may be performed by different elements of the described system, such as the first conversion module 204, the isolation module 206, the matrix converter 208, and/or the control module 216. It should be appreciated that any number of additional or alternative tasks may be included, and may be incorporated into a more comprehensive procedure or process having additional functionality not described in detail herein.
Referring to FIG. 3, and with continued reference to FIG. 2, the control process 300 initializes or begins by obtaining the voltage at the DC interface and obtaining the inductor current (tasks 302, 304). For example, the control module 216 may obtain, sample, or otherwise measure the voltage at the DC interface 202 and the current through the inductor 210 (e.g., via a current sensor configured between the inductor 210 and node 232 or node 240). The control process 300 continues by determining PWM command signals for the switches of the matrix converter (task 306). In this regard, the control module 216 utilizes high-frequency PWM to modulate or otherwise operate the switches 20-34 of the matrix converter 208 to provide a desired voltage, current or power at the output 222, 224 of the secondary windings 244, in a similar manner as described above in the context of FIG. 2. The PWM command signals control the timing of the respective switches 20-34 of the matrix converter 208 over a switching interval (or PWM cycle), that is, when a respective switch is closed, turned on, or otherwise activated.
For example, referring again to FIG. 2, when the inductor current is in a positive direction (e.g., iL>0), the control module 216 concurrently closes (or turns on) switches 22, 26, 30 and 34 to cycle or otherwise circulate the inductor current (iL) through the matrix converter 208 to apply a voltage across the inductor 210. To release the stored energy and/or voltage of the inductor 210 and deliver a positive voltage across (or a positive current through) the secondary windings 244, the control module 216 opens (or turns off) switches 22 and 26 while maintaining switches 30 and 34 in a closed state, such that only switches 30 and 34 are conducting the inductor current (iL) from node 232 to node 238 via the primary windings 246 to apply a positive voltage across the primary windings 246. After a particular amount of time, the control module 216 closes switches 22 and 26 to cycle energy through the matrix converter 208, as set forth above. To deliver a negative voltage across (or a negative current through) the secondary windings 244, the control module 216 opens (or turns off) switches 30 and 34 while maintaining switches 22 and 26 in a closed state, such that only switches 22 and 26 are conducting the inductor current (iL) from node 232 to node 238 via the primary windings 246 to apply a negative voltage across the primary windings 246. The timing of when the switches 22, 26, 30 and 34 are closed as well as the duration for which the switches 22, 26, 30 and 34 are closed (i.e., the duty cycles) are determined by the control module 216 to provide a desired voltage (or current) at the output 222, 224 of the secondary windings 244, as described above.
In a similar manner, when the inductor current is in a negative direction (e.g., iL<0), the control module 216 concurrently closes (or turns on) switches 20, 24, 28 and 32 to cycle or otherwise circulate the inductor current (iL) through the matrix converter 208. To release the stored energy and/or voltage of the inductor 210 and deliver a positive voltage across (or a positive current through) the secondary windings 244, the control module 216 opens (or turns off) switches 28 and 32 while maintaining switches 20 and 24 in a closed state, such that only switches 20 and 24 are conducting the inductor current from node 238 to node 232 via the primary windings 246 to release the stored energy of the inductor 210 and apply a positive voltage across the primary windings 246. After a particular amount of time, the control module 216 closes switches 28 and 32 to cycle energy through the matrix converter 208, as set forth above. To deliver a negative voltage across (or a negative current through) the secondary windings 244, the control module 216 opens (or turns off) switches 20 and 24 while maintaining switches 28 and 32 in a closed state, such that only switches 28 and 32 are conducting the inductor current from node 238 to node 232 via the primary windings 246 to release the stored energy of the inductor 210 and apply a negative voltage across the primary windings 246. The timing of when the switches 20, 24, 28 and 32 are closed as well as the duration for which the switches 20, 24, 28 and 32 are closed (i.e., the duty cycles) are determined by the control module 216 to provide a desired voltage (or current) at the output 222, 224 of the secondary windings 244, as described above.
Referring again to FIG. 3, and with continued reference to FIG. 2, in accordance with one embodiment, the control process 300 determines whether current injection should be enabled (task 308). In this regard, the control module 216 may compare the obtained inductor current (iL) to one or more threshold values to determine whether current injection should be enabled or disabled. For example, in one embodiment, the control module 216 obtains a measured value of the inductor current (iL) (e.g., by sampling and/or reading a value from the current sensor) and determines a moving average (īL) for the inductor current based on the most recently obtained value of the inductor current (iL) and previously obtained values for the inductor current. Determining a moving average reduces the effects of noise on the measured values for the inductor current, as will be appreciated in the art. When current injection was not previously enabled for a preceding switching interval, the control module 216 compares the magnitude of the moving average of the inductor current to a first threshold value, and enables current injection when the magnitude of the moving average is greater than the first threshold value. In this regard, the first threshold value is chosen to be a value for a magnitude of current through the inductor 210 that is sufficiently likely to produce transient voltage spikes across switches of the matrix converter 208 that would exceed the breakdown voltages of the switches 20-34. When current injection was enabled for a preceding switching interval, the control module 216 compares the magnitude of the moving average to a second threshold value, and disables current injection when the magnitude of the moving average is less than the second threshold value. In an exemplary embodiment, the first threshold value is greater than the second threshold value to provide hysteresis and prevent the control process 300 from oscillating between enabling and disabling current injection. For example, in accordance with one embodiment, the first threshold value is chosen to be about 4 amperes and the second threshold value is chosen to be about 2 amperes. It should be noted that in some embodiments, current injection may be enabled at all times regardless of the magnitude of the inductor current.
In an exemplary embodiment, in response to determining that current injection should not be enabled (or alternatively, that current injection should be disabled), the control process 300 continues by operating the matrix converter based on the PWM command signals for the switches of the matrix converter (task 310). In this manner, when the current injection is disabled, the control module 216 operates the switches 20-34 of the matrix converter 208 in accordance with the previously determined PWM command signals to alternate between cycling the inductor current through the matrix converter 208 and delivering energy to the DC interface 202 and/or DC energy source 218, as described above. The loop defined by tasks 302, 304, 306, 308 may repeat throughout operation of the electrical system 200 until the inductor current exceeds the first threshold value and the control process 300 determines that current injection should be enabled.
In response to determining that current injection should be enabled, the control process 300 continues by determining PWM command signals for injecting current through the primary windings of the isolation module to the matrix converter (task 312). In an exemplary embodiment, based on the voltage (VDC) at the DC interface 202 and the inductor current, the control module 216 determines the timing and duty cycles (or pulse widths) for operating the switches 52-58 of the first conversion module 204 to provide an injection current through the primary windings 246 to reduce the current through one or more of the closed switches of the matrix converter 208 and prevent transient voltage spikes that exceed the breakdown voltages of the switches 20-34 when one or more switches of the matrix converter 208 are subsequently opened. In an exemplary embodiment, the control module 216 implements a two-dimensional lookup table and determines the timing and duty cycles for the switches 52-58 based on the absolute value of the inductor current (iL) and the voltage (VDC) at the DC interface 202. In this regard, the lookup table consists of values for the duty cycles (or pulse widths) for concurrently turning on a respective pair of switches 52-58 and the timing for when the respective switches 52-58 should be turned on/off relative to opening a pair of switches of the matrix converter 208 to deliver energy to the DC interface 202. The control module 216 identifies or otherwise determines the pair of switches 52-58 to be closed concurrently to provide the injection current based on the anticipated direction of the current through the isolation module 206. For example, based on the direction of the inductor current (iL) and/or the PWM command signals for the switches 20-34 of the matrix converter 208, the control module 216 identifies switches 52 and 58 as the pair of switches to be closed to provide the injection current through the primary windings 246 from node 234 to node 236 before the matrix converter 208 is operated to apply a negative voltage to the primary windings 246 and identifies switches 54 and 56 as the pair of switches to be closed to provide the injection current through the primary windings 246 from node 236 to node 234 before the matrix converter 208 is operated to apply a positive voltage to the primary windings 246, as described in greater detail below.
After determining PWM command signals for providing an injection current through the primary windings of the isolation module, the control process 300 continues by operating the matrix converter based on the PWM command signals for the switches of the matrix converter and providing the injection current through the primary windings before delivering energy to the DC interface and/or DC energy source (tasks 314, 316). In this manner, the control module 216 operates the switches 20-34 of the matrix converter 208 in accordance with the previously determined PWM command signals to alternate between cycling the inductor current (iL) through the matrix converter 208 and delivering energy to the DC interface 202 and/or DC energy source 218. The control module 216 operates the switches 52-58 of the first conversion module 204 in accordance with the previously determined PWM command signals for injecting current through the primary windings 246 of the isolation module 206 to conduct current through the secondary windings 244 and induce or otherwise provide the injection current through the primary windings 246 before opening one or more switches of the matrix converter 208 to deliver energy to the DC interface 202 and/or DC energy source 218. The loop defined by tasks 302, 304, 306, 308, 310, 312, 314 and 316 may repeat as desired throughout operation of the electrical system 200.
FIG. 4 illustrates an exemplary control strategy 400 which could be implemented, for example, by the control module 216. The control strategy includes a constant voltage mode, a constant voltage mode and a constant power mode. Each of the control strategies (i.e., constant voltage, current or power) generates a reference current Iref which is then used to calculate an off-time duty ratio Uref. Uref is then input to control module 216 and used to generate the PWM command signals for the switches 20-34 and 52-58 of the matrix converter as discussed above. Furthermore, the control module 216 is configured to either pull more reactive current from, or return extra reactive current to, the AC interface 214 in each of the control modes such that the power drawn from the AC energy source 220 by the electrical system 200 and the AC load 292 is substantially real from the perspective of the AC energy source, as discussed in further detail below.
In order to determine the reference current Iref when operating in the constant voltage mode, the control module 216 first determines a voltage Vref required to charge the battery and measures the current voltage across the battery Vout. The controller then, at block 410, computes the result of equation one.




  
    
      
        
          
            Vref
            2
          
          2
        
        -
        
          
            Vout
            2
          
          2
        
      
    
    
      
        (
        1
        )
      
    
  




The voltage output of block 410 is then input to voltage regulator 412. The voltage regulator 412 may be designed in a way to provide low pass functionality for the scaled energy error described in equation one (e.g. bellow 30 Hz) while providing phase boost for the outer voltage loop bandwidth frequency to be able to obtain a desired phase margin (e.g., >45 deg). The voltage regulator 412 outputs a power Pref based upon the output of block 410.
The controller then, at block 414, multiplies the power Pref by a ratio of the input AC voltage and the squared RMS AC voltage, according to equation two.




  
    
      
        Iref
        =
        
          Pref
          ×
          
            (
            
              Vac
              
                Vacrms
                2
              
            
            )
          
        
      
    
    
      
        (
        2
        )
      
    
  




The output of block 414 is a reference current Iref which is used to generate the off-time duty ratio as described in further detail below.
In order to determine the reference current Iref when operating in the constant current mode, the control module 216 first determines a desired battery current Idcref and the actual battery current Ibattery. The estimator 420 then calculates a current Iacmax corresponding to a current drawn from the AC energy source 220, according to equations three through five.




  
    
      
        
          Iac
          ⁢
          
            
          
          ⁢
          
            max
            ⁡
            
              (
              0
              )
            
          
        
        =
        
          
            (
            
              
                (
                
                  
                    8
                    ·
                    
                      Vout
                      2
                    
                    ·
                    
                      Idcref
                      2
                    
                  
                  
                    
                      3
                      ·
                      Vac
                    
                    ⁢
                    
                      
                    
                    ⁢
                    
                      max
                      2
                    
                  
                
                )
              
              +
              
                Icap
                ⁢
                
                  
                
                ⁢
                
                  max
                  2
                
              
            
            )
          
        
      
    
    
      
        (
        3
        )
      
    
  




Iacmax((k+1)Ts)=Iacmax(kTs)+kp(Idcref (kTs)−Ibatteryrms(kTs))   (4)





  
    
      
        Iacmzx
        ≤
        
          
            (
            
              
                (
                
                  
                    Idcref
                    2
                  
                  
                    Uref
                    2
                  
                
                )
              
              +
              
                Icap
                ⁢
                
                  
                
                ⁢
                
                  max
                  2
                
              
            
            )
          
        
      
    
    
      
        (
        5
        )
      
    
  




Equation three defines an initial maximum current that can be drawn from the AC energy source 220, where Vout corresponds to a present voltage across the battery 218, Vacmax corresponds to a maximum voltage which can be drawn from the AC energy source 220 (the maximum voltage Vacmax can vary by country and/or based upon the type voltage source), and Icapmax is the maximum current capable of being handled by capacitor 212.
The controller then increases the maximum current based upon equation four, where kTs represents a current time (in minutes, seconds, etc), (k+1)Ts represents a next time, kp represents a gain and Ibatteryrms represents a root-mean-square (RMS) of the current battery current. The gain kp is determined by the control module 216 and is used to control how quickly the current Iacmax is allowed to change. In one embodiment, for example, kp is determined by monitoring the dynamic response of ac current reference change. For example, in some instances it can be assumed that an incremental change in the ac current command is limited to a certain value and that kp can change adaptively to accommodate for that limit. In another embodiment, kp may be determined via experimental tuning to avoid unnecessary transients in the battery current.
The control module 216, while increasing the maximum current Iacmax, monitors Iacmax to ensure the current doesn't exceed a maximum amount of current using equation five.
The current Iacmax output from estimator 420 is then multiplied, at block 422, by a gain corresponding to a ratio of the present voltage Vac from the AC energy source 220 and the maximum voltage Vacmax capable of being drawn from the AC energy source 220, according to equation six.




  
    
      
        Iref
        =
        
          Iac
          ⁢
          
            
          
          ⁢
          max
          ×
          
            (
            
              Vac
              
                Vac
                ⁢
                
                  
                
                ⁢
                max
              
            
            )
          
        
      
    
    
      
        (
        6
        )
      
    
  




The output of block 422 corresponds to the current Iref used to determine which is used to generate the off-time duty ratio as described in further detail below.
In order to determine the reference current Iref when operating in the constant power mode, the control module 216 multiplies, at block 430, the desired constant power Pconst by a ratio of the current voltage Vac output by the AC energy source 220 and the RMS voltage Vacrms output by the AC energy source 220 in accordance with equation seven.




  
    
      
        Iref
        =
        
          Pconst
          ×
          
            (
            
              Vac
              
                Vacrms
                2
              
            
            )
          
        
      
    
    
      
        (
        7
        )
      
    
  




The control module then takes the reference current Iref, generated for either the constant voltage mode, constant current mode or constant power mode, and generates the off-time duty ratio Uref to control switches 20-34 and 52-58 while compensating for any reactive current drawn by the electrical system 200, as discussed in further detail below..
In one embodiment, for example, the control module determines an amount of reactive current Ir to provide to, or take from, the AC interface 214 such that the perceived current drawn from the AC interface 214 is substantially real. The control module 216, at block 442, may receive an instantaneous voltage Vac of the AC energy source 220, the amount of power Pbattery that is desired to be provided to the DC energy source 218 and information on the AC load 292. The information may include, for example, an estimated charge Qacload of the AC load 292. In one embodiment, for example, the estimated charge Qacload may be provided by a smart meter. In another embodiment, a utility advanced metering infrastructure (AMI) device, where the AMI device measures, collects and analyzes energy usage from an electrical meter (not shown) of the AC interface 214 may estimate the charge Qacload. The control module then estimates the reactive current Ir according to equations eight through ten.




  
    
      
        Vr
        =
        
          
            1
            
              3
              ⁢
              
                
              
              ⁢
              T
            
          
          ⁢
          
            
              ∫
              
                t
                -
                
                  3
                  ⁢
                  
                    
                  
                  ⁢
                  T
                
              
              t
            
            ⁢
            
              
                Vac
                ·
                
                  cos
                  ⁡
                  
                    (
                    
                      ω
                      ⁢
                      
                        
                      
                      ⁢
                      t
                    
                    )
                  
                
              
              ⁢
              
                
              
              ⁢
              
                d
                t
              
            
          
        
      
    
    
      
        (
        8
        )
      
    
  
  
    
      
        Vi
        =
        
          
            1
            
              3
              ⁢
              
                
              
              ⁢
              T
            
          
          ⁢
          
            
              ∫
              
                t
                -
                
                  3
                  ⁢
                  
                    
                  
                  ⁢
                  T
                
              
              t
            
            ⁢
            
              
                Vac
                ·
                
                  sin
                  ⁡
                  
                    (
                    
                      ω
                      ⁢
                      
                        
                      
                      ⁢
                      t
                    
                    )
                  
                
              
              ⁢
              
                
              
              ⁢
              
                d
                t
              
            
          
        
      
    
    
      
        (
        9
        )
      
    
  
  
    
      
        Ir
        =
        
          
            
              Vi
              ·
              Pbattery
            
            -
            
              Vr
              ·
              Qacload
            
          
          
            
              V
              2
            
            ⁢
            acrms
          
        
      
    
    
      
        (
        10
        )
      
    
  




Where: t is time;

T is a period for a cycle of the AC interface 214;
ω is the instantaneous angular frequency of AC source 220 (ω relates to the grid frequency f as 2*pi*f; and
Vac is an instantaneous voltage
In this embodiment, the reactive current Ir is calculated once for every three cycles of the AC interface 214 (i.e., once every 3 T). However, in other embodiments, the reactive current could be determined for each period of the AC interface or for any other number of periods. The amount of reactive current Ir to be pulled from the AC interface 214 or added thereto by the control module 216 may be reduced based upon a maximum amount of current that can safely be drawn by the electrical system 200 without risking damage to any of the components thereof In one embodiment, for example, the maximum current is twenty-five amps rms.
In another embodiment, for example, the control module 216 may also compensate for harmonics of power drawn by the AC load 292 or the electrical system 200 from the AC energy source 220. In this embodiment, the control module, while calculating the reactive current Ir also determines a harmonic current Ih which may also be added to the reference current Iref at block 440. The harmonic current Ih, similar to the reactive current Ir, can be incorporated into the calculation for Idiff (equation eleven discussed below), such that the current drawn from the AC energy source 220 by the electrical system and the AC load 292 is substantially harmonic free, from the perspective of the AC energy source 220.
The control module 216 then calculates the difference Idiff between Iref, the current Icap across capacitor 212, the current Iind (labeled current 290 in FIG. 2) across inductor 210 and the inductor current at block 440 and the determined reactive current Ir in accordance with equation eleven.

Idiff=−Iref+Icap+Iind+Ir   (11)

In the embodiment illustrated in FIG. 4, Icap and IR are first added together at a block 444 before being added to Iref and Iind at block 440, however any configuration of adders or any other logic may be used.
Because Uref is an off-time duty ratio Idiff is generally going to be a negative number. In another embodiment an on-time duty ratio could be used to control, for example, switches 20-34 and 52-58 in FIG. 2, where a positive Idiff would be used.
The control module then, at block 450, multiplies the current Idiff by a gain K1. Gain K1 is determined by the controller and may vary depending upon the needs of the system. The gain K1 directly affects the bandwidth of the system which effects how quickly Uref is changed. K1 is a gain that is directly proportional to the bandwidth of the inner current loop. Larger values of K1 can bring undesired oscillations in the current control because of small phase margin influenced by computational delays in the microcontroller. The output of block 450 is an error current signal with a dominant fundamental frequency component (e.g. 60 Hz).
The control module 216 then, at block 460, adds the current voltage Vac output from the voltage source 220 to the voltage output from block 450. Finally, the control module 216, at block 470, determines Uref by dividing the voltage output from block 460 by the current voltage Vout across the battery 218.
The off-time duty ratio Uref is then used to create the PWM command signals. Uref determines a ratio of effective time used for power delivery comparing to PWM period. As discussed above, the rate at which Uref is updated may vary. However, as discussed above, the PWM signals may be updated at a rate of 50 kHz.
For the sake of brevity, conventional techniques related to electrical energy and/or power conversion, electrical charging systems, power converters, pulse-width modulation (PWM), and other functional aspects of the systems (and the individual operating components of the systems) may not be described in detail herein. Furthermore, the connecting lines shown in the various figures contained herein are intended to represent exemplary functional relationships and/or physical couplings between the various elements. It should be noted that many alternative or additional functional relationships or physical connections may be present in an embodiment of the subject matter.
Techniques and technologies may be described herein in terms of functional and/or logical block components, and with reference to symbolic representations of operations, processing tasks, and functions that may be performed by various computing components or devices. It should be appreciated that the various block components shown in the figures may be realized by any number of hardware, software, and/or firmware components configured to perform the specified functions. For example, an embodiment of a system or a component may employ various integrated circuit components, e.g., memory elements, digital signal processing elements, logic elements, look-up tables, or the like, which may carry out a variety of functions under the control of one or more microprocessors or other control devices.
While at least one exemplary embodiment has been presented in the foregoing detailed description, it should be appreciated that a vast number of variations exist. It should also be appreciated that the exemplary embodiment or embodiments described herein are not intended to limit the scope, applicability, or configuration of the claimed subject matter in any way. Rather, the foregoing detailed description will provide those skilled in the art with a convenient road map for implementing the described embodiment or embodiments. It should be understood that various changes can be made in the function and arrangement of elements without departing from the scope defined by the claims, which includes known equivalents and foreseeable equivalents at the time of filing this patent application.

## Claims

1. A charging system, comprising:
a rechargeable battery;
an interface configured to be coupled to a voltage source providing a voltage; and
a controller configured to receive the voltage through the interface and to recharge the rechargeable battery using the received voltage,
wherein the controller is further configured to:
receive information on an alternating current (AC) load electrically connected to the voltage source;
determine an amount of reactive current to return to the voltage source such that a current drawn by the charging system and the AC load from the voltage source is substantially real; and
provide the determined reactive current to the voltage source while the rechargeable battery is being recharged.

2. The charging system of claim 1, wherein when the controller is in a constant voltage mode, the controller provides a constant voltage to the rechargeable battery, when the controller is in a constant current mode, the controller provides a constant current to the rechargeable battery, and when the controller is in a constant power mode, the controller provides a constant power to the rechargeable battery.

3. The charging system of claim 1, wherein the controller is further configured to:
determine and average amount of reactive current drawn by the charging system and the AC load over a predetermined period; and
provide reactive current to the voltage source based upon the determined average amount of reactive current for a subsequent predetermined period.

4. The charging system of claim 3, wherein the predetermined period is three cycles of the voltage source.

5. The charging system of claim 1, wherein the controller is further configured reduce an amount of reactive current provided to the voltage source when the current drawn by the charging system exceeds a predetermined threshold.

6. The charging system of claim 1, wherein the controller further comprises a matrix conversion module including a plurality of gates which control a flow of current from the voltage source to the rechargeable battery, wherein the controller selectably operates the gates based upon which mode the controller is in.

7. The charging system of claim 6, wherein the controller is further configured to generate a reference current depending upon the mode the controller is in, and to use the reference current to create an off-duty time ratio to control the plurality of gates.

8. An electrical system, comprising:
a first load;
an interface configured to receive a voltage from a voltage source; and
a controller configured to receive the voltage through the interface and to provide a voltage and current to the first load,
wherein the controller is further configured to:
receive information on a second load electrically connected to the voltage source;
determine an amount of reactive current to return to the voltage source such that a current drawn by the electrical system and the second load from the voltage source is substantially real; and
provide the determined reactive current to the voltage source.

9. The electrical system of claim 8, wherein, when the controller is in a constant voltage mode, the controller provides a constant voltage to the load, when the controller is in a constant current mode, the controller provides a constant current to the load, and when the controller is in a constant power mode, the controller provides a constant power to the load.

10. The electrical system of claim 8, wherein the controller is further configured to:
determine and average amount of reactive current drawn by the charging system and the AC load over a predetermined period; and
provide reactive current to the voltage source based upon the determined average amount of reactive current for a subsequent predetermined period.

11. The electrical system of claim 10, wherein the predetermined period is three cycles of the voltage source.

12. The electrical system of claim 8, wherein the controller is further configured reduce an amount of reactive current provided to the voltage source when the current drawn by the electrical system exceeds a predetermined threshold.

13. The electrical system of claim 8, wherein the controller further comprises a matrix conversion module including a plurality of gates which control a flow of current from the voltage source to the first load, wherein the controller selectably operates the gates based upon which mode the controller is in.

14. The electrical system of claim 13, wherein the controller is further configured to generate a reference current depending upon the mode the controller is in, and to use the reference current to create an off-duty time ratio to control the plurality of gates.

15. The electrical system of claim 8, wherein the controller is further configured to:
determine an amount of harmonic current to return to the voltage source such that a current drawn by the electrical system and the second load from the voltage source is substantially harmonic free; and
providing the determined harmonic current to the voltage source.

16. A method of providing a voltage and current from a voltage source to a first load by a controller coupled to the load, comprising:
providing, when the controller is in a constant current mode, a constant current charge to the first load;
providing, when the controller is in a constant voltage mode, a constant voltage to the first load;
providing, when the controller is in a constant power mode, a constant power charge to the first load; and
providing, when the controller is in the constant current mode, the constant voltage mode or the constant power mode, a reactive current to the voltage source such that the current drawn from the voltage source is substantially real.

17. The method of claim 16, further comprising receiving information on a second load electrically connected to the voltage source; and
providing, when the controller is in the constant current mode, the constant voltage mode or the constant power mode, a reactive current to the voltage source such that the current drawn from the voltage source by the first load and the second load is substantially real.

18. The method of claim 16, further comprising:
determining an average amount of reactive current drawn over a predetermined number of periods such that the current drawn from the voltage source is substantially real over the predetermined number of periods; and
providing the determined average reactive current to the voltage source based over a subsequent predetermined number of periods.

19. The method of claim 18, wherein the predetermined period is three cycles of the voltage source.

20. The method of claim 16, further comprising reducing an amount of reactive current provided to the voltage source when the current drawn exceeds a predetermined threshold.