That´s how I would start:
Due to this force depends on several factors, this would become impractical to get it by calculations based on the physics, therefore you could first measure the force required to sustain the ball at several points of the Y axis. I cannot seen how to do that dynamically, so you could make an apparatus to fasten the ball steadily. I could suggest you do something like that:
It is just an illustrative picture, cleaned useless information.
Course, being metalic, the coil should be kept appart from the ball.
Note that the stretch of the coil is proportional to the force. Once you have the force plotted, could make a regression to determine for instance a polinomial approximation so that this would represent the plant to be reached by the the PID control.
Anyway, I see an additional complexity at this control due to even being the ball at a determined position, you are dealing with different forces ( models ) depending on what direction you need drive the ball. If you release the energy the ball will fall much faster than would rise if applied the same force to return to the original position.