Proceeding of the IEEE International Conference on Information and Automation Hailar, China, July 2014
Graphical User Interface Based Controller Design for Switching Converters Ghulam Abbas1, Umar Farooq2, Jason Gu3 and Muhammad Usman Asad4 1, 4
Department of Electrical Engineering, The University of Lahore, Lahore Pakistan Department of Electrical Engineering, University of the Punjab, Lahore-54590 Pakistan 3 Department of Electrical and Computer Engineering, Dalhousie University Halifax, N. S. Canada 1
[email protected],
[email protected],
[email protected],
[email protected] 2
performance can also be investigated by changing their values with the help of sliders.
Abstract— The graphical user interface (GUI) described in this paper provides a complete procedure for constructing both the analog and digital controllers for switching converters for superior performance. Although the GUI is designed to control switching converters having second-order transfer function, it can equally be applied to all second-order systems. The purpose of this GUI is to facilitate SMPS designers, including most control engineers, who lack a sound background in control system theory. Without having deep insight into the control theory, one can easily design a controller for a switching converter in order to achieve dynamic performance. The GUI comes with the advantage of investigating the effects of sampling time and mapping techniques while designing a digital controller. The analog controller is designed on the basis of Bode plot of the frequency response, which is then converted into the digital controller using suitable sampling period. A design example is provided to validate the competency of this GUI.
A MATLAB graphical user interface for analysis and design of analog as well as digital controllers is suggested. In order to meet the required performance criteria, the gain and the positions of the poles and zeros of the controllers are calculated with help of the sliders provided in GUI. The GUI also provides the values of phase and magnitude for each stage of the controller. Various discretization techniques are provided to map the analog controller into the digital one. The transfer function of the plant, analog controller and digital controller are also depicted on the GUI. Controlling systems through a GUI is not a new idea. Although [1] proposed a two layer Simulink-based tool for simulating and designing a power electronics converter but it did not give a solid foundation for designing a controller. Switching DC-DC converters were also controlled digitally by GUI presented in [2] without explaining the step-by-step procedure of realizing a controller. Auto-tuning of PID controller and its analysis and optimization using graphical user interface (GUI) was made in [3] and [4] respectively. Graphical user interface (GUI) panel for microprocessorbased controller for a flying robot application was designed and developed in [5]. The selection of the state and control weighting matrices was made through GUI to design a controller using the optimal Linear Quadratic Regulator (LQR) method in [6]. All the papers mentioned above lack detailing the controller design procedure in a sequential way. This paper comprehensively outlines the controller design method on the basis of frequency response to achieve a better response. The GUI just requires the specified gain and phase margins and the crossover frequency usually five to twenty times below the switching frequency to design a controller.
Keywords-component; GUI; Bode plot; SMPS; control theory; sampling period; frequency response.
I.
INTRODUCTION
A graphical user interface (GUI), being a user interface, permits users to reach out the images rather than text commands. The hidden and abstracted control concepts in control system engineering can easily be comprehended in a very precise and effective way by virtue of a GUI. A GUI makes the learning process more effective and interesting to design the controller for power switching converters particularly for those who do not understand the linear control theory very well. In addition, before the implementation of a control system, it has become a custom to simulate the control system. By doing so, the designer avoids from problem faced by him during hardware implementation. To get optimal response through simulation, one should be well-equipped with control system theory. Understanding control theory may become tedious particularly for a control engineer who is novel in this domain. Effects of the position of poles and zeros of compensator on the overall system response thus cannot be investigated minutely by the novel designer. Keeping in view the above reasons, the paper provides a GUI that will help the designer to design a controller that offers superior dynamic response without having solid concepts in control engineering. The effects of positions of poles and zeros on the system
978-1-4799-4100-1/14/$31.00 ©2014 IEEE
The paper is organized as follows: Section II comprehensively gives the details of all the GUI components including the declaration of the plant, design of analog as well digital controllers, transfer function display blocks for the plant and the controllers, availability of various discretization techniques, etc. A flow chart which defines the control algorithm realized through GUI is also presented. Explanation of simulation results offered by GUI is made in Section III. Finally conclusions are drawn in Section V. A detailed account on the references used in this article is given in the end.
1149
II.
GRAPHICAL USER INTERFACE
B. Analog Controller Design Once the plant to be controlled is well-defined, next step is to design a controller to achieve optimal performance. The GUI incorporating all the essentials to design an analog and a digital controller along with the declaration of a plant is shown in Fig. 3. After calculating and showing the transfer function of the plant, the DC gain of the compensator is calculated in order to remove the steady-state error. A slider is introduced to adjust the gain. The gain and phase of Kc*Gp(s) at the required crossover frequency ωx is also noted. The complete design procedure is comprehensively outlined in flow chart shown in Fig. 4. Frequency response specifications such as crossover frequency, phase margin, gain margin, etc. need to be specified as the design is purely dependent on these specifications. A lead-lag controller in s-domain is generally expressed by:
A generalized closed-loop system for which the GUI is designed is shown in Fig. 1. Any second-order system can be considered as a plant. The GUI is designed for a second-order plant although it can be reconstructed for higher-order plants by following the same procedure that will be outlined in the latter part of the section. The pulse-width modulator (PWM) block may or may not be added to the block diagram as its gain is considered to be one. Its output is a duty cycle ratio signal whose values may vary from zero to one. Since we have taken buck converter as a plant, we need to know about its dynamics.
s s + 1 + 1 ω ω Gc ( s ) = K c . z1 . z 2 s s + 1 + 1 ω p1 ω p 2
Figure 1. Block diagram of a closed-loop control system.
A. Plant (Buck Converter) Transfer Function Buck converter being used extensively in regulated switchmode power supplies (SMPSs) is taken as an example as a plant. The transfer function of the buck converter circuit shown in Fig. 2 is expressed as [7, 8]:
(2)
The beauty of this GUI is that you need not to write any comprehensive MATLAB code to design a controller. Sliders are provided to adjust the positions of zeros and poles of the compensator. For example, the lead portion of the compensator assists in raising the phase curve of the Bode plot at the required 0-dB crossover frequency in order to improve the phase margin while having a very little effect on the magnitude curve. The improved phase margin improves the transient response. A phase margin of about 45° to 60° is usually required to meet the transient response specifications [9]. The lag portion of the compensator is used to increase the lowfrequency gain for improved disturbance rejection or to decrease the high-frequency gain for improved noise rejection or augmented gain margin. Once the compensator is constructed for the required specifications, it is displayed in the GUI. Both the frequency and step responses are highlighted to validate the design. One can also see the immediate effect of the change in position of zeros and poles of the compensator on the performance by moving the zeros and poles with the help of sliders.
Figure 2. Buck converter circuit diagram.
R Vin ( s ) ( RC Cs + 1) R + RL G p ( s) = (1) R + RC 2 L LC s + + C R R + R C s + ( ) 1 L C R + RL R + RL
C.
Digital Controller Design The analog controller, once it meets the required specifications, can be converted into a digital controller by selecting one of available transformation techniques from the popup menu. The menu offers five transformation techniques namely ‘zoh’ ‘foh’ ‘impulse’ ‘tustin’ and ‘matched’ also integrated in MATLAB. For the sake of converting an analog controller into a digital controller, one has to enter the sampling period. The GUI thus also gives the notions about the impact of the transformation techniques on the performance.
where C and L are the output filter capacitor and inductor values whereas RC and RL denote the inductor DCR and capacitor ESR values respectively. The buck converter transfer function has two poles and one zero. All the component values may be added into the GUI to calculate the transfer function of the switching converter. The dynamics of the plant could easily be changed by changing the component values. Any second-order plant can be entered into the GUI. Controller design initiation is accomplished by taking the information of the plant dynamics. The phase and gain margins offered by Kc*Gp(s) at the required cutoff frequency are shown in the GUI as well. This information will be used for the design of an analog controller.
The effect of various transformation techniques on the system performance thus can be investigated. The analog controller if mapped correctly shows almost the same performance. The digital controller resulted after selecting suitable sampling time and transformation technique is shown in the GUI.
1150
Figure 3. GUI giving all the details of a compensated buck converter system.
D. A Typical Design Example A typical design example is taken to validate the GUI for controlling switching converters. The component values for the buck converter shown in Fig. 2 are: Vin = 3.6 V, Vout = 2 V, L= 4.7 µH, C = 4.7 µF, RC = 5 mΩ, RL = 505 mΩ, R = 4.5 Ω, and Ts = 1 µs. For these components values, the transfer function of the buck converter calculated by the GUI is:
G p (s) =
7.606 × 10−8 s + 3.237 1.988 × 10−11 s 2 + 3.097 × 10 −6 s + 1
Gc ( s ) =
3.052 × 10−8 s 2 + 6.849 ×10−3 s + 6.581 9.244 × 10−9 s 2 + 9.162 × 10 −3 s + 1
(4)
The analog controller is mapped into its digital counterpart using a sampling period of 1 µs. The digital controller is:
Gc ( z ) =
2.455 z 2 − 4.414 z + 1.96 z 2 − 1.337 z + 0.3373
(5)
From the frequency and step responses, it is clear that required design specifications have been achieved through the controller designed on the basis of the GUI. This confirms the validity of the GUI. With some further improvements, the GUI can be made a standard toolbox like that of the toolboxes provided by MathWorks [10]. The GUI thus helps the novel control engineers and designer to design a controller without having solid foundation in control system theory.
(3)
The transfer function has a pair of complex conjugate poles at 1×105 × ( -0.7787 ± j 2.1031) with a Q value of 1.44 and a zero at 6.77 MHz. For achieving a phase margin greater than 50° at the 0-dB crossover frequency – ten times below the switching frequency – the analog controller calculated to be:
1151
ϕmax = Φ M − spec + SF − 1800 − ∠G p ( jω x − spec )
α lead =
1 − sin (ϕmax .π 180 ) 1 + sin (ϕmax .π 180 )
ω z1 = ω x − spec ⋅ α lead
α lag
Gain @ ω x− spec 20
ωx 10
ω p2 =
s +1 ω Gc ( s ) = K c . z1 s +1 Gain ω p 1 Glead ( s )
1152
ω z1 α lead
ω = z 2 = 10 ω p2
ωz 2 ≈
Figure 4. Flow chart explaining the procedure of calculating an analog controller.
ω p1 =
Nd
ωz 2 αlag
s +1 ω . z 2 s + 1 ω p 2 Glag ( s )
Ng
III.
simulating and optimizing the performance of a closed-loop control system. The GUI permits the user to design and simulate the lead-lag controller and see the effect of the positions of zeros and poles of the controller on the performance graphically in real-time. The designer just needs to enter the required phase and gain margins to design the controller. The 0-dB crossover frequency is usually chosen 5 to 10 times below the switching frequency in order to fulfill the Nyquist Theorem. The presented GUI facilitates the users to simulate and model the plant, to design the analog and digital compensators, and to display the closed-loop response both in continuous and discrete domains.
SIMULATION RESULTS
The GUI provides the time-domain and frequency-domain responses using the MATLAB functions already built in MATLAB [11]. For the typical design example discussed above, the blue curve in the leftmost Bode plot shows the Bode plot of the overall open-loop system. The plot clearly shows that compensated system has enough phase margin and gain margin at the required crossover frequency to ensure system stability and performance. The lead and the lag portion of the compensator can further be tuned to improve performance. The Bode plot for the compensated system is separately shown in second plot from the left side.
Since the controller is designed on the basis of frequency response, the GUI calculates the magnitude and phase at each of the stages of the compensator to facilitate the designer. As a consequence, one can observe the role of each part of the compensator. The GUI also provides the facility of converting an analog controller into a digital one. Simulations results validate the effectiveness of the GUI. Future work involves the addition of another control technique like PID, pole-placement, LQR, etc. to GUI to make it even more effective
The third plot from the left side depicts the closed-loop step response offered by the analog controller. Peak response, settling and rise times, and steady-state error can be observed from the plot by invoking its properties. The rightmost plot shows the digital controller step response. The GUI offers various mapping techniques to map an analog controller into the digital one. The plot shows that the analog controller has been mapped into the digital one efficiently. The dynamicity of the compensated system is investigated using the MATLAB/Simulink environment. The output voltage offers a very little spike and recovery time at the time of transient for a 50% change in load. The situation is depicted in Fig. 5.
REFERENCES [1]
O. Bouketir, “A Two-Tier SIMULINK-Based Learning Aid Tool for Power Electronics Converters”, International Journal on Sciences and Techniques of Automatic Control and Computer Engineering, Vol. 4, No.1, July 2010, Tunisia. [2] C. W. Leng, C. H. Yang, and C. H. Tsai, "An integrated GUI design tool for digitally controlled switching DC-DC converter," Proc. IEEE International Conference on Communications, Circuits and Systems, pp. 1324-1327, 2008. [3] Tengku Luqman Tengku Mohamed, Raimi Hazwani Azman Mohamed, and Zulkifli Mohamed, "Development of Auto Tuning PID Controller Using Graphical User Interface (GUI)," Second International Conference on Computer Engineering and Applications (ICCEA), vol. 1, pp. 491495, 2010. [4] Trigg, M., H. Dehbonei, and C. V. Nayar, “A Matlab Graphical User Interface for Analysis and Optimisation of a PID Control Systems”, In Australasian Universities Power Engineering Conference (AUPEC 2006), Dec. 10, 2006, Melbourne, Victoria, Australia. [5] Kasdirin, H. A., Jamaluddin, M. H., Shukor, A. Z. H., and Khamis, A., “Development of GUI Panel for Microprocessor-Based Controller of a Mini-Aerial Helicopter Application,” Procedding of 2009 2nd International Conference on Emerging Trends in Engineering and Technology (ICETET), pp. 500-503. Nagpur, 2009. [6] J. Watkins and E. Mitchell, "A Matlab Graphical User Interface for Linear Quadratic Control Design," Proceedings of the 30th ASEE/IEEE Frontiers in Education Conference, Vol. 2, Oct. 2000, pp. F4E/7- F4E10, Kansas City, MO. [7] R. D. Middlebrook and S. Cuk, “A General Unified Approach to Modeling Switching-Converter Power Stages,” IEEE Power Electronics Specialists Conference (PESC), 1976, pp. 18–34. [8] B. Johansson, “DC-DC Converters, Dynamic Model Design and Experimental Verification,” Dissertation LUTEDX/(TEIE-1042)/1194/(2004), Dep. of Industrial Electrical Engineering and Automation, Lund University, Lund, 2004. [9] N. Mohan, T. M. Undeland, and W. P. Robbins, “Power Electronics: Converters, Applications, and Design,” 3rd edition, New York: John Wiley & Sons, Inc., 2003, ISBN: 0471226939, 9780471226932. [10] The MathWorks, MATLAB, The Language of Technical Computing, Simulink for model-based and system level design”, 2010. [11] The MathWorks, Building GUIs with MATLAB, Natick, MA: The
Vout 1 0.9 0.8 5.5
5.55
5.6
5.65
5.7
5.75
5.8
5.85
5.9 x 10
-3
iL 0.25 0.2 0.15 0.1 0.05 5.5
5.55
5.6
5.65
5.7 5.75 Time (s)
5.8
5.85
5.9 x 10
-3
Figure 5. Output voltage response for a 50% change in load.
In a nutshell, the GUI offers a complete package for determining and estimating the analog as well as the digital controllers for second-order systems before their hardware realization. IV.
CONCLUSION
This paper describes the construction of a MATLAB based GUI that assists in controlling the switching converters. A stepby-step procedure is adopted to design the analog and digital controllers. The GUI acts like a complete laboratory for
Mathworks, Inc., 2010.
1153