 This paper proposed a dynamic compensator based on system identification to identify the dynamic characteristics of the three-axis flux gate magnetometer and optimize its parameters using a hybrid optimization algorithm. This algorithm was able to reduce the response time by up to 18.22% compared to the pre-compensation time and reduce the maximum attenuation in the 0.01 to 10 Hz frequency band by up to 5.5%. Additionally, the standard deviation error of the geomagnetic vector components was reduced by up to 3.41-2.36-2.75 Nt. These results demonstrate the effectiveness of the proposed dynamic compensator in improving the accuracy of geomagnetic dynamic measurements. This article was authored by Zhuo Chen, Zhen Xiang Wang, Qi Xiang, and others.