Active and reactive power are calculated from the grid voltage obtained from the PLL and the current references (mostly in dq0 frame) . Thus, power is directly controlled by the current control, due to the voltage is imposed by the grid. Further details you can find here.
Article A Unified Single- and Three-Phase Control for Grid Connected...
The power that is obtained from grid voltage is calculated power but for obtaining reference current in dq frame reference power is used through PI controller.So can u suggest me what can be that reference value.Please find the diagram in the below attachment
Well, in that kind of control Pref and Qref are set points, it means you have to provide the values as inputs. There is no calculation of inputs references.
The power set points are normally set as Qref=0 (zero reactive power) and Pref= Max power rate of your converter. Otherwise, the active power is determined by the DC source (battery, PV, fuel cell, etc.) in which it is calculated in another stage (DC side) and transferred to the current control trough the DC link control.