Copyright © IFAC System, Structure and Control Oaxaca, Mexico, USA, 8-10 December 2004
ElSEVIER
IFAC PUBLICATIONS www.elsevier.comllocate/ifac
DC-to-AC CONVERTER USING A DC-to-DC BOOST CIRCUIT AND A DSP-TMS320C31 Mario Spinetti-Rivera·· .. ·1 , Osmary Ostos-Moreno", Hebertt Sira-Ramirez"', Richard Marquez"" 'Dept. Sistemas de Control, Fac. Ingenieria, Universidad de Los Andes, Merida 5101, Vene::uela, email:{marios.lIIarque::}@lIla.ve , EISULA, Fac. Ingenierfa, Universidad de Los Andes, Merida 5101, Vene::lIela, email:
[email protected] .. , ClNVESTAV-IPN, Dept. Ing. Eleclrica, Seccion Mecatrollica. Av. lPN 2508, Colonia San Pedro Zacalenco, AP 14740, 07300 Mexico D.F" Mexico, email:
[email protected]·estav.fI1x
Abstract: We use a standard DC-to-DC power converter of the ' boost' type to automatically generate a desired AC output capacitor voltage signal using sliding mode control. We use an off-line iterative algorithm, which is based on the differential flatness of the traditional boost converter circuit, and results in a suitable sliding surface candidate for on-line feedback control purposes. Based on inductor current measurements, the sliding surface candidate is synthesized which guarantees an approximate sinusoidal output voltage wavelorm to the desired reference signal. The actual sliding mode controller implementation used a DSP TMS320C31 , which exhibits large processing speed and floating-point capabilities, necessary to achieve the required arithmetic precision. For the A ID conversion we used the TLC32040 with a suitably high conversion rate. Copyright © 2004 lFAC Keywords: Circuits switched networks, DC-TO-AC Conversion, Circuit large-signal models, Sliding-mode control, Implementation.
I.
converter model and the minimum phase character of both system states. A radical different problem is faced when a boost or a buck boost converter is used. In these cases, the (average) converter models are nonlinear and the output capacitor voltage variable is a non-minimum phase variable. Any attempt to force a constant or a (biased) sinusoidal signal on the output voltage variable, through a direct feedback regulation scheme, results in an internally unstable dynamics. As it is known in nonlinear feedback control theory, differential flatness is a property that allows one to elegantly sidestep the non-minimum phase output regulation difficulties by invoking the lack of a ::ero dynamics on the flat output variable (an output capable of completely differentially parameterizing all system states, inputs, and original outputs in an average sense). Nevertheless, the
INTRODUCTION
DC-to-AC power conversion constitutes a long standing challenging technical problem when the designer is restricted to use traditional DC-to-DC power conversion units, such as a "buck", "boost", and "buck boost" converters. In the buck converter case, DC-to-AC power conversion is a relatively straightforward problem, via trajectory tracking techniques, due to the linearity of the averaged
I Partially supported by FONACIT (National Foundation of Science, Technology and Innovation of Venezuela) under research contract 2000000838.
339
We consider the differential equations representing the boost converter circuit shown in Figure I: dr L_ 1 = -lLr , + E
differential relations between the flat output (which in most DC-to-DC Power converters is constituted by the total stored energy or incremental variations of such a quantity) and the capacitor voltage lead to an implicit non linear loca/~v unstable differential equation which cannot be exactly solved. This prompts the need for an off-line functional iterative computation scheme, which is here proposed, yielding approximate stable, bounded. solutions, through candidate relations, between the input inductor current and the output capacitor voltage. In this work, we take the necessary steps to experimentally implement an automatic feedback control scheme to generate a biased sinusoidal voltage wave using a traditional DC-to-DC power converter of the "boost" type. The same approach can be developed for the "buck boost" converter with little additional effort. The proposed feedback control scheme is based on sliding mode control techniques, achieved through the synthesis of a suitable sliding surface. Such a sliding surface uses only inductor current measurements. The switching element position in the boost circuit is decided simply on the basis of the sign of such a sliding surface. As a result, the average (ideal sliding) dynamics corresponding to such imposed inductor current evolution generates, in turn, the deSired biased sinusoidal output voltage at the circuit load . The sliding surface candidate is obtained by means of an off-line computational algorithm, based on the characteristic differential flatness of boost converter circuit. The off-line algorithm is, in fact, a functional iterative algorithm embedding the differential algebraic relations linking the desired output signal and the flat output (represented by the total stored energy) into a recursive set of relations from which approximating sliding surface candidates can be obtained. In fact, just one such functional iteration is enough to obtain a reasonable closed loop approximation to the desired output sinusoidal signal. The sliding mode feedback control scheme was actually implemented, and tested, using a Texas Instrument Starter Kit, provided with a DSP TMS320C31 microprocessor. The microprocessor speed (25 MIPS) and its floating-point capacities were essential features in adopting this integrated circuit as the basis for the proposed sliding mode feedback solution to the DC-to-AC conversion problem. 2.
dt
'
x, Cdr-,' =lIX --'-
(I
)
dt 1 R where E is the external supply voltage, R is the load resistance, C is the output circuit capacitance, L is the input circuit inductance, x/ is the input inductor current and Xl is the output capacitor voltage, or load voltage. The variable /I represents the switch position function, taking values in the discrete set {O,\} and effectively acting as a control input. An average model of the above system (where 11 is replaced by ~l , supposed to be a continuous variable) has been shown to be exactly linearizable and, hence, differentially flat , (Sira-Ramirez, and Ilie, 1989). This means, that there exists a function. called the flat Olltput -here denoted by F - such that all averaged values of the system variables (voltages, currents and the average control input) can be expressed as differential functions of F (i.e., as functions of F and a finite number of its time derivatives). This property will be crucial later in our developments to compute a desired trajectory for the inductor current XI ' A flat output of the average boost converter model is given in this case by the total stored energy: ?
F
2)' xi =2.1(2 Lf, +0'2 ; F = Er, ---/i
(2)
The boost converter circuit is known to be minimum phase with respect to the inductor current taken as a system output and a non-minimum phase system with respect to the output capacitor voltage. when viewed as the system output. This last fact makes it particularly difficult to obtain a physically meaningful solution for the output capacitor voltage trajectory tracking problem in this class of power converters. Given a boost converter circuit as described above. and a desired biased sinusoidal signal for the output capacitor voltage, of the form.
X~(I) = A + ~sin(wt)
(3)
2 we would like to find a feedback control system, based only on inductor current measurements. which automatically generates the desired output voltage signal, or a suitable approximation, by means of feedback commanded switching of the variable u. Consider the flat output and its first time derivative. See equation (2).
THE DC-TO-DC BOOST CONVERTER CIRCUIT
L
3.
SLIDING MODE CONTROLLER
We consider a sliding mode feedback strategy: 11 =
0.5( 1+ sign (
a))
(4)
where the sliding swiace equation is given by O' = x\-x\* (t) (5)
Fig. I . Boost converter circuit.
The starry denotes the reference signal to sliding surface. We need to obtain an expression for the
340
Amplifier (Max-471) to convert Inductance Current to Voltage, Analog to Digital Converter (ADC TLC3240C) to convert Capacitor Voltage to digital numbers, Driver/Optocoupler to electrical decoupling Boost of Microprocessor.
inductor current x~ in terms of the desired capacitor voltage
x; . Thus, an iterative off-line computation
scheme will be used to generate a suitable reference trajectory for the desired inductor current (see SiraRamirez, 200 I), which can be obtained as
Microprocessor
x*
=x* +Fk* l.k I,k
To achieve the feedback law we need a continuous evaluation of the sliding surface and obtain a control action based on its sign. One way to achieve this is to execute a timed sequence of instructions using the microprocessor; this sequence begins by reading the inductor current, continues by calculating the control value, and, next, proceeds to apply the required power over the actuator. The sampling, evaluation and decision process is periodically repeated. To complete this operation. the system needs a high speed to maintain the system suitably controlled. In this case, we selected the TM320C3l DSP series to implement the controller. This DSP series has floating-point capabilities and allows to increase the mathematical precision of the controller. It also has enough speed to adequately control the entire process. In our case, the specific selected microprocessor was the TMS320C3160 with 50 MHz clock and 25 MIPS (millions of instruction per second). In fact, we used the TMS320C3x DSP Starter Kit, which includes the TLC32040C analog interface.
* 1( * 2 *2) (6) Fk =2 L>':I,k +Cx 2 This method is called of 'functional iterations' or ' approximate functional iterative solutions' . The first approximation to the desired relationship is obtained when k=O, therefore, from equation (5):
(x; (t))2 (j
where
X2*
=
xI -
(7)
RE is the desired output voltage signal.
The equivalent control associated to this slidingmode control strategy, which is consistent with the ideal sliding motions: cr =O, d cr /dt=O, is given by:
u
E - L.\-I
eq
= ~~-
(8)
x2
A necessary condition for existence of a sliding regime is given by 0-0-<0 (see Utkin, 1977), which results in the following relations:
X;( x l -RE
J( '.
2x;.r;
4.2 So/,fll'are .
j
Assemblv Language.
. \ 1 - - - <0 (9) RE
RE *.* RE2 u(E-x2 ) < x 2x 2 < 2L
We use C+ compiler and/or assembler of TMS320C31, working in PC computer interfaced with DSP Started Kit.
(10)
See (Sira-Ramirez, 200 I) for technical details. 4.
Programming o/,Sliding SlIIjace.
LABORATORY IMPLEMENT A nON OF THE TRACKING FEEDBACK LAW
To implement the sliding mode feedback controller we wrote some sub-routines and a main program, all in assembler. To minimize the program execution time, we selected the assembler language of the TMS320C3x processor. All routines were developed using this assembler program. To complete the interface between the Starter Kit and a PC we used two programs supplied by Texas Instruments: the DSK3A assembler and the DSK3D debugger to test each portion of the software development.
The implementation consists of two separate blocks, a software block and a hardware block.
4.1 Hardware. Boost Circuit. We built a boost DC-to-DC Power converter with the following parameter values : E=5 Volts, C= IO uF, L=225 mHo R = 480 Ohm. The converter includes a suitable combination of a diode and a transistor for the synthesis of the ideal switching element.
Initialization of variables for the system and for the sampling time. Initialization of analog interface (INIT AIC) Return Label Interruptions programming Calculating the desired current x,'(Calseno) using Fourier Series expansion with A=1.5 and B=0.8A in floating-point precision Readings of the AID device and reading adjustments . Computation oflhe sliding surface.
Intel/ace To turn on the DC-AC Converter, we need to use electronics components to interface the Boost Circuit with DSP Controller. This include Transconductance
341
connection with this quantity and the reaction of the controller is considered to be instantaneous. When we take into account the microprocessor operation, including the discretization process, the inescapable associated time delays produce calculation, decision and implementation cycles. Thus, to implement the controller we need to use a external time source, for instance an interruption provided by an external clock or a sinusoidal signal to establish the base time to construct the AC sign'al output. Ifwe don't want to use an external signal, we need to establish a software generated base time. This implication produces a slot of time to synchronize the entire process. Included in this time slot are all the time delays that we have previously mentioned. In our case, we want an AC signal output voltage with a specific defining parameter given by the desired output voltage frequency (f= 106. 1Hz). The corresponding period is thus, T=I /f=9.42mseg. To synchronize the software with the sliding surface controller we use the Delta Time that we have described before using a division number, dented by N, which we take to be N=IOO. With this number we calculated the required Delta Time as, t,1=TIN=94.2 seg. This time interval includes all the required microprocessor delays and the necessary time delay td which we calculate with the addition of all the considered delays.
Decision signaling to the actuator using the internal timer such as output port (TCLK I) Division Number Updating. Return (Wait)
5. TIME DIAGRAM. The use of a microprocessor to implement the feedback controller requires the generation of a timed sequence of events for the appropriate calculation of the sliding surface, we show this process here:
~-
/~-----/
/
----.... I
--
I
I
I I
I
Read X,
calculate
and
"~O.5(I+sig"(
Ad)u.t
tu
I" F~lU'~
Switch on S;;Ch off Delay
tsw _..
Id-·
L Sliding slU"fIU."f (;lkul;'ltiUIt ('~"('It'"
Figure 1 represents the constitutive parts of the calculation cycle and all the associated sub-processes internal to each cycle. The total time per cycle IS called Delta-Time and it is denoted by tA .
I f we observe this time structure it has a resemblance with the "duty ratio" of a PWM controller but it is clear that we use a sliding surface to calculate this controller.
The ideal sliding surface is continuous and it changes in a continuous form. However, the use of a microprocessor introduces samplings, delays, calculation cycles, etc. For this reason, during the computation periods, the controller applies the control input in a delayed fashion, in a sort of openloop fashion . Once the computations are completed the right decision is communicated to the controller thus "closing the loop" within the Delta Time. The Delta Time interval (t,,) consists of four parts: tad or time to read x) (inductor current). This time interval is initiated when the processor sends an order to the AID converter to perform an inductor current measurement. The interval is considered finished when the microprocessor has acquired the required inductor current information. tu or time needed to calculate the sliding surface. This interval of time is required to realize mathematical approximation of sliding surface. tsw or time to switch, this time occur when processor send a order to actuator to turn on or turn off, in this case the actuator is a transistor or a opto-coupler. le or time to calculate the desire XI' (desire inductor current), this time occur when processor realize mathematical approximation of inductor current include in this case the sine function. td is a delay time used for adjustment and it is introduced only when it is necessary.
6. SIMULATIONS. We take into account two kinds of simulations: we refer to (Sira-Ramirez, 2001) where all simulations were calculated in a continuous fashion using an ideal controller and we re-calculated all simulations including the Time Diagram and some real specifications of the boost converter circuit to better approximate the controller to a practical controller implementation. The realistic specifications are referred to the internal resistance of the input inductor, the internal resistance of the constant external power supply, the diode and transistor resistances and drop voltage power supply equivalent. With this specification we used the approximate model show immediately:
Where Vf is forward diode voltage, E power supply voltage, rin internal power supply voltage, rd forward diode resistance and Vce voltage collector emitter. We have four figures showing the computer simulations. Figure 2 shows three signals, the upper
We now want to consider the sliding surface. Theoretically, no time delays are considered in
342
signal represents the closed loop output capacitor voltage versus time while the middle signal represents the input inductor current versus time. The lower figure is the applied control input. In all figures we used approximate boost circuit model.
Fig\U·~::'. ;;;~'"
O lH 5 ':: 0"1-0.,1 ,, , "
R~al
Capacitor Yo!tag~ and ('ontl'ol Signal
G O .' R~ ~I
rom ..
Figure 3 show compares the desired reference capacitor voltage and the obtained closed loop output capacitor voltage with approximate model. The figure 4 represents the equivalent control.
The upper portion of figure 6 shows the voltage capacitor waveform and a signal proportional to the actual input inductor current (XI(!))'
J
CH2
1"-
CHl 14.6fN
Fi2\U '~
6. Rral C.lpadlol· \'o!t:lgr and hHluffor CIOHIlI
It is clear that the generated AC output signal has a distortion and it is produced by the following reasons: We use the first approximation of the proposed functional iterative sequential algorithm for the generation of the inductor current reference. There exist several neglected non-Iinearities associated to the boost converter circuit and to the electronic devices building the feedback controller (diodes, transistors, opto-coupler, etc).
FiltlU. -4. £'llli""I<,,1 ('ollll'ol
The results show that exist differences between simulations and experimental measurement, some reasons are associated with the real time process, For examples the internal resistances of power supply, inductance, the real curve of diode, effect of transistor switching, parasites capacitances, and other produces energy looses capable to maintain the differences between the "ideal or theoretic" results and "real or practical" results in voltage output.
7. EXPERIMENTAL RESULTS . We implemented the required software and hardware of the described boost circuit and the associated sliding mode feedback controller. Figure 5 shows two signals, the upper signal represents the experimental closed loop capacitor voltage, or x~(t) , versus time and the lower signal represents the feedback control action produced by the sampled signs of the sliding surface evolution.
To realize the experiments we use the circuit in the
343
figure 7 including boost, interface components and microprocessor.
Sira-Ramirez, H. and Ilic, M" (1989) Exact Linearization in Switch Mode DC-to-DC Power Converters. International Journal of Control. Vol. 50, No 2, pp 511-524. Texas Instrument (1996) TMS320C3x DSP Starter Kit,,, Texas Instrument (1996) TMS320C3x User Guide, Texas Instrument (1996) TMS320C3x Addendum to the TMS320C3x User's Guide. Texas Instrument (1995) Analog Inteiface Circllits TLC32040C. Garcia, D. (1989) Precision Digital Sine Wave Generation with TMS32010, Texas Instrument Gelabert, P. (1996) TMS320C31 DSP Starters Kit Demo Program, Texas Instrument Larson, K. (1996) TMS320 DSP Applications: Loopaic.asm, Texas Instrument. Utkin, V. (1977) Sliding Regimen in the Theory of Variable Stf1lctllre Systems MlR Moscow
Figm't' -. CbTui! llst'd to bnplt'lDent DC-AC Boost
8. CONCLUSION We have used a standard DC-to-DC Power Converter of the "boost" type to automatically generate an AC output voltage signal. This result was achieved by using an off-line iterative algorithm, which is based on the differential flatness of the traditional boost converter circuit, and resulted in a suitable sliding surface candidate for on-line feedback control purposes. Based on inductor current measurements, the sliding surface candidate was synthesized which guaranteed an approximate sinusoidal output voltage waveform. All pertinent time delays such as: conversion time, calculation time, switch on and switch off times of the driver circuit as well as other, less important, delays were conveniently taken into account to avoid feedback performance deterioration. The actual sliding mode controller implementation used a DSP TMS320C31 , which exhibits large processing speed and floatingpoint capabilities, necessary to achieve the required arithmetic precision. For the AID conversion we used the TLC32040 with 19.2 kHz conversion rate. 9, RECOMMENDATIONS The first recommendation is to implement the DC-toAC power converter using the sliding surface off-line approximations of order higher than the first order. The second recommendation is to apply the proposed method to generate a sinusoidal output signal capable of controlling an AC motor. In this context it is useful to analyze the effect of the higher order harmonic signals generated by this DC-to-AC power converter. The third suggestion is to use an harmonic distortion measurement scheme to compare the signal produced by the DC-to-AC power converter with an ideal sinusoidal signal and try to obtain an additional feedback correction term to improve the system performance. The last recommendation is to perform some tests to analyze the system's response to various desired frequencies in the reference signal. REFERENCES Sira-Ramirez, H. (2001). DC-TO-AC Power Conversion on a "Boost" Converter. International Journal of Robust and Non-Linear Control, Vol 11 , No 6, pp. 589-600.
344