Modeling and Stability Analysis of an Active Filter for DC Current Compensation