A drive system for a work machine, the work machine including an attachment having a first movable member and a second movable member, the second movable member being rotatably coupled to the first movable member, the drive system comprising:
- a drive unit having a first electric actuator and a second electric actuator, the first electric actuator having a first output shaft for rotating the first movable member, the second electric actuator having a second output shaft for rotating the second movable member;
- and
- a control device for controlling the drive unit,
- wherein the control device performs:
- a first process to calculate a limit value for a rotational speed of the first output shaft based on a relative position of the second movable member relative to the first movable member;
- and
- a second process to control the first electric actuator such that the rotational speed of the first output shaft is lower than or equal to the limit value, and
- wherein the first process is performed such that the limit value is lower when a distance is a first value than when the distance is a second value smaller than the first value, the distance being from the first output shaft to a distal end of the attachment opposite to a coupling point with the first output shaft.