The potential energy has to be split in two parts, considering separately the rotor and the foundation contributes. In the first case, we have to consider that this energy is function of the relative displacements of the extreme nodes of each element. By using some algebra and by considering the elastic beam theory, the stiffness matrix for the rotor results as [Kr], whose sub-matrices are reported in the next slide.