You are on page 1of 76

J. Instrum. Soc.

India 34 (4) 284-291

COLOUR ANALYSIS OF FRUITS USING MACHINE VISION SYSTEM FOR AUTOMATIC SORTING AND GRADING
P. Sudhakara Rao, A. Gopal, R. Revathy and K. Meenakshi
CEERI Chennai, CSIR Madras Complex, Taramani, Chennai - 600 113 ABSTRACT
Food and other biological products are valued by their appearance. Appearance is a major factor in the judgment of quality and human eye has historically done this. The colour indicates parameters like ripeness, defects, etc. The quality decisions vary among the graders and often inconsistent. The adaptation of human eye to small changes in colour and the effect of the background on the perceived colour and colour intensity are the main sources of error. Hence, it is hard to provide precise guideline for visual inspection of fruits based on colour. In biological products, the light varies widely as a function of wavelength. These spectral variations provide a unique key to machine vision and image analysis. Machine vision technology offers the solution for all these problems. Of the many available colour models, HSI model provides a highly effective colour evaluation particularly for analyzing biological products. Using an RGB colour camera, it is also possible to obtain the colour information. However since the RGB colour model represents the image in three separate coordinates RED, GREEN and BLUE, it is not efficient for colour perception and image processing than compared to HSI model, where H alone gives the colour perception. Grading of large number of fruits create a problem related to large variations among the population of fruits. This problem is addressed by using the tools provided by the statistical methods. The authors developed an on-line apple grading system, partially sponsored by the ministry of food processing, government of India, based on some of the most important external parameters including the fruits surface colour. The details including the experimental results and techniques of implementation of colour grading are presented in this paper.

1. INTRODUCTION Colour provides valuable information in estimating the maturity and examining the freshness of fruits & vegetables. Colour is one of the most significant criteria related to fruit quality. It indicates the parameters like ripeness, defects, etc.[1-5] The appearance of the fruit, affects the consumer acceptance and the value addition. Specially picked quality graders have usually performed this visual inspection. The quality decisions vary among the graders and are inconsistent. The adaptation of human eye to small changes in colour and the effect of the

Colour analysis of fruits using machine vision system for automatic sorting and grading 285

background on the perceived colour, type of illumination, viewing angle are some of the main sources of error. Hence it is hard to provide precise guideline for visual inspection of fruits based on colour. Machine vision technology offers the solution for these problems. The colour of an object is determined by wavelength of light reflected from its surface. In biological materials the light varies widely as a function of wavelength. These spectral variations provide a unique key to machine vision and image analysis[6-7].

2. COLOUR MODEL Red, Green and Blue are the primary colour components. They are additive, when adding colored lights and subtractive when adding paint pigments. Although the process followed by human brain in perceiving colour is a psychological phenomenon that is not yet fully understood, the physical nature of colour can be expressed on a formal basis supported by experimental and theoretical results.
A colour model is adopted depending on specific application and the RGB model is most commonly used for colour monitors, colour video cameras etc. Similarly, CMY [cyan, magenta, yellow] model is used for colour printers and YIQ [Luminance, In phase, Quadrature] model is used for TV broadcast. The colour models often used for image processing are RGB, YIQ, and HSI [Hue, Saturation and Intensity]. It has been experimentally found that HSI model is most suitable for finding out the ripeness of fruits, vegetables, colour matching [7,8] samples, etc. Here, Hue is a colour attribute that describes a pure colour where as Saturation gives a measure of the degree to which a pure colour is diluted by a white light. The Intensity is decoupled from the colour information of the image and Hue & saturation components are intimately related to the way in which human beings perceive colour [8.9]. We adopted HSI model for sorting and grading of fruits by colour and developed a prototype for on-line sorting of Apples based on colour, size and shape. The basic image capturing system adopted by us is a colour CCD camera and a frame grabber card. They provide the image in RGB model. The RGB model, after normalisation, is first converted into HSI model using a set of converting equations. For its cost effectiveness and usefulness it is necessary to have this grader system to function on-line and check each and every fruit under inspection. Hence the equipment shall have a conveyer arrangement to transport the fruits in order to the imaging chamber. The number of fruits captured in a single frame (instant) depends on the system design and its hardware. The image sent by the camera will be used to analyze for all the parameters under consideration, more specific colour in the present case. The image will be analyzed by using advanced image processing algorithms to estimate the colour of image.

3. SYSTEM DEVELOPMENT FOR SORTING AND GRADING OF FRUITS BASED ON COLOUR VALUE - THE DESIGN PRINCIPLE The setup as shown in Fig. 1 has a singulator that delivers one fruit after other synchronously to the conveyor fruit stations. The conveyer assembly mechanism automatically orient apple to its stem and calyx, while moving the fruit to the illumination cell. The colour CCD camera is connected to a personal computer through a frame grabber card, which converts the image data in analogue form into digital form. The camera with its lens system

286

P. Sudhakara Rao, A. Gopal, R. Revathy and K. Meenakshi

Fig. 1. Line diagram of a Machine vision system for sorting and grading of fruits has the field of view to cover 3 fruits on the conveyer. Hence three fruits are captured in every single capture along with the machine background. The specially developed C++ system software package collects the scene for further processing and analysis. We have experimentally found for all varieties that the Apple skin has negligible Blue colour component in the RGB colour space. Hence all the parts of the prototype that are part of the cameras field of view are coloured with blue. This helped easy elimination of background to segment the apples images from the captured scene. The fruit continues to rotate around its stem and calyx axis while passing through the field of view. Multiple image frames of a fruit are captured synchronously to the fruits movement using proximity switches, while it is passing through the field of view. Each capture is done by the frame grabber card on an occurrence of a trigger pulse on one of its digital input lines. Each scene has a new posture of each apple image in the scene. The design parameters like field of view, conveyor speed and apple rotation speed are such that fruit image represent a view of the fruits surface in one of the six rotated positions, called postures, representing rotation in multiples of 60. This scheme of image collection helps in analyzing the fruits entire surface of the fruit. Using image-processing techniques as outlined in this paper, this digital image after segmentation is analyzed to determine the fruits color. The basic image processing system consists of a Silicon Graphics works station, Frame grabber card (DT- 3154), colour CCD camera and an Illumination system. PULNIX- 9700 progressive scan camera with resolution of 768 x 494 pixels is used in the setup. A uniform diffused illumination system designed by us for the purpose, is used to capture clear images of the fruits. The captured scene from the experimental setup has three images of apples including the image of conveyor assembly in background. The scene data in RGB colour space is first converted into HSI colour space. By means of selective Hue thresholding three apples together

Colour analysis of fruits using machine vision system for automatic sorting and grading 287

in the image are first segmented. Further each apple image in the scene is separated from the rest and grouped along with the respective apple image of different posture. Thus when the apple is passed out of the field of view, we obtain six images of the apple but of different postures, which form the inputs for the colour analysis.

4. IMAGE ANALYSIS USING RGB MODEL The histogram of a digital image with Gray levels in the range [0, i-1] is a discrete function,
(rk) = nk / n, Where rk is the kth Gray level nk is the number of pixels in the image with that Gray level n is the total number of pixels in the image and k = O, 1, 2,...,i-1

(rk) gives an estimate of the probability of occurrence of Gray level nk. A plot of this function for all values of k provides a global description of the appearance of an image. Although the properties are global descriptions that say nothing specific about image content, the shape of the histogram of an image gives us useful information about the possibility for contrast enhancement. For classification purposes we compare the test histogram with the reference histogram and select the best match as the one whose histogram is most similar to that of the test item. For multi spectral imagery, the histogram of each component image can be displayed. The graphical representation of an image histogram is a plot of the percentage of image pixels at each digital intensity value. The input data for the histogram consists of a table of numbers containing the number of pixels at each intensity level. The first step in generating a graphical display of the histogram is to convert the distribution into a percentage distribution by dividing the table entries by the number of pixels within the image. The second step involves allocation of the number of pixels to be used in the annotation area for presentation of the histogram.

5. COLOUR ANALYSIS OF FRUITS BASED ON HISTOGRAM In case of colour image, in the RGB colour space, every individual colour component, namely Red, Green and Blue has its histogram. Then, the percentage composition of every individual colour component, which an fruit possesses are to be evaluated. Using this percentage composition the level for a component can be set as a standard in classifying the apples based on a particular colour orientation. For an Apple the higher percentage composition of the red component was assigned the superior grade, the next lower composition the second grade & like wise the descending grades were assigned. This enabled the sorting of apples based on the colour as a parameter. 6. STATISTICAL DATA BASED ON HISTOGRAM ANALYSIS The following are some of the statistical data that can be through histogram analysis:
Percentage of colour components Percentage of Red = [r/(r + g + b )]* 100 where r = and

(gray level * Number of pixels) for Red g = (gray level * Number of pixels) for Green b = (gray level * Number of pixels) for Blue

288

P. Sudhakara Rao, A. Gopal, R. Revathy and K. Meenakshi

variance = where

(y(x - x)2 / n) - [(y(x - x) / n)]2

x = gray level ranging from 0 - 255 y = Number of pixels of corresponding gray level x x = mean of x n = Total number of pixels

standard deviation = variance Mean of colour components mean of red = r / Number of pixels mean of green = g / Number of pixels mean of blue =b / Number of pixels co - variance = (standard deviation / mean) x 100 Correlation factor

[ (xy) - (x y / n)] / [x2 - (x)2 / n] [y2 - y)2 / n ]


where x = gray level ranging from 0 - 255 for image 1 y = gray level ranging from 0 - 255 for image 2

7. EXPERIMENTATION RESULTS Apples fruits were obtained from the local market. The fruits using human expertise are classified into four different classes called GRADE-A, GRADE-B, GRADE-C and GRADE-D based on their Red colour component. Apples belongs to group A have more red percentage values while group D will have least red percentage values, each group having 10 Apples. The apple fruits are imaged using the experimental set up. The images are analysed and statistical data obtained and tabulated in Table - 1.
TABLE 1: Experimental results for the 4 GRADES of Apples Grades GRADE A Colour RED GREEN BLUE RED GREEN BLUE RED GREEN BLUE RED GREEN BLUE Percentage Component 47.038 27.188 25.773 45.059 28.298 27.642 42.848 28.699 28.451 35.422 32.557 35.022 Mean 133.63 77.24 73.22 133.33 85.63 83.65 190.2 127.39 126.29 140.91 136.87 134.62 Standard Deviation 65.95 51.77 45.96 66.15 58.60 54.48 59.55 80.13 74.70 67.50 82.07 75.27 Co-variance 49.35 67.03 62.78 49.61 68.43 65.13 31.31 62.90 59.15 45.32 59.96 55.91 Correlation Factor * 0.701 0.644 0.616 0.124 0.116 0.142 1. 000 1.000 1.000 0.296 0.381 0.158

GRADE B

GRADE C

GRADE D

[* In this table the correlation factor is computed when Grade C apple is taken as test apple]

Colour analysis of fruits using machine vision system for automatic sorting and grading 289

The above properties of the pixel intensities are calculated using histograms. The mean is the measure of average brightness and the variance is a measure of contrast. The intensity mean and variance (or standard deviations) properties are used because of their relevance to the appearance of an image. Correlation factor between two images gives the measure of how well one image matches with the other. The above statistical analysis is useful only when we use RGB.

8. DISADVANTAGES OF HISTOGRAM SPECIFICATION USING RGB The pixel value in colour image is vector [RGB values], which implies the colour equalization is three-dimensional (3D) process. If Histogram equalization is applied to each of these colors independently, changes in the relative percentage of red, green and blue for each colour vector may occur. Consequently, colour equalization must process all three components at once, which makes for the process of histogram analysis very complex.
The overall important aspect of colour image processing is that the algorithms developed should be able to produce the least amount of detectable colour distortion; the processed quantities should be mapped as closely as possible to those that are perceptually important. This can be accomplished using HSI colour space.

9. IMAGE ANALYSIS USING HSI RGB data is first converted into HSI data. With image representation in the HSI domain, the colour analysis was based on primarily the Hue value. Hue is a colour attribute that describes a pure colour, whereas saturation gives a measure of the degree to which a pure colour is diluted by white light and finally intensity gives the effectiveness of the colour. The three dimensional RGB space is reduced to a one-dimensional H Space for colour analysis. For a digitized colour image, the Hue histogram represented the colour components and the amount of that Hue in the image. Therefore, colour evaluation of fruits was achieved by analyzing Hue histograms [6,7.8,11] . The advantage of using HSI model over RGB is as under:
V

The intensity component is decoupled from colour information V Hue and Saturation components are intimately related to the way in which human being perceive colour. V Hue value is invariant to changes in light intensity. These features make the HSI model an ideal tool for developing digital image processing algorithms based on colour sensing properties of human visual system

10. METHODS OF ANALYSIS The Hue, Saturation and Intensity (HSI) domain was chosen to quantify Apple colour by machine inspection [9], since this representation is closest to that of human perception and use of the Hue domain allowed easy segmentation of the apple from the background. However, colour image information is sensed using combination of RGB. Various colour features can be calculated from the RGB components by using linear or non-linear transformation. Hue and Saturation are calculated from RGB[10,12] values by
H = (90O + tan-l [(2R - G - B)/[3(G - B)]]+(180O if G < B ) x (255/360)

290

P. Sudhakara Rao, A. Gopal, R. Revathy and K. Meenakshi

S=

{1- [min(R,G,B) / I]} x (255/360)

A typical HUE histogram of different apple images is shown in Fig.(2).

Fig. 2. Typical HUE histogram of Apple

11. CLASSIFICATION BASED ON HUE HISTOGRAM DISTRIBUTION The probability density of the Hue pertains to surface colour is maximum at the median density pixel value. Hence the median density Hue value represents the overall distribution of surface colour of the apples. This method requires extensive training. The Meadin density of Hue histogram for a given class is taken as the basis for segregating the fruits belonging to that grade. Hence during the training process 20 Apple samples belonging to a GRADE are taken and meadian density of the combined histogram is calculated, thus obtaining a distinct median density value for each of the GRADE to build the reference table. 12. RESULT AND DISCUSSIONS We have performed experiments using the developed experimental setup for sorting and grading of fruits like apples based on colour as the parameter. We have obtained sample apple fruits of different colours pertains to different grades with the help of Mis Himachal Pradesh Horticultural Producers and Marketing Corporation, Shimla, India. Six different postures of the test apple are imaged and digitized by the computer system for colour analysis. We have used HSI scheme for the colour classification of the Apples. Median density of Hue of the Apple is used as the criteria for grading. We have assigned different grades depending on the variation of red colour of the apples. In the Hue colour chart the red variation occurs between 0 and 20 wherein 0 represent the 100% Red and as we go away from 0 the percentage of red

Colour analysis of fruits using machine vision system for automatic sorting and grading

291

colour occurrence is decreasing. Above the Hue value of 20 the distribution of red colour is very less. Following reference Table 2 is used for the Apples classification.
Table 2- Grading criteria for colour classification of apples.

GRADE A B C D E

Classification criteria based on Hue value. 0-1 2-5 6-10 11-15 16-20

The system is trained 100 Apples, 5 sets of Apples each having 20 Apples presenting the particular grade. It was found that changes in light intensity level during inspection affected the results of classification. Although in theory Hue should be independent of intensity of an image, Le lighting level, experiments showed that the Hue histogram of an apple shifted towards the green direction if the intensity is increased by changing the lens aperture or lighting level, and shifted towards red (left) if intensity decreased. Hence the intensity level is maintained reasonable constant by maintaining the voltage level for the lamps. By representing median density of Hue as a grading criterion, the image processing system achieved around 98 % accuracy in colour inspection of apples.

13. CONCLUSIONS Many commercial factors like pricing, identification of fruit by variety, grading etc., are decided by many parameters like size, shape, colour, surface defects, etc. The adaptation of human eye to small changes in colour and the effect of the background on the perceived colour and colour intensity are the main sources of error. Hence, it is hard to provide precise guideline for visual inspection of fruits based on colour. In biological products, the light varies widely as a function of visible wavelength region. Machine vision technology is applied to extract information about all these parameters using appropriate optics and imaging systems. Most of the image processing applications for parameter extraction deals with huge amount of data, hence, the algorithms developed are efficient and be optimized for speed to keep the system throughput as per the market demands. Colour representation in HSI provides an efficient scheme for colour discrimination. By representing median density of Hue as a grading criterion, the image processing system achieved around 98 % accuracy in colour inspection of Apples. The image processing system incorporated in the prototype system also include other quality parameter extraction such as shape and size. We are presently working on extending the system for incorporating external defect as one of the quality parameter in the overall classification of the fruits. The machine vision system and methods developed are also applicable for general use in colour processing and therefore could be used to inspect other kinds of fruits and vegetables.

292

P. Sudhakara Rao, A. Gopal, R. Revathy and K. Meenakshi

REFERENCES
1. On encoding of arbitary geometric configurations - Freeman.H, IEEE Trans. Elect. Computers EL-10, 260-268,1961. 2. Visual Pattern recognition by moment invariants, HU.MK, IRE, Trans. Info. Theory IT-8, 179-187, 1962. 3. Automated Machine vision inspection of potatoes - Tao, Morrow, Heineman P.H. ASAE, No. 90-3531, 1990. 4. An instrument system for cereal grain classification using digital image analysis -Sapirstein, H.D, Neuman, M, Wright E.H. - J Cereal Sci, 6, 3-4,1987. 5. Corn quality evaluation with computer vision - Ding et, al. ASAE No. 90-3532, 1990. 6. Computer vision sorting by potatoes - Ph.D. Diss by Mc clure J.E., Pennsylvania S t a t e . Univ. 1988. 7. Machine vision for colour inspection of potatoes and apple -Tao Y. et. AI ASAE 38; 15551561, (1995a). 8. Grading of mushrooms using a machine vision system - Heinemann et. al - ASAE Vol. 37(5); 1671-1677, 1994. 9. Machine vision inspection of golden delicious apples - Heinemann et al. ASAE Vol. 11(6) 901-906, 1995. 10. Digital image processing - Gonzalez. R.C and Wintz - 1988. 11. Apple shape inspection with computer vision - Lee man et al. - Proc. Of IntI. Conf. On Sensors for non destructive testing - Measuring the quality of fresh fruits and vegetables -1997. 12. Gonzalez R. C. and Richard E. Woods, (1993), Digital image Processing, Addison - Wesley Longman Inc.

J. Instrum. Soc. India 34 (4) 293-298

ON-LINE PROCESS CONTROL UNIT FOR JAGGERY MANUFACTURING INDUSTRY


S.T. Pawar and M.B. Dongare
Department of physics, Shivaji University, Kolhapur - 416004 ABSTRACT
Agriculture and agro-based industries fonn the backbone of Indian economy but they are still adopting traditional methods. Jaggery industry is an imponam agroprocessing industry in rural India. The major constraint in this industry is lack of standardisation in processing. In traditional method of jaggery manufacturing a so-called skilled person known as Gulvaya plays a deciding role in clarification of sugarcane juice and in confirming formation of Kakavi (liquid jaggery) and jaggery. The presently developed microcontroller based on-line process control unit is field usable and can give audio indication of important parameters (pH and temperature) and display the parameters in decimal form on the LED numeric display. It has resulted in giving us a precise results, in order to produce a superior quality jaggery.

1. INTRODUCTION India is the largest producer of sugarcane in the world occupying about 4.0 million-hectare of land. The area in which sugarcane is grown in Maharashtra is 601 thousand hectares and is ] 1.1 % of the tota! area in which sugarcanes grow in India. The yield is 82394 kg/ha1. In India total sugarcane production is of 227.061ak tonnes. Out of total sugarcane production 43.5% is used for jaggery and khandari2. About 10.3 million tonnes of jaggery is produced annually in India 7. The major constraint in jaggery industry is lack of standardisation in processing. In addition an unhygienic surrounding during manufacturing, packaging and storage are major problems. 2. EXPERIMENTAL DETAILS The field experiment was conducted from Nov 2000 to March 2001. From our study and field survey of 25 jaggery-manufacturing units in western part of Maharashtra, it has been noted that, temperature and pH plays an important role in manufacturing process of jaggery. Whatever may be the initial Brix of the cane juice the two important striking points are appearing at a fixed temperatures only. viz. Liquid jaggery (Kakavi) at 105C and final striking stage (Golli S1age) at 118C. Also it has been noted that initial pH of juice varies from 5.1 to 5.7. For clarification it is raised by the use of lime water to 5.9-7.00. The neutrilisation is achieved by use of chemical clarificants. The observed range of pH after

294

S.T. Pawar and M.B. Dongare

neutrilisation is 4.8 to 5.4. These are the variations due to manual and approximate use of clarificants. These leads to variation in quality of jaggery. It is also found that for extra-special (Exia) and grade no. 1 jaggery the corresponding increased and decreased pH values are to be 6.3 and 5.3 respectively. Thus quality of jaggery is influenced by physical parameters like pH and temperature3. Hence there is a need of on-line field usable process control unit to be developed to meet the requirement offarmers to get superior quality jaggery. Some of the novel features of the developed system are set point facility to meet region-wise variation in parameters and chumer control.

3. ON-LINE PROCESS CONTROL UNIT FOR JAGGERY MANUFACTURING INDUSTRY The developed microcomroller based on-line process control unit is designed specially to meet the needs of fa;-mers. The system incorporates pH electrode and temperature sensor to display and give the audio indication of important stages in jaggery manufacturing process. The system is user triendly and does non-destructive measurement. 3.1 Hardware of the System The developed system consists of (H2CI2) Calomel electrode, an instrumentation amplifier (LM 321), temperature transducer (pt 100), constant current source formed by LM 324 and BC 557, ADC 0809 Board and microcontroller 89C51. The system can measure pH value with an accuracy of 0.1 of the reading. The system is energized by a highly regulated power supply. The block diagram of the system is shown in Figure. 1.

Fig.I. Block diagram of microcontroller based on-line process control unit.

On-line process control unit for jaggery manufacturing industry

295

3.2 pH Electrode To obtain an accurate measurement of the emf developed at the electrode, the electronic measuring circuit must have a high input impedance The developed emf is suitably amplified by the instrumentation amplifier before applying it to the ADC. When the combined electrode is immersed in a solution, a potential is developed. This potential is actually very small of the order of few millivolts. 3.3 PT -100 RTD Sensor As compared to Nickel and Copper, platinum has been found to be relatively linear within the specified range. The platinum further has additional merits, which make it suitable for the present application. These merits are - I) high precision and accuracy 2) Ease of calibration 3) high responsibility 4) fast response 5) Interchangeability with other resistance without any compensation 6) Good performance in desired temperature range and 7) limited susceptibility to contamination etc.5.Pt-100 is two terminal passive sensors. It has wide mt:asuring range 100C to 600C. 3.4 Instrumentation Amplifier (LM 321) Op-amp LM321 and opamp-LM324 ICs are connected in the non-inverting mode and are used to amplify the millivolt signal generated by the pH electrode. 3.5 AID converter Interfacing ADC 0809 is a monolithic CMOS device with 8-bit ADC. It uses successive approximation as the conversion technique. ADC 0809 is a 8 - channel ADC for unipolar analog signals6. 3.6 Microcontroller Microcontroller 89C51 is used to process the input data with setpoint values of temperature and pH. The 89C51 have the following features
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. Eight bit CPU with accumulater A and B registers. 16 bit program counter and data pointer. 8 bit stack pointer. Internal E2pROM of 4 K. Internal RAM of128 bytes. 32 I/O pins arranged as four 8-bit ports. Two 16 bit timer/counter. Full duplex serial data transmitter / receiver. Control registers TCON, TMOD, SCON, PCON, IF and IE. 2 External and 3 Internal interrupt sources Oscillator and clock circuits.

According to the selected data, the appropriate control signals are generated and are applied to the buzzer and motor drive unit 4.

296

S.T. Pawar and M.B. Dongare

3.7. 7447 display drives / decoder and key board 7447 is display driver for common anode type seven segment displays. Keyboard is used to set the initial and final set points related to desired pH and temperature values. 4. SOFTWARE OF THE SYSTEM In microcontroller based system, software design is a more demanding task than hardware design. The software is written in assembly language of microcontroHer 89C51 to perform the following 1. Analog to digital conversion program 2. Display program for pH and Temperature 3. Data byte of pH and Temperature 4. Delay program 5. CALIBRATION AND WORKING Using standard laboratory pH meter and thermometer carries out the calibration of the unit. The pH electrode and temperature sensors are placed in the sugarcane juice-boiling pan. The power is supplied to the system by means of the stabilized IC regulated dc power supplies.
The analog outputs ITom the transducers, after suitable signal conditioning, amplification and conversion are applied to the channels of the ADC 0809. Here channel 0 is used. ADC 0809 converts analog inputs into digital outputs in hex ITom by executing the main program. The digital values are processed by microcontroller 89C51 and pH and temperature values for cane juice under process are displayed. The unit gives audio indication in accordance with preset values of pH and temperature. It also controls the churner action in jaggery manufacturing process.

6. TESTING OF PROCESS CONTROL SYSTEM The performance of the unit has been successfully tested at 10 jaggery-manufacturing units in Kolhapur region. During test we have carried out the jaggery preparation by making use of process control device. Irrespective of soil type and sugarcane genotype we have recorded the recovery and grade of the jaggery.
System Setting - I) pH was set at 6.3 for lime defection and at 5.3 for neutralization. II) Temperature was set at 10SC. for liquid jaggery(Kakavi)stage and at 118C. for jaggery (Golli) stage. Table-l gives the result of 10 jaggery-manufacturing units in Kolhpur region.

7. CONCLUSIONS The observed results reveal that the microcontroller based on-line process control unit for jaggery industry is sufficiently accurate in monitoring physical parameters of sugarcane juice. The unit gives better result as compared to manua1 judgement by a person known as Gulvaya in jaggery manufacturing process. This unit is highly beneficial to the farmers in deciding the two important striking stages and it helps in optimum clarification so that a good quality jaggery can be produced. From Table-l we found that the jaggery recovery ranges from 10-12 and grade of product is maintained between extra-special (exta) and grade-I.

On-line process control unit for jaggery manufacturing industry

297

Table-1: Results of 10 jaggery-manufacturing units in Kolhapur region. Jaggery Unit No 1 2 3 4 5 6 7 8 9 10


l

Jaggery Recovery 10 11 12 11 10 12 11 10 11 11

Jaggery Grade* Exta 1 Exta 1 Exta 1 1 Exta 1 Exta

Grade of jaggery is recorded as per present jaggery grading method adopted in jaggery market. Any market does not follow scientific grading method. In market grading is done by physical appearance of jaggery i. e. by checking test, color and hardness by knife (Granular size) The grade numbers given by jaggery market are, 1. Extra special grade (exta) 2. Grade no-l 3. Grade no-2 4. Grade no-3 5. Grade no-4 6. Grade no-5 The jaggery of the grade i.e. Exta and grade no-l fetches maximum price in market.

ACKNOWLEDGEMENT One of authors (STP) is thankful to University Grants Commission, New Delhi for award of teacher fellowship under FIP. REFERENCES
1. Damahe, B.A. 14(2000). Application of L T. in area of Agri. And Agrobased industry. Proc. Seminar on INFOTECH. 2. Patil, J.P. et. al. 1-3 (1996). Research bulletin on liquid jaggary MPKY. RES. PUB. NO. 17. 3. Pawar, ST. et.al., 369 -374 (2001) Scientific studies on Jaggery Manufacturing process. Co-operative Sugar Vol-32, No.5. 4. Kenneth J. Ayala.54-60 (1996). The 8051 microcontroller Architecture, ogramming and application. Second edition. Penram International publishing (India) . 5. Raman K. Attri .et.al., 275-283(2000) Design Approach to use Pt RTD sensor. 1. Instrum. Soc. India 30(4). 6. B.Ram. (1995). Fundamentals of microprocessor and microcomputers. 4 th edition. Dhanapat Rai Pub. Nai Sarak, Delhi. 7. Dorge, S.K. I-II (1994). Proc. of National consultation meeting feb 27-28 : RS and JRS, Kolhapur.

J. Instrum. Soc. India 34 (4) 298-308

FABRICATION OF A PULSE-SHAPE DISCRIMINATION MODULE FOR NEUTRON-GAMMA SEPARATION


Rakesh Kumar, Golda K.S, S. Venkatramanan, R.P. Singh, S.K. Datta and R.K. Bhowmik
Nuclear Science Centre, P.O. Box - 10502, New Delhi - 110067 INDIA. ABSTRACT
A low cost high performance pulse shape discriminator (PSD) module for neutron gamma discrimination has been developed for an array of eight neutron detectors. In this, zero cross technique (ZCT) has been exploited to achieve an optimum n- identification. To reduce cable connection in the system, as well as the capacitance and delay effects, the constant fraction discriminator (CFD) and PSD stages are compactly mounted in a standard single-width NIM module. To make the system still more compact two channels are accommodated in a single NIM Module. The module accepts signal ranging from 200m V to-2V. The module is designed to handle fast rise time pulses of the order of ~5ns. The module provides two NIM outputs, an n- logic signal and a crossover timing output for n- discrimination in an external TAC.

1. INTRODUCTION
A detector array consisting of eight neutron detectors (BC50lA organic liquid scintillatorsl) is being built to study certain aspects of nuclear reactions e.g. the entrance channel effects, pre-equilibrium reaction component, level density parameters etc. and also for determination of nuclear structure through neutron tagging. The liquid scintillators deployed for neutron detection are also sensitive to gamma radiation. As the typical gamma output in a reaction is considerably higher than that of neutrons, it becomes necessary to distinguish between the two. Pulse shape discriminators (PSD) have been successfully used with neutron detectors to discriminate neutron and gamma2-6. There are two methods to do neutron-gamma (n-) discrimination; charge comparison method2,3 and zero cross technique4-6. Here, the ZCT is used for n- discrimination. The single width NIM module contains CFD and PSD; this makes the system compact. Results are presented for discriminating n-yrays with liquid scintillator BC50lA, which shows good separation.

Fabrication of a Pulse-Shape Discrimination Module for Neutron-Gamma Separation

299

2. PRINCIPLE OF OPERATION In the zero cross-over method, the a node signal from the fast photomultiplier tube (PMT) coupled to the scintillator is differentiated through a differentiating amplifier. When pulses with different rise times undergo differentiation, one gets bipolar pulses with different zero cross over timings. Due to the difference in the interaction mechanism in the scintillator material, neutrons and gammas give pulses with different rise times and hence can be distinguished and separated by using zero cross over method. 3. CIRCUIT DETAILS The first prototype of the PSD is an integrated unit with CFD and P SD stages all compactly mounted in a single width NIM module, as shown in the block diagram in Fig. 1. Therefore, in future we will be able to incorporate two (CFD-PSD) units in the same module.

Fig. 1. Block diagram of the CFD and PSD stages. This unit, which utilizes basic ECL (Emitter-coupled logic) circuits, consists of a CFD and a PSD. A -2V supply for terminating ECL signals is locally generated with transistorized circuit from the -6V supply line. The input signal from the photomultiplier anode, which is fed through a LEMO connector on the back panel, is split into two - one going to the CFD stage and the other to the PSD stage. The front panel LEMO connections give outputs of CFD, Zero Cross, Strobe, PSD and also neutron gated PSD output. Provisions for monitoring threshold settings are also there on the front panel.

Constant Fraction Discriminator The CFD part uses standard constant fraction time technique by adding a delayed inverted pulse to an attenuated input pulse. A dual ultra fast comparator (AD96687) is used as the

300

Rakesh Kumar, Golda K.S, S. Venkatramanan, R.P. Singh, S.K. Datta and R.K. Bhowmik

discriminator, out of which one is used as Low Level Threshold (LL TH) adjuster and second as a CFD. The LLTH voltage is generated from LM336 (-2.5V regulator) and a resistive network. The range of threshold can be varied from -2mV to -200mV. The constant fraction is chosen as 0.2 and implemented by a resistive network. The input signal is delayed by using aim LEMO (RG-174) cable that gives a fixed delay of 5 ns. The attenuated and delayed signal is then fed into a zero crossing detection circuit, which leads to constant fraction logic. Walk adjustment is provided through a front panel potentiometer along with a walk monitor point. The ECL AND gate (MC10105) is used to produce an AND signal of LLTH discriminator and the CFD. After that an ECL monoshot (MClO198) is used to produce an ECL pulse corresponding to the resultant of the AND pulse. The output is taken through a LEMO connector on the front panel. Another CFD output is taken to generate the strobe in the PSD stage.

Pulse Shape Discriminator Stage PMTs split signal is integrated and differentiated in a fast shaping amplifier AD829 so that the zero cross time of the output pulse depends on the fall time of the input signal. The RC time constants are experimentally adjusted for best shape discrimination and resolution and its value is fixed around l00ns each. To detect baseline zero cross over of the shaped pulse, an ultra fast comparator (AD96687) is used. This comparator gives a zero-cross pulse. A strobe of adjustable width and delay is generated with the CFD output using 2 monoshots (MC10198). One of the outputs from AD96687 is gated with strobe in such a way that OR gate output is a zero cross out put of both neutron and gamma and this can be used in an external Time-to-Amplitude Converter (TAC) to discriminate neutron and gamma. This NIM output is available through a front panel LEMO connection. The other output is gated with delayed and width adjusted strobe so that the gamma is eliminated and this logic gate output is further fed into an ECL monoshot for giving an ECL logic pulse. This pulse then goes through an ECL to NIM converter, and a front panel LEMO connection gives this NIM output. 4. TESTING AND CALIBRATION The performance of the unit has been tested with a252Cf source using a 5" X 5" BC 501 organic liquid scintillator. For the electronic set up (see Fig. 2), the anode signal from the PMT is given to the PSD module. The CFD output from the module is used as start in the TAC and the zero cross output is used as stop after giving necessary delay. The TAC output is given to a 2k ADC (ORTEC-AD811). Dynode signal from PMT is amplified through EG&G 571 spectroscopy amplifier and is given to another channel of the ADC. ADC data is collected in a computer through CAMAC based data acquisition system. The efficiency of the module is measured in terms of its figure of merit (FOM), which is defined as the ratio of the peak separation to the sum of Full Width at Half Maximum (FWHM) of two peaks. From the TAC spectrum, given in Fig. 3, the FOM of the PSD is estimated. The FOM of our module is 2, which is comparable to that of the commercial PSD module CANBERRRA 2061A. The 2-D spectrum of TAC vs. energy is plotted in Fig. 4, and shows clear separation between neutron and gamma.

Fabrication of a Pulse-Shape Discrimination Module for Neutron-Gamma Separation

301

Fig. 2. Block diagram of a basic PSD electronic set up.

Fig. 3. Neutron-gamma time of flight (TAC) spectrum.

302

Rakesh Kumar, Golda K.S, S. Venkatramanan, R.P. Singh, S.K. Datta and R.K. Bhowmik

Fig. 4. 2-Dimension spectrum (Pulse height vs. TAC)

5. CONCLUSION The performance of the modules designed by us show good n-y separation and their FOM is comparable to those of commercially available modules. These low-cost, compact NIM modules demonstrate good n-y discrimination using neutron-detectors. Four PSD modules (each containing dual units) will be completed shortly. ACKNOWLEDGEMENT This investigation was sponsored through a Department of Science and Technology (DST) project. REFERENCES
1. Bicron Corporation, USA, BC501A data sheet. 2. M. Moszynski et al., Study of n- discrimination by digital charge comparison method for a large volume liquid detector, Nucl. Instr. Meth. Phys. Res. A, 317, 262-272 (1992). 3. M. Moszynski et al., Study of n- discrimination with NE213 and BC501A liquid scintillators of different size, Nucl. Instr. Meth. Phys. Res. A, 350, 226-234 (1994). 4. Gy Mathe et al., Pulse shape discrimination method for particle identification, Nucl. Instr. Meth., 27, 10-12 (1964). 5. L.J. Heistek et al., Pulse shape d iscriinination with a comparator circuit, Nucl. Instr. Meth., 80, 213-216 (1970). 6. J. Bialkowski et al., A pulse-shape discriminator with high precision of neutron and gamma ray selection at high counting rate, Nucl. Instr. Meth. Phys. Res. A, 275, 322-328 (1994).

J. Instrum. Soc. India 34 (4) 227-239

CLASSIFICATION OF FRUITS BASED ON SHAPE USING IMAGE-PROCESSING TECHNIQUES


P. Sudhakara Rao, A. Gopal, S. Md. Iqbal, R. Revathy and K. Meenakshi
CEERI Chennai, CSIR Madras Complex, Taramani, Chennai - 600 113 ABSTRACT
The shape is one of the important visual quality parameters of fruits, vegetables, etc. Currently human sorters are employed to sort fruits based on shape. Shape is a feature, easily comprehended by human but difficult to quantify or define by computer. Most of the machine vision shape detection work has been done on industrial objects, which have more definite structure. Agricultural and biological products are unique in nature and the growing environment causing various boundary irregularities influences their shapes. Image processing offers solution for sorting of fruits based on their shape. Many researchers explored to establish relationship between object shape and its boundary values in Fourier spectrum. The authors developed an on-line apple grading system, partially sponsored by the Ministry of food processing, Government of India, based on some of the most important external parameters including the fruits shape. This paper presents some new approaches using correlation techniques, graphical analysis of radius and area signature, directional change of contour and boundary Fourier coefficients to extract the shape, particularly for fruits. The paper also discusses some of the experimental results.

1. INTRODUCTION Non-destructive quality evaluation of food products is an important and very vital factor in food/agricultural industry. Various parameters which define the quality of these products (eg., colour, shape, size, external defects, etc.,) are evaluated visually by human inspectors. Though rapid technological advances have taken place, the cost of image processing / machine vision techniques are still expensive and there is need for investigating less expensive processing techniques. This should provide automatic grading process, based on shape as one of the parameters, to remove inconsistencies and reduce the likelihood of apples / fruits rejection at consumer markets.
Shape is a feature, easily comprehended by humans but difficult to quantify or define by computer. Most of the machine vision shape detection work has been done on industrial objects, which has more definite structure. Agricultural and biological products are unique in nature that it is possible for a fruit, say apple to have a shape, which the vision system may

228

P. Sudhakara Rao, A. Gopal, S. Md. Iqbal, R. Revathy and K. Meenakshi

never have previously encountered. The growing environment, causing various boundary irregularities, influences their shapes. Damage during harvesting and handling adds more kinds of shapes. Thus for apples, there is an infinite number of shapes from well to badly shaped apples [2]. Trained Inspectors judge apple shape according to how well it conforms to the characteristic shape of the variety. Four-shape categories are generally used - well formed, fairly well formed, slightly deformed and seriously deformed. Various techniques for shape identification[1-8] and grading were adopted. These are generally summarized as a. Boundary encoding technique for finding shape number. b. Statistical analysis using moments, bending, energy, radius variation and fractures. c. Structure analysis from geometry. d. Spectrum analysis. Although many such general techniques were documented in computer vision literature, the natural variability and diversity of biological materials create difficulties and practical problems[4]. The shape requirements are somewhat abstract and difficult to comprehend since there are no standard shapes available for comparison. These classes need to be quantified for automatic grading, i.e., each shape classification should have a number or number range associated with it. In general two different kinds of methods[8]. Viz., Region based information and Boundary information are adopted for Shape extraction / analysis of fruits. The first method is based on geometric parameters while the second method involves computations of Fourier descriptors.

2. REGION-BASED INFORMATION Shape measurements are evaluated by calculating the coefficient of determination between the length (major principal axis of inertia) and width (minor principal axis) of the fruits calculated by the vision system and the polar and equatorial diameters measured manually. The relationship between the area obtained with the vision system and the product of the two manual measurements has also been investigated. The vision system measured the length of major and minor axis of the contour of random views of the fruits, and the manual data were taken from pre-oriented fruits (equatorial and polar diameters). For this reason, the parameter area has higher correlation with manual measurements.
Shape evaluation is performed in each view [5] by determining the perimeter of the fruit in each view, the area enclosed by the perimeter, the convex hull of the perimeter and the area enclosed by the convex hull. The computer uses the convex hull and the perimeter to determine if a piece of the fruit is matched or mismatched. For example, in the case of spherical fruit, the convex hull and the perimeter should be nearly the same. However, for a banana, the convex hull will enclose more area than the perimeter. Sorting of fruits based on shape may also be done by calculating Eccentricity (E), of the object fruit, which is defined as the maximum dimension divided by minimum dimension of the object [8]. Another parameter that can be used as size/shape sorter is Compactness.

Classification of fruits based on shape using Image-Processing Techniques

229

This is defined as the ratio, C = P2/4 A; where P is the perimeter and A is the area of the object. Alternatively, the inverse of compactness is called, Circularity. The Circularity is a dimensionless number with a minimum value of l for circles. The circularity is 1.27 for a square, shows a high value for elongated objects.

3. BOUNDARY INFORMATION The Fourier descriptors[6,7] use only the boundary of the object and consider it as cyclic waveforms, which provide a parameter description of the boundary of the trace. The Fourier descriptors of an image are calculated by taking the FFT for the sequence considering N sample points on the contour of the image obtained after thresholding. Here N is made to be numbers obtained as powers of 2[1,2,6,8] i.e. 2,4,8,16 etc. The Fourier descriptors convey useful information about the boundary shape. In general, an image, which possess uniform harmonic values and also containing minimum number of harmonics is highly regular in shape and its reconstruction can be obtained easily with lesser number of samples. The inverse Fourier transform helps in reconstruction of the object based on the contour value of the Fourier descriptors.
In general, global shape or the approximate shape of an object can be obtained back using minimum number of harmonics say up to 4[8], but higher harmonics contribute to finer details pertaining to sharp transitions.

4. SHAPE COMPUTATION METHOD The objective of this paper is to develop effective shape evaluation method that could be used in machine vision systems for the purpose of grading apples. The shape of any irregular object is unique in nature. The boundary information of an object determines the shape of an object. The accuracy of shape definition depends on the accuracy of the boundary information of an object. In a computer image, the boundary points are pixels. The boundary pixels can be studied, compared and analyzed in many ways. However after shape analysis, the boundary should be re-traceable and the error should be kept to its minimum.
A new method Improved Radius signature Analysis is presented in this paper for the shape analysis of fruits. In this method the centroid of the object is assumed to be invariant and appropriate aspect ratio applied.

5. EXPERIMENTAL SETUP The experimental setup has a conveyer assembly to automatically orient apple fruit to stem and calyx and then move the fruit to the illumination cell. It is experimentally found that the apple skin for all varieties has negligible blue component in the RGB colour space. Hence the conveyor assembly, fruit holder, belt for friction drive that rotates the fruit are coloured with dark blue. This will help easy elimination of background to extract the apple images from the captured scene. The system has a CCO camera to capture the scene that consists of fruit. Three fruits are captured in a single frame. The camera is connected to a Silicon Graphics Works station through the frame grabber card OT-3154 from Data Translation, Inc. The grabber card will convert the image data in analogue form into digital form, stored in the

230

P. Sudhakara Rao, A. Gopal, S. Md. Iqbal, R. Revathy and K. Meenakshi

memory and taken for applying suitable algorithm as outlined in this paper. The basic image processing system consists of Silicon Graphics Works station, frame grabber card, CCO camera and illumination system. PULNIX 9700 progressive scan colour digital camera with resolution of 768 x 494 pixels from PULNIX America, Inc. is used in the setup. A uniform diffused illumination system is used to capture clear images of the fruits. The captured scene from the experimental setup has three images of apples including the image of conveyor assembly in background. The scene data in RGB colour space is converted into HSI colour space. By means of selective hue component elimination, the background is totally removed and three apples image alone is retained in the scene. The retained image data is used for extracting information like colour, size, shape etc. The image is converted into binary form by thresholding and then the edge of each apple is detected by applying laplacian filter for obtaining the contour of the image for each of the fruit. Then the contour is analyzed using various techniques proposed in this paper for shape estimation. The shape information thus obtained will be the basic input parameter for comparison and to assign appropriate grade for each of the apples. Mathematical and the relevant analysis carried out in this paper assume that the images are in the first quadrant.

6. IMPROVED RADIUS SIGNATURE ANALYSIS Referring to the Fig.1 (a), the local radius corresponding to different points on the boundary profile of the image can be determined by first finding the centroid of the profile. If (xk, yk), k = 0,1,2,A, N be the N pixel points traced on the profile, then the centroid (xc, yc), of the profile can be determined using Greens Theorem based on area moment of inertia as below.

Fig.1.

Classification of fruits based on shape using Image-Processing Techniques

231

After finding the centroid, pixel points at equiangular intervals, say N, normalized boundary points are obtained. The local radii corresponding to these points can then be determined as

and these values of Rk for N boundary points are plotted as shown in Fig. 1 (b). Such a graph is made for a set of radii {Rx for x = 0,1,2....N} for a standard grade of an apple and used as reference. The on-line current sample can now be analyzed for its shape by measuring the boundary pixel points on it and finding out the new set of radii {Ry for Y = 0,1,2...N}, for the same number of equiangular intervals as taken in reference. The minimum radius may be taken as the starting data for both the reference and the sample for plotting purpose. The following three techniques are used for the analysis a) Correlation technique b) Graphical technique c) Fourier technique

7. CORRELATION TECHNIQUE The correlation co-efficient between the set of radii measured for same number of equiangular intervals, for the reference as well as the sample apple, is obtained using Karl Pearsons correlation co-efficient method, as given below

232

P. Sudhakara Rao, A. Gopal, S. Md. Iqbal, R. Revathy and K. Meenakshi

r(x,y)=Cov (x,y)/(xx x)
where CF x and CF yare the standard deviation of the reference and the sample respectively

Where Xav & Yav are mean of reference and sample data respectively, dx and dy are deviations from assumed means of reference and sample data respectively. The value of . r gives an indication as to, how close the shape of the sample apple is associated with that of reference apple. If r = 1, it means that there is a perfect relation between the set of data. If r is nearer to zero, the set of data are uncorrelated. The probable error (P.E.) for this set of data is obtained as P.E. = 0.6745 (1- r2) / (N ) (6)

Then the upper and the lower limits within which the coefficient of correlation in the population p can be fixed as p = r P.E. (7)

8. GRAPHICAL ANALYSIS For the set of points {(k, Rk ), k = 1,2,A N} = {x, y} a best fit polynomial curve of nth degree can be obtained as below
Y = aO +a1x+a2x2 +a3x3 + + anxn (8) The normal equations for determining the constants ajs (Where i = 0,1..n) are obtained by the principle of Least Squares by minimizing the residual or error sum of squares [E], summation being extended over the given set of observations. E = (y-ao - a1x-a2x2 - a3x3 -anxn)2 (9) The normal equations are given as
E / ai = 0, (i = 0,1,2 n)

(10)

=> xi(y - a0 - aO - a1x - a2x2 - a3x3 -anxn)= 0, (i = 0,1,2, ) (11)

Classification of fruits based on shape using Image-Processing Techniques

233

The constants aij are found out by solving equation (11). The curve fitting can also be done by orthogonal polygonal method, which is computationally intensive. For all practical purposes the co-efficient of xn for degrees more than three are negligible, and hence it is enough that the curve fitting is done for a third degree. Hence the equation (8) reduces to Y = aO + a1x + a2x2 +a3x2 As the profile is continuously changing and closed, dividing the profile into known number of segments and then fitting the curve for each segment can obtain a perfect fit. For an apple, the profile can be divided into four segments, as the change in the profile is more or less uniform in the four quadrants. Such a graph can be drawn f(x) for the standard apple. Similarly for the sample under analysis, the best-fit curve g(x) depicting its radius signature can be drawn as shown in Fig. 2. The sample can then be analyzed by computing the ratio, (L2/A) where L is the total length of the curve and A is the area below the curve. Analysis can also be done by computing radius of curvature at different points. The following equations may be used for finding out these parameters. The area below the curve under analysis is given as A = y dx

Fig. 2 Best fit curve

The length of the curve is given as The local maximum and local minimum for the curve under consideration exists at points where dy / dx = 0. The radius of curvature (C) for the curve is given as

234

P. Sudhakara Rao, A. Gopal, S. Md. Iqbal, R. Revathy and K. Meenakshi

C = (1/R) = (d2y / dx2) / [I+(dy/dx)2]3/2 The bending (concavity and the convexity) of the curve is determined by the values of d2y / dx2 = 0. The points of inflexion exist for the curve where d2 y / dx2 = 0 and d3y / dx3 = 0. For a regular object the number of maximum and minimum points and the points of inflexions are minimum.

9. FOURIER TRANSFORM Treating the boundary signature as a one-dimensional digital signal, it can be translated

to Fourier domain as Where, IF(u)I is the magnitude at harmonic frequency u in the Fourier domain as shown in Fig.3. Here, only the magnitude is taken into consideration.

Fig. 3. Fourier Domain These harmonics will then represent the shape information of the object. The boundary normalization and Fourier transformation will achieve significant information compression. The harmonic components in the Fourier domain represent the magnitude of boundary frequency changes in spatial domain R(k) of the radius boundary sequence. Specifically, F(O) will give the average radius after normalization, F(1) will give the bending of an object, F(2) will give the elongation of the object and so on.

10. RESULTS and DISCUSSIONS Experiments were performed using the experimental setup as described earlier. Apple fruits of different sizes and shapes were obtained from MIs Himachal Pradesh Horticultural Producers and Marketing Corporation (HPMC), Shimla, India, one of the major apple dealers of the

Classification of fruits based on shape using Image-Processing Techniques

235

country. Four different postures of the test apple are imaged and digitized by the computer system for shape analysis. Algorithms were developed to obtain consistent and accurate results for shape classification of apples. For effective shape information extraction, a method of harmonics multiplied by its magnitude F (h) * hm was established to provide an effective heuristic. It is determined as separator S. the higher the S, the more severity is the irregularity of the shape. S = F(h)*hm, m = 1,2,3

Of the many tests and experiments carried out by us with large number of apples, results of ten apples labeled as T1 ,T2 ... T1 0 are presented in Table-I. In this Table F1.. F10 represent the first ten harmonics values of the Fourier descriptors and S represent the shape separator values. Table-1 Harmonics data and shape separator values.
T1 F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 S 91.785 23497.0 266.00 296.00 521.00 211.00 125.00 173.00 170.00 66.00 56.00 0.4802 T2 T3 T4 82.0989 21017.0 280.00 532.00 212.00 219.00 145.00 88.00 95.00 36.00 40.00 0.3412 T5 91.5184 23429.0 58.00 494.00 297.00 265.00 145.00 157.00 62.00 25.00 25.00 0.3416 T6 91.7262 23482.0 320.00 205.00 477.00 245.00 170.00 54.00 65.00 32.00 23.00 0.3155 T7 T8 T9 93.1194 23839.0 397.00 935.00 524.00 183.00 58.00 64.00 102.00 29.00 49.00 0.3642 T10 89.7739 22982.0 328.00 810.00 354.00 399.00 37.00 186.00 101.00 77.00 22.00 0.4274

88.8639 90.9192 22749.0 23275.0 144.00 418.00 556.00 167.00 70.00 176.00 100.00 53.00 27.00 0.3795 137.00 626.00 360.00 327.00 133.00 154.00 114.00 45.00 36.00 0.4167

90.3222 96.1471 23122.0 24614.0 248.00 614.00 493.00 381.00 30.00 101.00 76.00 29.00 62.00 0.3824 179.00 262.00 311.00 403.00 108.00 111.00 103.00 33.00 75.00 0.4176

From the values above, it can be seen that test apples T4 and T5 have very close shape separator value, which can be confirmed from their gray level images as shown in Fig.4 and Fig.5 The two apples T 4 and T5 boundary signature is drawn after normalization and it is seemed to be overlapping as shown in Fig.6 It can also be shown that the first 10 harmonics of the Fourier descriptors are same and they can be as shown in Fig.7

236

P. Sudhakara Rao, A. Gopal, S. Md. Iqbal, R. Revathy and K. Meenakshi

Fig. 4 - Test Apple T4

Fig. 5 - Test Apple T5

Fig. 6. Boundary signatures of test apples T4 and T5

Fig. 7. Fourier descriptors of test apples T4 and T5

Classification of fruits based on shape using Image-Processing Techniques

237

The same fact that the apples belong to the same category of shapes can be confirmed with the correlation coefficient. The correlation between the above two images is found to be 0.7783, that is more than a positive 0.5 correlation, which proves that the shapes are almost similar. The facts can be proved taking another example of T8 and T10 test apples, which have got a separator of 0.4176 and 0.4274 respectively. The correlation coefficient between their radius signatures was also found to be 0.7564. For example if we take apples of dissimilar shapes say T4 and T8 as shown in Fig. 8, then the Fourier transforms obtained in the graph are given in Fig. 9.

Fig. 8. Test apples T4 and T8

Fig. 9. Fourier descriptors of test apples T4 and T8

238

P. Sudhakara Rao, A. Gopal, S. Md. Iqbal, R. Revathy and K. Meenakshi

Fig. 10. Shape separator variation The small variation in the Fourier descriptors in its first harmonic is enough to distinguish between the two apples, which have shapes like that of a circle and ellipse respectively. The correlation coefficient techniques supports the same fact by giving the correlation as 0.4102, less than a +0.5, hence confirming that the above two apples belong to different categories. In this manner the apples can be graded by setting the threshold values and ranges for the shape separators. (Fig.10). The Thresholding and range setting can be done as shown in the Table II in which, the values lying in the regions shown are categorized as one group. Then the groups formed are Table II Classification of apples using shape separator values Groups Group I Group II Group III Group IV Shape separator range 0.3 - 035 0.35 - 0.4 0.4 - 0.45 0.45 - 0.5 Apples belonging to the category T4, T5, T6 T2, T7, T9 T3, T8, T10 T1

11. CONCLUSION The new method proposed namely Improved Radius signature, have been discussed. This method can be effectively used for comparing many samples against a reference shape for the purpose of sorting and grading using correlation coefficient technique, Graphical analysis or Fourier transformation technique. These techniques are very useful for automatic grading

Classification of fruits based on shape using Image-Processing Techniques

239

of apples. In all these techniques, there is no limitation on the number of boundary points for comparing the correlation coefficients. The main criteria adopted, is to develop algorithms for less expensive implementation. In image processing analysis, algorithms for computing different parameters plays a vital role in achieving the desired results. Presently the throughput of the system is two fruits per sec and the execution time for the entire parameters colour, size and shape is taken care to meet the desired throughput. As the shape analysis is one of the many criteria to sort the fruits, considering all the parameters of interest, the algorithms processing time has large bearing on the system throughput before the object is sorted. One of the limiting factors being the processing time, sorting is being implemented on parallel lines with parallel hardware to meet the throughput demands.

REFERENCES
1. Machine vision for colour inspection of potatoes and apple -Tao Y. et. al ASAE 38; 15551561, (1995a). 2. A Fourier based separation techniques for Shape grading of potatoes using machine vision - Tao Y. et, al, ASAE 35:949-957, (1995b). 3. Grading of mushrooms using a machine vision system - Heinemann et. al - ASAE Vol. 37(5); 1671-1677, 1994. 4. Shape feature extraction and classification of food material using computer vision Gunasekaran. S and Ding.K- ASAE, Vol.37 (5): 1537-1545. 5. Machine vision inspection of golden delicious apples - Heinemann et al. ASAE Vol 11 (6)901906, 1995. 6. Boundary estimation in complex imagery using Fourier descriptors - Jiang T and Merickel = Proc. of Intl. Cont. on Pattern Recognition 1: 187-190, 1988. 7. Digital image processing - Gonzalez. R.C and Wintz -1988. 8. Apple shape inspection with computer vision - Lee man et al. - Proc. of Intl. Cont. on Sensors for non destructive testing - Measuring the quality of fresh fruits and vegetables - 1997.

J. Instrum. Soc. India 34 (4) 240-244

DIGITAL AND FAST PREDICTION OF MULTIPLE QUALITY PARAMETERS OF GND WATER


S.B. Kalyanaraman and G. Geetha
Physics Wing (DDE), Annamalai University, Annamalainagar - 608 002 ABSTRACT
Generally, among the various quality parameters of ground water, the Electrical Conductivity (EC) has significantly high correlation co-efficient ( > 0.75 to 0.99) with other parameters like Total Dissolved Solids (TDS), Total Hardness (TH), Chloride (Cl), Magnesium (Mg), Total Alkalinity (TA), Sulphate (SO4) Sodium (Na), Calcium (Ca),... etc. Just by measuring the EC only it is possible for simultaneous prediction of other parameters having very high correlation co-efficient values with EC.

1. INTRODUCTION Many parameters characterising the quality of ground water are correlated to each other. The linear regression equation of the type y = A + BX (where, A and B are regression coefficients, X is the independent variable and Y is the dependent variable) is used and the correlation coefficient r is found between the EC and other parameters [1,2]. It has been established by many earlier workers that the EC has very high correlation with TDS (r ~ 0.9) and significantly high Correlation with some other parameters like Cl, TH, Mg, TA, etc. [3, 4, 5 and 6]. Measurement of each parameter involves different instrumentation, procedures, and usually consumes more time [1].
Thus, an accurate measurement of EC alone, along with the known values of A and B for the parameters in the area of interest obtained through earlier measurement enables fast prediction of these parameters.

2. MATERIALS AND METHODS Fifteen sites were selected in a village housing a sugar-cane distillery plant and the physicochemical parameters of the ground water were analysed by standard methods (APHA, 1989) [7] and given in Table - II as observed values. 3. STATISTICAL ANALYSIS Correlation co-efficient and Regression co-efficient Using sx package, the co-efficient r, A and B are evaluated for EC paired with other parameters. The values obtained are presented in Table I.

Digital and fast prediction of multiple quality parameters of GND water

241

Table - I Correlation and Regression coefficient values for EC paired with some water quality parameters Water Quality Parameters TDS Cl Mg TH TA Correlation r 1.0000 0.9867 0.8959 0.8941 0.8904 Regression coefficient coefficient A B 0.001152 -110.793 -30.9479 -13.6307 121.653 699.999 229.834 38.5 314.836 206.111

4. SYSTEM DESCRIPTION A microcontroller (8051) based system is designed [8] for the ast and simuhaneous prediction of some of the water quality parameters. The block diagram of the system is shown in figure 1.

Fig.1. Block diagram of digital, multiple prediction of GND water quality parameter system The data acquisition block comprises of a 1 MHz oscillator, Electrical conductivity cell (coll constant 1.0) current to voltage Converter, rectifier, op-amp buffer and an op-amp scale changer. The output of this unit is adjusted to have values in the range 0 to 5 volts, so as to be compatible with the Analog to digital converter (ADC 0809). The digital output of ADC is processed by the embedded J1C 8051 card with suitable C program loaded in it.

4.1. Analog to digital converter (ADC 0809): Analog to digital conversion is obtained using add-on board consisting of ADC 0809 interfaced with programmable peripheral interface IC 8255. 4.2. Embedded Microcontroller Board: 8051 CPU card [VPC-51] with 8KB RAM, 8KB EPROM, provided with RS232 serial port is used to store and execute the program [9].

242

S.B. Kalyanaraman and G. Geetha

4.3. 16 x 2 Dot matrix Alphanumeric display card VAPC - 013 model LCD display card is used to display the results. It has eight on board keys to enter the data. Two rows each with 16 column LCD dot matrix is available to display the parameter name and the corresponding value. 5. WORKING Calibration of the data acquisition system is first done, by initially immersing the conductivity cell in the prepared standard solutions of KCI with mole &actions M = 0.01 and M = 0.001. The cell is then thoroughly washed with distilled water and used for the measurement of EC of the collected water samples. The regression co-efficient values of A and B Corresponding to the parameters obtained from preliminary studies in the given area are entered into the program in an order using the keys in the alphanumeric display card. The execution of the program results in the water quality parameters displayed one after the other in succession and in the given order. The observed and predicted value of EC and other parameters for the water samples under study are presented in Table II. 6. CONCLUSION The developed microcontroller based system for fast prediction of water quality parameters is highly sophisticated but simple to calibrate and use. The portability of the system enables field measurements leading to fast monitoring of these parameters. ACKNOWLEDGEMENT The authors are very much thankful to Vi-microsystems, Chennai for providing embedded microcontroller, ADC and display cards and facilities to implement this work. REFERENCES
1. Draper and Smith. Applied Regression analysis (2nd edn) Jolm wiley and sons. New York (1981). 2. Somasekhara Rao, K. Correlations among water quality parameters of ground water of Nuzvid Town and Nuzvid mandalam, Ind. J. Env. Prot, 13(4), 261-266(1993). 3. Jain C.K. and Shanna M.K., Regression analysis of ground water quality data of Sagar district, Madhya Pradesh, Ind. 1. Env. Hlth., 42(4) 159-168 (2000). 4. Singanan A, Somasekhara Rao K. and Rambabu C., A correlation study on physico-chemical characteristic of ground water in Rameswaram Island, Ind. 1. Env. Prot, 15(3), 213-217(1995). 5. Vengatachalam M.R. and Jebanesan A, Correlations among water quality parameters for ground waters in Chidambaram Town, Ind. J. Env. Prot, 18(10), 734-738 (1998). 6. Garg V.K., Gupta R., Goel S., Taneja M. and Khurana B., Assessment of underground drinking water quality in Eastern part of Hisar, Ind. 1. Env. Prot., 20(6), 407-412 (2000). 7. APHA Standard methods for the examination of water and wastewater. 17th edition (1989) Washington, D.C. 8. Kenneth J. Ayala. The 8051 Microcontroller, Architecture, Program and Applications, Pentram Internationals, India. 9. Technical manual - Intel 8051 - VI Microsystems Pvt Ltd. Chennai.

Table - II

The observed and predicted values of some GND water quality parameters in a village situated with a Distillery plant

TDS (mg/I) Cl (mg/I) TH (mg/I) TA (mg/I) Mg (mg/I) Sl. EC (mmhos) No. Observed Predicted Observed Predicted Observed Predicted Observed Predicted Observed Predicted

1 973 917 1092 819 1400 1344 679 931 777 138 144.32 185 194.89 132 112.15 280 350 360 340 330.49 595 359 348.88 612 616.04 590.85 291.76 405.10 335.84 167 158.11 376 354.73 360 540 480 300 340 360 248 247.75 576 477.51 448 193 190.29 376 398.80 388 391.66 443.19 362.80 533.88 517.39 321.58 395.78 350.44 193 208.68 464 423.99 480 408.15 23 23 25 12 50 48 12 7 19

1.55

1085

1085

226

245.45

380

474.37

470

441.13

23

28.79 22.62 19.54 29.17 14.14 46.13 43.05 6.43 20.31 11.83

1.39

973

1.31

917

1.56

1092

1.17

819

2.0

1400

1.92

1344

Digital and fast prediction of multiple quality parameters of GND water

0.97

679

1.33

931

10

1.11

777

243

J. Instrum. Soc. India 34 (4) 244-248

MEASUREMENT OF SQUARE OF REFLECTANCE USING PRINCIPLE OF RATIOS


Om Prakash
Division of Standards, National Physical Laboratory, New Delhi 110 012, India ABSTRACT
A simple design of a spectrometer is suggested to measure the reflectance of plane specularly reflecting surfaces at normal / near normal incidence. Spectral energy distribution of reflectance of samples can be recorded by this instrument. The division of incident radiation beam into the sample and the reference beams facilitates to overcome the difficulty arising due to source fluctuations. The performance of experiment in two Steps helps effectively to obviate the effects because of (i) difference in path lengths of the sample and the reference beams, (ii) polarization produced by optical components, and (iii) stray light etc. The use of two integrating spheres attached with separate detectors facilitates the setting of the beam splitters not so critical. The uncertainty with the measurement is reduced as the square of the reflectance is measured.

I. INTRODUCTION The reflectance of optical components such as glass windows, filters and thin films coatings etc. is an important parameter used to characterize them. The researchers have been very keen to measure the reflectance of these components at normal incidence, because at normal / near normal incidence reflectance does not change significantly. Moreover, the reflectance value is nearly constant and free from polarization effects. But the measurement of reflectance at normal incidence is difficult, if it is not impossible. The reason for the same is that for measurements in this situation, the radiation source and the detector are to be aligned in the same direction. A number of methods to measure the reflectance of samples of varying natures have been reported in the literature [1-5]. In the present article, a simple design of a spectrometer has been suggested. It is capable of measuring the reflectance at normal incidence nearly free from above mentioned effects etc. 2. WORKING PRINCIPLE The schematic diagram of experimental set up is shown in Fig. 1. Here, O, is optics, C, chopper; M, monochromator, S, sample; B1 and B2, beam splitters; S1 and S2, integrating spheres attached with screens P1 and P2, and detectors D1 and D2, respectively, L1 and L2, two similar Lock-in-Amplifiers; and R, ratio meter. A beam of monochromatic light from the monochromator M, is collected by the optics O and rendered parallel to reach the aperture A.

Measurement of square of reflectance using principle of ratios

245

The size of this parallel beam is reduced in such a way so that it may pass through the opening of the chopper and is incident on beam splitter B1. At the surface of the beam splitter B1, the light beam is divided into two parts. A part beam is recorded at the sample surface. The sample surface is oriented so that the incident rays fall upon it in the normal direction to its surface. In this situation, the incident beam after reflection retraces its path back and after passing through the beam splitter B1, enters into the integrating sphere S1. On the other hand, the part of the beam transmitted through beam splitter B1, is reflected from beam splitter B2, and enters into the integrating sphere S2. The screens P1 and P2 attached with the integrating spheres S1 and S2, prevent the respective light beams falling directly on the detectors D1 and D2 respectively. The light flux in the integrating spheres is converted into A.C. electrical signals by the photo detectors, D1 and D2, because of chopping of the light beams and these are proportional to the incident light fluxes in the spheres. The Lock-in-Amplifiers convert the A.C. electrical signals from detectors D1 and D2, into D.C. signals and they are detected and rationed by the ratio meter. The experiment can be performed in two Steps as discussed in the following paragraphs.

2.1. Step 1 Let the intensity of the radiant flux coming out of aperture A is I. After reflection from beam splitter B1 and sample S and transmitted through B1, the intensity flux I is reduced to a value of I.r.R1.t. Where, r and t, are the reflectance and transmittance of beam splitter B1; and R1 is the reflectance of sample S, to be measured. Similarly, the intensity of radiation flux transmitted through beam splitter B1, reflected from beam splitter B2, and reaching sphere S2 will be I.t.r. Here it has been supposed that B1 and B2 are identical beam splitters, so that their reflectances and transmittances may be taken to be the same. Let the radiation to electrical signal conversion factor of detector D1 along with sphere S1 is F1(x) at wavelength x and that of Detector D2 along with sphere S2 is F2(x). Let the ratio of electrical signals from detectors, D1 and D2 as detected through Lock-in-Amplifers L1 and L2 respectively, and recorded by the ratio meter R, is K1, then one may write,
I.r.R1.t.F1(x) / I.t.r.F2(x) Or, R1.F1(x) / F2 (x) = K1 (1) = K1

2.2. Step 2 In this step the position of integrating spheres S1 and S2 along with their respective detectors are interchanged. Let the ratio of electrical signals from sample and reference beam channels is K2, then one may write,
I.r.R1.t.F2(x) / I.t.r.F1 (x) = Or, R1. F2(x) / F1 (x) = K2 (2) K2

On multiplying (1) and (2), one may get, R1. R1 = K1. K2

246

Om Prakash

It is evident from the above expression that the square of the reflectance of the sample can be measured easily just by recording the ratio of the electrical signals due to reference and sample beams in the two Steps of experiments as mentioned above.

3. OBSERVATIONS The radiation source used in a tungsten halogen lamp. A variable frequency mechanical chopper chops the light beam at an appropriate frequency. The reference signal to be fed into the Lock-in-Amplifiers is derived from the chopper at the chopping frequency from built in reference signal generator in it. The D.C. signals from the Lock-in-Amplifiers are fed into the Ratio meter that records the ratio of these signals i.e. values of k1 and K2, in Step 1 and Step 2, respectively, in the experiment. The sample holder is in the form of a mirror mount that has got provision to tilt the incident in the horizontal as well as vertical directions, and is held in a mount with adjustable height.
In order to carryout the experiment nine samples of mirrors, optical flat, microscope slide and quartz neutral density filter etc. were procured. Each sample was placed at the proper place in the sample holder and its surface was oriented in such a way that the incident rays fall on it normally and are reflected back to retrace their path back and enter into the beam splitter B1 and integrating sphere S1. The other portion of the light beam incident on beam splitter B2 is reflected and enters into the integrating sphere S2. The central rays of the reflected beam (the sample beam) and the reference beam are adjusted to the same heights so that they may enter the integrating spheres in Step 1 and Step 2, without any obstruction, when the integrating spheres are interchanged. The ratio meter readings, K1 and K2, corresponding to the positions of Step 1 and Step 2, were recorded for each sample. The values of reflectance square and reflectance for each sample were calculated. Sample identification (ID), values of K1 and K2, (R1)2 and (R1) are given in Table 1. As is evident from Table 1, the reflectance values measured for similar nature of samples are higher than the reported values. The reason for the same is that in the present case the reflectance has
Table 1. Sample ID, ratio meter readins, K1 and K2, respectively, K1. K2 and Reflectance, R1. Sl. Sample ID Ratio meter reading K1 0.5078 0.5078 0.5161 0.3348 0.3593 0.2941 0.3174 0.3733 0.4794 Ratio meter reading K2 0.4565 0.4420 0.4347 0.0735 0.0735 0.0629 0.0597 0.0928 0.1151 K1, K2 (R1)2 0.23181 0.22444 0.22434 0.02460 0.02640 0.01849 0.01894 0.03464 0.05517 Reflectance R1 0.4814 0.4737 0.4736 0.1568 0.1624 0.1359 0.1376 0.1861 0.2348

1. 2. 3. 4. 5. 6. 7. 8. 9.

Front coated Gold mirror Back coated Aluminum mirror Front coated Aluminium mirror Optical flat small Transmission Grating Microscope slide Sapphire window Fused Quartz window (Plate) ND Filter Ealing, 30% T integrated

Measurement of square of reflectance using principle of ratios

247

been measured for the integrated light whereas the reported values are spectral ones at selected wavelength bands. The reproducibility of the observations of K1 and K2, was fairly good, as is evident from Table 2.
Table 2. Reproducibility of observations of ratio meter i.e. K1 and K2. Run No., values of K1 and K2, for the sample of front-coated gold mirror. Run No. 1 2. 3. 4. 5. Value of K1 0.5078 0.5078 0.5078 0.5078 0.5078 Value of K2 0.4565 0.4565 0.4565 0.4565 0.4565

4. DISCUSSION Referring to the Fig. 1, it is evident that the beam splitters are set nearly at 45 degrees to the direction of incident radiation. Also, the sample surface, whose reflectance is to be determined can be set at normal / near normal incidence. The settings of both of the above

Fig.1. Schematic ray diagram of experimental set up for measurement of square of reflectance at normal incidence.

248

Om Prakash

components are not critical because of use of integrating spheres. Though in equation (1) and (2), the terms for effects of polarization and differences in path lengths of the beams have not been included, even then it is easy to show that in rationing operation in two steps of experiments, their effects are neutralized. Evidently, the expression for R1. R1 does not include any parameters such as beam intensity I; reflectances, r; transmittances, t, of beam splitters; and the response functions of the detectors, F1(x) and F2(x), etc. and is only dependent on the ratios of electrical signals due to the sample and the reference beams in the two Steps of the experiment. The uncertainty in the measurements of reflectance is further reduced because of measurement of the value of R1.R1, i.e. the square of reflectance of the sample. The signal to noise ratio in the measurements is appreciably increased because, of processing electronics. The measurements can be performed in the ambient light, as only the chopped radiation is detected by the lock-in-amplifiers at the chopping frequency of beams. Only the detector signal corresponding to the chopping frequency of beams are amplified and detected, the other frequency signals such as noise etc. are rejected by the lock-in-amplifiers. A PC can also be used to monitor the measurement of the monochromator drive. A software programme may be developed for this purpose and also to perform other functions such as to record the observations of ratio meter and to acquiring and storing data for future use. The uncertainty with the reflectance measurement results is about 5(10-5). This shows the usefulness of this method.

REFERENCES
1. H. Takahashi, M. Kimura and R. Sano, Opt. & Las. Technol. 21 (1989) 39. 2. P. Wu, P. Gu and J. Tang, Appl. Opt. 33 (1994), 1975. 3. J. Stone and L.W. Stultz, Appl. Opt. 29 (1990) 583. 4. G. Bader, P.V. Ashrit, S. Eloualik, F.E. Girouard and Vo-Van Troung, Rev. Sci. Instrum. 62 (1991) 2398. 5. S. Gil, G.A. Clarke, L.Mc. Garry and C.E. Waltham, Appl. Opt. 34 (1995) 695.

J. Instrum. Soc. India 34 (4) 249-256

MICRO-CONTROLLER BASED MONITOR FOR ARC WELDING ANALYSIS


P. Kavitha*, T. Balasubramanian* and S. Manoharan**
*Department of Physics, Regional Engineering College. Trichirappalli - 620 015 **Welding Research Institute, BHEL. Trichirappalli - 620 014 ABSTRACT
Welding is the accepted joining process for various metals all over the world. Arc welding is employed for joining of thick plates and pressure vessels. Various welding equipment manufactures are manufacturing new models of welding power sources every year in all developed countries. Presently there is a need to identify the quality of welding produced by each of these different welding power sources. Hence, the parameters affecting the arc welding quality such as arc voltage and arc current have to be monitored and analyzed thoroughly. In order study these parameters, a micro controller based monitor for arc welding system has been developed based on todays electronics technology. Embedded systems are used for this purpose, necessary hardware and software were assembled, welding parameters were monitored and the process signals were analyzed. With the developed monitor and software one can identify and choose the best welding power source for given application among the variety available in the market.

1. INTRODUCTION Monitoring of different types of welding and control of the current using micro-controller has been explored recently [l]. An arc-welding monitor using 8085 microprocessor-based system has been developed and reported earlier [2]. Such microprocessor based welding monitors are extremely used for testing of various commercial welding power sources manufactured in India [3]. Research works are also carried out using those welding monitors with micro-controllers [4].
During arc welding, the arc voltage and current vary depending upon the various set parameters. Variation of these parameters affect the arc welding quality. The arc voltage and current behavior have to be studied for effective parameter estimation. Thus, the arc voltage and current are monitored during the welding process through a signal conditioner employed in the setup. The signal conditioner is used to reduce the high voltage and current levels to the desired level of 0-5 volts. Signals are acquired and stored in the micro-controller. The micro-controller program operates through the front-end interface, which is a visual basic program. This enables

250

P. Kavitha, T. Balasubramanian and S. Manoharan

one to transfer the data from micro-controller to a default directory in order to compute and plot the parametric graphs for the captured data. From the graphs, the arc welding stability and quality of welding can be analyzed.

2. HARDWARE DESCRIPTION The hardware that acquires the voltage and current signals during the welding process is shown in Fig. 1. Intel 8051 is a versatile micro controller employed in the control designs [5]. The current and voltage signals are processed by an analog signal conditioner, and transferred to an 8-bit micro-controller to be analyzed by the PC program. 3. DATA ACQUISITION The circuit diagram used to process the arc voltage and current is shown in Fig.2. Voltage Attenuator This unit comprises of five relays, which are controlled by the micro controller through 8051 Interface. Using software, this unit can be made to operate each relay separately. Current Attenuator The welding current falls in the range of 40 to 400 amperes. The current from the welding process is passed through a shunt. The shunt used here has a rating of 1000A-75mV. Currents with in the range (l000A) are converted to a standard value of 75mV.

Figure 1. Block diagram of Micro-controller Based Monitor for Arc Welding analysis

Micro-controller based monitor for arc welding analysis

251

Figure 2. Circuit Diagram of Analog Signal conditioner

252

P. Kavitha, T. Balasubramanian and S. Manoharan

Clipper A clipper circuit is used to clip off a certain portion of the weld voltage to obtain a desired output voltage. Low Pass Filter The third order low pass Butterworth filter is used to provide a flat frequency response: Thi: cutoff frequency of the filter is 1 KHz. The arc welding voltage has a large amount of noise in the higher frequency, Hence a low pass filter is used to suppress the high frequency components. Comparator The comparator used here is for indication. Its output is connected to a LED. The LED glows if an over range value occurs. The voltage can then be reduced further to the compatible level. Multiplexer (HI508) HI508 is a single 8 input differential 4 channel CMOS analog multiplexer. This chip includes an array of eight analog switches, a digital decode circuit for channel selection, a voltage reference for logic thresholds, and an ENABLE input for device selection when several multiplexers are present. In this experimental setup, multiplexer is used to select the voltage and current alternatively. Analog to Digital Converter (AD574A) The analog signal conditioner ADC is set to 12-bit data conversion mode in the present setup. The CS and Ao pins are grounded. CE and R/C pin are used to initiate the data read and conversion operations. The analog input range is limited to 10V and the 12-bit digital output is sent to the 8051 micro controller. Micro-Controller 8051 The micro-controller is mainly employed for following three purposes l To read and store the data. l To select the relay circuit. l To transfer the stored data to host computer.
The flow diagram of the 8051 micro-controller is shown in Fig. 3. A high-level program developed in Visual Basic is accessed for this Micro-controller.

4. INTERFACING THE PC AND MICRO-CONTROLLER 4.1 The Hardware The 26 Pin parallel port is used to interface the micro-controller and the analog signal conditioner. The signals are processed and stored in the micro-controller. The RS- 232C serial port is used to interface the computer and micro-controller. Data acquisition software program has been developed to acquire the data that will be stored in the Pc. 4.2 The Software Description a. Main Form The main form consist of menus such as File, Settings, Acquire, graph, Help and Exit.

Micro-controller based monitor for arc welding analysis

253

The file menu has the menu items such as default directory, load settings, save settings and Exit. This section is used to store the data in the default directory. The settings menu is used to select the relay, samples, the COM port, and mode. The setting menu window is shown in Fig. 4. The acquire menu has menu items such as set parameters, capture, and transfer data. The data acquisition window is shown in Fig. 5. The transfer menu is used to send the transfer command to the master controller. The MSCOMM control is used to capture the data and store it in a separate file.

Figure 3. Flow Diagram of 8051 Micro-controller Program

254

P. Kavitha, T. Balasubramanian and S. Manoharan

b. Graph Form The X and Y-axis are automatically plotted based on the samples per second settings. The peak average current, average current, spatter index and ignition index are evaluated from the graph. The graph window is sown in Fig. 6.

Figure 4. Parameter Setting window

Figure 5. Data Acquiring window

Micro-controller based monitor for arc welding analysis

255

5. FORMULAE

Figure 6. Graph window

256

P. Kavitha, T. Balasubramanian and S. Manoharan

6. CONCLUSION Analyzing the arc welding with the help of computers is an added advantage because of its speed, accuracy and efficiency. The system has been developed with a variety of useful features. A software program is used to analyze the arc welding with GUI capabilities. The average current, peak average current, spatter index, ignition index are calculated. From the calculated value, the stability and the quality of welding have been analyzed. With the developed monitor and software one can identify and choose the best welding power source for given application from among the wide variety available in the market. REFERENCES
1. V.R. Samule, K. Asok kumar and S. Manoharan, Emerging trends in Microprocessor based monitoring and control system for welding applications-developments in WRI, WRI Journal, Vol. 20, No 3. pp 81-88 2. S. Manoharan, VR. Samuel et.al, Microprocessor based on line monitor for arc welding by published in WRI Journal, Vol. 13, no.2 3. K. Padmanaban and S. Manoharan, Selection of power source for narrow gap SA W, presented in National welding seminar held at Bangalore in 1997. 4. S. Manoharan, K.L. Rohira, A. Raja and Dr. S. Palani, Evaluation of welding power source by published in India Welding Journal, April-June 1991. 5. Hand book on Intel 8-bit Embedded Controller.

J. Instrum. Soc. India 34 (4) 257-267

MICRO CONTROLLER BASED CONDUCTIVITY METER


P. Bhaskar*, Parvathi C.S.*, Nagabhushana Katte**, K. Nagabhushan Raju** and K. Malakondaiah**
*Department of Instrumentation Technology, P. G. Centre, Yarigera, Raichur - 584 133, Karnataka State, India **Department of Instrumentation, Sri Krishnadevaraya University, Anantapur - 515 003. (A.P.) India ABSTRACT
A microcontroller based conductivity meter has been designed and fabricated. The use of microcontroller (8031) has made the instrument compact and versatile. A 41/2 digit AID converter is used to improve the accuracy and resolution of the system. The temperature measurement is also provided in the system since the conductivity of the solution varies with temperature. The paper deals with the hardware and software features of the system.

1. INTRODUCTION Electrolytic conductivity is a measure of the ability of a solution to carry an electrical current1. Solution of electrolytes conducts an electrical current by the migration of ions under the influence of electric field. The conductance of a solution is the reciprocal of the electrical resistance. It is expressed in mhos. Conductance C is directly proportional to the cross sectional area A and inversely proportional to the length I of a uniform conductor.
Thus, C A/l = K A/l Where, K is a proportionality constant called specific conductance or conductivity. A and I are numerically equal, the specific conductance becomes the conductance and hence it can be measured in terms of conductance.

2. INSTRUMENTATION 2.1. Principle The operational amplifier in inverting configuration is used for measurement of conductivity of an electrolytic solution2. It consists of an input resistance Ri and a feed back resistance Rf. Here the conductivity cell is used as Ri. The output voltage of the op-amp is given by VO = -(Rt/Ri) * Vi Ri = -(Rt/Vo) * Vi

258

P. Bhaskar, Parvathi C.S., Nagabhushana Katte, K. Nagabhushan Raju and K. Malakondaiah

When Vi = lV, and Rf = 1000 Ohms K = C = 1/Ri K = VO/1000 K = VOm mhos So, the inverting amplifier is designed such that the reciprocal of the input resistance is equal to the output voltage, which is then acquired by the microcontroller through ADC and finally it is displayed on LCD module. Simultaneously the measurement of temperature is also incorporated in the system.

2.2. Hardware Details The block diagram of the system is shown in the Figure. 1. The functional blocks of the system are given below.

Figure. 1. Block Diagram of Microcontroller based Conductivity Meter (a) Conductivity Cell (b) Inverting Amplifier (c) A.C. Source (d) Precision Rectifier (e) AID Converter (f) Temperature Measuring Circuit (g) Microcontroller Card with LCD display The complete schematic diagram of microcontroller based conductivity meter is shown in Figure. 2. The salient features of the individual blocks of the system follow.

Micro controller based conductivity meter

Figure.2. Schematic Diagram of Microcontroller based Conductivity Meter

259

260

P. Bhaskar, Parvathi C.S., Nagabhushana Katte, K. Nagabhushan Raju and K. Malakondaiah

(a) Conductivity Cell The Conductivity cell consists of a pair of electrodes that are firmly located in a constant geometry and which are immersed in an electrolytic solution whose conductivity is to be measured. The cell used in the present study consists of two platinum electrodes of 1cm2 cross sectional area that are separated by a distance of 1 cm. The cell constant of the cell used in the present study is 1.01. (b) Inverting Amplifier The inverting amplifier containing the conductivity cell as input resistance (Ri) is designed in such a way that the reciprocal of the input resistance is equal to the output voltage. Then the conductance of a solution becomes the output voltage of the operational amplifier in terms of milli-mhos. As the output of operational amplifier is ac, it cannot be directly applied to analog to digital converter. Hence, a precision rectifier and RC filter convert the signal into dc. The precision rectifier is constructed using two operational amplifiers A2 and A3. (c) A.C. Source A.C source consists of function generator, buffer and transformer. A function generator3 is designed using ICL8038 to generate sinusoidal signal for the excitation of the cell. Since its excellent amplitude and frequency stability it has been chosen in the present study. The amplitude and frequency of generator is exactly adjusted to 1 V and 1 KHz respectively.
To avoid the loading effects, the sinusoidal signal from the function generator is applied to cell through an isolation transformer4. As the output signal of the function generator cannot be given to transformer directly, an emitter follower is employed to drive the transformer.

(d) AID Converter The output of the inverting amplifier is given to the 41/2 digit dual slope AID converter ICL 71359 which is interfaced to the Microcontroller. Figure 3 shows an interface between an AID converter with micro controller through 8255. Port-A of 8255 is used to read the digit strobes and BCD data from AID converter. The output of the AID converter is in multiplexed BCD form. The BCD data is available on B 1, B2, B4, and B8 lines of the converter. Logic High on one of the digit strobe lines D5, D4, D3, D2, and Dl indicates the presence of BCD code for corresponding digit on data lines. The data from this AID converter are read by polling the bit corresponding to a strobe line (until that bit goes high) and store the data in reserved memory locations for future reference. After reading over the BCD code for one digit, the bit corresponding to the strobe line for the next digit is poled until that bit goes High and stored in the next memory location. The process is repeated until the data for all the 5-digits are acquired. (e) Temperature Measuring Circuit Accurate conductivity measurement depends on temperature compensation5. Hence, an integrated circuit temperature sensor LM335 is used in the present study to measure temperature of the solution6. The LM335 is Kelvins sensor i.e., its output is 2.73V/Oc. In order to get the temperature in degree Celsius, the voltage 2.73V must be subtracted from the output of

Micro controller based conductivity meter

Figure.3. Schematic Diagram of Microcontroller board


261

262

P. Bhaskar, Parvathi C.S., Nagabhushana Katte, K. Nagabhushan Raju and K. Malakondaiah

the sensor. Operational amplifier produces a reference voltage of 2.73V, which is subtracted from the output of the sensor using an operational amplifier in differential mode. The differential amplifier produces a change 10m V/OC. The output of differential amplifier is given to the 41/2 digit AID converter through a relay.

(f) Microcontroller Card with LCD Display The schematic diagram of the micro controller board designed and fabricated by the authors for dedicated applications is shown in the Figure 3. It contains all the features required for it to function as stand alone system7-8. The board contains the following features.
CPU Program Memory Data Memory Parallel I/O Serial Port 8031 (12 MHz) 2764 (8K) 0000H - 1FFFH 6264 (8K) 2000H - 3FFFH 8255 4000H - 4003H

One (1200 dB)

The role assigned to the microcontroller in the present is to acquire the data from AID converter, process it and display the same on LCD display. The buffered data lines (D0-D7) of micro controller are connected to the data lines of memory chips i.e. EPROM and RAM. Since both EPROM (2764) and RAM (6264) requires 13 address lines to address over 8K bytes (Registers). Hence the address lines A0 to A12 of 8031 micro controller are connected to the address lines of EPROM and RAM respectively. The remaining address lines A13 to A15 are used for selecting the chips with the help of a 3 to 8 decoder i.e.74LS138 IC. The RD and PSEN of the microcontroller are combined with the help of an AND gate (74LS08), the output of the AND gate is connected to the output enable (OE) of EPROM. This arrangement enables the data to be read from the EPROM. Sending the address to EPROM can access the contents of the memory at any location. Since, the read and write operations will take place in the RAM, the RD and WR signals are connected to the OE and WE pins of the chip respectively. Read and write operations are low active Intel 8255 is a general-purpose programmable I/O device designed for simple input/output operations. It has 24 I/O pins that are divided into three ports of 8-bits each viz., Port-A (PA 0-PA7), Port-B (PB0-PB7) and Port-C (PC0-PC7). Port-C can be divided into two four bit ports (PC0-PC3) and (PC4-PC7). Since there are three ports, two address lines are sufficient to select all the ports. The address lines A0, A1 of the micro controller are connected to the A0, A1 of 8255, which provide port selection. The RD and WR pins of the microcontroller are connected to RD and WR of 8255 to synchronize its read/write operations with the micro controller. The data lines Do to D7 of microcontroller are connected to 8 data lines of 8255 for transmitting or receiving the data from the microcontroller. The CS of the 8255 is connected to the Y2 of the decoder (74LS138). The remaining 16 address lines A0, A1 and A13, A14, A15 are used for determining the selection of a port or control register of 8255. The contents of the Control Register are called control word, which specifies an I/O function for each port. Writing a control word

Micro controller based conductivity meter

263

when both Ao and Ai are at logic high can access this register. This register is not accessible for a read operation. The addresses of EPROM, RAM, and 8255 are given below. EPROM RAM 8255 0000H to 1FFFH (8K bytes) 2000H to 3FFFH (8K bytes) 4000H Port-A 4001H Port-B 4002H Port-C 4003H Control Register

Two ICs 1488 and 1489 are also incorporated in the microcontroller board for serial communication with the host computer. This enables the computer to read the conductivity and temperature data of the sample and store it in the specified file for further analysis. This facility makes the instrument suitable for research applications. The interfacing of the Liquid Crystal display module with the microcontroller through 8255 helps in making the instrument portable. The data bus D0-D7 of display module10 is connected to PB0-PB7 of port-B of 8255 and the control pins RS and E are connected to the PC0 and PC1 pins of 8255 respectively. The command word is sent to the command register by making RS LOW through PC1 and the data can be sent to the display RAM by making RS HIGH through PC1. A HIGH pulse of about 40 microseconds duration is sent to the pin E of the microcontroller to fetch/send the data/command word to the display, which can be done through the pin PC0 of 8255. The controller pin RJW is connected to the ground. The second pin of the display is connected to the variable terminal of the potentiometer, which varies the contrast of the display. After measuring the conductivity and temperature of the solution the microcontroller displays them on the LCD module. The photographs of the system are shown in Figure. 5.

3. SYSTEM WORKING Since the conductivity cell acts as input resistance (Ri) of the inverting amplifier, the output voltage of the amplifier represents the conductivity in milli mhos of the solution under test. The input of the inverting amplifier is 1 V /l KHz. sinusoidal signal. The precision rectifier and RC filter are used to convert sinusoidal output voltage of the inverting amplifier into pure dc voltage. Then it is given to the AID converter through double pole single through electromechanical relay, which helps in switching between two measuring parameters i.e., temperature and conductivity. The AID converter provides the digital data corresponding to the parameter under measurement. The same is read by the micro controller through port-A of Programmable Peripheral Interface device 8255. The port bit P1.0 of micro controller is used to select one of the two measuring parameters. The micro controller sends HIGH on P1.0 to select the conductivity input, and then acquires it through AID converter and displays the same on the liquid crystal display. Then the microcontroller selects the temperature by sending LOW on P1.0, and then it acquires and displays the same on liquid crystal display.

264

P. Bhaskar, Parvathi C.S., Nagabhushana Katte, K. Nagabhushan Raju and K. Malakondaiah

Figure 4. Flowchart for Microcontroller based Conductivity Meter

Micro controller based conductivity meter

265

Figure.5. Photographs of the Microcontroller based Conductivity Meter

4. SOFTWARE DETAILS The role ofthe software in the present study is given below.
(a) To initialize the ports of 8255. (b) To initialize the liquid crystal display. (c) To scan the keyboard (d) To read digital data through AID converter corresponding to the key pressed, process it and displays the same on the liquid crystal display. The flowchart of the program is presented in the Figure 4. The detailed program is written in the microcontroller assembly language.

5. RESULTS AND CONCLUSIONS The micro controller based conductivity meter is designed and fabricated. The system is calibrated and its performance is tested with the standard resistors of 500, 1.0 K and 10.0 K and some standard solutions11. The results are tabulated in Table-I, which are in good agreement with the literature values.

266

P. Bhaskar, Parvathi C.S., Nagabhushana Katte, K. Nagabhushan Raju and K. Malakondaiah

Table - I S.No Resistor / Solution Solution Normality Specific Conductance at 25C (10-3mhos Cm-1) Present Study 1. 2. 3. 4. 500 1000 1O.OK KCI 0.1N 0.01N 5. AgNO3 0.1N 0.01N 6. NaI 0.1N 0.01N 1.9991 0.9994 0.0993 12.849 1.4090 10.865 12.479 10.873 1.1916 Specific Conductance at 25C (10-3mhos Cm-1) Literature Values11 2.0000 1. 0000 0.1000 12.856 1.4087 10.878 12.476 10.878 1.1924

REFERENCES
1. G. Chatwal and Anand. Instrumental Methods of Chemical Analysis, Himalaya Publishing House (1998). 2. R.S. Khandpur, Handbook of Analytical Instruments, Tata Mc Graw-Hill Publishing Ltd. (2002) 3. R.F. Coughlin and F.F.Driscoll, Operational Amplifiers and Linear Integrated Circuits, Prentice Hall Inc. (1987). 4. Hobart H.Willard, Lynne L.Merrit, John A.Dean and Frank A.Settle, Instrumental Methods of Analysis, CBS Publishers & Distributors (1986). 5. Douglas M.Conidine, Process/Industrial Instruments & Controls Handbook, McGraw Hill International Editions, 4th edition (1993). 6. J. Michael Jacob, Industrial Control Electronics, Prentice Hall (1988). 7. MCS51 Users Manual, Intel Corporation (1981). 8. R.S. Khandpur, Handbook on Microcomputers, Tata McGraw-Hill Publishing Company Ltd. (1989). 9. Intersil Data book (1988). 10. Orioles LCD Module - Series Users Manual (1996). 11. Samuel Glasstone, Electrochemistry, East-West Press Private Limited (1942).

J. Instrum. Soc. India 34 (4) 267-276

COMPUTER BASED DC MICROMOTOR SPEED CONTROL SYSTEM


P. Bhaskar*, Parvathi C.S.*, L. Shrimanth Sudheer* and A.B. Kulkarni**
*Department of Instrumentation Technology, P.G. Centre, Yaragera, Raichur - 584 133 **Department of Applied Electronics, Gulbarga University, Gulbarga - 585 106 ABSTRACT
A computer based DC micromotor speed control system has been designed and fabricated. In the present study, a Data Acquisition Card has been designed for the measurement and control of DC micromotor (Minimotor 2230U 015S - 8400 rpm -Faulhaber DC motors, Switzerland). The comparative study of two controllers (PID & Improved PID) have been discussed for step response and load variations (magnetic brake). It is observed that the improved PID controller has better time response in terms of shorter rise time, settling time, no overshoots, undershoots and zero steady state errors than simple PID controller.

1. INTRODUCTION The DC motor speed is one of the important process parameter that is to be monitored and controlled in Industry. No doubt, several investigators1-4 have designed and fabricated DC motor speed controllers. But the attempts to control micromotors are rather scarce in spite of their several industrial applications. The DC motors are widely used in the variable speed applications due to the ease of speed control. In closed-loop system, the speed can be maintained constant by adjusting the motor terminal voltage5. Smaller DC motors operate at lower voltages, which make them easier to interface with control electronics6. 2. PRINCIPLE The Fig.1 shows the block diagram of computer based DC micro motor speed control system. The computer measures the speed of DC micromotor through optical encoder, frequency to voltage (F/V) converter and analog to digital (A/D) converter. The computer then displays the speed of DC motor on the monitor. After measuring speed of the DC motor, the computer compares it with the set-point speed; the difference is called as error, which is applied to one of the control algorithms (Proportional + Integral + Derivative (PID) or Improved PID). The PID controller gives a good transient as well as steady-state control. It offers rapid proportional response to error, while having an automatic reset from the integral part to eliminate residual error. The derivative section stabilizes the controller and allows it to respond to the rapid changes or transients in error. Hence, no oscillations are found in the PID

268

P. Bhaskar, Parvathi C.S., L. Shrimanth Sudheer and A.B. Kulkarni

Fig. 1 Block Diagram of Computer based DC micromotor speed control System. response. The output of these algorithms is a digital value, which is fed to digital to analog (D/A) converter. The output of D/A converter is analog voltage, which is proportional to the error. The output of D/ A converter is given to the DC motor through buffer. The latter provides the required current for the DC micromotor. The output of the D/A converter is continuously varied until the speed of the DC motor attains the desired speed.

Fig. 2 Schematic diagram of the speed control of DC Micromotor.

Computer based DC micromotor speed control system

269

3. HARDWARE DETAILS The Fig.2 shows the complete schematic diagram of the system. It consists of the following elements.
a. DC Micromotor b. Optical Encoder and F/V converter c. Data Acquisition Card d. Personal Computer e. D/ A converter f. Actuator

a. DC Micromotor The DC micromotor (2230U 015S) used in this application is a product from Faulhaber DC motors, Minimotor SA 6980 Croglio, Switzerland7. Minimotor products are based on the patented self-supporting skew wound coil technology. The main features of these micromotors are: less weight, low power, high speed etc. The lifetime of these motors vary from a few hundred hours to more than 10,000 hours.
The specifications of DC micromotor (2230U 0158) are : * Nominal voltage * Output power * No load speed * No load current * Operating temperature range * Commutation * Magnetic material * Weight : : : : : : : : 15 V 2.63 W 8400 rpm 0.007 A -30C to 85C Precious metal Al NiCo 50 gms

b. Optical Encoder and F/V Converter The optical encoder is a transducer that is connected to the shaft of the DC micromotor, which converts the speed of the motor into corresponding frequency. The optical encoder used in this application produces 12 pulses for one revolution. IC LM2907 (F/V converter) converts these TTL compatible pulses into the corresponding voltage. The output voltage of F/V converter is directly proportional to the speed of the DC motor. c. Data Acquisition Card A complete Data Acquisition Card has been designed and fabricated by the authors indigenously for the present study. The card is designed as a multipurpose card. The card can be used not only for measurement but also for controlling the parameter being measured. The card mainly consists of a high speed Analog to Digital (A/D) converter AD1674, Programmable Peripheral Interface (PPI) 8255 and Programmable Interval Timer (PIT) 8254. These three devices are interfaced to computer at different addresses through the I/O slot.

270

P. Bhaskar, Parvathi C.S., L. Shrimanth Sudheer and A.B. Kulkarni

Interfacing of Analog to Digital Converter AD1674 with Computer: Interfacing of AID converter ADI674 with the computer is presented in Fig.3. The AID converter is interfaced to the computer through its I/O slot. In computer all the address, data and control lines are terminated in the I/O slot and these lines are essential for interfacing any peripheral device to the CPU of the computer8. The address lines (A0 - A9), control lines (AEN, RD, WR, RESET) and data lines (DO - D7) are brought onto the card through two latches 74LS573 (lCI & IC2) and one bi-directional buffer 74LS245 (IC3). The latches and buffer are used to protect the address, control and data lines of the CPU. If any short circuit or spark is generated in the external circuit these latches are destroyed and CPU is protected.
Since the I/O slot (ISA) of the computer has only 8-bit data lines, to interface 12 bit AID converter two 8-bit latches 74LS573 (IC4 & IC5) are used as shown in the circuit (Fig. 3). The data lines (DO - D7) are connected to latch (IC4) and remaining data lines (D8D II) are connected to another latch (IC5). The pins R/C and STATUS of analog-to-digital converter are connected to the PCO and PC7 of programmable peripheral interface (PPI) 8255

Fig. 3. Schematic diagram of Data Acquisition Card. respectively to start conversion and to check whether conversion is completed or not. The STATUS pin is also connected to the STROBE pins of two latches IC4 & IC5 which strobes the 12 bit digital data of AID converter onto the outputs of these latches after converting analog voltage into digital. A 3 to 8 decoder 74LS 138 (IC6) is used to select these latches and other peripheral devices present in the card. A dip switch logic has been provided in the card to change the base address of the card. This provision enables the user to insert more than one card in same computer. This logic is designed with 8-bit digital comparator 74LS688.

Computer based DC micromotor speed control system

271

This comparator consists of 8 numbers of two inputs NAND gates. One set of inputs PO, PI, P2, P3, P4, P5, P6 & P7 are connected to the buffered lines A4, A5, A6, A7, A8, A9, AEN and +5V of the computer. Another set of inputs QO, Ql, Q2, Q3, Q4, Q5, Q6 and Q7 are connected to the dip switches. When the data on the dip switches match with the data on the address lines, the comparator output goes low. This signal is used to enable the bi-directional data bus buffer IC3 74LS245 and the decoder IC6 74LS 138. This signal acts as a board selecting signal. Hence, the status of the switches is very important to provide specific address to any peripheral device. For example, the following dip switches status gives the base address of the board as 0300H. SWI ON SW2 ON SW3 ON SW4 ON SW5 ON SW6 OFF SW7 ON SW8 OFF Address 0300H to 030FH

Similarly, a programmable peripheral interface 8255 and programmable interval timer 8254 have been interfaced to the computer in the following addresses. 8254 : 030CH to 030FH 8255 : 0308H to 030BH

d. Personal Computer In the present study a personal computer with the following features is employed for controlling the speed of DC micromotor.
* Pentium-I, 166 MHz Intel Microprocessor * 16 MB RAM * 1.2 GB Hard disk drive * 1.44 MB Floppy disk drive * Two Serial Ports * One Parallel Port * Six ISA slots to connect I/O, AID, D/ A converter cards etc.

e. D/A converter In the present study a 12 bit D/A converter AD7541 is used. As shown in Fig.2, the D/ A converter is interfaced to the data acquisition card through port-A and port-B of 8255. The output of PID equation is digital data, which is converted into analog voltage by D/ A converter. The output of D/ A converter is given to the motor through an actuator. f. Actuator The voltage from D/A converter cannot drive the motor directly due to mismatch of power. Hence, a voltage follower with Darlington pair is added to the output of D/ A converter as an actuator to drive the motor. 4. WORKING OF THE SYSTEM The main objective of our work is to measure the real time speed of DC micromotor and to control it for the desired speed. The shaft of DC micromotor is connected to the optical encoder (transducer), which converts the speed of DC motor into a train of TTL-compatible

272

P. Bhaskar, Parvathi C.S., L. Shrimanth Sudheer and A.B. Kulkarni

pulses. This train of pulses or frequency is not directly accessible by the data acquisition card, since this card needs the signal to be in analog voltage form. Hence, this frequency is converted into voltage by Frequency to Voltage (FN) converter using IC LM 2907. The analog voltage, which is proportional to the speed, is accessed by computer through AID converter. This voltage is converted into corresponding frequency by the equation f=a1v+a0. This equation is fitted by least square curve fitting, where f is the frequency of the signal generated from optical encoder and v is the output voltage of FN converter. al = 80.156 and ao=0.04276 are the slope and intercept of the characteristic line of DC micromotor respectively. This frequency is converted into speed by the equation: Speed = (Frequency * 60 seconds) * 1/p rpm. Speed = (Frequency * 5) rpm where p = number of pulses for one revolution. For the optical encoder used, 12 pulses are generated for one revolution. This is the measured DC motor speed, which is compared with the set value (1000 rpm) to get error i.e., error = set value - measured value. Then computer solves the proportional+integral+derivative (PID) equations. To enable the computer to implement PID and improved PID control algorithms, the continuous differential equations are converted into discrete difference equations9-11. The velocity algorithms for PI and PID are given by the following equations: Vn = Vn-1 + Kp(en - en-1) + Ki enT Vn = Vn-1 + Kp(en - en-1) + Kien T + Kd/T [(en - 2en-1 + en-2)] ....... (i) ....... (ii)

The above equation (ii) is a standard PID difference equation which can be modified into an improved PID difference equation by using Trapezoidal rule and Interpolation technique which is given by the following equation. Vn = Vn-1+Kp(en-en-1)+Ki (en + en-1)/(2*T)+Kd/(6*T) [(en + 2*en_1- 6*en_2 + 2*en_3+2*en-4] ....... (iii) At any instant of time, the current value of the PID output V n is calculated based on the previous value of the PID output Vn-1, current error en, previous error en-1, previous to previous errors en-2, en-3, en-4, the cycle time T and weighing constants(Kp, Ki, Kd). The output of control program is a digital value, which is fed to the D/A converter, which converts the digital data into corresponding analog voltage. Since the D/A converter cannot drive the motor due to mismatch of power, voltage follower with Darlington pair is added as an actuator to drive the motor.

5. SOFTWARE DETAILS The software is written in C language. The flow chart (Fig. 4) of the program shows the DC motor speed measurement and control. The software first acquires the speed of the DC motor, finds error by comparing current speed with set-point speed, solves PID equations and finally outputs control signals to the actuator. The software makes the system user friendly. It provides on-line tuning of PID parameters. The DC motor speed data can be stored in the file name given by the user at the beginning of the program or at any time. The software also

Computer based DC micromotor speed control system

273

Fig. 4. Flow chart of the program

274

P. Bhaskar, Parvathi C.S., L. Shrimanth Sudheer and A.B. Kulkarni

provides on-line variation of set-point, which facilitates the system to study the step variation response. The loop time of the system is about 1 sec.

6. EXPERIMENTAL RESULTS AND DISCUSSIONS: The experimental results of DC micromotor (2230U 015S) are discussed here for desired speed and load variations. For Desired Speed Fig.5 shows the response of DC motor for simple PID controller and improved PID controller for a desired speed of 1000 rpm. The settling time is 30 seconds and 20 seconds for simple PID controller and improved PID controller respectively.

Fig. 5. Step Response of DC motor for PID Controller and Improved PID Controller for a rated speed of 1000rpm.

Computer based DC micromotor speed control system

275

For Load Variations For the DC motor, the load is applied in the form of magnetic brake. The magnetic brake works by means of an aluminum disk, which is mounted on the motor shaft. When the disk is rotated between the poles of magnet, eddy currents form on the disc, producing the effect of a frictional load. When the motor is running at a rated speed of 1000 rpm, the load is applied. Fig.6 (a), and (b) shows the response of DC motor for improved PID controller and simple PID controller respectively. From the graphs the following points are observed.

Fig. 6 Load variations Response of DC motor for PID Controller Improved PID Controller for a rated speed of 1000rpm.

276

P. Bhaskar, Parvathi C.S., L. Shrimanth Sudheer and A.B. Kulkarni

When the load is applied, the undershoot speed is 725 rpm and 700 rpm and when the load is removed, overshoot speed is 1250 rpm, and 1300 rpm for improved PID controller and simple PID controller respectively, with the corresponding settling times of 10 seconds and 12 seconds respectively. The improved PID controller response is better than the simple PID controller response in terms of shorter rise-time, shorter settling-time, no overshoots and undershoots. The system is quite successful in measuring and controlling the speed of the DC micromotor.

REFERENCES
1. Ramakant A. Gayakwad, Op-Amps and Linear Integrated Circuits, PHI, 3rd ed., 2000 2. Douglas V. Hall, Microprocessor Interfacing and Programming, McGraw-Hill, 1998. 3. Schuler, McNamee, Modem Industrial Electronics, McGraw-Hill International Editions, 1993 4. Michael Jacob .J, Power Electronics: Principles and Applications, Delmar-Thomson Leaming, 2002 5. Sen P.C., Principles of Electric Machines and Power Electronics, John Wiley and Sons, 2nd ed., 2001. 6.. Christopher T. Killian, Modem Control Technology, West Publishing company, Minnespolis/ St. Paul, 1996. 7. Faulhaber DC Motors, MINIMOTOR, Minimotor SA 6980 Croglio, Switzerland, 1999-2000, pp 53. 8. Lewis C. Eggebrecht, Interfacing to the IBM Personal Computer, Howard W, Sams & Co., Inc., 1983. 9. Krishna Kant, Computer-Based Industrial Control, Prentice-Hall of India Pvt. Ltd, New Delhi, 2002. 10. Michael Jacob M., Industrial Control Electronics - Applications and Design, Prentice Hall, England Cliffs, (1988). 11. Benjamin. C, Kuo, Digital Control Systems, Holt-Saunders International Editions. 12. Liptak .B.G, Instrument Engineers Handbook - Process Control, Butterworth Heinemann Ltd., Oxford, 1995.

J. Instrum. Soc. India 34 (4) 277-283

MICROSENSOR SYSTEM FOR MEASUREMENT OF ATMOSPHERIC TURBULENCE RELEVANT TO OPTICAL PROPAGATION


ANIL K. RAZDAN
Scientist, G-FAST, PI-Metcalfe House, Defence Science Centre, Delhi - 110 054 ABSTRACT

In order to model laser beam propagation (or optical propagation in general) through a turbulent atmosphere, one has to have knowledge about the strength of turbulence which the laser beam is encountering. The refractive index structure constant (Cn) is the single most important parameter which is measure of the atmospheric turbulence strength. A microsensor system has been designed and fabricated for measurement of the turbulence parameter (Cn). The instrument uses a pair of fine platinum wires (developed inhouse; wire diameter ~4-6 m) as sensors for measurement of small (< 0.05 K) and fast (>50 Hz) temperature difference (DT) fluctuations existing in the atmosphere. This paper will give the details about the design, fabrication, test and calibration of the instrument for its use to measure Cn. The instrument was used for long hours to measure Cn in the open atmosphere and study its diurnal variation over a 24 hour period under various atmospheric conditions covering weak, moderate and strong turbulence conditions. The results of these measurements are presented.

1. INTRODUCTION Air movements are characterized by disordered variations of both the magnitude and the direction of the velocity at any point. The result is vigorous mixing. Such motion is called turbulent as distinct from laminar motion in which mixing does not occur and the velocity at a given point is either constant or varies in a regular fashion[1,2]. Turbulent air motion represents a set of eddies of various sizes from extremely large with a characteristic scale Lo (outer scale of turbulence) to extremely small with a scale lO (called inner scale of turbulence). The outer scale Lo varies in size from tenths of a meter to a few meters near ground level, while the inner scale lO is of the order of one millimeter near the ground level.
As a result of atmospheric turbulence the density of air fluctuates which results in the change of atmospheric index thereby affecting the angular spectrum of the optical wavefront propagating through the atmosphere. The temperature variations are mainly responsible for the density in homogeneities in the atmosphere because the pressure fluctuations are dissipated very quickly (they travel with speed of sound).

278

Anil K. Razdan

Ideally an instrument for measuring these temperature variations should be capable of measuring temperature at a point in the atmosphere without itself altering the temperature. Directly measuring the index of retraction by optical interferometry seems attractive at first, because no heat exchange is required to make the measurement. Unfortunately measuring small volumes of air involves the proximity of large pieces of glass which disturb the air flow. An alternative approach involves the temperature measurement of a solid in near equilibrium with the surrounding air. A study of the performance of a resistance thermometer indicates that this means of air temperature measurement is sufficiently close to the ideal to be useful.

2. CONSTRUCTION OF PROBES Fine platinum wires with diameters in the range of 4-6 m and resistance 4-8 /mm are used as temperature sensors. These wires are produced using the wollaston process[3]. In this process a relatively thicker Platinum wire is embedded in a Silver rod along its axis. This composite piece is then drawn by conventional method into a wire till the Platinum wire reaches its desired thickness. The Silver clad Platinum wire or wollaston wire is easy to handle. A rectangular hole of (0.5 x 0.6) cm2 is cut in the center of a circular mica disc of ~ 4.0 cm diameter. A series of holes (0.5 mm diameter) are drilled on two edges and along the length of the rectangular hole. Five holes are along one edge and six along the opposite edge. Holes of same dimensions are drilled on either side along its breadth. Two Aluminium discs having central rectangular hole (1 x 1.3) cm2 are pasted concentrically on the two sides of the circular mica piece. Wollaston wire is then threaded in a zigzag way through the pin holes of the mica sheet and its two ends are respectively soldered by Indium to two Aluminium electrodes. The holes are covered with thin layer of araldite to give strength to the wire at these points. The complete probe is then dipped in dilute nitric acid bath, the electrodes and araldite being protected with paraffin wax. When the silver is completely dissolved in the acid, the paraffin wax is removed carefully first in hot water and then in petroleum ether. The sensor is now ready. A sketch of the finished sensor is shown in Fig. (1).

Fig. 1. Diagram of temperature sensor (mounted)

Microsensor system for measurement of atmospheric turbulence relevant to optical propagation

279

Fig. 2. Block diagram of Cn measurement system P1, P2 : Microthermal probes; Rf : Fixed resistance; Rv : Variable resistance

3. MEASUREMENT PRINCIPLE: Figure 2. shows the block diagram of the measurement system. The Platinum wire probes P1 and P2 are used in pairs separated by a distance of a few centimeters. Taking the root mean square (R.M.S) value of the temperature difference between the two probes separated by a distance r (which is proportional to the voltage difference across the points A and D; the calibration constant for conversion of temperature difference into voltage is obtained by the calibration procedure described later), we calculate the value of the temperature structure constant (CT) by using the relation[4] :
CT2 = [< (T2 - T1)2>] r-2/3 (1) (2)

CT = [<(T2-T1)2>]l/2 r-1/3 = DTl/2 r-1/3

where < > is the ensemble average, DT is the temperature structure function, r is the separation between the probes and T1 and T2 are the individual temperatures measured by the probes. According to the Kolmogoroff theory, CT2 is independent of r. It is related to the refractive index structure parameter (Cn) as follows[4] : Cn2 = [79 P/T2 x 10-6]2 CT2 Cn = [79 P/T x 10 ] CT
2 -6

(3) (4)

280

Anil K. Razdan

where P is the pressure in millibars and T is the temperature in K. The advantage of using the probes in pairs is that structure function measurement acts as a spatial filter, discriminating against irregularities with scales larger than r. In this way it is possible to observe directly those irregularities that are most important in their optical effects.

4. DESCRIPTION OF INSTRUMENT The two probes P1 and P2 constitute two arms (arm 1 and arm 2) of a wheatstone bridge (see fig. 2). The third arm is a fixed resistance Rf and the fourth arm is a variable resistance Rv. The cold resistances of the two probes were determined to be 204.0 ohms and 154.0 ohms after measuring the resistance of the probes at a known constant temperature using a constant temperature bath. A battery serves as a source of current to the bridge circuit. The current flow is restricted to a value so that the self heating of Platinum wire due to current flow is negligible. Initially the two probes are kept at zero separation and the bridge is balanced by the adjustable resistance of the fourth arm. Thereafter the two probes are kept at a known distance apart in the region under investigation. The output between the points A and D is suitably amplified and after passing through a high pass filter is fed to an RMS unit giving RMS value of the temperature difference fluctuations (the amplified output can be expressed in terms of the temperature difference between the probes by using the calibration constant obtained by the calibration procedure described later). CT is then calculated according to equation (2). A sample of a chart recorder output of temperature fluctuations is shown in Figs. 3 (a), (b), (c). This is repeated for different separations between the two probes and an

Fig. 3. Samples of temperature difference measurements made on a clear sunny day with sensors 1.5 m above the ground and speed 3.6 cm apart. a) at 0545 hrs b) at 1020 hrs c) at 1300 hrs

Microsensor system for measurement of atmospheric turbulence relevant to optical propagation

281

average value of CT is obtained. The average atmospheric pressure and the average temperature are simultaneously measured and Cn is calculated using equation (4).

5. CALIBRATION PROCEDURE Referring to Fig. (2) we see that by changing the measuring current slightly by introducing a small change in the resistance (R) in arm 1 or arm 2 of the wheatstone bridge it is possible to change the potential difference between the points A and D by an amount V that would occur through a temperature difference of T between the two probes. The procedure adopted for calibration is as follows.
The two probes P1 and P2 are kept at zero separation (at a known constant temperature) and the bridge is balanced by. the adjustable resistance of the fourth arm. The probes P1 and P2 are next replaced by precision potentiometers PTI and PT2 introducing the equivalent resistance of probes P1 and P2 respectively at that particular temperature. The potentiometer resistance is adjusted to produce step changes in the amplifier output corresponding to -2C -1C, +1C and 2C temperature difference between the probes P1 and P2. The change in resistance to be introduced for 1C change in temperature at a particular probe is equal to RO where RO is the cold resistance of the probe and is the temperature coefficient of resistance for Platinum (0.00392//OC). Thus a calibration constant is obtained relating the Amplifier output voltage and the temperature difference existing between the two probes.

6. RESULTS AND DISCUSSION The instrument was used to study the diurnal variation of refractive index structure parameter (Cn) in the atmosphere. Samples of temperature difference measurements made on a clear sunny day with sensors 1.5 m above the ground, spaced 3.6 cm apart are shown in Fig. (3) a, b, c. The wind velocity during the measurements was recorded as 0.7 m/s (min) to 3.7 m/s (max). The average pressure and temperature were also measured simultaneously alongwith the temperature fluctuation measurements & Cn estimated according to relation (4). The calibration factor in this case was found to be 170 mV = 0.5C. The measurements were repeated for different separations between the sensors viz. r = 1.6 cm, 3.6 em, 9.6 cm, 16.00 cm and average value of CT was calculated. The average temperature and average relative humidity (R.H) during these three sample measurements were recorded to be 33C, 49%; 36.2C, 30% and 39C, 37% respectively. Table (1) gives the value of C T & the corresponding value of CT as a function of time. Mean pressure values are also given. Fig. (4) illustrates a typical example of the diurnal variation of Cn with probes 3.6 cm apart and at a height of 1.5 m above the ground. The diurnal cycle of Cn in Fig. (4) is typical of its behaviour in the surface layer of the earth (approx. the lowest 0-100 m). The intensity of the temperature fluctuations and hence Cn is quite small at night and in the early morning hours until solar heating of the ground becomes significant enough to initiate the convective instability. This instability generates temperature fluctuations at a given height in the following manner. The sun heated surface materials warm a thin layer of the air above. If air parcels from the layer become displaced upward, they find themselves warmer and hence less dense and more buoyant than the ambient air; therefore, they continue to accelerate upward. It is the mixing of these hot rising air parcels with cool descending air parcels that produces the observed temperature irregularities. This process continues, causing Cn to increase until the solar heating subsides producing a consequent drop in Cn as seen in Fig. 4 around 1200 hrs.

282

Anil K. Razdan Table 1 : Recorded values of mean pressure and temperature and estimated values of CT and Cn Time (hrs) CT (m-1/3) Mean Pressure (mb) Mean Temperature (K) Cn (x10-6) (m-1/3)

510 538 545 615 710 815 915 1025 1100 1210 1300 1410 1500 1600 1905 2000 2210 2258 2330

0.287 0.40 0.627 0.640 0.661 0.918 0.966 1.234 1.557 2.811 2.144 1.837 1.7055 1.467 1.404 0.920 0.779 0.561 0.223

1008 1008 1008 1008 1008 1008 1008 1008 1008 1008 1008 1008 1008 1008 1008 1008 1008 1008 1008

306 306.3 306.5 306 306 309.7 309 309.2 309.2 311 312 312 311.5 312.5 310.5 309 308.75 308.8 308.5

0.242 0.336 0.528 0.528 0.544 0.757 0.801 1.023 1.29 2.3 1.745 1.495 1.458 1.19 1.153 0.759 0.643 0.465 0.184

Fig. 4. Plot showing diurnal variation of Cn on a typical hot summer day

Microsensor system for measurement of atmospheric turbulence relevant to optical propagation

283

ACKNOWLEDGEMENTS The author wishes to express his gratitude to Sh. K V S S Prasad Rao, CC R&D (Tech) & DS, DRDO HQRS. and Sh. K S Jindal, Du-ector, LASTEC, for their kind permission to publish this work. REFERENCES
1. J.W. Strohbehn, Laser Beam propagation in the Atmosphere (Topics in Applied Physics; Vol. 25, Springer Verlag, New York (1978). 2. V.E. Zuev, Laser Beams in the Atmosphere , Plenum (1982). 3. Kartar Singh, et al Fabrication of Microphone Grids Internal report DSL Report no. 3/70, Defence Science Centre, Metcalfe House, Delhi-54 4. R. S. Lawrence. et. al., Measurements of atmospheric turbulence relevant to optical propagation J. Opt. Soc. Am. 60, 826-830 (1970).

You might also like