In HIL experiments, how to accurately and repeatably set the occurrence time of the switch tube open-circuit fault at the moment of wave emission

Dear PLECS Technical Support,

Hello.

I am currently using the demo model three_phase_npc_inverter in PLECS and running HIL experiments on RT Box 2 for open-circuit fault diagnosis of a three-phase three-level NPC inverter.

My objective is not only to inject an open-circuit fault into a switch, but more importantly to control the fault occurrence time accurately and repeatably during HIL testing.

In offline simulation, I can use a Step block to force the gate signal of a target switch to zero at a predefined simulation time, which works well for basic fault injection. However, in the HIL setup, the power stage gate enabling is controlled by an external switch, so the controller and the real-time simulation do not start in a strictly synchronized manner. Because of this, a Step block triggered by absolute simulation time cannot accurately represent a fault occurring at a specific time after the gate signals are enabled.

My actual experimental requirement is to define the fault timing precisely relative to the gate-enable instant or relative to the current fundamental period. For example, I need to perform tests such as:

  • injecting the fault 0.2 s after the gate signals are enabled;

  • taking one current period as 0.02 s;

  • selecting 10 equally spaced fault time points within one current period.

The reason is that I need to carry out full-cycle fault diagnosis tests in order to evaluate the timeliness and effectiveness of my diagnosis method over the entire period.

At present, I can manually change the value of a Constant block online to force a gate signal to zero, but this method does not allow me to control the fault occurrence time accurately or repeatably enough for this kind of systematic testing.

Therefore, I would like to ask for your advice on the following point:

In a PLECS/RT Box HIL setup, what is the recommended method to inject an open-circuit fault at an accurate and repeatable instant relative to the gate-enable event or to a periodic signal such as the current cycle?

More specifically, I would like to know:

  1. Whether there is a recommended way to trigger the fault based on a synchronization event, such as gate-enable activation, instead of absolute simulation time;

  2. Whether it is possible to define fault injection times relative to a reference event, for example 0.2 s after gate enabling;

  3. Whether PLECS/RT Box provides a suitable method to generate multiple repeatable fault instants within one electrical period, such as 10 equally spaced points in a 0.02 s current cycle.

Any suggestions, recommended implementation methods, or example models would be greatly appreciated.

Thank you very much for your time and support.

Best regards,
Jiarong

You simply need to construct additional logic around your “start of event” signal. Essentially, once the desired behavior is defined one can use basic PLECS blocks to construct the desired logic.

For example, if there’s a Digital Input signaling the start of the event that you would like to delay by 0.2 s, then you can use a Pulse Delay block.

If you want a signal synchronized with the grid event, you can create a periodic ramp associated with the grid voltage source and have it timed accordingly. As an example, if you want the event to occur on the AC voltage peak you could construct the circuit below.

point_on_wave_sketch.plecs (10.0 KB)

For 10x events within a line cycle you could have it be generated by a pulse generator, compared to different angle thresholds of the ramp signal, etc.

Hi Bryan,

Thanks a lot for the clear explanation and suggestions.
I understand it now. The key is to define the fault timing relative to a start event or a synchronized periodic reference, rather than using absolute simulation time. I’ll try to implement this idea in my HIL experiment using the gate-enable signal as the reference and then applying delay logic or phase-based triggering as needed.

This is very helpful for my full-cycle fault diagnosis tests.

Thanks again!

1 Like