Waveguide-based resonance sensor design