T2 Double Loop Control Design
T2 Double Loop Control Design
T2 Double Loop Control Design
www.powersmartcontrol.com
No part of this tutorial may be reproduced or modified in any form or by any means without the written permission
of Power Smart Control S.L.
Notice
Power Smart Control tutorials or other design advice, services or information, including, but not limited to,
reference designs, are intended to assist designers who are developing applications that use SmartCtrl; by
downloading, accessing or using any particular Power Smart Control resource in any way, you (individually or,
if you are acting on behalf of a company, your company) agree to use it solely for this purpose and subject to
the terms of this notice.
Power Smart Control reserves the right to make corrections, enhancements, improvements and other changes
to its resources.
You understand and agree that you remain responsible for using your independent analysis, evaluation and
judgment in designing your applications and that you have full and exclusive responsibility to assure the safety
of your applications and compliance of your applications with all applicable regulations, laws and other
applicable requirements.
Disclaimer
Power Smart Control S.L. (PSC) makes no representation or warranty with respect to the adequacy or accuracy
of this documentation or the software which it describes. In no event will PSC or its direct or indirect suppliers
be liable for any damages whatsoever including, but not limited to, direct, indirect, incidental, or consequential
damages of any character including, without limitation, loss of business profits, data, business information, or
any and all other commercial damages or losses, or for any damages in excess of the list price for the licence
to the software and documentation.
The software SmartCtrl© used in this tutorial is furnished under a license agreement. The software may be used
only under the terms of the license agreement.
Double Loop Control Design
General index
1. Introduction ............................................................................................ 3
2. Inner Loop Design .................................................................................... 5
3. Outer Loop Design ................................................................................. 10
4. Validation ............................................................................................. 16
Figure index
Figure 1: Required system ............................................................................. 3
Figure 2: Access the wizard of a double loop design ............................................ 4
Figure 3: Selecting the plant topology .............................................................. 4
Figure 4: Parameters of the plant .................................................................... 5
Figure 5: Choose a current sensor ................................................................... 5
Figure 6: Current sensor definition................................................................... 6
Figure 7: Selecting a Type 2 controller ............................................................. 6
Figure 8: Type 2 inner current loop configuration ................................................ 7
Figure 9: Access to the inner loop solution map .................................................. 7
Figure 10: solution map for the inner loop ......................................................... 8
Figure 11: inner current loop fully defined ......................................................... 9
Figure 12: SmartCtrl inner loop information ....................................................... 9
Figure 13: Outer loop sensor list ................................................................... 10
Figure 14: Outer sensor definition ................................................................. 10
Figure 15: list of available outer loop compensators........................................... 11
Figure 16: outer compensator parametrization ................................................. 11
Figure 17: Select the outer loop solution map .................................................. 12
Figure 18: outer loop solution map ................................................................ 12
Figure 19:Double loop buck controller fully defined ........................................... 13
Figure 20: SmartCtrl double loop solution window ............................................. 14
Figure 21: Accessing the parameter sweep capability ......................................... 14
Figure 22: Outer loop general data parameters sweep ....................................... 15
Figure 23: Exporting to Psim SmartCtrl button. ................................................. 16
Figure 24: Exporting to Psim options .............................................................. 16
Figure 25: Psim schematic generated by SmartCtrl ............................................ 17
Figure 26: Result of Psim simulation .............................................................. 17
Figure 27: inner current loop measured in Psim (inner current close loop transfer
function) ................................................................................................. 18
Figure 28: SmartCtrl with inner current close loop transfer function plotted............. 19
Figure 29: Exporting inner current close loop transfer function plotted ................... 19
Figure 30: Transfer function exporting options ................................................. 20
Figure 31: s-domain model editor .................................................................. 20
Figure 32: s-domain model editor options ....................................................... 20
Figure 33: Adding external transfer functions in SmartCtrl................................... 21
Figure 34: Transfer function comparison ......................................................... 21
-2-
1. Introduction
SmartCtrl is a general-purpose compensator design software which is specifically
conceived for power electronics applications.
This tutorial is intended to guide you, step by step, to design the controller (or regulator)
of a dc/dc converter with double control loop with the help of SmartCtrl software.
The converter in this example is a buck converter with inner current loop and outer
voltage loop, as shown inFigure 1.
The objective is to design the current and voltage regulators, as highlighted in the red
boxes.
Specifications:
1. Input voltage: 30 V
2. Output voltage: 15 V
3. Reference voltage: 2.5 V
4. Output inductance: 100 uH
5. Output capacitance: 470 uF
6. Switching frequency: 100 kHz
-3-
To begin the design process in this example, in SmartCtrl, click on the icon . Or
from the Design menu, choose Predefined topologies -> DC/DC converters ->
Average Current Control. See Figure 2.
From the dialog window, select the Plant drop-down menu and choose Buck (LCS-
VMC), as shown in Figure 3.
Similar to the single loop design, the double loop design must be done sequentially ,
and SmartCtrl will guide you through the process.
Note that in all the available plants, the outer loop is voltage mode control (VMC),
while the inner loop is current control (LCS). Depending on the selected plant, the
controlled current can be from either the output inductor (LCS) or from the diode
(DCS). In this example, the current from the output inductor is selected.
-4-
-5-
In this example, select Current Sensor, and specify the sensor gain, as shown in
Figure 6. Click OK to continue.
-6-
The type of regulator depends on the plant controlled. In this example, the proper choice
is a Type 2 regulator. Select the Type 2 regulator see Figure 7, and enter the parameters
as shown in Figure 8.
4. Select the crossover frequency and the phase margin of the inner loop
SmartCtrl provides a guideline and an easy way of selecting the crossover frequency and
the phase margin through the S olution Map . Click on the Set button, and the Solution
Map will appear as shown in Figure 9.
-7-
Based on the converter parameters and the type of regulator selected, SmartCtrl will
generate a safe design area shown as a white area. Any selection of the crossover
frequency and the phase margin that is within this white area will lead to a stable
solution.
Note that the x-axis of the Solution Map is the crossover frequency and the y-axis is the
phase margin. See Figure 10.
It can be selected the desired crossover frequency and the phase margin by entering
the values in the edit boxes, and click on the Update button, or left click directly on the
Solution Map. The selected design appears as a red point in the Solution Map.
Given a particular design, the attenuation given by the sensor and the regulator at the
switching frequency is calculated and displayed in the edit box |K(s)*R(s)| at Fsw.
Note that if there is not enough attenuation at the switching frequency, the system will
likely oscillate in the high frequency region.
Also, if a design is not proper, the edit boxes will be change to the red color, warning
users to re-select the design.
To select the crossover frequency and the phase margin the following rule of thumb can
be followed:
In this design the crossover frequency has been set at 4 kHz and, the phase margin, at
50 degrees
As it can be seen in Figure 10, the design is intended to work in the white area.
Click OK to continue.
-8-
The solutions map will be shown on the right side of the input data window, as shown
in Figure 11.
When selected the point in the solution map, SmartCtrl will automatically made all the
inner loop calculations. The result of this calculations can be seen in Figure 12.
Click OK to complete the design of the inner current loop. One can move on to the outer
voltage loop design.
-9-
For a voltage divider, one must enter the reference voltage. SmartCtrl will
automatically calculate the sensor gain. In this example, the reference voltage is set
at 2.5V. The sensor input data window is shown in Figure 14.
- 10 -
Note that the rest of the design will be using this gain, and the resistor values to
implement the voltage divider will be provided by the program together with the
regulator component values.
Notice that, as the outer loop compensator has no modulator associated, parameters
like Vp, Vv or tr are not required.
3. Select the crossover frequency and the phase margin of the outer loop. Again,
SmartCtrl provides a Solution Map to help users select the crossover frequency and
the phase margin for the outer loop.
- 11 -
To make the selection, just click on the Solution map (outer loop) button. See
Figure 17. Then select a point within the white area with a left mouse click.
Alternatively, one can enter the crossover frequency and phase margin values in the
edit boxes.
In this example, the crossover frequency is selected at 750 Hz and the phase margin
is selected at 75 deg. See Figure 18.
- 12 -
5. Click OK again and the program will automatically show the performance of the
system in terms of the frequency response, polar plot, transient response, etc.
By default, SmartCtrl will show the outer loop results. To change to inner loop results
just click the button inner/outer loop in the top bar. See Figure 20.
To change the solution map from outer loop to inner loop, just click on the option
below it. See Figure 20.
- 13 -
- 14 -
- 15 -
4. Validation
1. Validate the regulator design
After the design is completed, SmartCtrl provides everything required to perform a
simulation in PSIM so the design can be validated. To do this, click on the button
highlighted in Figure 23.
The system of Figure 25 is the one which is created by SmartCtrl in Psim, if simulation
is launched, the results of Figure 26 are obtained.
This results are, by default, the current thought the inductor and the output voltage as
those are the controlled magnitudes.
It can be seen how the output voltage is 15V, the very same that was specified in
SmartCtrl at the beginning of the tutorial.
- 16 -
2. This result present a time domain check, but this check can be done in terms of a
frequency analysis. To do that, only minor modifications of the schematics are
required. See Figure 26.
In figure 26 the inner current loop has been measured whose result can be seen in
Figure 27. Click file -> save as -> T2_Psim_Double_control_loop_design.txt
- 17 -
Figure 27: inner current loop measured in Psim (inner current close loop transfer function)
The transfer function seen in Psim is quite similar to the one calculated by SmartCtrl.
But can both traces be plotted together? Yes!
- 18 -
Figure 28: SmartCtrl with inner current close loop transfer function plotted
4. Use the menu File -> Transfer function -> inner loop -> CL(f) Reference to
output. See Figure 29. And configure the outputs according Figure 30.
Figure 29: Exporting inner current close loop transfer function plotted
- 19 -
5. Close SmartCtrl project and open a new SmartCtrl design selecting s-domain model
editor option in voltage mode. See Figure 31 and Figure 32.
6. The window of Figure 33 will appear. Use the Add external function button to add the
Psim frequency response (file T2_Psim_Double_control_loop_design.txt) and the
exported SmartCtrl.
- 20 -
7. When done both transfer functions (the calculated by SmartCtrl [red] and the
simulated in Psim [blue]) can be compared. See Figure 34.
As it can be seen in Figure 34, SmartCtrl solution is completely correct and accurate.
- 21 -