Power Seminar topics and online powertraining modules are available at: power.ti.com/seminars
I. IntroductIon
With the growing interest in green systems, the solar-powered light is gaining popularity. Although many solar-powered lights are grid connected, a number of applications such as venue lighting, parks, and areas without grids use batteries for energy storage during the day. As shown in Fig. 1, a typical solar-powered system provides three functions: During the day, solar power is converted to electricity with photovoltaic (PV) cells. A battery charger replenishes a lead-acid battery for energy use during the night. LEDs are used to provide light during the evening. A small bias supply, which can run either from the solar panel or the battery, is used to power the control electronics.
Interestingly, a number of control loops exists within this system. The most challenging is the battery charger; it must determine the maximum power point available from the solar panel. This is a function of solar irradiance (incident solar energy) as well as temperature. The most cost-effective way to achieve this is to use a microcontroller or DSP. Once the choice to implement digital control is made, it is possible to implement the entire design with a single DSP.
PV Solar Panel
Battery Charger
LeadAcid Battery
LED Driver
LED Panel
Control
LED Driver
LED Panel
Topic 7
16.8 16.2 15.6 Maximum Voltage 15.0 14.4 Minimum Voltage 13.8 Float Voltage 13.2 12.6 3 0
2 0
40
50
Fig. 2. AGM/gel charging voltage versus temperature. circuit redesign. Additionally, software control could program one string to logically shut down based on battery life. Because the LEDs were intended to illuminate a walkway or path, the choice of 24 W was considered a good balance between overall brightness and battery life. Based on the 24-W LED driver load, battery capacity can be determined. To draw 2 A (24 W/ 12 V) from the battery for eight hours over three days (with additional capacity due to poor weather), then a battery with a minimum capacity of 48 Ah is required. The MK 8A22NF Absorption Glass Mat (AGM) battery with 63-Ah capacity (at a 100hour discharge rate) was chosen. AGM is a sealed, lightweight, high-charge-efficiency battery with performance characteristics similar to lead-acid gel batteries. Lead-acid batteries were chosen because of their low cost per Ah compared to other chemistries. Fig. 2 shows a graph of the recommended bulk-charging voltage and float-voltage level, as well as its high dependency on cell temperature. Battery temperature monitoring is necessary to assure proper charging levels. At 25C, a bulkcharge voltage of 14.4 V and a float voltage of 13.4 V are recommended. Table 1 shows how the battery state of charge is nearly proportional to its open-circuit voltage.
This can be used to determine when the battery is discharged and the LEDs should be turned off. This cutoff level is somewhat flexible in that the lower it is set, the longer the run time, but the shorter the battery life. A 50-W solar panel in full sunlight for five hours a day can charge a 12-V battery with a hypothetical maximum of 250 Wh. The LEDs are expected to consume 192 Wh per day, so a 50-W solar panel can provide about 25% peak excess capacity daily; not necessarily a lot of margin, but still adequate for operation. A Kyocera KC50 solar panel with the current/ voltage (I/V) characteristics shown in Fig. 3 was selected. This panel is capable of sourcing just slightly more than 3 A in full sunlight, but like the batteries charging voltage, its voltage is also highly temperature dependent. This will necessitate the use of a pulse-width modulation (PWM) buck converter that can operate near 100% efficiency to fully utilize available power.
Topic 7
Texas Instruments
7-2 2
SLUP267
4
2
3
PV Current (A)
PV Current (A)
75C 2 50C 1
25C
0 0 10 PV Voltage (V) 20 30
0 0 10 PV Voltage (V) 20 30
Fig. 3. Kyocera KC50 solar panel I/V characteristics. Fig. 4 shows the I/V characteristic for a typical 50-W solar panel and 25C cell temperature. The dashed line is a plot of PV power against PV voltage. The solid line plots PV current against PV voltage. As shown in the graph, at 12 V, the output power is about 36 W. In other words, by forcing the PV-solar modules to operate at 12 V, power is limited to about 36 W at peak irradiance. With an MPPT algorithm implemented, the situation changes dramatically. In this example, the voltage at which the solar panel achieves maximum power is 17 V. So the role of the MPPT algorithm is to operate the solar panel at 17 V, thereby extracting the full 50 W, regardless of battery voltage. A high-efficiency DC-to-DC power converter converts the 17-V PV voltage at the controller input to battery voltage at the output. Because the DC/DC converter steps the 17 V down to 13.8 V, the battery charge current for the MPPT-enabled system in this example would be: VPV 17 I PV = 2.9 = 4.1 A VBAT 12 (1) supply. This topology has both advantages and disadvantages depending on the application. There are three main types of MPPT algorithms: perturb and observe (P&O), incremental conductance (INC), and constant voltage. The first two methods are often referred to as hillclimbing methods because they depend on the fact that when observing the power/voltage characteristics of the solar-array, the curve to the left of the maximum power point (MPP) is rising (dP/dV > 0), and to the right side of the MPP, the curve is falling (dP/dV < 0). The P&O method is the most common. The algorithm perturbs the operating voltage in a given
3.5 PV Current 3 Conventional Controller Extracts 36 W at 12 V
PV Current (A)
70 60 50 40 30 20 10 0 0 5 10 15 PV Voltage (V) 20 25
Assuming 100% conversion efficiency in the DC/ DC converter, the increase in available charge current is 1.2 A; a 42% increase. Although this example presumes that the power system is handling the energy from a single solar panel, conventional systems typically have an array of panels connected to a single power 7-3 3
Texas Instruments
Topic 7
PV Power (W)
direction and samples dP/dV. If dP/dV is positive, the algorithm knows to adjust the voltage in the direction toward the MPP. It keeps adjusting the voltage in that direction until dP/dV is negative. P&O algorithms are easy to implement but sometimes result in oscillations around the MPP in steady-state operation. They also have slow response times and can even track in the wrong direction under rapidly changing atmospheric conditions. The INC method uses the solar arrays incremental conductance, dI/dV, to compute the sign of dP/dV. INC circuitry tracks rapidly changing irradiance conditions more accurately than P&O, but like P&O it can produce oscillations and be confused by rapidly changing atmospheric conditions. Another disadvantage is that its increased complexity increases computation time and slows down the sampling frequency. The third method, the constant-voltage method, makes use of the fact that, generally speaking, the ratio of the PV voltage at MPP to the PV opencircuit voltage is about 0.76. The problem with this method is that it requires momentarily setting the PV current to zero to measure the arrays opencircuit voltage. The arrays operating voltage is then set to 76% of this measured value. During the time the array is disconnected, however, the available energy is wasted. It has also been found that although 76% of the open-circuit voltage is a very good approximation, it does not always represent the actual MPP voltage. Because there is not a single MPPT algorithm that successfully addresses all common-use scenarios, many designers go the extra step of having the system assess environmental conditions and select the algorithm with the best fit. In fact, many MPPT algorithms are available and it is not uncommon for solar-panel manufacturers to provide their own. See Reference [1] for further discussion.
(SEPIC) and the flyback. The SEPIC has several features that make it more attractive than a flyback. It controls the ringing on the MOSFET switch and output diodes to reduce electromagnetic interference (EMI) and voltage stress. In many cases, this allows the use of lower-voltage parts, which can cost less and may be more efficient. Also, the SEPIC provides better cross regulation in multiple-output converters, which may eliminate the need for linear regulators. On the downside, the SEPIC control characteristics are not as well understood as the flyback but choosing a reasonable frequency with a good phase margin minimizes design problems. Fig. 5 shows a SEPIC converter; it, like a flyback, has a minimal parts count. Actually, this circuit would be a flyback if C1 were removed. This capacitor is quite advantageous in that it provides voltage clamping for the MOSFET switch (Q1) and D1. When Q1 is turned on, the reverse voltage on D1 is clamped by the capacitor through Q1. When Q1 is turned off, the Q1-drain and D1-anode voltage rises until D1 conducts. During Q1 off time, the drain voltage is clamped by C1 through D1 and C2. As shown in Fig. 5, this example has multiple outputs. There is a constraint on the T1 winding ratios. The secondary winding connected to C1 must have a 1:1 turns ratio to the primary. Any secondary winding can be used providing it has a 1:1 ratio. The circuit in Fig. 5 has been built and tested. It was operated as a SEPIC with C1 in place and as a flyback with C1 removed. Fig. 6 shows the Q1 voltage stresses in both operating modes.
Topic 7
Texas Instruments
SLUP267
R1 17.4 k
C3 1 F 50 V C5 1 F 10 9 8 7 6 R3 10
3
C2 10 F
C6 100 pF
R2 191 k 1 2 3 4 5
U12 TPS40210DGQ
VDD RC VBP SS DIS/EN GDRV COMP ISNS GND FB PwPd 11 C9 470 pF TP1
R4 15 k
C7 0.1 F
C4 10 F
Q1 Si3430DV
R5 4 1 k
R6 2.80 k
C8 1 F
Time (1 s/div)
Time (1 s/div)
a. Flyback operation.
b. SEPIC operation.
Fig. 6. A SEPIC topology dramatically reduces EMI and voltage stress. In the flyback mode, the Q1 drain voltage went to 40 V, while in the SEPIC mode, the drain voltage was only 25 V. So the flyback design would have to use a 40-V MOSFET, while the SEPIC design could use 30-V parts. In addition, the flyback high-frequency (>5-MHz) ringing would be problematic for EMI filtering. Cross regulation of the two circuits was measured; the SEPIC had substantially better cross regulation. In both, the 5-V output held at 5.05 V, by the action of the feedback loop, while the loads were varied from no load to full load and the input voltage was set to 12 or 24 V. With no load on the Texas Instruments 7-5 5 12-V output and full load on the 5-V output, the 12-V output of the SEPIC remained in a 10% regulation band, whereas the flyback 12-V output went to 30 V at high line input. Efficiency between the two configurations was the same but would have favored the SEPIC if power parts selection had been consistent with voltage stresses. To summarize, SEPICs are a valuable topology for nonisolated power supplies. They clamp the MOSFET voltage stress to a value equal to the sum of the input and output voltages and eliminate EMI seen in a flyback topology. The reduced voltage stress may allow the use of lower voltage parts, SLUP267
Topic 7
resulting in a more efficient and less costly supply. And the reduced EMI will simplify the compliance testing of the final product. Finally, using a SEPIC topology in multiple-output supplies improves cross regulation when compared to a flyback.
current never drops to zero before Q13 switches on again. Since the LED load current is constant and the batteries voltage range is rather limited, the inductors minimum-to-maximum current range will also be restricted. The inductors peakto-peak ripple current can be allowed a larger swing and yet still maintain CCM operation. This is beneficial in reducing the inductors value and size. An efficiency of greater than 93% was measured with a 12-V input. The 47-V zener diode (D15) and 49.9- resistor (R81) on the output forms an open-LED protection circuit. This is a useful feature to add, since the output voltage is regulated to a fixed voltage in the event of an open LED. If an openLED fault occurs with any of the series LEDs or
10x LEDs 35 V at 0.35 A J6 TP17 1 LEDA 2 LEDC D15 47 V TP18
TP14
L2 47 H TP15
C44 10 F 25 V
C45 10 F 25 V
Q13 Si7850DP 4
C46 3.3 F 50 V
C47 DNP
fsw = 400 kHz R86 10 k C49 R85 330 pF 402 k C50 3300 pF 1 2 3 4 5
3 2 1
R81 49.9
TP19
U12 TPS40211DGQ
VDD RD VBP SS DIS/EN GDRV COMP ISNS GND FB PwPd 11 C52 0.1 F TP20 10 9 8 7 6
Topic 7
R88 4.99 k
R82 0.75
R83 DNP
C56 100 pF
Fig. 7. A boost converter regulates current in LEDs. Texas Instruments 7-6 6 SLUP267
their wiring, the voltage across R82 drops to zero. The control circuit responds by increasing the PWM ON time and boosts the output voltage higher in an attempt to increase the LED current, which it cannot. This can overstress or destroy the output capacitors, diode D14, and/or MOSFET Q13. In operation, as the output voltage rises, the zener diode (D15) eventually conducts current to ground, but through a much larger 49.9- currentsense resistor (R81). This provides an alternate feedback voltage that is no longer provided by the LED current-sense resistor (R82). The converter safely sources an output current of 5 mA and clamps the output voltage to a predetermined safe level. The power stages for both the analog and digital implementation of the boost converters are nearly identical. But several modifications are necessary for DSP control of the LED driver. The TPS40211 controller is eliminated and replaced with a simple MOSFET driver controlled directly by the DSP. An external amplifier is necessary to increase the small voltage available from the LED current-sense resistor to approximately 3 V so that the analog-to-digital converter (ADC) can provide adequate resolution for feedback control. Voltagemode (VM) control is implemented because monitoring the MOSFET current on a cycle-bycycle basis requires extremely high clock speeds and ADC resolutions. Although operating in VM slightly increases control-loop complexity, it eliminates a loss element and increases efficiency. Compensation of the control loop is handled digitally by software using Z-domain transfer functions to maintain stability.
Battery Low-Voltage Protection VBAT < 5 V Battery Temperature Sensor Thermistor is open Battery Overvoltage Protection VCharge > 17 V
Texas Instruments
7-7 7
SLUP267
Topic 7
Q1 SUD50P04-13L
Q2 SUD50P04-13L 1 2
J1
C1 3.3 F 50 V
U1 INA194
VBIAS
D1 15 V R2 10 k
R1 100 k
1 2 3
R3 2 k D3 15 V C6 0.1 F
Q3 BSS138
VControl R4 DNP
Panel Disconnect
R9 49.9
Q5 SUD50P04-13L
PWM Control
C13 10 F 25 V
C14 10 F 25 V C15 10 F 25 V
D5 15 V
+
C12 150 F 50 V
Fig. 8. Battery charger power stage. typically $5/W. It is highly beneficial to extract every watt possible, which suggests that an MPPT approach is desirable. The analog approach for MPPT uses a constant voltage-tracking method with temperature compensation. The panel temperature is monitored and the MPP voltage adjusts as the temperature changes. Solar panels are highly temperature dependent, so as the solar panel heats up, the maximum power point shifts to a much lower voltage. To compensate for the lower temperature and operate the solar panel at the MPP for optimum efficiency, the switching regulator increases its PWM duty cycle to draw more current from the solar panel, thereby lowering the voltage. Conversely, lowering the current raises the solar panel voltage. For example, if the solar-panel output is currently 20 V and the target MPP at 25C is 17 V, the current is increased until the solar-panel voltage decreases. Because this is a dynamic processakin to hitting a moving targetthe control loop is constantly compensating to maintain regulation at the MPP. A temperature compensation of 94 mV/C is necessary to operate at the predicted MPP. Fig. 8 shows the power stage for the battery charger. Current into the battery is measured by the shunt-current monitor, R11 and U1. The U1 output is used along with the solar-panel voltage (or solar-panel error voltage in the analog design) to determine how to adjust the PWM duty cycle. Voltage thresholds for connecting the solar panel and bulk charging the battery are shown in Table 4. Once the battery is sufficiently charged, bulk charging is terminated and trickle charging is initiated. Several fault conditions are monitored and protection circuits implemented, with levels shown in Table 4. Battery temperature is measured and the maximum charge voltage is adjusted by 4.7 mV/C/cell to help prevent overcharging.
Topic 7
Texas Instruments
7-8 8
SLUP267
Memory
Power and Clocking Dual Osc (10 MHz) PowerOn Reset 3.3-V Supply (On-Chip 1.9 V ) BrownOut Reset
64- to 128-KB Flash 20-KB RAM Boot ROM Debug Real-Time JTAG
Enhanced Architecture
High-accuracy on-chip oscillators (10 MHz) Single 3.3-V supply with BOR/POR supervison
Intelligent Peripherals
150-ps resolution on PWM frequency and duty cycle 12-bit ratio-metric ADC with individual channel triggers Up to 3x analog comparators with 10-bit reference
Fig. 9. Piccolo MCUs offer a unique combination of performance and integration for real-time control.
have the interrupt-management infrastructure to guarantee real-time responsiveness. TIs new Piccolo microcontrollers have been designed to combine the real-time capabilities and power efficiency of traditional MCUs with the high performance and math capability of a DSP. Piccolo MCUs have the right mix of peripherals, and with a high-resolution PWM peripheral, can be used in power supplies requiring higher bandwidths and higher resolutions. The Piccolo MCU has been designed to bring increased capabilities in a small package to power-efficient and cost-sensitive control applications. These MCUs are based on TIs TMS320C2000 DSP platform, specifically the TMS320F28x 32-bit series (see Fig. 9). Referring to Fig. 1, the power system employs three control loops, system-level control, as well as MPPT calculations. This places quite a burden on the DSP, which is mitigated by a control law accelerator. This 32-bit floating-point math accelerator operates independently of the main CPU (after initial configuration). It is designed to run complex, high-speed control algorithms and free the main CPU to handle I/O and feedback-
SLUP267
Topic 7
loop metrics, resulting in as much as a 5x increase in performance for common control-loop applications. PWM topology is an essential element in controlling a switched-mode power supply. In addition to frequency and duty-cycle control, other control elements are dead band, rising- and fallingedge control, and synchronization. In an analog PWM generator, changing these control elements would mean redesigning the PWM generator. A digital design, however, can take all these elements into account because it is programmable. This means power designers can tweak control requirements with software and not worry about changes to the board. Piccolo MCUs can have up to seven enhancedPWM (ePWM) modules. Each ePWM module can have two outputs, with a dedicated 16-bit timebase counter that offers frequency control. The modules are programmable to provide phase-lead or phase-lag with respect to each other. A dedicated deadband generator is available with independent falling- or rising-edge delay control. In highresolution PWM (HRPWM) mode, it is possible to achieve resolutions of up to 150 ps, thus enabling the usage of Piccolo MCUs in high-bandwidth power supplies. Monitoring power-supply parameters such as voltage and current is required to regulate the supply outputs. These parameters need to be converted to digital domain using ADCs. The Piccolo ADC module consists of 16 input channels (0 to 3.3 V) with dual sample and hold, which enables monitoring parameters for multiple power stages. The converters 12-bit resolution is more than sufficient for this application. The Piccolo ADC peripheral is very flexible and is a complete system in itself. Conversion can be started from multiple triggers such as PWM signals, CPU timers, or GPIO signals, and each channels sample window can be programmed independently. This flexibility and configurability enables the implementation of increasingly involved control algorithms with Piccolo MCUs.
TIs Code Composer Studio software tool is used to develop software for Piccolo MCUs. This tool provides all of the necessary features of an integrated development platform and can be used for debugging and monitoring using real-time watch windows and graphs. Writing software still can be challenging, especially for power designers that do not have firmware development backgrounds. To make this transition easier, a software framework and power library for Piccolo MCUs is available. The software framework is a simplified way of implementing system software for any type of control application. As shown in Fig. 10, it divides system tasks into slow-running background operations and fast-running interrupt service routines (ISRs). A task state machine has already been implemented as part of the background code and tasks are arranged in groups (A1, A2, A3, ..., B1, B2, B3, ..., C1, C2, C3, ...). These tasks can be used for slow background operations and even communications. The fast ISR can be used to execute tight control loops to guarantee real-time responsiveness to the system. The software framework takes care of all basic device initialization operations and has the necessary elements to provide for instrumentation (like graphing data) and GUI control, which are useful for debugging and demonstration purposes. Thus the programmer does not need to worry about execution-time guarantees for the ISRs. Implementing a state machine for slow background tasks and device initialization is also taken care of by the framework; this saves a lot of softwaredevelopment overhead. The programmer only needs to decide what tasks need to be run and which control algorithms to implement. The power library provides the necessary peripheral drivers (PWMs and ADCs) to drive different power stages (buck drive, phase-shifted full bridge, etc.) and math blocks (2P2Z, IIR filter, etc.) to implement control loops. The library modules are available as macros that can be used to implement a system by simply connecting them through nets. This alleviates the burden of
Topic 7
Texas Instruments
7-10 10
SLUP267
Main
ISR
400 kHz
Initialization Device Level (CPU, PLL,...) Peripheral Level (ADC, PWM...) System Level (GPIO, Comms) Framework (BG/ISR) Interrupts
Execute Every IRS Call (Fast VLoop or ILoop) Time-Slice Manager (100 kHz)
Background Loop Startup/Shutdown/Sequencing Margining Diagnostics/Reporting/Comms Fault Management Return Slow Control Loops TS1 Loop 1 TS2 Loop 2 TS2 Filtering TS2 OVP Mgr
Fig. 10. A slow background loop handles system functions. configuring the peripherals and writing the basic blocks for the control algorithm. Moreover, the macros are written in a C-callable assembly fashion that guarantees execution time and enables tight control loops and real-time responsiveness. As shown in Fig. 8, three power stages exist on the battery-charger board. The buck power stage controls the battery-charging operation, and two boost stages control driving the LEDs. Thus, the DSP needs to support three control loops. To guarantee fast response times, the control loop for the power stages needs to be run very fast. Other operations include enabling/disabling different power stages, system state determination, MPPT generator (an MPPT algorithm is needed to track the MPP from the solar array), a soft-start mechanism is needed to ensure closed-loop operation, GUI variable scaling for instrumentation purposes, and tuning the control loop (PID coefficient tuning). The three major components of the system are: 1. Closed-loop buck. 2. Closed-loop boost. 3. Background operation (MPPT generator, soft start, GUI scaling, state decision).
Texas Instruments
7-11 11
SLUP267
Topic 7
Fig. 11 illustrates how these components can be incorporated into the system framework infrastructure. The fast control loops for the buck and the boost stages are executed in the ISR, which can be triggered by a PWM or other peripherals. Other operations form the background and can be divided as tasks in the task state machine, which already exists in the system framework. To implement a closed-loop buck converter, only three modules are required from the power library: ADC_NchDRV, ControlLaw_2P2Z, and BuckSingle_DRV. These modules execute as in-line code (no decision making) within the ISR_ Run routine, which is triggered at the PWM rate. The ADC_NchDRV macro reads the current ADC results; the ControlLaw_2P2Z block then calculates the error between system state (what is observed by the ADC to what it should be [reference point]) and computes the new duty cycle accordingly. The BuckSingle_DRV macro updates the duty cycle of the PWM. This is repeated for every ISR thus ensuring real-time responsiveness of the power supply.
It is important for a power supply to have proper start-up and shut-down routines. This is managed by the soft-start and sequencing code, which executes in the main background C code. Also, to ensure closed-loop operation, the Vref is kept at zero until a request is received to enable the output voltages. This is also managed in the background operations. Fig. 12 shows how the macro blocks are used to make a closed voltageloop buck stage. The voltage controller used in the system is based on the ideal proportional-integral-derivative (PID) controller, written in Laplace form as: G(s) = K p + Ki + sK d . s (2)
To implement this in the digital domain, a discrete approximation by numerical integration is used for integral and derivative terms. Using the Euler and trapezoidal approximation methods for the derivative and the integral terms, the equation in the z-domain can be written as: G(z) = K p + T z +1 z 1 Kd . Ki + 2 z 1 Tz (3)
Interrupt Service Request (ISR) (100 kHz) Context Save Get ADC ADC_DRV(N) Results
CNTL_2P2Z(3) BUCK_DRV(3)
Topic 7
Fig. 11. System software tasks split into a slow background loop and the fast ISR. 7-12 12
Texas Instruments
SLUP267
Coefficient Tuning Watch Window PgainV IgainV DgainV Soft Start CNTL_2P2Z Vref Delay Slope Target Out Duty 1 Ref Vout FB Voltage Controller VChrg Watch Window Vsoft SlewStep OnDelay OffDelay VSolar Watch Window Gui_VCharg Gui_ICharg Gui_VSolar GUI Scaling (BG Task) IChrg VChrg ADC Driver rslt1 rslt0 ADC Hardware ADC-B2 ADC-B1 ADC-B2 VSolar Feedback PID Mapping (3 5) Coefficient B2 B1 B0 A2 A1 IN ePWM Hardware EPWM3A VSolar DRV TPS28225D Buck CurrentSense Hardware
Buck Driver
Fig. 12. Macros are configured to close the voltage-control loop. Rearranging to express each term in the power of z: (2Tz 2Tz)G(z) = z (2TK p + T K i + 2K d ) + z(2TK p + T 2 K i 4K d ) +2K d . Redefining the controller gains as: K p = K p , K i = T 1 K i , K Kd , d = 2 T (5) (4)
2 2 2
where b0 = K p + K i + K d, b1 = K p + K i 2K d , and b2 = K d. The system uses the compensator block (macro), ControlLaw_2P2Z to implement the PID voltage controller. This block has two poles and two zeros and is based on the general infinite-impulseresponse (IIR) filter structure. The transfer function is then: U(z) b0 + b1z 1 + b 2 z 2 = . E(z) 1 + a1z 1 + a 2 z 2 (8)
the equation can be written as: (2Tz 2 2Tz)G(z) = z 2 (2TK p + 2TK i + 2TK d) + z(2TK p + 2TK i 4TK d) +2TK d. (6)
A common factor of 2T can be removed and the equation rearranged to find the transfer function: G(z) = b0 z 2 + b1z + b0 z2 z , (7)
Comparing the IIR filter structure with the discrete PID equation derived earlier, we can see that PID is nothing but a special case of a 2-pole/2-zero controller where a1 = 1 and a2 = 0. Thus, even though a 2-pole/2-zero controller is used, the more intuitive coefficient gains of P, I, and D are used for loop tuning, thus reducing the selection from five degrees of freedom to just three. The P, I, and D coefficients can be adjusted independently and gradually through the Code Composer Studio IDEs variable-watch window, with system behavior tuned to get the desired results. SLUP267
Texas Instruments
7-13 13
Topic 7
The LED drive circuit typically operates in closed-loop current mode. Fig. 13 illustrates the closed-current-loop boost stage, and how the nets were connected to implement it. It is interesting to note that this diagram is not much different from the earlier closed-loop buck stage. Fig. 13 also illustrates the reuse of the library macro blocks for implementing different systems without much change to the software. Both average-mode and peak-current-mode control can be implemented by using the flexible ePWM and ADC peripherals in Piccolo MCUs. The background loop is used to carry out a number of tasks that do not need to run as fast as the control loop. A task state machine has already been implemented as part of the background code; tasks are arranged in groups (A1, A2, A3, , B1, B2, B3, , C1, C2, C3, ). Each group is executed according to three CPU timers, configured with periods of 1 ms, 5 ms, etc., depending on requirements. Within each group (e.g., B), each task is run in a round-robin manner. For example, group B executes every 5 ms and there are three tasks in group B. Therefore, each B task will
execute once every 15 ms. The different tasks for the solar board have been split into various subtasks.
Fig. 14 presents a high-level flow chart of the overall power system. There are four basic system states. One is lamp on/charger off. The other three are combinations of lamp off with the charger on/ off, or with the charger in trickle-current mode. All of these states correspond to switches on the digital solar-power board, which can be controlled through GPIOs. The lamp is on when there is very little voltage from the solar panel but there is sufficient voltage on the battery. This state could include provisions to manipulate the discharge characteristics to lengthen battery time. For instance, the MCU could vary the PWM drive to dim the LEDs as a function of battery voltage to extend the battery run time. Dimming could also be a function of time so that the light is brightest in the early evening and dimmed later to provide just a nightlight, or even vary dimming respective to ambient light.
Coefficient Tuning Watch Window PgainI IgainI DgainI Soft Start CNTL_2P2Z Iref Delay Slope Target Out Ref I out Duty 1 FB Current Controller IBoost1 Watch Window VL1 Watch Window Gui_VL1 Gui_IBoost1 Gui_VLoad1 GUI VLoad1 Scaling (BG Task) IBoost1 ADC Driver rslt0 rslt1 ADC Hardware ADC-A0 ADC-A2 ADC-A3 VL1 Feedback VLoad1 Feedback PID Mapping (3 5) Coefficient B2 B1 B0 A2 A1 IN ePWM Hardware EPWM1A
Buck Driver
Charger Output
Topic 7
Fig. 13. The boost implementation is similar to the closed-loop buck stage.
Texas Instruments
7-14 14
SLUP267
Start
No
Is VSolar > 5 V?
Yes
Yes
No
No
Yes
No
Yes
Return
Fig. 14. High-level flow chart. The LEDs will be turned off if the battery is depleted to a 12.5-V lower limit, which can be modified by the MCU. Hysteresis in the voltage transition settings can be added, as well as temperature compensation. Once the solar-panel voltage reaches an open-circuit voltage of 5 V, the system switches the light off. Charger operation may begin when the solar-panel voltage has exceeded the battery voltage. As the voltages from the panel and battery will change slowly over time, this state determination can be kept in the background loop. To make the system efficient, the battery current must be controlled so that the power extracted from the solar panel is maximized until the battery is fully charged. The flow chart in Fig. 14 shows two states: the first one regulates the battery current to hold the power extracted from the solar panel at maximum, and the second state occurs once the battery has been charged. The flow chart shows only a single voltage to declare a fully charged battery, but the MCU can compensate for temperature as well as provide hysteresis. Other features that could be added with software include battery preconditioning, data logging, and data transfer.
Texas Instruments
Topic 7
Fig. 15 shows an older-generation analog board that is functionally similar to the optimized digital board on the right. The MCU represents almost 20% of the cost of the digital board but simplifies the circuit implementation. Thus its BOM cost is 20% less than a comparable analog board. The digital approach is also much more flexible when implementing changes to the operation of the system. Typically, a system change can involve software changes only with no changes to the physical hardware. Digital also offers the ability to incorporate many more features into the product. For instance, the MCU opens up the possibility for adjusting light levels in changing ambient and battery conditions, as well as data logging, failure prediction, and diagnostics. However, with the MCU comes the need to develop software. See Appendix A for schematic comparisons of analog and digital lighting systems and Appendix B for the bill of materials. Software development can be perceived as a serious cost and risk addition to any development effort and may be so for the near future with digital power control. However, controller developers are continuing to develop new tools with enhanced GUIs and software modules that are easily adaptable to reduce software-development risks. Todays digital power-control projects may require two types of designers: one that understands the power-supply specifications, component selection, and testing requirements, and a
second one familiar with digital signal processing and firmware development. This project was a good example: the power experts developed the require ments, power stages, and signalconditioning circuits, while the digital signalprocessing experts (David Figoli and Manish Bhardwaj) developed the code and eventually made the whole project work. Many graduate programs for power design are including microcontroller, digital signal processing, and FPGA development in their labs and classes.
Ix. reference
[1] Roberto Faranda and Sonia Leva, Energy Comparison of MPPT Techniques for PV Systems, WSEAS Transactions on Power Systems, Vol. 3, No. 6, p. 446, June 2008. tAble 5. dIgItAl preVAIls In All but softwAre deVelopment
Parameter Component Count Board Area BOM Cost MPPT Method Flexibility Data Logging Software Development Analog 312 18.2 in2 $14 Voltage regulation Poor None None Digital 148 8.8 in2 $12 Multiple Good Yes Yes
Topic 7
Fig. 15. The digital board on the right is more compact than the analog board.
C28x, Code Composer Studio, Piccolo and TMS320C2000 are trademarks of Texas Instruments.
Texas Instruments
7-16 16
SLUP267
Texas Instruments
7-17 17
SLUP267
Topic 7
Topic 7
Texas Instruments
7-18 18
SLUP267
Texas Instruments
7-19 19
SLUP267
Topic 7
Topic 7
Texas Instruments
7-20 20
SLUP267
Capacitor, Ceramic, 16V, X7R, 15% Ceramic, 50V, X7R, 15% Alum, 0.979Arms, 0.061 Ohms Ceramic, 50V, X7R, 10% Ceramic, 50V, X7R, 15% Ceramic, 50V, X7R, 10% Ceramic, 16V, X7R, 15% Aluminum, 25V, 90-milliohms, 20% Ceramic, 50V, X7R, 10% Ceramic, 50V, X7R, 10% Ceramic, 50V, X7R, 15%
Capacitor, Ceramic, 25V, X7R, 10% Capacitor, Ceramic, 50V, X7R, 15% Capacitor, Ceramic, 16V, X7R, 15% Capacitor, Ceramic, 50V, X7R, 10% Diode, Zener, 15V, 0.5W Diode, Zener, 6.8V, 0.5W Diode, Schottky, 2A, 100V Diode, Zener, 47V, 0.5W Diode, Dual Switching, Series, 200mA, 100V, 225mW Diode, Switching, Dual, 70V, 300mA Diode, Super Fast Rectifier, 100V, 1A Diode, Schottky, 1A, 40V Diode, Zener, 12V, 0.5W Diode, Switching, 200mA, 75V, 350mW Diode, Schottky, 3A, 40V Terminal Block, 2-pin, 6-A, 3.5mm Header, Male 2-pin, 100mil spacing, (36-pin strip) Jumper, 0.2 length Inductor, SMT, 4.8A, 48.8 milliohms Inductor, SMT Dual Winding, 7.1A, 12.94-milliohm MOSFET, P-ch, 40V, 13 milliohms MOSFET, N-Chl, 60V, 10.3 A, 22 millohm MOSFET, N-ch, 100V, 2.4A, 170 milliOhms MOSFET, N-ch, 60-V, 115-mA, 1.2-Ohms MOSFET, N-Ch, 40V, 16.4A, 7.8millohm Bipolar, PNP, 40V, 200mA, 225mW Resistor, Chip, 1/16-W, 1% Resistor, Chip, 1/16W, 1% Resistor, Metal Strip, 1 W, 1% Resistor, Chip, 1/16W, 1% Resistor, Chip, 1/16W, 1% Resistor, Chip, 1/16W, 1% Resistor, Chip, 1/16W, 1% Resistor, Chip, 1/16W, 1% Resistor, Chip, 1/16W, 1% Resistor, Chip, 1/16-W, 1% Resistor, Chip, 1/16W, 1% Resistor, Chip, 1/16-W, 1% Resistor, Chip, 1/16-W, 1% Resistor, Chip, 1/16-W, 1% Resistor, 2K Ohm, 1/4 watt, 5% Resistor, Chip, 1/16-W, 1% Resistor, Chip, 1/16-W, 1% Resistor, Chip, 1/16-W, 1% Resistor, Chip, 1/16-W, 1% Resistor, Chip, 1/16-W, 1% Resistor, Metal Strip, 1 W, 1% Resistor, Chip, 1/16-W, 1% Resistor, Chip, 1/16W, 1% Resistor, Chip, 1/16-W, 1% Resistor, Chip, 1/16-W, 1% Resistor, Chip, 1/16-W, 1% Resistor, Chip, 1/16-W, 1% Resistor, Chip, 1/16-W, 1% Resistor, Chip, 1/16-W, 1% Resistor, Chip, 1/16-W, 1% Resistor, Chip, 1/16W, 1% Resistor, Chip, 1/16-W, 1% Resistor, Chip, 1/16-W, 1% Resistor, Chip, 1/16-W, 1% Resistor, Chip, 1/16W, 1% Resistor, Chip, 1%, 0603 Resistor, Chip, 1/16-W, 1% Resistor, Chip, 1/16-W, 1% Resistor, Chip, 1/16-W, 1% Resistor, Chip, 1/16W, 1% Resistor, 0.25W, 1% Resistor, 0.25W, 1% Resistor, Chip, 1/16W, 1% Resistor, Chip, 1/16W, 1% Resistor, Chip, 1/16W, 1% Resistor, Chip, 1W, 1% Thermistor, Transformer, SEPIC, 1.5mH Test Point, Red, Thru Hole Color Keyed Test Point, Black, Thru Hole Color Keyed Test Point, Red, Thru Hole Color Keyed IC, High-Side Current Shunt Monitor, G=50 IC, 4.5V-52V I/P, Current Mode Boost Controller IC, 4.5V-52V I/P, Current Mode Boost Controller IC, High Freq 4-Amp Sink Sync Buck MOSFET Driver IC, Dual Operational Amplifiers IC, Precision Adjustable Shunt Regulator IC, Dual Differential Comparators, 2-36 Vin
1. These assemblies are ESD sensitive, ESD precautions shall be observed. 2. These assemblies must be clean and free from flux and all contaminants. Use of no clean flux is not acceptable. 3. These assemblies must comply with workmanship standards IPC-A-610 Class 2. 4. Ref designators marked with an asterisk ('**') cannot be substituted. All other components can be substituted with equivalent MFG's components.
Texas Instruments
7-21 21
SLUP267
Topic 7
Topic 7
1. These assemblies are ESD sensitive, ESD precautions shall be observed. 2. These assemblies must be clean and free from flux and all contaminants. Use of no clean flux is not acceptable. 3. These assemblies must comply with workmanship standards IPC-A-610 Class 2. 4. Ref designators marked with an asterisk ('**') cannot be substituted. All other components can be substituted with equivalent MFG's components.
Texas Instruments
7-22 22
SLUP267
Asia
Phone International +91-80-41381665 Domestic Toll-Free Number Note: Toll-free numbers do not support mobile and IP phones. Australia 1-800-999-084 China 800-820-8682 Hong Kong 800-96-5941 India 1-800-425-7888 Indonesia 001-803-8861-1006 Korea 080-551-2804 Malaysia 1-800-80-3973 New Zealand 0800-446-934 Philippines 1-800-765-7404 Singapore 800-886-1028 Taiwan 0800-006800 Thailand 001-800-886-0010 Fax +8621-23073686 Email tiasia@ti.com or ti-china@ti.com Internet support.ti.com/sc/pic/asia.htm
Important Notice: The products and services of Texas Instruments Incorporated and its subsidiaries described herein are sold subject to TIs standard terms and conditions of sale. Customers are advised to obtain the most current and complete information about TI products and services before placing orders. TI assumes no liability for applications assistance, customers applications or product designs, software performance, or infringement of patents. The publication of information regarding any other companys products or services does not constitute TIs approval, warranty or endorsement thereof. A122010
Fax Internet/Email
Note: The European Free Call (Toll Free) number is not active in all countries. If you have technical difficulty calling the free call number, please use the international number above. Fax Internet Direct Email +(49) (0) 8161 80 2045 support.ti.com/sc/pic/euro.htm asktexas@ti.com
Japan
Phone Fax Internet/Email Domestic International Domestic International Domestic 0120-92-3326 +81-3-3344-5317 0120-81-0036 support.ti.com/sc/pic/japan.htm www.tij.co.jp/pic
The platform bar, C28x, Code Composer Studio, ControlSuite, E2E, Piccolo and TMS320C2000 are trademarks of Texas Instruments. All other trademarks are the property of their respective owners.
SLUP267
IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TIs terms and conditions of sale supplied at the time of order acknowledgment. TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TIs standard warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed. TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. To minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards. TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding third-party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI. Reproduction of TI information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documentation. Information of third parties may be subject to additional restrictions. Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements. TI products are not authorized for use in safety-critical applications (such as life support) where a failure of the TI product would reasonably be expected to cause severe personal injury or death, unless officers of the parties have executed an agreement specifically governing such use. Buyers represent that they have all necessary expertise in the safety and regulatory ramifications of their applications, and acknowledge and agree that they are solely responsible for all legal, regulatory and safety-related requirements concerning their products and any use of TI products in such safety-critical applications, notwithstanding any applications-related information or support that may be provided by TI. Further, Buyers must fully indemnify TI and its representatives against any damages arising out of the use of TI products in such safety-critical applications. TI products are neither designed nor intended for use in military/aerospace applications or environments unless the TI products are specifically designated by TI as military-grade or "enhanced plastic." Only products designated by TI as military-grade meet military specifications. Buyers acknowledge and agree that any such use of TI products which TI has not designated as military-grade is solely at the Buyer's risk, and that they are solely responsible for compliance with all legal and regulatory requirements in connection with such use. TI products are neither designed nor intended for use in automotive applications or environments unless the specific TI products are designated by TI as compliant with ISO/TS 16949 requirements. Buyers acknowledge and agree that, if they use any non-designated products in automotive applications, TI will not be responsible for any failure to meet such requirements. Following are URLs where you can obtain information on other Texas Instruments products and application solutions: Products Audio Amplifiers Data Converters DLP Products DSP Clocks and Timers Interface Logic Power Mgmt Microcontrollers RFID OMAP Mobile Processors Wireless Connectivity www.ti.com/audio amplifier.ti.com dataconverter.ti.com www.dlp.com dsp.ti.com www.ti.com/clocks interface.ti.com logic.ti.com power.ti.com microcontroller.ti.com www.ti-rfid.com www.ti.com/omap www.ti.com/wirelessconnectivity TI E2E Community Home Page e2e.ti.com Applications Communications and Telecom www.ti.com/communications Computers and Peripherals Consumer Electronics Energy and Lighting Industrial Medical Security Space, Avionics and Defense Video and Imaging www.ti.com/computers www.ti.com/consumer-apps www.ti.com/energy www.ti.com/industrial www.ti.com/medical www.ti.com/security www.ti.com/space-avionics-defense www.ti.com/video
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265 Copyright 2011, Texas Instruments Incorporated