However, for systems such as hydro turbine generating sets (HTGS) where the control and regulation is frequently applied, the shafting safety and stabilization in transient state is then a key factor. The shafting transient state inevitably involves multi-parameter domain, multi-field coupling and coupling dynamics. In this paper, the relative value form of the Lagrange function and its equations have been established by defining the base value system of the shafting. Taking the rotation angle and the angular speed of the shafting as a link, the shafting lateral vibration and generator equations are integrated into the framework of the generalized Hamiltonian system. The generalized Hamiltonian control model is thus established. To make the model be more general, additional forces of the shafting are taken as the input excitation in proposed model. The control system of the HTGS can be easily connected with the shafting model to form the whole simulation system of the HTGS. It is expected that this study will build a foundation for the coupling dynamics theory using the generalized Hamiltonian theory to investigate coupling dynamic mechanism between the shafting vibration, transient of hydro turbine generating sets and additional forces of the shafting.