The “nice smooth trains” that commenters are talking about use a pantograph, transformer and small on-board battery, and can go a small distance (few kms) through tunnels and between track segments with the pantograph lowered.
The power system after the battery is similar to older model electric vehicles.
The power system after the battery is similar to older model electric vehicles.