Text this: Analysis of optimum FBG configurations in DPSK and DQPSK systems