A flexible robot arm can be modeled as a lumped-parameter multi-degree-of-freedom mass spring system. The actuator at one end positions the payload at the other end. The flexibility causes the vibration of the payload at the end point. This paper considers a 4-degree-of-freedom mass spring system. A closed loop active vibration control system is analyzed to suppress the end-point vibrations. The mathematical model of the system is established by using the Lagrange equations. The average of the displacements of the masses is used for the feedback. A PID control is applied. The numerical solution is obtained by integrating the control action into the Newmark method. The instantaneous average displacement is subtracted from the reference input to find the error signal value at a time step in the Newmark solution. The PID control action is applied to find the actuator signal value in the time step. This input value is used to find the displacements for the subsequent time step. The process is continued until the steady-state value is approximately reached. The analytical solution is given by using the Laplace transform method to check the validity of the Newmark solution. It is observed that the numerical and analytical results are in good agreement. The integration of the control action into Newmark solution as presented in this study can be extended to finite element solutions to simulate the control of complex mechanical systems. (C) 2016 Elsevier B.V. All rights reserved.