refactor to include control loop frequency in diagnostics