I am new to PLECS and am currently working on simulating an Active Front End (AFE) converter for my master thesis. My goal is to simulate the short-circuit current of an AFE unit that I have in real life.
I built my model based on the “space_vector_control_of_a_boost_system” demo cirtem AFE.plecs (129.0 KB)
I have two questions:
Current limiting: How can I limit the line current in my simulation? The real-life AFE has a maximum line current of 145 A RMS. I thought about using a saturation block with an extra input, but I cannot find this anywhere in PLECS. Is there a standard way to implement a current limit like this?
Reactive power: The reactive power in my simulation is quite high (about −9200 VAr). I am not sure whether this indicates a problem with my model, or whether it is normal behaviour for this type of AFE. I did see that if i up the switching current it goes away. Unfortunately, I cannot verify this experimentally at the moment because the control device of the real converter is on back order.
Any help would be greatly appreciated. Thanks in advance!
In your simulation your PI controllers are only implementing the proportional term due to a subtle error in the model initialization commands. The integral gain is calculated as R_kabel/Tau.
You entered the cable resistance as R_kabel = 0,178;, with a comma denoting the decimal position instead of dot/period. Octave/MATLAB use American notation syntax rules. This means it strictly recognizes the period (.) as the decimal separator. The software interprets a comma (,) as a separator between two completely different instructions. When you type R_kabel = 0,178;, the software thinks you are giving it two tasks at once:
Set R_kabel equal to 0.
Process the standalone number 178 (which the system automatically stores in the default variable ans).
The result The cable resistance and integral gain are both zero. This is why your reactive control isn’t working - the P term results in a lingering steady-state error. The Fix: To set the value to zero point one-seven-eight, you must change the comma to a period.
Directly answering your questions:
1. Current limiting
You can adjust your voltage PI controller’s antiwindup limits to +/- 145*sqrt(2). You could also put a “Saturation block” between the voltage controller output and the current reference input if you want to make it more explicit. Note that the simple saturation works because Iq_ref = 0. If you wanted a true RMS limit with non-zero Id/Iq references then you would have to limit the vector magnitude.
2. Reactive power
Change the initialization command to R_kabel = 0.178 and things should work better.