TANEJA, ROHIT. Making Energy-Efficient Lighting more Cost-Effective. (Under the direction of Dr. Alexander Dean and Dr. Subhashish Bhattacharya.)
Motivation behind this work is to come up with an energy efficient and a reduced cost LED driver control system. This work encompasses digital control theory and embedded system concepts. LEDs are increasingly finding application in almost every sector, like consumer electronics (TV, phones), space lighting (cluster of LEDs) and indication, which require a durable, inexpensive and an efficient solution. The thesis builds upon an existing closed loop control system developed utilizing the RL-78 microprocessor development board and a boost converter working in the continuous conduction mode (CCM). The primary focus is on cost reduction while maintaining/improving the efficiency, and thus, the discontinuous conduction mode (DCM) of operation is implemented and tested. DCM operation results in cost reduction of the system as only one MOSFET is required in the circuit. Dimming is controlled by exploiting the discontinuous current property of the inductor already present in the circuit, as opposed to a dedicated MOSFET required for dimming, through the PWM signal, in CCM. The efficiency of DCM and CCM are also discussed in this work. Comparison is also drawn in terms of the embedded software and the resources needed in both modes. It is proved that DCM is indeed more energy efficient than CCM.
by Taneja Rohit
A thesis submitted to the Graduate Faculty of North Carolina State University
in partial fulfillment of the requirements for the degree of
Master of Science
Computer Engineering
Raleigh, North Carolina 2013
APPROVED BY:
_______________________________ Dr. Alexander Dean
Committee Chair
Dedicated to
My Parents
Sharda Taneja and Dalip Taneja
My Brother
Varun Taneja
And My Beloved Fiancée
I express my sincere gratitude and thank my advisor, Dr. Alexander Dean for providing me with an opportunity and supporting me at every step during my studies at North Carolina State University. His guidance and mentorship facilitated my professional as well as academic growth. I thank Dr. Subhashish Bhattacharya for his continuous support in my thesis and helping me steer my way through the research. I would like to thank Avik Juneja for being my research peer and helping me in solving technical intricacies. I would also like to mention Shikhar Singh, Michael Plautz and Tharunachalam Pindicura for working with me in accomplishing my research goal.
LIST OF TABLES ... vii
LIST OF FIGURES ... viii
CHAPTER 1 Introduction... 1
1.1 Significance of the Study ... 1
1.2 Motivation ... 2
1.3 Preview of the Work ... 2
1.4 Outline for Rest of the document ... 3
CHAPTER 2 Previous Work ... 4
2.1 Switching DC-to-DC converters ... 4
2.1.1 Converter Theory ... 4
2.1.2 Physical Operation and properties of switching converters ... 4
2.1.3 Control via Software ... 7
2.2 Closed loop Control of Boost Converter in CCM ... 7
2.2.1 Continuous Conduction Mode of Boost converter ... 7
2.2.2 Processing requirements and Closed loop Control ... 11
CHAPTER 3 Discontinuous mode of Operation ... 14
3.1 Design to operate in DCM ... 14
3.2 Circuit behavior in DCM ... 16
3.3 Duty Cycle range Calculation for DCM ... 17
3.4 Duty Cycle equations ... 19
3.5 Dimming in DCM mode ... 21
CHAPTER 4 Analysis and results ... 23
4.1 Electrical efficiency ... 23
4.2 Inference from results ... 27
4.3 Inductor ripple in DCM ... 27
4.4 Trade-offs in DCM operation ... 30
4.5 Lumens Output for a Design ... 32
4.5.1 Lumens Output range of Design ... 32
4.6 Cost-effectiveness of DCM driver ... 34
5.1.1 Operating 3 channels in multiphase ... 36
5.1.2 Computational Requirements and Software Changes... 37
CHAPTER 6 Software ... 39
6.1 Software Control ... 39
6.1.1 Control loop and PWM signaling ... 40
6.1.2 ADC and sensing ... 41
6.2 Software Performance and Profiling ... 41
6.2.1 Memory footprint ... 41
6.2.2 Execution time for Control loop ... 43
CHAPTER 7 Conclusions and Future Work ... 44
7.1 Conclusion ... 44
7.2 Future Work ... 45
REFERENCES ... 46
APPENDIX ... 47
Table 1. Boost converter output voltage equation ... 6
Table 2. List of Components for CCM ... 10
Table 3. List of components for DCM ... 15
Table 4. Efficiency for different K values ... 30
Table 5. Lumens Range for Our Design ... 33
Table 6. Memory footprint ... 42
Table 7. Memory footprint of Regions of interest in DCM ... 42
Figure 1. Switch regulators Topologies ... 5
Figure 2. Boost Converter Transistor ON ... 6
Figure 3. Boost Converter Transistor OFF ... 6
Figure 4. Converter Board on RL78 Board for CCM ... 8
Figure 5 CCM Inductor Current ... 9
Figure 6. CCM Output voltage ... 11
Figure 7. CCM Circuit with 2 MOSFETs ... 11
Figure 8. Boost converter board for DCM ... 14
Figure 9 Circuit behavior in DCM ... 16
Figure 10. DCM Inductor Waveform ... 17
Figure 11. Range calculation depending upon K ... 18
Figure 12. M (Vo/Vi) with respect to Duty Cycle for DCM, K=0.1 ... 20
Figure 13. Circuit in DCM with one MOSFET ... 21
Figure 14 DCM input and output current ... 22
Figure 15 DCM input and output current ... 22
Figure 16. CCM Output voltage ... 23
Figure 17. CCM Input current ... 24
Figure 18. CCM Output current ... 24
Figure 19. DCM Output voltage ... 25
Figure 20. DCM Input Current ... 25
Figure 21. DCM Output Current ... 26
Figure 22. Indcutor current variation with respect to Switching Frequency ... 28
Figure 23. Inductor value for different Switching frequencies ... 29
Figure 24. Vout and Inductor ripple vs Duty Cycle... 29
Figure 25. Efficiency for different K values ... 31
Figure 26. Development Board with HB-LED as load ... 33
Figure 27. Cost Analysis ... 34
Figure 28. Multiphase Circuit in DCM ... 35
Figure 29. Overlapping of PWM signals resulting in shoot-up in Overall Load Current ... 36
Figure 30. Interleaved PWM signals resulting in uniform Overall Load Current ... 36
Figure 31. 3 channels in DCM ... 37
Figure 32. PWM signals with different duty cycles ... 38
Figure 33. Software state machine ... 39
Figure 34. Execution time DCM ... 43
CHAPTER 1
Introduction
1.1 Significance of the Study
Popularity of lighting applications based on LEDs is increasing day by day. Providing high efficiency (Lumens/Watt), superior longevity and low maintenance requirements are strong reasons for the industry to shift towards LEDs. For example, a 50W halogen based car spot light can be replaced by a LED array of 8-12 W. LCD backlighting, automobiles, traffic lights and general-purpose lighting are major areas where LED technology is increasingly finding applications.
LED drivers can be broadly classified as linear regulators or switched regulators. Linear regulation is a low cost solution, but suffers from poor operating efficiency as the voltage drop across the linear regulator cannot be minimized under all operating conditions. Switch-mode operation has a higher component cost but offers a more efficient solution and a prolonged life of LED operation.
1.2 Motivation
The thesis discusses operation of HB-LEDs in the discontinuous inductor current conduction mode of operation and compares the efficiency with earlier designed continuous inductor current conduction mode of operation. Increasing demand for LEDs in a variety of applications mandates a low cost solution of drivers, reducing the cost of operation, thus, benefitting not only the commercial sectors but also the end consumer. An embedded solution involves controlling the system through software. Hence, its impact on the code size, the computational requirements as well as the resources is studied and analyzed for CCM and DCM operation. Using a microcontroller allows multitasking to be achieved with other application software along with digital closed loop control for this application.
1.3 Preview of the Work
1.4 Outline for Rest of the document
CHAPTER 2
Previous Work
2.1 Switching DC-to-DC converters
2.1.1 Converter Theory
Smaller size, light weight and most of all, higher efficiency than its linear counterpart makes switching converters ideal for voltage or current regulation. Switch (MOSFET) also called the boost switch transistor, continually switches between the full ON and the full OFF states. Ratio of the ON time and the time period performs the regulation. This is in contrast to the linear regulators which provide a desired output voltage by dissipating extra power as ohmic losses. Switch-mode power supply utilizes the storage elements (inductor, capacitor) in different electrical configurations (topologies) for voltage and/or current regulation.
2.1.2 Physical Operation and properties of switching converters
Boost Converter
Buck Converter
Buck-Boost Converter
Figure 1. Switch regulators Topologies
V
Inductor
MOSFET Diode
Cap Load
V
Cap Load
Diode
Inductor MOSFET
V
Cap Diode
Inductor MOSFET
During the OFF state, the switch is open and the inductor will resist any change in the flow of current and act as a current source in series with the supply, thus charging the capacitor with a higher voltage as shown in Figure 3.
Figure 2. Boost Converter Transistor ON
Figure 3. Boost Converter Transistor OFF
Table 1. Boost converter output voltage equation
Output Buck Boost Buck-Boost Vo D*Vin (1/1-D)*Vin (D/1-D)*Vin
V
Cap Diode
Inductor
2.1.3 Control via Software
A significant feature of a switching converter is the degree of control achieved over the output voltage depending on the duty ratio (D) of the PWM signal. This factor being controlled through software allows direct control and helps a programmer in implementing other functionalities using software, like a closed loop control by sensing the currents and the voltages. A pre-existing system with a microprocessor can be utilized to achieve software control of switching converters.
2.2 Closed loop Control of Boost Converter in CCM
There is a significant amount of work done by Tharunachalam Pindicura in his thesis [1] on the development of a closed loop control of a boost converter operating in CCM.
2.2.1 Continuous Conduction Mode of Boost converter
Figure 4. Converter Board on RL78 Board for CCM
The converter operates in a particular mode depending primarily on the switching frequency for the boost switch (MOSFET) and the inductor value. For a particular range of these two parameters, if the inductor current never drops to zero, the converter is defined to be operating in the continuous conduction mode (CCM). Figure 5 below shows the inductor current corresponding to the switching frequency in CCM.
Figure 5 CCM Inductor Current
Table 2. List of Components for CCM
Component Value/Type
Inductor 100uH / Ferrite core
Capacitor 47uF / Electrolytic
Resistor 1 ohm
MCU RL78G13 / 16 bit
Transistor ( Boost) NMOS
Transistor ( Dimming) NMOS
Figure 6. CCM Output voltage
2.2.2 Processing requirements and Closed loop Control
Software control and PWM signaling is achieved through the code running on the RL-78 board.
Figure 7. CCM Circuit with 2 MOSFETs
Vin Boost MOS 47uF
Diode
1 ohm
1 ohm1 100uH
Dimming MOS HB-LED
Vout
ADC_IN (Over Current Protection)
ADC_IN (Output Current) PWM
Software Design:
An interrupt driven system is coded in C language which runs tasks of fixed priority using a run-to-completion scheduler. The HB-LED operation and its control require the following tasks:
1. Initialization: switching frequency, control loop frequency, dimming parameters, overcurrent constants and over temperature constants.
2. Setting and control of the duty cycle in a control loop. 3. Dimming: achieved through a potentiometer.
4. Over current protection. 5. Over temperature protection.
6. In multiple channel operations, out-of-phase operation of loads is done so as to have uniformity in the total current drawn. Figure 7 shows one of the three channels on the board.
Computational requirements:
1. Timer interrupt is used for the control loop implementation which runs after every 1 mili second.
3. 3 timer channels are used in the slave mode for three duty cycles corresponding to the switching frequency generated by master timer.
CHAPTER 3
Discontinuous mode of Operation
3.1 Design to operate in DCM
The term “Discontinuous Conduction Mode” corresponds to the discontinuity in the inductor current over a period. In other words, the inductor current falls to zero before the cycle ends and rises again in the next positive cycle, which is in contrast to the continuous conduction mode where the inductor current never reaches a zero value. Figure 8 shows the converter board with the dimming MOSFET removed, working on the DCM principle.
. Figure 8. Boost converter board for DCM
DCM occurs under two conditions:
1. Light load in the circuit which does not require much current for its operation.
2. Deliberately putting the circuit under DCM condition by selecting the parameters (inductor value and switching frequency) accordingly. Section 3.2 elaborates on how changing the parameters transition the boost converter from CCM to DCM.
Our research pertains to the 2nd option where we operate the circuit in DCM and the component values used for driving HB-LED are given in Table 3:
Table 3. List of components for DCM
Component Value/Type
Inductor 100uH / Ferrite core
Capacitor 47uF / Electrolytic
Resistor 1 ohm
MCU RL78G13 / 16 bit
Transistor ( Boost) NMOS
3.2 Circuit behavior in DCM
The switching period for DCM can be divided into 3 sub intervals:
1. 0 < t < D1Ts
2. D1Ts < t < (D1+D2)Ts
3. (D1+D2)Ts < t < Ts
Figure 9 Circuit behavior in DCM
Vin 47uF
1 ohm 100uH
HB-LED
Vout
Vin 47uF
100uH
1 ohm HB-LED
Vout
Vin 47uF
1 ohm 100uH
HB-LED
Figure 10 shows the inductor current waveform for a HB-LED driver, where the transistor is switched at a frequency of 5 KHz.
Figure 10. DCM Inductor Waveform
3.3 Duty Cycle range Calculation for DCM
We will introduce an equation that describes the boundary of DCM and CCM:
L Vin DT R D
Vin s
2
'2 > For CCM
Or 2
' 2
DD RT
L
s
> (1)
D’ = 1 – D1
Left hand side of equation (1) is called the K value and its right hand side is the Kcrit.
State of the system can be described by looking at (2) and (3) below: K > Kcrit for CCM (2)
K < Kcrit for DCM (3)
For our Design,
L = 100uH, Ts = 200us & R (load) = 25 ohms; K = 0.1, where Kcrit(max value) = 0.141
(4/27).
Figure 11 shows the range of Duty Cycle achieved in our design where it operates in DCM.
Figure 11. Range calculation depending upon K
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16
X: 0.3 Y: 0.147
<---DCM--->
CCM---> <-CCM
3.4 Duty Cycle equations
For a DCM operation, the variation of the output voltage (Vo) with respect to the input voltage (Vi) can be represented as:
2 / 4 1 1 2 1 K D M Vi
Vo + +
= =
where, D1 is the time for which the boost switch stays ON, and
K = 2L/RTs (0.1 in our system)
This equation is only valid for
K < Kcrit (D), i.e. DCM operation (Kcrit= .141)
Thus, our system operates in DCM for K = 0.1.
Equations below [6] are useful for providing the duty cycle values and describing the state of the system.
D − 1
1
For K > Kcrit (CCM)
= Vi Vo 2 / 4 1 1 2 K D + +
Figure 12. M (Vo/Vi) with respect to Duty Cycle for DCM, K=0.1
Linearity in voltage regulation is achieved for a K value of 0.1. We lose on the linearity of the control, as well as the efficiency, on decreasing the K value. This design also serves as a reference to designers for selecting the parameters according to the output efficiency requirements and the range of DCM operation.
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Duty Cycle
Vo
/Vi
3.5 Dimming in DCM mode
Figure 13. Circuit in DCM with one MOSFET
Controlling the HB-LED dimming in DCM operation relies on the property of the inductor instead of using a dimming MOSFET in the continuous conduction mode. Varying the duration of the third subinterval (Section 3.2), (by changing the duty cycle using the potentiometer knob) has an effect on the output current, resulting in dimming of the LED. The system was tested in the range of duty cycles over which the boost converter operates in DCM, i.e. range for which the K value is 0.1. Figure 14 and Figure 15 shows the variation of output current as the duty cycle is increased from 10% to 40%.
Vin 47uF
1 ohm1 1 ohm
100uH
HB-LED Boost MOS
Diode
Vout
PWM
ADC_IN (Over Current Protection)
Figure 14. DCM input and output current
LHS in figure 14 shows Input (Inductor) Current with respect to Switching Frequency. RHS shows Output Current with respect to Switching Frequency. Duty Cycle is 10 percent.
Figure 15. DCM input and output current
LHS in figure 15 shows the Input (Inductor) Current with respect to the Switching
CHAPTER 4
Analysis and results
4.1 Electrical efficiency
For our design with the K value at 0.1, the duty cycle range is between 14% and 58%. This leads to an operating output voltage between 5.8 volts and 12.1 volts.
The method to compute and compare the power efficiency of DCM with CCM relies on keeping the output power as a constant parameter and observing the input power consumption. The following input and output current waveforms were observed while maintaining 1786 mili watts as the output power of the converter. Output power is fixed for comparison of CCM and DCM operations.
Figure 17. CCM Input current
Figure 19. DCM Output voltage
Figure 21. DCM Output Current
Applying standard formula for electrical efficiency,
in in out out I V I V * * = η
Plugging the observed r.m.s values of the parameters in the above equation:
3 3 10 * 495 * 5 10 * 176 * 2 . 10 − − = CCM
η = 72.5 %
3 3 10 * 440 * 5 10 * 195 * 4 . 9 − − = DCM
4.2 Inference from results
DCM gives a higher efficiency than CCM for the HB-LED string, as a load. The duty cycle for DCM in this experiment is 37.5%, whereas for CCM it is 58%. In other words, switch is conducting (ON) for a shorter duration in DCM than in CCM. Secondly, lower switching frequency in case of DCM results in smaller switching losses with respect to CCM. Thirdly, the DCM driver has lower DC losses [3], whereas CCM suffers from both AC and DC losses. Losses in the switch, the inductor, the diode and the capacitor are not modeled in this study.
4.3 Inductor ripple in DCM
Figure 22. Indcutor current variation with respect to Switching Frequency
At higher frequencies, i.e. 40 KHz and 62.5 KHz, the system transitions into CCM and the current no longer falls to zero. In order to operate the system at high switching frequencies and to maintain discontinuous mode of conduction i.e. K < Kcrit, designers have to opt for a
lower inductor value as shown in Figure 23. Low value inductors with higher saturation limit are hard to find, and may be costly.
0 500 1000 1500 2000 2500 3000 3500 4000 4500
5 12.5 40 62.5
In d u ct o r C u rren t( m il i A m p eres )
Switching frequency (KHz)
Figure 23. Inductor value for different Switching frequencies
The effect on inductor ripple is not only observed with changing switching frequency, but with changing duty cycle as well. Figure 24 displays how the ripple increases with increasing duty cycle.
Figure 24. Vout and Inductor ripple vs Duty Cycle
0 50 100 150 200 250 300
5 12.5 40 62.5
Induc to r v a lue ( uH )
Switching frequency (KHz)
Inductor value vs Switching
frequency ( Constant Ripple)
0 500 1000 1500 2000 2500 0 5 10 15
20 37.5 50 59 Indc
ut o r ri ppl e ( m A ) O u tp u t V o lta g e (V o lts )
Duty Cycle (%) with fsw = 12.5 KHz
Vout and Inductor ripple vs Duty Cycle
(DCM)
Output Voltage
4.4 Trade-offs in DCM operation
Another design consideration for the LED drivers or in fact for any load is to consider the impact of switching frequency on the efficiency of the system. Once a system is designed and taken in for production, the only variable parameters are the switching frequency and the duty cycle, owing to their software control. It is observed that as the switching frequency is decreased, in other words if the K value decreases, efficiency decreases. Designers have to study the trade-offs between the duty cycle range and the efficiency requirements for their load. This is because a lower K value provides a broader range of DCM operation but with lower efficiency. Table 4 provides the efficiency values associated with different K values. In our design, we cannot go below a K value of 0.04 due to high current ripples, at very low duty cycles, through the inductor, which has a saturation point at 1.2 amperes.
Table 4. Efficiency for different K values
K (2L/RTs ) Switching Frequenc y (KHz) Output Voltag e (V) Output Curren t (mA) Source Curren t (mA) Input Voltag e (V) Output Power (mW) Sourc e Power (mW) Efficienc y (%)
0.04 5 9.8 170 725 5.1 1666
3697.
5 45.057%
0.06 7.4 9.71 164 500 5.1
1592.4
4 2550 62.449%
0.1 12.5 9.57 141 320 5.1
1349.3
7 1632 82.682%
0.14 17.2 8.9 120 245 5.1 1068
1249.
Figure 25. Efficiency for different K values
Figure 26. For same saturation limit, cost of inductor is higher for lower inductor value.
0.000% 10.000% 20.000% 30.000% 40.000% 50.000% 60.000% 70.000% 80.000% 90.000%
0.04 0.06 0.1 0.14
E ff ici en cy K
Efficiency vs K
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8
20uH 30uH 100uH
Induc o tr c o st ( $ ) Inductor value
Inductor cost vs Value ( same
saturation current)
fsw = 5 kHz
fsw = 7.4 kHz
4.5 Lumens Output for a Design
A human perceivable metric for a light source is lumens rather than electrical power [4]. One of the primary reasons for industries in adopting LEDs as a light source is their high luminous intensity or the luminous flux output with lower power consumption as compared to other sources of light. Output electrical wattage can be related to luminous flux as:
Luminous flux = Output Wattage * Luminous Efficacy
In our design, the load is a HB-LED strip which has a luminous efficacy of 31.25 lumens per watt [8]. Thus, the reason for keeping the output power as a constant parameter in Section 4.1 is to have the same luminous flux. In other words, accurately comparison, of the efficiencies of the two systems, requires keeping the same amount of lumens perceived by a human eye (luminous flux) and observing the input power requirement i.e. input voltage and input current.
4.5.1 Lumens Output range of Design
Table 5. Lumens Range for Our Design Load
Range
Output Voltage
V
Output Current mA
Output Power mW
Inductor ripple(rms)
mA
K
Duty Cycle (%)
Luminous Flux (lm) Minimum
load 8.6 56 480 113 0.04 8%
15 Peak
load 10.6 400 4240 766 0.1 55%
132.5
4.6 Cost-effectiveness of DCM driver
It has been shown that DCM results in a higher efficiency than CCM for driving high brightness LEDs. DCM is also a more cost-effective solution in driving HB-LED loads due to the reduction of one transistor, which takes a major portion of the cost of switching DC-DC regulators. Compared to CCM, DC-DCM is a better choice for controlling HB-LEDs as it leads to higher efficiency and a 16% cost reduction.
Figure 28. Cost Analysis
0 0.25 0.5 0.75 1 1.25 1.5 1.75 2 2.25 2.5 2.75 3 3.25 DCM CCM C o st ( $ )
Mode of operation
RL78
MOS
zener diode
diode
resistance 10k ohm
resistance 1 ohm
Cap
CHAPTER 5
DCM for Multiple Channels
5.1 Multiphase Operation
Figure 29. Multiphase Circuit in DCM
47uF
1 ohm1 1 ohm
5.1.1 Operating 3 channels in multiphase
Efficiency of the system can be increased in a three channel multiphase operation through to the following factors:
1. Using the same microprocessor for the computation of PWM signal and sensing. 2. Most of the modern day processors have high number of ADC and timer channels, 3
channels can be easily utilized.
3. Duty cycle factors for all the three channels are out of phase with each other in one
cycle, thus avoiding overshoot in input current requirements.
Figure 30. Overlapping of PWM signals resulting in shoot-up in overall load current
5.1.2 Computational Requirements and Software Changes
1. 2 timers per channel (master-slave combination) are used for PWM generation. 2. 2 ADC ports per channel are used for inductor current and output current sensing. 3. As this is an interrupt driven system, interrupt for 1st channel PWM negative edge
triggers the 2nd channel PWM, and the 2nd channel PWM negative edge triggers the PWM signal for the 3rd channel.
4. Timer interrupts for the PWM are disabled once all the 3 channels are triggered. Interrupts are enabled after every 1 second and step 3 is repeated again. This is done to ensure minimum overlapping of PWM signals of the 3 channels, which in turn reduces overlapping of the input current requirements.
Figure 32. 3 channels in DCM Channel 1
Figure 33. PWM signals with different duty cycles
CHAPTER 6
Software
6.1 Software Control
An interrupt driven system for the controlling of HB-LEDs was designed by Tharunachalam Pindicura, to work in CCM. Software has been modified to work for the DCM operation.
StartUp
Entry HW Init
Switching and Control loop Frequency init
Display
Output Power Lumens Output
Idle
Waiting for Interrupt
ISR for fsw
Enables 2nd/3rd Channel Disable PWM Interrupt
Control loop ISR
Duty Cycle Control
Sensing Inductor & Output Current Over Current Protection
PWM Interrupt (80us) Timer Interrupt
(1ms)
If PWM Interrupts Enabled PWM Interrupts enabled after 1 second to avoid Current Shoot due to Duty Cycle Overlap
6.1.1 Control loop and PWM signaling
The following actions are performed under a control loop ISR, occurring at 1 mili second: 1. Check for the over current through the inductor.
2. Sense the output current through the LED.
3. Potentiometer is used to control the duty cycle. This differs from the earlier CCM control technique, where the potentiometer was used for controlling the dimming transistor’s ON time.
4. Calculate the power output and the lumens output.
5. Perform a close loop control through PID correction and adjustment of the switching frequency based on the error. Same PID control is used as developed by Tharunachalam Pindicura for the CCM control.
6. Enable the PWM timer interrupts for all three channels after 1 second. This is done to autocorrect the overlapping of duty cycles of 3 PWM signals. This step is performed if the sum of ON periods of all three channels is smaller than the switching period.
6.1.2 ADC and sensing
ADC channels [7] on the RL-78 are used for:
1. Output current sensing required for closed loop control. Output current is also used for output power calculations.
2. Over current protection: Current going through the inductor is sensed in the control loop to check for over current.
Polling mode is employed for ADC sensing rather than an interrupt mode. It is done to avoid nesting of interrupts, as the control loop runs as a timer interrupt service routine. For operating 3 channels, we have used 6 ADC channels in total.
6.2 Software Performance and Profiling
Major changes in the code for DCM are attributed to the operation of 3 channels using interleaved PWM signals. Memory footprint of the code and the speed of control loop execution have been analyzed.
6.2.1 Memory footprint
Table 6. Memory footprint Code Optimization
level CODE Memory(bytes) DATA Memory(bytes) CONST memory(bytes)
DCM Low 16,579 1,127 7,793
DCM High 14,350 1,127 7,775
CCM Low 15,908 2,632 8,167
CCM High 13,871 2,632 8,149
Table 7 lists the regions of interest in our software. 20% less memory footprint is observed for the control loop with high optimization level. Number of regions for CCM code is fewer than that for DCM. This is mainly because of extra PWM channels required in the DCM code.
Table 7. Memory footprint of Regions of interest in DCM DCM Code with
High Optimization level
DCM Code with Low Optimization level
Size (bytes)
Region Size
(bytes)
Region
28 Init_control_loop 43 Init_control_loop
17 Init_dimming 18 Init_dimming
234 Main 276 Main
31 R_TAU0_Channel0_Start 25 R_TAU0_Channel0_Start 20 R_TAU0_Channel2_Start 24 R_TAU0_Channel2_Start 20 R_TAU0_Channel4_Start 24 R_TAU0_Channel4_Start 12 R_TAU0_Channel7_Start 12 R_TAU0_Channel7_Start 38 CB_Channel7_Interrupt 42 CB_Channel7_Interrupt
6.2.2 Execution time for the Control loop
The control loop is implemented in a timer’s ISR and the timing information (below) compares execution time of the control loop in DCM and CCM (under high optimization level). DCM takes 41% less time to execute than CCM, due to fewer computations for dimming.
Figure 35. Execution time DCM - 580 microseconds
CHAPTER 7
Conclusions and Future Work
7.1 Conclusion
1. Electrical efficiency for the same lumen output is proved to be higher for DCM than CCM. This is attributed to the low source current required by inductor in the discontinuous conduction mode. Also, DCM operates at low switching frequency as compared to CCM which further contributes to the overall efficiency.
2. Cost effective solution is developed by using DCM instead of CCM because of reduction of 1 MOSFET in the circuit, which contributes significantly to the cost. Getting higher efficiency at low cost makes this solution more suitable for lighter loads. While operating the circuit in DCM, extra caution has to be taken to keep the duty cycle within range depending on the K value for the circuit.
3. Keeping switching frequency at 12.5 KHz rather than 5 KHz further decreases the ripple peak thus, keeping the inductor cost down. This is done keeping in mind that switching frequency satisfies the DCM condition i.e. K < Kcrit.
memory footprint brings down the cost of the whole system as memories account for a big proportion of cost in a microcontroller.
7.2 Future Work
REFERENCES
[1] Pindicura, Tharunachalam, Analysis of microcontroller based High Brightness LED drivers.
[2] Brigitte Hauke, Basic Calculation of a Boost Converter's Power Stage, Texas Instruments [3] Travis Eichhorn, Boost Converter Efficiency through Accurate Calculations, National Semiconductors, Powerelectronics.com
[4] Evaluating Light Output, Philips;
http://www.colorkinetics.com/support/whitepapers/Evaluating_Light_Output.pdf
[5] J. M. Alonso, D. Gacio, J. García, M. Rico-Secades Universidad de Oviedo, “Analysis and Design of the Integrated Double Buck-Boost Converter Operating in Full DCM for LED Lighting Applications”.
[6] W. Erickson Robert, Dragan Maksimovic, “Fundamentals of Power Electronics” [7] Rl-78 Hardware User Manual, Renesas
[8] LED strip specifications;
Appendix A A.1 Bill of materials
Table 8. Bill of materials for three channel HB-LED Driver (Quantity = 1000)
Component Vendor Part Number
unit Price( $) Inductor (100uH) Digikey 595-1352-2-ND 0.2635
Capacitor (47uF) Digikey 565-2568-2-ND 0.2904 Resistor ( 1 ohm) Digikey 541-10.0AFDKR-ND 0.075 Resistor (10k ohm) Digikey
RMCF0805FT10K0CT-ND 0.00378
Diode Digikey 568-6530-2-ND 0.155
Zener Diode (3.3 V) Digikey
MMSZ4684-TPMSCT-ND 0.03