Hi Babalola,

I am just recovering from a terrible financial set back. I work in a part of the country where embedded is not done much and low in returns. A joint venture and lack of paper works almost made be broke.

I am learning that coding itself does not help, terms and conditions in black and white ensure that you get paid for the job. (The entire production aside)

I have mentioned in another post by kvrajashekhar (if I remember the name correct) that I could not keep up to my promise so no more commitments. Also being a design house I cannot make the code public due to commercial restriction.

Lacking an engineering background I do not clearly understand the equations and maths involved in a theoretically backed design. However I try to figure out by studying more and more.

In my design I sample the output voltage (a dc average) pass it through a PI routine to derive error. The error is basically and inverse of my sinewave modulating quotient. Which gets multiplied with the look up table. To save instruction cycles during table interrupts the entire lookup table is recalculated during zero cross for a cycle and kept in an array. This does not result in a highly pure sine but THD measured was between 2.5% and 4%. Thus waves are corrected only every 10mS. In fact 20mS was the original design to avoid flux imbalance. Now the routine uses flux reset by just switching on the Lower MOSFETs every zero cross. This gives me enough time for housekeeping etc. Like battery capacity measurement, display, communication, discharge profile log and possible econo-mode change during long power outage hours based on previous history.
All done on a 18F4520 @ 40MHz.

This forum was the starting place and I require less assistance now but I am grateful to people especially....everyone.