An expert system for softwood lumber grading

An expert system for softwood lumber grading

Computersind. Engng Vol.31,No. 1/2,pp. 463-466, 1996 Copyright© t 996ElsevierScienceLtd Printedin GreatBritain.All6ghtsreserved S0360.8352(96) 00175-1...

341KB Sizes 0 Downloads 170 Views

Computersind. Engng Vol.31,No. 1/2,pp. 463-466, 1996 Copyright© t 996ElsevierScienceLtd Printedin GreatBritain.All6ghtsreserved S0360.8352(96) 00175-1 o360-s352,96$15.00+ 0.00

Pergamon

AN EXPERT SYSTEM FOR SOFTWOOD LUMBER GRADING Y. ZENG

S. RANDHAWA

J. FUNCK

System Optimization and Control Lumber Manufacturing Dept. Forintek Canada Corp. Vancouver, BC, Canada V6T 1W5

Deparunent of Industrial & Manufacturing Engineering Oregon State University Corvallis, OR 97331

Deparuneot of Forest Products Oregon State University 105 Forest Research Lab Corvalli.~, OR 97331-7402

ABSTRACT To accommodate future applications of scanning technology and minimiTe differences in the interpretation of written rules, a pco~type expert system for grading green softwood lumber was developed. It was also intended to be part of the expansion of a log breakdown model to include internal defect information in the optimiratJon process. The system's knowledge base consists of pertinent green grading rules based on the Western Wood Products Association's (1988) "Western Lumber Grading Rules 88" for 27 grades in the dimension, selects and finish, and board categories. The system is designed to be either interactive and menu-driven or nm in a batch input mode. User input to the system consists of lumber size; desired primary grade category; and defect information such as type, location, and size on each face and edge. The system then infers the grade corresponding to each side and an overall grade for the board. Limited explanation capabilities are provided.

KEYWORDS Expert Systems, Lumber Manufacturing, Lumber Grading

INTRODUCTION Lumber manufacturing is a somewhat unique process in that it only involves raw material breakdown; this helps ensure that raw material costs are a significant portion of the total production cost. This, combined with factors significantly affecting raw material supply, mean that an important issue for the lumber manufacturing industry is eff~ient raw material usage. Therefore, many breakdown stations have long included some form of op "Umization. For example, computer hardware and software advances have allowed optimiTation techniques used to control the headrig (primry log breakdown station) to evolve from initially considering only one geometric dimension of a log to where three-dimensional, external features of the log can now be considered. However, most breakdown models make the "optimum" decisions based on the geometrical dimensions of a log, cant, flitch, or board but ignore the important effect of defects on lumber recovery and quality. While a few models do consider internal log defects, the grading programs that have been developed are limited in terms oftbe reqnirements of the research being reported in this paper (Chang and Guddanti, 1993; Gatcheil et al., 1992; Hallock and Galiger, 1971; Huang and Sparrow, 1989; Klinkhachorn etal., 1988,1989,1991,1992,1994, 1995; Park, 1994; Riihinfn, 1993; Schwehm et al., 1990; Todorold, 1990; Wagner et al., 1991). For instance, most were written for hardwood grading rules (wood species are divided into angiosperms or hardwoods and gymnospenm or softwoods; the names hardwoods and softwoods do not imply anything about the actual wood density). Other models simply simulate sawing the log without attempting to seek an optimum solution. Most have a variety of limitations on the defect data. Also, most of these programs were developed using the FORTRAN or C programming langmses, which makes modification and expansion of the grading rules difficult if both the grading rules and procedures are integrated into the program structure. Those limitations indicate that while the algorithmic approach used in most of the previously cited models is feasible, an expert systems (ES) approach is more appropriate since the lumber grading problem is declarative rather than algorithmic in nature. While the ES approach has had only limited use in forest products applications (Linehan and 463

464

19th International Conference on Computers and Industrial Engineering

Corconm, 1994; Massey etal., 1989; Mendoza and Genner, 1988), Huang and Sparrow (1989) did apply it to grading haniwood lumber. This paper presents the development of an expert system for softwood lumber grading based on the grading rules published by the WWPA as described in the ~Westem Lumber Grading Rules 88" (Western Wood Products Association, 1988). The primary objective for developing this system was to link it to a log breakdown optimiTation model, SAW3D (Funck and Zeng, 1993; Zeng, 1992), so that the integrated system considers both 3-dimensional log geomeUv and quality information when optimizing sawing, edging, and trimming decisions. SYSTEM DESCRIPTION Softwood hnnber is classified according to the extent of manufacture, size, and end use. Each major category is further grouped into subcategories and each subc.ategory includes many grades. This project only considers WWPA grading rules for the select and finish, board, and dimension categories (Western Wood Products Association, 1988). Characteristics and limiting provisions for each grade include the type, size, location, and distribution of natural defects as well as manufaeaaing imperfections. Because the intended use of this system is as a component embedded into the log breakdown optimization system SAW3D, this implementation does not consider a number of manufacturing imperfections. For instance, manufacturing related defects such as warp and skip would not be known during primary breakdown, so they are not considered. The specific grade characteristics included in the expert system are listed elsewhere (Zeng, 1992). Eclipse (Haley Enterprise, 1992), a commercial rule-based programming tool, was selected for this project. Eclipse supports several important features required of the development tool, including rule-based knowledge representation, a forward Chaining inference engine, runs under protected mode, and can be integrated with other applications. The prototype system has four basic components: user interface, inference engine, knowledge base, and an explanation facility. The user interface collects data from the user and provides the grading results. The inference engine is a built-in component of Eclipse. The knowledge base contains the grading rules. An example for one grade is shown in Figure 1. The explanation facility consists of a set of rules for tracing the facts used in arriving at results. For a complete description of the grading system's file structure and rules' syntax, see (Zeng, 1992). The process begins with loading the knowledge base and selecting the input method to be used (interactively or loading a file containing facts). If the interactive input method is selected, a series of dialog boxes will guide the user to enter lumber size, select grade category and subeategories, and specify for each face and edge where defects are located along with the defects' types, locations, and sizes. The system them infers the grade corresponding to each side, followed by an overall grade for the piece. The system allows the user to ask for an explanation which includes type and size of defects, the grade each defect has satisfied, and the defects that determined the grade.

SYSTEM EVALUATION The system was evaluated using 85 samples of dahurian larch (Larix dahurica) lumber that was 2 inch by 4 inch by 12 feet in size. The samples had been graded by a grader fTom the West Coast Lumber Inspection Bureau (WCLIB). All samples were of the Structural Light Framing category. Among the five grades in this category, 20 pieces were select structural lumber, 20 were No. 1, 20 were No. 2, 20 were No. 3, and 5 pieces were economy grade. To test the performance of the system, defects on these pieces were measured by the authors following the procedures outlined in the WWPA grading rules (Western Wood Products Association, 1988) and ASTM D-245 (American Society for Testing and Materials, 1987) and entered into the system. The results showed that 76.5 percent oftbe samples matched the original grades assigned by the WCLIB grader. An additional 17.6 percent did not match the original grades because of limitations of the expert system, primarily the fact that it does not consider warp (9.4 percent), shake (3.5 percent), and manufacturing imperfections (3.5 percent). Only 5.9 percent of the samples did not match the assigned grades because of defect size measurement bias or unexplained mismatch. If the system is to be used for a log breakdown optimization system where warp and manufacturing imperfections are not considered, the percentage of matched samples increases to 89.4 percent. However, if the system is to be used as an instruction tool or a component of an automatic grading system, warp and manufacturing imperfections are important factors that affect grading accuracy and, therefore, would need to be i~chided in the system.

19th International Conference on Computers and Industrial Engineering Rule 1:

IF

Rule 2:

THEN IF

THEN

Rule 3:

IF

THEN Rule 4:

IF

Rule 5:

THEN IF THEN

Rule 6:

IF

Rule 7:

THEN IF THEN

Rule 8:

IF

Rule 9:

THEN IF

THEN Rule 10: If THEN Rule 11:

IF

THEN

Rule 12: IF

THEN

465

N O throush chacks at ends O R longest through cheek at end s lumber width Chech salisfy grade C O N S T R U C T I O N N O from knots on face O R (lumber width = 2" A N D diame~ of largestfirm knot < 0.75") OR (lumber width ffi 3" AND diameter of largest firm knot < 1.25") OR (lumber width ffi 4" AND diameter of largest firm knot < 1.5") firm knots satisfy grade CONSTRUCTION NO loose knots on face O R (lumber width ffi 2" AND diameter of largestfrom knot ~ 5/8") OR (lumber width ffi 3" AND diameter of largest firm knot < 314") OR (lumber width ffi 4" AND diameter of largest from knot ~ 1") loose knots satisf~~ CONSTRUCTION N O holes on face O R (lumber width ffi2" A N D dinrnetel"of.largesthole < 5/8") OR (lumber width = 3" A N D diameter of largesthole < 3/4") OR (lumber width ffi 4" AND diameter of largest hold ~ 1") holes satisfy8rade C O N S T R U C T I O N manufacture standard is "E" manufacture satisfies grade CONSTRUCTION NO shakes O R (NO through shakes A N D length of largest shake ~ 2') shakes satisfy grade CONSTRUCTION N O skips OR hit and miss on < 10% pieces skips satisfy grade CONSTRUCTION slope of grain ~ I/6" slope of ~ satisfms@fade C O N S T R U C T I O N N O splits O R lengthof longestsplit< lumber width splitssaesfy p~de C O N S T R U C T I O N N O wane OR (thickness of wane < 1/4 lumber thickness AND width of wane < 1/4 lumber width) wane satisfies~rade C O N S T R U C T I O N NO warp OR warp ~ 112 medium warp satisfies p-ade CONSTRUCTION checks satisfygrade C O N S T R U C T I O N A N D firm knots satisfygrade C O N S T R U C T I O N A N D looseknots satisfygrade C O N S T R U C T I O N A N D holes satisfygrade C O N S T R U C T I O N A N D manufacture satisfiesgrade C O N S T R U C T I O N AND shakes satisfy grade CONSTRUCTION AND skips satisfy grade CONSTRUCTION A N D slope of grain satisfiesgrade C O N S T R U C T I O N A N D splitssatisfygrade C O N S T R U C T I O N AND wane satisfies grade CONSTRUCTION A N D warp satisfmsgrade C O N S T R U C T I O N ~rade is C O N S T R U C T I O N

Figure 1. Grading rules for the CONSTRUCTION grade represented using production rules

CONCLUSIONS A pmtmype expert system for grading softwood lumber in 27 grades under the dimension, select/finish, and boards categories was developed and implemented. It can judge each side of the piece individually as well as assign an overall grade. A user interface helps to obtain facts about a piece of lumber and provides grading results and explanations about how the conclusions are reached. The intruded use of the system is in conjunction with SAW3D, a log breakdown o p f m i ~ t i o n system, to determine optimum log breakdown decisions. SAW3D will provide this grading system with lumber size and defect information. The expert system will determine the lumber grade and pass this information back to SAW3D. Then SAW3D will determine the lumber value based on the grade and use it to arrive at optimum log breakdown decisions. This application represents a new direction for improving lumber production efficiency by optimizing cutting strategies using both lumber size and defect information.

466

19th International Conference on Computers and Industrial Engineering

The system might also be used as an instruction or training tool, as has already been done for hardwood lumber (Huang and Sparrow, 1989; Klinkhac~m et al, 1989,1994). However, this will require an enhanced user interface for a graphic display of defect distribution, a more detailed explanation facility, and the inclusion of several more defect rules. The system could also be coupled with a machine vision system to make an on-line automatic lumber grading system CKlinkhachomet al., 1992; Sobey, 1990). REFERENCES American Societyfor Testing and Materials (1987). Standard methods for establishing structural grades and related allowable properties for visually graded lumber. ASTMD 245-81. ASTM, Philadelphia, PA. Chang, S.J. and S. Guddanti (1993). Application of high speed image processing in hardwood sawing research. Pages V-l--V-6 in: ~ g s , F/Rh l n ~ Conferenceon Scanning Technology & Process Control for the Wood Products Industry, Wood Technology Exposition Group, Atlanta, GA, October 25-27. Funck, J.W. and Y. Zeng (1993). SAW3D: a real shape log breakdown model. Pages IV-l--IV-19 in: Proceedings, Fifth International Conference on Scanning Technology & Process Control for the Wood Products Industry, Wood Technology Exposition Group, Atlanta, GA, October 25-27. Gatcbell, C., P. Klinkhachom, and R. Kothari (1992). ReGS -- a realistic grading system. Forest Products Journal, 42(10), 37-40. Haley Enterprise (1992). Eclipse Reference Manual. The Haley Enterprise, Inc., Sewicldey, PA. Hallock, H. and L. Galiger (1971). Grading hardwood lumber by computer. USDA Forest Service Research Paper FPL-157, Forest Products Laboratory, Madison, WI. Huang, S.S.L. and F.T. Sparrow (1989). A computer-aided instruction tool for grading hardwood lumber. Forest Products Journal, 39(10), 39-42. Klinkhachom, P., J.P. Franklin, C.W. McMillin, R.W. Conners, and H.A. Huber (1988). Automated computer grading of hardwood lumber. Forest Products Journal, 38(3), 67-69. Klinkhachom, P., R. Kothani, R. Annaraj~hala, and C.W. McMillin (1994). TRSys: a hardwood lumber grading training and remanufacturing system. Forest Products Journal, 44(9), 68-72. Klinkhachom, P., R. Kothari, D. Yost, and P. Araman (1992). Enhancement of the computer grading program to support polygonal defects. Forest Products Journal, 42(10), 41-46. Klinkhachom, P., J. Moody, and P. Amman (1995). Automated lumber processing system: grading the hardwood lumber. Pages 77-83 in: Proceedings, Twenty-Third Annual Hardwood Symposium, National Hardwood Lumber Association, Cashiers, NC, May 17-20. Klinkhachorn, P., C.J. Schwehm, C.W. McMillin, and H.A. Huber (1989). HALT: a computerized training program for hardwood lumber graders. Forest Products Journal, 39(2), 38-40. Klmkhachom, P., D. Yost, R. Kothari, C.W. McMillin, and H.A. Huber (1991). Computer lumber grading and HaRem for an automated lumber processing system. Pages 173-181 in: Proceedings, First International Conference on Automated Lumber Processing Systems and Laser Machining of Wood, Michigan State University, East Lansing, MI. Linehan, P.E. and T.J. Corcoran (1994). An expert system for timber harvesting decision making on industrial forest lands. Forest Products Journal, 44(6), 65-70. Massey, J.G., R.P. Thompson, and C.N. deHoop (1989). The utility of expert systems to the forest products industry. Forest Products Journal, 39(11/12), 37-40. Mendoza, G.A. and G.Z. Germer (1988). Expert systems: a promising tool in wood products manufacturing. Forest Products Journal, 38(2), 51-54. Park, J.C. (1994). Evaluating prune sawlog quality and assessing sawmill recoveries in New Zealand. Forest Products Journal, 44(4), 43-52. Riihinen, J. (1993). Automated grading and optimizing for rimming and sorting of green lumber: practical applications in production lines. Pages VIII-I--VIII-3 in: Proceedings, Fifth International Conference on So-armingTechnology & Process Control for the Wood Products Industry, Atlanta, GA, October 25-27. Schwehm, C.J., P. Klinkhachom, C.W. McMiUin, and H.A. Huber (1990). HaRem: hardwood lumber remanufacmring program for maximizing value based on size, grade, and current market prices. Forest Products Journal, ~(7/8), 27-30. Sobey, P. (1990). Automated optical grading of timber. Proceedings of Optics in Agriculture. SPIE Vol. 1379. Todoroki, C.L. (1990). AUTOSAW system for sawing simulation. New Zealand Journal of Forestry Science, 20(3), 332-348. Wagner, F.G., P.H. Steele, L. Kumar, and D. Butkovic (1991). Computer grading of southern pine lumber. Forest Products Journal, 41(2), 27-29. Western Wood Products Association (1988). Western lumber grading rule 88. Portland, OR. Zeng, Y. (1991). Log breakdown using dynamic programming and 3-D log shape. Unpublished MS thesis, Oregon State University, Corvallis, OR. Zeng, Y. (1992). An expert system for softwood lumber grading. Unpublished MS thesis, Oregon State University, Corvallis, OR.