This application discloses an anti-
derailment device and an active anti-
derailment system for rail vehicles. The anti-
derailment device includes an anti-derailment frame, an
electromagnet, a drive
assembly, and a mounting base. The anti-derailment frame is located inside the rail. The
electromagnet is mounted on the anti-derailment frame to attract the rail. One end of the drive
assembly is rotatably mounted on the base of the rail vehicle
bogie frame via the mounting base, and the other end is connected to the anti-derailment frame to drive the anti-derailment frame closer to or away from the rail. This anti-derailment device is located below the rail vehicle
bogie frame, with one anti-derailment frame corresponding to each rail, and the anti-derailment frame is located inside the rail. It will not interfere with the rail when the rail vehicle is traveling normally or passing a switch. By setting up the drive
assembly, the anti-derailment frame can be driven to move away from or closer to the rail, connecting the
bogie frame and the left and right rails into a stable frame structure. This increases the bogie frame's
buoyancy, roll, and
lateral movement constraints, thereby indirectly limiting the wheelset's lifting and
lateral movement, ultimately achieving the purpose of preventing wheelset derailment.