BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a signal processing circuit for processing three detection signals, the three detection signals being output from a magnetic sensor device and having correspondences with components in three mutually different directions of a magnetic field applied to the magnetic sensor device, and to a position detection device and a magnetic sensor system each including the signal processing circuit.

2. Description of the Related Art

A magnetic sensor device for detecting components in a plurality of directions of an applied magnetic field has recently been used in a variety of applications. An example of the applications of such a magnetic sensor device is a magnetic position detection device for detecting the position of a three-dimensionally movable magnet, as disclosed in, for example, US 2009/0212766A1 and JP 2018-189512A.

The magnetic position detection device includes, for example, a magnetic sensor device, a magnet movable along a predetermined spherical surface around the magnetic sensor device, and a signal processing circuit. The magnetic sensor device detects three components in three mutually orthogonal directions of a magnetic field generated by the magnet and applied to the magnetic sensor device, and generates three detection signals corresponding to the three components. Based on the three detection signals, the signal processing circuit generates position information indicating the position of the magnet.

Such a magnetic position detection device can cause offsets in the three detection signals and consequently produce inaccurate position information if a disturbance magnetic field other than the magnetic field generated by the magnet is applied to the magnetic sensor device or the positional relationship between the magnetic sensor device and the magnet deviates from a desired one.

Methods for correcting offsets occurring in the three detection signals are known in the art. A typical one of the methods is as follows. With a set of values of the three detection signals at a certain timing taken as measurement data, and with coordinates that represent the measurement data in a three-dimensional orthogonal coordinate system taken as a measurement point, center coordinates of a virtual sphere having a spherical surface approximating the distribution of a plurality of measurement points at a plurality of timings are determined, and the determined center coordinates are used to correct the offsets.

US 2007/0086103A1 describes a magnetic sensor control device including: an input section for inputting a plurality of pieces of magnetic data each containing three components sequentially output from a three-dimensional magnetic sensor; a selection section for selecting four pieces of magnetic data satisfying a predetermined four-point selection condition from among the input plurality of pieces of magnetic data; a calculation section for calculating a center point equally distant from four points corresponding to the selected four pieces of magnetic data; and a setting section for setting the components of the center point as an offset of the magnetic data. US 2007/0086103 A1 also describes the importance of selecting the four points such that the four selected points are distributed evenly over a wide area on a spherical surface passing through the four points. The center point according to US 2007/0086103 A1 corresponds to the center coordinates of the virtual sphere described above.

Now, a description will be given of a problem arising in performing processing for determining the center coordinates of the virtual sphere used for offset correction by the signal processing circuit in the foregoing magnetic position detection device including the magnetic sensor device, the magnet and the signal processing circuit. To determine the center coordinates of the virtual sphere, four or more pieces of measurement data are needed. Hereinafter, a set of four or more pieces of measurement data serving as candidates for the measurement data to be used for determining the center coordinates of the virtual sphere will be referred to as a candidate data set.

For the position detection device, there may be cases where a candidate data set input to the signal processing circuit is unsuitable for determining the center coordinates of the virtual sphere. Examples of the candidate data set unsuitable for determining the center coordinates of the virtual sphere include a set of four or more pieces of measurement data corresponding to four or more measurement points located on a circle or distributed near a circle in the foregoing three-dimensional orthogonal coordinate system. If the candidate data set is a set of four or more pieces of measurement data corresponding to four or more measurement points located on a circle, it is not possible to determine the center coordinates of the virtual sphere by using the candidate data set. If the candidate data set is a set of four or more pieces of measurement data corresponding to four or more measurement points distributed near a circle, the accuracy of the center coordinates of the virtual sphere determined by using the candidate data set can be low. The occurrence of such a problem is significant in, for example, a position detection device applied to a joystick, such as ones described in US 2009/0212766A1 and JP 2018-189512A.

The technique described in US 2007/0086103A1 makes it possible to select four pieces of magnetic data suitable for determining the center point, i.e., the center coordinates of the virtual sphere. Disadvantageously, however, the technique described in US 2007/0086103A1 can sometimes require a long time to obtain four pieces of magnetic data satisfying the four-point selection condition, or can sometimes fail to obtain four pieces of magnetic data satisfying the four-point selection condition within a predetermined period of time.

SUMMARY OF THE INVENTION

It is an object of the present invention to provide a signal processing circuit, a position detection device and a magnetic sensor system that are capable of determining whether a candidate data set given to the signal processing circuit is suitable for determining the center coordinates of a virtual sphere used for offset correction.

A signal processing circuit of the present invention is a circuit for processing a first detection signal, a second detection signal and a third detection signal that have correspondences with components in three mutually different directions of a magnetic field at a reference position. The first to third detection signals are output from a magnetic sensor device that generates the first to third detection signals.

The signal processing circuit of the present invention performs first processing and second processing, with a set of values of the first to third detection signals at a certain timing being taken as measurement data and with coordinates that represent the measurement data in an orthogonal coordinate system that is defined by three axes for expressing the values of the first to third detection signals being taken as a measurement point. The first processing includes determining center coordinates of a virtual sphere having a spherical surface approximating a distribution of a plurality of measurement points at a plurality of timings by using four or more pieces of measurement data obtained at respective different timings.

The second processing includes determining whether a candidate data set is suitable for use in the first processing by using a determination data set, where the candidate data set is a set of four or more pieces of measurement data serving as candidates for the measurement data for use in the first processing, and the determination data set is a set of four or more pieces of measurement data that are all or part of the four or more pieces of measurement data constituting the candidate data set. The determining of whether the candidate data set is suitable for use in the first processing includes determining that the candidate data set is unsuitable for use in the first processing if four or more measurement points corresponding to the four or more pieces of measurement data constituting the determination data set in the orthogonal coordinate system satisfy a predetermined determination criterion indicating that the four or more measurement points are located on a plane or distributed over and in close vicinity of a plane, and otherwise, determining that the candidate data set is suitable for use in the first processing.

The signal processing circuit of the present invention may further perform offset correction processing. The offset correction processing may include correcting an offset of the first to third detection signals to generate first to third corrected signals by using the first to third detection signals and the center coordinates obtained by the first processing.

In the signal processing circuit of the present invention, the second processing may be performed in parallel with the first processing using the candidate data set. In such a case, the first processing may include outputting the determined center coordinates as proper center coordinates only if the candidate data set is determined to be suitable for use in the first processing by the second processing.

In the signal processing circuit of the present invention, the first processing may be performed by using the candidate data set determined to be suitable for use in the first processing by the second processing.

In the signal processing circuit of the present invention, the number of pieces of measurement data constituting the candidate data set may be five or more. In such a case, the number of pieces of measurement data constituting the determination data set may be less than the number of pieces of measurement data constituting the candidate data set. Alternatively, the number of pieces of measurement data constituting the determination data set may be equal to the number of pieces of measurement data constituting the candidate data set.

In the signal processing circuit of the present invention, the second processing may include processing for determining an approximate plane approximating a distribution of the four or more measurement points corresponding to the four or more pieces of measurement data constituting the determination data set in the orthogonal coordinate system by using the least squares method. In such a case, the predetermined determination criterion may be that a residual sum of squares obtained in determining the approximate plane is less than or equal to a predetermined threshold.

In the signal processing circuit of the present invention, the second processing may include processing for determining a first correlation coefficient between a first variable and a second variable, a second correlation coefficient between the second variable and a third variable, and a third correlation coefficient between the first variable and the third variable in the four or more pieces of measurement data constituting the determination data set, where the first variable is the value of the first detection signal, the second variable is the value of the second detection signal, and the third variable is the value of the third detection signal. In such a case, the predetermined determination criterion may be that at least one of the first, second or third correlation coefficient has an absolute value greater than or equal to a predetermined threshold.

In the signal processing circuit of the present invention, the number of pieces of measurement data constituting the determination data set may be four. In such a case, the second processing may include processing for determining a volume of a tetrahedron having four measurement points corresponding to the four pieces of measurement data constituting the determination data set in the orthogonal coordinate system as its four vertexes. The predetermined determination criterion may be that the volume of the tetrahedron is less than or equal to a predetermined threshold.

A position detection device of the present invention includes a magnetic field generator that generates a predetermined magnetic field, a magnetic sensor device, and the signal processing circuit of the present invention. The magnetic field generator is able to change its relative position with respect to the magnetic sensor device along a predetermined spherical surface. The magnetic sensor device generates the first to third detection signals.

A magnetic sensor system of the present invention includes a magnetic sensor device, and the signal processing circuit of the present invention. The magnetic sensor device includes a first magnetic sensor for generating the first detection signal, a second magnetic sensor for generating the second detection signal, and a third magnetic sensor for generating the third detection signal.

According to the signal processing circuit, the position detection device and the magnetic sensor system of the present invention, the second processing performed by the signal processing circuit makes it possible to determine whether the candidate data set given to the signal processing circuit is suitable for determining the center coordinates of the virtual sphere used for offset correction.

Other and further objects, features and advantages of the present invention will appear more fully from the following description.

