Variational Feedback Control for a nonlinear beam under an earthquake excitation