Computationally efficient battery model for microgrid applications using the Chebyshev spectral method