Frequency detection on sensor integrated circuits
According to an embodiment of the present disclosure, an integrated circuit includes: at least one sensing element configured to generate a sensed signal responsive to an electrical or magnetic phenomenon; an analog-to-digital converter configured to convert the sensed signal into a digital signal; and a digital processor configured to detect a target frequency of the electrical or magnetic phenomenon by iteratively applying a first real-valued coefficient to samples of the digital signal using real-valued arithmetic.
1. An integrated circuit comprising:
at least one sensing element configured to generate a sensed signal responsive to an electrical or magnetic phenomenon;
an analog-to-digital converter configured to convert the sensed signal into a digital signal; and
a digital processor configured to detect a predetermined target frequency of the electrical or magnetic phenomenon by iteratively applying a first real-valued coefficient to samples of the digital signal using real-valued arithmetic and using a second real-valued coefficient, wherein the first and second real-valued coefficients correspond to results of cosine and sine functions, respectively, applied to the predetermined target frequency.
2. The integrated circuit of claim 1 , further comprising a fault pin, wherein the digital processor is further configured to apply a voltage to the fault pin based on the detection of the predetermined target frequency.
3. The integrated circuit of claim 1 , further comprising a programmable memory configured to store the predetermined target frequency.
4. The integrated circuit of claim 3 , wherein the programmable memory is further configured to store the first and second real-valued coefficients.
5. The integrated circuit of claim 1 , wherein the predetermined target frequency is specified by the first real-valued coefficient and the second real-valued coefficient.
6. The integrated circuit of claim 1 , wherein detecting the predetermined target frequency of the electrical or magnetic phenomenon includes generating a real part value and an imaginary part value.
7. The integrated circuit of claim 6 , wherein the digital processor is configured to detect the predetermined target frequency of the electrical or magnetic phenomenon by calculating a norm of a vector defined by the real part value and the imaginary part value and comparing the norm of the vector to a predetermined threshold value.
8. The integrated circuit of claim 1 , wherein detecting the predetermined target frequency of the electrical or magnetic phenomenon includes generating a real part value but not an imaginary part value.
9. The integrated circuit of claim 8 , wherein the digital processor is configured to detect the predetermined target frequency of the electrical or magnetic phenomenon by comparing the real part value to a predetermined threshold value.
10. The integrated circuit of claim 1 , wherein the digital processor is configured to detect a plurality of target frequencies of the electrical or magnetic phenomenon by iteratively applying a respective plurality of real-valued coefficients to the samples of the digital signal using real-valued arithmetic.
11. The integrated circuit of claim 1 , wherein the at least one sensing element comprises a magnetic field sensing element configured to generate the sensed signal responsive to a magnetic field, wherein the digital processor is configured to detect the predetermined target frequency of the magnetic field.
12. The integrated circuit of claim 1 , further comprising an analog front end configured to perform at least one of filtering, gain adjustment, or temperature compensation on the sensed signal.
13. The integrated circuit of claim 1 , wherein the predetermined target frequency is expressed in radians per sample.
14. A method comprising:
receiving a sensed signal generated by a sensing element on an integrated circuit, the sensed signal responsive to an electrical or magnetic phenomenon;
converting, by an analog-to-digital converter on the integrated circuit, the sensed signal into a digital signal; and
detecting, by a digital processor on the integrated circuit, a predetermined target frequency of the electrical or magnetic phenomenon by iteratively applying a first real-valued coefficient to samples of the digital signal using real-valued arithmetic and using a second real-valued coefficient, wherein the first and second real-valued coefficients correspond to results of cosine and sine functions, respectively, applied to the predetermined target frequency.
15. The method of claim 14 , further comprising applying a voltage to a fault pin on the integrated circuit based on the detection of the predetermined target frequency.
16. The method of claim 14 , further comprising accessing the predetermined target frequency from a programmable memory on the integrated circuit.
17. The method of claim 16 , further comprising accessing the first and second real-valued coefficients from the programmable memory.
18. The method of claim 14 , wherein the predetermined target frequency is specified by the first real-valued coefficient and the second real-valued coefficient.
19. The method of claim 14 , wherein detecting the predetermined target frequency of the electrical or magnetic phenomenon includes generating a real part value and an imaginary part value.
20. The method of claim 19 , wherein detecting the predetermined target frequency of the electrical or magnetic phenomenon includes:
calculating a norm of a vector defined by the real part value and the imaginary part value; and
comparing the norm of the vector to a predetermined threshold value.
21. The method of claim 14 , wherein detecting the predetermined target frequency of the electrical or magnetic phenomenon includes generating a real part value but not an imaginary part value.
22. The method of claim 21 , wherein detecting the predetermined target frequency of the electrical or magnetic phenomenon includes comparing the real part value to a predetermined threshold value.
23. The method of claim 14 , wherein detecting the predetermined target frequency of the electrical or magnetic phenomenon includes detecting a plurality of target frequencies of the electrical or magnetic phenomenon by iteratively applying a respective plurality of real-valued coefficients to the samples of the digital signal using real-valued arithmetic.
24. The method of claim 14 , wherein receiving the sensed signal generated by a sensing element comprises receiving a magnetic field signal generated by a magnetic field sensing element, wherein detecting the predetermined target frequency of the electrical or magnetic phenomenon comprises detecting a frequency of the magnetic field.
25. The method of claim 14 , further comprising performing at least one of the following by an analog front end of the integrated circuit:
filtering the sensed signal;
adjusting a gain of the sensed signal; or
performing temperature compensation on the sensed signal.
26. The method of claim 14 , wherein the predetermined target frequency is expressed in radians per sample.