Foreign matter detector

Abstract: A foreign matter detector includes an oscillator (1) for generating an oscillating signal, a phase shifter (8) connected to the oscillator and adapted to provide a phase shifted oscillating signal, and an electromagnetic transducer. The transducer includes an excitation coil (3) connected to the oscillator and two interconnected detection coils (4, 5) magnetically coupled to the excitation coil and adapted to produce a differential signal therebetween when an object (30) is passed through the transducer. The detector also includes a first detector (7A) adapted to produce a first detected analog signal corresponding to the component of the differential signal in phase with the oscillating signal and a second detector (7B) adapted to produce a second detected analog signal corresponding to the component of the differential signal in phase with the phase shifted oscillating signal. The detector (7) further includes an analog to digital converter (12) connected to the first and second detectors adapted for converting the first and second analog detected signals into first and second series of digital values, respectively, circuitry (14) connected to the converter for weighting the digital values, and circuitry connected to the weighting circuitry for selecting a representative value for the object from each of the first and second series of the weighted digital values.

Description: Background of the Invention This invention relates to a detector for detecting intermediate products in raw materials or in wrapped finished products of food products or for detecting the presence of materials such as metals and other foreign matter in pharmaceutical products. This invention also relates to a detector for detecting in products a different quality from the inherent or standard quality of the actual product. For manufacturers, such as food product manufacturers and pharmaceutical manufacturers, the presence of foreign matter in raw materials could cause damage to processing equipment. Also, the presence of foreign matter in finished products poses problems with regard to health and safety of the products. For this reason, detectors have long been used for inspections at the point at which raw materials for food products or pharmaceutical products are supplied to processing equipment and for inspection at the shipping point of wrapped finished products in order to determine whether or not foreign matter was present in the products. As shown in Figs. 15 and 16, this type of prior art detector is provided with a primary coil 3 which generates an alternating magnetic field when a high-frequency electrical current is supplied. Two secondary coils 4 and 5 are positioned inside this electromagnetic field. These coils 4 and 5 are wound in opposite directions from each other and are interconnected in series. The detector utilizes the following phenomena which occur when the object being inspected is passed through the primary coil 3 and the two secondary coils 4 and 5 as indicated by arrow 31. If iron is contained in the object being inspected, the magnetic flux density will increase. The induced voltage of the secondary coil 4, which is closer to the point which the object is passing, will become higher than the induced voltage of the other secondary coil 5. Also, if a nonferrous metal is contained in the object, the eddy current occurring inside the nonferrous metal will cause a loss of the lines of magnetic force. As a result, the induced voltage of the secondary coil 4 will become lower than the induced voltage of the secondary coil 5. Some food products may contain water or salt which may generate a relatively large signal even though they do not contain foreign matter. This signal represents the product characteristics of the material. If ferrous or nonferrous foreign matter is contained in these materials, the combination of the signal from this foreign matter and the product characteristics described above result in a composite signal. However, because the signal resulting from the foreign matter will be small if the foreign matter is small, there is little difference between the signal generated by the product characteristics of the product itself and the combination of this signal and that caused by the foreign matter. This makes it difficult to detect the foreign matter. It is in consideration of problems such as this that detectors such as that described in Japanese Patent Provisional Publication Sho. 57-198880 have been proposed. In that detector, the oscillation signal from an oscillator is amplified via a phase adjuster to excite the primary coil. The difference in the induction voltages generated at the two secondary coils when the product passes through is used as the detection signal. This signal is first amplified and then split into two output signals. One of these output signals is detected using a chopper which is synchronized with the aforementioned oscillation signal to obtain an in-phase output signal. In addition, the other of these output signals is detected by a chopper which is provided with a phase difference of 90° with respect to the aforementioned oscillation signal to obtain a quadrature output signal. In this method, each of the obtained output signals passes through its own filter and is independently compared by a level comparator. However, with this type of detector, the detected and rectified signal (such as that shown in Figs. 2b and 2c) is shaped into a single (single-series) signal having either positive-negative peaks or negative-positive peaks for each batch of the product. Thus, because the detection signal is such that it has two peaks for each batch of the product, the first half of the signal and the second half of the signal must be identified as a single signal. However, if the products are fed in continuously at relatively short intervals, it is difficult to accurately identify the separate signals for each batch of material. In this regard, the technology for processing signals which are input continuously has been described in Japanese Patent Publication Sho. 62-53071. In that method, a positive-polarity signal comparator and a negative-polarity signal comparator are provided for the detected and rectified input signals. For example, input signals which indicate a positive polarity which exceeds a positive reference value are first input to the positive-polarity signal comparator. Input signals which indicate a negative polarity which are more negative than a negative reference value are then input to the negative-polarity signal comparator. The signal output from a monostable vibrator operated by the signal output from the positive-polarity signal comparator through a timer and the signal output by the negative-polarity signal comparator are then both processed by an AND circuit. Foreign matter is detected by this type of signal output as a result of this processing. In this method, because the identified signal indicates only information that foreign matter has been detected, there is no quantitative information provided such as information indicating the type or amount of foreign matter. Published International Patent Application No. WO-A-8 500 122 describes a system for sorting articles wherein an electromagnetic detection signal is generated which is subsequently digitised and weighted by a weighting function chosen in dependence on the characteristics of a sensor. Published European Patent Application No. EP-A-0 208 214 describes a system for detecting impurities in bakery products wherein an electromagnetic sensor output is digitised. However, there is no suggestion in this document of the weighting of the digitised values. US-A-3 457 500 describes an analog system for treating signals in well-logging apparatus. During processing, the analog signals are weighted by a weighted adding network. Published International Patent Application No. WO-A-8803273, published after the priority date of the present invention and designating only Germany, Italy, and the United Kingdom, of the states designated in the present application, describes apparatus for detecting an article such as metal or other contaminants in a food product. The system involves generating signals indicative of an electromagnetic parameter of the article and digitising the resulting signal. There is no suggestion of weighting the digitised signals. Summary of the Invention It would be desirable to provide a detector for detecting the presence of metals and other foreign matter which provides a detection signal which can be separately and clearly identified even when the signals are input continuously at relatively short intervals, and moreover, which provides detection signals containing quantitative information. It would further be desirable to provide a foreign matter detector which overcomes previously difficult problem of identifying each individual detected signal when the signals appear intermittently as doublet-wave detected signals by providing each signal as an easily identifiable waveform It would further be desirable to provide a foreign matter detector employing detection signals which can be converted from a doublet-wave signal having two polarities to a signal having a single maximum value. It is another object of this invention to provide a foreign matter detector employing a detection signal which retains quantitative information needed in detecting and/or identifying foreign matter after signal processing and conversion. In accordance with the present invention there is provided a detector for detecting a characteristic of an object comprising: means for providing a signal representative of an electromagnetic parameter of the object; means for converting said signal into a series of digital values; means for weighting said digital values; means for determining a representative value for the object from the weighted digital values; and means for comparing said representative value with a reference value, thereby to detect said characteristic; characterised in that: said characteristic is the presence of foreign matter; and said weighting means is arranged to weight said digital values by converting them into a series of weighted digital values having a single maximum amplitude value. Other features of the present invention will be apparent from the following description of preferred embodiments thereof. Brief Description of the Drawings Fig. 1 is a block diagram of a detector according to the invention; Figs. 2a-2c show analog signals at various stages in the detector; Fig. 3 shows a digital signal from one of the A/D converters in the detector; Figs. 4a-4c are graphic representations of various weighting functions; Fig. 5 shows a weighted digital signal from one of the weighting circuits in the detector; Fig. 6 is a block diagram of one form of weighting circuit for the detector; Fig. 7 shows the processing steps of the weighting performed in the circuit of Fig. 6; Fig. 8 is a two-axis coordinate system showing vectors which represent the detected values and types of metal; Fig. 9a shows a signal output from one of the smoothers/filters in the detector when two objects are passed in succession through the transducer; Fig. 9b shows a weighted signal obtained by weighting the signal of Fig. 9a; Figs. 10a and 10b are block diagrams of other forms of the weighting circuit for the detector; Fig. 11a shows monitoring of weighted digital values to obtain a primary value; Fig. 11b is a flowchart of a program for determining a primary (maximum) value; Fig. 12 shows a graph representing sample test data for objects having material effect; Fig. 13 shows a graph representing sample test data for objects having no material effect; Fig. 14 is a flowchart of a program for determining and indicating whether primary values are outside a region predetermined with sample test data; and Figs. 15 and 16 schematically show conventional, prior art electromagnetic transducers. Corresponding reference characters indicate corresponding parts throughout the several views of the drawings. Detailed Description of Preferred Embodiments In Fig. 1, an oscillator 1 generates a sine-wave electrical alternating current signal having a frequency which is selectable within a range of 30 to 400 kHz (high-frequency current). An amplifier 2 amplifies the sine-wave signal from the oscillator 1 and then supplies it to the primary or excitation coil 3 of a transducer, which is essentially the same as a differential transformer. The coil 3 generates an alternating electromagnetic field. The two secondary or detection coils 4 and 5 of the transducer are arranged in close proximity to this primary coil 3, one on each side, within and coupled to the alternating electromagnetic field so that they are coaxial with the primary coil 3 as shown in Fig. 15. The coils 3 through 5 may also be arranged in parallel planes as shown in Fig. 16. Coils 4 and 5 constitute means for providing a detected signal representative of an electromagnetic parameter of the object being evaluated. By connecting these secondary coils 4 and 5 so that they operate differentially (so that the induced voltages or induced currents cancel each other out), a detection means for detecting the difference in the induced signals which occur at these two secondary coils is formed. The output line from the secondary coils 4 and 5 is connected to an amplifier 6. The output side of this amplifier 6 is subsequently divided and connected to the input side of multiplier/detectors 7A and 7B. These multiplier/detectors 7A and 7B are essentially the same as the four-quadrant detectors or product detectors which are used in FM receivers. One of the signals which is divided after the amplifier 2 is input in the same phase to the multiplier/detector 7A for use as a reference signal. The divided signal is further divided and phase-delayed 90° by a phase shifter 8 for input to the other multiplication detector 7B as a reference signal. The respective output sides of the multiplier/detectors 7A and 7B are connected via smoother and filter 9A or smoother and filter 9B to the input sides of sample-and-hold circuits 11A and 11B, which temporarily store the signals in memory. The output sides of these sample-and-hold circuits 11A and 11B are connected to A/D converters 12A and 12B, respectively, which convert the analog signals into digital signals. The output sides of these A/D converters 12A and 12B are connected via weighting circuits 14A and 14B, respectively, to a control device (computing device) 15, which constitutes means for recognizing a primary value of the digital signals and for identifying foreign matter and material effect of the object. Control device 15 is equipped with an input interface 15A for inputting the aforementioned signals, a central processing unit (CPU) 15B, such as a microprocessor, which processes the input signals, and an output interface 15C for outputting the results of the processing. Control device 15 is connected to a timing control circuit 16 and a program control circuit 17. In order to control the timing, timing control circuit 16 is connected to the A/D converters 12A and 12B, the sample-and-hold circuits 11A and 11B, and the weighting circuits 14A and 14B. The program control circuit 17 is connected to a selector switch 18 for selecting the mode of operation from three settings: "sample test", "equations computation", and "operation". The output interface 15C of the control device 15 is connected to an alarm 19 such as a lamp or buzzer which emits a warning indication when foreign matter is detected and to an R/ indicator 20 which indicates the magnitude of the data and the phase angle. The data and phase angle represent the magnetic characteristics (parameters) or the type of material effect of the object, i.e., the type of foreign matter (metal, iron or non-ferrous metal, etc.) which has been detected in the object. Furthermore, the program control circuit 17 is connected to an execution button 21 which initiates operation of the control device 15, and to a stop button 22 which terminates operation of the control device 15. The program control circuit 17 is also connected to a sample mode selector switch 23 for switching the sample mode between "M" and "N" modes. A region coefficient setting device 24 for specifying the region of the coefficients of the discriminant equation is connected to the input interface 15A of the control device 15. Although the details will be explained later, the weighting circuits 14A and 14B are each shown in Fig. 6. In this embodiment weighting circuits 14A and 14B comprise n-1 stages of delay components 141, which are selected as appropriate in accordance with the sample time interval T and connected in cascade from the input sides to the output sides. The line to the input to each delay component 141 is divided. One branch of the division is connected to the next delay component. The other branch of the division and the output side of the last delay component is connected to the corresponding coefficient multipliers 142 o to 142 n-1 . Each of the output sides of the various coefficient multipliers 142 o to 142 n-1 is connected to a summer such as counter 143. By using digital computing, it is also possible for the weighting circuit to be comprised of a microcomputer having functions equivalent to the weighting circuit embodiment illustrated in Figure 6. As will be explained later, the method used by the weighting circuits 14A and 14B to assign the coefficients to the coefficient multipliers 142 o to 142 n-1 is an odd-function distribution. An odd function distribution is a function which is symmetrical with respect to the origin. For example, Y = sin ϑ where -π < ϑ < π is an odd function. The origin is the intersection of the X and Y planes of an X-Y coordinate system. In other words, each weighting circuit has a coefficient distribution in which the coefficients are assigned to the coefficient multipliers in such a manner that the origination point of the odd function is located at or near the center coefficient multiplier of the coefficient multipliers 142 o to 142 n-1 arranged in order, or with a similar coefficient distribution. In one preferred embodiment, the weighting coefficients have a distribution corresponding to the changes in time of the detected signal when a typical material such as iron passes through the primary and secondary coils. For example, the distribution of coefficients may be a waveform formed of an upward triangle and a downward triangle similar to that shown in Fig. 4a, or a one cycle sine-wave like that shown in Fig. 4b, or a waveform with a distribution comprised of two squares like that shown in Fig. 4c, or a distribution configuration similar to these waveforms. The weighting coefficients for each waveform are assigned in advance to the two weighting circuits 14A and 14B. SIGNAL DETECTION AND PROCESSING (WEIGHTING PROCESSING) The following is an explanation of the contents of the program stored in the memory of the control device 15. An explanation of the execution of the program and of the operations of the various components mentioned above as the program is executed is also described. When an object containing iron is passed through (or adjacent) the primary coil 3 and the secondary coils 4 and 5 for inspection the electromagnetic induction formed between the primary coil 3 and the secondary coils 4 and 5 changes as the object being inspected passes. An induced voltage (detection signal C xy ) with a shape such as that shown in Fig. 2a is generated as the differential output of the secondary coils 4 and 5. This detection signal C xy is amplified by the amplifier 6, and then input to the multiplier/detectors 7A and 7B. The detection signal which is input to the multiplier/detector 7A is detected by multiplication by a reference signal having a phase which is the same the phase of the signal produced by oscillator 1. That signal detected by detector 7A (referred to as in-phase detected signal X₁) has a waveform such as that shown in Fig. 2b. Meanwhile, the detection signal C xy input to the multiplier/detector 7B is detected by multiplication by a reference signal having a phase which is shifted 90° from the phase of the signal produced by oscillator 1. The signal detected by detector 7B (referred to as phase shifted detected signal Y₁) has a waveform such as that shown in Fig. 2b. The detected signals X₁ and Y₁ are processed by corresponding smoothers/filters 9A and 9B so that they become filtered signals X₂ and Y₂ with waveforms such as those shown in Fig. 2c. Filtered signal X₂ corresponds to the signal component of the differential signal which is in-phase with the signal of oscillator 1, and filtered signal Y₂ corresponds to the signal component of the differential signal which has a 90° phase delay from the signal of the oscillator 1. The filtered signals are temporarily stored in memory by the corresponding sample-and-hold circuits 11A and 11B. Each of the stored signals (which are analog signals) is converted to a digital signal by the corresponding A/D converters 12A and 12B. The sample-and-hold circuits 11A and 11B and the A/D converters 12A and 12B are all operated in synchronization by the timing control circuit 16. The analog signals are converted into digital signals at regular intervals and then input to the corresponding weighting circuits 14A and 14B. At the weighting circuits 14A and 14B, as mentioned earlier and as will be explained in detail below, weighting computation (processing) characterized by a time distribution is performed and the processed output signals X₃ and Y₃ are provided to the input interface 15A of the control device 15. Referring to the example illustrated in Fig. 3, when the processed output signal X₂ is input to the weighting circuit 14A, it is a discrete series of signals X(O), X(T), X(2T), ... X((n-1)T) at sample time intervals T. (For convenience, this explanation uses zero as the time of the first signal.) Each of weighting circuits 14A and 14B has a transfer function which is a series which can be expressed as a polynomial relating to Z⁻¹ to the order n-1, as shown in the following Equation (1). H (z) = K O + K₁Z⁻¹ + K₂Z⁻² + ... K n-1 Z -(n-1) (1) One preferred embodiment of weighting circuits 14A and 14B is shown in Fig. 6. Coefficients K O , K₁, K₂...K n-1 correspond to a sampling of the waveform illustrated in Fig. 4a, which resembles the changes over time of the signal detected when a typical material such as iron is passed through the primary and secondary coils. A typical waveform for iron is shown in Fig. 3. The sampling interval for the coefficients K₀, K₁, K₂, etc., which are shown in Fig. 4a is the same as the sample time interval T (see Fig. 3). When an input signal with a waveform such as that shown in Fig. 3 is input to a circuit having the transfer function of Equation (1) with its coefficients determined in this way, or to a circuit for which the coefficients are determined so as to make the circuit equivalent to the circuit with the composition shown in Fig. 6, a time series of data (output signals) such as that shown in Fig. 5 is obtained. For the weighting coefficients described above, it is possible to use a configuration having a distribution comprised of an upward triangle and a downward triangle similar to that shown in Fig. 4a, or a one cycle sine waveform like that shown in Fig. 4b, or a configuration having a distribution comprised of two squares like that shown in Fig. 4C, or a configuration similar to any of these waveforms. In other words, any configuration is acceptable as long as the distribution of the weighting coefficients has a limited width with respect to time. This width corresponds to the order (the order n-1 mentioned above) of the transfer function described above and it has a odd-function distribution wherein the part located at the center of that order is the origin point. As explained above, with the weighting coefficient configuration just described and an input signal such as that shown in Fig. 3, it is possible to obtain an output X₃ having substantially the same distribution configuration as that shown in Fig. 5. The Y₃ signal can also be obtained for the Y signal by processing in the same way as described above for the X signal. No matter which of the above configurations of weighting processing (Figs. 4a - 4c) is used, an input signal with the polarities shown in Fig. 3 will produce the output signal shown in Fig. 5 having configurational characteristics which make a series of changes over time which resemble: 0 → negative output → minimum value → increase → 0 → increase → maximum value → decrease → 0 → decrease → minimum value → increase → 0. The output signal shown in Fig. 5 has the following characteristics: (1) the amplitude of the maximum value is about twice that of the minimum value; (2) the polarity of the minimum value is the opposite of that of the maximum value; this minimum value appears twice at approximately an interval t₁ preceding and following the maximum value; and (3) the data of the output signal which precedes and follows the central maximum value is symmetrical or approximately symmetrical around that maximum value. Conversely, if the polarities of the input signal are the reverse of those shown in Fig. 3, an output signal X₃ or Y₃ having the exact opposite polarities from those described above is obtained. In other words, the output signal from the weighting means, to which an input signal such as shown in Fig. 3 is applied, has the characteristics of a discrete time-series output signal, which is distributed to be an even function with the origin point having the maximum value, if the time at which the time-series weighted signal has the maximum value is defined as the origin point of time. The duration of the pulse transfer function for weighting is most preferably substantially the same as the period for which a typical material, such as iron, passes through the coils. The maximum values of the signals X₃ and Y₃ are read by the identification section and used as the primary values X m and Y m , which are representative values of the signals (signal values). The circuit shown in Fig. 6, which is an actual circuit for realizing the weighting circuit described above, is a non-recursive type circuit. It is commonly known as an FIR filter (finite impulse response filter) and one of the characteristics of this invention is the method it uses to assign the coefficients. A detailed explanation of the functions of the circuit shown in Fig. 6 is as follows. This circuit has the composition described above. The signals input from the input side of the circuit pass through the coefficient multipliers 142 o -142 n-1 and are input to the counter 143 from which the sum is output. In this embodiment, m₀, m₁, m₂, m₃ ... m n-1 in Fig. 6 represent temporary memory locations for the data. It should be understood that there is a delay of sample time T for each delay component block. In this invention, the coefficients K₀, K₁, ... K n-1 are assigned by a distribution such as that shown in Fig. 4a. The details of the weighting computation can be explained in reference to the block diagram in Fig. 6 and the table in Fig. 7. When the first input X(0) is input to m₀, X(0) is multiplied by the coefficient K₀ of the coefficient multiplier 142₀, and [X(0) · K₀] is output from the counter 143. At the second sample time, the data X(0) is shifted from m₀ to m₁, and the data X(T) is input to m₀. At that time, the data X(0) is multiplied by the coefficient K₁ of the multiplier 142₁ and the data X(T) is multiplied by the coefficient K₀, the sum is added by the counter 143, and [x(0) · K₁ + X(T) · K₀] is output. At the third sample time, the data X(0) is shifted from m₁ to m₂, the data X(T) is shifted from m₀ to m₁, and the data X(2T) is input to m₀. At that time, the data X(0) is multiplied by the coefficient K₂ of the multiplier 142₂, the data X(T) is multiplied by the coefficient K₁, the data X(2T) is multiplied by the coefficient K₀. These are all added by the counter 143, and [X (0) · K₂ + X (T) · K₁ + X (2T) · K₀] is output. A Summary of the weighting processing procedure and the output results which occur when a signal having a waveform such as that shown in Fig. 3 is shown in Fig. 7. Note that, in Fig. 7, the memory locations (addresses) and the outputs which occur at each time are listed horizontally and the times are listed vertically. The shifts of the data which occur at each time are executed by the input of a timing signal from the timing control circuit 16 shown in Fig. 1. This is carried out in synchronization with the sample-and-hold circuits 11A and 11B and the A/D converters 12A and 12B. Thus, if the data in the memory addresses m₀, m₁, m₂, ... m n-2 , m n-1 is expressed as, respectively, Dx₀, Dx₁, Dx₂ ... Dx n-2 , Dx n-1 , the output X₃ of the weighting circuit can be found by the following Equation (2). K₀Dx₀ + K₁Dx₁ + K₂Dx₂ + ... + K n-2 Dx n-2 + K n-1 DX n-1 = X₃ (2) Similarly, the output Y₃ can be found by the following Equation (2)'; K₀Dy₀ + K₁Dy₁ + K₂Dy₂ + ... + K n-2 Dy n-2 + K n-1 Dy n-1 = Y₃ (2)' With a weighting coefficient having a waveform such as that shown in Fig. 4c, the absolute values of the weighting circuit are all identical values and the polarities are simply positive and negative. It is possible to obtain the output value by using a non-recursive type weighting circuit such as that shown in Fig. 10a. A non-recursive type weighting circuit corresponds to a feed-forward circuit, This circuit performs a simple weighting process. The process includes subtracting and adding the various values which flow in through the input side through each of the delay components and out of the output side of the final delay component. This sum is then multiplied once by the coefficient K. This transfer function can be expressed by the following Equation (1)': H z = K(-1 - Z⁻¹ - Z⁻² ... - Z -(n/2 - 1) + Z -n/2 + Z -(n/2 + 1) + Z -(n/2 + 2) + + Z -(n-1) ) (1)' Where n is an even number. Fig. 10a is an example where n = 10, and, if the data in the memory addresses m₀, m₁, m₂, m₃, ... m n is expressed as, respectively, Dx₀, Dx₁, Dx₂, Dx₃, ... Dx₉, the output X₃ of the weighting circuit can be expressed by the following Equation (3). (-Dx₀ -Dx₁ - Dx₂ - Dx₃ - Dx₄ + Dx₅ + Dx₆ + Dx₇ + Dx₈ + Dx₉) · K = X₃ (3) Where, K = 1/n = 1/10 Similarly, Y₃ can be expressed by the following Equation (3)': (-Dy₀ - Dy₁ - Dy₂ - Dy₃ - Dy₄ + Dy₅ + Dy₆ + Dy₇ + Dy₈ + Dy₉) · K = Y₃ (3)' Weighting computations such as this can be performed by a standard microprocessor when based on Equation (3) or (3)' for the embodiment shown in Fig. 10a. The computations based on Equation (2) or (2)' for the embodiment shown in Fig. 6 can be performed by using, for example, a 16-bit microprocessor or a commercially available multiplier/accumulator designed for digital computations. Because the program is easily understood by persons involved in this field, its explanation will be omitted here. In place of the non-recursive type weighting circuit described above, it is also possible to use a weighting circuit composed of non-recursive type and a recursive type. A recursive type weighting circuit corresponds to a feedback circuit. In this case, Equation (1)' is modified to obtain the following Equation (1)'': Provided that n = 2 l . The above equation (1)'' can be executed by the circuit shown in Fig. 10b, which includes non-recursive type circuits a and b, and a recursive type circuit c. When l = 5, the result obtained by the circuit using Equation (1)'' is the same as that obtained by the circuit shown in Fig. 10a. Thus, it is possible for a circuit including both a recursive type circuit and a non-recursive type circuit to perform the same function as a non-recursive type circuit. It is also possible to realize a circuit having a transfer function equivalent to Equation (1)′ by embodiments other than those shown in Figs. 10a and 10b. The above explanation uses iron as the detected matter (foreign matter) and is based on Figs. 2a through 2c. The following explanation is based on Fig. 8 and concerns detection signals for various other materials detected as foreign matter. The phase angle of the detection signal for iron is generally delayed approximately 90° from that of the oscillation signal and the output sensitivity is high. In contrast, the phase difference of the detection signal for stainless steel with respect to the oscillation signal is not very large. Now, using iron, for example, the component of the detection signal which is in-phase with the oscillation signal is indicated as X and the component which has a phase delay of 90° from the oscillation signal is indicated as Y. If both components are considered to be positive values, as shown in Figs. 2b and 2c, the Y component of the detection signal for iron is larger than the X component. For some types of stainless steel (indicated as "SUS₁" in Fig. 8), the X component and the Y component are both positive values. For other types of stainless steel (indicated as SUS₂ in Fig. 8), the X component is a positive value and the Y component is a negative value. Among the various types of materials for detected matter, some generate lagging signals like that of iron, and others generate leading signals. As described above, if a product containing foreign matter such as iron is passed through the detector, detection signals such as shown in Figs. 2b and 2c will appear. Each of these signals has a waveform with two polarities, positive and negative (or negative and positive), for a single inspected object. If two objects are passed through one after another in close proximity, the detection signal Y₂, for example, will have four peaks such as P1′, P2′, P3′, and P4′ shown in Fig. 9a. In this case, P₁′, P₂′, P₃′ and P₄′ should be identified as separate pairs for each of the two objects being inspected. Unless a special identification circuit is separately provided for this Y₂ signal, it will not be possible to identify the separate signal groupings. Thus, P₂′ and P₃' may be identified as one pair. If this occurs due to the polarities being in reverse phase, an incorrect identification may occur. A completely different material may be identified by means of the computed data on the discriminant equation and the R/ indicator 20. The R/ indicator 20 will be described later. A Y₃ signal (the same is also true for the X signal) such as that shown in Fig. 9b will be correctly identified as a result of the weighting computation performed by the weighting circuit. The peak or maximum value P₁″ , shown in Fig. 9b, corresponds to the pair of P₁′ and P₂′ in Fig. 9a and the peak P₃″ corresponds to the pair P₃′ and P₄′ in Fig. 9a. Thus, even if there is a continuous flow of products through the detector, it is possible for the signals to always be identified in a configuration corresponding to the products. If the method used by weighting circuits 14A and 14B to assign the coefficients with respect to the coefficient multipliers 142₀ to 142 n-1 is characterized in that it is an odd-function distribution such as that shown in Fig. 4a, 4b, or 4c, then the central coefficient multiplier corresponds to the origin point of that odd function and it has a point-symmetrical distribution with respect to that origin point. The signal transmission characteristics of the weighting circuits are similar to the characteristics of a band-pass filter with a pass band in or near the frequency range containing the frequency of a wave signal generated when a typical material such as iron is passing through the coils. The weighting circuits are effective in reducing any effects from unwanted noise. The DC component contained in the input signal is completely removed by the weighting multiplication. The differential signal C xy of the secondary coils 4 and 5 may contain certain-amplitude residual AC signals as a result of the unbalance of the difference between the coil signals or for some other reason. In this case, these residual signals will cause DC components to appear in the X₂ and Y₂ output signals which have passed through the multiplication/detectors 7A and 7B and the smoothers/filters 9A and 9B. Although the A/D-converted signals still contain DC components, these signals are input to the weighting circuits 14A and 14B where the weighting eliminates the DC components. The residual AC signals do not affect the X₃ and Y₃ output signals of the weighting circuits 14A and 14B. Although existing detectors include a circuit which functions to remove the residual signal, such as the balance circuit 5 shown in Fig. 5 of the previously referred to Japanese patent Provisional Publication Sho. 57-198880, in the method described here, this type of supplementary circuit is unnecessary. Recognition of the primary value by the central processing unit The "primary value" is the representative value for the electromagnetic characteristics of an object being inspected. The central processing unit (CPU) 15B has a program, as shown by the flowchart of Fig. 11b, for the recognition of the primary values of the X₃ and Y₃ signals output from the weighting circuits 14A and 14B. Fig. 11a is a representation of a detected and weighted X₃ signal across a specified time span. In order to recognize the primary value, it is necessary to monitor the representative changes according to the time of the X₃ signal with a waveform such as that shown in Fig. 5. The monitoring span should be three to five times the time interval t₁ of the two peaks which occur when foreign matter generates a detection signal such as that shown in Fig. 3 is passed through the coils. An appropriate 2n + 1 number of X₃ (or Y₃) data signals obtained during that time span are constantly monitored. For example, as shown in the following Table 1, the X₃ signals are monitored in order from the newest data to the oldest data and stored in a series of memory addresses. The central data address in this case is n and the data X i-n is stored at that address at that time. When new data is input, the previous data shift in order from the left to the right. The new data is then input to address 0 and the oldest data is discarded. Also, the data at the central address n is monitored and when the absolute value of that data is the only maximum value among the 2n + 1 number of data items at that time, that data X i-n is recognized as the primary value. When the data X i-n indicating the maximum value is at a position such as that indicated by the circle A in Fig. 11a and a comparison indicates that there is an identical value X i-n+α in the circle A, the following equation is used to check whether or not the identical value is in the specific vicinity of the central address. 0 < | α | ≦ δ, X i-n+α = X i-n ? Provided that δ is a value which determines the limit of the vicinity of the central address. Then, if it is determined that the identical value is in the vicinity of the central address, the Y signal values Y i-n and Y i-n+α which correspond to positions of the X i-n and X i-n+α data are compared, and if Y i-n ≧ Y i-n+α , X i-n is determined to be the primary value X m . Also, the corresponding Y i-n value is determined to be the primary value for the Y signal. Conversely, if the Y i-n+α value is found to be larger than the Y i-n value, X i-n is not determined to be the primary value. If this occurs, because the Y i-n+α data is subsequently shifted to the central address α times the sampling interval later, that value becomes the maximum value and is thus determined to be the primary value Y m . Each time new data is added at the specified time intervals, each of the positions (addresses) are shifted one place and the oldest data Y i-2n is discarded. The primary value X m has the following characteristics. First, even when a signal containing a 2N number of peaks is input into the weighting circuit 14A or 14B as a result of an N number of objects being passed one after another through the coils, it is converted into a primary value signal containing N number of peaks. The object is easily identified and recognized by using the primary value recognition program described above and there is no danger of an error signal occurring. Second, if the X₂ or Y₂ signal is a reverse-phase signal from the waveform shown in Fig. 2c, the X₃ or Y₃ output signal of the weighting circuit is a reverse-polarity signal from that shown in Fig. 5. Thus, the primary values X m and Y m obtained from the X₃ and Y₃ signals by using the primary value recognition program (shown in Fig. 11b) are a pair of useful and precise signal data. The data contains positive or negative polarities, numerical data, and the characteristics of any type of materials composing foreign matter. Foreign matter which is electrically conductive or dielectric or has high-frequency loss can be identified and processed in two dimensions in one of the four quadrants of the X-Y coordinate system. Also, these primary value signals contain all of the electrical data resulting from and related to the presence of foreign matter even for products (inspected objects) which contain extremely minute amounts of iron, stainless steel, brass, or other foreign matter. The primary value signals also contain all of the data of both signals representing the product characteristics and signals resulting from the foreign matter, even in instances when the product itself contains conductive materials, such as products containing large amounts of water or salt, or when the wrapping materials are conductive. Thus, even in any of the instances just described, this method, together with the identification processing of the detailed identification section to be explained later permits precise identification of foreign matter which was difficult to identify (detect) using previously available methods. IDENTIFICATION BY THE CPU (JUDGMENT SECTION) The central processing unit 15 includes a program for identification. The following is an explanation of one preferred embodiment for the identification formed by the program. In the following explanation, the effects of product characteristics on the detector when measuring a material which has marked product characteristics are referred to as the material effect. Products can be generally classified into those which have product characteristics corresponding to the detector and those which do not. The material effect generally has characteristics peculiar to each individual product and a phase angle peculiar to each product. Although the size of the vector will change with the content volume of the product, the phase angle will usually not change very much. Fig. 12 shows a two-axis four-quadrant plane on which the points P₁ (X m1 , Y m1 ), P₂ (X m2 , Y m2 ), etc., can represent the primary values X m and Y m for various volumes of products of the same type which have material effect, but which contain no foreign matter. Even if products of the same type differ somewhat in volume or weight, these points will be included in an elliptic region D, and will tend to be distributed near the central average point P o (µX, µY), which can be represented by a vector r s from the origin point O₁ of the graph. The primary values for packages of products of the same type and substantially of the same volume and weight with material effect, but with no foreign matter, will be represented as points within a small circular region D′. The center of D′ is at the average point such as P o in Fig. 12 due to the vectors being substantially constant in size and angle. The primary values for a product having material effect and containing even minute particles of metal or other foreign matter will be represented at a point P a (X a , Y a ) as a vector r a on the graph in Fig. 12. Subtraction of vector r s from vector r a gives a deviation vector R a from the average point P o . Thus, the region D defines the distribution boundary for products without foreign matter and data outside this region, such as vector R a , are judged to represent products which contain foreign matter. For products having neither material effect nor foreign matter almost no waveform characteristics as shown in Fig. 5 appear for the weighted signals. In this case, random noise resulting from internal electrical factors, such as the operation of the amplifier, the signal detector, or a conveyor, becomes the primary factor in determining the distribution region D. As shown in Fig. 13, these products are represented as points P₁, P₂, etc., within a circular region D on the graph. The central average point P o of region D is extremely close to the origin point. The region D is extremely smaller than for products having material effect. In this case, the size of the deviation vector R a is approximately the same as that of the signal vector r a . Because of the small size of region D, even if the absolute lengths or quantities of these vectors are relatively small, they will extend beyond region D. It is thus possible to detect even more minute particles of foreign matter than for products having material effect. As mentioned earlier, the selector switch 18 is provided with a sample test mode. There is also a sample mode selector switch 23 which allows selection of either an "M" or "N" mode for the sample test, the characteristics of which are explained below. M (material effect detection) mode sample test: The test of a sample object which has material effect and which contains no foreign matter uses the primary values X m and Y m containing product characteristics. The signals obtained through this test are data which includes the product characteristics together with their occasional fluctuations, and also the effects of the various minute amounts of noise which remains even after filtering. N (noise detection) mode sample test: This test is done for sample objects which have no product characteristics and which contain no foreign matter. A passage detection means (not illustrated) using a photoelectric device or other method may be provided in order to detect when a packaged object passes through the coils so that the passage signal is generated for a period of time which corresponds to the time 2t₁. Time 2t₁ is the sum of time t₁ preceding the passage of the center of the coils by the inspection object and time t₁ following the passage of the center. While this passage signal is being generated, pairs of weighted values X₃ and Y₃ are extracted as data X n and Y n , respectively, at regular intervals of a certain number of samples from among the continuous weighted values. For example, 10 to 20 weighted values are extracted for one packaged object. These values X n and Y n are referred to as "N mode sample signals". Generally, because various types of random noise are a major factor concerning the signals of products which do not generate product characteristics, the N mode sample signals are also random with regard to a time series. It is possible to appropriately extract the characteristics of the amplitude, distribution, etc., of the original random signals from the many data signals obtained by extracting at certain intervals as described above. The selector switch 18 is also provided with an operation mode for actual operation of the device. During operation in this mode, data is processed by using the primary value signals. A sample test is performed by selecting either the M or N mode. In order to accomplish this, a memory is provided inside the CPU 15B for storing a number of sample data X m and Y m (M mode) or X n and Y n (N mode) obtained when the product sample passes through the coils. A program is provided to compute each of the following values using that sample data. µX: average value of X m or X n µY: average value of Y m or Y n σ x : standard deviation regarding X m or X n σ y : standard deviation regarding Y m or Y n σ xy : covariance regarding X m or Y m or X n or Y n ρ: correlation coefficient expressed as Because the detailed explanations of the symbols listed above are contained in general reference works on statistics, they will be omitted here. In the judgment processing, an equation such as the following Equation (4), which is one example of the statistical distribution functions found in reference works on statistics, is used as the density function of the statistical distribution of the data. This equation works both for inspection objects which have a material effect and for those which do not, as long as the data is considered to be from the same population. In this method, an equation is provided which uses {[2/(1+ρ)] · d²} for the right side and the exponent of the above Equation (4) for the left side. This gives the following Equation (5), which is the basic equation for obtaining a discriminant equation. The discriminant equation determines a reliable or allowable region within which the data for objects containing no foreign matter should appear. The "d" on the right side of the above Equation (5) is called the region coefficient. The region coefficient setting device 24 shown in Fig. 1 is provided as the input device for this coefficient. The value d is essentially like the numerical coffecient σ in statistics, for example: Coefficient d can be selected by the operator in association with the confidence value. By using the following definitions, Equations (5) can be rewritten as the following Equations (8) and (8)′ Where X represents X m or X n and Y represents Y m or Y n Equation (8) identifies the boundary and Equation (8)′ is the discriminant equation which judges whether or not the data is included within the region. Equation (8)′ is included in this device in the form of a program and is computed each time the data from a pair of X, Y input signals is input. Theoretically, the discriminant equation (8)′ can be determined by the operator selecting and inputting appropriate values A, B, C and the region coefficient d in accordance with the characteristics of the object being inspected (i.e., product). However, because it is not easy to determine appropriate values of A, B, and C, provision has been made in this embodiment in order to simplify the determination tasks of the operator. In place of a means to inputs the values A, B, and C, this device is provided with a program whereby, when the operator uses the selector switch 18 to select the discriminant equation computation mode, the data which was obtained and stored in the sample test is recalled. The statistical quantities µX, µY, σ x , σ y , ρ, etc., are automatically computed and the values A, B, and C are also automatically computed. In addition, because the value for the right side of Equation (8) can be computed by using these automatically computed results when the value d is input by the operator via the region coefficient setting device 24, the program requires only the input of the X, Y data in order to perform the calculation of the Equation (8)′ which is stored in memory. In this way, the automatic computation of the discriminant Equation (8)′ is completed. OPERATION PROCEDURES The composition and basic operation of this detector are as described above and the following is an explanation of the procedures involved in the detection of foreign matter. The various preparatory procedures described below are carried out prior to actual operation. The operator sets the selector switch 18 to the sample test mode. At this time, the R/ indicator 20 is set automatically to the mode indicating the absolute value r and phase angle ϑ of a vector r from the origin point 01 (not illustrated) on the x-y coordinate system (Figs. 12 and 13). The r and ϑ values are calculated as follows and indicated on the R/ indicator 20: r = √ X₃² + Y₃² First, a no-load test is performed to monitor the noise level of the apparatus without products passing through the coils by observing the values on the R/ indicator 20. Next, for a product test operation, the operator selects a number of samples which have previously been determined to be free of foreign matter, passes them through the coils, reads the values on the indicator 20, and determines whether or not the values have increased from the values during no-load operation. If data appears for which it is determined that the values indicated during the product test are clearly larger than the noise level during no-load operation, then it is judged that there are product characteristics, and the subsequent sample test is carried out in the "M" mode. If not, the subsequent sample test is carried out in the "N" mode. As a result of the test operation, the operator sets the sample mode selector switch 23 to either the "M" or "N" mode. The operator presses the execution button 21, selects an appropriate large number of objects to be inspected which have previously been determined to be free of foreign matter for use as samples, and then performs the procedure for the sample test. As a result, regardless of which mode was used, the data for this large number of samples is stored in the internal memory. When the operator sets the selector switch 18 to the mode of computation of the discriminant equation and presses the execution button 21, using the large amount of data obtained in the sample test, the values µX, µY, σ x , σ y , ρ, etc., related to that data are computed as described earlier. Furthermore, the various equations for the A, B, and C values are calculated and the coefficients for the left side of Equation (8) are determined. When the operator selects the appropriate region coefficient d and inputs it into the region coefficient setting device 24, the right side of Equation (8) which determines the boundary of the region is calculated and discriminant Equation (8)' is determined. This completes the computation of the discriminant equation. Actual operation begins once the preparatory procedures have been completed. During actual operation, when the selector switch 18 is set to the operation mode, the program control circuit 17 directs the CPU 15B to run the program for inspection of objects. At the same time the R/ indicator 20 is automatically set to the mode indicating the absolute value R and phase angle  of the deviation vector R (not shown) from the average point P₀ on the x-y coordinate system (Figs. 12 and 13). The operator presses the execution button 21 for objects to begin passing through the coils. This causes a succession of weighted signals X₃ and Y₃ to be input to the CPU 15B, wherein pairs of primary values X m and Y m are obtained by the program of Fig. 11b. Even while this processing is being performed, the detection operation of the objects continues. As shown in the flowchart in Fig. 14, the following Equations (11) and (12) are then computed using the primary value X m and Y m and the resultant values R and  are indicated by the indicator 20. The values A, B, C, and {[2/(1+ρ)} in Equation (8)' have been determined in the preparatory procedures. When the primary values X m and Y m for a particular object are substituted for X and Y in Equation (8)′, if they satisfy the equation, the data is judged to be within the reliable region determined with the samples. If the equation is not satisfied, the alarm 19 is activated to warn that the object has not passed the inspection and a sorting device (not shown) at the end of the line is commanded to remove the object. When an object contains material such as water or salt which has a material effect that varies from the previously sampled material effect, the computation of the discriminant equation may not be satisfied. This will cause a signal indicating that the object is faulty to be generated. Thus, this method is also effective for use in quality control. Because the sample test data is automatically computed to determine the judgment conditions, the determination of the judgment conditions is almost completely automatic. The operator only has to consider such things as whether to select a confidence level of 2σ or 3σ in order to determine the region coefficient. There is no need for adjustments which require skilled expertise, such as the phase adjustments of the excitation signal or of the reference signal for signal detection as are required in prior art detectors. Also, it is possible to achieve a remarkable improvement over the prior art detectors in the precision of the detection of foreign matter which is contained in inspected objects having a material effect. As described above, because it is possible to clearly identify each detection signal even when the detector continuously generates detection signals, for example, when it is used as a detector for powders or other objects which flow continuously, it is possible to accurately find the number of particles of foreign matter which are present. Additionally, if the transport speed and detection speed are known, it is also possible to accurately find the location of the foreign matter. For this reason, damage to processing equipment which might result from the presence of foreign matter in raw materials, or the like, is prevented. Furthermore, the shipment of products containing foreign matter is also prevented. It is also possible to detect instances where the quality of the product differs from a specified level. Furthermore, because the detection signals contain not only data on whether or not foreign matter is present, but also quantitative data as well, the detection of foreign matter or of quality differences is easily accomplished. Furthermore, because the composition is simple, the detector can be provided at a lower cost than previous detectors, and maintenance and adjustments can be easily performed. As various changes could be made in the above constructions without departing from the scope of the invention, it is intended that all matter contained in the above description or shown in the accompanying drawings shall be interpreted as illustrative and not in a limiting sense.

Claims: A detector for detecting a characteristic of an object comprising: means (1-9) for providing a signal representative of an electromagnetic parameter of the object; means (12A,12B) for converting said signal into a series of digital values; means (14A,14B) for weighting said digital values; means (15) for determining a representative value for the object from the weighted digital values; and means (15) for comparing said representative value with a reference value, thereby to detect said characteristic; characterised in that: said characteristic is the presence of foreign matter; and said weighting means (14A,14B) is arranged to weight said digital values by converting them into a series of weighted digital values having a single maximum amplitude value. The detector of claim 1, wherein said providing means (1-9) comprises: means (1) for generating an oscillating signal; means (3,4,5) connected to said generating means (1) and including a primary coil (3) and two secondary coils (4,5) for generating an electromagnetic field for producing a differential signal when an object passes through said electromagnetic field; and means (6-9) for detecting the differential signal. The detector of claim 1 or claim 2, wherein the weighting means (14A,14B) comprises means for successively multiplying each of the digital values by a series of coefficients and means for summing each of the digital values multiplied by the series of coefficients after each successive multiplication to provide a series of weighted digital values. The detector of claim 3, wherein said series of coefficients are discretely distributed in the form of an odd function with respect to an origin point which is the term with an order which is substantially one-half of the highest order. The detector of claim 4, wherein said odd function has a waveform which is substantially the same as a typical analog signal detected by the passing of an electromagnetically conductive object through said transducer. The detector of any preceding claim, wherein the weighting means (14A,14B) includes non-recursive weighting means. The detector of claim 6, wherein the weighting means (14A,14B) further includes recursive weighting means. The detector of any preceding claim, wherein the object has a known content, said detector further comprising means (15) for determining any material effect of the object. The detector of claim 8, further comprising means (15) for storing the determined material effect as a reference value. The detector of any preceding claim, wherein the detector is arranged to generate a noise signal, said detector further comprising means (15) for determining the noise signal generated. The detector of claim 10, further comprising means (15) for storing the noise signal as a reference value. The detector of any preceding claim, wherein the determining means (15) comprises means (15) for continuously monitoring a predetermined number of the weighted digital values as a series and determining said maximum value from said number of the weighted values as said representative value for the object being inspected. The detector of any preceding claim, wherein said comparing means (15) comprises means (15) for computing a discriminant equation with said representative and reference values. The detector of claim 2, wherein said detecting means (6-9) comprises: a phase shifter (8) connected to said generating means (1) and adapted to provide a phase shifted oscillating signal; a first detector (7A) adapted to produce a first detected analog signal corresponding to the component of the differential signal in phase with said oscillating signal; a second detector (7B) adapted to produce a second detected analog signal corresponding to the component of the differential signal in phase with said phase shifted oscillating signal; said converting means (12A,12B) being arranged to convert the first and second analog detected signals into first and second series of digital values, respectively; said weighting means (14A,14B) being arranged for weighting the first and second series of digital values; and said determining means (15) being arranged for selecting a representative value for the object from each of the first and second series of the weighted digital values. The detector of claim 14, wherein said comparing means (15) is arranged to compare each representative value with a respective reference value by means of a discriminant equation to be calculated with each representative value; said equation mathematically defining a closed two-dimensional region surrounding a pair of two-dimensional reference values and pairs of two-dimensional values in the vicinity of the reference values, as a region in which are distributed the same type of objects containing no foreign matter. The detector of claim 15, wherein said region is elliptic. The detector of claim 15 or claim 16, wherein said equation comprises an algebraic equation having a term of the second order for each representative value. The detector of any one of claims 15 to 17, wherein said equation is: where A, B, C µX, µY, ρ and d are appropriately selected constants. The detector of claim 18, further comprising means (15) for determining A, B, C, µX, µY and ρ as statistical values calculated from sample test data of objects containing no foreign matter. The detector of any one of claims 15 to 17, wherein said equation is: where: µX is an average value for X; µX is an average value for Y; σ x is a standard deviation for X; σ y is a standard deviation for Y; σ xy is a covariance for X and Y; ρ is a correlation coefficient expressed as d is appropriately selected. The detector of claim 20, further comprising means (15) for determining µX, µY, σ x , σ y and ρ by calculation from sample test data of objects containing no foreign matter.

Inventors: INOUE SHINICHI, NAKAYAMA KAZUO, INOUE, SHINICHI, NAKAYAMA, KAZUO
Applicants: YAMATO SCALE CO LTD, YAMATO SCALE CO., LTD.
Application year: 1989
Main classification: G01V3
IPC codes: G01V3