TPI RLY - Relays

The TPI RLY block controls the relays of the AC precharge circuit of the all-in-one programmable inverter (TPI8032 22kW).

For reference, the topology of the converter is shown below. The inverter naturally acts as a diode rectifier due to the anti-parallel body diodes of the MOSFETs. Uncontrollable currents will flow through the diodes should the DC bus voltage drop below the rectified AC voltage. For this reason, it is essential to precharge the DC bus before initiating regular operation. More information can be found in TN131: DC bus precharging techniques.

Topology of the TPI8032
Topology of the TPI8032

By default, the relays of the AC precharge circuit are fully automated with a Finite State Machine and allow a safe and seamless connection to the grid. Please refer to the TPI8032 datasheet for more details. Optionally, it is possible to control the precharge and bypass relays manually. By doing so, the user bears the risk of damaging the equipment in case of inadequate operation.

State machine of the relays
Finite State Machine of the AC precharge circuit

Signal specification

  • Setting the close input to >0 initiates the precharge of the DC bus.
  • The ready signal is set to ‘1’ once the DC bus is precharged and the inverter is ready for operation.
  • When manual control is enabled, the precharge and bypass relays are controlled using R1 and R2 respectively.
  • The sim R1 and sim R2 output signals are used in simulation and documented in Simulation essentials with Simulink (PN135).
Simulink block for the relays

Parameters

  • Device ID selects which TPI to address when used in a multi-device configuration.
  • Enable manual control bypasses the automation provided by the state machine and provides direct control of the precharge and bypass relays.
  • Show simulation ouput port(s) defines if the simulation output ports are displayed or not.
Mask of the Simulink block for the relays.

PLECS block

Signal specification

  • Setting the close input to >0 initiates the precharge of the DC bus.
  • The ready signal is set to ‘1’ once the DC bus is precharged and the inverter is ready for operation.
  • When manual control is enabled, the precharge and bypass relays are controlled using R1 and R2 respectively.
  • The target output ports (only visible at the atomic subsystem level) are used in simulation and documented in Simulation essentials with PLECS (PN137).
PLECS block for the relays

Parameters

  • Device ID selects which TPI to address when used in a multi-device configuration.
  • Enable manual control bypasses the automation provided by the state machine and provides direct control of the precharge and bypass relays.
  • Show simulation ouput port(s) defines if the simulation output ports are displayed or not.
PLECS mask

C++ functions

void Rly_CloseAll(unsigned int device=0);Code language: C++ (cpp)

Initiates the precharge of the DC bus.

It can be called in UserInit() or in the control interrupt routine.

Parameters

  • device: the ID of the addressed device (optional, used in multi-device configuration only).
void Rly_OpenAll(unsigned int device=0);Code language: C++ (cpp)

Open all relays of the precharge circuit.

It can be called in UserInit() or in the control interrupt routine.

Parameters

  • device: the ID of the addressed device (optional, used in multi-device configuration only).
bool Rly_ReadyToOperate(unsigned int device=0);Code language: C++ (cpp)

Indicates that the DC bus is precharged and the inverter is ready for operation.

It has to be called during the control interrupt.

Parameters

  • device: the ID of the addressed device (optional, used in multi-device configuration only).
void Rly_EnableManualControl(unsigned int device=0);Code language: C++ (cpp)

Provides direct control over the precharge and bypass relays and bypasses the automation provided by the state machine.

Enables the use of Rly_ClosePrecharge, Rly_OpenPrecharge, Rly_CloseBypass, and Rly_OpenBypass.
Disables Rly_CloseAll, Rly_OpenAll, and Rly_ReadyToOperate.

It has to be called in UserInit().

Parameters

  • device: the ID of the addressed device (optional, used in multi-device configuration only).
void Rly_ClosePrecharge(unsigned int device=0);Code language: C++ (cpp)

Closes the precharge relay.

It can be called in UserInit() or in the control interrupt routine.

Parameters

  • device: the ID of the addressed device (optional, used in multi-device configuration only).
void Rly_OpenPrecharge(unsigned int device=0);Code language: C++ (cpp)

Opens the precharge relay.

It can be called in UserInit() or in the control interrupt routine.

Parameters

  • device: the ID of the addressed device (optional, used in multi-device configuration only).
void Rly_CloseBypass(unsigned int device=0);Code language: C++ (cpp)

Closes the bypass relay.

It can be called in UserInit() or in the control interrupt routine.

Parameters

  • device: the ID of the addressed device (optional, used in multi-device configuration only).
void Rly_OpenBypass(unsigned int device=0);Code language: C++ (cpp)

Opens the bypass relay.

It can be called in UserInit() or in the control interrupt routine.

Parameters

  • device: the ID of the addressed device (optional, used in multi-device configuration only).