Sunteți pe pagina 1din 161

SmartCtrl

User’s Guide

Powersim Inc.

i
SmartCtrl User’s Guide

Version 2.1.2

May 2014

Copyright © 2009–2014Carlos III University of Madrid, GSEP Power Electronics Systems Group,
Spain.All rights reserved. No part of this manual may be photocopied or reproduced in any form or by
anymeans without the written permission of Powersim and the Carlos III University of Madrid.

Disclaimer
Powersim Inc. (“Powersim”) and the Carlos III University of Madrid make no representation or warranty
with respect to the adequacy or accuracy of this documentation or the software which it describes. In no
event will Powersim and the Carlos III University of Madrid 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 license to the software and documentation.

Powersim Inc.
email: info@powersimtech.com
http://www.powersimtech.com
Table of Contents

CHAPTER 1:  INTRODUCTION 1 

1.1  Why SmartCtrl?  1 

1.2  Program Layout  3 

CHAPTER 2:  MAIN MENUS AND TOOLBARS 5 

2.1  File Menu  5 

2.2  Design Menu  6 

2.3  View Menu  6 

2.4  Window Menu  8 

2.5  Tools Menu  8 

2.6  Main Toolbar  8 

2.7  View Toolbar  10 


2.7.1  SmartCtrl additional transfer functions  11 

CHAPTER 3:  DESIGN A PREDEFINED TOPOLOGY 15 

3.1  DC‐DC Converter ‐ Single loop  15 


3.1.1  Single Loop  15 

3.2  DC‐DC Converter ‐ Peak Current Mode Control  17 

3.3  DC‐DC converter ‐ Average Current Mode Control  21 

3.4  Power Factor Corrector  25 


3.4.1  Power Stage  33 
3.4.2  Graphic panels  34 
3.4.2.1  Oscillator ramp and internal compensator  35 
3.4.2.2  Line Current  35 
3.4.2.3  Rectified voltage and external compensator output  36 
3.4.3  Multipliers  37 
3.4.3.1  Multiplier  37 
3.4.3.2  UC3854 Amplifiers  38 

i
CHAPTER 4:  DESIGN A GENERIC TOPOLOGY 39 

4.1  s‐domain model editor  39 


4.1.1  s‐domain model (equation editor)  40 
4.1.1.1  s‐domain (equation editor) VMC  40 
4.1.1.2  s‐domain (equation editor) CMC  44 
4.1.2  s‐domain model (polynomial coefficients)  48 
4.1.2.1  Plant Wizard  50 

4.2  Import frequency response data from .txt file  53 

CHAPTER 5:  DESIGN A GENERIC CONTROL SYSTEM 57 

CHAPTER 6:  DC‐DC PLANTS 61 

6.1  Buck  62 

6.2  Boost  65 

6.3  Buck‐Boost  68 

6.4  Flyback  71 

6.5  Forward  73 

CHAPTER 7:  SENSORS. 77 

7.1  Voltage Divider  77 

7.2  Embedded voltage divider  77 

7.3  Isolated Voltage Sensor  78 

7.4  Resistive Sensor (Power Factor Corrector)  78 

7.5  Resistive Sensor (Peak Current Mode Control)  79 

7.6  Hall effect sensor  79 

7.7  Current Sensor  79 

CHAPTER 8:  MODULATOR 81 

8.1  Modulator (Peak Current Mode Control)  81 

8.2  Modulator (PWM)  82 

ii
CHAPTER 9:  COMPENSATORS 83 

9.1  Single loop or inner loop  83 


9.1.1  Type 3 compensator  83 
9.1.2  Type 3 compensator unattenuated  84 
9.1.3  Type 2 compensator  85 
9.1.4  Type 2 compensator  unattenuated  86 
9.1.5  PI compensator  87 
9.1.6  PI compensator  unattenuated  88 

9.2  Outer loop and peak current mode control  89 


9.2.1  Single pole compensator  89 
9.2.2  Single pole compensator unattenuated  89 
9.2.3  Type 3 regulator  91 
9.2.4  Type 3 compensator unattenuated  92 
9.2.5  Type 2 compensator  93 
9.2.6  Type 2 compensator unattenuated  94 
9.2.7  PI compensator  95 
9.2.8  PI compensator unattenuated  96 

CHAPTER 10:  GRAPHIC AND TEXT PANELS 97 

10.1  Bode plots  97 

10.2  Nyquist diagram  99 

10.3  Transient response plot  102 

10.4  Steady‐state waveform  105 

10.5  Text panels  106 

CHAPTER 11:  SOLUTIONS MAPS 113 

CHAPTER 12:  EQUATIONS EDITOR 115 

CHAPTER 13:  EDITOR BOX 117 

CHAPTER 14:  IMPORT AND EXPORT 119 

14.1  Export  119 


14.1.1  Export transfer function  119 
14.1.2  Export to PSIM  120 
14.1.3  Export transient responses  124 

iii
14.1.4  Export Global.  125 
14.1.5  Export waveforms  127 

14.2  Import (Merge)  128 


14.2.1  Add Function  129 
14.2.2  Modify Function  131 

CHAPTER 15:  DESIGN METHODS 133 

15.1  K‐factor Method  134 

15.2  Kplus Method  135 

15.3  Manual  136 

15.4  PI tuning  137 

15.5  Single Pole tuning  138 

CHAPTER 16:  PARAMETRIC SWEEP 139 

16.1  Input Parameters Parametric  139 

16.2  Compensator Components Parametric Sweep  143 

CHAPTER 17:  DIGITAL CONTROL 145 

17.1  Introduction to Digital Control  145 

17.2  Digital Settings  145 

17.3  Parametric sweep in digital control  147 

17.4  Simulation issues with digital control  148 

CHAPTER 18:  FREQUENCY SETTINGS 151 

CHAPTER 19:  LAYOUT SETTINGS 153 




iv
Introduction

Chapter 1: Introduction

1.1 Why SmartCtrl?


SmartCtrl is the control designing tool for power electronics. It provides an easy to use
interface for designing the control loop of almost any plant.
It includes the predefined transfer functions of some of the most commonly used power
electronics plants, such as different DC-DC topologies, AC-DC converters, Inverters
and motor drives.
However, it also allows the users to import their own plant transfer function by means
of a text file. Therefore, this feature provides flexibility to design an optimized control
loop for almost any system.
In order to make easier the first attempt when designing a control loop, an estimation of
the stable solutions space is given by the program under the name of "solutions map".
Based on the selected plant, sensor and type of regulator, the solutions map provides a
map of the different combinations of fc and phase margin that lead to stable systems.
Thus, the designer is able to select one of the points of the stable solutions space and to
change the compensator parameters dynamically in order to adjust the system response
to the user requirements in terms of stability, transient response, ... Since the program
provides, at a glance, the frequency response of the system as well as the transient
response and the compensator component values for the open loop given features. All of
them are real time updated when any parameter of the system is varied by the designer.
Key Features
 Pre-defined transfer functions of commonly used DC-DC converters, Power
Factor Correction converters, sensors and regulators.
 Different control techniques for DC-DC converters are supported:
o Single control loop structures: voltage mode control and current mode
control.
o Peak current mode control.
o Double control loop structure: two nested control loops that implements
an average current mode control.
 Capability of designing the controller of any converter by means of:
o Importing its frequency response data from a .txt file.
o Defining its transfer function through the equation editor.
 Capability of designing a generic control system.
 Digital control is also available.
 Estimation of the stable solutions space ("Solutions Map").
 Sensitivity analysis of the system parameters.

SmartCtrl 1
Introduction

 Real time updated results of the frequency response (bode plots), transient
response and the steady state waveforms.
 Possibility of importing and exporting any transfer function by means of .txt
files.

2 SmartCtrl
Introduction

1.2 Program Layout


When SmartCtrl is started, all the available options are shown, and the user can select
which of them is going to use. The aforementioned window is shown below. It is
divided into four sections:

1. Design a predefined topology


This option provides an easy and straightforward way of designing the
control circuit of the most widely used power converters. Through a guided
process, the user will be able to select amongst different control strategies:
 DC-DC Converter- Single loop
Two different control strategies are available in this case: voltage
mode control and current mode control.
 DC-DC Converter - Peak Current mode control
 DC-DC Converter - Average current mode control
Two nested loops are needed to implement the average current mode
control. The outer loop is a voltage mode control loop, and the inner
one is a current mode control.
 PFC Boost converter
2. Design a generic topology.
This option allows to design a converter by two different ways:
 s-domain model editor.
 Importing the frequency response data from .txt file

SmartCtrl 3
Introduction

3. Design a generic control system - Equation editor.


SmartCtrl also provides the option of defining the whole system though its
equation editor. And so, help the user though the designing process of any
control problem regardless its nature, for example temperature control,
motor drives, etc
4. Open...
Default file. It opens a pre-designed example.
Recently saved file. It opens the last file the user worked with.
Previously saved file. It opens the folder where user used to save its designs
Sample design. It opens the folder where SmartCtrl examples have been
previously recorded.
Regardless of the selected option, once the converter is completely defined, the main
window of the program is displayed. Different areas are considered within the main
window and all of them are briefly described below:
1. There are six drop-down menus, this is:
File It includes all the functions needed in order to manage files, import
 

and export files, establish the printer setup and the print options.
Design SmartCtrl libraries, modification of input data, access to the digital
 

control settings (only available in SmartCtrl 2.0 Pro) and parametric


sweep.
View Allows the user to select which elements are displayed and which are
 

not.
Window Functions to create, arrange and split windows.
 

Help  SmartCtrl Help.

2. The Main Toolbar provides quick access to the most commonly used program
functions through left click on the respective icon.
3. The View Toolbar icons allows the user a quick selection of the elements
displayed.
4. The Status Bar summarizes the most important parameters of the open loop
control design (cross frequency, phase margin and attenuation at the switching
frequency).
5. The compensator Design Method Box includes the three calculation methods of
the compensator as well as the Solution Map.
6. Graphic and text panels include the most relevant information of the system:
frequency response, polar plot, transient response, input data and the designed
regulator components. To access the help topic regarding each panel just right

4 SmartCtrl
Main Menus and Toolbars

Chapter 2: Main Menus and Toolbars

2.1 File Menu


New   Create a new project (Ctrl+N)
New and initial dialog  Create a new project and displays the initial dialog box
Open  Open an existing project (Ctrl+O)
Open sample designs  Open a sample design from the examples folder
Close  Close the current project window
Save  Save the current project (Ctrl+S)
Save as...  Save the current project to a different file
Open txt files  Open any .txt file in Notepad
Import (Merge)  Merge data of another file with the data of the existing file for
display. The curves of these two files will be combined.
(Ctrl+M)

Export  The program provide different exporting options. It allows


exporting the following.
 Export to PSIM the schematic and the parameters file,
or update parameters file
 Export transfer functions to a file. The available
transfer functions are: plant, sensor, control to output,
compensator, etc.
 Export transient responses to a file. The available
transient responses are: voltage reference step, output
current step and input voltage step
 Export waveforms to a file. The available steady state
waveforms are: inductor voltage and current, diode
voltage and current, carrier, modulating signal and
PWM.
Generate report  Generate a report to either a .txt file or notepad. It contains
information regarding both the input data (steady-state dc
operating point, plant input data, ...) and output data
(compensator components, cross frequency, phase margin, ...)

Print preview  Preview the printout of any of the graphic and text panels (
Transfer function magnitudes (dB), Transfer function phase (º),
Nyquist diagram, Transients, Data input, Results)

SmartCtrl 5
Main Menus and Toolbars

Print  Print any of the panels of the main window (bode plots,
Nyquist diagram, transient, input data or results)
Printer setup  Setup the printer
Exit  Exit SmartCtrl program

2.2 Design Menu


The SmartCtrl Design Menu contains the elements that can be used in the SmartCtrl
schematic. The library is divided into the following sections:

Predefined topologies  Contains the most commonly used DC-DC plants both


in single and double loop configurations, as well as
AC-DC plants.

Generic Topology  Allows the user to define a of a generic plant transfer


function either in s-domain or importing a .dat, .txt, or
.fra file. And use the predefined sensors and
compensators provided by SmartCtrl to desing the
closed-loop control system.
Generic Control System  Allows the user to define the plant and the sensor
transfer functions through the built-in equations
editor. And design the compensator for this user
defined system.
Modify Data  Open the schematic window of the current project to
modify the parameters.

Digital control  Access to the digital control settings (only available in


SmartCtrl 2.1 Pro)

Parametric Sweeps  Allows performing the sensibility analysis of the


system parameters. It is divided into three different
parametric sweeps: Input  Parameters, Compensator 
Components and digital factors.
Reset all  Clear the active window

2.3 View Menu


Comments  Open the comments window. It allows the user to add
comments to the design. These comments will be
saved together with the designed converter.

Loop  Select the loop to be displayed in the active window


(inner or outer loop)

6 SmartCtrl
Main Menus and Toolbars

Transfer Functions  Select the transfer function to be displayed


 Plant transfer function, G(s)
 Sensor transfer function, K(s)
 Compensator transfer function, R(s)
 Sensor-Compensator transfer function,
K(s)·R(s)
 Control to output without regulator transfer
function, A(s)
 Control to output transfer function, T(s)
 Reference to output transfer function, CL(s)
 Digital compensator transfer function
 Digital control to output transfer function
 Digital reference to output transfer function
Additional transfer functions  Select the additional transfer functions to be
displayed, like the audiosusceptibility Gvv, the output
impedance Gvi, etc. For more information regarding
these transfer function, see section 2.7.1.
Additional t.f. toolbar  Show a toolbar with all the additional transfer
functions. For more information regarding this
toolbar, see section 2.7.1.
Transients  Select the transient response to be displayed.
The available transient responses are:
 Input voltage step transient
 Output current step transient
 Reference step transient.
Organize panels  Resize all panels and restore the default appearance of
the graphic and results panels window.
Enhance  Select the panel to be displayed in full screen size
 Bode (magnitudes) panel (Ctrl+Shift+U)
 Bode (phase) panel (Ctrl+Shift+J)
 Nyquist diagram panel (Ctrl+Shift+I)
 Transient responses panel (Ctrl+Shift+K)
 Input data panel (Ctrl+Shift+O)
 Output (results) panel (Ctrl+Shift+L)
Input data  View design input data
Output data  View design output data

SmartCtrl 7
Main Menus and Toolbars

2.4 Window Menu


New Window Create a new window

Maximize active window Maximize the current window

Cascade Arrange the windows in cascade form

Tile horizontal Tile the currently open windows horizontally

Tile vertical Tile the currently open windows vertically

Split Click on the intersection of the lines that delimit


the different window panels and drag. This will
change the size of the panels
Organize all It restores the default size of the graphic and text
panels.

2.5 Tools Menu


Settings It allows the customization of the frequency
range (frequency settings) and the default re-
arrangement of the graphic and text pannels to
their default size and appearance (Layout
settings).
Equations Editor The equation editor provides direct access to the
SmartCtrl built-in Equations Editor. Through
the equations editor, SmartCtrl allows the user to
program any transfer function, export its
frequency response and afterwards, if needed,
import and visualize it within the Bode plots
graphic panel.

2.6 Main Toolbar


Create a new project

Create a new project and open initial dialogue box

Open an existing project

Open sample design

Close the current project window

Generate report

8 SmartCtrl
Main Mennus and Too
olbars

View
w documentt comments

DC-D
DC convertter - Single loop
l

DC-D
DC convertter - Peak Current Modde Control

DC/D
DC - Average Current Mode Conttrol

PFC Boost conv


verter

Desiggn a generic topolog


gy using a s-domain model
editoor
Desiggn a genericc topology from
f a .txt ffile

Desiggn a genericc control sy


ystem

Moddify data

g box to sttart the calcculation off digital


Openn the dialog
regullators
Savee the currentt project

Expoort transfer function


f to a file

Impoort transfer function frrom a file tto be mergeed with


the ccurrent projeect
Expoort to PSIM (schematicc)

Expoort to PSIM (parameterrs file)

Updaate parameeters file of


o the preeviously ex
xported
schem
matic
Maxiimize activee window

Tile w
windows

See aall panels

Orgaanize all pan


nels

View
w input dataa

Sm
martCtrl 9
Main Menus and Toolbars

View output data

2.7 View Toolbar


Display the frequency response (Bode plot) of the plant
transfer function
Display the frequency response (Bode plot) of the sensor
transfer function
Display the frequency response (Bode plot) of the control
to output without compensator transfer function
Display the frequency response (Bode plot) of the sensor
compensator transfer function
Display the frequency response (Bode plot) of the
compensator transfer function
Display the frequency response (Bode plot) of the
discrete compensator transfer function
Display the frequency response (Bode plot) of the control
to output transfer function
Display the frequency response (Bode plot) of the control
to output transfer function with digital control
Display the frequency response (Bode plot) of the
reference to output transfer function
Display the frequency response (Bode plot) of the
reference to output transfer function with digital control
View additional transfer functions toolbar

Display transient response due to a reference voltage step

Display the transient response due to an output current


step
Display the transient response due to an input voltage
step
Display inner loop results

Display outer loop results

Enables or disables the display of the compensator


calculation method toolbox

10 SmartCtrl
Main Mennus and Too
olbars

Inputt Parameterss Parametricc sweep

Comppensator Paarameters Paarametric sw


weep

Digitaal Factors sweep

2.7.1
1 SmartCtrl additio
onal transffer functio
ons

All tthose transsfer functioons coloredd in grey are a not allowed for tthe design.. The
nomeenclature off the transfeer functions is as follow
ws:

Subsccript 1 referrs to the tyype of trannsfer functioon studied. The charaacter t


1 denotees that the transfer
t funnction has beeen evaluated in closedd loop; otheerwise
it refeers to open loop.
l
Subsccript 2 referss to the pertturbed magn
nitude:

2  iL: inducttor current.


 iD: diode current.
 vo: outpu
ut voltage
Subsccript 3 referss to the pertturbing mag
gnitude:
3  io: outputt current.
 vi: input voltage.
v

The cconsidered transfer fun


nctions are:

SmartCtrl 11
Main Menus and Toolbars

Open loop transfer functions.


vo
Gvvi  Open loop Audiosusceptibility
vi
vo
Gvio   Open loop Output impedance
io
i 
GiLvi  L Open loop Input voltage to inductor current transfer function.
vi
i 
GiLio  L Open loop Output current to inductor current transfer function.
io
iD
GiDvi  Open loop Input voltage to diode current transfer function.
vi
Closed loop transfer functions.
vo
Gtvvi  Closed loop Audiosusceptibility
vi
v
Gtvio  o Closed loop Output impedance
io

Gtivi Closed loop Input voltage to inductor current or diode current transfer
function
Gtiio Closed loop Output current to inductor current or diode current transfer
function

The nomenclature will be clarified through two examples.


Example 1: Open loop transfer function.

L Zo
Io

Vin C R Vout


d
v Load resistor is included within de output impedance transfer
Gvio  o
io function

Example 2: Closed loop transfer function.

12 SmartCtrl
Main Menus and Toolbars

L
Io
+

Ra

Vout
Vin C R

Rb


+ Vref
vo
Gtvio  Closed loop Output impedance transfer function
io

SmartCtrl 13
Main Menus and Toolbars

14 SmartCtrl
Design a preddefined topo
ology

Cha
apter 3: Dessign a prredefine
ed topollogy

The most widelly used top


pologies aree available as pre-defined topologgies, in ord
der to
ease their designn.

Pre-ddesigned toppologies available are:


 DC-DDC convertter - Single lloop (Voltaage mode co
ontrol and cuurrent modee
Conttrol).
 DC-D
DC convertter - Peak cuurrent modee control.
 DC-D
DC convertter - Averagge current mode
m controll.
 PFC Boost conv
verter

3.1 DC‐DC C
Converte
er ‐ Single
e loop

3.1.1
1 Single L
Loop
The single loopp is formeed by threee different transfer fu
unctions: pllant, sensorr and
comppensator, whhich must be
b selected ssequentially
y.
The first step too define the system is tthe selection n of the plaant.The plannt can be eitther a
pre-ddefined onee or a userr own one. This is, th he user can n import a generic traansfer
functtion by meaans of a .txt file or selecct one of thee pre-defineed topologiees.

SmartCtrl 15
Design a predefined topology

The predefined DC-DC plants


are the following:
 Buck
 Buck-Boost
 Boost
 Flyback
 Forward

Once the plant has been selected, regardless the magnitude to be controlled is voltage or
current, the program will display the appropriate type of sensor.

The different sensors


available are the following:
 Voltage Divider.
 Embedded Voltage
Divider.
 Isolated Voltage
Sensor.
 Current Sensor.
 Hall Effect Sensor.

Finally, the compensator is selected. The ones provided by SmartCtrl are:

Compensator types:
 Type 3
 Type 3 Unattenuated
 Type 2
 Type 2 unattenuated
 PI
 PI unattenuated
 Single Pole
 Single Pole
unattenuated

16 SmartCtrl
Design a preddefined topo
ology

Oncee the system m has been n defined, SSmartCtrl calculates


c th
he stable soolution spaace in
whicch all the poossible com mbinations oof crossoverr frequency and phase margin thatt lead
to staable solutionns are show
wn graphicallly. It is called Solution
ns Map.
The ddesigner is asked to seelect a pointt within the solution sp
pace to conttinue. To do
o that,
just cclick on Sett and select a point withhin the whitte zone.

Noww accept thee selected point and coonfirm the design,


d the program w will automatically
show
w the perforrmance of thhe system inn terms of frequency
f response, traansient resp
ponse.
(See Graphic annd text panels window ffor detailed
d information).

3.2 DC‐DC C
Converte
er ‐ Peak C
Current M
Mode Control
The im
mplementattion of the peeak current m
mode contro
ol includes fivve different eelements wh
hich 
are described alo
ong the follow
wing paragraaphs:
 DC/DC converter
c (p
pre-defined topologies)).
 Current sensor (imp
plemented bby means off a resistor).
 Modulattor.
 Voltage sensor.
 Compennsator.
The program will
w guide you y throughh the param
meterization
n of the diffferent elem
ments,
whicch must be carried
c out sequentially
s y.
The ffirst step to define the system
s is too select the plant
p from an
a existing library.

SmartCtrl 17
Design a predefined topology

The predefined DC-DC plants


are the following:
 Buck
 Buck-Boost
 Boost
 Flyback
 Forward

Once the plant has been selected, the value of the resistor that implements the current sensor 
must be set.

Current sensor available:


 Resistance

 
 
 
 
 
 
 
Next, the modulator must be configured (see section 8.1)

18 SmartCtrl
Design a predefined topology

Modulators available:
 Modulator (Peak
Current Mode Control).

Voltage sensor available:


 Voltage devider.
 Embedded Voltage
Divider

The last element that must be set is the compensator.

SmartCtrl 19
Design a predefined topology

Regulator types:
 Type 3
 Type 3 Unattenuated
 Type 2
 Type 2 unattenuated
 PI
 PI unattenuated

Finally the user must select the control loop initial characteristics (cross frequency and phase 
margin), aided by the Solutions Map. After that, click OK and the program will automatically 
show the graphics panels.

20 SmartCtrl
Design a predefined topology

3.3 DC‐DC converter ‐ Average Current Mode Control


The average current control is formed by an inner current loop and an outer voltage
mode loop. As well as the single loop, the double loop setup must be built sequentially.
The program will guide you to built it, enabling the following step and keeping
everything else disabled.
In all the available plants, the outer loop is a voltage mode control (VMC), while the
inner loop is a current controlled one. Depending on the selected plant, the current is
sensed either on the inductance (LCS) or on the diode (DCS). The DC/DC plant must be
selected among the following list.

The predefined DC-DC plants


are the following:
 Buck (LCD-VMC)
 Buck-Boost (LCS-
VMC)
 Boost (LCS-VMC)
 Boost (DCS-VMC)
 Flyback (DCS-VMC)
 Forward(LCS-VMC)

Next, the inner control loop will be configured. This is, the current sensor and the
regulator type must be selected.

The available current sensors


are the following:
 Current Sensor
 Hall Effect Sensor

Finally, the inner loop compensator is selected.

SmartCtrl 21
Desiggn a predeffined topology

Regulator
R tyypes:
 Typee 3
 Typee 2
 PI
 Singlle Pole

Oncee all the innner loop tran


nsfer functioons have been defined, the cross frrequency an
nd the
phasee margin must
m be seleected. Undeer the namee of Solution  Map, Sm martCtrl proovides
the stable solutioon space in which all tthe possiblee combinatio
ons of cut ooff frequency and
phasee margin thhat lead to stable solututions are sh hown graph
hically. Justt clicking on
o the
"Soluutions map (inner loop p)" button thhe solution map corresp
ponding to the inner looop is
displlayed.
The designer is asked to select the crrossover freequency and
d the phasee margin ju
ust by
clickking within the
t white zo
one to contiinue.

Oncee the cross frequency and the ph ase margin have been n selected, tthe solution
n map
will be shown on the righ ht of the sside of the DC-DC av verage currrent controll data
winddow. If, at any
a time, thhe two aforrementioned d parameterrs need to bbe changedd, just
clickk on the show
wn solution
n map. (See next figuree).

22 SSmartCtrl
Design a preddefined topo
ology

Now
w, the outer loop
l can be defined.Firrst, the voltaage sensor must
m be seleected.

Thee different seensors available


are the followinng:
 Voltagee Divider
 Embeddded Voltagee
Dividerr

Nextt, the outer loop


l compeensator mustt be selected
d.

SmartCtrl 23
Desiggn a predeffined topology

Com
mpensator ttypes:
 Type 3
 Type 3 Unattenuatted
 Type 2
 Type 2 unattenuateed
 PI
 PI unatttenuated
 Single PPole
 Single PPole
unattennuated

As w he inner looop, the crosss frequency and the phhase margin must
well as in thhe case of th
be seelected. Alsso in this caase, the soluution map is availablee to help thee selection of an
stablle solution.
Presss the "Soluttion map (o outer loop)"" button an
nd the soluttion map w
will be displlayed.
Thenn select a pooint just by clicking
c witthin the white area.
It should be rem
marked thatt, due to staability consstraints, the crossover ffrequency of
o the
outerr loop cannot be greateer than the crossover frequency
f of the inner loop. In ord
der to
preveent the sellection of an
a outer looop fc greaater than th he inner looop one, a pink
shadoowed area has
h been inccluded in thhe solutions map of the outer loop..

Oncee the crossoover frequeency and thhe phase maargin have been selectted, the sollution
map will be shoown on the right of thee side of thee DC-DC avverage curre
rent control input
data window. Iff, at any timme, the twoo aforementtioned param
meters needd to be chaanged,
just cclick on the shown solu
ution map. ((See next figure)

24 SSmartCtrl
Design a preddefined topo
ology

Noww accept thhe selected configurattion and co onfirm the design, thhe program m will
autommatically shhow the peerformance of the sysstem in terms of freqquency resp ponse,
transsient responnse.(See Graaphic and teext panels window
w for detailed
d infoormation).

3.4 Power F
Factor Co
orrector
The ppower factoor corrector based on a boost topology has a double
d conttrol loop, fo
ormed
by ann inner currrent loop an
nd an outer vvoltage mod
de loop. Thee double looop setup muust be
built sequentiallly. The program will gguide you tot build it, enabling thhe followingg step
and kkeeping eveerything elsee disabled.
The aavailable pllant is a booost converteer. The outeer loop is a voltage
v modde control, while
the innner loop iss a current controlled
c onne, and the current is sensed on thhe inductancce.
The ffirst step chhooses betw
ween the twoo types of multiplier
m an
nd Vrms feeed-forward:
 Multiplieer: It corressponds by deefault the Hall
H Effect resistance H
H(s).
 UC38544A Multiplieer: It correspponds by deefault the cu
urrent sensoor resistancee
R(s).

SmartCtrl 25
Design a predefined topology

Depending on the first choice, there are two different options to generate the power
factor corrector.
If the selection is a Generic Multiplier, the current is sensed by the Hall Effect sensor
H(s).

Otherwise, if the selection is UC3854A multiplier, the current sensor is a resistor Rs.

26 SmartCtrl
Design a predefined topology

It is followed by the choice of the plant. The predefined plants are the following:
 Boost PFC (Resistive load)
 Boost PFC (Constant power load)

Next, the inner control loop will be configured: since the current sensor has been
already configured, it is necessary to select the inner loop compensator.

SmartCtrl 27
Desiggn a predeffined topology

Com
mpensator tyypes:
 Type 3 (It
( is only av
vailable for Multiplier option)
 Type 2
 PI
Oncee all the innner loop traansfer functtions have been
b defineed, the crosssover frequ
uency
and tthe phase margin
m musst be selectted. Under the name ofo Solution Map, SmaartCtrl
proviides the staable solutionn space in which all thhe possiblee combinatioons of crosssover
frequuency and phase
p marg a shown ggraphically. Just
gin that leadd to stable solutions are
clickking on the "Solutions map (innerr loop)" buttton the solu ution map ccorrespondiing to
the innner loop iss displayed.

The designer is asked to select


s the crrossover freequency and the phasee margin ju
ust by
clickking within the
t white zo
one to contiinue.

28 SSmartCtrl
Design a preddefined topo
ology

Oncee the crossoover frequeency and thhe phase maargin have been selectted, the sollution
map will be shhown on the right of the side off the PFC Boost convverter inputt data
winddow. If, at any
a time, th he two aforrementioned d parameterrs need to bbe changed
d, just
clickk on the show
wn solution
n map. (See next figuree).

Now
w, the outer loop
l can be defined. Fiirst, the volttage sensor must be sellected.
The vvoltage sensors availab
ble are the ffollowing:
 For Multtiplier optio
on:
o Isolate V sen
nsor
 For UC33854A Multtiplier optioon:
o Voltage
V Div
vider
o Embedded
E Voltage
V Divvider

SmartCtrl 29
Design a predefined topology

Next, the outer loop compensator must be selected.

Compensator types:

For multiplier option: For UC3854 multiplier option:

Type 3 For Voltage Divider: For Embedded Voltage Divider:


Type 2 Type 2 Type 2 Unattenuated
PI PI PI unattenuated
Single Pole Single Pole Single Pole unattenuated

As well as in the case of the inner loop, the crossover frequency and the phase margin
must be selected. Also in this case, the solution map is available to help the selection of
a stable solution.
Press the "Solution map (outer loop)" button and the solution map will be displayed.
Then select a point just by clicking within the white area.

30 SmartCtrl
Design a preddefined topo
ology

It should be rem
marked thatt, due to staability consstraints, the crossover ffrequency of
o the
outerr loop cannot be greateer than the crossover frequency
f of the inner loop. In ord
der to
preveent the sellection of an
a outer looop fc greaater than th he inner looop one, a pink
shadoowed area has
h been inccluded in thhe solutions map of the outer loop..

Oncee the crossoover frequeency and thhe phase maargin have been selectted, the sollution
map will be shoown on the right of thee side of thee DC-DC av rent control input
verage curre
data window. Iff, at any timme, the twoo aforementtioned param
meters needd to be chaanged,
just cclick on the shown solu
ution map. ((See next figure)

SmartCtrl 31
Desiggn a predeffined topology

Noww accept thhe selected configurattion and co onfirm the design, thhe programm will
autommatically shhow the perrformance oof the system
m in terms of frequenccy responsee, line
curreent shape... (See Graph
hic panels w
window for detailed
d info
ormation).
Oncee the designn has been generated,
g ttwo possiblle warning messages ccan appear in
i the
soluttion map wiindow:
 In the caase of a sing
gle pole commpensator in n the outer loop,
l whichh is a typicall
compenssator for pow wer factor ccorrectors, the
t gain at low frequenncy may be low.
A warninng appears when
w the esstimated Vo o (shown in the methodd panel) difffers
from thee specified one
o in more than 10%.IIn these cases, a compeensator with ha
higher gain at low frequency
f iss recommen nded.
 The line current wav veform is c alculated asssuming thaat the currennt loop follo
ows
perfectlyy well the reeference gennerated by the
t outer looop. Howeveer, in some
occasionns there is a zero-cross distortion and
a the actual line curreent would differ
d
from thee one represented. In thhese cases, a warning message
m apppears. The crross-
frequenccy of the innner loop commpensator should
s be in
ncreased to m minimize th his
problem.
In thhe method panel,
p additiional inform
mation is prrovided both
h for the innner loop an
nd the
outerr loop:
 Attenuattion (fsw)(ddB). This is the attenuattion in dB achieved
a byy the open looop
transfer function at the switchinng frequenccy. It should
d be low forr the inner loop
and the outer
o loop.
 Attenuattion (2fl)(dB
B) . This is tthe attenuattion in dB achieved
a by the open lo
oop
transfer function at twice the linne frequenccy (100 Hz or 120 Hz).. It should be
b
high for the inner lo
oop and loww for the outter loop.
 Estimateed Vo (V). This
T is the eestimated ou utput voltag
ge of the connverter. Thiis
quency gain of the openn loop transfer
parameteer is important becausee, if the freq
function is not high enough, theere will be a steady-staate error andd the estimaated

32 SSmartCtrl
Design a predefined topology

output voltage can be different from the specified output voltage. As mentioned
above, if the estimated Vo (shown in the method panel) differs from the
specified one in more than 10%, there is a warning.

Finally, the flowchart to generate the types of the power factor is the following:

POWER FACTOR CORRECTOR

MULTIPLIER 
INNER  INNER  OUTER  OUTER 
& Vrms
LOOP  PLANT LOOP  LOOP  LOOP 
FEED‐
SENSOR REGULATOR SENSOR REGULATOR
FORWARD 

Type 2
Type 2
Boost PFC (Constant power load) Type 3
Multiplier Hall effect sensor Type 3 Isolate V sensor
Boost PFC (Resistive load) PI
PI
Single Pole
H(s)

Type 2
Voltage divider PI
Single Pole
UC3854A Boost PFC (Constant power load) Type 2
Resistive sensor
Multiplier Boost PFC (Resistive load) PI
Regulator Type 2_unatt
Rs
Embedded PI_unatt
Voltage Divider Single Pole_unatt

3.4.1 Power Stage


The Boost PFC is based on a double loop control scheme, and therefore the output
voltage and a current through the inductor are sensed simultaneously. There are four
options for the plant, depending on the load and the multiplier:

Generic multiplier + Boost PFC (Resistive load)

Generic multiplier + Boost PFC

SmartCtrl 33
Design a predefined topology

UC3854A multiplier + Boost PFC (Resistive load)

UC3854A multiplier + Boost PFC (Constant power load)


The current loop is designed considering a piecewise linear model of the plant: using
quasi-static assumption, the small signal model for each operating point is calculated as
in a DC-DC boost converter.
The input data variables are listed and defined below:

Input data
Vin(rms)  Input Voltage (V)
RL  Equivalent Series Resistor of the Inductance (Ohms)
L  Inductance (H)
Rc  Equivalent Series Resistor of the output capacitor (Ohms)
C  Equivalent Series Resistor of the output capacitor (Ohms)
Vo  Output Voltage (W)
R  Load Resistor (Ohms)
Po  Output Power (W)
wta  Line angle(º). The current loop is designed considering the plant
calculated for this operating point. This line angle is indicated as a
red dot in the output panel that represents the Rectified voltage and
external compensator output(See Graphic and text panels window for
detailed information)
FSW  Switching frequency (Hz)
Line frequency  Line frequency (Hz)

3.4.2 Graphic panels


The window is divided in six different panels:

34 SmartCtrl
Design a predefined topology

The graphic panels are:


 Bode plot Magnitude (dB)
 Bode plot Phase (º)
 Polar plot
 Line current
 Oscillator ramp and internal compensator
 Rectified voltage and external compensator output

3.4.2.1 Oscillator ramp and internal compensator


This graphic panel provides information about the output of the inner control
compensator (blue line) compared to the oscillator ramp (red line). The output of the
internal compensator is represented for the line angle corresponding to the maximum
current ripple through the inductor. This line angle is identified by means of a blue dot
in the Rectified voltage and external compensator output graphical panel.
This comparison can be useful to determine whether there could be oscillations. If the
slopes of both functions are too similar, there could be more than one intersection per
period.

3.4.2.2 Line Current


This graphic panel provides information about the line current and its harmonic
distortion. The line current waveform is calculated assuming that the current loop
follows perfectly the reference generated by the outer loop. However, in some occasions
there is a zero-cross distortion and the actual line current would differ from the one
represented. In these cases, a warning message would appear in the solution map
window.

SmartCtrl 35
Design a predefined topology

 
3.4.2.3 Rectified voltage and external compensator output
This graphic panel provides information about the external compensator output voltage.
Its phase shift compared to the rectified voltage can be assessed. If the compensator
output voltage has not an appropriate phase shift compared to the rectified voltage
(reference), the line current distortion will increase.
The current loop is designed considering a piecewise linear model of the plant. The
current plant represented in the Bode plot panels (see Graphic panels window)
corresponds to the operating point marked with a red dot in the rectified voltage. The
small signal model for the plant is calculated as in a DC-DC boost converter for this
operating point. This dot can be moved by clicking and dragging with the mouse,
resulting in a variation of the operating point. As the dot changes its position, the Bode
plot corresponding to the inner loop varies, as well as the attenuation information in the
K-factor panel refreshes according to the indicated operating point.
The blue dot in the rectified voltage represents the operating point that corresponds to
the maximum current ripple through the inductor. The graphics in the Oscillator ramp
and internal compensator panel have been represented for this operating point.

36 SmartCtrl
Design a preddefined topo
ology

3.4.3
3 Multipliers

3.4.3
3.1 Multip
plier

 
Usinng feed-forw
ward:

 
The m
multiplier has
h the follo
owing param
meters:

KB  Gain
G of the current
c referrence for the inner loop
p.

Km  Multiplier
M gaain.
And,, when the use
u of feed-forward is sselected:

KFF  G
Gain of the feed-forwaard. It is th
he ratio betw
ween the rm
ms input vo
oltage
a the averrage input vvoltage to th
and he multiplier.
1st  Ratio
R betweeen the ampplitude of th monic of thhe rectified input
he first harm
m.rip.(%)  voltage
harm v and its averagee value.

Km  Multiplier
M gain.
g

SmartCtrl 37
Desiggn a predeffined topology

3.4.3
3.2 UC385
54 Amplifie
ers

The U
UC3854A multiplier
m has
h the follow
wing param
meters:

KFF  Gain of thee feed-forwaard. It is thee ration betw


ween the rm
ms input voltage
and the aveerage input vvoltage to thhe multiplieer.
Km  Multiplier gain.
g
nt reference for the inneer loop (Oh
Rac  Resistance to introducee the curren hms)

Rmo  Resistance to convert rt the multiplier outpu


ut current into a volltage
reference fo
or the inner compensattor (Ohms)

38 SSmartCtrl
Design a ggeneric topo
ology

Cha
apter 4: Dessign a ge
eneric to
opology
y

SmarrtCtrl not only helps the desiigner when n a pre-deefined pow wer convertter is
consiidered, it also allows th
he design off the control loop of an
ny generic cconverter.
To ccarry out thhe design ofo the contrrol when th he plant is not a pre--defined DC C-DC
convverter, the plan
p must bee provided either by means
m of ann s-domain ttransfer fun
nction
or im
mporting thhe plant freqquency respponse from m a .txt file. Dependinng of the deesired
inputt method, thhe designer must selectt between:
 s
s-domain mo
odel editor.
 Im
mport frequ
uency respoonse data fro
om a .txt filee

4.1 s‐domain modell editor


The s-domain model
m edito
or providess two differrent optionss in order to define the
t s-
domaain transfer function pllant:
 s
s-domain mo
odel (equatiion editor)
 s
s-domain mo
odel (polynnomial coeffficients)
In booth cases, thhe user mustt select the control straategy.

SmartCtrl 39
Design a generic topology

4.1.1 s‐domain model (equation editor)


The s-domain model editor (equation editor) provides two different options depending
on wether the defined plant transfer function is intended for:
 Voltage mode control (VMC)
 Current mode control (CMC)

4.1.1.1 s‐domain (equation editor) VMC


When the power converter is defined through its s-domain transfer function, the design
procedure is as follow:
First, the user must define the s-domain transfer function of the plant, To do that are two
different options:
 Import a previous design (click on open)
 Define a new transfer function (click on editor).
To check the syntax rules of the equation editor, please refer to Chapter
12: Equations editor.
Once the equation has been introduced:
 Click on "Save" to save the mathematical equations in a text file with
extension .tromod
 Click on "compile" to continue.
 If desired, the frequency response of the transfer function can be
exported as a .txt file by clicking on "Export transfer function".
If default option "Bode plot" is selected, the frequency response of the previously
defined transfer function is shown on the right hand side panels.

40 SmartCtrl
Design a ggeneric topo
ology

To ccheck the gain, phase and rectanggular components of the frequenccy responsee at a
particcular frequuency, the option "Onne frequency" is prov vided. As depicted in n the
following figuree: first "onee frequency"" must be selected, seccondly the ffrequency sh
hould
be sspecified annd finally, click on compile and a the gaain, phase and rectan ngular
compponents at thhe specifiedd frequencyy are shown below.

SmartCtrl 41
Desiggn a genericc topology

When the s-dom main modeel is intendded for Volltage Modee Control (V
VMC), then the
outpuut voltage and the sw
witching freqquency mu
ust be specified. As hiighlighted in
i the
next picture:

42 SSmartCtrl
Design a ggeneric topo
ology

Afterr that, select the sensorr.

And afterwards select the compensator


c r.

SmartCtrl 43
Design a generic topology

And finally select the cross frequency and the phase margin on the Solutions Map.

4.1.1.2 s‐domain (equation editor) CMC


When the power converter is defined through its s-domain transfer function, the design
procedure is as follow:
First, the user must define the s-domain transfer function of the plant, choosing amongst
two different options:
 Import a previous design (click on open)
 Define a new transfer function (click on editor). To check the syntax
rules of the equation editor, please refer to Chapter 12: Equations editor.
Once the equation has been introduced:

44 SmartCtrl
Design a ggeneric topo
ology

 Click on "Saave" to savee the mathem


C matical equations in a ttext file witth
e
extension .trromod
 C
Click on "co
ompile" to ccontinue.
 IIf desired, the frequenccy response of the transsfer functionn can be
e
exported as a .txt file byy clicking on
o "Export transfer funcction".
If deefault optioon "Bode plot"
p is seleected, the frequency
f response
r off the previiously
definned transfer function is shown on tthe right han
nd side panels.

To ccheck the gain, phase and rectanggular components of the frequenccy responsee at a
particcular frequuecy, the option
o "Onne frequenccy" is prov vided. As depicted in n the
following figuree: first "onee frequency"" must be selected, seccondly the ffrequency sh
hould
be sspecified annd finally, click on compile and a the gaain, phase and rectan ngular
compponents at thhe specifiedd frequencyy are shown below.

SmartCtrl 45
Desiggn a genericc topology

When the s-dom main modeel is intendded for Currrent Modee Control (C
CMC), then the
curreent to be controlled
c value
v and the switchiing frequen
ncy must bbe specified
d. As
highllighted in thhe next pictu
ure:

46 SSmartCtrl
Design a ggeneric topo
ology

Afterr that, select the sensorr

And afterwards select the compensator


c r.

SmartCtrl 47
Design a generic topology

And finally select the cross frequency and the phase margin on the Solutions Map.

4.1.2 s‐domain model (polynomial coefficients)


SmartCtrl offers the possibility of describing the data of the plant introducing the
coefficients of its transfer function. This feature is only available for single loop
designs, and two options are available:
Voltage mode controlled (Shift+L)
Current mode controlled (Shift+U)

48 SmartCtrl
Design a generic topology

The coefficients of the s-domain transfer function have to be introduced. The maximum
order of the transfer function is 10. The coefficients in the numerator are n0 to n10 and
the coefficients in the denominator are d0 to d10.
It is also possible to introduce the transfer function data by using the option Plant
wizard.
Some additional data must be specified:
 The frequency range (minimum frequency and maximum frequency) to consider
in Hertz.
 The switching frequency (Fsw) in Hertz.
 The desired output voltage (Vo) in Volts. (Only if the plant is voltage mode
controlled).

SmartCtrl 49
Design a generic topology

By clicking “View bodes” it is possible to visualize the frequency response (magnitude


and phase) that corresponds to the introduced transfer function in the selected frequency
range.

4.1.2.1 Plant Wizard

The plant wizard is an assistant that allows to introduce a every coefficient of the
transfer function (n0,n1,…,n10, d0, d1,…,d10) as a symbolic expression.

Global block

The “Global block” corresponds to the definition ofthe variables and expressions that
are common for most coefficients of the transfer function.By clicking on the button
Edit, a new edition box is opened (Edit box), which helps the user to introduce the data
and the equations with the appropriate format.

50 SmartCtrl
Design a generic topology

Coefficients block

The “Coefficients block” corresponds to the expressions to calculate the coefficient


selected in the combo box. These equations can use the global variables defined in the
“Global block” or new ones can be defined that will be available only locally for the
selected coefficient.

By clicking on the button Edit, a new edition box is opened (Edit box), which helps the
user to introduce the data and the equations with the appropriate format.

Once the equations have been introduced, it is recommended to click the button
“Compile”. This way, the numerical value of the coefficient is calculated by means of
the mathematical expression in the return assignment, considering all the variables
previously assigned both in the “Global block” and the “Coefficients block”.

If the compilation is successful, the numerical value of the selected coefficient will be
displayed in the “Value” box. Otherwise an error message will appear.

Syntax of the “Global block” and the “Coefficients block”:


1. There are two types of instructions: assignment and return.
2. Only one instruction per line is permitted (whether it is assignment or return).
3. Blank lines are allowed.
4. The syntax of the assignment statements is: Var = Expr, where 'Var' is the name
of a variable and 'Expr' represents a mathematical expression.
5. Regarding the variable names in the assignments:
a. They must begin with an alphabetic character.
b. They can consist of alphabetic or numeric characters, or underscore.
c. The names sqrt, pow, return and PI are reserved names that cannot be
used as variable names.
6. Regarding the mathematical expressions:
a. Algebraic expressions are expressions where valid operators are +, -, *,
/.

SmartCtrl 51
Design a generic topology

b. Expressions can use the function sqrt(a), which calculates the square
root of a, and the function pow(a, b), which calculates 'a' raised to 'b'.
c. Expressions can use grouping parentheses.
7. The syntax of the return statements is: return Expr, where 'Expr' represents a
mathematical expression.
8. The overall block can only contain assignment statements.
9. In the “Coefficients block”, each coefficient can have assignment statements,
but it is mandatory to have at least one return statement, which will always be the
last instruction in the block. This return statement defines the mathematical value of
that particular coefficient.
10. Comments can be included as annotations made by the designer in order to
make the text readable. Comments start with the delimiter doble slash ‘//’ and
continue until the end of the line. These annotations are ignored by the compiler.

All coefficients block

In the block “All coefficients”, some commands can be executed that affect all
coefficients:

 Compile: the numerical values of all the coefficients are calculated. If an error
occurs, a message will be displayed.
 Save as: the contents of the “Global block” and the “Coefficients block” are
stored in a file with extension .trowfun.
 Load: the data stored in the files with extension .trowfun is loaded. Therefore,
the “Global block” and the “Coefficients block” will be updated with the loaded
information.
 View: the content of the “Global block” and the “Coefficients block”, as well as
the numerical value of the coefficients, is displayed in a new window.

Results box and OK button

All the warning messages are displayed in the “Results” edit box.

Once the “OK” button in pressed, all the coefficients are automatically recalculated. If
an error occurs, a warning message will be displayed. If the calculation is successful,

52 SmartCtrl
Design a generic topology

the coefficient values are displayed in the Plant from s-domain transfer function
window.

4.2 Import frequency response data from .txt file


The single loop is formed by three different transfer functions: plant, sensor and
regulator, which must be selected sequentially. Whether the imported plant is voltage
mode controlled or current mode controlled, the single loop design process is the same
in any case. The only differences are the sensors available in each case.
To perform the single loop design from an imported plant transfer function, just enter
the data menu and select imported transfer function. It is also available at.

SmartCtrl allows the designer to import his own transfer plant function and design an
appropriate control loop. This feature is only available for single loop designs. To
define the imported transfer function the user must specify the intended control type:

Take into account that, wether the imported plant is current mode controlled or voltage
mode controlled, the single loop design process will be the same. The only difference is
related to the available sensors, which are different for each case.

Once the control type has been selected, the file that contains the plant frequency
response must be selected. SmarCtrl is able to load the following file formats: *.dat,
*.txt, *.fra

SmartCtrl 53
Design a generic topology

Once the file has been selected, the data is loaded to SmartCtrl and the magnitude and
phase are displayed as depicted in the next figure.

And some additional data such as the output voltage (only in voltage mode control) and
the switching frequency must be specified.
Click OK to continue.
Depending upon it is a current mode controlled or voltage mode controlled, the
available sensors are the following:

54 SmartCtrl
Design a generic topology

Voltage mode controlled


 Voltage divider
 Embedded Voltage
Divider
 Isolated V. sensor

Current mode controlled


 Current sensor
 Hall effect sensor

Finally, it is necessary to select the compensator.

Compensator types:
 Type 3
Unattenuated
 Type 2
 Type 2
unattenuated
 PI
 PI unattenuated
 Single Pole
 Single Pole
unattenuated

Once the system has been defined, SmartCtrl calculates the solutions map in which all
the possible combinations of crossover frequency and phase margin that lead to stable
solutions are shown graphically.

To continue, click on set and the solutions map will be displayed. After that, select a
point within the stable solutions area (white area) and then click OK.

SmartCtrl 55
Desiggn a genericc topology

Noww confirm thhe design an nd the proggram will automaticall


a y show thee performan
nce of
the ssystem in teerms of freequency ressponse, tran
nsient respo
onse. (See G
Graphic and
d text
panels window forf detailedd informatioon).

56 SSmartCtrl
Desiign a generiic control sy
ystem

Cha
apter 5: Dessign a ge
eneric ccontrol ssystem

SmarrtCtrl allowws the desig gn of a genneric contro ol system regardless thhe nature of
o the
systeem, since it is possible to define thhe whole sysstem with th
he equationn editor.

It is aalso availabble at:

In orrder to desiggn a genericc control syystem, the definition


d off all the sysstem compo
onents
transsfer functionns is needeed. The defifinition of each
e compo onent can bbe carried out
o by
meanns of the deffinition of the
t algebraicc s-domain transfer fun nction.
First, the user must
m define the
t s-domaiin transfer function
f of the
t plant, chhoosing am
mongst
two ddifferent opptions:
 Import a previous design
d (clickk on open)
 Define a new transffer function (click on edditor).
To checkk the syntax
x rules of thhe equation editor,
e please refer to C
Chapter 12:
Editor Box.
B
 Additionnally, there is a predefinned transferr function th
hat can be looaded by
clicking on "set defa
faults".

SmartCtrl 57
Design a generic control system

Once the equation has been introduced:


 Click on "Save" to save the mathematical equations in a text file with extension
.tromod
 Click on "compile" to continue and the Bode plot will appear on the right side of
the window.
 If desired, the frequency response of the transfer function can be exported as a
.txt file by clicking on "Export transfer function".
If default option "Bode plot" is selected, the frequency response of the previously
defined transfer function is shown on the right hand side panels.

To check the gain, phase and rectangular components of the frequency response at a
particular frequency, the option "One frequency" is frequency is provided. As depicted
in the following figure: first "one frequency" must be selected, secondly the frequency
should be specified and finally, click on compile and the gain, phase and rectangular
components at the specified frequency are shown below.

58 SmartCtrl
Desiign a generiic control sy
ystem

Righht afterwards of the plaant definitionn, the samee process is needed to ddefine the sensor
s
transsfer functionn by means of the equaation editor.

SmartCtrl 59
Design a generic control system

And finally, the compensator must be selected to complete the definition of the system
components.

Once the compensator type is set, the Solutions Map will help the user to select the
phase margin and the crossover frequency.

60 SmartCtrl
DC-DC Plants
P

Cha
apter 6: DC‐‐DC Plan
nts

For eevery DC-D DC converteer, the inputt data windo


ow allows the user to sselect the deesired
inputt parameters and alsso providess useful in nformation such as tthe steady state
coperating poinnt. For any of the considered DC-DC topologies, t the input data
correespond to thhe white shaadowed boxxes, and the additional information
i n provided byb the
progrram will bee shown in th he grey shaadowed boxes.
Let´ss consider any
a of the available
a coonverters. In
I the follow wing picturre it can bee seen
that the parameeters which define thee steady-statte dc operaating point are placed right
beloww the conveerter image. Dependingg on the topology consiidered in eaach case, som me of
them
m will be inpput data and
d some otherrs will be ouutput data.

The D
DC-DC avaailable plantts are the foollowing:
Buck
Boost
Buck-Booost
Flyback
Forward

SmartCtrl 61
DC-DC Plants

6.1 Buck
When a single loop control scheme is used, the magnitude to be controlled in a buck
converter can be either the output voltage or the inductance current. Both possibilities
have been included in SmartCrl. If the control technique is peak current mode control,
the current is sensed in the inductor, as shown in the table. The schematics are shown
below.

VoltageModeControlledBuck  L‐CurrentSensedBuck 
  Peak Current Mode Control 
In the case of an average current control scheme, two magnitudes must be sensed
simultaneously, a current and the output voltage. The resultant buck scheme is the
following:

Buck (LCS‐VMC) 

The input data window allows the user to select the desired input parameters and
provides useful information such as the steady state dc operating point. This information
is placed right below the converter image.
Two examples of the input data window are shown below, in each of them, the white
shadowed boxes correspond to the input data boxes while the grey shadowed ones
correspond to the additional information provided by the program.
Please, note that the input data is different in case of a voltage controlled plant (output
voltage is an input) or a current controlled plant (in this case the current to be controlled
is the input data). An example of the input data windows is provided below:

62 SmartCtrl
DC-DC Plants
P

In
nput Data  Window off a Voltage  Mode Controlled Bucck 

a Window oof a Peak C
Input Data Current Model Controll 

nput Data  Window off a Current  Mode Controlled Bucck 


In

The pparameters shown in th


he input datta windows are defined
d below:

Steaddy-state dc operating point


p
Conductiion Mode  It can be C
Continuous or
o Discontin
nuous

D
Duty Cycle  ton/T of thee active swittch

IL avg  Inductancee average cu


urrent (A)

IL max  Maximum value of the inductancce switchingg ripple (A)


IL min  Minimum value of thee inductancee switchingg ripple (A)
Io avg  Output aveerage curren
nt (A)

Vo  Output volltage (V)

SmartCtrl 63
DC-DC Plants

Other parameters of the converter


Vin  Input Voltage (V)
RL  Equivalent Series Resistor of the Inductance (Ohms)
L  Inductance (H)
Rc  Equivalent Series Resistor of the output capacitor (Ohms)
C  Output Capacitor (F)
R  Load Resistor (Ohms)
Po  Output Power (W)
FSW  Switching frequency (Hz)

64 SmartCtrl
DC-DC Plants

6.2 Boost
There are three possible magnitudes to be controlled in the boost converter when a
single loop control scheme is selected. This is the output voltage, the inductor current
and the diode current. The corresponding schematics are the following:

Voltage Mode Controlled Boost Converter

L‐current sensed Boost Converter 

Diode Current Sensed Boost Converter 

In the case of a peak current mode control (PCMC), the output voltage and a current
must be sensed simultaneously.

Boost (PCMC) 

In the case of an average current control scheme, the output voltage and a current must
be sensed simultaneously. The available plants for an average current mode control are
included below:

Boost (LCS‐VMC) 

Boost (DCS‐VMC) 

SmartCtrl 65
DC-D
DC Plants

The input data window allowsa the uuser to sellect the dessired input parameterss and
proviides useful informationn such as thhe steady staate dc operaating point. T
This inform
mation
is plaaced right below
b the co
onverter imaage.
Two examples of o the input data winddow are sho own below, in each off them, the white
shadoowed boxees correspon nd to the iinput data boxes
b while the grey shadowed ones
correespond to thhe additionaal informatioon provided
d by the program.
Pleasse, note thaat the input data is diffeferent in casse of a voltaage controllled plant (o
output
voltaage is an inpput) or a currrent controolled plant (in
( this case the currentt to be contrrolled
is thee input dataa). An examp ple of the innput data windows
w is provided
p bellow:

In
nput Data W
Window of  a Voltage  Mode Conttrolled Booost 
an
nd of a Pea k Current M
Mode Control 

In
nput Data W
Window of  a Current  Mode Conttrolled Booost 

The pparameters shown in th


he input datta windows are defined
d below:

Steaddy-state dc operating point


p

uction Mode  It can bee Continuou


Condu us or Discon
ntinuous

66 SSmartCtrl
DC-DC Plants

Duty Cycle  ton/T of the active switch


IL avg  Inductance average current (A)
IL max  Maximum value of the inductance switching ripple (A)
IL min  Minimum value of the inductance switching ripple (A)
Io avg  Output average current (A)
Vo  Output voltage (V)

Other parameters of the converter


Vin  Input Voltage (V)
RL  Equivalent Series Resistor of the Inductance (Ohms)
L  Inductance (H)
Rc  Equivalent Series Resistor of the output capacitor (Ohms)
C  Output Capacitor (F)
R  Load Resistor (Ohms)
Po  Output Power (W)
FSW  Switching frequency (Hz)

SmartCtrl 67
DC-DC Plants

6.3 Buck‐oost
In a single loop control scheme there are three possible magnitudes to be controlled in
the buck-boost converter. This is the output voltage, the inductor current and the diode
current. The corresponding schematics are the following:

Voltage Mode Controlled Buck‐Boost Converter

L‐current sensed Buck‐Boost Converter 

Diode Current Sensed Buck‐Boost Converter 

In the case of an average current mode control scheme or a peak current mode control
(PCMC), the magnitudes sensed are the output voltage and the L current.

Buck‐Boost (LCS‐VMC) 
Buck‐Boost (PCMC) 

The input data window allows the user to select the desired input parameters and
provides useful information such as the steady state dc operating point. This information
is placed right below the converter image.
Two examples of the input data window are shown below, in each of them, the white
shadowed boxes correspond to the input data boxes while the grey shadowed ones
correspond to the additional information provided by the program.
Please, note that the input data is different in case of a voltage controlled plant (output
voltage is an input) or a current controlled plant (in this case the current to be controlled
is the input data). An example of the input data windows is provided below:

68 SmartCtrl
DC-DC Plants

Input Data Window of a Voltage Mode Controlled Buck‐Boost 
and for a Buck‐Boost with a Peak Current Mode Control 

Input Data Window of a Current Mode Controlled Buck‐Boost 

The parameters shown in the input data windows are defined below:

Steady-state dc operating point


Conduction Mode  It can be Continuous or Discontinuous
Duty Cycle  ton/T of the active switch
IL avg  Inductance average current (A)
IL max  Maximum value of the inductance switching ripple (A)
IL min  Minimum value of the inductance switching ripple (A)

SmartCtrl 69
DC-DC Plants

Io avg  Output average current (A)


Vo  Output voltage (V)

Other parameters of the converter


Vin  Input Voltage (V)
RL  Equivalent Series Resistor of the Inductance (Ohms)
L  Inductance (H)
Rc  Equivalent Series Resistor of the output capacitor (Ohms)
C  Output Capacitor (F)
R  Load Resistor (Ohms)
Po  Output Power (W)
FSW  Switching frequency (Hz)

70 SmartCtrl
DC-DC Plants

6.4 Flyback
In a single loop control scheme, the magnitude to be controlled in a Flyback converter
can be either the output voltage or the diode current. Both possibilities have been
included in SmartCtrl. The schematics are shown below:

Voltage Mode Controlled Flyback  Diode Current Sensed Flyback

In the case of a peak current mode control scheme(PCMC), the magnitudes sensed are
the output voltage and the MOSFET current.

Flyback (PCMC) 

In the case of an average current mode control scheme, the magnitudes sensed are the
output voltage and the diode current.

Flyback (DCS‐VMC) 

The input data window allows the user to select the desired input parameters and
provides useful information such as the steady state dc operating point. This information
is placed right below the converter image.
Two examples of the input data window are shown below, in each of them, the white
shadowed boxes correspond to the input data boxes while the grey shadowed ones
correspond to the additional information provided by the program.
Please, note that the input data is different in case of a voltage controlled plant (output
voltage is an input) or a current controlled plant (in this case the current to be controlled
is the input data). An example of the input data windows is provided below:

SmartCtrl 71
DC-DC Plants

Input Data Window of a Voltage Mode Controlled Flyback 
and also for a Peak Current Mode Control Technique.

Input Data Window of a Current Mode Controlled Flyback 

The parameters shown in the input data windows are defined below:

Steady-state dc operating point


Conduction Mode  It can be Continuous or Discontinuous
Duty Cycle  ton/T of the active switch
IL avg  Inductance average current (A)
IL max  Maximum value of the inductance switching ripple (A)
IL min  Minimum value of the inductance switching ripple (A)
Io avg  Output average current (A)
Vo  Output voltage (V)
Other parameters of the converter

72 SmartCtrl
DC-DC Plants

Vin  Input Voltage (V)


RL  Equivalent Series Resistor of the Inductance (Ohms)
L  Inductance (H)
Rc  Equivalent Series Resistor of the output capacitor (Ohms)
C  Output Capacitor (F)
R  Load Resistor (Ohms)
Po  Output Power (W)
FSW  Switching frequency (Hz)

(*)N2 is the transformer secondary side number of turns


N1 is the transformer primary side number of turns

6.5 Forward
The magnitude to be controlled in a Forward converter can be either the output voltage
or the inductance current. Both possibilities have been included in SmartCrl. The
schematics are shown below:

Voltage Mode Controlled Forward L‐Current Sensed Forward 

In the case of a peak current mode control(PCMC) scheme, the magnitudes sensed are
the output voltage and the L current (sensed in the MOSFET).

Forward (LCS‐VMC) 

In the case of an average current mode control scheme, the magnitudes sensed are the
output voltage and the L current.

SmartCtrl 73
DC-DC Plants

Forward (LCS‐VMC) 

The input data window allows the user to select the desired input parameters and
provides useful information such as the steady state dc operating point. This information
is placed right below the converter image.
Two examples of the input data window are shown below, in each of them, the white
shadowed boxes correspond to the input data boxes while the grey shadowed ones
correspond to the additional information provided by the program.
Please, note that the input data is different in case of a voltage controlled plant (output
voltage is an input) or a current controlled plant (in this case the current to be controlled
is the input data). An example of the input data windows is provided below:

Input Data Window of a Voltage Mode Controlled Forward 
and for Peak Current Mode Control.

74 SmartCtrl
DC-DC Plants

Input Data Window of a Current Mode Controlled Forward 
The parameters shown in the input data windows are defined below:
Steady-state dc operating point
Conduction Mode  It can be Continuous or Discontinuous
Duty Cycle  ton/T of the active switch
IL avg  Inductance average current (A)
IL max  Maximum value of the inductance switching ripple (A)
IL min  Minimum value of the inductance switching ripple (A)
Io avg  Output average current (A)
Vo  Output voltage (V)
Other parameters of the converter
Vin  Input Voltage (V)
RL  Equivalent Series Resistor of the Inductance (Ohms)
L  Inductance (H)
Rc  Equivalent Series Resistor of the output capacitor (Ohms)
C  Output Capacitor (F)
R  Load Resistor (Ohms)
Po  Output Power (W)
FSW  Switching frequency (Hz)
(*)N2 is the transformer secondary side number of turns.
N1 is the transformer primary side number of turns

SmartCtrl 75
DC-DC Plants

76 SmartCtrl
Seensors

Cha
apter 7: Sen
nsors.

7.1 Voltage
e Divider
The
T Voltagee Divider measures
m and
d adapts thee output voltage
level to the rregulator vo
oltage refereence level.
Its transfer ffunction corrresponds to
o the follow
wing equatio
on:
Vref
K ( s) 
Vo

Where:
Vref is thhe compensaator referencce voltage
Vo is thee DC-DC co
onverter outp
tput voltage

7.2 Embedd
ded volta
age divid er
The two resistoors that forrm the volttage dividerr (R11,Rar)) are embeedded withiin the
regullator. So, non sensor is i represent
nted in the correspondding box. A
And the vo
oltage
dividder resistorss are highlig
ghted in the compensato
or figure:

Giveen the desirred output voltage,


v thee compensattor referencce voltage aand the vallue of
R11, SmartCtrl calculates the
t resistor Rar. the transfer functiion of the vvoltage divid
der at
0Hz is the followwing:
Vo Rar

Vrref Rar  R11

SmartCtrl 77
Sensors

7.3 Isolated
d Voltage
e Sensor
The Isolated vooltage senso or is a volttage sensorr that proviides electriccal isolation. Its
transsfer functionn is described below. IIt is available for the fo
orward and the flyback k DC-
DC ttopologies.

Gain n 20∙lo
og(K) 

gain [dB]
K ( s) 
s ‐
‐20 dB/dc
1
2· · fpK
f

Where:
F
Freq [Hz]
Gain is thee sensor gaain at 0dB
G B, its

phase [o]
givenn by the output
o and
d the refereence 0o
voltaage. ‐45o /dc
Vo ‐90o
Gainn 
Vref
F
Freq [Hz]
fpK is the pole frequency
f in
n Hertz

7.4 Resistiv
ve Sensorr (Powerr Factor C
Correctorr)
If thee current is sensed using a resistoor Rs, the current sensor gain willl be the vallue of
this rresistor: Rs..
K ( s )  Rs

This resistor is represented


r in the pictuure of the po
ower plant, Rs:

UC385
54A multipliier + Boost PFC
P (resistivee load).

UC3854A
A multiplier + Boost PFC (constant po
ower load).

78 SSmartCtrl
Sensors

7.5 Resistive Sensor (Peak Current Mode Control)


The  resistator  measures  the  inductor 
current and transforms the current into an 
equivalent voltage.
The  sensor  gain  corresponds  to  its 
characteristic resistance value (Rs). 

G=Rs
7.6 Hall effect sensor
The Hall effect is a current sensor represented through a generic transfer function box.
Internally, its transfer function corresponds to the following equation:

Gain 20∙log(K) 
gain [dB]

K ( s) 
s ‐20 dB/dc
1
2· · fpK

Freq [Hz]
Where:
phase [o]

0o
Gain is the sensor gain at 0dB. ‐45o /dc
fpK is the pole frequency in Hertz ‐90o

Freq [Hz]

7.7 Current Sensor


The current sensor is represented by a
generic transfer function box. Internally,
the transfer function corresponds to a
constant gain in V/A.
K ( s )  Gain

For example, if the current is sensed using a resistor Rs, the current sensor gain will be
the value of this resistor:

K ( s )  Rs

SmartCtrl 79
Sensors

80 SmartCtrl
Modu
ulator

Cha
apter 8: Mod
dulatorr

8.1 Modula
ator (Peak
k Curren
nt Mode C
Control)
From
m top to botttom, the mo
odulator inpput signals are
a defined as
a follow:
 Vramp · Is the
V t characteeristic comp pensation slo ope used wiith this typee of
thhis control technique.
t T
This compeensation slop pe is added to the senseed
c
current in orrder to ensuure the systeem stability
y with duty ccycles abov
ve
5
50%.
 V
Vsensed · Iss the equivaalent voltagee of the senssed inductorr current.
 V · Is the sensed regullator output voltage.
Vc

From
m top to botttom, the mo
odulator dessign criteriaa are defined
d as follow:
 S
Sn The inductor
i chaarge slope.
 S
Sf The inductor
i disscharge slop
pe.
 Se
S Is thee slope of thhe compensation ramp, it is compuuted as funcction
o Sn and S
of
 A
Att Is thee attenuationn applied to
o the regulattor output vvoltage.

SmartCtrl 81
Moddulator

8.2 Modula
ator (PWM
M)
The P
PWM moduulator is dissplayed as ppart of the reegulator.

Signaal Ramp is defined by:


 V
Vp Peak voltage
 V
Vv Valleey voltage
 trr Risin
ng time
 F
Fsw Switcching frequeency
 T
Tsw Switcching periodd

82 SSmartCtrl
Graphic and text panels

Chapter 9: Compensators

9.1 Single loop or inner loop

9.1.1 Type 3 compensator

Input Data
R11(ohms)  Its default value is 10 k

Vp(V)  Peak value of the ramp voltage (carrier signal of the PWM modulator)
Vv(V)  Valley value of the ramp voltage
Tr(s)  Rise time of the ramp voltage
Tsw(s)  Switching period
Output Data
The compensator components values (C1, C2, C3, R1, R2) are calculated by the
program and displayed in the corresponding text panel

SmartCtrl 83
Graphic and text panels

9.1.2 Type 3 compensator unattenuated


The voltage divider needed in order to adapt the sensed output voltage to the reference
voltage is embedded within the compensator. It corresponds to R11 and Rar. This
compensator configuration eliminates the attenuation due to the external voltage
divider.

Input Data
R11(ohms)  Its default value is 10 k

Vref(V)  Reference voltage


Vp(V)  Peak value of the ramp voltage (carrier signal of the PWM modulator)
Vv(V)  Valley value of the ramp voltage

Tr(s)  Rise time of the ramp voltage

Tsw(s)  Switching period

Output Data
The compensator components values (C1, C2, C3, R1, R2) and the resistor Rar are
calculated by the program and displayed in the corresponding text panel

84 SmartCtrl
Graphic and text panels

9.1.3 Type 2 compensator

Input Data
R11(ohms)  Its default value is 10 k

Vp(V)  Peak value of the ramp voltage (carrier signal of the PWM modulator)
Vv(V)  Valley value of the ramp voltage
Tr(s)  Rise time of the ramp voltage
Tsw(s)  Switching period

Output Data
The compensator components values (C2, C3, R2) and the resistor Rar are calculated by
the program and displayed in the corresponding text panel.

SmartCtrl 85
Graphic and text panels

9.1.4 Type 2 compensator unattenuated


The voltage divider needed in order to adapt the sensed output voltage to the reference
voltage is embedded within the compensator. It corresponds to R11 and Rar. This
compensator configuration eliminates the attenuation due to the external voltage
divider.

Input Data
R11(ohms)  Its default value is 10 k

Vref(V)  Reference voltage


Vp(V)  Peak value of the ramp voltage (carrier signal of the PWM modulator)
Vv(V)  Valley value of the ramp voltage
Tr(s)  Rise time of the ramp voltage
Tsw(s)  Switching period

Output Data
The compensator components values (C1, C2, C3, R1, R2) and the resistor Rar are
calculated by the program and displayed in the corresponding text panel

86 SmartCtrl
Graphic and text panels

9.1.5 PI compensator

Input Data
R11(ohms)  Its default value is 10 k

Vp(V)  Peak value of the ramp voltage (carrier signal of the PWM modulator)
Vv(V)  Valley value of the ramp voltage
Tr(s)  Rise time of the ramp voltage
Tsw(s)  Switching period

Output Data
The compensator components values (C2, R2) are calculated by the program and
displayed in the corresponding text panel.

SmartCtrl 87
Graphic and text panels

9.1.6 PI compensator unattenuated


The voltage divider needed in order to adapt the sensed output voltage to the reference
voltage is embedded within the compensator. It corresponds to R11 and Rar. This
compensator configuration eliminates the attenuation due to the external voltage
divider.

Input Data
R11(ohms)  Its default value is 10 k

Vref(V)  Reference voltage


Vp(V)  Peak value of the ramp voltage (carrier signal of the PWM modulator)
Vv(V)  Valley value of the ramp voltage
Tr(V)  Rise time of the ramp voltage
Tsw(s)  Switching period

Output Data
The compensator components values (C2, R2) and the resistor Rar are calculated by the
program and displayed in the corresponding text panel.

88 SmartCtrl
Graphic and text panels

9.2 Outer loop and peak current mode control

9.2.1 Single pole compensator

Input Data
R11  Its default value is 10 k

Vsat  Saturation voltage of the op-amp. In the case of the power factor
corrector using a UC3854A multiplier, this value is equal to 6.0 V

Output Data
The compensator components values (C3, R2) are calculated by the program and
displayed in the corresponding text panel.

9.2.2 Single pole compensator unattenuated


The voltage divider needed in order to adapt the sensed output voltage to the reference
voltage is embedded within the compensator. It corresponds to R11 and Rar. This

SmartCtrl 89
Graphic and text panels

compensator configuration eliminates the attenuation due to the external voltage


divider.

Input Data
R11  Its default value is 10 k

Vref  Reference voltage. In the case of the power factor corrector using a
UC3854A multiplier, this value is equal to 7.5 V
Vsat  Saturation voltage of the op-amp. In the case of the power factor
corrector using a UC3854A multiplier, this value is equal to 6.0 V

Output Data
The compensator components values (C3, R2) and the resistor Rar are calculated by the
program and displayed in the corresponding text panel.

90 SmartCtrl
Graphic and text panels

9.2.3 Type 3 regulator

Input Data
R11  Its default value is 10 k

Output Data
The regulator components values (C1, C2, C3, R1, R2) and the resistor Rar are
calculated by the program and displayed in the correspondingtext panel.

SmartCtrl 91
Graphic and text panels

9.2.4 Type 3 compensator unattenuated

Input Data
R11  Its default value is 10 k

Vref  Reference Voltage

Output Data
The compensator components values (C1, C2, C3, R1, R2) and the resistor Rar are
calculated by the program and displayed in the correspondingtext panel.

92 SmartCtrl
Graphic and text panels

9.2.5 Type 2 compensator

Input Data
R11  Its default value is 10 k

Output Data
The compensator components values ( C2, C3, R2) and the resistor Rar are calculated by
the program and displayed in the corresponding text panel.

SmartCtrl 93
Graphic and text panels

9.2.6 Type 2 compensator unattenuated


The voltage divider needed in order to adapt the sensed output voltage to the reference
voltage is embedded within the compensator. It corresponds to R11 and Rar. This
compensator configuration eliminates the attenuation due to the external voltage
divider.

Input Data
R11  Its default value is 10 k

Vref  Reference Voltage

Output Data
The compensator components values (C2, C3, R2) and the resistor Rar are calculated by
the program and displayed in the corresponding text panel.

94 SmartCtrl
Graphic and text panels

9.2.7 PI compensator

Input Data
R11  Its default value is 10 k

Output Data
The compensator components values (C2, R2) are calculated by the program and
displayed in the corresponding text panel.

SmartCtrl 95
Graphic and text panels

9.2.8 PI compensator unattenuated


The voltage divider needed in order to adapt the sensed output voltage to the reference
voltage is embedded within the regulator. It corresponds to R11 and Rar. This regulator
configuration eliminates the attenuation due to the external voltage divider.

Input Data
R11  Its default value is 10 k

Vref  Reference Voltage

Output Data
The compensator components values (C2, R2) and the resistor Rar are calculated by the
program and displayed in the correspondingtext panel.

96 SmartCtrl
Graphicc and text panels
p

Cha
apter 10
0: Gra
aphic an
nd text p
panels

The wwindow is divided in sixs differennt panels. Fo


our of them
m are graphiic panels an
nd the
two oother are texxt panels.
The grapphic panels are:
B
Bode plot Magnitude
M (ddB)
B
Bode plot Ph
hase (º)
P
Polar plot
T
Transient ressponse plot
The text panels are:
Innput Data
O
Output Data

10.1
1 Bode pllots
The Bode plot is i used to characterize
c ncy responsse of the syystem. It consists
the frequen
of tw
wo differentt graphs, th he gain or m
module plott and the ph
hase plot vversus frequuency.
Frequuency is plootted in a lo
og axe.
ot (dB)  Plo
Maagnitude plo ots the maggnitude of a given transsfer functionn in decibels (dB)
versus frequeency. It is reepresented in
i the uppeer left panell of the
Sm
martCtrl winndow.
plot (º)  Plo
Phase p ots the phaase of a givven transferr function iin degrees versus
freequency. Itt is represeented in th
he bottom left panel of the
SmmartCtrl winndow.

SmartCtrl 97
Grapphic and texxt panels

In SmmartCtrl theere are seveen different transfer funnctions thatt can be plootted in the Bode
plot. To represennt any of th
hem, just cliick on the correspondin ng icon of thhe View To oolbar
or seelect the corrresponding transfer funnction withiin the View
w Menu.
Man
nual placem
ment of poless and zeross
Addiitionally, when
w a type 3 or type 2 is used, poles
p and zeeros of the compensato
or are
repreesented by means
m of thrree little squuares.
Yellowcorresponds to fz
Red corresponds to fp
Blue corresponds to fi
The pplacement of
o the aforeementioned zeros and poles
p can bee varied by the designeer just
o each squuare. To enaable this option manuaal method ttag in
by cllicking and dragging on
the d
design methhod box must be selecteed.
Crosss frequencyy
The ccross frequeency of the open loop iis shown by
y means of a pair of dasshed lines on
o the
openn loop transffer function
n of the systeem.
Clickk on right button
b
By riight clickingg on each plot a new w
window is op
pened with some additiional option
ns.
Copy Copy de Bode Plot to clipboard
Export  This option
n allows exp
porting the data of the all
frequencies response in
i several foormats.
Help Link to thee on-line Sm
martCtrl helpp

Quick Help Shows a shhort explanaations aboutt how to meeasure


directly on
n the plot

Meassurement toools

Two different tyypes of curssors are avaiilable:

mouse  Keeep the Ctrll key pressed and mov


Ctrl + m ve the mouuse. Two crrossed red
lin
nes are dispplayed and the
t two coo ordinates off the point on which
thee mouse is pplaced are given.
g You can measurre at any po
oint within
thee graph areaa.
mouse  Keeep the Shiift key presssed and pllace the moouse near one
Shift+m o of the
dissplayed moodule tracess. The curso
or will trackk itself to that
t trace,
and the cursoor will measure simultaneously thhe phase an nd module
of the trackedd trace.
If you want too track the cursor to other
o trace, jjust left clicck on that
traace.
Addditionally, if the seleected trace is open looop transfer function,
Sm
martCtrl willl measure simultaneou
s usly on bothh Bode plotts (module
and phase) annd on the Ny yquist diagrram.

98 SSmartCtrl
Graphicc and text panels
p

10.2
2 Nyquistt diagram
m
The N Nyquist diaagram, togeether with thhe Bode plo
ots, is a graaphical repreesentation of
o the
frequuency respoonse of a linear system.
For eeach  , thee resulting open
o loop ttransfer fun presented ass Im(T) vs R(T).
nction is rep
So, tthe gain at this
t  is th
he distance from the represented
r point to thee origin, an
nd the
phasee is the corrresponding angle.

In terrms of stabbility, the po


olar Nyquistt diagram provides
p a graphic
g and easy to evaaluate
criterrion of the closed loop p system sttability baseed on the open
o loop syystem frequuency
respoonse. This is,
i if the opeen loop trannsfer functioon is stable (no RHP ppoles), the closed
c
loop system will be unstablle for any enncirclementt of the poin nt (-1, j0).
In SmmartCtrl thee designer can determ
mine the sysstem stabilitty at a glannce since a unity
circlee is provideed (in blue).

SmartCtrl 99
Grapphic and texxt panels

Poless and zeross


Poless and zeros of the comp
pensator aree representeed by meanss of three litttle squares.
Yellowcorresponds to fz
Red corresponds to fp
Blue corresponds to fi
How
wever, unlikee in the Bod
de plots, theey cannot bee placed maanually.

Zoom
m
A zooom-in and zoom-out tool t has beeen implemeented by lefft-clicking aand draggin ng the
mousse within thhe white areea of the pollar plot. The relative sccale is givenn by the rad
dio of
the oouter circle both
b in dB and
a natural scale.

Copyy to clipboaard
The same way as a in the Bo ode plots annd the transiient responsse plots, a ccopy to clipb
board
optioon is availabble throughh right clickk on the po
olar plot aree that will aallow the usser to
copyy the currentt graph to th
he clipboardd.
Clickk on right button
b
By riight clickingg on each plot a new w
window is op
pened with some additiional option
ns.

Copy Copy de Bode Plot to clipboard


Help Link to thee on-line Sm
martCtrl helpp

Quick Help
Q Shows a shhort explanaations aboutt how to meeasure
directly on
n the plot

100 SmartCtrl
Graphicc and text panels
p

Meassurement toools

Two different tyypes of curssors are avaiilable:

mouse  Keeep the Ctrl key presseed and mov


Ctrl + m ve the mousse. Two crrossed red
lines are displaayed and thee two coord
dinates of thhe point on which the
mouuse is placeed are givenn. You can measure
m at any point within
w the
grap
ph area.
mouse  Keeep the Shift
Shift+m ft key presssed and plaace the moouse near one
o of the
disp
played moduule traces. The
T cursor will
w track ittself to that trace, and
the cursor will measure siimultaneoussly the phasse and mod dule of the
track
ked trace.
If you want to track the cursor
c to otther trace, j ust left clicck on that
trace.
Addditionally, iif the seleccted trace is
i open looop transfer function,
SmaartCtrl will measure siimultaneoussly on bothh Bode plotss (module
and phase) andd on the Nyq quist diagram
m.

Sma
artCtrl 101
Grapphic and texxt panels

10.3
3 Transie
ent respo
onse plot
Trannsient responnse specificcations, suchh as setting time and vo
oltage peak transient vaalues,
are uusually criticcal specificaations whenn designing the control stage of a ppower conv
verter.
Therrefore, proviiding a quicck view to tthe transientt response of
o the conveerter may grreatly
help the designeer during thee design proocess.
In SmmartCtrl thee three mosst significannt transient responses have
h been ddeveloped. They
can bbe plotted just by cliicking on tthe correspo onding icon ns of the V bar or
View  Toolb
seleccting the corrresponding
g transient reesponse witthin the Vieew Menu.

By riight clickingg on the tran


nsient respoonse plot, th
he following
g options arre displayed
d.
Expoort
This option alloows the useer to exporrt the curreent transientt responsess to a file which
w
couldd be either .txt or .smvv format. It is placed within
w the menu displayyed through
h right
clickk on the trannsient respon
nse panel.
Time shiift:
This optiions allows the user to shift the tim
me axis
Print step
ep:
This opttion allows modifying the numberr of points to be expoorted. If the print
step is multiplied
m y 2, only onne point perr two ones will be saveed. This helps to
by
reduce thhe size of th
he output fille.

102 SmartCtrl
Graphicc and text panels
p

Copyy
This allows the user to copy
y the currennt graphs in the clipboaard
Moddify transien
nt parameteers
This option alloows the usser to custoomize the transient
t response plott as well as
a the
param
meters of thhe computattion algorithhm
SmarrtCtrl makees an autom matic selecttion of thee parameters as the usser modifiees his
desiggn. By rightt clicking on the transiient plot and d selection the Customm option, a set of
slideers are displaayed so thatt the user iss able to cusstomize the settings listted bellow.

Timee step: This option allow


ws modifyinng the time interval between data points.
Freqquency resoolution: Thee transient response computation
c n is based oon samplinng the
frequuency respoonse of the power connverter. Thee higher thee resolutionn, the higheer the
numbber of samppled points, which meaans higher accuracy
a bu
ut also longeer computattional
time.. Therefore,, the trade-o
off can be coonsidered by
b the user.

Sma
artCtrl 103
Grapphic and texxt panels

Showwn time: Thhis option allows


a the user to mo odify the tim
me period displayed ini the
winddow. The maximum
m vaalue is limiited by the time step multiplied
m bby the frequ
uency
resollution.
A zooom effect could
c be obbtained by ddecreasing the “shown n time”, deccreasing alsso the
“timee step” paraameter and finally
f increeasing the “frequency
“ resolution”
r if necessary
y.
In adddition, the following in
nformation is displayed
d for inform
mative purpooses.
Freqquency step:: The frequency separaation betweeen two sam
mpled frequeency pointss. It is
deterrminate byy the frequuency resollution and the bandw width. An excessive high
frequuency step may
m lead to an incorrecct transient plot.
p
Banddwidth: It determinates
d s the maxim
mum sampled frequenccy and is diirectly relatted to
the time step seelected by the
t user. Ann excessiveely low valu
ue may leadd to an incoorrect
transsient plot.

104 SmartCtrl
Graphicc and text panels
p

10.4
4 Steady‐state waveform
The "steady-staate waveforrm" panel displays th he most sig gnificant waaveforms of
o the
poweer plant andd the modulaator once thhe steady staate is reacheed.
 Power stage wavefforms.

The
T available
e wave formss are:
 Induc
ctor voltage
 Induc
ctor and diodde current
  Output voltage

 PWM modulator
m waveforms.
w

The
e available waveforms
w arre:

 Carr(V)): Carrier siggnal (ramp)


 Mod(V)): Modulatingg signal
 PWM (V): MOSFET
T gate
voltage
e

 Peak cuurrent modee control moodulator waaveforms.


The
e available wave forms arre:

 Vc(t): Modulating
M siggnal
 Vcr(t): Compensatin
C ng ramp
 Vsensed(t): Sensedd MOSFET
current or inductor ccurrent.
In th
he case of Forward convverter,
Vsill(t) signal is also
a plotted tto show the
outp uctor current..
put filter indu
 PWM (V V): MOSFET
T gate
voltage

Sma
artCtrl 105
Grapphic and texxt panels

Measurement ttools

Two different tyypes of curssors are avaailable:

Ctrl ++  Keep the Ctrl key pressedd and move e the mouse e. Two crosssed red line


es are 
mouse dissplayed andd the two cooordinates o
of the pointt on which tthe mouse iis placed 
aree given. You
u can measuure at any p
point within the graph  area.

Shiftt+mouse Keep the Shiftt key presseed and place e the mouse near one  of the displayed 


moodule tracess. The cursoor will trackk itself to tha
at trace, annd the curso
or will 
meeasure the ttwo coordinnates.
If yyou want to
o track the ccursor to other trace, just left clickk on that traace.

Expo
orting tools 

Throough right click on th he steady-sstate wavefform panel, a pop-up menu beccomes


availlable. In it, the
t copy an
nd export opptions are av
vailable.
 Copy: coopies the graphic panell to the clipb
board.
 Export: automatical
a lly redirectss the user to the export option withhin the File
Menu.

10.5
5 Text pa
anels
Two text panelss are availaable to provvide a comp plete list of the numeriical values of all
the eelements thaat compose the whole ccircuit as weell as some selection p arameter su
uch as
type of regulatorr, type of seensor, etc.
Text panels aree shown thrrough the V
View Menu
u or by cliccking on thhe correspon
nding
buttoons in the main
m toolbar:

View menu
u Main
M tool baar

Icon
n Opens Input Dataa Panel

Icon
n Openss Output Daata Panel

106 SmartCtrl
Graphic and text panels

The Input Data Panel summarizes the input parameters of the converter such as the
power stage parameters, the steady-state dc operating point, the regulator parameters,
etc...
The Output Data Panel shows the numerical information about the design of the
compensator. The regulator resistors and capacitors values as well as the frequencies of
its poles and zeroes, are updated in real time. In addition, the most important loop
characteristics. That is, the phase margin, gain margin and attenuation at the switching
frequency.
The following example shows the text panels contents for a Forward converter with
double loop control. Therefore, input and output information regarding the inner and
outer loop is provided

Input data panel. Output data panel.


The following example shows the text panels contents for a Forward converter with
double loop control. Therefore, input and output information regarding the inner and
outer loop is provided

INPUT DATA PANEL


Text shown in the panel Description
INPUT DATA Frequency range
DC-DC double loop (outer loop) Minimum and maximum frequency to be plotted in the graphic
panels.

--------------------------------------

SmartCtrl 107
Graphic and text panels

Frequency range (Hz) : (1, 999 k) Cross frequency


Cross frequency (Hz) = 10 k Selected crossover frequency for the open loop gain of the outer
loop (0 dB crossing frequency).
Phase margin (°) = 65

Phase margin
Plant
Selected phase margin for the open loop gain.
--------------------------------------
(inner loop)
Plant
The type of converter is shown. In the case of double loop
control, the outer loop plant is the inner loop closed loop
transfer function.
INPUT DATA PANEL (Cont I)

Text shown in the panel Description


Sensor Sensor
-------------------------------------- The type of outer loop voltage sensor is shown. In the
Isolated voltage sensor case isolated voltage sensor, the sensor gain and the cut-
off frequency are provided.
Vref/Vo = 0.0892857
When a voltage divider is used as voltage sensor, the
HFPole(Hz)= 500 G
resistor values (Ra, Rb) and its power dissipation are
given:
Sensor:
VO
--------------------------------------
Ra Pa
VFB
Ra (Ohms) = 30.3413
Rb (Ohms) = 94.8168 Rb Pb

Pa (Watts) = 21.0933 m
Pb (Watts) = 65.9166 m
Compensator
The type of outer loop compensator is shown. User´s
input values are shown: Input impedance resistor, R11,
Compensator
the reference voltage, Vref and the error amplifier
saturation voltage are provided.
--------------------------------------
Type 3
Steady-state dc operating point
R11(Ohms) = 10000
The initial conditions for the regulator capacitors are
Vref(V) = 2.5
provided.
Vsat_minimum(V) = 13

Steady-state dc operating point


--------------------------------------
IC_C3(V) = -7.5
IC_C2(V) = -7.5
IC_C1(V) = 0

108 SmartCtrl
Graphic and text panels

INPUT DATA PANEL (Cont II)

Text shown in the panel Description


INPUT DATA Frequency range
DC-DC double loop (inner loop) Minimum and maximum frequency to be plotted in the
graphic panels.
--------------------------------------
Frequency range (Hz) : (1, 999 k)
Cross frequency (Hz) = 20 k
Phase margin (°) = 60

INPUT DATA PANEL (Cont III)

Text shown in the panel Description


Plant Cross frequency
-------------------------------------- Selected crossover frequency for the open loop gain of
Forward (LCS_VMC) the inner loop (0 dB crossing frequency).
R (Ohms) = 2.8
L (H) = 14 u Phase margin
RL(Ohms) = 1 n Selected phase margin for the open loop gain.
C (F) = 2.2 m
RC(Ohms) = 1 n
Plant
Vin (V) = 270
The type of converter and the type of control are shown.
Vo (V) = 28 The abbreviation LCS-VMC is referred to “inductor
Fsw (Hz) = 100 k current sensed – Voltage mode Control”. The values of
power stage parameters are provided.
Nt = 218 m
Steady-state dc operating point
Steady-state dc operating point
--------------------------------------
Mode indicates de conduction mode of the converter.
Mode = Continuous
Duty cycle= 0.475705 Vcomp is the steady state voltage at the output of the
operational amplifier of the regulator.
Vcomp(V) = 2.18926
IL is the average value of the inductor current.
IL (A) = 10
ILmax is the maximum value of the inductor current.
ILmax(A) = 15.2429
ILmin(A) = 4.75705
ILmin is the minimum value of the inductor current.

Io (A) = 10 Io is the output DC current of the converter.

Vo (V) = 28 Vo is the output DC voltage of the converter

Sensor Sensor
-------------------------------------- The type of inner loop current sensor voltage sensor is
Current sensor shown. In the case of “current sensor”, the sensor gain is
provided.
Gain = 1

Compensator and PWM modulator parameters


Compensator
-------------------------------------- The type of outer loop compensator is shown. User´s
input values are shown:
Type 3
Input impedance resistor: R11i,
Gmod = 0.4
Ramp parameters: Peak voltage value (Vp), valley

SmartCtrl 109
Graphic and text panels

R11i(Ohms)= 10000 voltage value (Vv), rise time (Tr). Gmod is the small
Vp(V) = 3 signal gain of the modulator.

Vv(V) = 1
tr(sec) = 8e-006 Steady-state dc operating point (regulator initial
conditions)

Steady-state dc operating point


The initial conditions for the regulator capacitors are
provided.
--------------------------------------
IC_C3_i(V) = 7.81074
IC_C2_i(V) = 7.81074
IC_C1_i(V) = 0

OUTPUT DATA PANEL – Operational amplifier based regulator

Text shown in the panel Description


RESULTS Components values
Regulator (Analog): The resistor and capacitor values are provided.
--------------------------------------
R1 (Ohms) = 6.03942 k
R2 (Ohms) = 902.951 k

C1 ( F ) = 1.61707 n
C2 ( F ) = 28.7245 p
C3 ( F ) = 17.3479 p Poles and zeroes frequencies
The frequencies of the regulator poles and zeroes are given
accordingly to expression (1).
fz1 ( Hz ) = 6.13625 k
fz2 ( Hz ) = 6.13625 k
 s   s  (1)
1   1
fp1 ( Hz ) = 16.2966 k
 2  fz1   2  fz2 
R ( s) 
fp2 ( Hz ) = 16.2966 k T3  s   s   s 
   1   1
fi ( Hz ) = 345.445 k  2  fi   2  fp1   2  fp2 

b2 ( s^2) = 6.72719e-010 s-domain coefficients

b1 ( s ) = 5.18736e-005 The coefficients of an equivalent s-domain transfer function (2)


are given:
b0 = 1
b2  s 2  b1  s  1 (2)
R ( s) 
T3 3 2
a3  s  a 2  s  a1  s  1
a3 ( s^3) = 4.39429e-017
a2 ( s^2) = 8.99901e-012
a1 ( s ) = 4.60725e-007 Loop performance parameters

a0 = 0 At PhF frequency, the phase of the open loop gain, reaches -


180º.
GM. Gain margin
Loop performance parameters:
Atte. Attenuation of the gains product sensor x regulator at the
-------------------------------------- switching frequency.

PhF ( Hz ) = 23.6721 k
GM ( dB ) = 11.506
Atte( dB ) = 6.55592

110 SmartCtrl
Graphic and text panels

OUTPUT DATA PANEL – Digital control

Text shown in the panel Description


RESULTS Regulator (Digital).
Compensator (Analog): Only in SmartCtrl - Pro
--------------------------------------

z-domain coefficients
R1 (Ohms) = 2.32153 k
R2 (Ohms) = 36.6071 k
The Type 3 regulator in z-domain can be expressed as the
following transfer function:
C1 ( F ) = 2.36137 n
C2 ( F ) = 794.811 p
b0  z3  b1  z 2  b2  z  b3
R ( z) 
C3 ( F ) = 184.518 p T3 a0  z3  a1  z 2  a 2  z  a3

fz1 ( Hz ) = 5.47005 k
When a0 = 1, the output y and the input u can be
fz2 ( Hz ) = 5.47005 k expressed by the following difference equation:
fp1 ( Hz ) = 29.0323 k

y  n   b0  u  n   b1  u  n  1  b 2  u  n  2   b3  u  n  3 
fp2 ( Hz ) = 29.0323 k
fi ( Hz ) = 16.2514 k
  a1  y  n  1  a 2  y  n  2   a3  y  n  3 

b2 ( s^2) = 8.4656e-010
b1 ( s ) = 5.81914e-005
b0 = 1

a3 ( s^3) = 2.94311e-016
a2 ( s^2) = 1.07374e-010
a1 ( s ) = 9.79329e-006
a0 = 0

Compensator (Digital):
--------------------------------------

b0 = 3.54492
b1 = -2.625
b2 = -3.48438
b3 = 2.68359

a0 = 1
a1 = -1.92383
a2 = 1.13672
a3 = -0.212891

SmartCtrl 111
Graphic and text panels

OUTPUT DATA PANEL – Digital control (Cont I)

Text shown in the panel Description


Sensor:
--------------------------------------

Ra (Ohms) = 30.3413
Rb (Ohms) = 94.8168

Pa (Watts) = 21.0933 m
Pb (Watts) = 65.9166 m

Loop performance parameters:


--------------------------------------

PhF ( Hz ) = 2.63194 k
GM ( dB ) = -36.5853
Atte( dB ) = 2.73095

112 SmartCtrl
Solutionss Map

Cha
apter 11
1: Solu
utions M
Maps

The aappropriate selection of


o fcross and P
PM is one of
o the key isssues for looop optimizaation.
In orrder to easee the first attempt
a wheen designinng a controll loop, an eestimation of o the
stablle solutions space has been develooped underr the name of o solutionss map. Baseed on
the sselected plaant, sensor and type oof regulatorr, the soluttions map pprovides a “safe
operaating area” of the different combinnations of fcross
c and PM
M that lead too stable sysstems.
The ttwo parameeters involveed are repreesented as PM
P vs frequency.
 Just by clicking
c with
hin the whitte area, a seet of (fcross and
a PM) thaat lead to an
n
stable soolution is selected.
 The inpuut boxes (wh
hite backgroound) are au
utomatically
y updated
 And so is
i the attenu
uation achievved at fsw box. It is an output paraameter (grey
y
backgrouund) and reppresents thee attenuation
n achieved by the openn loop at thee
switchinng frequency
y.
Addiitionally, whhen any of the three afforementionned values is uncommoonly low or high,
the bboxes backgground is red
d-colored inn order to drraw the designer attenttion.

Boun
ndaries
The bboundaries,, that determ
mine the vaalid area (white area), represent
r thhe maximum
m and
minim
mum phasee margin thaat can be achhieved for any
a kind of compensatoor.
 The simpple integrato
or is a parti cular case of
o any regullator, therefo
fore it provides
the loweer PM limit by adding 990 degrees to t the phasee of the openn loop transsfer
function without reggulator (plan
ant, sensor and
a modulattor) (green lline).
 The uppeer limit of the solution map is giveen by the maximum
m phhase boost
providedd by each kiind of comppensator (bluue line).
In terrms of frequuency, the solutions
s sppace is limited by the sw
witching freequency, fsww.

Sma
artCtrl 113
Solutions Map

When the first design point has been selected within the “Solution Map”, SmartCtrl
shows its main screen. In the main screen the solutions Map will be shown as a floating
window. The position of this window can be changed by the user by right clicking on
the Solution Map window plus mouse move. Important Warning messages will be
shown in the bottom part of the Solution Map window.

114 SmartCtrl
Equations editor

Chapter 12: Equations editor

The definition of the desired transfer function can be carried out by means of the definition of 
the algebraic s‐domain transfer function. 
First, the user must define the s‐domain transfer function, choosing amongst two different 
options: 
 Import a previous design (click on open) 
 Define a new transfer function (click on editor). Check the editor rules in the next 
chapter. 
 Additionally, there is a predefined transfer function that can be loaded by clicking on 
"set defaults". 
 
Once the equation has been introduced: 
 Click on "Save" to save the mathematical equations in a text file with extension 
.tromod  
 Click on "compile" to continue Bode plot will appear on the right side of the window.  
  If desired, the frequency response of the transfer function can be exported as a .txt 
file by clicking on "Export transfer function". Afterwards it can be recalled through the 
Import (merge) function and displayed in the bode plot graphic panel. 
If  default  option  "Bode  plot"  is  selected,  the  frequency  response  of  the  previously  defined 
transfer function is shown on the right hand side panels. 

SmartCtrl 115
Equaations editorr

To  check  the  gaain,  phase  and  rectanggular  compo onents  of  th
he  frequenccy  response  at  a 
particcular  frequeency,  the  opption  "One  ffrequency"  is  provided.  As  depictedd  in  the  following 
figuree: first "one  frequency" m must be seleected, secondly the frequ uency shouldd be specifie ed and 
finallyy,  click  on  compile 
c and
d  the  gain,  pphase  and  rectangular 
r componentss  at  the  spe ecified 
frequuency are sho own below. 

116 SmartCtrl
Editor box

Chapter 13: Editor box

Following are detailed the rules of procedure of the editor.


1. There are two types of instructions: assignment and return.
2. Only one instruction per line is permitted (whether it is assignment or return).
3. Blank lines are allowed.
4. Rules for naming variables in assignment instruction:
a. The names must begin with an alphabetic character.
b. The name can be formed of alphabetic or numeric characters, or underscore.
c. The names sqrt, pow, return and PI are reserved names that cannot be used
as variable names.
5. Rules related to mathematical expressions:
a. Valid operator for algebraic expressions are +, -, *, /.
b. Expressions can use grouping parentheses.
c. The available built-in functions are:
sqrt(a) calculates the square root of a
pow(a, b) calculates 'a' raised to 'b'.
d. Algebraic expressions can include the built-in functions.

SmartCtrl 117
Editor box

118 SmartCtrl
Import and export

Chapter 14: Import and export

14.1 Export

14.1.1 Export transfer function


SmartCtrl provide three different exporting options which are available under the export
item of the File Menu. The first of the exporting options is export transfer functions

which is also available through left click on the icon placed in the main toolbar.
Any of the transfer functions available can be exported to a .txt file. To do that, the
designer must select the function to export within the available list and set the options of
the file in the corresponding dialogue box.

The addressed file is formed by three columns containing the frequency vector, the
module in dB and the phase in degrees respectively.
The file options and characteristics are contained in the "Exporting transfer function
dialogue box" and they are described below:

SmartCtrl 119
Import and export

File Header  It contains the name of the three columns of the file.


Export function between  The designer is able to set the frequency range of the
exported transfer function
Number of points  Number of points to be saved in the file

Points will be equi-spaced along a:


Logarithmic scale in the frequency axis
Decimal scale in the frequency axis

Data separated by:


tabs
spaces
commas
14.1.2 Export to PSIM
SmartCtrl provides a link with PSIM software. Once the regulator has been designed,
the power stage and the compensator can be exported to PSIM, providing an automatic
generation of the schematic and/or an exportation of the parameters of the design
performed in SmartCtrl. This schematic can be used to validate the design using PSIM.
In the File Menu, it is available the export option To PSIM. The user can select between
exporting the eschematic, only the parameters file or just update a previously exported
parameters file.

120 SmartCtrl
Import and export

14.1.2.1 Export to PSIM (schematic)


The designer is able to export the parameters of the design to a PSIM schematic that is
automatically generated by the program.
In the first step the user will be asked to select the path and the name of the PSIM file in
which the schematic will be inserted. If the file has not already been created, a new
PSIM file will be created with the name provided by the user.

In the next step, the user will be asked to choose between different options:

SmartCtrl 121
Impoort and expoort

Comp
mpensator exxporting wa
ay

 “Compo
onents (R1, C1, ... aree given)”: the schemaatic and paarameters of
o the
compennsator will be exporteedwith an analog im mplementatiion (Operattional
amplifieer and passsive compponents) lik ke in the following example.C Check
“simulattion issues”” in this seection in orrder to get some tips to speed up
u the
PSIM siimulations. 

122 SmartCtrl
Im
mport and export
e

 “s-domaain coefficieents”: the scchematic an


nd parameters of the com
ompensator will
w
be exporrted in the form
f of PSIIM control blocks,
b like in the folloowing example.

 “z-domaain coefficieents”: the scchematic and parameterrs of the com mpensator will
w
be exporrted in the form
fo of a z-ddomain tran nsfer functioon. Thereforre it is neceessary
to configgure the "Diigital Settinngs" before selecting
s the z-domainn format for
exportatiion to PSIM
M.Besides thhe z-domain transfer fu unction thatt represents the
digital coompensatorr, additionall blocks are added:

o T
Time-delay block: it reppresents thee accumulated delay off the controll loop
m
minus the tim
me delay coorrespondin ng to the mo
odulator, i.e.., the ADC delay
a the calcu
and ulations dellay.

o L
Limiter befo
ore the compparator of th he modulato
or which ennsures that the
d
duty cycle iss at least low
wer than 97
7%.

More infformation ab bout the sim


mulation wiith z-domain
n coefficiennts is provid
ded in
the sectioon Chapter 17: Digital control of this
t documeent.

Note: when
w the selected senssor is "Emb
bedded V.d
div." the sschematic isi not
exportedd to PSIM because thhis sensor is especiallly orientedd to the analog
implemeentation with
h componennts.

Sma
artCtrl 123
Import and export

Power stage and sensors


The schematic and parameters of the power stage and the sensors will be exported.
Initial conditions
The initial voltage across the output capacitor and the initial current through the
inductor will be exported. This way the initial transient of the simulation can be
reduced.

14.1.2.2 Export to PSIM (parameters file)


Only the text file with the necessary parameters will be exported to a PSIM schematic
previously generated. Similarly to the previous option, SmartCtrl will ask the designer
to select the path of the PSIM schematic to which the parameters file must be exported.
Then the designer will have to select the exporting options (regulator exporting way,
power stage and sensors and initial conditions).

14.1.2.3 Update parameters file


Once one of the previously described options has been configured, only the updating of
the existing parameter file is needed. When the designer clicks, the previously inserted
parameter file will be updated automatically.
Simulation issues
14.1.3 Export transient responses
SmartCtrl provides three different exporting options which are available under the
export item of the File Menu. The third of the exporting options is "export transient
functions" which export any of the available transient responses to a file.

124 SmartCtrl
Im
mport and export
e

This option is allso availablle through rright click on


o the transiient responsse graphic panel.
p
The corresponding dialogu ue box is diisplayed bellow. It showws the transsient responnse to
be exxported as well
w as the following
f paarameters:

Time shiftt   The userr is able to set


s a custommized time sshift (in secconds) if
necessarry, and thee transient response will be trranslated
accordinngly along thhe time axiss.
N. off points to b d  SmartCttrl shows thee total numb
be exported ber of pointts of the graaph.

p  Its defauult value is 1 and it meeans that evvery data po


Print step oint will
be exporrted to the file.
f If it is 4,
4 only one out of 4 points will
be savedd. This help ps to reducee the size oof the resulttant file.
The twoo buttons placed at bo oth sides off the pint step
s box
allow to increase (xx2) or decreaase (/2) the print step easily.
e

Clickk Apply to update the parameterss and OK to continue. At this pooint, the pro
ogram
will aask you the name and location
l of tthe file.
14.1
1.4 Export Global.
From
m the File menu
m it is po
ossible to sellect Export Global.

Sma
artCtrl 125
Import and export

This option allows the user to export to text files different information regarding the
design. Depending on the selected information, the text files will have different names,
shown below the corresponding check boxes.

126 SmartCtrl
Import and export

It is possible to export the following information:


 Input and output data of the design.
 Transients: time (s) and magnitude (V or A) of a transient step.
 Transference functions: frequency (Hz), magnitude (dB) and phase (deg) of the
basic transfer functions.
 Additional transfer functions: frequency (Hz), magnitude and phase (deg) of
additional transfer functions, like audiosusceptibility, impedances, etc.
The designer is asked to configure the file format for the transference functions, like in
Export transfer functions.
Finally, the user is asked for the path to save the file/s.
14.1.5 Export waveforms
SmartCtrl provides three different exporting options which are available under the
export item of the File Menu. The third of the exporting options is export waveforms.

Any of the waveforms available can be exported to a .txt file. To do that, the designer
must select the signal to be exported within the available list and set the options of the
file in the corresponding dialogue box.
The addressed file is formed by two columns containing the time in seconds and the
current/voltage instantaneous value, respectively.
The file options and characteristics are described below:

SmartCtrl 127
Import and export

File Header It contains the name of the two columns of the file.

Number of points Number of points to be saved in the file

Time shift (sec) The user is able to set a customized time shift (in seconds) if
necessary, and the transient response will be translated
accordingly along the time axis.

Data separated by: tabs


spaces
commas

14.2 Import (Merge)


Import (Merge) data of another file with the data of the existing file for display. The
curves of these two files will be combined. The Merge function is available within the

File Menu and through click on . Itis oriented to the comparison of frequency
response curves (Bode plots).
The file to be merged with the current one can be either a .tro file, a .txt file or a .fra file.
This is, the comparison of the current file results can be compared with the results
previously saved by the SmartCtrl Program, with any transfer function saved in a .txt
format or with a PSIM frequency AC analysis, respectively.
Neither the .tro file or the .fra file need to be formatted in order to be used by the merge
function. However, if a .txt file is going to be used the following considerations must be
taken into account:
The file must be organized in three columns (from left to right)

128 SmartCtrl
Im
mport and export
e

First coluumn corresp


ponds to thee frequency
y values
Second column
c corrrespond to tthe module in dB
Third column corresspond to thee phase in degrees
d
The firstt line of the file correspponds to thee columns heeadings

The next steps will guide you to addd, modify or o delete traansfer functtions to/from
m the
compparison, eithher from a .tro file or a .txt file.

11. Merge
You can select the Merge function bboth from th
he File Menu or throuugh left clicck on
from
m the main tooolbar.

22. Availablle actions


You can choosee among the following aavailable acctions:

Add Add
 
ds a new traansfer functiion to the co
omparison

odify Mod
Mo  
dify the seettings of a previouslly added tr
transfer fun
nction
(chaange color, ffile of origiin...)

elete  Deleetestheselecctedfunction
De n

eteall  Deleeteallthefunnctions
Dele
A
Apply  plythecurrenntsettings
App
ply the curreent settings and close th
OK  App he merge w
window

Caancel  Closse the Mergge window but


b don't apply any chaange

Help  Disp
playthehelppwindow

14.2
2.1 Add Fun
nction
The Add functiion to merrge allows the user to
o add a neew transfer function to
t the
compparison.
11. SelecttheeFunctionTy
ype

Sma
artCtrl 129
Impoort and expoort

Where::
 G(s) Plant Transfer
Function
 K(s) Sensoor Transfer
Fucntion
 A(s) = G(s))·K(s)
 R(s) Regullator Transffer
Function
 K(s)·R(s)
 T(s) = A(s))·R(s) Open n
loop transffer function
 CL(s) Clossed loop traansfer
function
22. Select thhe color

33. Load funnction from .tro or .txt file


Load funnction from either a .troo file or a teext file (.txt))

44. OK
And the transfer function will be added to
t the modu
ule and phaase panels of
o the
Bode Ploots.

130 SmartCtrl
Im
mport and export
e

14.2
2.2 Modify Function
The Modify funnction allow ws the userr to Modify y the settin
ngs of a preeviously merged
transsfer functionn (change co
olor, file off origin...)
11. Select thee Function too be modifiedd

22. Click on the Modify button


b

33. Modifyseettings

Sma
artCtrl 131
Impoort and expoort

The
T user is able to moddify
the
t followinng parameteers:
 Loadd a new filee
 Chanange the tracce
coloor
However,
H iff the user
modifies
m thee function type,
t
a new file m
must be load ded

132 SmartCtrl
Design meethods

Cha
apter 15
5: Dessign Metthods

The design methhod box is enabled or disabled by


y clicking on
o the icon of theeView
Toollbar.
The ddesign methhod box inccludes the foollowing utiilities:
Desiggn method tags
Eachh tag corresspond to on ne of the tthree differrent design methods aavailable fo
or the
regullator calculaation, this iss:
K-methood
K plus method
m
Manual
Atten
nuation at switching
s frequency
fr
This output boxx displays th
he attenuatiion achieved
d by the op
pen loop tran
ansfer functiion at
the sw
witching freequency.
Solutions map
Baseed on the selected plantt, sensor annd type of reegulator, thee solutions m
map provid
des an
estim
mation if thee stable solu
utions spacee that lead to
t stable sollutions. Thee two param
meters
invollved are reppresented ass PM vs freqquency.

Two change thee considereed cross freequency an nd the phasee margin, tthe designeer can
eitheer change thheir values in
i the whitee-coloured boxes,
b use the
t sliders oor just click
k on a
different point within
w the so
olutions maap.

Sma
artCtrl 133
Desiggn methodss

15.1
1 K‐factorr Method
d
The K factor allow the dessigner to chhoose a partticular open n loop crosss-over frequuency
and pphase margin, and then n determinee the necesssary componnent values to achieve these
resullts. In SmarttCtrl, the reegulator com
mponent vallues are disp
played withhin theresultts text
panel.
The two input parameters of the K factor (fc, PM) can be
b easily chhanged in the
t K
methhod tag of thhe design method
m box.

Theyy can be also modified d by clickinng on the solutions 


s m and thee K method
map d will
recallculate the regulator
r to fit the new values. Rem
member thaat the stable solutions area
a is
the w
white one.

In SmartCtrl it is possiblee to use thhe K metho


od for both
h, the Typee 2 and Ty
ype 3
regullators.
K facctor for Typpe 3 regulattor
A Tyype 3 regulaator is form
med by two zzeroes, two poles and a low frequeency pole. When
W
a Tyype 3 regulaator is chossen, the K factor methhod assumees that a doouble pole and
a a
doubble zero musst be placed
d to design tthe compenssator.
f
 The doubble zero is placed
p at frequency
y
K
 The doubble pole is placed
p at f · K frequeency
Where K is deefined as th quency to tthe double zero
he ratio off the doublle pole freq
frequuency and the frequen ncy f is thee geometricc mean betw
ween the ffrequency of
o the
doubble zero andd the frequen
ncy of the ddouble pole.

134 SmartCtrl
Design methods

So, the maximum open loop phase boost is achieved at frequency f, and it is assumed
that the regulator is designed so that the open loop cross-over occurs at frequency f also.
K factor for Type 2 regulator
A Type 2 regulator is formed by a single zero, a single pole and a low frequency pole.
When a Type 2 regulator is selected the pole and the zero are placed as follows:
f
 The zero is placed at
K
 The pole is placed at f ·K
Where the K factor is defined as the square root of the ratio of the pole frequency to the
zero frequency andf is the geometric mean of the zero frequency and the pole frequency.
The maximum phase boost from the zero-pole pair occurs at frequency f, and it is
assumed that the regulator is designed so that the open loop cross-over occurs at
frequency f also.

15.2 Kplus Method


The Kplus method is based on the K‐factor and the inputs are the same:
 The desired cross-over frequency (fc)
 The target phase margin (PM)
However, unlike K-factor method, cross-over frequency is no longer the geometric
mean of the zeroes and the poles frequencies.
The Kplus method provides an additional design freedom degree with respect to the
conventional Kfactor method, since the Kplus method places the double zero frequency
f
fz a factor “α” below fcross ( f Z  C ) and the poles a factor “β” above fcross ( f Z  fC · ).

Where “α” is set from fcross and phase margin. This parameter allows the designer to
select the exact frequency in which the zeroes will be placed. After that, “β” is
automatically calculated.
The additional degree of freedom obtained with Kplus can be used as follows:
 If “α” is set to be lower than K (from the K-factor method), higher gain at low
frequencies but less attenuation at switching frequency (fsw) are obtained.
 On the contrary, if “α” is set higher than K (from the K-factor method), the
control loop has less gain at low frequency but more attenuation at fsw. It should
be remarked that the phase margin is the same in all cases.
 When “α” is equal to K, both methods are equivalent.
Therefore, the Kplus method can be used to improve the overall performance of the
control loop in those cases where a slightly larger high frequency ripple could be
admitted at the input of the PWM modulator.

SmartCtrl 135
Desiggn methodss

In thhe same wayy as the K method, whhen the Kp plus tag is selected,
s thee user can easily
e
channge the input parametters, phase margin an nd cross-ov ver frequenccy And alsso an
addittional param
meter, Kpluss, which corrresponds to
o the aforem
mentioned ““α” factor.

Theyy can also be


b modified by clickingg on the solutions map p and the Kpplus method d will
recallculate the regulator
r to fit the new values. Rem
member thaat the stable solutions area
a is
the w
white one.

15.3
3 Manuall
This method alllows placingg poles andd zeroes ind
dependentlyy from eachh other. It iss used
whenn the desiggner would like to reffine the ressults obtain
ned from thhe K and KplusK
methhods or wheen these auto
omatic methhods do nott provide a valid
v solutioon.
The manual meethod is provided for bboth the typ
pe 3 and typ pe 2 regulat
ators. Their poles
and zeroes freqquencies can
n be variedd by directlly dragging
g and droppping them ini the
Bodee plots.
Or tyyping the frequencies
f of poles aand zeroes in corresp
ponding inpput boxes of
o the
desiggn methods box.

In the casse of a Typ


pe 3 regulattor, the desiigner can ad
djust
the frequuency valuess of:
 T
The two zero
oes,
 T
The two polees
 And the low frequency pole
A

In the casse of a Typ


pe 2 regulattor, the avaiilable
frequenccies are:
 T
The zero
   T
The pole
 A
And the low frequency pole

136 SmartCtrl
Design methods

15.4 PI tuning
The PI tuning method input parameters are the same as in the K-factor method:
 Phase margin
 Cross-over frequency
From these two input parameters, SmartCtrl calculates the both the proportional (Kp)
and integral (Kint) gains and shows them in the corresponding output boxes.

The same as in the other automatic calculation methods, the phase margin and cross-
over frequency can be set directly by clicking in the solutions map.

Additionally, there is a Kp and Ti Solution Map that allows the tuning of the PI
regulator by directly tuning its parameters Kp and Ti.
A Proportional Integral controller(PI) is defined by the following transfer function:

1  Ti·s  Kp :is the Gain of the PI controller.


G( s)  Kp · where 
Ti·s Ti :is the time constant of the PI controller, in seconds.
The constant time Ti is located on the x-axis of the graphic and the gain Kp is placed on
the y-axis. Any change will involve an instantaneous update of the rest of the windows
of the graphic panel, as well as in the solution map.
Every point in the recommended area of the Solution Mapbox has an equivalent point in
the Kp and Ti Solution Map control box, which is also expected to be stable.
However, several points of the Kp and Ti Solution Map control box might correspond
to an unique point in the Solution Map.

SmartCtrl 137
Desiggn methodss

Sincee there manny possible combinatioons of Kp and


a Ti that lead to a coompensatorr with
the ssame dynammic performmance, somee areas of the
t Kp and d Ti Solutioon Map co ontrol
box hhave been coloredin
c orrder to avoidd a complex
x definition of the relattionship bettween
pointts of theKp and Ti Sollution Map p control boox and Solution Mapboox.
The rrecommendded design space
s corressponds to th
he white areea in betweeen the green and
the bblue lines. These
T liness represent the limits of
o the set ofo Kp and T Ti variables that
correespond to feasible
fe PI regulators.
r The rest off colored reegions repreesent a weighted
averaage of gainn margin, ph hase marginn and attennuation. Red d region haas to be avooided.
Yelloow and pinnk area in between
b thee green andd the blue lines
l corresp
spond to feaasible
comppensators which
w attenuuation at swiitching freq
quency is hig gher than 0 dB.

15.5
5 Single P
Pole tunin
ng
The I tuning meethod is the equivalent oof the manu b for integgral regulattors.
ual method but
The simple integrator is formed by a single pole, which freq quency musst be selected by
the ddesigner. Given
G this frequency,, the assocciated phase margin iis automatically
calcuulated by the program.

The solutions map


m of an in ntegrator is a single lin
ne that repreesents the aaddition of 90º
9 to
the oopen loop without
w regu
ulator transsfer function n. So, the designer
d cann also deterrmine
the ccross-over frequency
fr by he same waay as in the other
y clicking iin the solutiions map, th
desiggn methods..

138 SmartCtrl
Parametric sweep

Chapter 16: Parametric Sweep

The parametric sweep can be accessed either through the Data  Menu or the View 
Toolbar icons. The SmartCtrl program distinguish among two different parametric
sweeps:

Input Parameters Parametric Sweep .


It allows the variation of all the input parameters of the system. These are:
 General Data
 Plant
 Sensor
 Regulator

Compensator Components Parametric Sweep .


It allows to vary the component values of the compensator. This is, the resistances and
capacitances that conform the regulator.

16.1 Input Parameters Parametric


To access the input parameters parametric sweep the user can either click must click on

the button , placed within the View toolbaror through the Data Menu > Parametric
Sweep > Input parameters.

The functions available within the input parameters parametric sweep are the following:
Loop to be modified Select which loop would you like to modify. This
option is only available in the case of a double
loop design, where the designer can select
amongst the inner loop or the outer loop
Tick box "calculate regulator" When this box is selected, the regulator is
recalculated for each new set of parameters along
the parametric sweep. If it is not selected, the
regulator is fixed to the last one calculated

Loop to be shown Select which loop results would you like to


display. This option is only available in the case of
a double loop design, where the designer can
select amongst the inner loop or the outer loop.
The parameters to be varied are related to the open
loop parameters. The designer is asked to provide
a range of variation. The available parameters are:
 Cross Frequency (Hz)
 Phase Margin (º)

SmartCtrl 139
Parametric Sweep

Tag "General Data" 
The parameters to be varied are related to the
open loop parameters. The designer is asked
to provide a range of variation. The available
parameters are:
 Cross Frequency (Hz)

 Phase Margin (º)

Tag "Plant" 

The parameters available for variation are


related to the plant input parameters. The user
must introduce a minimum and a maximum
value for the variable selected, in order to
provide its range of variation. Only one
parameter can be varied at a time

140 SmartCtrl
Parametric sweep

Tag "Sensor" 

Two different sensor are available for variation. The voltage divider and the Hall effect
sensor. The parameter to be varied in the voltage divider is its voltage gain (Vref/Vo). In
the case of the Hall effect sensor there are to available parameters: its gain at 0Hz and
the pole frequency.

SmartCtrl 141
Parametric Sweep

Tag "Compensator"

The parameters available correspond to the


modulator gain and the Resistor R11.

142 SmartCtrl
Parametric sweep

16.2 Compensator Components Parametric Sweep


To access the compensator components parametric sweep the user can either click on

the button , placed within the view toolbar or through the Data Menu > Parametric
Sweep >Compensator components.
The compensator components parametric sweep is oriented to the variation of the
resistances and capacitances values that conform the regulator. The parametric sweep is
available for Type 3 and Type2 regulators. For instance, in the figure below a
parametric sweep window for a type 2 is shown.

SmartCtrl 143
Parametric Sweep

144 SmartCtrl
Digital co
ontrol

Cha
apter 17
7: Dig
gital con
ntrol

The D
Digital conttrol feature is only avaiilable in thee SmartCtrl 2.0 Pro

17.1
1 Introdu
uction to Digital C
Control
Digittal control module of SmartCtrrl allows calculating
c the coefficcients of digital
d
comppensators inn order to be implem
mented by means
m of digital
d deviices (as specific
hardwware in FPGA or ASIIC, or as a program in
n a microprrocessor, mmicrocontrolller or
DSP)).
Digittal regulatoors are obtaained by diiscretization
n of analog
g compensaators, which are
calcuulated follow
wing the an
nalog approaach of SmarrtCrtl.
Three specifics factors are taken
t into aaccount on digital
d contrrol calculatiions:
 Sampling frequency
y of the reguulator.
 Number of bits to reepresent in ffixed point the coefficiients of the obtained
compenssators.
 Overall time
t delay in
i the controol loop.
It is a good pracctice to com
mpare the diiscretized compensator
c r with the ooriginal analogue
one.

17.2
2 Digital S
Settings

Pushh in the iconn of thee main toolbbar to start the


t calculation of the ddigital regullators.
This option is ennabled afterr the calculaation of an analog regu
ulator. Digittal regulators are
calcuulated in SmartCtrl by y discretizaation of an nalog regulaators usingg the bilineear or
Tustiin transform
mation.

When starting the calculaations of ddigital regu ulators, threee specific parameterrs are
requiired: sampliing frequency, bits num
mber and acccumulated delay(s).

Sma
artCtrl 145
Digital control

Sampling frequency. It is the sampling frequency of the digital regulator. The


sampling period Tsamp=1/fsamp is the time between two consecutive samples of the
output signal of the regulator.
In many applications, the sampling frequency (fsamp) of the regulator is equal to the
switching frequency (fsw) of the power converter. In SmartCtrl the user can select
different values for switching and sampling frequency, but the sampling frequency
must be a multiple or submultiple of the switching frequency.This parameter is used
to calculate the digital regulator by means of discretization of the analog regulator.
In current loops, the controlled quantity in the converter has a significant ripple.
Therefore, it is recommended to use a Hall Effect sensor that includes a first order low
pass filter that can act as an antialiasing filter.
Bits number. It is the number of bits used to represent the coefficients of the digital
compensator considering a fixed point representation. The obtained coefficients are
rounded to the nearest number that can be represented with the specified number of bits.
One bit is used to represent the sign, and the rest to represent the integer part and the
decimal part.
A low number of bits can result in a digital regulator significantly different from the
analog regulator. It is recommended to check the similarity between the analog and
digital regulator. If analog and digital responses are too much different, especially at
low and medium frequencies, it is recommended to increase the “Bits number”.
Accumulated delay(s). It represents the total time delay in the control loop (modulator
delay, calculation delay, ADC delay, etc).
This delay affects the actual phase margin obtained with the designed digital regulator.
The delay is a negative phase that is subtracted to the phase of the open loop transfer
function in the Bode plot. As the original (analog) regulator is calculated without
considering the time delay, the obtained phase margin will be lower than the obtained in
the analog regulator. This phase margin loss can be compensated by selecting a higher
phase margin in the specification of the analog regulator.
It is recommended to check the effect of the delay in the Bode plot of the open loop
transfer function and the closed loop transfer function. The accumulated delay is not
represented in the Bode plot of the discretized compensator.
When exporting a design of SmartCtrl to PSIM, a time delay block appears in the
schematic, to take into account the different time delays of the control loop. This time
delay block represents only the ADC delay and calculation delay, since the modulator
delay is included in the behavior of the implemented PWM modulator. Therefore, the
“accumulated delay” specified by the user must be equal at least to the modulator delay.
Otherwise, inaccurate simulation results may be obtained. For the trailing edge
modulator used in the proposed PSIM circuit, the time delay due to the modulator tpwm
is:
tpwm=DutyCycle/fsw - floor(DutyCycle*fsamp/fsw)/fsamp if fsamp>=fsw

146 SmartCtrl
Digital co
ontrol

tpwm
m=DutyCyccle/fsw + (fssw/fsamp-1))/2/fsw if fsamp<
<fsw

17.3
3 Parame
etric sweep in diggital control
The three specific parametters of digiital regulato
ors can be swept:
s samp
mpling frequ
uency,
numbber of bits and
a accumuulated time ddelay.
A waarning box informs thee user abouut limit cyclling. From the four coonditions off limit
cycliing referredd in the tech
hnical literatture [1], [2]], the two depending ollny the regu
ulator
calcuulation are considered.
c

Integgral gain and gain margin


m are eevaluated and
a warninng appears in case off non
comppliance of thhe limit cyccling condittions [1], [2
2].When a warning
w apppears, if thee limit
cycliing effect neeeds to be removed, reddesign of thhe regulator needs to bee done.
When limit cyclling can occcur becausee a too low gain margin n, it must bbe increased
d. It is
sugggested to inccrease the deesired phasee margin in order to achieve a highher gain maargin.
When limit cyccling can occuro becauuse a too high
h integrral gain, it is suggested to
decreease the dessired cross over
o frequenncy in orderr to need a lower
l integrral gain.

Sma
artCtrl 147
Digittal control

[1] A
A.V.Peterchhev, S.R.San
nders, “Quaantization reesolution an
nd limit cyccling in dig
gitally
contrrolled PWMM converterrs,” IEEE TTransactionns on Poweer Electroniics, Volum me 18,
No.1, Jan. 2003, pp.301-30
08
[2] H
H.Peng; D.M Maksimovicc, A.Prodic,, E.Alarcon
n, “Modelin
ng of quantiization effects in
digitaally controllled DC-DC
C converterss,” IEEE PE
ESC 2004, pp.4312-431
p 18.

Integgral gain and gain margin


m are eevaluated and
a ng appears in case off non
warnin
comppliance of the limit cycling
c connditions (reeferences 1 and 2). W
When a waarning
appears, if the limit cyclin
ng effect neeeds to be removed, redesign
r off the regulaator is
recommmended.
References:
(1) A
A.V.Peterchhev, S.R.San
nders, “Quaantization reesolution an
nd limit cyccling in dig
gitally
contrrolled PWMM converterrs,” IEEE TTransactionns on Poweer Electroniics, Volum me 18,
No.1, Jan. 2003, pp.301-30
08
(2) H
H.Peng; D.M Maksimovicc, A.Prodic,, E.Alarcon
n, “Modelin
ng of quantiization effects in
digitaally controllled DC-DC
C converterss,” IEEE PE
ESC 2004, pp.4312-431
p 18

17.4
4 Simulattion issue
es with d
digital con
ntrol
When a digital controller design is e xported to PSIM in order to be simulated, some
consiiderations should
s be taken
t into account. Inn some cases there m may appear some
probllems with the start of the
t converteer. One possible solutio on to be useed it to incllude a
limitter block just after the z-domain bblock, whicch values arre in the casse of singlee loop
contrrol (see nexxt figure):
• Upper lim
mit: 0.97*V
Vp-Vref
• Lower limit: -Vref

148 SmartCtrl
Digital control

In the case of double loop control, this additional limiter can be added both in the inner
control loop and/or in the outer control loop. In the case of the outer control loop de
limits suggested for the limiter are:
• Upper limit: 5-Vref
• Lower limit: -Vref
In the case of inner control loop, the reference is not fixed. It is suggested to start with
these limits:
• Upper limit: 0.97*Vp
• Lower limit: -5

SmartCtrl 149
Digital control

150 SmartCtrl
Frequency settings

Chapter 18: Frequency settings

This option is available within the Tools Menu -> Settings.


It allows defining the minimum and maximum frequency of the range to be considered
in the calculation of the Bode plots, solutions map, etc.

SmartCtrl 151
Frequency settings

152 SmartCtrl
Layout settings

Chapter 19: Layout settings

This option is available within the Tools Menu -> Settings.


It allows the user to define whether or not the graphic and text panels will be restored to
their default size and appearance after the following two actions:
 After loading a new document
 After any modification on the solutions map

SmartCtrl 153