ideal frequency detector