Design and performance analysis of FBG based system for application in optical communication and sensors