Analysis and optimization of communication technologies for smart grid applications