Approximate Dynamic Programming and Artificial Neural Network Control of Electric Vehicles: from Motor Drives to Grid Integration