While a pendulum swings freely in fluid, the number of swings reflects the effect of fluid damping. Swinging during a fixed period as a gravity pendulum of a certain weight, the swing of the pendulum decays faster if the damping is larger, and more slowly if the damping is smaller [1]. An active pendulum device for damping measurement is presented in this paper. By measuring the power of the pendulum compensation when the pendulum swings with the same amplitude and frequency in fluids with different damping effects, the device can calculate the overall effect of fluid damping. First, a conical pendulum mechanical model of a free pendulum is established based on the principle of virtual displacement and D'Alembert's principle, and then the space trajectory of free pendulum motion and conical motion is studied by solving the Lagrange equation and taking into consideration the motion law of free swing compensation. Next, the PID algorithm is used to analyze the pendulum attitude data measured by the sensor, adjust the wind speed of the DC fan output and maintain the dynamic balance of the pendulum. The pendulum tested in the fan drive performs a simple harmonic swing in different fluids according to the given amplitude and frequency. The power of the system compensation is related to the fluid damping.