Frequently Asked Question
Press "Ctrl + F" to find the keyword of your interest.
If you wish to have a direct link access to the video timestamps, please follow these instructions.
Found this video helpful? Why not take the whole HIL Specialist course? A Certificate is waiting for you for free at HIL Academy.
Would you or your organization benefit from having these videos narrated in your native language? Contact us and let us know if you wish to contribute.
Hello and welcome to the Converter controllesson.
In this lesson, we ll cover the differentways you can control converter models, and
we ll explain how to set up and use the differentcontrol methods.
There are four main control options whichcan be used for converters in our software.
The first one Digital input per switch isavailable for every converter in our converter
The other control options Digital input perleg, Internal modulator, and Model control
are available for most converters.
You can select the control method in the propertieswindow of each converter by changing the Control
When changed, the rest of the properties inthe window will be updated according to the
control option you ve selected.
If a converter can only be controlled by Digitalinput per switch, the Control property will
not be accessible.
Let s start by going through the first convertercontrol option Digital input per switch.
As the name suggests, this control optionrelies on external digital signals, which
are usually provided by a hardware controlleror another external control device.
To use your converter in a Controller-Hardware-in-the-loopconfiguration, you have to connect your hardware
controller to the HIL device.
You can identify the appropriate digital inputson the HIL device by referencing the IO pinout
in the Materials tab.
For each converter, all available switchesare listed under General properties.
Each switch must correspond to the specificdigital input where the gate drive signal
will be sent.
Notice that switches have specific name designations,which can inform you of their position in
the converter topology.
If you are unsure about the position of aswitch in a converter topology, pressing the
Help button for the converter will lead youto that converter s documentation.
There you will find all relevant information,including the topology schematic.
The final part of setting up Gate drive signalsis defining their active state logic meaning
we define whether the switch will be on whenthe gate drive signal is high or when it is
You can set the desired logic for each switchin the drop-down menu on the right side of
the property window.
In addition to gate drive signals, we canconnect an additional digital signal which
will enable or disable the gate control ofthe converter.
The next control option is digital input perleg.
Assuming the gate drive signals of a givenleg are complementary, meaning when the top
switch of the leg is on the bottom is offand vice versa, this pair of switches can
be controlled using only one digital signal.
The advantage of this control method is thatyou can reduce the number of digital signals
required for controlling the converter.
The hardware setup procedure is the same asit is for the digital input per switch control
The difference is that now we only configureone digital input for each leg.
By default, high-switching logic is used.
This means that the active digital input turnson the top switch of the leg while turning
off the bottom switch and vice versa.
In addition, we have to define the dead timeduration.
This ensures that the top and bottom switcheswill not conduct at the same time.
To precisely measure dead time, a PWM Channelis needed.
It s important to consider this when estimatinghow many converters can fit on one device;
when we use this control option, we need tobe aware of PWM Channels utilization in addition
to Power Electronics Converters utilization.
The Switching enabled property is also availablefor this control option, as it is with the
digital input per switch control option.
This allows us to enable or disable the gatedrive control according to a selected digital
The two control options we ve covered so farare used to control converters from external
The next two control options are typicallyused when developing the entire control algorithm
inside the model, though these can be usedfor external control as well in some specific
The first control option of this kind is Internalmodulator control.
This control option is primarily used whena converter is controlled from inside the
When you select Internal modulator control,the converter component will display input
ports for the reference signals, as well asan additional input for a signal which will
enable the converter.
The number of inputs for reference signalsdepends on the number of legs of the converter.
Internal modulator control utilizes a HILhardware resource called PWM Channels.
This hardware resource was presented in lesson3.1 Model mapping, where it is explained that
there is a limited number of PWM channelsavailable to us in the model.
The PWM Channels resource is a multi-channelPWM modulator with a dead time generator and
a symmetrical triangular carrier with frequencyranging from 100 Hz to 500 kHz.
It has a dedicated slot on the FPGA, and itoperates at the frequency of the device s
clock, which is 160 MHz for most devices.
For the newest generation of HIL devices theHIL606 and HIL404 the clock frequency is 280
There are multiple components that can utilizethe PWM Channels resource.
The first is a converter with the digitalinput per leg control option, as mentioned.
The second is a converter with the internalmodulator control option.
Last is the PWM Modulator component, whichwill be discussed at the end of this lesson.
When we use the internal modulator controloption, reference signals are provided to
the converter, while the carrier signal isgenerated by the PWM Channels resource.
Based on the comparison of the two, the GDSsignals are generated.
[slide 10]When the control option is set to Internal
modulator, general properties of the convertercorrespond to characteristics of the carrier
As you can see in the properties window, youfirst define whether the carrier signal has
a fixed or variable frequency.
If the carrier frequency is fixed, you canset it directly in the property window.
If the carrier frequency is variable, youcan provide its value externally using the
additional input created on the convertercomponent.
This enables the use of control algorithmthat require the control frequency to change
in real time.
A component with an additional input for thecarrier frequency is shown below the General
The generated PWM signals also have a deadtime period that can be configured by adjusting
the Dead time period property.
Other properties are carrier phase offsetand maximum and minimum of the reference signal.
These parameters are visually explained onthe picture below.
The carrier phase offset is an angle of phasedisplacement, in degrees, of the carrier signal.
Maximum and minimum of the reference signalsare the maximum and minimum values of the
Some converters with the internal modulatorcontrol option, such as the IGBT Leg and Single-Phase
Inverter, can also have variable carrier phaseoffset.
If this option is selected, an additionalinput will appear on the converter for the
This feature is useful when a control techniqueis based on changing phase offset between
carrier signals, such as Phase Shift modulation.
Let s now move on to the last available controloption Model control.
When the control option is set to Model, asignal processing input is created at the
top of the component.
This input receives a vector of control signalsfor all of the converter switches.
This slide shows a Three phase inverter withthe control option set as Model.
Since the converter receives the control signalsin vector form, the individual control signals
for each switch are concatenated using a Busjoin component.
Control signals in the vector must be sortedin the same order as they are presented in
the properties window when the selected controloption is Digital input per switch.
One advantage of this control option is that,in addition to creating your own custom control
algorithm, you can design your own carriersignal.
This functionality is not fully possible whenusing internal modulator control.
In addition, the Model control option is usefulfor control algorithms where you directly
control the states of the converter switches,such as Finite Control Set-Model Predictive
The primary disadvantage of the Model controloption is that the execution rate of the control
algorithm is limited by the capabilities ofthe CPU.
Depending on complexity, control algorithmsmay not be able to execute at a rate faster
than 20 to 100 ?s.
This also depends on the HIL device used,since the HIL404 and HIL606 have greater CPU
capabilities than devices from previous generations,and can perform signal processing computations
much faster than other devices.
When Pulse-width modulation is used, an executionrate of 20 to 100 ?s may be insufficient to
generate high frequency Carrier signals withadequate resolution.
Therefore, it is highly recommended to usethe Internal modulator control option for
carrier-based modulations such as the Pulsewidth modulation technique, especially for
switching frequencies over 10 kHz.
We have now reviewed every available controloption.
For more information and a more comprehensiveexplanation of the control options, please
refer to the Converters documentation listedin Materials tab.
Now, let s cover some topics that are closelyrelated to the converter control options.
First, let s discuss PWM modulator component.
As mentioned previously in this lesson, thePWM modulator is one of the three components
in the Typhoon software which utilizes thePWM Channels resource.
In most power electronics applications, theHIL device is used to simulate converters.
What may be less obvious is that the HIL devicecan be used as a controller for a real, physical
converter as well.
With this purpose in mind, the PWM modulatorwas made available to Typhoon users as a standalone
It uses the same hardware resources as theInternal Modulator inside converter components,
but it allows access the PWM signals directlyin SCADA and at the HIL device s digital outputs
without expending resources on a convertermodel.
The properties of the PWM Modulator matchthose of a converter with the Internal modulator
However, when using the PWM Modulator, wecan increase the number of PWM channels up
This means that we can have up to 12 carriersignals generated in the PWM Channels component,
all of which can have separate variable frequenciesor phase offsets.
If you are interested in a more comprehensiveexplanation of the PWM Modulator and its properties,
please refer to its documentation, which islinked in the Materials tab.
While Typhoon developers are working on addingthe internal modulator control option to every
converter in the converter library, some convertercomponents don t yet support this.
In these cases, it is possible to use an alternativemethod that consists of looping back control
signals to the converter from the PWM Modulatorcomponent.
A comprehensive explanation of this techniquecan be found on the FAQ article What should
I do if a converter does not have an internalmodulator? , which is linked in the Materials
Before finishing this lesson, there are twoadditional features worth mentioning.
The first is C code export.
If you have developed a controller model usingsignal processing inside of Typhoon HIL software,
you are able to export the controller modelas C code.
This allows you to deploy the controller codeonto a C-based development environment, like
many microcontroller platforms.
If you are interested in this, please takea look at our tutorial - How to Export Generic
ANSI C Code, listed in the video description.
The second feature is related to the Internalmodulator control option.
Although the Internal modulator control optionis primarily used when controllers are being
developed inside the model, you can also interfacean external, high-level controller this way.
For example, a PLC controller may be runningcontrol loops and outputting analog reference
These reference signals can be read by themodel using Analog inputs and provided directly
to a converter with Internal modulator controloption.
This concludes the lesson on converter controlmethods and techniques.
The next lesson series will cover additionalfeatures of converter models.
Thank you for your attention.