A method of detecting network anomalies for periodic traffic