Frequently Asked Question

Video: 2.1. Schematic Editor
Last Updated 3 years ago


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.

TRANSCRIPT

00:00:02

Hello! In this video you will learn the basics of working in Schematic Editor.

00:00:07

From the Typhoon HIL Control Center main menu, Schematic Editor is the first icon on the left.

00:00:13

Once launched, Schematic Editor shows the recently opened schematic files,  

00:00:18

so you can quickly go to any of your current projects. Of course, you also have dedicated  

00:00:24

buttons in the interface that you can use to create a new model, load an existing model,  

00:00:28

save the current model, and more. You can use the same commands in the File menu.

00:00:34

Now let’s create a model and see how Schematic Editor actually works.

00:00:40

To create a model, you can click the Create a new schematic button here,  

00:00:44

or you can go to File -> New -> New model. This opens the New model wizard, letting you choose  

00:00:50

the HIL Device for which you want to create the model. In this case, let’s choose HIL 404.  

00:00:56

The hardware configuration ID can be selected now or later.

00:01:01

Here, you can also auto-detect the hardware settings of your connected HIL device.

00:01:06

Down here, you can choose the simulation method. You have four methods at your disposal:  

00:01:11

exact, trapezoidal, Euler, and bilinear. In the majority of cases,  

00:01:17

the exact method is the preferred option; other methods, should only be used in special cases,  

00:01:23

for example, if there are memory constraints. Let’s set this to 1 microsecond. Once we finish  

00:01:35

with initial settings, let’s click Next, and if everything looks OK, just click Finish.

00:01:46

This blank space that you see is the canvas for your schematic drawings.  

00:01:50

You create your model by simply dragging and  

00:01:52

dropping the required components onto the canvas and connecting them together.

00:01:57

All the components are located in the Library Explorer on the left side of the screen.

00:02:02

As you can see, Schematic Editor is not much different from other  

00:02:06

graphical programming tools that you have already used, so learning it will come easy.

00:02:11

Let’s say that you want to find a Voltage Source: you can find it by typing the keyword  

00:02:16

in the search input box or by navigating to Sources in the tree view, where you can find  

00:02:20

the Voltage Source. Then, just drag and drop the component to place it into your model schematic.  

00:02:27

You can rotate the component, and change the voltage. To adjust the properties of the  

00:02:32

component, double-click the component and enter the desired value into the relevant property box.  

00:02:38

By double-clicking on the name instead, you can rename the component.  

00:02:42

Of course, you can do this with all other components as well.

00:02:46

Let’s add one more component and connect them. We will add a Three-Phase Inverter.

00:02:52

To find this component go to Converter -> Three Phase Inverter. To connect components, just click  

00:02:58

the connector. When you move the mouse, you will see that you are now creating a connecting line.  

00:03:04

To connect to another connector, just click the target you want to connect to. Like so.

00:03:11

Another really interesting feature is the Model Initialization Script in the Model menu.

00:03:16

What does that actually do? In the script, you can define some variables.  

00:03:22

Let’s say that Vdc equals 400 V. This will set and override the initial values for that variable for  

00:03:28

the whole model in one place, making defining and changing parameters as easy as possible.  

00:03:34

Moreover, you have complete flexibility to deploy any Python code in this script.  

00:03:39

This means you can load parameters from the file, or, if you are very proficient in Python,  

00:03:44

you can even write a web client that fetches a web page and grabs the relevant parameters.  

00:03:50

Or you can take the parameters from GitLab, GitHub, or some other DevOps platform.

00:03:56

So, the fact that you can use Python here, opens up a whole new world of possibilities  

00:04:01

and gives you a lot of flexibility. What else can you do? Well, you can add more components.  

00:04:08

Let’s add an induction machine. This time,  

00:04:11

let’s do it by typing in the search string in the find component box.

00:04:15

There are many types of induction machines, but in this example we are going to use an  

00:04:20

Induction Machine with Squirrel Cage - Voltage Behind Reactance. Just drag,  

00:04:25

drop, and connect it. Let’s open the properties of the induction machine.  

00:04:30

Here you can define basic electrical and mechanical parameters.

00:04:34

Let’s set the combined rotor and load moment of inertia to 10 gram meters squared.

00:04:44

Also, you can set the Load source and type of the source. In this case we will use Model and  

00:04:50

torque. In the Feedback tab, it’s possible to set an incremental or absolute encoder.  

00:04:56

In the Advanced tab you can set the rotating frame of the angle,  

00:04:59

and in the Output tab you can enable the signals which you want to output to the model.

00:05:04

In this example we will select mechanical speed. The outputs will be presented as a  

00:05:09

vector. You can find more information about the induction machine by clicking Help.

00:05:15

Now that you’ve added an induction machine, you can also add some current and voltage  

00:05:19

measurements. Current and voltage measurements allow you to see them in HIL SCADA when you are  

00:05:25

running your simulation. Let’s add one current measurement for the DC current on the DC link,  

00:05:30

and one current RMS measurement on the AC side. Also, let’s add one voltage measurement to measure  

00:05:36

the line A to line B voltage. Let’s rename all these measurements to Idc, Iac rms, and Vab.

00:05:54

Using Probe monitors you can observe and monitor the signal processing values in the real time.  

00:06:00

To find the Probe go to Sinks -> Probe. Now, let’s drag and drop.

00:06:05

Probe components must be connected to a signal processing output.  

00:06:09

Measurement components can enable signal processing outputs by navigating to the  

00:06:13

Signal Processing tab in their properties menu and setting Signal output to True.  

00:06:19

Let’s do that now for the Iac rms component. Also, let’s set the execution rate to 100 micro seconds.  

00:06:27

Now, you have a terminal which you can use for signal processing purposes.

00:06:33

Let’s connect the current RMS Iac rms to the probe and change its name to Iarms.  

00:06:38

Also, let’s add another probe for mechanical speed measurement and rename it to machine speed.

00:06:53

To control the inverter, we need to enable internal modulator control.  

00:06:57

Let’s set the switching frequency to 30 kHz and the dead time period to 0.5 micro seconds.

00:07:06

Another set of features worth mentioning, are features that are jointly called SCADA inputs.  

00:07:11

Let’s find them in the Library Explorer. SCADA inputs allow you to set values in  

00:07:16

real time when you are interacting with the simulation in HIL SCADA.  

00:07:21

Let’s change the name of this SCADA input component to Inverter Enable  

00:07:24

and connect the SCADA input to the En inputs of the three-phase inverter.  

00:07:29

Also, let’s add another SCADA input to set the load to the induction machine and name it T.

00:07:44

Also, let’s add an alpha beta to abc component and connect the outputs of the component with a  

00:07:49

to InA, b to InB, and c to InC. As inputs to the alpha beta to abc component, let’s  

00:07:59

use two sinusoidal waveforms which have a phase difference of -90 degrees and a zero constant.

00:08:07

Let’s find these components and drag and drop in to the schematic,  

00:08:11

and connect them with the alpha beta to abc component.  

00:08:33

Let’s change the name of these components to alpha, beta, and zero.

00:08:49

Good, so let’s take a look at the model that we’ve just built now. You can see that  

00:08:54

here you have some blocks that are colored in black and some in blue. These colors indicate  

00:08:59

two different domains of the system architecture previously explained in the introductory module.

00:09:04

The black part of the schematic indicates the electrical part of the system. That is the  

00:09:09

part that runs on the real time circuit solver with a simulation step down to 200 nanoseconds.

00:09:15

The blue part indicates the signal processing part that runs on the general-purpose CPU and  

00:09:20

typically runs at different execution rates. You can see this by double-clicking the  

00:09:25

current measurement Iac. As you can see, right now it is set to 100 microseconds.  

00:09:31

The Signal processing part is generally used for control loops that are implemented here in the  

00:09:36

model, but also for non-electrical domain modeling, such as thermal and mechanical. 

00:09:42

Also, there is a possibility to perform software-in-the-loop testing using the  

00:09:46

Advanced C function component in the Functions and Tables folder. With this component,  

00:09:52

you can import a controller model as C code generated from a third party software, as well as,  

00:09:58

import DLL and H files. Schematic Editor also enables you to integrate with various simulation  

00:10:04

tools, including co-simulation through FMI, open-source interfaces with Xyce, and OpenDSS.

00:10:11

Now let’s compile and load the model. First, let’s save the model. Let’s create a new folder with  

00:10:18

the name “simple drive system” and inside of it save the model with the same name.  

00:10:24

Then, we click on the Compile and Load the model button to run the compilation process.

00:10:35

In the message console you can find the information on how the model utilizes the HIL  

00:10:39

hardware resources (for example the memory matrix utilization, the time slot utilization, and more).  

00:10:46

We will cover hardware utilization in a separate module: Troubleshooting real-time modules.  

00:10:58

With this, you have gained the basic skillset necessary to use Typhoon HIL Schematic Editor.  

00:11:03

Now, feel free to play around and explore all the  

00:11:06

components and blocks that you have at your disposal here in Library Explorer.

Please Wait!

Please wait... it will take a second!