Real and reactive power sensors based on fiber grating