Hi Sougata,

I'd try adding some control based on the output current. When you apply a heavy load you'll see a sudden increase in the output current. Removing it will ofcource give the opposite. When you detect theese changes you know you will get a over or undershoot.

If you're lucky it might be as simple as this.

By subtracting the previous currentsample from the new you'll get a number reflecting the "rate of change"(i think it's derivetive in english). Exactly how this value will correlate with the phase angle i don't know, but it will give you a good startingpoint. Multiply this value with a scalingfactor(needs to be "tuned to your system" and add/subtract the result to your phaseanglevalue. Perhaps you'll need a lookuptable but i'd start with the linear approach(scalingfactor).

I hope i made atleast some sense. It's difficult to describe what i'm thinking in a non native language.

If you submit your code I might be able to give you some more pointers. It's difficult to give advise when I don't know what you've already done.

/Ingvar