A distributed robot node, a distributed control system and a milking robot
Technical field of the invention
The present invention relates to a distributed robot node as defined by the preamble of claim 1. The invention is also related to a distributed control system for controlling a milking robot using a distributed robot node as defined by the preamble of claim 11, and a milking robot as defined in the preamble of claim 21.
Background to the invention
In present control systems for controlling a robot arm, the control process is often implemented in the main computer, as is illustrated by the system in figure 1.
The system in figure 1 comprises a main computer 1 having an I/O-device 2, which for instance is connected to a robot arm 4 and a detector 3 via several cables 5. The detector 3 is preferably situated on the robot arm 4. The information from the detector is sent back to the main computer 1 and used to calculate the movement of the robot arm 4 to obtain the desired position as instructed by the computer program. This calculation is performed using a software implemented regulator in the main computer, which may be implemented using c-code. The software implemented regulator is controlled by the CPU 6, which is connected to the I/O-device 2 via a parallel bus 7.
Several drawbacks with this system' may be identified, such as one computer may only service one automatic milking station, many cables are connected between the main computer and the milking robot .
In EP0663146, applicant Maasland N.V. , a system is described where several milking stations are connected to one main computer. A distributed computer is implemented at each milking station to be prepared to take over the processing if the link to the main computer fails.
In the non-published co-pending Swedish application 0102162-5, by the present applicant (filed 19 June 2001) , a system is described where some functionality is distributed from the main computer to a robot node . The main computer may be used to serve several milking stations, but the detector which is used to determine the position of the robot arm is still connected directly to the main computer. A drawback with this solution is that the operation of the robot arm may not be tested separately from the main computer.
Summary of the invention
The present invention seeks to provide a device that faster and more accurately may respond to the position of a robot arm when instructed to move said robot arm compared to prior art.
This object is achieved by the characterising features of claim 1, the characterising features of claim 11 and the characterising features of claim 21.
The invention seeks to provide a distributed robot node, and a distributed control system, for controlling a robot arm depending on instructions received by the robot node regarding a desired position of the robot arm in relation to a teat. The desired position of the robot arm may be a set of coordinates sent from a main computer connected to the distributed robot node. On the other hand, the desired position of the robot arm may also be a generic command, such as "attach teat cup to a
teat", sent from the main computer connected to the distributed robot node.
An advantage with the present invention is that a higher sampling frequency may be used when retrieving information about the actual position of the robot arm and when controlling the robot arm. As a consequence of the higher sampling frequency, a more stable regulator may be implemented in the processor in the distributed robot node.
A further advantage with the present invention is that when more information due to the higher sampling frequency is accessible to the processor, a faulty component for controlling the robot arm, e.g. a slow acting valve, may be used for an extended time, which will reduce the maintenance cost for the robot arm.
Another advantage with the present invention is that the distributed robot node may be placed very close to the robot arm, which in turn will reduce the length of the cables needed to obtain the same functionality as in prior art systems. This will result in a more service friendly system.
Another advantage is that the robot module, including the robot node and the robot arm may be tested separately from the main computer and the milking robot. This results in a less complicated manufacturing process and troubleshooting than in prior art systems .
Still another advantage with the present invention is that the main computer, which is connected to the distributed robot node, may be used to control several robot arms, since the actual processing is performed in the distributed robot nodes. Each distributed robot node is dedicated to a robot arm.
An advantage with a preferred embodiment of the present invention, when the processor is implemented in a Field Programmable Gate Array (FPGA) , is that the regulator which controls the robot arm may be developed using Simulink which easily may be directly converted into Hardware Description
Language (HDL) . This will result in lower developing costs and lower maintenance costs compared to prior art solutions, since it is easier to understand Simulink than the HDL.
Further characteristics of the invention and advantages thereof will be evident from the following detailed description of preferred embodiments given herein below and from the accompanying drawings, which are given by way of illustration only and thus not limitative of the present invention.
Brief description of the drawings
Fig. 1 shows a prior art computer system for controlling movements of a robot arm.
Fig. 2 shows an embodiment of a system according to the invention.
Fig. 3 shows a first embodiment of a distributed robot node according to the invention.
Fig. 4 shows a flow chart for implementing HDL IN the FPGA in fig. 3
Fig. 5 shows a second embodiment of a distributed robot node according to the invention.
Detailed description of preferred embodiments
The prior art system for controlling movements of a robot arm, as shown in figure 1, was described in connection with the background of the invention.
Figure 2 shows an embodiment of a system according to the invention. A main computer 1 is connected to a distributed robot node 10 via a communication link 11, such as cables in a serial bus or in a wireless manner using e.g. WLAN. A robot arm 4, and a positioning device 3, e.g. an ultrasonic sensor, a CCD camera, etc., are directly connected to the robot node 10 via cables 12. The positioning device 3 is used to determine the position of a robot arm 4 in relation to an object, such as a teat of a milking animal. The positioning device 3 is preferably arranged on the robot arm 4.
The positioning device 3 may supply raw data to the robot node 10. The raw data could be image information received by a camera. In said image a light reflection from an optionally used laser beam may be viewed. This technique is well known in prior art systems. The raw data is thereafter processed within the robot node 10 into position data to determine the position of the robot arm 4 relative to a teat .
Alternatively, the positioning device 3 may be adapted to internally process the raw data into position data, which means that position data regarding the position of the robot arm 4 in relation to a teat is supplied to the robot node 10.
A robot arm comprises at least one actuator to control the arm. In this embodiment, the robot arm 4 comprises several interconnected elements 13 that are controlled by two actuators 14, and a gripper 15 for holding e.g. a teat cup, the gripper 15 including a rotator 16 to allow the gripper 15
to rotate around an axis. Instead of being provided with a gripper for holding teat cups, these may be arranged directly on the robot arm 4. The actuators 14 may be implemented in a number of ways, e.g. pneumatically (pistons), electrically (stepper motors) , magnetically (PMSY brushless DC/brushless AC) .
Depending on the type of actuator, there will be valves, pressure difference sensors, hall sensors, resolvers, encoders, optical readers, etc. to control the actuators and as positioning sensors to determine the position of each actuator. Furthermore vacuum sensors, for sensing a vacuum level in at least a portion of a milk conducting system leading from a teat cup to a so called end unit, may be used to verify attachment of the teat cup to a teat .
The general idea of the invention is to distribute the control of the robot arm 4 to a robot node 10. This way shorter cables are needed to obtain the same functionality and the main computer 1 may easily manage several robot arms, since the controlling of each robot arm is performed by the distributed robot node 10.
Figure 3 shows a detailed view of a first embodiment of a distributed robot node 10. The robot node 10 is connected to the main computer 1 via a communication link 11 as previously described in connection with figure 2. The link 11 is connected to a serial interface 20, which is connected to a
FPGA 21 that constitutes the processor means of the robot node 10. The FPGA has an external crystal 22, which defines the clock frequency at which the FPGA works. The robot node is not dependent of the clock frequency used by the main computer 1, since the crystal 22 is used to determine the clock frequency of the FPGA. As a consequence, more accurate control of the
actuators may be obtained, and thus a more stable regulator may be achieved.
The FPGA is also connected to a bus 28 to which several units are connected, such as an analogue/digital converter (ADC) 23, a digital/analogue converter (DAC) 24, an encoder interface 25 and an input/output interface 26. The ADC 23 receives signals from the robot arm that are converted from an analogue form to a digital form and an example of such a signal is pressure difference measured in current or voltage. The DAC 24 sends out signals that need to be converted from digital form to analogue form and an example of such a signal is the control signal to a proportional valve. These units 23-26 are used to receive information from the positioning device 3 regarding the relative position of a sought object, e.g. a teat of a milking animal, and controlling the movements of the robot arm by instructing each actuator of the robot arm 4 to move to a desired position and receiving the actual position of each actuator when moving to the desired position.
Furthermore, it is possible to test the function of each robot node 10 separately before assembling a complete system, which will reduce the manufacturing cost of each robot arm, and thus the complete system.
A FPGA 22 is a circuit, which receives its operating properties by a hardware description language (HDL) . A FPGA is a more general device than a microcontroller, which may be built from a FPGA, and a FPGA may execute instructions in parallel. Microcontrollers and microprocessors are generally designed for sequential operation. It has been more difficult, up to now, to write HDL for a FPGA than C for a microcontroller or microprocessor, but new software makes it possible to convert
a high level language "Simulink" into HDL, as described in connection with figure 4.
Figure 4 shows a flow chart for converting a regulator described in Simulink into HDL. The function of the regulator for controlling the robot arm is described in box 31. The regulator is described in HDL in box 32, using a signal compilator 33 to convert the regulator described in Simulink. This is a well known method and is further disclosed in the Newsletter for Altera Customers "News & Views", First Quarter 2002, pages 38-39.
Figure 5 shows a second embodiment of a distributed robot node 40 according to the invention. The robot node 40 is connected to a main computer 1 via a communication link 11, as previously described. The link 11 is connected to a serial interface 20, which is connected to two microprocessors 41 arranged in parallel . Both microprocessors have an external crystal 22, in this example the same crystal, but one crystal for each microprocessor 41 may be used.
The microprocessors are connected to a bus 28 to which several units are connected, such as an analogue/digital converter (ADC) 23, a digital/analogue converter (DAC) 24, an encoder interface 25 and an input/output interface 26, as described above .
By implementing a distributed robot node in a milking system, a dedicated processor is obtained for each robot arm. No time sharing will be necessary with other processes, which was the case in prior art systems when the processing was controlled by the main computer .
The invention will now be exemplified using the distributed control system in figure 2.
A milking animal enters a milking parlour and the identity of the animal is detected, e.g. using a transponder. The main computer 1 instructs the distributed robot node 10 to attach a teat cup to each teat of the milking animal .
The instructions sent to the distributed robot node include information regarding a desired position of the robot arm in relation to a teat, which could be:
a set of position coordinates for each teat that corresponds to the last recorded position during previous operation, e.g. milking operation, cleaning operation, etc.
a set of position coordinates, corresponding to a start position from which the robot arm 4 starts a search for any present teats, or
a generic command to "attach teat cups to each teat", without any information regarding position coordinates. The robot node 10 contains all the functionality needed to search and find each teat.
One teat cup is fetched from a teat cup holder; alternatively one teat cup arranged on the robot arm is selected. The positioning device 3 is used to determine the position of the robot arm 4 in relation to a teat .
Position information is supplied to the robot node from the positioning device 3, either as raw data or as position data as previously discussed, and the robot arm 4 is moved to a position corresponding to the desired position, e.g. directly beneath a teat .
The teat cup is thereafter attached to the teat and the vacuum sensor (not shown) is used to verify attachment of the teat cup to the teat .
The robot node 10 notifies the main computer 1 that the teat cup has been attached. The main computer 1 initiates milking operation of the relevant teat.
The procedure is repeated for the remaining teats using a selected desired position for each teat.
The amount of information communicated between the main computer 1 and the robot node 10 may vary depending on the implementation, e.g. the desired position for all teats may be sent prior to attachment of a first teat cup, or the desired positions may be communicated one at the time prior to attachment of each teat cup.
However, the controlling of the robot arm 4 is still managed locally by the robot node 10 irrespectively of the amount of information communicated between the main computer 1 and the robot node 10.
Further examples of information exchanged between the main computer 1 and the robot node 10 are:
1. Feedback of actual teat positions.
When cleaning the teats prior to milking, the robot arm must localise each teat, this information may be sent back to the main computer 1. The main computer updates the database comprising data for -the milking animal. The updated position of each teat may be reused in a subsequent procedure . The main computer 1 supplies information regarding the updated position of each teat when instructing the robot node 10 to perform a
subsequent procedure, e.g. when attaching the teat cup to the teat, or performing after treatment of the teats.
2. Operation status of robot arm
A status inquiry is sent from the main computer 1 "Does the robot arm function properly?" . A response to the status inquiry, from the robot node 10, may be "Cylinder z has to much friction", which indicates that the cylinder should be replaced.
3. Operation status of positioning device
A status inquiry is sent from the main computer 1 "Does the positioning device function properly?" . A response to the status inquiry, from the robot node 10, may be "The positioning device is in need of cleaning" .
4. After treatment
When the milking operation has been completed, the main computer requests the robot node 10 to initiate after treatment procedures, which may include application of • disinfectant, application of sun lotion, etc. When the after treatment is completed, the robot node 10 communicates this to the main computer 1.
5. Idling
If no animal enters the milking parlour, instructions may be sent from the main computer 1 to the robot node 10 to put the robot arm 4 in idle mode. When the robot arm 4 is idling, a response is sent back to the main computer 1 indicating that the robot arm 4 is in idle mode.