In a dq reference frame the active and reactive powers are given by these expressions: P=3*Vd*Id/2, Q=-3/2Vd*Iq, where Vd is the d component of the voltage at the point of common coupling (Assuming your transformations give a Vq=0). In a current control mode you can obtain the Id and Iq references as a function of P and Q. Id=2*P/(Vd*3) and Iq=-2*Q/(Vd*3), this way you control the output current of your inverter as a function of P and Q. Hope this gives you some insight
If possible Pls check my file and Vq is not equal to zero when I run my simulation file Pls correct me. If possible what are the possible gain values I have to choose for better decoupling.
I already tried to open simulation file, but not able to run.(Failed to find 'spsPVarrayModel/NoBAL' in library 'spsPVarrayModel' referenced by 'project/PV Array/Diode Rsh/BAL') i'm thinking that this is due some missing library. The Vd or Vq being zero depend on the PLL output or how you perform your transformations. A good exercise is to do transformations by hand to get some insights. To achieve the Vq=0 component you need a -pi/2 shift of the PLL. In the following link (https://www.desmos.com/calculator/fdgdq2cvsy) you can find a graph of the transformations, if you change the first graph t_h (which corresponds to the PLL output) and erase the term "-pi/2" you can see how this changes your transformations.