Patent Description:
Magnetic sensors can be implemented to obtain linear or circular position or angle information of a mechanical component, such as a shaft, in various applications, including an automotive steering system. Magnetic sensing elements used in magnetic angle sensors often suffer from changing sensitivity levels and non-linearity errors due to, for example, temperature change, and it is desirable to implement sensor error detection mechanism for magnetic sensors.

<CIT> relates to an angle computing device.

<CIT> relates to a vehicle control apparatus.

The methods and devices of the described technology each have several aspects, no single one of which is solely responsible for its desirable attributes.

In one aspect, there is provided a magnetic field turn sensor system as set out in claim <NUM>.

The magnetic field angle sensor can comprise a first magnetic field angle sensor, the signal processing path comprises a first signal processing path, and the angle measurement comprises a first angle measurement, the system further comprising: a second magnetic field angle sensor; and a second signal processing path configured to receive an output from the second magnetic field angle sensor and generate a second angle measurement based on the output, wherein the processor is further configured to: receive the second angle measurement from the second signal processing path, determine that the first angle measurement differs from the second angle measurement by greater than a threshold angle, and indicate the fault in response to determining that the first angle measurement differs from the second angle measurement by greater than the threshold angle.

The processor can be further configured to: determine that the angle measurement does not deviate from the expected transition angle by more than the threshold value, and refrain from indicating the fault in response to determining that the angle measurement does not deviate from the expected transition angle by more than the threshold value.

The system can further comprise: a memory configured to store the expected transition angle, wherein the obtaining of the expected transition angle further comprises retrieving the expected transition angle from the memory.

The processor can be further configured to: store a plurality of historical values of the angle measurement in the memory, and determine the expected transition angle based on the historical values of the angle measurement.

The processor can be further configured to: for the transition between quadrants, average the historical values of the angle measurement corresponding to the transition between quadrants, and set the average of the historical values as the expected transition angle corresponding to the transition between quadrants.

The processor can be further configured to: in response to starting up from a low-power mode, compare a quadrant corresponding to the angle measurement to the quadrant measurement, determine that the quadrant corresponding to the angle measurement does not match the quadrant measurement, and indicate the fault in response to determining that the quadrant corresponding to the angle measurement does not match the quadrant measurement.

The processor can be further configured to: determine that the angle measurement deviates from an expected range of angles corresponding to the quadrant measurement by more than a threshold value, and indicate the fault in response to determining that the angle measurement deviates from the expected range of angles by more than the threshold value.

In another aspect, there is provided a motor control system as set out in claim <NUM>.

In yet another aspect, there is provided a method as set out in claim <NUM>.

The magnetic field angle sensor can comprise a first magnetic field angle sensor, the signal processing path comprises a first signal processing path, and the angle measurement comprises a first angle measurement, and the magnetic field turn sensor system further comprises: a second magnetic field angle sensor, and a second signal processing path configured to receive an output from the second magnetic field angle sensor and generate a second angle measurement based on the output, the method further comprising: receiving the second angle measurement from the second signal processing path; determining that the first angle measurement differs from the second angle measurement by greater than a threshold angle; and indicating the fault in response to determining that the first angle measurement differs from the second angle measurement by greater than the threshold angle.

The method can further comprise: determining that the angle measurement does not deviate from the expected transition angle by more than the threshold value; and refraining from indicating the fault in response to determining that the angle measurement does not deviate from the expected transition angle by more than the threshold value.

The method can further comprise: in response to starting up from a low-power mode, comparing a quadrant corresponding to the angle measurement to the quadrant measurement; determining that the quadrant corresponding to the angle measurement does not match the quadrant measurement; and indicating the fault in response to determining that the quadrant corresponding to the angle measurement does not match the quadrant measurement.

These drawings and the associated description herein are provided to illustrate specific embodiments of the invention and are not intended to be limiting.

Various aspects of the novel systems, apparatuses, and methods are described more fully hereinafter with reference to the accompanying drawings. Aspects of this disclosure may, however, be embodied in many different forms and should not be construed as limited to any specific structure or function presented throughout this disclosure. Rather, these aspects are provided so that this disclosure will be thorough and complete.

Aspects of the disclosure are intended to be broadly applicable to different wired and wireless technologies, system configurations, networks, including optical networks, hard disks, and transmission protocols, some of which are illustrated by way of example in the figures and in the following description of the preferred aspects. The detailed description and drawings are merely illustrative of the disclosure rather than limiting, the scope of the disclosure being defined by the appended claims.

In this description, reference is made to the drawings where like reference numerals can indicate identical or functionally similar elements. It will be understood that elements illustrated in the figures are not necessarily drawn to scale. Moreover, it will be understood that certain embodiments can include more elements than illustrated in a drawing and/or a subset of the elements illustrated in a drawing. Further, some embodiments can incorporate any suitable combination of features from two or more drawings.

<FIG> are schematic diagrams of example implementations of an error detecting system according to certain embodiments. The illustrated implementation <NUM> includes a shaft <NUM>, a magnet <NUM>, a magnetic field turn sensor system or sensing circuit <NUM>, and a circuit board <NUM>. Embodiments of the sensing circuit <NUM> are further described in connection with <FIG><NUM> below. The magnet <NUM> can be attached to the rotating shaft <NUM>. The rotating shaft <NUM> can be associated with a steering wheel of a motor vehicle in certain implementations. The sensing circuit <NUM> can sense changes in position of the magnet <NUM> and provide an indication of rotation of the rotating shaft <NUM>. A position relationship between the sensing circuit <NUM> and the magnet <NUM> illustrated in <FIG> is for illustration purposes. In another embodiment, the implementation can use an end-of-shaft configuration where the magnet <NUM> can be a dipole magnet located at the end of the shaft <NUM> and the sensing circuit <NUM> can be located under the magnet <NUM>. The position relationship can vary. In one embodiment, the sensing circuit <NUM> can comprise two sensors, i.e., a first sensor and a second sensor. The second sensor can be the same as or different from the first sensor. For example, the second sensor can use different sensing principle and different signal chain design to ensure robustness.

In embodiments, magnetic sensors such as anisotropic magnetoresistive (AMR) sensors, giant magnetoresistive (GMR), or tunneling magnetoresistive (TMR) sensors, or any other suitable magnetoresistive (XMR) sensors can be used to implement the disclosed apparatus and/or methods. In some embodiments, the magnetic sensors can measure the change in resistivity that is proportional to the magnetization direction of a free layer in the magnetoresistive sensor. By using magnetic sensors, such as AMR sensors and TMR sensors, and various combinations of sensing elements of the magnetic sensor, error(s) can be detected.

In certain motor control applications, it is beneficial to monitor the number of turns through which the shaft <NUM> rotates, even when the motor controller is powered off. Such systems can occur where there is a possibility of the shaft <NUM> being moved by an external force while the system is powered off. To address this challenge, a low-power circuit (which can be included as a portion of the sensing circuit <NUM>) can be configured to continuously monitor the rotation of the shaft <NUM> while the rest of the motor control system is powered down.

An example of a system for which it can be beneficial to monitor the rotation or number of turns of a shaft <NUM> is and Electric Power Assisted Steering (ePAS) system in an automobile. In many ePAS systems, the shaft <NUM> angle is monitored as part of a motor control function when the system is normally operating. A low-power sensing circuit <NUM> can also used to keep track of shaft <NUM> turns during normal operation.

The number of turns through which the motor shaft <NUM> has rotated may be a critical variable for certain vehicle functions. For example, errors in a turn count measurement for a steering wheel shaft can result in detection of an incorrect steering angle, which can lead to a hazardous situation. Therefore, it can be important to correctly measure the turn count, and that flag any errors in angle measurement to the motor control system. Providing diagnostic coverage to a low-power turn counter is difficult because typical diagnostic techniques may consume additional power. For example, low power rotation sensing circuits <NUM> may have a limited power consumption budget since consuming too much power while the automobile is off may prematurely drain the automobile battery. Thus, adding error detection diagnostics which consume too much additional power can result in the power usage of the sensing circuits <NUM> exceeding the power consumption budget.

In this disclosure, the sensing circuit <NUM> uses angle measurements from one of more signal processing paths to monitor transition angles between quadrants measured by the sensing circuit. Errors in the components of the sensing circuit <NUM> are detected by comparing the measured transition angles to expected transition angles. For example, certain errors in the components of the sensing circuit <NUM> will affect the specific angles at which the sensing circuit <NUM> transitions between quadrants, which can be detected by comparing the measured transition angles to predetermined expected transition angles.

Aspects of this disclosure can be implemented in a magnetic angle sensor including, for example, the sensing circuit <NUM>. Such a magnetic sensor can include AMR sensing elements and TMR sensing elements, signal conditioning electronics and an interface. Depending on the implementation, the interface may include one or more of the following: serial peripheral interface (SPI), single edge nibble transmission (SENT) interface, peripheral acceleration sensor (PAS) interface, such as PAS4, etc. In one application, the interface can be a PAS interface, such as a PAS4 interface for remote accelerometers used for airbag deployment in vehicles, for communication with a host electronic control unit (ECU). The magnetic angle sensor can be implemented in an automotive ePAS system. Such a system has a functional safety specification defined in accordance with ISO-<NUM>, which is a functional safety standard for road vehicles. The principles and advantages discussed herein can be implemented to detect errors in the turn count measurements of the shaft <NUM> (e.g., which may be associated with a steering wheel) while the sensing circuit <NUM> is operating in low-power mode in an ePAS system to satisfy a functional safety specification. In other instances, the illustrated implementation <NUM> can be used in other systems complying with other specifications or standards, or systems requiring error detection in low-power turn count applications.

As described herein, the magnetic sensor typically includes two full bridges, e.g., a cosine bridge and a sine bridge. Each of the cosine bridge and the sine bridge outputs voltages, i.e., VCOS and VSIN, respectively. For example, in AMR sensor using single dipole magnet, "electrical angle" can be understood as the angle calculated from arctan (VSIN/NCOS), and "magnetic angle," that is expressed as ANGLEMAG herein, can be calculated by dividing the "electric angle" by two (<NUM>). For an AMR where the two bridges are rotated at approximately <NUM>° from each other, the outputs of the two bridges are sinusoidal with a relative phase shift of approximately <NUM>°, and the sensor's electrical response is twice the magnetic angle. In another example, for a TMR sensor, the "electric angle" can be same as the "magnetic angle. " Further, "mechanical angle" can be understood as the angle determined based on the magnet design, which can be reflected in a mechanical-to-magnetic angle transfer function. The "mechanical angle" and "magnetic angle" can be the same or different from each other. For example, in embodiments using a single pole-pair magnet, the "mechanical angle" and "magnetic angle" are the same. In embodiments using a multi-pole magnet, such a pole-ring, the "mechanical angle" can be expressed as (ANGLEMAG/N), where N is the number of pole pairs.

In some embodiments, the systems and methods disclosed herein may be applied to an apparatus having a rotating shaft, which may include one or more magnetic elements such as dipole or ring magnets. A measurement of the magnetic field by the sensing elements can be used to determine the angle of rotation of the shaft.

<FIG> shows a diagram of example implementation of a first sensor <NUM> according to one embodiment. A first sensor <NUM> comprises one or more half bridges. Sensors <NUM> including two or more half bridges can be configured as one or more full bridges. The example first sensor <NUM> illustrated in <FIG> includes eight sensing elements R1-R8 that are configured as a system of four half bridges. As illustrated in <FIG>, the first sensor <NUM> includes sensing elements R1 and R3 forming a first half bridge having an output V1; sensing elements R2 and R4 forming a second half bridge having a second output V2; sensing elements R5 and R7 forming a third half bridge having an output V3; and sensing elements R6 and R8 forming a fourth half bridge having an output V4.

A plurality of half bridges (or full bridges which are paired half bridges) of the half bridge system can be oriented at an angle relative to one another and configured to be sensitive to magnetic fields in different directions. In <FIG>, the full bridge including sensing elements R1-R4 and the full bridge including sensing elements R5-R8 are oriented an angle α relative to each other. In the illustrated embodiment, α = approximately <NUM>°. In an embodiment, each of the two-paired half bridges (which are full bridges) can form individual channels, i.e., first channel and second channel, each of which is a path between the first sensor and an interface. Here, one full bridge can correspond to a cosine bridge and the other bridge can correspond to a sine bridge. For example, the cosine bridge can comprise the sensing elements R1-R4, the sine bridge can comprise the sensing elements R5-R8, where V2-V1 = VCOS and V4-V3 = VSIN. One bridge of the sine and the cosine bridges can be included in the first channel, which is a first path from the first sensor <NUM> to an interface. The other of the sine and cosine bridges can be included in the second channel, which is a second path from the first sensor <NUM> to the interface. The first path is different from the second path. In other embodiments, the system of half bridges may include more or fewer half bridges than the embodiment illustrated in <FIG>.

<FIG> is a block diagram illustrating a configuration of a plurality of comparators <NUM> that can be used to determine the quadrant in which the angle of the shaft <NUM> is current located in accordance with aspects of this disclosure. For example, the configuration illustrates a sine full bridge 203a and a cosine full bridge 203b, which may be similar to the full bridges illustrated in <FIG>. The sine bridge 203a is configured to generate a positive output 207P and a negative output <NUM> and the cosine bridge 203b is also configured to generate a positive output 205P and a negative output <NUM>. The outputs 205P, <NUM>, 207P, and <NUM> from the sine and cosine bridges 203a and 203b will vary depending on the current orientation of the shaft <NUM>. In more detail, the positive and negative outputs 205P and <NUM> from the cosine bridge 203b are provided to a first comparator 126a while the positive and negative outputs 207P and <NUM> from the sine bridge 203a are provided to a second comparator 126b.

<FIG> illustrates an example of the outputs 205P, <NUM>, 207P, and <NUM> from the sine and cosine bridges 203a and 203b which are supplied to the first and second comparators 126a and 126b in accordance with aspects of this disclosure. As shown in <FIG>, each of the outputs 205P, <NUM>, 207P, and <NUM> varies as the shaft <NUM> is rotated through <NUM>°. Taking the positive and negative outputs 205P and <NUM> from the cosine bridge 203b as an example, the outputs 205P and <NUM> cross each other as the shaft <NUM> is rotated at two points separated by <NUM>°. The positive and negative outputs 207P and <NUM> from the sine bridge 203a also cross each other at two points separated by <NUM>° which are offset from the outputs 205P and <NUM> from the cosine bridge 203b by <NUM>°. With reference to <FIG> and <FIG>, the first comparator 126a compares the values of the outputs 205P and <NUM> from the cosine bridge 203a to produce a first digital output <NUM> (which is illustrated in both signal and digital representations) and the second comparator 126b compares the values of the outputs 207P and <NUM> from the sine bridge 203b to provide a second digital output <NUM> (also shown in signal and digital representations). A processor can use the first and second digital outputs <NUM> and <NUM> to identify which quadrant in which the angle of the shaft is currently located.

<FIG> is a block diagram of an example implementation of a magnetic field turn sensor system <NUM> configured to detect errors in turn count according to aspects of this disclosure. In particular, the magnetic field turn sensor system <NUM> includes a first signal processing path <NUM>, a second signal processing path <NUM>, a turn count path <NUM>, a processing unit <NUM> connected to each of the first and second signal processing paths <NUM> and <NUM> and the turn count path <NUM>, and a memory <NUM>. The first signal processing path <NUM> includes a first sensor <NUM>, an amplifier <NUM>, an analog-to-digital converter (ADC) <NUM>, and an angle calculator <NUM>. The second signal processing path <NUM> includes a second sensor <NUM>, an amplifier <NUM>, an ADC <NUM>, and an angle calculator <NUM>. In certain embodiments, the components of the first and second signal processing paths <NUM> and <NUM> may be substantially the same. Additionally, in some implementations, each of the first and second signal processing paths <NUM> and <NUM> may include a pair of amplifiers <NUM> and <NUM> and a pair of ADCs <NUM> and <NUM>. The turn count path <NUM> includes one or more comparator(s) <NUM> and a quadrant calculator <NUM>. As shown in <FIG>, the comparator(s) <NUM> are configured to receive an output from the second sensor <NUM> of the second signal processing path <NUM>. However, in other embodiments, the comparator(s) <NUM> may be configured to receive an output from the first sensor <NUM> or from both of the first and second sensors <NUM> and <NUM>.

The memory <NUM> can be configured to store an expected transition angle at which the turn count path <NUM> will transition between quadrants. In some embodiments, the memory <NUM> can also be configured to store historical values of the angles at which the turn count path <NUM> transitions between quadrants. The expected transition angle can be used to detect error(s) in the comparator(s) <NUM>, which is described in detail herein.

The processor <NUM> is configured to receive an angle measurement from each of the first and second processing paths <NUM> and <NUM> and a quadrant measurement from the turn count path <NUM>. The processor <NUM> can determine an angle of the shaft <NUM> based on the angle measurements received from the first and second processing paths <NUM> and <NUM>. The processor <NUM> can also determine a turn count (e.g., a number of turns that the shaft <NUM> has been rotated with respect to a neutral position which may be defined as a "zero" turn position) by tracking the quadrant measurement from the turn count path <NUM> over time.

There are a number of potential locations at which errors may occur within the magnetic field turn sensor system <NUM>. Specifically, errors which may ultimately affect the turn count determined by the processor <NUM> include error(s) occurring in: the second sensor <NUM>, the comparator(s) <NUM>, and/or the quadrant calculator <NUM>. Accordingly, in order for the processor <NUM> to flag potential errors in the turn count to the motor control system, aspects of this disclosure relate to systems and techniques that can be used to detect each of the above sources of error.

To detect potential error(s) in the second sensor <NUM> and/or certain errors in the quadrant calculator <NUM>, the processor <NUM> can be configured to exploit the redundancy of the first and second signal processing paths <NUM> and <NUM>. For example, if the magnetic field turn sensor system <NUM> is operating without error, the angle measurements provided by each of the first and second signal processing paths <NUM> and <NUM> should be the same or approximately the same. Thus, in the event that an error (e.g., an offset) has occurred in the second sensor <NUM>, the angle measurements provided by the first and second signal processing paths <NUM> and <NUM> will diverge. For example, an offset may refer to a fixed difference between the measured angle and the actual angle, irrespective of the actual angle. In some circumstances, a voltage offset on one of the half bridge outputs 205P, <NUM>, 207P, and <NUM> can change the differential voltage output of the bridge and cause an angle error. An offset may also be caused by a defect in one or more of the bridge elements R1-R8.

Another example error which can occur is a gain error which may refer to a difference between the actual angle and measured angle, which may increase linearly with actual angle. In some cases, a gain error may affect one of the bridge paths, such that the cosine bridge outputs 205P and <NUM> and the sine bridge outputs 207P and <NUM> have different amplitudes, or a defect causing an open in a bridge output, which can make it appear that the direction of rotation has changed. Yet another example error which can occur is a nonlinearity is a difference between the measured and actual angle which varies non-linearly with actual angle. Still yet another example error includes a timing error controlling the calibration of one or more bridge signal processing paths <NUM> and <NUM> which can cause calibration to be misapplied.

<FIG> is a flowchart of an example implementation of a method <NUM> for detecting errors in the second sensor <NUM> in accordance with aspects of this disclosure. The method <NUM> may be performed by the processor <NUM> of the magnetic field turn sensor system <NUM>. However, in other embodiments, certain blocks of the method <NUM> may instead be performed by other components which may be located, for example, on the circuit board <NUM>. In some embodiments in which the turn count path <NUM> receives output from each of the first sensor <NUM> and the second sensor <NUM>, the method <NUM> may be modified to detect error(s) in both of the first and second sensors <NUM> and <NUM>.

The method <NUM> begins at block <NUM>. At block <NUM>, the processor <NUM> receives a first angle measurement from the first signal processing path <NUM> and a second angle measurement from the second signal processing path <NUM>. At block <NUM>, the processor <NUM> compares the first and second angle measurements to each other. At block <NUM>, the processor <NUM> determines whether the difference between the first and second angle measurements is greater than a threshold value.

In response to the difference between the first and second angle measurements being greater than a threshold value, the method <NUM> proceeds to block <NUM>, at which the processor indicates a possible fault in the angle measurements. That is, if the individual measurements of the angle of the shaft <NUM> as determined by the first and second signal processing paths <NUM> and <NUM> differ by more than a threshold value, the processor <NUM> can flag this inconsistency as potentially indicating that there is an error in one of the first and second sensors <NUM> and <NUM>. When the automobile is turned on, the motor control system can receive the fault from the processor <NUM> of the magnetic field turn sensor system <NUM> and take one or more actions to mitigate potential errors in the turn count sensor.

In response to the difference between the first and second angle measurements being less than a threshold value, the method <NUM> proceeds to block <NUM>, at which the method <NUM> ends. In some implementations, the method <NUM> may be performed in a loop such that the method <NUM> returns to block <NUM> after ending at block <NUM> such that a new set of angle measurements can be compared.

In addition to detecting potential error(s) in the second sensor <NUM>, the magnetic field turn sensor system <NUM> is configured to detect potential error(s) in the comparator(s) <NUM> by detecting whether the angle(s) at which the shaft <NUM> transitions between quadrants deviates from expected transition angle(s). In particular, when there are no errors in the magnetic field turn sensor system <NUM>, the specific quadrant measurement as determined by the turn count path <NUM> as the shaft <NUM> rotates will transition from a current quadrant to an adjacent quadrant at a known and repeatable angle (e.g., an expected transition angle). However, if there are error(s) in the comparator(s) <NUM>, the specific angle at which the turn count path <NUM> detects a transition between quadrants will deviate from the expected transition angle. Thus, by detecting a deviation between the angle at which the transition between quadrants occurs and the expected transition angle, the magnetic field turn sensor system <NUM> can determine that there is an error in one or more of the comparators <NUM>.

The quadrant measurement output from the turn count path <NUM> can be used by the processor <NUM> to determine the turn count of the shaft <NUM> while the motor control system (e.g., used to control a motor vehicle) is powered off. It is important for safety of the motor control system to track rotation of the shaft <NUM> while the system is powered off such that upon powering the system on, the system can rely on the turn count provided by the magnetic field turn sensor system <NUM>. For example, if the shaft <NUM> connected to the vehicle's steering wheel were to be rotated <NUM>° while the motor control system is powered off, without knowledge of this rotation, the steering angle commanded by the motor control system would deviate from the intended position of the steering wheel due to the undetected rotation of the shaft <NUM>.

In some embodiments, to determine that the magnetic field turn sensor system <NUM> is functional at start up, the processor <NUM> can compare the turn count quadrant received from the quadrant calculator <NUM> to the quadrant corresponding to the angle received from the angle calculators <NUM> and <NUM> to ensure that the two quadrants match. For example, if the turn quadrant calculator <NUM> reports quadrant <NUM> (or octant 3a in the case that octants are output) and the angle calculators <NUM> and <NUM> report angles that are within quadrant <NUM> (or octant 3a), then the processor <NUM> will not generate a fault. In contrast, if the angle calculators <NUM> and <NUM> report angles that do not fall within quadrant <NUM> (or octant 3a), then the processor <NUM> will generate a fault, which may be interpreted as a fault within the quadrant calculator <NUM>.

<FIG> is a flowchart of an example implementation of a method <NUM> for detecting errors in the comparator(s) <NUM> in accordance with aspects of this disclosure. The method <NUM> may be performed by the processor <NUM> of the magnetic field turn sensor system <NUM>. However, in other embodiments, certain blocks of the method <NUM> may instead be performed by other components which may be located, for example, on the circuit board <NUM>.

The method <NUM> begins at block <NUM>. At block <NUM>, the processor <NUM> receives a quadrant measurement from a turn count path <NUM>. Depending on the embodiment, the magnetic field turn sensor system <NUM> can include a single signal processing path <NUM> or a first signal processing path <NUM> and a second signal processing path <NUM>. The turn count path <NUM> is configured to receive output from a magnetic field angle sensor of at least one of the first and second signal processing paths <NUM> and <NUM>.

At block <NUM>, the processor <NUM> determines that the quadrant measurement is indicative of a transition between quadrants. For example, in some embodiments, the processor <NUM> can determine that the quadrant measurement indicates a different quadrant with respect to a previously received quadrant measurement, and thus, that the shaft <NUM> has transitioned between quadrants. As described above, the quadrant calculator <NUM> can output the quadrant measurement to the processor <NUM> based on the first and second digital outputs <NUM> and <NUM> received from the comparators <NUM>.

At block <NUM>, the processor <NUM> obtains an expected transition angle at which the quadrant measurement is indicative of the transition between quadrants. In some implementations, the processor <NUM> can obtain the expected transition angle from the memory <NUM>. For example, the memory <NUM> can store the expected transition angle which may be preprogrammed into the memory <NUM> based on the characteristics of the magnetic field turn sensor system <NUM>. In some embodiments, the expected transition angle can be hard coded into digital logic. In certain implementations, the processor <NUM> may store historical values of quadrant transition angles in the memory <NUM> as the shaft <NUM> is rotated. For example, the processor <NUM> may store the angle measurements received from the first and second signal processing paths <NUM> and <NUM> in the memory <NUM> as historical transition angles when the turn count path <NUM> indicates a transition between quadrants. The processor <NUM> can use the stored historical transition angles to determine the expected transition angles. In some embodiments, the processor <NUM> may average the historical transition angles for a given transition between quadrants to determine a corresponding expected transition angle. Advantageously, storing the historical values of quadrant transition angles can allow for drift in the system over time to be adjusted for. However, aspects of this disclosure are not limited to using an average of the historical transition angles and the processor <NUM> can determine the expected transition angle using other techniques (e.g., determining a mean value).

At block <NUM>, the processor <NUM> receives an angle measurement from a signal processing path (e.g., from at least one of the first signal processing path <NUM> and the second signal processing path <NUM>). At block <NUM>, the processor <NUM> determines that the angle measurement deviates from the expected transition angle by more than a threshold value, which may be stored in memory <NUM> in certain embodiments. For example, the processor <NUM> can compare the angle measurement to the expected transition angle and determine whether the difference between the angle measurement and the expected transition angle is greater than the threshold value. If the difference is less than the threshold value, the processor <NUM> can determine that no error has occurred in the comparators <NUM> and return to block <NUM>. However, if the difference is greater than the threshold value, the processor <NUM> can continue to block <NUM>.

At block <NUM>, the processor <NUM> indicates a fault in response to determining that the angle measurement deviates from the expected transition angle by more than the threshold value. The processor <NUM> can provide the indication of the fault to the motor control system, which can in turn take one or more actions to mitigate potential errors in the turn count sensor when the vehicle is turned on. The method <NUM> ends at block <NUM>.

<FIG> is a flowchart of an example implementation of a method <NUM> for detecting errors in the comparator(s) <NUM> in accordance with aspects of this disclosure. The method <NUM> may be performed by the processor <NUM> of the magnetic field turn sensor system <NUM>. However, in other embodiments, certain blocks of the method <NUM> may instead be performed by other components which may be located, for example, on the circuit board <NUM>. While the method <NUM> is illustrated as a separate process from the method <NUM> shown in <FIG>, in some implementations, methods <NUM> and <NUM> can be run in parallel to detect errors in the comparator(s) <NUM> or other parts of the magnetic field turn sensor system <NUM>.

The method <NUM> begins at block <NUM>. At block <NUM>, the magnetic field turn sensor system <NUM> starts up from a low power mode. At block <NUM>, the processor <NUM> compares a quadrant corresponding to an angle measurement from a signal processing path (e.g., from at least one of the first signal processing path <NUM> and the second signal processing path <NUM>) to a quadrant measurement received from a turn count path <NUM>. At block <NUM>, if the quadrants from the comparison in block <NUM> match, the method <NUM> will continue at block <NUM>. Otherwise, if the quadrants from the comparison in block <NUM> do not match, the method will continue at block <NUM>.

For example, if the turn quadrant calculator <NUM> reports quadrant <NUM> (or octant 3a in the case that octants are output) and the angle calculators <NUM> and 124report angles that are within quadrant <NUM> (or octant 3a), then the processor <NUM> will not generate a fault. In contrast, if the angle calculators <NUM> and <NUM> report angles that do not fall within quadrant <NUM> (or octant 3a), then the processor <NUM> will generate a fault, which may be interpreted as a fault within the quadrant calculator <NUM>.

At block <NUM>, the processor <NUM> received updated values of the angle measurement and the quadrant measurement. At block <NUM>, the processor compares the angle measurement to an expected range of angles corresponding to the quadrant measurement. At block <NUM>, if the angle measurement matches or is within a threshold of the expected range of angles, the method <NUM> will return to block <NUM>. Otherwise, if the angle measurement different from the expected range of angles by more than a threshold (e.g., the angle measurement is greater than a threshold angle away from the expected range of angles), the method will continue at block <NUM>.

At block <NUM>, the processor <NUM> indicates a fault in response to determining that the angle measurement deviates from the expected range of angles corresponding to the quadrant measurement. The processor <NUM> can provide the indication of the fault to the motor control system, which can in turn take one or more actions to mitigate potential errors in the turn count sensor when the vehicle is turned on. Advantageously, by detecting whether the quadrant corresponding to the angle measurement matches the quadrant measurement, the method <NUM> can detect errors in which the quadrant measurement is "stuck" at a certain value. The method <NUM> ends at block <NUM>.

Aspects of this disclosure can be implemented in various electronic devices. Examples of the electronic devices can include, but are not limited to, consumer electronic products, parts of the consumer electronic products, electronic test equipment, vehicular electronics systems, etc. Examples of the electronic devices can include, but are not limited to, computing devices, communications devices, electronic household appliances, automotive electronics systems, etc. Further, the electronic devices can include unfinished products.

Unless the context clearly requires otherwise, throughout the description and the claims, the words "comprise," "comprising," "include," "including," and the like are to be construed in an inclusive sense, as opposed to an exclusive or exhaustive sense; that is to say, in the sense of "including, but not limited to. " Additionally, the words "herein," "above," "below," and words of similar import, when used in this application, shall refer to this application as a whole and not to any particular portions of this application. Where the context permits, words in the above Detailed Description of Certain Embodiments using the singular or plural number may also include the plural or singular number respectively. Where the context permits, the word "or" in reference to a list of two or more items is intended to cover all of the following interpretations of the word: any of the items in the list, all of the items in the list, and any combination of the items in the list.

Moreover, conditional language used herein, such as, among others, "can," "could," "might," "may," "e.g.," "for example," "such as" and the like, unless specifically stated otherwise, or otherwise understood within the context as used, is generally intended to convey that certain embodiments include, while other embodiments do not include, certain features, elements and/or states. Thus, such conditional language is not generally intended to imply that features, elements and/or states are in any way required for one or more embodiments or that one or more embodiments necessarily include logic for deciding, with or without author input or prompting, whether these features, elements and/or states are included or are to be performed in any particular embodiment.

The foregoing description and claims may refer to elements or features as being "connected" or "coupled" together. As used herein, unless expressly stated otherwise, "connected" means that one element/feature is directly or indirectly connected to another element/feature, and not necessarily mechanically. Likewise, unless expressly stated otherwise, "coupled" means that one element/feature is directly or indirectly coupled to another element/feature, and not necessarily mechanically. Thus, although the various schematics shown in the Figures depict example arrangements of elements and components, additional intervening elements, devices, features, or components may be present in an actual embodiment (assuming that the functionality of the depicted circuits is not adversely affected).

For example, "determining" may include calculating, computing, processing, deriving, investigating, looking up (e.g., looking up in a Table, a database or another data structure), ascertaining and the like. Further, a "channel width" as used herein may encompass or may also be referred to as a bandwidth in certain aspects.

The various operations of methods described above may be performed by any suitable means capable of performing the operations, such as various hardware and/or software component(s), circuits, and/or module(s). Generally, any operations illustrated in the Figures may be performed by corresponding functional means capable of performing the operations.

The various illustrative logical blocks, modules, and circuits described in connection with the present disclosure may be implemented or performed with a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array signal (FPGA) or other programmable logic device (PLD), discrete gate or transistor logic, discrete hardware components or any combination thereof designed to perform the functions described herein. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any commercially available processor, controller, microcontroller or state machine.

Claim 1:
A magnetic field turn sensor system (<NUM>), comprising:
a magnetic field angle sensor (<NUM>);
a signal processing path (<NUM>) configured to receive an output from the magnetic field angle sensor and generate an angle measurement based on the output;
a turn count path (<NUM>) configured to process the output from the magnetic field angle sensor and output a quadrant measurement based on the output; and
a processor (<NUM>) configured to:
receive the quadrant measurement from the turn count path,
determine that the quadrant measurement is indicative of a transition between quadrants, characterized in that the processor (<NUM>) is further configured to
obtain an expected transition angle at which the quadrant measurement is indicative of the transition between quadrants,
receive the angle measurement from the signal processing path, the angle measurement indicating a measured transition angle at which the transition between quadrants occurred,
determine that the measured transition angle deviates from the expected transition angle by more than a threshold value, and
indicate a fault in response to determining that the measured transition angle deviates from the expected transition angle by more than the threshold value.