My aim is to reduce THD in the supply current and I wanna use a simple PI controller for that, to make the inductor current more sinusoidal and at the same time keep the output voltage of the converter constant. My current circuit can attain a controlled output but I don't know how to keep the supply current sinusoidal.
This is typically done with a boost topology. You rectify the input sine, then use the rectified waveform as the reference to a current control loop. Your PWM switch is modulated by this current control loop.
Then there's an outer voltage loop that MUST be much lower bandwidth than the AC ripple, maybe 4-8Hz. The voltage error for this loop typically drives a multiplier that "programs" the gain of the sinusoidal reference derived above. It tries to maintain the output voltage at something slightly higher than the max peak AC input voltage.
The output energy is stored in a large bulk cap and can be used directly or supply a following regulation stage. So you just have to figure out how to do this digitally instead of using an analog controller.
There is lots of information on PFC available from semiconductor vendors like LT, TI, etc.