Relaying protocol design and optimization for energy harvesting relaying in SWIPT networks