Hello experts, I am trying to implement the sub cycle average method for the half bridge modules in an inverter. I tested these models with a simple DC supply and implemented unipolar and bipolar PWM techniques. They worked fine. But I am trying in a closed loop system as shown below, the following errors are coming.
I tried to give delay and trying all the possible ways. But I am unable to run. By goal is to test the sub cycle avg model with actual half bridge and then replace the whole circuit with the subcycle average models. Also, I tried by keeping both the legs with sub cycle average models and still, it doesn’t work.

