On-line Estimation of Stability and Passivity Metrics