a method and system for synchronizing the sampling frequency , at which power system data is sampled , with the frequency of the power system . adjustments to the sampling frequency can be made by comparing first and second derivatives to threshold values .