Question 1:
See the discussion on Rotor Reference Frame vs. Voltage Behind Reactance machine formulations in the Electric Machines FAQ. Without a snubber, the current injected into the diode bridge must fully go through one of the two diodes. When there is low current, the change in voltage at the bridge influences the current injection in the next step such that it may toggle the current polarity. This in turn changes the diode states, which then changes the applied voltages, which in turn toggles the current polarity, etc. With smaller snubber resistors values the current path and node voltage is better defined, hence no toggling. The snubber resistances change how the current branches at the diode bridge but does not guarantee that this toggling effect won’t occur.
You’ll also notice in your model that even though the node voltage is toggling - the average value over several toggle events of the applied voltage ends up being quite close to the correct value (at higher currents).
Question 2:
The step size compensation block does not address this underlying interface issue. Its purpose is to compensate for a loss in accuracy of the model due to discretization effects that manifest at high speeds / larger time steps.
The induction machines in the PLECS library interface without snubbers because of the state-space inlining setting of the current sources, as you identified. However, for state space inlining to work there are two requirements 1) the parameter is set to on and 2) “the input signal is a linear combination of electrical measurements”. The induction machines are in the stationary reference frame; there is not a sin(\theta) or cos(\theta) term. This contrasts with your model which is in the rotating reference frame and therefore has the non-linear sin/cos product preventing state-space inlining.
Question 3
There are two approaches - add a snubber element or reformulate the machine equations into a VBR-style model.
Earlier in your post you noted “The diodes are already set to Non-Ideal.”
In the model you posted this is not accurate. While there is a Vf and Ron term, the turn-on/turn-off event is an ideal transition. You can review more about what a Non-Ideal switch means in the context of real-time simulation / code generaiton in the Ideal and Non-Ideal Switch Models in Electric Circuits section of the PLECS manual.
One advantage of non-ideal switches is that they have a snubber-like effect. I modified the diode bridges in your model to be configurable as non-ideal and increased the snubber resistance (you can set to inf to disable). I also set the Non-Ideal Switch Resistance setting to ~15. The solver was set to variable step, such that you could compare a “reference” solution with a large 10kOhm snubber which simulates with a variable step solver fine against the CodeGen model with various configuration options.
six_phase_gen_bl.plecs (402.9 KB)
