The invention discloses a real-
time control device and a real-
time control method for a
motion direction of an electromagnetic energy-regeneration semi-
active suspension of a vehicle. A bi-directional controllable double
ratchet mechanism composed of a first
ratchet mechanism and a second
ratchet mechanism which are jointly arranged on an input shaft of an energy-regeneration motor rotor is arranged between an energy-regeneration motor and a nut-
ball screw mechanism. The first ratchet mechanism and the second ratchet mechanism respectively comprise a ratchet, a pawl, a pawl rotating shaft, a tensioning spring and an
electromagnet. The electromagnets are electrically connected with a
control unit, and the rotating directions of the two ratchets combined with the pawls are opposite. When the
control unit inputs control signals to a first
electromagnet and a second
electromagnet of the first ratchet mechanism and the second ratchet mechanism, the input shaft of the energy-regeneration motor rotor can only rotate anticlockwise or
clockwise, and the suspension can only be stretched or compressed. When the
control unit does not
input control signals to the first electromagnet or the second electromagnet, the suspension can only be stretched and compressed. When the vehicle is subjected to a large inertial force, by real-
time control of the
motion direction of the related suspension, pitching and side tipping of the vehicle are reduced, and the running safety of the vehicle is improved.