Wireless power transfer with three-ports networks: Optimal analytical solutions