Frequently Asked Question

Video: 3.3.2.2. Signal processing circuit partitioning
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:03

Hello!

00:00:04

In previous lessons we discussed about electricalcircuit partitioning.

00:00:08

We explored how to deal with core couplings,snubbers, and how electrical circuit components

00:00:14

impacts to your model.

00:00:15

In this lesson we will focus more on the signalprocessing part of the circuit.

00:00:20

As explained in the previous module 3.2.

00:00:23

Problems & solutions of real-time modeling,sometimes it is needed to execute the signal

00:00:28

processing part of the circuit at an executionrate that is lower than is typically used

00:00:33

in most applications.

00:00:35

If the CPU cannot manage to run code in thegiven time slot, HIL SCADA will warn us with

00:00:41

the computing interval overrun or CIO flag.

00:00:44

The 4th generation HIL404 and HIL606 can grantyou even faster execution rates than the previous

00:00:52

generation devices.

00:00:53

They also support signal processing partitioningbetween cores, which allows parallel computation

00:01:00

of signal processing code.

00:01:04

Signal processing partitioning also makesit possible to exchange data between multiple

00:01:09

cores.

00:01:10

In order to manage Signal processing partitioning,there are two components: CPU marker and CPU

00:01:17

transition.

00:01:18

CPU marker is used to map a portion of thesignal processing model to the specified CPU

00:01:26

core.

00:01:27

They are only available on devices with multipleUser CPU cores.

00:01:31

If we double click on the mask, you can seea marker's identification label that specifies

00:01:37

in which CPU core the marked part of the circuitwill be executed.

00:01:42

CPU Transition manages data transfer betweencomponents that operate on different CPU cores

00:01:48

of the same device.

00:01:50

In order for two Signal Processing circuitsthat run on different User CPUs of the same

00:01:55

device to exchange data, they should be connectedusing the CPU Transition component.

00:02:01

Including CPU Transition components can introducea delay of one execution rate.

00:02:07

You can find more details about this componentin the Materials tab.

00:02:11

When it comes to signal processing partitioningbetween cores, there are two modes of operation.

00:02:17

By clicking on Model settings then signalprocessing settings and the CPU mapping option,

00:02:23

you can see the default and execution rate-basedoperation modes.

00:02:27

By enabling the default mode of operation,CPU marker components apply to the connected

00:02:33

Signal Processing component group.

00:02:36

Component groups with no CPU markers are mappedto CPU core 0.

00:02:42

CPU Transition components are used as separatorsfor CPU partitioning.

00:02:47

The other option is the execution rate-basedmode of operation, which allows model mapping

00:02:53

on multiple CPU cores without the need touse CPU transition and CPU marker components.

00:02:59

CPU partitioning is done based on the executionrates present in the model.

00:03:07

In this way, rate transition components, whichare explained in more detail in the documentation

00:03:12

link in the Materials tab, can also serveas separators for CPU partitioning.

00:03:18

When CPU markers are used, they apply to allcomponents that have the same execution rate.

00:03:24

When CPU markers are not used, the compilerautomatically maps execution rates to the

00:03:31

available CPU cores.

00:03:33

Now let s see an example of when signal processingpartitioning components should be used and

00:03:38

how.

00:03:39

For this example s purpose, a HIL 404 is used.

00:03:44

As you can see this example is very simpleand contains only a signal processing part.

00:03:49

Let s imagine we are performing harmonic analysisfor different harmonics.

00:03:54

The first harmonic analyzer is used for the1st, 3rd, 5th, and 7th harmonic, and the second

00:04:00

one is used for the 9th, 11th, 13th, and 15th.

00:04:04

The signal processing execution rate is 6microseconds.

00:04:10

Now let s compile this model and run the simulation.

00:04:19

As you can see, the compilation finishes successfully,but when we run our simulation, the CIO flag

00:04:28

pops up, warning us that the signal processingcode can t be executed in the given time slot

00:04:33

of 6 microseconds.

00:04:34

If we click on the CIO flag, we can see thatthe User CPU is 100% used.

00:04:41

The troubleshooting process implies signalprocessing partitioning can be a solution.

00:04:46

Now let s go back to the model and dividethis circuit in two cores.

00:04:49

Let s put one harmonic analyzer in one coreand the other one in another core.

00:04:55

Let s choose CPU transition and put the executionrate to Ts.

00:05:09

Lastly, let s mark which part will be executedon which core.

00:05:23

If we compile and run the model again, asis expected, we don t have the CIO flag raised.

00:05:30

If we click on that window, we can see thatUser CPU utilization is equally divided between

00:05:43

the cores.

00:05:44

Here it is important to notice that CPU mappingin the Signal processing settings is set to

00:05:50

Default.

00:05:54

Now let s see how we can use execution rate-basedCPU mapping.

00:05:58

Let s first use a transition rate insteadof CPU transition.

00:06:16

The execution rate of the circuit after thatcomponent will be two times larger than the

00:06:23

execution rate before the rate transition.

00:06:26

If we compile the model with default CPU mapping,we can see in the message console that this

00:06:32

model is in one CPU core as is expected.

00:06:41

Now when we run the simulation, we get a CIOerror.

00:07:01

Let s change the CPU mapping option to Executionrate based and re-run the model.

00:07:20

In the message console, we can see that themodel is divided in two CPU cores.

00:07:51

If we run the simulation, now we can see thatthe computing interval overrun issue is solved.

00:07:58

Signal processing core partitioning is particularlyuseful for microgrid systems which contain

00:08:03

signal processing based (generic) components.

00:08:06

Those components will be explained in moredetail in Module 5, HIL for Microgrids.

00:08:11

With this lesson, we ve now covered all theimportant aspects of core partitioning.

00:08:14

In the next lesson, device partitioning willbe highlighted in more detail.

00:08:20

So, see you there.

00:08:22

Thank you for watching!

Please Wait!

Please wait... it will take a second!