0% found this document useful (0 votes)
52 views6 pages

DSP-based Design and Implementation of Inductor Current Estimator For DC-DC Converters

Uploaded by

2204805
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views6 pages

DSP-based Design and Implementation of Inductor Current Estimator For DC-DC Converters

Uploaded by

2204805
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

DSP-based Design and Implementation of Inductor

Current Estimator for DC-DC Converters


Raj Kamal Olive Ray
School of Electrical Sciences School of Electrical Sciences
Indian Institute of Technology Bhubaneswar Indian Institute of Technology Bhubaneswar
2023 11th National Power Electronics Conference (NPEC) | 979-8-3503-1164-8/23/$31.00 ©2023 IEEE | DOI: 10.1109/NPEC57805.2023.10384996

Khordha, Odisha, India Khordha, Odisha, India


[email protected] [email protected]

Abstract—The implementation of current programmed control


IL
for dc-dc power electronic converters requires information about
system current as a feedback input. For a digitally controlled Vin Vsw Vo
system, this current feedback information need to be obtained in rL
digital form. The common methods of obtaining discrete samples L
of converter current feedback is to use current transducers
followed by high speed analog-to-digital conversion; the accuracy
of which is directly correlated to the cost. This paper evaluates Vin
a method of estimating currents within a dc-dc converter using
Current Iest
inexpensive digital signal processor. Using the proposed approach, Vo
Analog
instantaneous estimates of inductor currents can be obtained us- estimation
Comparator
ing shunt-type voltage measurements. The estimated current can
be used directly as inputs to the current programmed controllers. Vsw(state)
In this work, the demonstration of current estimation has been
shown using a laboratory prototype of a boost converter with
STM32- based microcontroller. The proposed method can adapt
Fig. 1. Block diagram illustrating the concept of current estimation.
itself to estimate the inductor currents under both continuous
(CCM) and discontinuous conduction modes (DCM) of operation.

transducers are hall-effect sensors and sense resistors. (b) For


Index Terms—Current estimation, continuous conduction
mode, dc-dc converter, digital signal processor.
digital implementation of current programmed control, the
sensed current needs to be converted into digital form using
an analog-to-digital converter (ADC). This ADC stage must
I. I NTRODUCTION
be very fast in order to be used with high frequency dc-dc
The sensing and measurement of inductor currents in converters, which will have impact on the cost. For example,
dc-dc converters is very essential for implementation of if the converter is operating at high frequency (i.e., more than
current-programmed control for these converters. Compared 10 kHz), sufficient number of samples are needed for obtaining
to voltage-mode controllers, the current programmed control the instantaneous current profile within the digital controller.
enables enhances controllability of these converters and can Hence, converting the analog sensed values of current into its
protect the system in case of faulty operation. In practice, for digital equivalent require the ADCs to be fast enough to work
switched mode converters the percentage ripple in inductor at about 1 mega samples per second.
currents is higher than that of capacitor voltages for any con- Current estimation provides an alternate to current sensing
verter. For the above reason, for current-programmed control, in dc-dc power electronic converters. The current estimation
measuring the instantaneous current magnitude is essential. In action is performed within the digital controller used for
[1], the peak values of instantaneous current has been obtained converter control. In [2], a method for estimation of current
in digital form after post processing the sampled value of is presented using terminal voltage measurements across the
current every switching interval. inductor. In this case, the status of the switching terminal can
For digitally controlled dc-dc converters, current pro- be evaluated using an analog comparator. This method of cur-
grammed control offers the following two major challenges: rent estimation can provide two major advantages: (a) There
(a) The current needs to be sensed and measured at either is no rerquirement of using a dedicated current transducer
its peak or valley point depending upon the type of control for sensing current. In this case, the currents are estimated
being used. Hence, sampling the current at the exact instance from voltage measurements. These voltage measurements are
is a challenge. Since dc-dc converters operate a high switching in most applications part of regulated system requirement. (b)
frequencies, the current transducers used should also be se- The computation of current estimate is made within the digital
lected as per converter operating specifications. Typical current processor itself, and hence can be used for regulation purpose.

Authorized licensed use limited to: KIIT University. Downloaded on March 17,2024 at 06:54:15 UTC from IEEE Xplore. Restrictions apply.
Fig. 1 shows the conceptual schematic of current estimation
using input voltage, output voltage and switch node voltage Vin Vsw Vo
of the dc-dc converter. The current estimator requires terminal
L IL
voltage measurements followed by voltage to current estima- rL D1
tion. In [3], this estimation is achieved considering a low pass
filter for obtaining the current estimate. Different methods used Vin

Load
C
to estimate this inductor current include IIR filter realization
Vg
using bilinear transformation of inductor current equation S1
followed by state machine based implementation [4] - [5].
The choice of digital platform for realizing the current estimate
with low cost is essential for its widespread implementation. In
[5], it has been observed that the estimate of current requires a
series of mathematical operations to be performed in sequence. Vo Vo
Potential PA2
This paper evaluates the implementation aspects of current Divider PA4 Iest
estimator using a digital signal processor. The STM32 based Vin Vin
(upto 3.3 PA3
microcontrollers have been considered for evaluation in this V Max)

work.
Bias(1 V) PB13 Gate
The major contributions of the paper are as follows. This PA6
PWM Driver
paper shows the design of a current estimation using a low PB14
Vsw
cost digital signal processor platform. This approach can be
used to provide estimates of inductor current in instantaneous Comparator STM32F407
form. The method includes sensing of voltages which show
lower variation due to low ripple content in dc-dc converters. Fig. 2. Block diagram for implementation of current estimator using STM32-
make digital signal processor.
The current estimation performance is evaluated when the
converter operates in CCM and DCM conditions.
II. T HEORY OF C URRENT E STIMATION If the current estimate is computed within a digital processor,
A. Fundamental relations for Inductor current estimation the transfer function needs to be represented as a discrete
equation. The discrete equation for inductor current estimation
The averaged value of voltage (VL ) across the inductor of is presented in (5) using bilinear transformation.
a boost converter shown in Fig. 2 for a switching interval in
steady state can be expressed as (1).
iLest [n] = a0 ∗ iLest [n − 1] + b0 ∗ vL [n] + b1 ∗ vL [n − 1] (5)
VL = Vin − (1 − D) ∗ Vo (1)
where, Vin , Vo , and D are input voltage, output voltage, and The values of above coefficients are given in (6).
state of the switch ‘S1 ’, respectively. When switch S1 is ON, L − rL ∗ Ts /2 Ts /2
a0 = ; b0 = b1 = (6)
D is equal to 1 and when it is OFF, D is 0. At any given time L + rL ∗ Ts /2 L + rL ∗ Ts /2
instant, the voltage across the inductor can be represented as
where, L, rL , TS are inductance, inductor resistance (DCR)
(2)
and sampling time, respectively.
vL (t) = Vin (t) − Vsw state ∗ Vo (2)
B. Effect of parameter variation on estimation
In this case, the term ‘Vsw state ’ represents the state of the
switch node of boost converter. The value of the variable The estimate of inductor current is dependent upon the
Vsw state will be 0 or 1 depending upon whether the control two parameters used in the transfer function. In practice, the
switch status is ON or OFF, respectively. Using the measured parameters used in estimation may vary with time. A variation
inductor terminal voltage, the current in the inductor can be in inductance parameter results in changes in estimated ripple,
estimated using relation (3). while variation in DCR parameter results in offset in inductor
current [6]. Hence these parameters need to be evaluated pre-
iL (s) 1 cisely. Also, the DCR value can be updated during operation
= (3)
vL (s) sL + rL if it changes due to a change in operating conditions [7].
where, iL , vL , L and rL are inductor current, voltage across III. I MPLEMENTATION OF C URRENT E STIMATOR USING
inductor, inductance and inductor dc resistance (DCR) value D IGITAL S IGNAL P ROCESSOR
respectively. Hence, if the inductor voltage, inductance, induc-
tor resistance values are known then the inductor current can A. System Requirements for Digital Implementation
be estimated easily. Now from (2) and (3), relation (4) can be In order to realize the estimate of inductor current for a
derived. boost converter within a digital signal processor, the following
iL (s) 1 parameters are required as inputs. (a) input voltage of the
= (4) converter, (b) output voltage and (c) switch node voltage. Fig.2
Vin (s) − Vsw state ∗ Vo (s) sL + rL

Authorized licensed use limited to: KIIT University. Downloaded on March 17,2024 at 06:54:15 UTC from IEEE Xplore. Restrictions apply.
shows the detailed schematic diagram of the circuit being
implemented using STM32F407 microcontroller kit [8]. The
two analog signals are interfaced to the inbuilt ADC inputs of Vg
the DSP kit, while the switch node voltage status is captured
Rising Falling
using a single-bit comparator at general purpose input port Edge Edge
of the microcontroller. The input voltages are stepped down t
using a known voltage division ratio to meet the ADC input
IL
voltage specification (range of 0 to 3.3 V dc). In this case,
the resistive divider circuit used has a step-down ratio of 21:1
i.e, a 21 V input voltage will be converted to 1 V. The DAC
pin PA4 of the microcontroller kit gives the estimated current
output for evaluation in this work.
Since the input voltage of the dc-dc converter is typically interrupts
t
constant and also the ripple in the output voltage will be small
dTs
(typically 5%), so these can be assumed to be nearly constant.
Ts
In this case, the ADCs can be used at much lower sampling
frequencies. Here the ADCs are used to sample the input and
output voltage with the 10-bit resolution, which means it can IL_est
sense voltage with a resolution of 3.22 mV. The ADCs are used
at regular intervals to sample the analog inputs from converter.
Here the scaled-down value of input voltage Vin is sensed at
pin PA3 and output voltage Vo is sensed at pin PA2 as shown t
in the Fig. 2.
Fig. 3. Interrupt generation for current estimation and rising & falling edge
B. Timing constraints for Current Estimation Algorithm detection.

In order to estimate the current digitally, the sampling


frequency or current calculation at a particular time instant to some variables at the time of variable declaration itself. Fig.
must be much faster than one time period of the inductor 4 shows the flowchart for the current estimation algorithm.
current. Here the converter is operated at a switching
frequency of 10 kHz so we need to estimate the current C. Identification of Switch node status using System Interrupts
much faster than this frequency. Here the calculation is Along with the input and output voltages, the last parameter
being done at 200 kHz frequency which means we have needed for current estimation is the switch node voltage state.
20 samples in one time period. So, here one of the timers The state of switch node voltage can be detected by using one
(TIM2 in this DSP) is used for ISR (interrupt service routine) analog comparator which can compare the switch node voltage
generation at every 5 µsec and as this ISR is generated it against a reference and gives the information of switch state
serves another function that calculates the current using these in binary form. As the value of high state voltage is more than
three parameter values and using relation (5). This concept is 3.3 V which is the max value of any signal that can be applied
illustrated in Fig. 3, where generation of interrupts at equal to STM32F407 board. Potentiometer arrangement is needed to
interval of time and corresponding estimated current ‘iLest ’ scale down this value below 3.3 V.
is shown. Here the estimated current shape becomes more The output of the comparator is assigned to DSP kit as
smooth if number of samples taken are more. an external interrupt at two pins, one for detecting the rising
edge and one for the falling edge (here PB13 and PB14 pins
After the calculation of inductor current at a particular ISR, are used for rising and falling edge detection respectively).
this calculated value will be stored for iLest [n − 1] variable As STM32F407 detects rising or falling edge it generates
so that it can be used at the time of next time as (n − 1)th an interrupt (EXTI port ISR in Fig. 4) which is used to set
sample value. Similarly vL [n] is stored at vL [n − 1] values the switch node voltage state Vsw state so that voltage across
also as shown in TIM2 algorithm in Fig.4(b). inductor can be known according to (5). Also, here EXTI ISR
The calculated iLest [n] value is assigned to a DAC at the is set as first priority over TIM2 ISR because if it detects the
same ISR. Here STM32F407 onboard DAC is used to show the transition of switching state as soon as possible, it will have
output at pin PA4 so the output can be seen between PA4 and very less delay in detecting the peak inductor current.
GND of STM32F407 at a scaled down version as it can give
output in the range of 0-3.3V. Also the various coefficient used D. Estimation of current for CCM and DCM operations
in relation (5) are evaluated separately in the main function The inductor current shape and the voltage across inductor
itself. For evaluation of these coefficients, L, rL and sampling are different for CCM and DCM modes as shown in Fig
time (Ts ) are needed which can be measured once and assigned 5. Relation (5) provides the implementation expression for

Authorized licensed use limited to: KIIT University. Downloaded on March 17,2024 at 06:54:15 UTC from IEEE Xplore. Restrictions apply.
Main() TIM2 ISR
EXTI port ISR

Configure TIM3 for PWM generation. Evaluate IL_est[n]


Configure TIM2 for ISR generation. according to eq-5
Configure ADC1, ADC2 for i/p and o/p
voltage measurement. No
GPIO = PB13
Define constant values.
Initialize and evaluate different variables No
Configure DAC. IL_est[n] > 0
Yes
GPIO = PB14
Yes Set IL_est[n] = 0 No

Set Vsw_state = 0
Yes
while()

Set Vsw_state = 1
Store IL_est[n] to IL_est[n-1] &
VL[n] to VL[n-1]
Get ADC value and assign it to some
Store the IL_est[n] value to
variable.
DAC. EXTI port ISR
Evaluate corresponding Voltage value
END
from ADC output value.
Evaluate In_avg.
END
TIM2 ISR

(a) (b) (c)

Fig. 4. Flowchart for algorithm used to implement current estimation on STM32 DSP board a) Main Function algorithm b) TIM2 ISR function algorithm
and c) External interrupt handling function algorithm.

(5) is used with boundary conditions. Compared to CCM


Vg
operation, inductor current has more negative slope during
Vg
‘(1 − d)Ts ’ time interval and assumes zero value before next
t t
time interval as shown in Fig. 5. The boundary conditions
require the estimated values to be checked for zero crossing
and the estimate would be saturated to zero indicating DCM
IL IL mode. Hence, whenever the estimate of current is less than
zero, iLest [n] is made zero forcefully as can be seen in TIM2
ISR algorithm in Fig. 4.
t t

Vsw Vsw E. Implementation Challenges of Current Estimator


Vo Vo
Vin
Apart from all the above concepts, this current estimator
t t
implementation has some limitations. The first limitation
dTs (1-d)Ts Ts dTs (1-d)Ts Ts is the estimation speed. Here relation (5) is evaluated for
CCM DCM
estimation and this equation consists of algebraic operations
such as addition and multiplication which need to be evaluated
Fig. 5. CCM and DCM operation current and switch node voltage. by the processor which has an impact on sampling speed.
Also assignment operation takes some time in the processor
so it depends on how much time it takes to perform these
estimated current. However, for DCM operation output operation after every ISR generation.
voltage is greater than CCM condition for the same duty ratio
“d” i.e., (Vin /(1 − d)) and also in the discontinuous region The second one is the time taken by ADCs and DACs in
current is zero and voltage across inductor is equal to zero the main function. Hence due to all these challenges, TIM2
and Vsw will be equal to Vin . ISR is restricted for some frequency above which it is not
able to estimate the values properly.
In order to estimate current in DCM condition, relation

Authorized licensed use limited to: KIIT University. Downloaded on March 17,2024 at 06:54:15 UTC from IEEE Xplore. Restrictions apply.
Vo
Analog
Comparator
(LM311) Load

Boost
Converter STM32F407 VSW
Inductor
Board

DAC Output

IL(current probe o/p)

Resistive
divider
circuit IL(estimated)
Gate Driver
Input Voltage Circuit
terminal

Fig. 6. Hardware setup for STM32 based low cost current estimator.

The processor delay may lead to delays in peak detection of Fig. 8. Evaluation of estimator performance under CCM condition for boost
converter with L = 100µH. a) Output voltage (Ch-1), b) Switch node voltage
current. Due to minimum time required to complete the EXTI (Ch-2), c) Measured current using current probe (Ch-3) and d) Estimated
ISR function there is a delay in output. Also sometimes due current (Ch-4).
to small variations in ADC values, there will be some small
error present in the peak value of the estimated current.
IV. E VALUATION OF C URRENT E STIMATOR AND ITS
V ERIFICATION Vo

A. Hardware implementation
Vsw

Vo

Vsw
IL(current probe o/p)

IL(estimated)

IL(current probe o/p)

Fig. 9. Evaluation of estimator performance under CCM condition for boost


converter with L = 450µH. a) Output voltage (Ch-1), b) Switch node voltage
IL(estimated) (Ch-2), c) Measured current using current probe (Ch-3) and d) Estimated
current (Ch-4).

an inductance of 100 µH and internal resistance of 0.2 Ω.


Fig. 7. Evaluation of estimator performance under DCM condition for boost The boost converter is operated at 10 kHz frequency for this
converter with L = 100µH. a) Output voltage (Ch-1), b) Switch node voltage hardware setup and one variable resistor is used to implement
(Ch-2), c) Measured current using current probe (Ch-3) and d) Estimated
current (Ch-4). load. One analog comparator LM311 is used here for sensing
the switch node status. One resistive divider is used to scale
In order to validate the performance of the estimator, down the magnitude of voltage so that it can be sensed by
STM32F407 discovery board is used to control a laboratory the STM32 board. A bias supply setup is used to deliver 15
scale prototype of a boost converter whose input voltage is V dc and 5 V dc supply voltage to the gate driver circuit and
varied in the range of 5 to 15 V dc. The inductor used has bias for analog comparator circuit, respectively. Also, this 5

Authorized licensed use limited to: KIIT University. Downloaded on March 17,2024 at 06:54:15 UTC from IEEE Xplore. Restrictions apply.
TABLE I R EFERENCES
C OST OF C URRENT ESTIMATOR
[1] S. Chattopadhyay and S. Das, “A Digital Current-Mode Control Tech-
Component Cost(in Rs.) nique for DC–DC Converters,”in IEEE Transaction on Power Electron-
STM32F407 board 1723 ics, vol. 21, no. 6, pp. 1718-1726, Nov. 2006.
Resistor and Pot 100 [2] R. Channappanavar and S. Mishra, “A novel current estimation tech-
Analog comparator(LM311P) 100 nique for digital controlled switching converters operating in CCM
and DCM,” 2017 IEEE Energy Conversion Congress and Exposition
Wires 100
(ECCE), Cincinnati, OH, USA, 2017, pp. 1781-1786.
Gate Driver Circuit 560
[3] H. Kumar, R. Channappanavar and S. K. Mishra, “High Bandwidth
Total 2483
Inductor Current Estimator for Digitally Controlled DC–DC Converters
for Light Load Applications,”IEEE Journal of Emerging and Selected
Topics in Power Electronics, vol. 9, no. 6, pp. 6681-6691, Dec. 2021.
[4] K. Biswas and O. Ray, “A Nonintrusive Digital Current Sensing Method
V supply can be used to power the STM32 board or a USB for DC–DC Converters With Wide Load Range,” in IEEE Sensors
cable can be used to supply and debug the STM32 board at Letters, vol. 7, no. 6, pp. 1-4, June 2023.
the same time. A current sensor probe is used to compare the [5] K. Biswas, O. Ray and S. Boppu, “State Machine Based Inductor
Current Estimation Technique for Digitally Controlled DC-DC Con-
estimated current with the measured current. The hardware verter,” 2022 IEEE 1st Industrial Electronics Society Annual On-Line
setup is shown in Fig. 6. The cost of different components Conference (ONCON), kharagpur, India, 2022, pp. 1-6.
used to realize this current estimator is tabulated in Table. I. [6] P. Mattavelli, “Digital control of DC-DC boost converters with inductor
current estimation,” Nineteenth Annual IEEE Applied Power Electronics
B. Hardware verification Conference and Exposition, 2004. APEC ’04., Anaheim, CA, USA,
2004, pp. 74-80.
The hardware setup is tested for both CCM and DCM [7] C. Chen et al., “Online Inductor Parameters Identification by Small-
operations. The input voltage is set in the range of 5 to 15 V Signal Injection for Sensorless Predictive Current Controlled Boost
Converter,” in IEEE Transactions on Industrial Informatics, vol. 13, no.
dc and the duty ratio is set at 30% for both CCM and DCM 4, pp. 1554-1564, Aug. 2017.
operations in open loop mode of operation. As the load is [8] RM0090 Reference manual (Rev 19th), STMicroelectronics, Feb,2021.
increased, the boost converter transitions from CCM to DCM. Accessed: Sept. 19,2023.[online] https://www.st.com/resource/en/refer
ence manual/dm00031020-stm32f405-415-stm32f407-417-stm32f427
Also, this setup is tested for different duty ratio, input voltage -437-and-stm32f429-439-advanced-arm-based-32-bit-mcus-stmicroel
and output load values. The hardware results for both DCM ectronics.pdf
and CCM operations are given in Fig. 7 and Fig. 8 respectively.

For DCM operation in Fig. 7, the input voltage of the


boost converter is set to 10 V dc, the load is set at 23.4 Ω
and output obtained is 15.01 V dc for 30% duty ratio. For
CCM operation in Fig. 8, the input is set at 10 V, the load is
set at 12 Ω and the output voltage obtained is 13.25 V dc.

The estimator performance is evaluated with a different


inductor in the same converter. The parameters are L =
450 µH and rL = 0.2 Ω. Fig. 9 shows the performance
of estimator for the above mentioned parameters with input
voltage of 10 V, load = 100 Ω and duty ratio = 30%. The
results show that the proposed approach works for different
parameter values.
V. C ONCLUSION
This work presents a low-cost implementation of current
estimator using STM32-microcontroller for dc-dc converter.
This method uses input, output and switch-node voltage for
estimation. The input and output voltage are sensed by ADC
of STM32-board and one analog comparator is required to
sense the switch-node state which is sensed by STM32-board
as external interrupt. The estimated result is verified with a
hardware prototype for different conditions.
ACKNOWLEDGMENT
The author would like to thank the Ministry of Electronics
and Information Technology, Government of India for spon-
soring part of the work carried out under this project through
“Development of Electric Vehicle Subsystem Program (Part-
1)” with OM no. 25(2)/2021-ESDA.

Authorized licensed use limited to: KIIT University. Downloaded on March 17,2024 at 06:54:15 UTC from IEEE Xplore. Restrictions apply.

You might also like