A grid-tied large-scale battery energy storage system: modelling from the pack level to the cell level