IEEE TRANSACTIONS ON POWER ELECTRONICS, VOL. 24, NO. 2, FEBRUARY 2009 559 Design and Implementation of an Adaptive Tuning System Based on Desired Phase Margin for Digitally Controlled DC–DC Converters Jeffrey Morroni, Student Member, IEEE, Regan Zane, Senior Member, IEEE, and Dragan Maksimović, Senior Member, IEEE Abstract—This letter presents an online adaptive tuning technique for digitally controlled switched-mode power supplies (SMPS). The approach is based on continuous monitoring of the system crossover frequency and phase margin, followed by a multiinput–multi-output (MIMO) control loop that continuously and concurrently tunes the compensator parameters to meet crossover frequency and phase margin targets. Continuous stability margin monitoring is achieved by injecting a small digital square-wave signal between the digital compensator and the digital pulsewidth modulator. The MIMO loop adaptively adjusts the compensator parameters to minimize the error between the desired and measured crossover frequency and phase margin. Small-signal models are derived, and the MIMO control loop is designed to achieve stability and performance over a wide range of operating conditions. Using modest hardware resources, the proposed approach enables adaptive tuning during normal SMPS operation. Experimental results demonstrating system functionality are presented for a synchronous buck SMPS. Index Terms—Adaptive control, dc–dc power conversion, digital control. I. INTRODUCTION WITCHED-MODE power supply (SMPS) feedback loops are typically designed conservatively so that closed-loop regulation and stability margins are maintained over expected ranges of operating conditions and tolerances in power stage parameters. Typical designs often lead to degraded closed-loop performance or loss of stability in the event of significant operating point changes associated with component degradation, input voltage variations, etc. These types of power stage parameter changes are mitigated by offline controller redesign to maintain desired dynamic performance requirements. With the increased feasibility of practical digital control in switching power converters , new opportunities exist to incorporate intelligent control algorithms into the system to improve dynamic responses and reliability over a wider range of possible operating points. Recent work in the area of digital control of dc–dc power converters has shown that autotuning algorithms can be completely integrated into the digital controller with relatively small additional hardware requirements –. In particular, approaches S Manuscript received February 16, 2008. Current version published February 6, 2009. Recommended for publication by Associate Editor J. Sun. The authors are with Colorado Power Electronics Center (CoPEC), Department of Electrical and Computer Engineering, University of Colorado, Boulder, CO 80309 USA (e-mail: [email protected]; [email protected]; [email protected]). Color versions of one or more of the figures in this paper are available online at http://ieeexplore.ieee.org. Digital Object Identifier 10.1109/TPEL.2008.2007641 to onetime compensator autotuning based on frequency response data, gathered online, have been proposed in –. However, the identification of frequency-response information requires more significant signal processing –, or several tuning steps –, and assumes undisturbed, steady-state operation. The tuning approach proposed in , which is capable of operation during load transients, also proceeds in two predefined steps. For these reasons, it is more difficult to apply – directly to continuous parameter tuning. The goal of this letter is to present an approach, based on a large body of work in adaptive control theory –, to adaptive tuning of digital SMPS controller parameters during normal closed-loop operation of the converter. The proposed approach is similar in objectives to the work presented in , but the method in which compensator tuning is performed is very different. The proposed approach is based on continuous monitoring of the system crossover frequency and phase margin , and a multi-input–multi-output (MIMO) control loop that adaptively tunes the compensator parameters to meet crossover frequency and phase margin targets. Similar to , a digital signal injection is introduced while the converter operates in closed loop. However, in contrast to , this approach tunes all parameters of the compensator continuously and concurrently. Further, the adaptive tuning causes a very small output voltage perturbation thus allowing tuning without disturbing normal converter operation. Section II describes the proposed approach for adaptive tuning. Section III presents a numerical design procedure for the MIMO control loop. Experimental results are presented in Section IV using a synchronous buck converter power stage. Conclusions are presented in Section V. II. ADAPTIVE TUNING CONTROL SYSTEM A system block diagram for the proposed tuning approach is shown in Fig. 1. The digital controller consists of a voltage A/D converter (ADC), a discrete-time PID compensator, and a digital pulsewidth modulator (DPWM). There are two main components to the adaptive tuning system: a stability margin monitor  and a MIMO control loop. The stability margin monitor is a digital implementation of the analog loop gain measurement technique using signal injection, as first described by Middlebrook . The monitor is connected between the output of the PID compensator and the DPWM input. A digital square-wave signal Vz , with frequency equal to the frequency command finj , is injected in the closed-loop system during normal operation. The magnitude of the injection signal Vz is chosen such that only ±1 LSB at the ADC output is triggered, which is the smallest detectable perturbation. Signals Vx and Vy are 0885-8993/$25.00 © 2009 IEEE Authorized licensed use limited to: UNIVERSITY OF COLORADO. Downloaded on September 1, 2009 at 16:22 from IEEE Xplore. Restrictions apply. 560 IEEE TRANSACTIONS ON POWER ELECTRONICS, VOL. 24, NO. 2, FEBRUARY 2009 Fig. 1. Crossover frequency and phase margin monitor and adaptive tuning control loop block diagram. The outputs of the MIMO control loop are the PID compensator zero locations and gain. G(z) is the transfer function from compensator inputs K , Z 1 , and Z 2 to stability margin detector outputs. processed by bandpass filters tuned to finj to remove unwanted frequency components, and then compared in magnitude using peak detectors. A simple integral feedback controller adjusts the injection frequency finj so that ||Vy (finj )|| = ||Vx (finj )||. As a result, finj represents the system crossover frequency fc T (finj ) = Vy (finj ) =1 Vx (finj ) (1) Simultaneously, a phase detector measures the phase difference ϕ between Vy (finj ) and Vx (finj ) ϕ = Vy (finj ) − Vx (finj ) (2) to obtain the system phase margin. The outputs of the stability margin detector, ϕm = ϕ and fc = finj , are compared to the desired reference values ϕm ref and fc ref , respectively. These error signals are used to adaptively tune the parameters of the compensator Gc (z) in order to achieve the target specifications fc = fc ref and ϕm = ϕm ref . The proposed approach can be applied to adaptive tuning of various types of compensator structures; however in this paper, a generic PID compensator example is considered with the following transfer function: Gc (z) = K (z − Z1 ) (z − Z2 ) . z (z − 1) (3) As shown in Fig. 1, the adaptive tuning system is driven by the errors between the desired crossover frequency and phase margin and the values measured by the stability margin detector. The error signals, fc error and ϕm error , are inputs to a matrix of transfer functions used to determine the compensator zero locations, Z1 and Z2 , and the gain K such that zero error with respect to the target specifications is achieved. The proposed adaptive tuning system relies on the assumption that the feedback loop behaves as a linear, time-invariant system. This should be taken into account when choosing crossover frequency and phase margin targets for the adaptive tuner. The matrix S(z) represents the transfer functions from fc error and ϕm error to K, Z1 , and Z2 z A1 K̂ z−1 Ẑ1 A3 z = z − 1 Ẑ2 z A5 z−1 z z − 1 z fˆc error fˆc error A4 = S(z) . z − 1 ϕ̂ ϕ̂m error z m error A6 z−1 (4) A2 A1 –A6 are designed to achieve stability and desired performance, based on the closed-loop small-signal transfer matrix. To model the closed-loop system, a transfer matrix from inputs K, Z1 , and Z2 to outputs finj and ϕ must be determined Authorized licensed use limited to: UNIVERSITY OF COLORADO. Downloaded on September 1, 2009 at 16:22 from IEEE Xplore. Restrictions apply. IEEE TRANSACTIONS ON POWER ELECTRONICS, VOL. 24, NO. 2, FEBRUARY 2009 561 first. In particular, the transfer matrix G(z) of interest can be written as K̂ K̂ Gf i n j −Z 1 Gf i n j −Z 2 Ẑ1 = G(z)Ẑ1 . Gϕ−Z 1 Gϕ−Z 2 Ẑ2 Ẑ2 (5) Together, (4) and (5) make up a system of loop gains associated with each loop in the MIMO system (6), as shown at the bottom of this page. In (6), the diagonal elements represent the direct-path loop gains, while the off-diagonal paths represent coupling loop gains (i.e., from fc → ϕm or ϕm → fc ). Based on (6), each loop gain entry can be designed, by choosing A1 –A6 , such that the closedloop transfer matrix is stable and well behaved. The closed-loop transfer matrix can be written, in terms of (6), as Gf i n j −K fˆinj = Gϕ−K ϕ̂ fˆc ϕ̂m −1 = (I + L(z)) L(z) fˆc ϕ̂m ref . (7) ref Using (7), the stability of the MIMO control loop can be directly determined based on the location of the closed-loop poles . In particular, the closed-loop system described by (7) is exponentially stable if it is proper and has no poles outside the unit circle . III. NUMERICAL DESIGN OF THE ADAPTIVE TUNING CONTROL LOOP The experimental testbed, from which the numerical design is performed, is a synchronous buck converter, as shown in Fig. 1, with a digital feedback loop realized using a Xilinx VirtexIV field-programmable gate array (FPGA). The nominal power stage parameters in Fig. 1 are L = 4.1 µH, C = 377 µF, R = 2 Ω, Vg = 12 V, Vout = 5 V, and fs = 100 kHz. The ADC is a TI-THS1030 sampled once per switching cycle with an effective LSB resolution of 20 mV, or 0.4% of the dc output voltage. The transistors making up the synchronous rectifier in the power stage are IRFR024 N power MOSFETs. In order to design (7) for desired performance and stability, the indices of (5) must be determined first. In this letter, the modeling is performed based on a design decision to make the stability margin monitor control loop much faster than the adaptive tuning control loop. This allows the dynamics associated with the stability margin monitor loop to be neglected with respect to the adaptive tuning control loop. The waveform illus- Fig. 2. Effect of a step in K on the theoretical (dashed) and simulated (solid) models of crossover frequency monitoring. trating the proposed modeling approach is given in Fig. 2, where as an example the effect of a perturbation in compensator gain is considered. The perturbation occurs at time (n−1) causing the stability margin monitor to update the new monitored crossover frequency very quickly with respect to the next sample of the MIMO control loop fc [n]. The small-signal transfer function from fˆc [n] to k̂[n − 1] is then just a one sample delay td and a gain scale factor. From a practical point of view, computing analytical expressions for the gain factors require analytically solving for the crossover frequency and phase margin as functions of the compensator coefficients. With a second-order plant model and a second-order compensator (PID), the analytical solution becomes very complicated yielding little intuitive insight. Therefore, in this letter, a numerical computation of the desired gains is performed. Also included in Fig. 2 is a simulation of the dynamics of the monitoring control loop after a perturbation in compensator gain. The simulation, performed in Simulink, shows that it is possible to design the monitoring control loop dynamics to be much faster than those of the adaptive tuning loop so that the aforementioned modeling approach is valid. In hardware, the sampling rates of both loops are set relative to the injection frequency (crossover frequency) with the stability monitoring loop having considerably faster sampling. By doing so, as the injection frequency changes, the sample rates of each loop will scale in proportion to each other ensuring that the stability monitoring loop is much faster than the adaptive tuning loop despite the injection frequency. In the experimental system, the sampling rate of the stability margin monitor control loop is set to 16 times slower than the injection frequency, while the adaptive tuning loop sampling rate is set 64 times slower than the injection frequency. Based on the power stage defined before, a nominal PID compensator can be designed for the output voltage feedback loop, using small-signal analysis, to yield slow but guaranteed stable performance. It is assumed that sufficient information about the nominal power stage (i.e., at system startup) is known z A1 Gf i n j −K + A3 Gf i n j −Z 1 + A5 Gf i n j −Z 2 z−1 L(z) = G(z)S(z) = z (A G 1 ϕ−K + A3 Gϕ−Z 1 + A5 Gϕ−Z 2 ) z−1 z A2 Gf i n j −K + A4 Gf i n j −Z 1 + A6 Gf i n j −Z 2 z−1 . z (A2 Gϕ−K + A4 Gϕ−Z 1 + A6 Gϕ−Z 2 ) z−1 Authorized licensed use limited to: UNIVERSITY OF COLORADO. Downloaded on September 1, 2009 at 16:22 from IEEE Xplore. Restrictions apply. (6) 562 IEEE TRANSACTIONS ON POWER ELECTRONICS, VOL. 24, NO. 2, FEBRUARY 2009 TABLE I RANGE OF ALLOWED POWER STAGE VARIATIONS WITHOUT CHANGING ANY FEEDBACK LOOP SIGNS Fig. 3. (a) Lines of constant crossover frequency as functions of compensator gain and zero location. (b) Lines of constant phase margin as functions of compensator gain and zero locations. In (a), the dashed line indicates where the feedback loop changes sign. such that a conservative compensator design can be performed. Given the experimental system, the following compensator was used for system initialization: Gc (z) = 1.0 (z − 0.90) (z − 0.80) z (z − 1) (8) which yields a system crossover frequency fc = 6.2 kHz and phase margin ϕm = 65◦ . Now, using the defined power stage and the compensator given in (8) as the adaptive tuning dc operating point, the small-signal gains given in G(z) have numerically been computed based on the previously described modeling approach fˆinj ϕ̂ −4577 = z 470 z −1138 z 1918 z 2102 K̂ z Ẑ . 1 2239 Ẑ2 z (9) Before designing the indices of (4), a large-signal stability analysis is performed to determine the range over which each loop gain transfer function is monotonic. In particular, because the adaptive tuning system is accounting for power stage parameter changes, the dc operating point around which the MIMO system was designed may significantly change and possibly cause instability. Contour plots of constant crossover frequency and phase margin have been plotted as functions of K and Z1 with Z2 = 0.95. These plots can be used to determine the range of tuned compensator parameters over which the indices of (9) do not change sign. Fig. 3(a) and (b) shows that both crossover frequency and phase margin are monotonic for all cases presented except the effect of large zero location changes on crossover frequency. In this case, as the zero location crosses the dotted line indicated in Fig. 3(a), the feedback loop relating fc to compensator zero location will change sign, and thus negative feedback cannot be guaranteed about this operating point. This is dealt with in hardware by choosing S(z) such that any changes in crossover frequency do not directly affect zero locations A3 = A5 = 0. Fig. 4. Closed-loop frequency response of the MIMO control system from (a) fc → fc re f , (b) ϕ m → fc re f , (c) fc → ϕ m re f , (d) ϕ m → ϕ m re f . Responses (a) and (d) track well up to a given frequency while (b) and (c) reject well, as desired. (10) Fig. 5. Experimentally observed dynamic performance of the MIMO adaptive tuning control loop. (a) Monitored phase margin in degrees. (b) PID compensator z-domain zero locations. (c) Monitored crossover frequency in kilohertz. (d) PID compensator gain. Although this constraint does limit the control design, it helps widen the range of parameter variations over which the control loops are monotonic. Similar plots, as given in Fig. 3, can be used to investigate the range of power stage variations over which each feedback loop remains stable. A summary of these results are presented in Table I showing that major variations in all power stage parameters (C, L, and Vg ) do not cause the feedback loop signs to change. Note that in Table I, each maximum and minimum value Authorized licensed use limited to: UNIVERSITY OF COLORADO. Downloaded on September 1, 2009 at 16:22 from IEEE Xplore. Restrictions apply. IEEE TRANSACTIONS ON POWER ELECTRONICS, VOL. 24, NO. 2, FEBRUARY 2009 563 Fig. 6. Output voltage (top, Ch. 1) and inductor current (bottom, Ch. 2) under a 2.5 A → 0 A load transient. (a) Conservatively designed controller V g = 12 V. (b) Same controller design as in (a) with V g = 8 V. (c) Adaptively tuned controller with V g = 12 V. (d) Adaptively tuned controller with V g = 8 V. assumes that the other power stage parameters are operating at nominal values. Beyond the constraint given in (10), the adaptive tuning gains can be designed to achieve desired performance and stability as discussed previously. In the experimental system, the adaptive tuning control loop has been designed to minimize phase margin error faster than the crossover frequency error. This amounts to choosing A1 , A2 , A4 , and A6 such that the closed-loop bandwidth of the direct phase margin loop is greater than the direct crossover frequency path bandwidth. The gains in the experimental system were chosen as follows: z −3.05 × 10−5 0 z−1 K̂ z 1.11 × 10−4 fˆc error Ẑ 1 = 0 ϕ̂ z−1 Ẑ2 m error −5 z 8.38 × 10 0 z−1 (11) which leads to a system loop gain matrix of 0.14 (z − 1) L(z) = −0.0143 (z − 1) 0.05 (z − 1) . 0.4 and given in Fig. 4. Fig. 4(a) is the closed-loop frequency response from fc to fc ref indicating that crossover frequency reference changes are tracked well up to about 10 Hz, which is the approximate bandwidth of that tuning loop. Similar results are presented in Fig. 4(d) showing that the effect of ϕm ref changes on ϕm is tracked up to about 40 Hz. Conversely, Fig. 4(b) is the response of ϕm to changes in fc ref showing that any changes in fc ref do not significantly affect ϕm due to the action of the feedback loop. Similarly, Fig. 4(c) indicates that fc is not significantly affected by ϕm ref changes. Note that the closed-loop bandwidth of the ϕm → ϕm ref loop is the largest thus ensuring phase margin errors converge fastest. Finally, based on the closed-loop transfer functions, the closed-loop poles can be examined to prove both internal and overall system exponential stability . For the design given by (11), each of the indices of the closed-loop transfer matrix shares the same closed-loop poles given by z1 = 0.8561 z2 = 0.6039 (13) which lie inside the unit circle. (12) (z − 1) The impact of this design can be discussed based on the closed-loop frequency responses, computed from (7) and (12), IV. EXPERIMENTAL VERIFICATION Experimental verification was performed on the same hardware as described in Section III. The adaptive tuning process begins by initializing the system to the nominal compensator Authorized licensed use limited to: UNIVERSITY OF COLORADO. Downloaded on September 1, 2009 at 16:22 from IEEE Xplore. Restrictions apply. 564 IEEE TRANSACTIONS ON POWER ELECTRONICS, VOL. 24, NO. 2, FEBRUARY 2009 TABLE II REQUIRED LOGIC RESOURCES TO IMPLEMENT ADAPTIVE TUNING ALGORITHM given by (8). For this experiment, the target crossover frequency is set at fc ref = 14.6 kHz, or about one-seventh of the switching frequency, and the target phase margin is ϕm ref = 40◦ . Fig. 5 shows how the compensator parameters adjust to meet target stability specifications from startup, with the compensator given by (8), to steady state when the stability margin references are met. As shown in Fig. 5, after a short time, the compensator parameters have converged and settled to Gc (z) = 3.63 (z − 0.9492) (z − 0.8203) . z (z − 1) (14) Based on the discrete-time model of , the analytical crossover frequency associated with the compensator given by (15) is fc analytical = 14.5 kHz and the analytical phase margin is ϕm analytical = 39◦ , both of which closely match the target values and the values measured by the stability margin monitor. Fig. 6 is a comparison of load transient performance between the conservatively designed control loop corresponding to the compensator given by (8) and the aforementioned adaptive loop with target crossover frequency fc ref = 14.6 kHz and desired phase margin ϕm ref = 40◦ . The conservatively designed control loop exhibits noticeably worse load transient performance after a change in input voltage, while the adaptive loop automatically tunes the controller to maintain desired crossover frequency and phase margin. In Fig. 6(c) and (d), the amplitude of the oscillation due to the signal injection Vz is about ±1 LSB of the voltage sensing ADC, or ±0.4% of the dc output voltage. Such a small output voltage oscillation caused by the adaptive tuner makes continuous parameter tuning feasible without disturbing steady-state regulation requirements. As a final note, Table II lists the required logic resources to implement the aforementioned adaptive tuning system and phase margin monitor. Table II indicates that for a reasonable number of gates and no memory requirements, the adaptive tuning controller can be added to any digital system to improve reliability and performance. V. CONCLUSION This letter presented a practical method for online adaptive tuning of digital controllers for SMPS. The compensator tuning relies on continuous monitoring of phase margin and crossover frequency, which are outputs of a stability margin monitor. The monitored phase margin and crossover frequency are input to a MIMO control loop that minimizes the error between the desired crossover frequency and phase margin and the measured values. Simple small-signal models are derived and used to design the adaptive tuning control loop to achieve stability over a wide range of operating points. Experimental results presented for a synchronous buck SMPS demonstrated load transient performance, indicating that with the adaptive tuning system, more aggressive and reliable system performance can be achieved as compared to conventional compensator designs. In addition, the hardware requirements for the entire adaptive tuning system are relatively modest making it a practical solution for highperformance power systems. REFERENCES  D. Maksimovic, R. Zane, and R. Erickson, “Impact of digital control in power electronics,” in Proc. IEEE Int. Symp. Power Semicond. Devices ICs, May 2004, pp. 13–22.  J. Morroni, A. Dolgov, M. Shirazi, R. Zane, and D. Maksimovic, “Online health monitoring in digitally controlled power converters,” in Proc. IEEE Power Electron. Spec. Conf., Jun. 2007, pp. 112–118.  B. Miao, R. Zane, and D. Maksimovic, “Automated digital controller design,” in Proc. IEEE Appl. Power Electron. Conf., 2005, pp. 2729– 2735.  M. Shirazi, L. Corradini, R. Zane, P. Mattavelli, and D. Maksimovic, “Autotuning techniques for digitally controlled point-of-load converters with wide range of capacitive loads,” in Proc. IEEE Appl. Power Electron. Conf., Feb. 2007, pp. 14–20.  W. Stefanutti, P. Mattavelli, S. Saggini, and M. Ghioni, “Autotuning of digitally controlled buck converters based on relay feedback,” IEEE Trans. Power Electron., vol. 22, no. 1, pp. 199–207, Jan. 2007.  Z. Zhao, Li. Huawei, A. Feizmohammadi, and A. Prodic, “Limit-cycle based auto-tuning system for digitally controlled low-power SMPS,” in Proc. IEEE Appl. Power Electron. Conf., Mar. 2006, pp. 1143–1147.  L. Corradini, P. Mattavelli, and D. Maksimovic, “Robust relay-feedback based autotuning for DC-DC converters,” in Proc. IEEE Power Electron. Spec. Conf., Jun. 2007, pp. 2196–2202.  L. Corradini, P. Mattavelli, W. Stefanutti, and S. Saggini, “Simplified model reference-based autotuning for digitally controlled SMPS,” IEEE Trans. Power Electron., vol. 23, no. 4, pp. 1956–1963, Jul. 2008.  K. J. Astrom, “Adaptive feedback control,” Proc. IEEE, vol. 75, no. 2, pp. 185–217, Feb. 1987.  K. J. Astrom and B. Wittenmark, “A survey of adaptive control applications,” in Proc. IEEE Conf. Decis. Control, Dec. 1995, vol. 1, pp. 649– 654.  G. H. M. de Arruda and P. R. Barros, “Relay based gain and phase margins PI controller design,” in Proc. IEEE Instrum. Meas. Technol. Conf., 2001, pp. 1189–1194.  W. K. Ho, C. C. Hang, and J. H. Zhon, “Performance tuned gain and phase margins,” IEEE Trans. Control Syst. Technol., vol. 4, no. 4, pp. 473–477, Jul. 1996.  A. Kelly and K. Rinne, “A self-compensating adaptive digital regulator for switching converters based on linear prediction,” in Proc. IEEE Appl. Power Electron. Conf., Mar. 2006, pp. 712– 718.  J. Morroni, R. Zane, and D. Maksimovic, “An online phase margin monitor for digitally controlled switched-mode power supplies,” in Proc. IEEE Power Electron. Spec. Conf., Jun. 2008, pp. 859–865.  R. D. Middlebrook, “Measurement of loop gain in feedback systems,” Int. J. Electron., vol. 38, no. 1, pp. 485–512, Apr. 1975.  J. M. Maciejowski, Multivariable Feedback Design. Reading, MA: Addison-Wesley, 1989.  D. Maksimovic and R. Zane, “Small-signal discrete-time modeling of digitally controlled DC-DC converters,” IEEE Trans. Power Electron. Lett., vol. 22, no. 6, pp. 2552–2556, Nov. 2007. Authorized licensed use limited to: UNIVERSITY OF COLORADO. Downloaded on September 1, 2009 at 16:22 from IEEE Xplore. Restrictions apply.