Method of controlling a milking implement, a software program for and an implement performing the method

A method of controlling a milking implement for automatically milking a dairy animal with an udder, such as a cow, which milking implement includes a camera and a teat cup. More particularly, the method includes attaching the teat cup to a teat of the udder, followed by producing by the camera an image of at least a part of the udder and of at least a part of the teat cup, making an analysis of the image of the udder with the teat cup, and performing at least one control action by the milking implement, based on the analysis.

This application is a continuation of international application no. PCT/NL2007/000209, filed on Aug. 28, 2007, and claims priority from Netherlands application no. 1032429 filed on Sep. 5, 2006. The contents of both applications are hereby incorporated by reference in their entirety.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a method of controlling an implement for automatically milking a dairy animal, such a cow.

2. Description of the Related Art

International patent application WO 01/03497 A1 discloses a method wherein a teat cup is monitored by means of a mass inertia sensor. The relevant teat cup forms part of an implement for automatically milking a cow, which is further provided with a robot arm. The teat cup comprises a casing and a liner, so that areas are created that are separated from each other. These areas are each in communication with a line, in order to apply a milking vacuum in the area inside the liner and to apply a pulsating, or pulsation vacuum in the area between the liner and the casing. Thanks to the pulsation vacuum there is alternately achieved a suction phase and a release phase.

The robot arm has a holder in which the teat cup is detachably received and which remains in connection with the teat cup by means of an adjustable cord. The robot arm moves the teat cup to a teat, after which a vacuum is applied to the teat cup, as a result of which the teat cup is attached to the teat. Subsequently, the robot arm is moved away. If it appears from a signal from the mass inertia sensor that the teat cup falls from the teat, the vacuum is removed. Moreover, the cord is tightened in order to move the teat cup to the holder in the robot arm. Subsequently, the teat cup is attached again to the teat with the aid of the robot arm.

A disadvantage of the known method is that it is expensive and insufficiently reliable.

BRIEF SUMMARY OF THE INVENTION

The invention aims at obviating the above-mentioned drawbacks at least partially, or at providing at least an alternative.

This object is achieved by the invention with a method of controlling a milking implement for automatically milking a dairy animal with an udder, such as a cow. The milking implement comprises a camera and a teat cup. The method includes the following steps: attaching the teat cup to a teat of the udder, followed by producing by means of the camera an image of at least a part of the udder and of at least a part of the teat cup, making an analysis of the image of the udder with the teat cup, and performing at least one control action by means of the milking implement, based on the analysis.

By using a camera to feed the analysis, it is not necessary to use a mass inertia sensor such as in the state of the art. A camera is in general more reliable than a mass inertia sensor and, moreover, its operation can be tested more simply. If a mass inertia sensor does not operate correctly, this will usually only be found in the case of a proper test, or if in a practical situation the teat cup falls without a control of the milking implement intervening. This may lead to contamination of the teat cup, of the already obtained milk and to damage of the relevant teat cup. Furthermore, the inventive solution can be achieved in a cheap manner, in particular in those cases in which a camera is already provided for controlling the attachment of the teat cup to the teat.

In one embodiment, the step of making the analysis comprises analysing a manner in which the teat is received in the teat cup. From the manner in which the teat is received in the teat cup it can be deduced whether a proper connection has been achieved and in which stage the milking process is.

In particular, the distance from an upper edge of the teat cup to the udder is determined, which distance is compared with a predetermined value. If the distance from the upper edge of the teat cup to the udder exceeds a particular value, this is an indication that the milking vacuum is too low, or that the pulling force on the teat cup is too high.

In a variant, an analysis is made of a part of the teat, which part is located between the teat cup and the udder. If this part deviates from a predetermined shape, this may be a signal that the teat has tipped over and has, therefore, not been received correctly in the teat cup.

In one embodiment, an analysis is made of a position of an end of the teat relative to the teat cup. By comparing the position with a stored position, for example a position during a previous milking process, or a position at the beginning of the current milking process, information can be deduced regarding the progress of the current milking process.

In a favorable embodiment, the camera repeatedly produces images of the udder with the teat cup and an analysis is made of differences between the repeatedly produced images of the udder with the teat cup. This generates information regarding the development of the milking process over time.

In particular, an analysis is made of a duration and/or a size of a milk flow from the teat. By analyzing the milk flow it can be deduced in which stage the current milking process is.

More in particular, an analysis is made of an alteration of a shape of a liner of the teat cup. From the alteration of the shape information can be deduced regarding the quality of the milking and pulsation vacuum.

A favorable method further comprises a step of producing by means of the camera a start image of at least the teat, which step precedes the step of attaching the teat cup to the teat. From such a start image it is possible to deduce information regarding the damming up in the udder, which may be used for pre-adjusting the pulsation vacuum and the expected duration of the milking. The start image may further be used as a reference for later images in order to determine the progress of the milking.

In particular, an analysis is made of a milk pressure in the teat on the basis of a comparison of the start image of the teat with a recorded image of the teat.

In a variant, an analysis is made of an orientation of the teat relative to the udder shown in the start image. On the basis thereof it is possible to determine an optimum orientation of the teat cup relative to the udder.

In one embodiment, an analysis is made of an orientation of the teat cup relative to the udder shown in the image of the udder with the teat cup. It is possible to deduce therefrom to what extent the current position of the relevant teat cup relative to the udder is a proper one.

In a favorable embodiment, the at least one control action comprises the detachment of the teat cup. This action is chosen, for example, if it appears from the analysis that the teat cup has not been attached properly, or that the milking process has come to an end.

In particular, the detachment of the teat cup is followed by the renewed attachment of the teat cup to the same teat of the udder. This step is chosen if it appears from the analysis that the teat cup had not been attached properly.

In one embodiment, the at least one control action comprises the adjustment of a vacuum in the teat cup. This may be the milking vacuum, the pulsation vacuum, or both of them. The milking intensity is thus adjusted to the current situation.

In particular, the adjustment of the vacuum in the teat cup comprises the adjustment of a magnitude of a milking vacuum that is exerted on an end of the teat in order to suck milk. By making the milking vacuum less deep, the teat cup will shift on the teat towards the udder to a lesser extent.

More in particular, the adjustment of the vacuum in the teat cup comprises the adjustment of a pulsation vacuum that is exerted on a liner in the teat cup. Such an adjustment may be both the depth of the pulsation vacuum during the suction phase and the duration of the release phase.

In one embodiment, the at least one control action comprises the adjustment of a pulling force on the teat cup. Such a pulling force is exerted, for example, on the lower side of the teat cup by means of a cord. If it appears from the analysis that the teat cup shifts too far towards the udder, the pulling force can be increased. In the inverse situation, the pulling force can be decreased.

In a favorable embodiment, the at least one control action comprises the displacement of a milking robot arm. By displacing the milking robot arm, the orientation of the teat cup relative to the udder can be improved.

The invention further relates to a software program comprising program instructions for performing the method according to the invention, when the software program is loaded in a control system for a milking implement for automatically milking a dairy animal.

The invention also relates to a milking implement for automatically milking a dairy animal, such as a cow, which milking implement comprises a camera, a teat cup and a control system. The control system is designed to perform the method according to the invention. This may be achieved, for example, by loading a software program according to the invention into a memory of the control system. It is also possible to provide the control system with hardware components that mutually cooperate in such a way that a method according to the invention is performed.

In particular, the camera is designed to produce a spatial image. The relevant spatial information may be used in the analysis on which a control action is based. A spatial image has the advantage that not only the shape in view, but also the shape in three dimensions and, if desired, the content can be determined of, for example, the teat, the udder, the milk flow, or the liner.

More in particular, the camera comprises: a radiation source for emitting electromagnetic radiation, in particular light, a matrix with a plurality of rows and a plurality of columns of receivers for receiving electromagnetic radiation reflected from the dairy animal, and sensor control means, wherein the sensor control means are operatively connected to the radiation source in order to modulate the electromagnetic radiation, and the sensor control means are designed to determine for each of the receivers a phase difference between the emitted and the reflected electromagnetic radiation.

Such a camera gives a reliable spatial image, in the form of distance or depth information, from a plurality of points on an object to be observed to the camera. This may thus also be called a depth image. Such a camera is relatively cheap and generates the spatial image in a short time.

The following is an explanation of the operation of an embodiment of such a camera. The radiation source emits electromagnetic radiation. Preferably light is used for this purpose, more preferably infrared radiation, more preferably near infrared (NIR) radiation. For this purpose, in particular suitable LED's may be used, which can be controlled in a very simple manner by means of an electrically controllable supply current, and which are moreover very compact and efficient and have a long life. Nevertheless, other radiation sources might be used as well. (Near) infrared radiation has the advantage of not being annoying for the dairy animals.

The radiation is modulated, for example amplitude modulated, according to a modulation frequency which, of course, differs from, and is much lower than, the frequency of the electromagnetic radiation itself. The, for example, infrared light is here a carrier for the modulation signal.

With the aid of the emitted radiation the distance is determined by measuring a phase shift of the modulation signal, by comparing the phase of reflected radiation with the phase of reference radiation. For the latter the emitted radiation is preferably transferred (almost) immediately to the receiver. The distance can be determined in a simple manner from the measured phase difference by:
distance=½×wave length×(phase difference/2π),
in which the wave length is that of the modulation signal. It should be noted that in the above-mentioned equation ambiguity of the distance determination is not yet taken into account, which ambiguity occurs in that a phase difference owing to periodicity can belong to a distance A, but also to A+n×(wave length/2). For that reason it may be useful to choose the wave length of the amplitude modulation in such a way that the distances occurring in practice will indeed be determined unambiguously.

Preferably, a wave length of the modulation, for example amplitude modulation, of the emitted radiation is between 1 mm and 5 meters. With such a wave length it is possible to determine unambiguously distances up to a maximum distance of 0.5 mm to 2.5 meters. Associated therewith is a modulation frequency of 300 MHz to 60 kHz which can be achieved in a simple manner in electric circuits for actuating LED's. It is pointed out that, if desired, it is also possible to choose even smaller or greater wave lengths.

In a favorable variant, the teat cup comprises a casing and a liner, which casing is at least partially manufactured from a material that is transmissive of light with a wave length that is observable by the camera. This makes it possible for a camera arranged outside the teat cup to produce an image of the liner.

In one embodiment, the teat cup comprises a casing and a liner, which liner is at least partially manufactured from a material that is transmissive of light with a wave length that is observable by the camera. It is thus possible for a camera arranged outside the liner to produce an image of the teat received in the liner.

DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

The following is a description of certain embodiments of the invention, given by way of example only and with reference to the drawings. The implement for automatically milking an animal, such as a cow, shown in a diagrammatic perspective view inFIG. 1, comprises a milking parlour1that accommodates one single animal, such as a cow. This milking parlour1is surrounded in a customary manner by a fencing2and is provided with an entrance door and an exit door which are, incidentally, not shown in the figures. In the milking parlour1and in the immediate vicinity thereof there is a milking robot comprising a robot arm construction3for automatically attaching a teat cup to a teat of an animal to be milked. The robot arm construction is provided with a robot arm4for carrying a teat cup, which robot arm4is pivotable to under the udder of the animal (seeFIG. 3).

The robot arm construction3is provided with a first robot arm construction portion5and a second robot arm construction portion6. The first robot arm construction portion5is pivotably connected to an upper side of the fencing2by means of a first horizontal axle7. The second robot arm construction portion6is pivotably connected to the first robot arm construction portion5by means of a second horizontal axle8that is located outside the milking parlour1. The robot arm4is connected to the second robot arm construction portion6. The robot arm4may be rigidly connected to the second robot arm construction portion6, or may be connected thereto via a third horizontal and/or a vertical axle, so that the robot arm is pivotable relative to the second robot arm construction portion, for example with the aid of a control cylinder.

A first control cylinder9has a first point of application10on the second robot arm construction portion6and a second point of application11on the fencing2at a place at a first distance below the first horizontal axle7. A second control cylinder12has a first point of application13on the first robot arm construction portion5and a second point of application14on the fencing2at a place at a second distance below the first horizontal axle7, the second distance being greater than the first distance. The second control cylinder12may be a single control cylinder or may be formed by two control cylinders that are placed on either side of the first control cylinder9, as is clearly visible inFIG. 1. Here, the first point of application10is located on the second robot arm construction portion6at least approximately halfway the second robot arm construction portion6. In order to obtain a virtually horizontal movement of the free end of the robot arm4, the first point of application10on the second robot arm construction portion6is located at the side of the second robot arm construction portion6opposite the fencing2. The first point of application13on the first robot arm construction portion5is located closer to the second horizontal axle8than to the first horizontal axle7. In order to obtain a relatively compact construction, the first point of application10on the first robot arm construction portion5is orientated towards the robot arm4.

The robot arm construction3is displaceable in the longitudinal direction of the milking parlour1by means of a support unit15which is displaceable along rails16and17. The rail16is placed at the upper side of the fencing2and the rail17is disposed, in both embodiments, approximately at half the height of the milking parlour1at the longitudinal side of the fencing2and namely at that side where the robot arm construction3is located. Both at its upper side and its lower side the support unit15is provided with rollers18,19and20. It is possible for the support unit15to be displaced along the rails16,17by means of a control cylinder (not shown) whose point of application on the support unit15is denoted by reference numeral21. The first horizontal axle7and the second horizontal axle8are disposed on the support unit15, and the second point of application11of the first control cylinder9and the second point of application14of the second control cylinder12act on the support unit15.

FIG. 3shows in detail the free end of a robot arm, for example the robot arm4. On the free end of the robot arm4there are provided four teat cups28, one of which is visible in the shown view. The teat cups28are each connected to a hose29for discharging milk from the teat cup28and a hose67(shown inFIGS. 6-9) for applying a pulsation vacuum.

The free end of the robot arm4comprises a support element30. For each teat cup28there is provided a housing35which is connected to the support element30by means of a hinge pin36. Each housing35is provided with a coupling mechanism37which comprises a bent lever38and a control lever39. At one end, the bent lever38is connected to the housing35by means of a hinge pin40. At the other end, the bent lever38is connected to the control lever39by means of a hinge pin41. At its other side, the control lever39is connected to a holder43for the teat cup28by means of a hinge pin42. The holder43is further connected to the housing35by means of a hinge pin44. In the housing35there is further provided a control cylinder45which is connected to a support element30and at the other side to the bent lever38.

In the situation ofFIG. 3the control cylinder45is retracted, as a result of which the housing35is in a low position and the holder43with the teat cup28is tilted. By extending the control cylinder45, the holder43and the teat cup28tilt towards a vertical orientation (not shown). Further operation of the control cylinder45results in that the housing35moves upward in order to attach the teat cup28to a teat46of an udder47.

After the teat cup28has been attached to the teat46, the housing35is moved downward. The teat cup28then remains connected to the housing35by means of a cord50. The cord50extends from the lower side of the teat cup28, through the holder43and below a roller51, to a control cylinder52. During the downward movement of the housing35the control cylinder52is retracted in order to release the cord50. By extending again the control cylinder52the cord50pulls the teat cup28back to the holder43. For a more detailed description of the robot arm construction3reference is made to European patent application EP1442657A1. For a more detailed description of the operation of the teat cups28reference is made to EP0862360A1.

On the robot arm construction3there is provided a camera, in this case a combined 2D/3D camera100. The 2D/3D camera100comprises a housing101of synthetic material which, in the embodiment ofFIG. 3, is movably connected to the support element30via a ball joint102. The 2D/3D camera100is capable of rotating about a vertical axis by means of the ball joint102and of tilting about a horizontal axis by means of the ball joint102with the aid of not shown actuators, for example servo motors.

Alternatively, the 2D/3D camera100may be rigidly connected to the robot arm4(embodimentFIGS. 1 and 2), or be individually movably connected, via an arm103, to another part of the milking implement, for example to the fencing2(partially shown in the embodiment ofFIG. 4).

The housing101comprises a front side104. In the front side104there are included a lens106and a plurality of radiation sources, in this embodiment light sources108in the form of infrared light emitting diodes (IR LED's). In a variant, the lens106is provided at the inner side of the front side104, the front side104being manufactured from a material that is transmissive of infrared light. The lens106is thus protected against external influences, while the flat front side104of synthetic material can more easily be cleaned than the front side104with the projecting lens106.

In the housing101there is further included a place-sensitive sensor, such as a CMOS image sensor110. The CMOS image sensor110comprises, on a side facing the lens106, a matrix with a plurality of rows and columns of receivers, in the form of light-sensitive photo diodes. In this embodiment, this is a matrix of 64×64 photo diodes, but resolutions of 176×144, 640×480, and other, smaller or higher, matrix sizes are possible as well. The CMOS image sensor110comprises integrated sensor control means which control the IR-LED's108and which convert the infrared light incident on each of the photo diodes into a digital signal and transfer this via a not shown wireless connection, or wire connection to a central processing unit, or a computer (see also hereinafter).

The sensor control means of the 2D/3D camera100determine the distance from an object to each of the photo diodes by measuring a phase difference between the light that is emitted by the IR-LED's108of the 2D/3D camera100to an object and the light that returns after reflection to the 2D/3D camera100, i.e. to the CMOS image sensor110thereof.

In a favorable embodiment, the IR-LED's108emit an amplitude-modulated waveformed light signal. The amplitude modulation has itself a repetition frequency. After reflection this light signal is imaged by the lens106on the CMOS image sensor110. By determining the phase difference of the received modulated light signal relative to the emitted modulated light signal it is possible to calculate, by means of the wave length of the modulated signal, the distance between the sensor and the object. This occurs in parallel for each of the photo diodes on the CMOS image sensor110. There is thus created a spatial image of the observed object.

It is pointed out that in this manner the distance has not yet been determined unambiguously. For, it is possible for an object to be located at a plurality of wave lengths of the used light signal of the sensor. This can be solved in practice, for example, by also varying the frequency of the amplitude modulation.

In a particular embodiment, short light pulses may be emitted by the IR-LED's108, provided that at least one whole wave, preferably two or a plurality of waves, of the modulated signal is/are incident in each light pulse.

Depending on the chosen frequency of the amplitude modulation, it is possible for the 2D/3D camera100to make a plurality of images, for example fifty, per second. In this case, each image should be considered as a reliable reproduction of the object observed, such as a teat cup, a teat, or other part of the cow, any movement of the cow leading to much less distortion of the image than in the case of a scanning sensor. Moreover, it is not necessary to move the 2D/3D camera100itself for taking a complete shot.

The CMOS image sensor110is capable of generating, besides a spatial image, also a two-dimensional image, in which color and extent of reflection of the object observed are transferred as a color image, or are converted into an image in grey tones.

FIG. 5shows schematically a robot control, or robot control means, here in the form of a control system120of a milking robot, for example the robot arm construction3. The control system120comprises a central processing unit122for controlling one or a plurality of actuators124, and a user's station in the form of a personal computer (PC)126. The actuators124may be the control cylinders9,12,45and52for the robot arm construction3, as described in relation toFIGS. 1-3, and, possibly, the not shown servo motors for focusing the 2D/3D camera100itself.

The central processing unit122has a working memory and is programmed with control software and interprets, on the basis of algorithms, or fuzzy logic control, the spatial images and/or the two-dimensional images from the 2D/3D camera100. On the basis of this interpretation, the central processing unit122controls one or a plurality of actuators124, or for example a vacuum pump (not shown inFIG. 5), as will be described hereinafter in further detail.

The central processing unit122is connected to the PC126via a fixed, or wireless, connection. Via the PC126, it is possible for the control software of the central processing unit122to be loaded and/or to be adjusted. Furthermore, it is possible for a monitor of the PC126to display a whether or not processed image from the 2D/3D camera100. It is also possible for this screen to display warnings, if any, if the central processing unit122establishes, on the basis of the image from the 2D/3D camera100, that a disturbance, or other undesired event, takes place. Finally, it is possible for the PC126to be provided with, or to be connected to a storage medium (not shown) in which images from the camera and/or processed information can be stored.

The teat cup28may be designed in different manners, as shown in detail inFIGS. 6-9. Although these embodiments differ from each other, as will be apparent from what follows, identical or comparable components are, for the sake of clarity, always denoted by the same reference numerals The teat cup28comprises an outer casing64and a flexible liner65. Between the outer casing64and the liner65there is a pulsation chamber65in which a vacuum (for the suction phase) and an atmospheric pressure (for a release phase) are alternately applied. A pulse hose67is connected to the pulsation chamber66. Near the lower side of the teat cup28there is further connected the milk hose29to the teat cup28. Near its lower side, the teat cup28has a tapering part70, while the holder43has a tapering recess71. When the teat cup28is drawn onto the holder43by means of the cord50, the teat cup28is brought into a predetermined position by means of the tapering parts70and71.

In the embodiment according toFIG. 6, the casing64is transparent, i.e. transmissive of the light emitted by the IR-LED's108. When applying infrared light, like in this case, or ultraviolet light, it is possible to choose a material that is indeed transmissive of the light concerned, but that is not transmissive of visible light. Of course, at other frequencies of light to be emitted, other materials may be chosen. Such a transparent casing has the advantage that the camera that is arranged outside the casing is nevertheless able to observe the liner65.

In the embodiment according toFIGS. 7 and 8, both the casing64and the liner86are transparent, i.e. are transmissive of the light emitted by the IR-LED's108. It is thus possible to obtain, by means of the camera100arranged outside the casing, an image both of the teat46while the latter is located in the teat cup28and of milk that may leave the teat46(seeFIG. 8).

In the embodiment according toFIG. 9, the casing64is non-transparent, whereas the liner65is transparent. In a not shown variant, the liner65could incidentally be non-transparent as well. In this embodiment, the camera100is included in the teat cup28, in the space between the casing64and the liner65. Here, said camera100is comparable with the already described camera100, but may also be a simpler camera producing, for example, only a two-dimensional image in grey tones and/or color. A lens106of the camera100is preferably a wide-angle lens, with a relatively small focus distance. Here, the camera100is arranged in such a way that it is capable of producing, by means of the wide-angle lens106, an image of at least a part of the liner65and (in this embodiment) of the teat46being in the liner65. This position of the camera100has the advantage that it is possible to produce a more accurate image of the liner65and the teat46than by means of a camera that is arranged outside the teat cup28. A disadvantage is that the camera100arranged in the teat cup can combine fewer functions than a camera arranged outside the teat cup, like in the other embodiments.

During operation, a cow is in the milking parlour1(FIGS. 1 and 2). The 2D/3D camera100takes at least one shot of an entire cow, or at least of the udder and, preferably, also of the hind legs of the cow. On the basis thereof it is possible for the central processing unit122to determine the spatial position of the udder and, possibly, of the hind legs. On the basis of the spatial positions of the teats46and, possibly, on the basis of the spatial image of the positions of the legs, the central processing unit122determines the route to be followed by the robot arm4. The central processing unit122moves the robot arm4and in particular the teat cups28located thereon to the teats46concerned.

Depending on the embodiment of the relevant robot arm construction3, the teat cups28are moved successively or simultaneously to the teats46concerned and attached thereto. Preferably, the central processing unit122bases the desired movement of the robot arm4on a simultaneous observation of both the teat46and the teat cup28to be attached. It is possible for the central processing unit to deduce therefrom a mutual distance, direction and speed, which further improves the accuracy of the navigation. This has also the advantage that variations of the position of the teat cup28are processed automatically. Such variations occur, for example, if the teat cup28is not always received in the same manner in its holder43.

According to the inventive method, the central processing unit122controls the milking implement, after the teat cup28has been attached to the teats46, on the basis of images from the 2D/3D camera100. It is possible for the central processing unit122to conclude, on the basis of any mutual movement between the teat cup28and the teat46concerned, that the connection between the teat cup28and the teat46decreases and that the milking by means of the relevant teat cup28should (almost) be terminated. At a sudden great mutual movement of the teat cup28relative to the teat46concerned, it is possible for the central processing unit122to conclude that the relevant teat cup28has come loose from the teat46concerned, for example because the cow has kicked against it. In that case, it is possible for the central processing unit122immediately to perform a control action, for example by tightening the cord50, in order to ensure that the relevant teat cup will not fall onto the floor of the milking parlour1, where it could be contaminated. It is also possible for the central processing unit122to lower the vacuum and to take preventive measures, such as separating the possibly contaminated milk and/or cleaning the relevant teat cup28and the associated milk hose29.

By further making the 2D/3D camera100observe a larger part of the cow than only the udder with the teats46, it is possible, for example, also to observe the legs of the cow concerned. On the basis of the observation of the legs and/or other parts of the cow, it is possible for the central processing unit122to determine a risk that a leg kicks off a teat cup, or that the leg concerned would hit the robot arm construction3. It is also possible for the central processing unit122to establish, on the basis of a spatial image of the cow's back, a risk that the cow will relieve herself. If the central processing unit122determines that a risk of kicking off and/or the cow relieving herself is greater than a predetermined value, it may decide to perform preventive control actions, such as controlling an actuator for displacing the robot arm construction3or for preventively tightening the cord50.

If the camera100observes that the teat cup28is frequently at a greater distance from the udder47than a predetermined value (FIG. 10), it will be possible for the central processing unit122further to analyze this. If the teat46has already been attached at least during a first predetermined period of time, the result of the analysis will be that the milking of the teat46concerned should be terminated. An image of the size of the udder may also be included in this analysis. This image may be compared with a start image of the udder concerned, which start image has been produced prior to the milking.

As a result of such an analysis, the central processing unit122will detach the teat cups28, as a control action, by removing the milking vacuum, will lead them, with the aid of the actuator52, to the relevant holders43by means of their cord50, and will move the robot arm4from under the cow. Subsequently, the exit door will be opened. On the basis of the images from the 2D/3D camera100, it will be possible for the central processing unit122to establish when the cow has completely left the milking parlour1, after which it will be possible for the relevant actuator to close the exit door.

A situation as shown inFIG. 10, which occurs within the predetermined period of time and/or in which there is no sufficient reduction of the size of the udder, leads to an analysis that the milking and/or pulsation vacuum should be adjusted, or that the pulling force on the cord50should be reduced. Adjustment of the pulsation vacuum is possible, for example, by prolonging the release phase, i.e. by prolonging the period of time in which atmospheric pressure is exerted on the liner65, by admitting atmospheric pressure to the pulse hose67for a longer period of time by means of a relevant actuator.

A distance between the teat cup28and the udder47that exceeds a predetermined value may also be an indication of an improper attachment of the teat46, for example because said teat has tipped over as shown inFIG. 11. The analysis gives this result if such a distance is observed within a second predetermined period of time, which second predetermined period of time is shorter than the first predetermined period of time, for example 15 seconds, or at the most 60 seconds. The analysis may also give this result if not only the distance between the teat cup28and the udder47is greater than a predetermined value, but if, in the vicinity of the teat cup28and the udder47, also a shape is observed that corresponds to a certain extent to one of a plurality of previously stored views of shapes of a teat46that has tipped over.

By means of one of the teat cups28as described in relation toFIGS. 6-9, it is also possible to make an analysis of the receipt of the teat46in the teat cup, for example by determining the position of an end of the teat46relative to the teat cup28. If this position is insufficiently deep, i.e. at a smaller distance from the upper side of the teat cup28than a predetermined distance, the result of the analysis will be that the teat46concerned is not properly attached and the control action will comprise a renewed attachment.

Such an analysis of the position of the end of the teat46relative to the teat cup28can be repeated and in that case the result of such an analysis may be that the teat concerned has been sucked too deep into the teat cup28. As a control action, it is possible to increase the pulling force on the cord50and/or to decrease the milking vacuum. By comparing consecutive images of the teat46with each other it is possible to make an analysis of the development of the position of the end of the teat46. This development gives an indication of the stage of the milking process. If the position of the end of the teat46reaches a predetermined place, the milking of the teat46concerned as a control action can be terminated.

By means of one of the teat cups28as described in relation toFIGS. 6-9, it is also possible to make an analysis of the extent to which the milking process progresses by looking at the width (by means of a 2D camera), or the size (by means of a 3D-camera), which provides information regarding the swelling of the teat46. The swelling of the teat46gives an indication of the remaining milk. The movement of the teat46in the teat cup28may also be involved in this analysis. By determining the movement of the teat in the teat cup28there is generated comparable information as described above when a varying distance between the upper side of the teat cup28and the udder47is observed. A control action when observing a relatively large swelling may be the deepening of the milking vacuum. The control actions, in the case of an analysis of the end of the milking process, relate to terminating the milking. Of course, it is also possible to involve a plurality of the factors separately described above in an analysis.

The milking implement may further be controlled by observing a milk flow squirting from the teat46into the teat cup28. The camera100is capable of observing the size (width and/or depth-information), speed and/or duration of the milk flow. On the basis thereof it is possible to make an analysis of the momentary milk pressure in the udder47and of the development of the milking process. In the case of a high milk pressure, deepening the milking vacuum and/or prolonging the suction phase may be performed as control actions. In the case of a decreasing development, it is possible to perform the inverse control actions or to switch to a post-milking treatment. Of course, minimum and/or maximum values for the vacuum level and the length of the suction phase may be stored in the memory of the central processing unit122. The suction phase is preferably limited to a maximum of 700 ms.

By means of one of the teat cups28as described in relation toFIGS. 6-9, it is also possible to make an analysis of the quality of the pulsation vacuum. At the generation of the pulsation vacuum, disturbances may occur or there may be leakage in the relevant lines. Both defects lead to the liner65not showing the change in shape that is visible by comparingFIGS. 7 and 8. In other words: from consecutive images from the camera100it will have to appear that the liner65deforms rhythmically. Such a deformation and the place where it occurs may be stimulated, if desired, by applying a liner65that is locally weakened, so that at this weakened place there will be formed a fold if the pulsation pressure is greater than the milking vacuum. Such a monitoring of the pulsation vacuum by means of the camera100has the additional advantage that no pressure sensor has to be used. Pressure sensors have a relatively limited life, so that they should be replaced frequently.

By means of the camera100it is further possible to monitor whether components of the milking implement get defective. It is thus possible, for example, to establish whether a breaking of the cord50occurs. In the case of a defect, the central processing unit122will transmit a signal to the PC126and, if necessary, correcting control actions will be performed immediately. In most of the cases these will be control actions that are aimed at terminating the milking process. In the case of a breakage of the cord50, it is also possible to choose to maintain the attachment of the teat cup28—whether or not at an adjusted vacuum level—until it is possible to detach it manually or in another manner without the teat cup falling onto the floor.

After some time, wear of the liner65may occur. This may lead to balloon formation during the suction phase. This means that the liner65shows a bulging at the height of the teat46, as shown inFIG. 12. Such a balloon formation is undesired, because it causes an unintended load of the teat46and because the teat cup28will thus sooner fall from the teat46. Balloon formation of the liner65can be observed by the camera100, because the shape in a two-dimensional view, or the size in a spatial image, exceeds a predetermined value. As a temporary control action, the level of the milking vacuum and/or the pulsation vacuum may be adjusted. There is further given a signal via the central processing unit122to the PC126that the relevant liner should be replaced.

It is common practice that during milking there is a balance between an upward force on the teat cup28, exerted thanks to the milking vacuum on the teat46, and a downward force due to the weight of the teat cup28. In an advantageous variant of the shown teat cup28, a teat cup28is designed as an extra light one, for example 100 grams lighter than a commonly used teat cup. Subsequently, on the basis of an observation by the camera100of the teat prior to and/or during milking, it is determined to what extent an additional vertical force is needed. Subsequently, said vertical force is exerted by means of the actuator52and the cord50. If desired, the relevant vertical force may be adjusted during milking, as already described in the foregoing.

As a possible component of the inventive method, the position of one or a plurality of teat cups28relative to the udder47may be optimised. On the basis of a start image of the udder47with one or a plurality of teats46, it is possible to determine the orientations of the teats46concerned relative to the udder47. By comparing the orientations in an analysis with the known, or observed, mutual distances of the plurality of teat cups28to be attached, it is possible to determine such a position for the robot arm4that the various teat cups46, after having been attached, cause together a smallest possible displacement of the teats46concerned. During milking, the current orientation of the teat cups28relative to the udder47may be determined by means of the camera100. This observed orientation may be compared in an analysis with the known orientation in the inoperative position of the teats46concerned. On the basis thereof, control actions may be performed, for example by displacing the robot arm4, in order to bring the orientation of the teat cups28more into line with the inoperative position of the teats46.

Within the scope of the invention various variants are possible. For example, it is also possible to apply for the camera, instead of infrared light, light with other wave lengths, among which visible light and ultraviolet light. Instead of amplitude modulation, frequency modulation may also be applied. It is also possible to provide the light sources at another position than on the housing of the lens and the image sensor, for example by means of a separate housing on the robot arm. In that case it is indeed of importance, of course, that the distance between the light sources and the image sensor is known, so that the calculated distance from the teat observed can be corrected accordingly. For various steps of the described method it is also possible to work with a camera that only generates two-dimensional images.

The camera may be connected movably, instead of rigidly, to the robot arm, or be connected, separately from the robot arm, rigidly or movably at a position near the milking parlour, for example to the fencing.

The control system does not have to be set up around a central processing unit. There may also be provided decentralized processing units, whether or not integrated with existing components, such as the CMOS image sensor. By also designing the actuators with decentralized processing units, there may even be obtained a network control, wherein the various decentralized processing units are in direct communication with each other.

It is advantageous to have a great number of tasks of the implement for automatically milking a cow performed on the basis of the spatial images from one 2D/3D camera, as described above. There is thus saved on purchase and maintenance of various separate sensors. However, the invention is already advantageous if only one task, or a combination of a smaller number of tasks, is performed on the basis of the images from the 2D/3D camera. In such cases the 2D/3D camera does not have to observe specifically a teat, but other parts of a cow, or even an entire cow.

Furthermore, an implement for automatically milking according to the invention may also be used advantageously for other dairy animals, such as goats. Other types of milking implements may also be used, such as implements with a totally different type of milking robot, implements in which a robot arm is moved to and from the cow with the aid of differently orientated axes of rotation, or implements in which the cow has a greater extent of freedom of movement.

Thus, the invention has been described by reference to certain embodiments discussed above. It will be recognized that these embodiments are susceptible to various modifications and alternative forms well known to those of skill in the art. Accordingly, although specific embodiments have been described, these are examples only and are not limiting upon the scope of the invention. The person skilled in the art will be able to apply various modifications and adaptations within the scope of the invention, the scope of protection for the invention being determined by the accompanying claims.