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! Welcome to the module about converter features.
In previous lessons, we focused on the pre-built converter models and the ways
they can be controlled. For the lessons in this 4.3 module, we will highlight some
specific features that help us to simulate converters in real-time with high accuracy.
We will cover the following topics: gate-drive signal oversampling,
switching delay, dead-time violation detection, power loss calculation, and forward voltage drop.
Let's start by learning about GDS oversampling.First of all, GDS stands for gate-drive signals,
which are the PWM digital inputs responsible for driving the switches of the converter.
You can see an example GDS waveform here.In this example, there is no oversampling,
meaning that the GDS is sampled only at the simulation time steps,
which are identified as k, k plus 1, and so on.To understand why GDS oversampling is an important
feature, let us first define what effective resolution is.
Effective resolution is the maximum PWM resolution that the HIL device sees, and can be calculated
by the following formula, where f-PWM is the PWM frequency and Ts is the sampling period.
For example, consider a PWM signal with a resolution of 16 bits.
This means that there are more than 65 thousand possible values for the duty cycle.
However, what happens if we have a simulation running with a PWM frequency of 20 kilohertz and
a GDS sampling period equal to the simulation time step, let s say, 1 micro-second?
Using the formula, we find that the effective resolution would be limited to less than 6 bits.
As a consequence, instead of seeing the 65 thousand possible duty cycle values,
the HIL device would only be able to distinguish about 50 values, introducing sampling errors that
could lead to imprecise simulation results.To further illustrate that, consider the
following case, where the GDS input is sampled only at the beginning of each simulation step.
Once again, the simulation time steps are identified by k, k plus 1, k plus 2, and so on.
In the top figure, we consider that the state of the GDS signal,
labelled here as the green digital input DI, changed right before the sampling instant k.
Therefore, the respective change in the state variables, shown by the blue X line,
can be seen only in the next simulation time step, after the state space, or SS calculations.
On the other hand, the bottom figure shows a case where the GDS signal changed right after
the sampling instant k. This change can only be observed by the model at the next sampling,
k plus 1, and the respective change in the state variables will be seen only at k plus 2.
These two cases show that when the GDS sampling period is equal to the simulation time step,
there will be a variable sampling error and a variable computational latency,
in the range of 1 to 2 simulation time steps.
To highlight the effects of insufficient sampling resolution in a practical application,
let's consider a boost converter driven by a controller with a constant duty cycle and a
switching frequency of 80 kilohertz. The converter is simulated in real-time using a Typhoon HIL402
device with a 500 nanoseconds simulation time step. The GDS oversampling feature is disabled,
meaning that the GDS sampling period and time step are both equal.
Applying the formula shown earlier, we see that for this case we have an effective resolution
of less than 5 bits. This low-resolution leads to errors in GDS sampling, which
translates to imprecise duty cycle detection. The result is the undesired low frequency fluctuation
of converter states that we see in this figure.In offline simulations, these outcomes could be
mitigated by using variable step solvers or reducing the simulation time step at
the expense of longer execution times. However, these are not viable for real-time simulators,
so we need an alternative method to enhance the sampled GDS time resolution.
In order to reduce GDS sampling error and to meet high accuracy requirements with limited
simulation step sizes, time resolution can be improved by using different strategies.
Let s now talk about the first one: Global GDS Oversampling.
In this approach, the idea is to sample the PWM signals multiple times within one simulation step,
which can significantly reduce sampling errors. Also, the gate input transitions are time stamped,
meaning that the time of the GDS transition is precisely captured, and then used to
compensate the state variables of the model.So, let s take as an example the following figure,
where there is a change in the digital input between simulation steps k and k+1.
We can summarize the Global GDS Oversampling method by the following three steps.
First, the GDS is sampled multiple times within a simulation step. The instant when the change
in the digital input occurs, it is identified and timestamped. Then, in the next simulation step,
from k+1 to k+2, the state space calculations are performed without acknowledging that the GDS
input has changed. Finally, from k+2 to k+3, the state variables are compensated based on
the timestamped value, and at k+3 the model is updated with the accurate state values.
To illustrate the improvements on simulation accuracy obtained with the Global GDS
Oversampling method, let s consider again the same boost converter example shown previously,
with a constant duty cycle and a switching frequency of 80 kilohertz.
Once again, the converter is simulated in real-time using the Typhoon HIL402 device,
with simulation time step equal to 500 nanoseconds. However, the Global GDS
Oversampling feature is now enabled, and the GDS sampling period is much lower,
equal to 6.25 nanoseconds, leading to an effective PWM resolution of about 10 bits.
From the results, now we can clearly see that, with the improved GDS sampling resolution,
the low frequency fluctuations are mitigated, leading to the expected behavior.
As shown in the previous slides, the Global GDS Oversampling method can
significantly improve effective PWM resolution and therefore extend the
range of switching frequencies that can be simulated in real-time with high accuracy.
Nevertheless, this method does require additional computational load and add an additional latency
of one simulation time step, which is dedicated for the compensation of state variables.
Moreover, only one GDS transition can be handled per simulation step within the same core,
meaning that only the first observed GDS transition will be compensated.
In cases where more than one GDS transition is likely to happen within a simulation time step,
a higher accuracy can be obtained by employing the next oversampling method.
Let s now talk about the second method: Switch-level GDS Oversampling.
Switch-level GDS Oversampling is implemented at the component level as opposed to the core level.
This means that, instead of relying on the compensation of all the state variables after
the GDS transition is identified, it restructures the switch model, and the oversampling is
applied to every switch separately.For that, the switching transitions of
every externally commuted switch are modeled by means of controlled voltage and current sources,
whose values are defined considering the average values of the GDS over the simulation time step.
These average values are calculated based on the oversampling of the digital inputs,
as shown in this figure and in the equation. Therefore, if the GDS resolution is high enough,
it is possible to compensate all GDS transitions within that simulation step.
Moreover, since the simulation step period is small in comparison to the switching period,
the switching ripple will be preserved.It is important to notice that, although a
large variety of models work well with Global GDS Oversampling, the Switch-level GDS Oversampling
method is indicated for those applications that rely on high switching frequencies
and where more than one GDS transition often happen during one simulation step, such as the
dual active bridge and resonant converters.Nevertheless, it also includes a delay of one
simulation step between GDS inputs and the state outputs. Moreover, since the
switch model must be restructured including controlled sources and diodes, this method
is more complex and computationally expensive than the Global GDS Oversampling approach.
As an example of real-time simulation employing the switch-level GDS Oversampling method,
let us consider a dual active bridge converter operating in open-loop,
using a two-level modulation with phase shift and fixed duty cycle.
The modulation is implemented in an external DSP with a switching frequency set to 250 kilohertz.
The real-time simulation is performed using Typhoon HIL404 device,
with a simulation time step of 250 nano seconds and GDS oversampling period of 3.5 nano seconds.
First, let s consider operation with a phase shift of 50 degrees.
The figure on the left shows the current through the series inductor on the top,
while in the bottom we can see the voltages at the primary and secondary of the transformer.
It s clear that these switching voltages are not pure square waveforms, but instead
they actually include the effect of the average GDS calculated within the simulation time step.
Therefore, by employing the Switch-level GDS Oversampling method, it is possible
to achieve real-time simulation results with high precision for demanding high
switching frequency applications, such as a dual active bridge, or DAB converter.
To better illustrate the overall accuracy of the simulation in different operation points,
the figure on the right shows the average output power as a function of the phase shift angle.
As a reference, the theoretical output power is also plotted,
confirming that a simulation using Switch-level GDS oversampling can
follow the theoretical curve with good precision for the entire range.
To see Switch-level GDS Oversampling in action, please check the 200 kHz
DAB tutorial available on our website. The link is available in the Materials tab.
Now, to conclude this lesson, let s see how the different oversampling methods can be configured
in your Typhoon HIL simulation. For that, let s create a new model in Schematic Editor.
First of all, it is important to recall that the oversampling resolution depends on the
device that you are using. For instance, HIL404 and HIL606 devices have a GDS sampling period
of 3.5 nano seconds. You can find out more information about that in the documentation
link available in the Materials tab.Let s choose HIL404 with configuration
1 for this demonstration.Global GDS Oversampling is supported
by all Typhoon HIL devices, and it is enabled by default when you create a new schematic.
If you want to disable oversampling, you can do so by unchecking the appropriate box in the circuit
solver settings tab of the model settings.Nevertheless, keep in mind that GDS
oversampling is highly recommended for switching frequencies exceeding 4kHz.
So, what about Switch-level GDS Oversampling?Well, as explained before, you should use this
method in cases where more than one GDS transition often happens during one simulation step.
Since Switch-level GDS oversampling is implemented at the component level, let s add the IGBT leg
component which currently supports it. So, let's drag and drop this component to our schematic.
You can enable Switch-level GDS oversampling by changing the oversampling settings in the
Advanced tab of the IGBT leg properties. However, notice that this option is not available here.
The reason is that switch-level GDS oversampling is dependent on the device configuration, which
must be properly selected in the model settings. Looking at the device configuration table
for HIL404, we can see that this oversampling method is available when using configuration 3.
So, let s select this configuration.Now you can see that the advanced tab of the
IGBT Leg properties window has a combo box where you can choose between Global GDS oversampling
and switch-level GDS oversampling.Finally, it is important to note
that if Switch-level GDS oversampling is enabled in a component that supports it,
Global GDS oversampling will be ignored for all components in the same sub-circuit.
In this lesson, we covered the GDS oversampling methods available in our toolchain,
which are important features to improve PWM effective time resolution, enabling
high fidelity real-time simulation results for high switching frequency applications.
For more information regarding this lecture, don't forget to check the additional documentation links
available in the Materials tab.
Thank you for your attention.