Replacing 2 level IGBT converter block with expanded 3 phase inverter

I am looking to set up a Permanent-Magnet Synchronous Machine model similar to the Demo, however I want to replace the 2 level IGBT converter block with an inverter of my own design. The ‘pulses’ input for the converter block explains the gate input is a vector of three signals, with the upper IGBT in a leg being turned on by the positive and the bottom IGBT turned on using the negative signal.

In practice when I try to use these signals in an inverter design similar to the three phase voltage source inverter Demo which requires individual signals for all 6 devices I am having issues. If I simply multiply the signal by -1 to get the negative signal for the bottom device in the leg I get the errors:

"Inconsistent source conditions after switching.- short-circuited voltage source permanent_magnet_synchronous_machine/Circuit/V_dc "

and a Voltage-Current impulse error

I have tried adding dead time to the signals but the errors remain and zero-crossings become a problem

Any help would be greatly appreciated, I was hoping this is quite a standard procedure to drop in a more complex inverter into the pmsm control circuitry

three_phase_voltage_source_inverter.pdf (214 KB)

permanent_magnet_synchronous_machine.pdf (248 KB)

A PLECS Switch is closed for any non-zero value for the gate input. If you have a “+1” input signal for the upper switch, and a “-1” signal for the lower switch, then both switches will be closed at the same time, shorting your voltage source.

With the rules for determining when a switch will be closed, you should be able to build the necessary logic to turn the switches on/off appropriately. You can also right click the “IGBT Converter (3ph)” component and select “Subsystem + Look under mask” to see how that specific component is implemented.

Thanks a lot for the help, looking ‘under the mask’ made it far clearer