Intelligent capacitor