Beam loading compensation for acceleration of multi-bunch electron beam train