It is one of the key tasks for the bridge crane to achieve anti-swing control of the hook and the accurate positioning of the body to work efficiently, safely and automatically. Based on Lagrange equation, this paper is to propose a dynamic model of the crane motion system for designing controller. In the controller design, Proportional-Integral-Derivative (PID), the most widely used controller in engineering, is adopted and a new parameter tuning algorithm for a multi-variable PID controller based on generalized predictive control (GPC) is given. It is found that the multi-variable PID controller shares the same structural mathematical expressions with the GPC law, which makes for the transfer and calculation of the three parameters P, I and D, and that the new algorithm enables the traditional PID controller to perform as brilliantly as the GPC. The results of both the simulation and real-time control experiments show that the newly-proposed PID controller can effectively eliminate the swing of the hook and control the bridge cranes moving position accurately.