To get a linear ac model for the pwm, you need to write the equations for the average voltage applied to the RL circuit. This gives the operating point around which you apply a small perturbation signal. In this case a small perturbation of the duty cycle. The resulting eq is linearized by discarding high order terms.
Here is an example:
http://www.planetanalog.com/author.asp?section_id=3049&doc_id=563779the function:
int CalcPI1(int currentReference,int currentMeasurement)
...
return PI_out1; //controller voltage output
Says it returns voltage. I think that to be sure of what is the output of the PI controller you need to know the units of the gains G0,p1,p2...
Ultimately the DsPic output is a pwm pulsed output. There is no voltage control, only duty cycle is varied. Somewhere in the source code a conversion from PI_out to duty cycle should be done. I didnt find it in a first read may be I can take a second look later.