How was the kilogram measurement invented

Computer-aided oestrus monitoring for dairy cows using the fuzzy logc method. Yong Yang


1 Institute for Agricultural Engineering at the Technical University of Munich in Weihenstephan Director: Univ.-Prof. Dr.agr. Dr.h.c. (AE Keszthely) J. Schön Computer-aided oestrus monitoring of dairy cows using the Fuzzy Loglc method by Yong Yang Complete copy of the dissertation approved by the Faculty of Agriculture and Horticulture at the Technical University of Munich to obtain the academic degree of Doctor of Agricultural Sciences. Chairman: Examiner of the dissertation: Unlv. Prof. Dr. A. Heißenhuber 1. Univ. Prof. Dr. Dr.h.c. (AE Keszthely) J. Schön 2. Univ. Prof. Dr. P. Wagner The dissertation was submitted to the Technical University of Munich on and accepted by the Faculty of Agriculture and Horticulture on.

2 Yong Yang Computer-aided oestrus monitoring in dairy cows using the fuzzy logic method UTZ Herbert Verlag 'Wissenschaft München 1998

3 Die Deutsche Bibliothek - CIP standard recording Y "" ll, Ya "g: Computer-aided oestrus monitoring in dairy cows using the fuzzy logic method / Yong Yang. - Munich: Utz, Wiss., 1998 (agricultural sciences) Zugl .: Munich, Techn. Univ., Diss., 1998 ISBN This work is protected by copyright. The resulting rights, in particular those of translation, reprinting, extraction of images, reproduction by photomechanical or similar means and storage in data processing systems remain with Usage for specific purposes only, reserved Copyright Herber! Utz Verlag GmbH 1998 ISBN Printed in Germany Printing: Kompion R. Biechteler GmbH, Munich Binding: print + bind gmbh, Munich Herber! Utz Verlag GmbH, Munich Tel .: 089 / Fax: 089 /

4 Dedicated to my wife and daughter

5 FOREWORD The present work was created during my work as a doctoral student at the Institute for Agricultural Engineering at the Technical University of Munich as part of a research project funded by the H. Wilhelm Schaumann Foundation. In the present work a management system and on its basis the modeling and the algorithms for the detection of oestrus in dairy cows using the fuzzy logic method was developed. My special thanks go to Prof. Dr. Dr. h.c. H. Schön for assigning the topic and supervising the work. Dr. G. WendI from the animal husbandry department of the Bavarian State Institute for Agricultural Engineering and Prof. Dr. I would like to thank M. Precht from the Chair of Statistics and Data Processing for the technical support and valuable suggestions. I would also like to thank Prof. Dr. P. Wagner for taking over the 2nd expert and with Prof. Dr. A. Heißenhuber for taking over the chairmanship of the examination. Last but not least, I would like to thank the H. Wilhelm Schaumann Foundation for supporting the work. I would also like to express my special thanks to all colleagues and employees of the Institute for Agricultural Engineering Weihenstephan for their helpful and courteous behavior during my stay at the institute.

6 Table of contents Table of contents List of figures List of tables List of abbreviations and symbols Page IV VII VIII 1. Introduction and problem definition 1 2. State of knowledge Physiology during the oestrus cycle of the dairy cow Control of sexual activity through hormones 4 2. i.2 Oestrus cycle of the dairy cows 6 2.1.3 Body temperature in the oestrus cycle i 1 2. i.4 Milk temperature in the oestrus cycle i 4 2. i.5 Physiological behavior of the dairy cows in heat i Sensors for the computer-aided recording of the heat symptoms Sensors on the milking cluster Motion sensor Sensor for measuring concentrate intake Evaluation method and previous results Objective material and method Data basis fuzzy logic 26

7 11 Table of contents Linguistic variables Belonging functions Fuzzy sets Fuzzy inference Operators of the management system Development environment of the management system Programming tool Object and event-oriented programming Objects, properties, methods and events Writing in the program System development strategy User interface for data processing User interface for word processing Error handling Development of the help system Development der AI ~ Jorithme' Analysis of parameters activity Milk production Concentrated feed intake Conclusion from the analysis of the three parameters Membership functions Membership functions "Activity" 67

8 Contents Membership functions "Milk production" Membership functions "Heat" Mathematical expressions for the membership functions Mathematical expressions for the activity Mathematical expressions for the milk production Mathematical expressions for the heat Inference strategy and engineering "know-how" Algorithms for heat detection Heat detection in the management system Fuzzification Fuzzy inference defuzzification Execution oestrus detection in the management system model silver check and results check of the detection model in fuzzy logic check of the detection model in simplified fuzzy logic check of heat detection through the activity comparison of the check results discussion Windows operating system Visual Basic Fuzzy Logic 100 programming language

9 IV Table of contents 8.4 Selected parameters with methods known in the literature to date Summary of the bibliography 107 Appendix 115

10 List of figures v List of figures Fig. 1: Fig. 2: Fig. 3: Influence of production technology on the contribution margin of the dairy cattle hall 1 Hormonal control system of sexual activity 5 Average daily body temperature in the course of the oestrus cycle in animals in tied barns and with different fertility Fig. 4: Fig.5: Course of the milk temperature in the oestrus cycle Animal monitoring and process control in dairy farming 17 Fig.6: Fig.7: Sensors for Brunsl monitoring in dairy cows Computer-aided heat detection in loose housing. Percentage of 18 recognized boobs as well as misclassifications for different confidence periods and error probability 21 Fig. 8: Structure of a simple fuzzy logic system 28 Fig. 9: Standard membership functions 30 Fig.10: Membership functions of the variable "temperature" 31 Fig. 11: Membership functions of different Fuzzy sets 34 Fig. 12: The design platform of Visual Basic 41 Fig. 13: Visual design of the user interface using the example 42 Fig. 14: Window for writing programs 46 Fig. 15: Strategies for developing the management system 47 Fig. 16: Open file in the Windows standard dialog box 48 Fig. 17: User interface for data processing 50 Fig. 18: Data analysis in the user interface for data processing of the parameters activity, milk yield and concentrate intake 51 Fig. 19: User interface for word processing 52 Fig. 20: Error messages when the system is operated incorrectly 53 Fig. 21: User interface of the help system of the management system 54

11 VI List of Figures Fig. 22: Activity display of a cow after calving for another 200 days 57 Fig. 23: Activity display on the days of oestrus of all cows 59 Fig. 24: Milk performance display per hour on the lactation days 60 Fig. 25: Milk performance display of a Cow on the lactation days 61 Fig. 26: Milk yield distribution of all cows during the heat period 62 Fig. 27: Representation of the amount of power consumed by a cow 63 Fig. 28: Distribution of residual concentrate of all cows during the heat period 64 Fig. 29: Frequency distribution of activity, milk yield and residual concentrate inside and outside the Heat 66 Fig. 30: Membership functions of the variable "Activity" 68 Fig. 31: Membership functions of the variable "Milk production" 69 Fig. 32: Membership functions of the output variable "Heat" 70 Fig. 33: Rule blocks for fuzzy inference for heat detection with the parameters " Milk production "and" activity "75 Fig. 34: Structure of the algorithms for the oestrus 76 Fig. 35: Flow chart of the algorithms for oestrus detection in 79 Fig. 36: Degree of activity belonging to technical variable 2, Fig. 37: Degree of milk production belonging to technical variable 0.65 81 Fig. 38: The four of the 84 Fig. 39 : Total area for numerical integration during defuzzification, 86 Fig. 40: Center of gravity of the total area in the 90 Fuzzy Model ... 94


13 Viii List of abbreviations and symbols List of abbreviations and symbols A CoA F message H kg / h L form M MBF min max N ns PC R message SN SH SuppA !! (x) !! A (X) !! AAS (X) !! AvS (X) !! A ZF LE x fuzzy amount Center of Area (center of area) false report high kilograms kilograms per hour lambda form medium membership function (membership function) minimum operation maximum operation low insignificant personal computer correct message very low very high supporting amount degree of membership or membership function degree of membership or membership function over set A membership function over intersection A and B membership function over union set A and B membership wedge function over set A sharp of the defuzzification membership function summation sign elements of ... ex-level-amount basic range of values

14 Introduction and problem statement 1. Introduction and problem statement With an income share of around 40%, dairy farming is one of the most important branches of agriculture in Bavaria (SCHÖN, 1993). The profitability of dairy farming depends primarily on the milk yield. Due to the milk production of the most successful farms with 6405 kg / cow compared to an average of 4432 kg / cow, the contribution margin of all Bavarian accounting companies increases by 735 DM. The reproductive output of the most successful farms with 1.17 calves / year results from the average of 0 , 67 calves / year an advantage of 643 DM (STOCKINGER, 1995). That is why the increase in the annual amount of milk per cow remains the main target in milk production. DM / cow I year 10eo,, milk yield kg 1 cow 4432/6405 calves / year basic forage output service life piece kg 1 cow years 0.67 / 1.17 958/3854 2.3 / 5.9 Influence factors Fig. 1: Influence of production technology on the Contribution margin of dairy farming (STOCKINGER, 1995) When comparing excellently managed dairy herds with the mean fertility performance in the national average, it becomes clear that

15 2 and the improvement of the reproductive performance are considerable reserves for increasing the profitability of the. The reproductive performance is defined by the number of calvings per dairy cow and year. You can choose from the specified sections of pregnancy with a duration of 280 to 290 as well as the rest period of approx. 2 months to and the animal for the following pregnancy. The interval between calving between two consecutive calves, as the sum of pregnancy and resting time, should therefore be around 350 days (ROTH, However, not a few dairy farmers have problems with fertility. About 30% of cows have an interval between calving of more than 400 days. Infertility as a cause of loss usually comes first; about 25% of all losses are eliminated because of infertility (WENDL, 1995). The fertility of a herd is influenced by two factors! On the one hand, the effectiveness of the heat observation, also known as the heat detection rate (percentage of animals, which are recognized as such) and on the other hand the conception rate (percentage of inseminated animals that become pregnant). Often only about half of the cows in heat are recognized as such in the dairy farm (HEUWIESER, 1995). The "poor fertility" of a herd often from inadequate oestrus observation te even have a share in the fertility disorders of a herd than an insufficient one. Two problem areas have to be solved (HEuwIEsEr, et al., Unobserved periods of oestrus does occur, and false assumption of oestrus (the supposed cow is actually not in oestrus at all , but is inseminated). Both mistakes reduce the fertility of a herd.

16 Introduction and problem definition 3 The conventional visual observation of heat in dairy cows is made even more difficult with larger herds and increasing workload and is therefore neglected. A lack of time or lack of knowledge are often the cause of poor oestrus observation. Correct oestrus monitoring and timely detection of oestrus represent one of the main problems in artificial insemination of dairy cows. As the herd size and performance level increase, so do the demands placed on management in order to avoid economic losses due to overlooked booze or incorrect decisions when choosing when to inseminate avoid. In the present work, a computer-aided management system for the monitoring of estrus in cowlings using the fuzzy logic method is to be developed in order to improve heat detection by means of sensors and computer-aided decision-making methods.

17 4 State of knowledge 2 State of knowledge The development of computer-aided management systems for monitoring the oestrus of dairy cows requires, among other things, basic knowledge of the physiology during the oestrus cycle of dairy cows, the technical recording of oestrus symptoms and computer-aided processing. 2.1 Physiology during the oestrus cycle of the dairy cow Each cow should bring a calf annually. Firstly, this is necessary for regular renewal of the lactation, secondly for stock replenishment and selection, thirdly for the provision of young cattle that are fit for fattening. Furthermore, the value of the calf is an important item in the cost calculation of milk production (GRANZ, 1985) Control of sexual activity by hormones Like many other animal expressions, the maturation and activity of the sexual organs is also controlled by hormones, by messengers sent by certain hormonal glands the blood (GRANZ, 1985). The endocrine glands in turn are controlled by a superordinate center of the pituitary gland in the diencephalon, which works closely with the hypothalamus, with a neighboring connection point to the central nervous system. This receives information via nerve tracts from the areas of the brain that process sensory stimuli. In the hypothalamus, so-called releasers (release factors) with a hormone character are formed, of which the GnRH (Gonadotropin Releasing Hormone) is responsible for sexual activity in both sexes. GnRH causes the anterior lobe of the pituitary to produce the two gonadotropic hormones, namely follitropin, also called FSH (follicle-stimulating hormone), and lutropin, previously LH (luteinis-

18 State of the art 5 rendes hormone), to be released in varying proportions. Figure 2 shows the hormonal control system of sexual activity (according to GRANZ, 1985). Environmental stimuli (length of day, fragrances, grunts, etc.) Sense organs Sexual sphere of the brain Positive feedback Male house mammals I ~ Hypothalamus + (ZWiSchirnhirn): Gonadoliberin: (gonadotropin release factor), II ~ -'Y "f-_ ~ I ~ 1- _ negative feedback female domestic mammals appendage glands male behavior (libido) secondary male female sexual characteristics characteristics Fig. 2: Hormonal control system of sexual activity (according to GRANZ, 1985) FSH and LH initiate the reproductive period The gonads give rise to the growth of these glands and the development of mature germ cells, and they also stimulate certain areas

19 6 State of the art knowledge of the gonads indicates the formation of the actual sex hormones, which then control the further development in the sex organs. The most striking difference between testosterone and oestradiol effects can be seen in the sexual behavior: Male animals are usually ready to mate after the period of maturity (puberty) apart from slight environmental fluctuations. Female animals are subject to a cyclical process with regular pauses in oestrus between ovulation times. The cyclical variations in the function of the ovary, which are also expressed by morphological and functional changes in the secondary genital organs, are known as the oestrus cycle. The oestrus cycle can be divided into different periods such as 8. Pre-heat, main heat, after-heat and inter-heat Brunslzyldus of the dairy cows The duration of the sexual cycle in dairy cows is on average 21 (18 to 24) days. An average duration of only 20 days is observed in heifers (GRUNERT, 1982). It is controversial whether the cycle length of 28 days, which occurs more or less regularly in some cows, has physiological causes. The factors that lead to deviations in the cycle duration that are to be assessed as pathological, such as, for example, lengthening the cycle at high ambient temperatures, etc., are also held responsible for the variation in the physiological range.When assessing the cycle status, the animal owner will primarily have to rely on the phenomena in the outer cycle (pronounced changes in behavior around the oestrus date). In some cases, it can also refer to symptoms of the mucous membrane cycle (quantity and quality of the oestrus mucus that drains off, reddening and degree of moisture in the vaginal atrial mucosa).

20 State of knowledge 7 There are differences between the cows in the oestrus cycle, i.e. the interval from one oestrus to the next. This also applies to the heat duration, normal hours (GRANZ et al., 1985). In order not to miss the right time for covering or insemination, it is necessary to determine the start of heat as precisely as possible. Cycle phases Grunert et al. (1982) divided the sexual cycle into the following 4 phases: - Proestrus or pre-estrus (pre-estrus) - Estrus or heat (also called main or high heat) - Post-estrus or after-heat (metostrus) - Interostrus or inter-estrus (diostrus, interval between after-estrus and pre-estrus) . After a period of sexual rest, the onset of typical behavioral changes in proestrus makes the beginning of a new cyclical event evident. Nevertheless, the actual start of the cycle is considered to be the first day of oestrus. Only the oestrus can be limited in time by the controllable willingness to mate. With this classification, the preestrus falls in the last 3 days of the previous cycle. In American literature in particular, day 1 of the cycle is considered to be the day (GRUNERT et al., 1985) on which ovulation takes place. The day on which deck is ready is referred to as day 0. This discrepancy must be taken into account when making comparative considerations. The 4 cycle phases, which are characterized by relative sexual activity, proestrus, estrus, postestrus and interestrus, are also called total estrus

21 8 State of the art denotes The term high or main heat only applies to the time of heat (in the narrower sense), which is defined by willingness to copulate and is therefore strictly timed (Table 1). Table 1: Heat symptoms of the dairy cow (according to GRANZ, 1985) Cycle Day 21st Day 1st day Heat Pre-heat 6-10 hours before the start of heat Main heat Excitation phase Tolerance phase Post-heat heat hours 34 Symptoms 1. Approaching and 1. Roaring, buzzing 1. "Stands "no longer smelling" 2. "stops" at 2. still in the other animals jumping on by being close to other animals 2. starts other other animals 3. mucus heavily, tougher animals 3. tries to continue jumping mucus onto others 3. vagina reddens 4. Excited and feeling up, gets damp, sensitive shame swells, 5. Lifts the tail restlessness 6. Bends the back when 4. Holds back milk Trying through 7. Eats less than normal 8. Clear, thin mucus on tail underside. and ischial tuberosity process at maturation of the ovarian bladder matured ovarian bladder ovarian rupture ovary time of insemination

22 Current state of knowledge 9 Proestrus (pre-estrus or pre-estrus) Proestrus is a period that cannot be precisely delimited and lasts from the onset of behavioral changes to the point in time when the cattle are ready for mating for the first time. The first sign of pre-heat is increased nervousness. The behavioral deviations are not always clearly pronounced. A bull should recognize the pre-heat stage one to three days earlier than a trained observer. A characteristic and usually clearly visible symptom of proestrus is the increased jumping on other animals in the herd. A conspicuous approach to other heifers and cows, sometimes with smell, is also often observed. During a gynecological examination, especially towards the end of the proestrus, slight swelling of the vulva, a hyperemic and extremely moist vaginal mucosa and an accumulation of mucus in the vagina can be observed. Occasionally, mucus that has already drained off is visible at the lower pubic corner. The consistency of mucus changes during pre-heat. It is initially moderately viscous. Towards the end of this phase, the clear, transparent slime is stringy. The cervix shows some relaxation. The increased excitability is also shown on rectal palpation, the uterus reacting with an already more or less pronounced willingness to contract. The increased volume of blood caused by estrogen leads to a slight enlargement of the uterus. On the ovaries, the small and stiff corpus luteum, which is in regression, can already be palpated as Graafian follicles in the formation phase. Oestrus (high or main heat) Oestrus is the period in which the female animal tolerates copulation. In the case of cattle living in the wild, the period between the first and last copulation is also regarded as heat. Two to six matings occur during estrus when bulls roam free in the herd (LEIDL, 1963). The neuroendocrine system, which receives impulses that are triggered via the brain by sensory, visual, acoustic and olfactory stimuli, is also largely responsible for the mating behavior. The co-

23 10 Current state of knowledge The low cattle's willingness to be ready for training takes an average of 18 hours. The duration of the heat depends on the race. In zebu cattle, oestrus should only last about 5 hours and occur primarily at night (GRUNERT et al., 1982). The duration of oestrus can be influenced by exogenous and endogenous factors (for example shortening the duration of oestrus at higher temperatures). If a bull is present in the herd, the external oestrus phenomena are intensified and the duration of oestrus is shortened. On the other hand, unfavorable feeding and lighting conditions can increase the duration of the Öslrus. In contrast to other animal species, the relatively short duration of oestrus in cattle has the advantage that the coverings when jumping out of the hand, but also inseminations, generally lead to better fertilization results, since the time of ovulation is easier to narrow down. Post-oestrus (after-estrus or metostrus) The post-oestrus, like the pro-oestrus, is also not an exactly definable period. It generally ranges from the point in time when the willingness to mate is no longer present until the external and internal oestrus symptoms have disappeared (for example, uterine contraction has faded, hyperemia has subsided, and increased secretion from the cervix, vagina and vestibule, closure of the cervical canal). Especially in heifers, during the after-oestrus, about two days after the end of oestrus, blood can be added to the mucus exiting the vagina (post- or metestral bleeding). The blood comes from the uterus; After capillary bleeding into the uterine lumen as a result of estrogen-related hyperemia, the blood mixes with the mucus after oestrus. This bloody mucus can be found on the hair anterior to the vulva, on the underside of the tail, in the area of ​​the ischial tuberosity or the hind legs. Its appearance suggests that ovulation has already occurred. The so-called bleeding does not allow any prognostic statement regarding a successful or no fertilization.

24 State of knowledge 11 Interostrus (interostrus or diostrus) Interostrus is the period characterized by sexual rest. It follows the postestrus and lasts until the beginning of the proestrus. With a duration of about 14 days, the interestrus is the longest phase in the sexual cycle. It is characterized by the absence of any symptoms that are considered to be an expression of willingness to approach the sexual partner. Essentially, the interestrus corresponds to the corpus luteum phase of the ovarian cycle (about 4th to 17th day of the cycle) and the secretion phase of the mucous membrane cycle. The interestrus ends with the onset of corpus luteum regression, which is initiated by a prostagiandine formed by the uterus. Optimal time for insemination Heifers and cows that roam free with a bull are generally mated several times during the main heat. In the so-called jump out of the hand, on the other hand, the female animal is fed to the bull only once, at a time determined by the animal owner. This means that copulation and ovulation times are not always optimally coordinated with one another. The further influencing of natural conditions by humans in the context of insemination, the extensive elimination of instincts in both male and female animals, increases the risk of "manipulated sterility" (for example insemination of non-fervent animals). Progestereon determinations in the milk taken at the time of insemination show that more than 20% of all first inseminations take place in the interostrus (GRUNERT, 1982), i.e. when a functional corpus luteum is present (Table 1) general overview of the physiological state of the organism and can give an indication of deviations of the state of health from the generally applicable norm,

25 12 State of knowledge without, however, enabling a concrete diagnosis of the causes (ROTH, 1987). With the help of the modern technology available for data transmission and the implantation of thermal sensors under the skin of the animals, Zartmann et al. (1982) to prove the time of heat in dairy cows. Thermal sensors implanted near the jugular vein and the right paralumbar fossa record the relative temperature of the animals. The jugular vein temperature is not cyclical in any way. Recognize the trend, while, in contrast, the body temperature at the paralumbaris fossa is significantly increased by the oestrus. The measured values ​​(frequency / minute) deviate significantly from the value range of the interoestrus on the day of the oestrus. In the course of a three-month test cycle, Sambraus (1980) was only able to vaguely detect an influence of active oestrus on the vaginal temperature of the animals, while the vaginal temperature on the day before oestrus tended to be reduced by 0.2-0.3 C compared to the previous day . Roth (1987) carried out two experiments on characteristic changes in the body temperature of dairy cows during the oestrus cycle. The course of the body temperature in the oestrus cycle is shown in Figure 3. Figure 3 illustrates the influence of the oestrus on the body temperature of the test animals using the course of the mean values. Thereafter, the heat leads to characteristic increased body temperatures, with the body temperature on the heat day always representing the highest measured values ​​of the entire cycle. With the exception of oestrus, no further systematic influencing variables on the rectally measured body temperature can be found in the course of the oestrus cycle. Roth analyzed the influence of estrus on body temperature using a statistical method. Table 2 shows the results of the analysis.

26 State of knowledge 13 38,6 oe 38,, 4 :::; Ti!

27 14 State of the art The influence of oestrus on the body temperature of the test animals leads, regardless of the animal material, to an approximately identical increase in body temperature in both tests, which was confirmed to be very significant for both tests. The oestrus also results in increased variations and differences between successive measurement times, which means that the standard deviation of the day of oestrus deviates more or less significantly from the corresponding value of the inter oestrus. it was possible to prove that the oestrus has a significant influence on the body temperature. On the basis of Figure 4, the answer is now whether the body temperature reaction found during oestrus can be indirectly detected by the milk temperature. Figure 4 shows the course of the test millel values ​​of the milk temperature in the period of an oestrus cycle in the tethering and loose pens. The common feature of the graphs shown is the typical increase in milk temperature, which can always be identified systematically from the active heat. The milk temperature on the day of active oestrus represents the highest measured value in the entire oestrus cycle for each attempt; this illustrates the influence of heat on the milk temperature. Table 3 summarizes some essential systematic influencing variables on the measured values ​​of the milk temperature. The table shows that in each experiment a milk temperature at the time of oestrus is recorded, which can be very significantly differentiated from the mean value in the overall cycle. This illustrates the transferring influence of oestrus on the milk temperature.

28 State of knowledge :: 1 ~ (J) 0 E (J): E 38.3 oe 38.1 38.0 38.1 38.0 37.9 37.8 ~ 38.4 :: 2 38.3 38.2 38.1 38.0 37.9 37.8 15 / \ - ~ \ :: / \ vm ~ v = / o M = mean value \ V = experiment /, Vl \ / ~ tr \ p .. " ~~ "" - ',,,, - "' - 't.:.l:::."'/ - M V1 tying stall / V2 L _ Mv :; ~;:; \ \ V3 playpen% ~. ~ / ~ ~ / -%; tr-vy ~, ~ jv ~ - M V3 ~ I-- Heat day d 14 Heat cycle Fig. 4: Course of the milk temperature in the heat cycle (according to ROTH, 1987) v1: n = 24rrag; v2: n = 15rrag; v3: n = 24rrag Table 3: Comparison of milk temperature with regard to the influence of oestrus, M: mean; S: standard deviation (according to ROTH, 1987) Experiment 1 Experiment 2 Experiment 3 MSMSMS n morning / evening total cycle 38.02 0.17 37.83 0.24 38.02 0.21 - Easter day 38.23 0.20 37.94 0.27 38.38 0.47 Diflerence 0,, 11.,. 0.36 ... mean values In the morning 38.00 0.18 37,, 97 0.21 in the evening 38.06 0.19 37.82 0.30 38.07 0.24 Change in the morning / evening test same for +0.06.,. -0.01 n, s, +0.10 '., Vl: v2 vl: v3 v2: vl v2: v3 v3: vl v3: v2 - total cycle .., n, s ....,., n, s .... heat day ... n. s n, s. '..

29 16 State of knowledge Physiological behavior of dairy cows in heat Changed activity has always been the most important parameter for determining the time of heat in dairy cows. Restlessness of the cow during her proestrus is an important physiological behavior. The willingness to tolerate standing oestrus (heat) is the primary sign of oestrus and is the key sign to be recognized and the most reliable indication that insemination can take place. A cow is very likely (90-95%) in heat if it tolerates other animals jumping up (HEUWIESER, 1995). The cow that does the jumping, on the other hand, is much less likely (65-70%) to be in heat. In addition to the willingness to tolerate as a pnmarem oestrus, there are other secondary oestrus in different combinations and degrees of clarity. Usually they can also be seen in the pre- and post-oestrus. The discharge of clear mucus from the pubic cleft (vulva), traces of mucus on the tail, on the ischial tuberosity and on the thighs give the best indications of a running heat. The mutual circling of two cows, seeking contact, rubbing, laying on the head), licking and smelling of neighboring animals are typical behaviors in heat. A decrease in milk of more than 10% (Heuwieser, 1995) and a decrease in feed consumption are also signs of oestrus. 2.2 Sensors for rec: hl1lerl ~ es; ti.temerfaisslmg the oestrus symptoms The monitoring system is divided into two parts: on the one hand there are the mechanical and the electronic ones such as e.g. that at the foot of the

30 State of the art 17 Pedometer attached to the cow, the animal identification, the floor antenna and the signal recording devices at the milking parlor to record the data on the activity, the milk yield, the milk temperature, the electrical conductivity of the milk and the concentrate intake, etc. On the other hand, the PE system or the software used to manage and process the data entered. Figure 5 shows a system of animal monitoring and process control in dairy farming (according to SCHÖN, 1983). Herd management Animal monitoring Feed allocation and recording Production monitoring Production control dialogue traffic Fig. 5: Animal monitoring and process control in dairy farming (n.schön, 1983) In the computer-aided monitoring of oestrus in dairy cows, the animal data is automatically recorded with the help of sensors, taken over by a connected computer and processed . Figure 6 shows the sensors for oestrus monitoring in dairy cows.

31 18 State of knowledge Parameters Sensors Milk quantity, one-chamber volume device. ~ Concentrated feed intake / "Pq? SI) Activity Animal behavior Temperature and conductivity Infrared measurement Step counter Temperature Electrical conductivity Fig. 6: Sensors for temperature monitoring in dairy cows (after SCHLÜNSEN, 1987)

32 State of the art sensors sm milking cluster The automatic milk quantity recording requires an assignment of the recorded milk quantity to the individual animal. That is why animal identification is required at every milking stall. The milk quantity measuring devices are installed between the milking cluster and the milk discharge line. After each milking process, the recorded data are transmitted to the process computer.The sensors on the milking cluster are also used to record the milk temperature. An automatic detection of the body temperature can technically be achieved by indirect measurement of the milk temperature. Movement sensor Heated cows usually show a changed activity behavior, which differs significantly from that of cows not in heat. The increased movement activity can be recorded by a pedometer attached to the neck or foot of the cow. The activity of the cow causes a drop of mercury to move in a glass tube between two contacts. These electrical impulses are counted, electronically stored and transmitted together with the identification to the management peer, where they are evaluated. They consist of a detection unit, an allocation device, a feeding bowl, a storage container and a lateral feeding area delimitation. The animals provided with the responder can independently call up their intended power supply.

33 20 State of the art The data is transmitted every time you visit the concentrate station. For this purpose, the existing Futlerslations are being converted so that each station is equipped with an antenna in the ground for the foot counters. 2.3 Alien value method and previous er! ~ Etmh ~ se There are various parameters and methods for heat detection in dairy cows. Step activity, temperature, milk yield, feed consumption and the electrical conductivity of the animals' milk prove to be essential parameters for heat detection. BALL et al. (1978) as well as THOMPSON and RODRIAN (1983) express the hypothesis that such a "multivariate" method should lead to significantly more favorable results in oestrus detection than the "univariate" method. ROTH et al. (1987) examined the possibilities of computer-aided heat detection. The selected parameters were the step activity and the milk temperature. The heat detection was carried out by statistically linking the various variables. The results showed that over 80% of all boos were recognized and the proportion of incorrect information could be reduced to approx. 20%, Fig. 7. WENDL et al. (1997) investigated heat detection through activity alone. The evaluation of the activity behavior is based on a comparison of the current hourly activity with the moving average from the past 7 days, with the pedometer readings at the time of the respective morning and evening milking being offset. Increased activity is signaled when the relative deviation of the hourly activity from the mean activity is greater than a defined threshold value.

34 State of knowledge I I Legend: 6 i: period [days] of the confidence interval 0 I Error probability wedge p l, -parameter- 01% I step number- "1" f. Model '<: 10.5% model' "0.5" 10 Cl 0.1 "10 .. 0.1" 10., 00.01 "10" -0.01 ", each." .., 03 "3 I * 5 .., "" "'3 0B I ... V o. 1OC! 78 ~ HJ IV, V6 06 target ~",, 10 S ... 7A9,' "~ 9" 5.6 eṭ wo 8 1 result 08 z 2 ~, 3 4AS ~ 4 ~ o "! O 100 Detection rate Fig. 7: Computer-aided heat detection in loose housing. Percentage of recognized heats as well as misclassifications for different confidence periods and error probability (according to ROTH, 1987) A positive heat detection is given if the relative deviation within the period "two days before insemination day to insemination day" exceeds the specified threshold value. A false alarm is deemed to have occurred if the respective threshold value has been exceeded within the period "15 days before the day of insemination and 30 days after the day of insemination", excluding the period of oestrus (2 days before and 1 day after the day of insemination). Table 4 shows the results the heat detection.

35 22 State of knowledge Table 4: Number of activity overruns Number and frequency of activity overruns during oestrus depending on the threshold value in 87 oestrus events (according to WENDl el al., 1997) relative threshold value for overreacting activity, 6 70 , 1 77.4 2 48.6 29.9 22.6 3 1.4 0.0 0.0 4 1.4 0.0 0.0 5 0.0 0.0 0.0 82.8 77.0 71.3 Erroneous rates 36.8 24.7 19.5 ERADUS el al. (1996) carried out heat detection in simplified fuzzy logic. The selected parameters were the step activity, the milk temperature and the milk yield. Two control systems have been developed. One rule system had 12 and the other 24 rules. Table 5 shows the rule system with 12 fuzzy rules. In the case of the 12 rule system, the hit rate was 79% and the error rate 66%. With the 24-rule system, a hit rate of 83% and an error rate of 48% were achieved. Table 5: Fuzzy rule base for oestrus detection (according to ERADUS el al., 1996) Milk Milk ule Aclivity Heat? Temperature Production ± 1I Very High And High And Low Then Ve. 1I VeryHigh And High And Normal Then Ves 3 1I VeryHigh And Normal And Low Then Ves 4 1I VeryHigh And Normal And Normal Then Ves 5 1I High And High And Low Then Ves 6 1I High And High And Normal Then Ve. 7 If High And Normal And Low Then Ves 8 1I High And Normal And Normal Then Perhaps 9 1I Normal And High And Low Then Perhaps 10 1I Normal And High And Normal Then No 11 1I Normal And Normal And Low Then No 12 1I Normal And Normal And Normal Then No

36 Objective Objective In the present work, the modeling and determination of algorithms for oestrus detection in dairy cows will be carried out with the help of the fuzzy logic method in a management system. A management system is developed and the analysis of the parameters available in practice, activity, milk yield and concentrate is carried out. A fuzzy logic model to detect oestrus in dairy cows is being developed. The aim is to improve the recognition rate and at the same time reduce the error rate. The work takes place on three levels: the development of the user interface of the management system, the analysis of the parameters and the development of the fuzzy-logical algorithms of the model for heat detection in dairy cows as well as the model review. The development of the user interface The user interface of the management system is developed under the Microsoft Windows operating system or with the visual programming language "Visual Basic for Windows". The object and event-oriented programming method is introduced in system development. The help system for the management system is developed with Microsoft's Help Magician Pro 3.0 software. Analysis of parameters In modern dairy farms, three parameters are available: the activity, the milk yield and the amount of concentrate leftover (uneaten amount of cold forage). The analysis of the parameters is carried out individually at the times of heat or on the normal days of lactation of all cows using a statistical method. The data for the evaluation of the analyzes were recorded by the CODATRON-DP system from WestfaHa Separator AG from the process computer on the state test farm Achselschwang and

37 24 Objective management of the analysis further processed in the management system. The aim of the analysis of parameters is to weight their importance for the detection of heat. The development of the fuzzy logic algorithms for heat detection The algorithms for heat detection in dairy cows in the detection model go into the fuzzy logic of the fuzzy mathematical theories. Using the fuzzy logic method, the luzzy logic algorithms or a fuzzy detection model for oestrus monitoring in dairy cows are developed. The fuzzy logic method for heat detection in dairy cows was used in a simple form by Eradus (1996). The parameters introduced were activity, milk yield and milk temperature. He developed two models. One was with 12 fuzzy rules and the other with 24 fuzzy rules. Both models had a low hit rate and a high error rate. A large amount of data from practical dairy farms is available for data analysis. The following data inputs are available: the activity, the milk yield and the remaining concentrated feed. The milk temperature is not available. Review of the fuzzy model for Bnll' to find out whether the detection model developed with the fuzzy-logical algorithms increases the detection rate of oestrus in dairy cows more than the method of using activity alone (WENOL) or of simplified fuzzy -iological inference (ERADUS).

38 Material and method Material and method 4.1 Data basis Data from a herd of 86 cows (Simmental cattle) with a total of 102 lactations from the state experimental farm Achselschwang were available over a period of two years. A so-called rescounter from Westfalia Separator (manufacturer: Nedap, Netherlands) is used for data acquisition. The parameters used are the individual animal activity, the daily milk yield and the amount of concentrate from the previous day that was not called up. For data analysis and modeling, the entire amount of data in the Westfalia Separator program was transferred from all cow data in a specific data structure with various data records to a pe. Then this entire amount of data was distributed to the respective cow again. Each cow had its own data file with the same data structure. The data was processed and retrieved by self-created programs. Table 6 shows the data structure in the data set. A data line consists of 12 data elements. Each data file for a cow consists of a maximum of 800 data lines, since the data was recorded twice a day and a maximum of 400 days per cow was recorded. Each file begins with the dates of the first day of calving. A log of information on all cows was available; it contains the cow number, the date of successful inseminations, the date of pregnancy, the date of calving and the number of lactations. This means that the analysis of the cow data can be carried out individually.

392 Fu: z: zy-Logic In the present work, fuzzy logic was chosen as a method for developing algorithms for heat detection. In practice it has been found that the activity of a cow is increased during heat, while at the same time her milk yield and concentrate consumption decrease somewhat. In classical mathematics, however, there are no precise rules for defining these quantities (e.g. high or low, high or low, high or low, large or small, etc.). Fuzzy logic in fuzzy mathematics is particularly suitable for solving such problems. The theory of fuzzy logic was developed in the mid-1960s by the American systems theorist and electronics professor Lotfi Zadeh at the University of Berkeley. Until the beginning of the eighties, fuzzy logic led a shadowy existence. Only with increasing capacity