I am trying to simulate a three phase grid connected inverter with LCL filter as shown in picture. I am trying to complete the simulation in open loop condition first before going to close loop with DQ transformation. I am using a 2-level PWM generator to provide gate signals. The simulation is done in two steps
Step 1, Only load connected and Three Phase source(grid) commented out. The output is fairly good sinuosoidal as expected. V=400V, I=20A
Step 2, Grid is connected and simulation is run. The output is not how I wanted. Voltage waveform is pretty ok. But current waveform have higher magnitude and higher harmonics.
My question is what could be the reason for higher currents when inverter is grid connected and what could be the reason of such non sinuosiodal current waveform. Can anyone help me with getting this problem fixed or share their three phase grid connected model?