The researchers are using magnets positioned in trench of the track as a kind of magnetic gear to push against. A series of electromagnets on the Lego vehicle ride in that track. The can be energized, working as a linear motor to push against those permanent magnets. But how do you know which direction of travel this will cause? That problem was solved by adding a hall effect sensor between each electromagnet. Before switching on the coil the hall effect sensors are polled and a timing scheme is selected based on their value. This is used to push the train up to speed, as well as slow it down for braking.