Energy management and sizing of a dual energy storage system for electric vehicles