There is a problem with this model of energy transfer in the pendulum. We have not considered friction. As the pendulum swings, there is friction in the fixed point. There is also friction between the mass and the air particles that it swings through.