Choose Strategy to Ground Converters with Isolated Topologies
This example shows how to correctly ground isolated topologies, such as electrical power converters with galvanic isolation. You compare three methods of grounding an ideal transformer and choose the best option depending on your application.
Galvanic isolation means that there is no direct conduction path across the isolation barrier, but power still flows. You can use galvanic isolation to prevent exposing humans and instruments to high voltages by introducing a physical barrier between high and low voltages. However, every Simscape™ physical network needs a voltage reference. For a network with galvanic isolation, you must provide a reference to both sides of the transformer. In essence, you must provide a voltage reference to the secondary that does not cause a flow of current between the circuits.
Open Model
Open the groundConvertersWithIsolatedTopologies model.
myModel = 'groundConvertersWithIsolatedTopologies';
open_system(myModel);
The model uses three strategies for grounding the converter while providing galvanic isolation:
Connecting the primary and secondary directly.
Connecting the primary and secondary with a high-ohmic resistor.
Connecting a Floating Reference block to the secondary.
When you use the direct connection and resistor, the primary and secondary sides both connect to the primary ground. If there is no additional path between the primary and secondary, or between the secondary and the ground, there is no current flow.
When you use the floating reference, the primary connects to the primary ground. The secondary connects to the Floating Reference block. Unlike the Electrical Reference block, which provides a connection to the ground, this block uses a capacitance to block the DC current.
The switch connected to the secondary ground models a grounded human touching the secondary after one second. For the purpose of this simulation, the DC voltage source in series with the connection or floating reference lifts the voltage relative to the ground.
Plot Simulation Results
Run the model and plot the current flowing through the connection between primary and secondary. Plot also the current through the switches.
groundConvertersWithIsolatedTopologiesPlotCurrent

At the start of the simulation, the switch is open, so neither network connects to the secondary ground. The results show that:
Direct connection — No current flows directly from the primary to the secondary because there is no closed loop that includes this path.
Resistor — Similarly to the direct connection, there is no current flow. Zero current through the resistor means there is no connection to close the circuit and allow the current to flow. You can equivalently set that resistance to 0 Ohm, or remove the block. However, for more complex circuits, it can be difficult to identify the locations of all of the paths from the secondary to the primary. In this case, use a large value for the resistance to minimize the current flow while still providing a voltage reference for the secondary.
Floating reference — There is no circuit for current to flow that includes this path.
After one second, the switch closes, and the secondary now connects to the ground providing a path to the primary. Touching the secondary provides a path for current to flow from the secondary, through the human, into the ground and into the primary.
When you use the direct connection or the resistor, there is now a path for the current to return to the secondary from the primary. The magnitude of the current increases as the resistance decreases.
When you use the floating reference, there is still no path for the DC current to flow from the secondary to the primary.
Choose Grounding Strategy
The simulation results for the three methods of grounding the ideal transformer provide insight which can help you choose the best option depending on your application.
If you are not modeling a human touching the secondary and you can clearly see that there is no closed loop for current to flow directly from the primary to the secondary, add a single physical connection line between the primary and the secondary to add a reference for the secondary.
If you are not modeling a human touching the secondary and it is difficult to see the location of all of the paths to the primary ground, this can make it difficult to tell if current can flow directly from the primary to the secondary. If you cannot tell if current can flow directly from the primary to the secondary, connect the primary to the secondary using a high-ohmic resistor to add a reference for the secondary.
If you are modeling a human touching the secondary, then use a floating reference for the secondary. The human provides a circuit from the low-voltage secondary through the capacitance to the ground and back through the human and there is still no path directly from the primary.