Use of the “smart transducer” concept and IEEE 1451 standards in system integration for precision agriculture

Use of the “smart transducer” concept and IEEE 1451 standards in system integration for precision agriculture

Computers and Electronics in Agriculture 48 (2005) 245–255 Use of the “smart transducer” concept and IEEE 1451 standards in system integration for pr...

157KB Sizes 3 Downloads 84 Views

Computers and Electronics in Agriculture 48 (2005) 245–255

Use of the “smart transducer” concept and IEEE 1451 standards in system integration for precision agriculture Jiantao Wei a , Naiqian Zhang a,∗ , Ning Wang b , Donald Lenhert c , Mitchell Neilsen d , Masaaki Mizuno d a

Department of Biological and Agricultural Engineering, Kansas State University, Seaton Hall, Room 147, Manhattan, KS 66506, USA b Department of Bioresource Engineering, McGill University, Ste-Anne de Bellevue, Que., Canada H9X3V9 c Department of Electrical and Computing Engineering, Kansas State University, KS 66506, USA d Department of Computing and Information Science, Kansas State University, KS 66506, USA Received 6 December 2004; received in revised form 18 April 2005; accepted 19 April 2005

Abstract As an increasing number of electronic control units with various types of sensors and actuators are embedded in agricultural machines and processes, efficient system integration has become a critical issue. A recently developed agricultural bus standard, ISO 11783, provided a platform for mobile equipment communications, enabling a plug-and-play capability for implement microcontrollers made by different manufacturers. This paper further recommends the use of the IEEE 1451 standards to design “smart transducers” to facilitate plug-and-play for sensors and actuators made by

Abbreviations: ADC, analog-to-digital converter; CAN, Controller Area Network; DAC, digital-to-analog converter; ECU, electronic control unit; EEPROM, Electrically Erasable Programmable Read-only Memory; I/O, input/output; IEEE, Institute of Electrical and Electronics Engineers; ISO, International Organization for Standardization; NCAP, Network-Capable Application Processor; NIST, National Institute of Standards and Technology; RAM, Random Access Memory; SPI, Serial Peripheral Interface; STIM, Smart Transducer Interface Module; TEDS, Transducer Electronic Data Sheet; TII, Transducer-Independent Interface; UART, Universal Asynchronous Receiver–Transmitter; USB, Universal Serial Bus ∗ Corresponding author. Tel.: +1 785 532 2910; fax: +1 785 532 5825. E-mail address: [email protected] (N. Zhang). 0168-1699/$ – see front matter © 2005 Elsevier B.V. All rights reserved. doi:10.1016/j.compag.2005.04.006

246

J. Wei et al. / Computers and Electronics in Agriculture 48 (2005) 245–255

different manufacturers and thus further simplifying system integration. In this paper, the IEEE 1451 standards are reviewed, compatibility between ISO 11783 and IEEE 1451 is analyzed, an example of a weed sensing system using both the IEEE 1451 and the LBS standard (a predecessor of the ISO 11783 standard) is introduced, and the advantages and disadvantages of this implementation are discussed. © 2005 Elsevier B.V. All rights reserved. Keywords: Precision agriculture; Embedded systems; System integration; Smart transducer; CAN; Sensors; Actuators

1. Introduction During recent years, an increasing number of electronic control units (ECU, a complete list of abbreviations is given at the footnote of page 1) with various types of sensors and actuators have been embedded in agricultural machines and processes. For example, a modern John Deere 8000-series tractor with Green Star ReadyTM has at least 16 ECUs onboard (Deere & Company, 2001). Based on the Controller Area Network (CAN), a recently developed agricultural bus standard, ISO 11783, provides a platform for mobile equipment communications (ISO, 2001). This standard details the necessary requirements for agricultural electronics communications, such as message types, identifier assignment, and network management, to enable a plug-and-play capability for ECUs made by different manufacturers. However, the standard does not specify how to connect raw sensors and actuators to the ECUs. Most sensors generate analog (voltage or current), digital, or pulse signals. These signals need to be properly conditioned before further analog signal or digital signal processing can proceed. Typical signal conditioning includes amplification, level translation, linearization, and filtering. The advancement of silicon technology makes it fairly cheap to integrate a microprocessor with physical sensors/actuators and associated signal conditioning/processing circuits to form a single, compact package—a “smart transducer” (Johnson, 1997). The “smart transducer” concept shifts the task of designing signal conditioning and processing from application engineers to transducer manufacturers so that application engineers can concentrate on application-specific tasks. Smart transducers directly output processed digital signals such that, with good electronic system designs, data corruption due to noise pickup should not occur. Furthermore, smart transducers can be easily networked; thus, operations of the sensing elements can be monitored via a network and diagnosis at the system level can be simplified (Wynn, 2000). For easy sensor/actuator integration, a common interface between transducers and other parts of the system needs to be introduced. Information exchange across such an interface is possible only if the transducer manufacturers and the transducer users follow the same standard. To date, there is no consensus among agricultural equipment manufacturers and transducer manufacturers about how to integrate transducers on agricultural machines (Wei, 2003). In this paper, the IEEE 1451 smart transducer standards are recommended as a tool to be used with the ISO 11783 standard for integration of sensors, actuators, and embedded microprocessors for precision agriculture applications.

J. Wei et al. / Computers and Electronics in Agriculture 48 (2005) 245–255

247

2. The smart transducer standards in IEEE 1451 Standardization efforts initiated by the National Institute of Standards and Technology (NIST) led to the development of the IEEE 1451 standards (IEEE, 1997, 1999a,b,c). Objectives of these standards are to make it easier for transducer manufacturers to develop smart sensors and actuators that can connect with various computer systems and instruments through standard networks. The IEEE 1451 standards are comprised of four sub-standards: IEEE 1451.1–1451.4. To date, the 1451.1 and 1451.2 sub-standards have been balloted and accepted by the IEEE. Sub-standards 1451.3 and 1451.4 are still under development. Fig. 1 shows the system structure defined by 1451.1 and 1451.2. This architecture comprises a Smart Transducer Interface Module (STIM), a Network Capable Application Processor (NCAP), a Transducer-Independent Interface (TII) between the STIM and the NCAP, and a network. Each STIM and NCAP module contains an independent microcontroller. Transducers (sensors or actuators) and their signal conditioning circuitry are considered parts of the STIM. Analog and digital signals from sensors can be connected to the STIM’s microprocessor through analog-to-digital converters (ADC) and digital input (DI) ports, respectively. Control signals can be sent to actuators through a digital-to-analog converter (DAC) or digital output (DO) ports of the microprocessor. Thus, an STIM module can accommodate a wide variety of sensors and actuators. The total number of transducer channels allowed for an STIM module is 255 (IEEE, 1997). The 1451.2 standard specifies a Transducer Electronic Data Sheet (TEDS) within the STIM to describe characteristics of the transducers. The amount of detail held within the TEDS varies with each application, but critical information is always present. A TransducerIndependent Interface (TII) is specified in this standard to link the STIM to the NCAP. The

Fig. 1. IEEE 1451 system architecture.

248

J. Wei et al. / Computers and Electronics in Agriculture 48 (2005) 245–255

TII is a superset of Serial Peripheral Interface (SPI), physically consisting of 10 digital I/O lines. A transfer protocol is specified to allow data transmission across the TII (IEEE, 1997). Due to the complexity and unpopularity of the TII definition, modifications have recently been proposed to replace TII with UART and USB interfaces so that popularly accepted RS-232, RS-485, and USB serial communication protocols can be directly used in smart transducers (Wiczer, 2004). The NCAP functions as a gateway between a network structure and the STIM. It accesses the STIM transducer data on one side via the TII interface and accesses the network resources on the other side. The TII and the NCAP together provide a network-enable and networkindependent capability for smart transducers. The 1451.1 standard specifies an information model for the NCAP in an object-oriented fashion. This model defines methods for application level accesses to network resources and transducer hardware, encompassing a set of object classes, attributes, methods, and behaviors that provide a concise description of a transducer and the network to which it may connect (IEEE, 1999a). The 1451.3 standard specifies a method for connecting multiple, physically separated transducers in a multi-drop configuration (IEEE, 1999b). The 1451.4 standard defines a mixed mode interface specification for analog transducers with both analog and digital operating modes (IEEE, 1999c). 3. IEEE 1451 and ISO 11783 Transducer manufacturers are the best experts on the performance and specifications of their products. However, these manufacturers usually do not have expertise in high-level software programming and computer networking, including CAN and the ISO 11783 standard. System integrators, on the other hand, are usually large manufacturers, which use OEM products and assemble them into sophisticated machinery systems. System integrators in the agricultural machinery area usually possess expertise in CAN and associated standards. However, they typically do not have deep understanding and detailed information on various transducers used in their systems. Using the smart transducer concept, the transducer manufacturers would no longer need to have expertise in network communication. They can concentrate on the development of STIMs, including the TEDS, for their specific products. On the other hand, it is not difficult for the system integrators to implement a CAN-based NCAP as they have a strong background in CAN network and ISO 11783 standards. Once a CAN-based NCAP becomes available, the system integrators can easily connect any smart transducer modules (STIM) that conform to the IEEE 1451 standards into the system. Therefore, the IEEE 1451 standards provide an efficient approach to clearly divide the tasks between the transducer manufactures and the system integrators so that both parties can take advantages of their strengths while avoiding their weaknesses. The ISO 11783 standard defines interconnections among different implement controllers. The IEEE 1451 standards define connections between transducers and implement controllers. Thus, using the ISO 11783 standard in conjunction with the IEEE 1451 standards may provide a comprehensive solution for integration of embedded systems designed for various precision agriculture applications.

J. Wei et al. / Computers and Electronics in Agriculture 48 (2005) 245–255

249

4. Design of an IEEE1451-conformant STIM In a previous study (Wang et al., 2001), our research group designed two weed sensors, each using six phototransistors. Five of the phototransistors were covered with band-pass filters with central wavelengths of 496, 546, 614, 676, and 752 nm, respectively. The sixth phototransistor did not have a filter. The sensors detected weeds in wheat field based on spectral reflectance characteristics of weeds, wheat, and soil. Statistical classifiers were developed using field calibration data to detect weeds with an accuracy of higher than 80%. In this study, one of the weed sensors (weed sensor 0) was maintained unchanged, whereas the second weed sensor (weed sensor 1) was modified to become IEEE 1451conformant. Both sensors are connected to a CAN bus, together with a Field-Star virtual terminal (VT) (AGCO Corporation, Duluth, GA), which is used primarily for user interface (Fig. 2). Weed sensor 1 consists of an NCAP and a STIM. The core of the NCAP is a C167CR microcontroller (Infineon Technologies). The core of the VT is a Motorola MC68332 microcontroller (AGCO Corporation, 2002). These controllers communicate with each other following the LBS (“Mobile Agricultural Bus” in German) Standard. The LBS Standard is also known as the DIN 9684 Standard and it is one of the predecessors of the ISO 11783 standard (Deutsches Institut f¨ur Normung, 1998). The ISO 11783 and the LBS standards are similar in system architecture, network management, and message-set definition for implement controllers. However, they differ in CAN identifier usage: the ISO 11783 uses

Fig. 2. System architecture.

250

J. Wei et al. / Computers and Electronics in Agriculture 48 (2005) 245–255

29-bit identifiers, whereas the LBS uses 11-bit identifiers. The LBS standard was used in the system because it was the standard used in the Field-Star VT module. The core of the STIM is a single-chip, ADuC812 Microcontroller (Analog Devices, Norwood, MA), which features a 8051-compatible processor, 256 bytes of Random Access Memory (RAM), 8 kB of program flash Electrically Erasable Programmable Read-only Memory (EEPROM), 640 bytes of data EEPROM, up to 32 programmable input/output (I/O) lines, an SPI serial port, a dual-channel DAC, and an 8-channel, 12-bit ADC. These features closely match the following required functionalities of the STIM. • The transducer interface of STIM can be mapped into the ADC, DAC, and digital I/O lines of the ADuC812. • The STIM is controlled by the 8051 processor from the program EEPROM. • The channel data and the status/control registers of the STIM are stored in the RAM area. • The TEDS is mapped into the 640 bytes of the data EEPROM. • The TII is a superset of the SPI port.

5. STIM software design The STIM program flow is shown in Fig. 3. After initialization, the STIM functions like a data source server. The STIM checks the TII interface for either a data transport request or a transducer trigger request from the NCAP. For a data-transport request, the STIM decodes

Fig. 3. Flow chart of the STIM software.

J. Wei et al. / Computers and Electronics in Agriculture 48 (2005) 245–255

251

the function address, which indicates the type of function requested and the channel address. Commonly used functions include reading channel transducer data, reading various types of TEDS data, and reading channel status. In the modified smart weed sensor (Weed sensor 1), there are six analog channels (address 1 through 6), each corresponding to a phototransistor. Channel address 0 is used to indicate all six channels. Based on the function requested and the channel address, the STIM invokes corresponding service routines. For a transducer trigger request, the STIM takes a sample measurement in a specified channel, which was previously determined through the data transport request. The triggering operation is simple and fast; thus, the timing of sensor triggering can be precisely controlled by the NCAP. If, during the service, an error is detected on any of the transducer channels (e.g., an error on “sensor reading out of range”), the STIM sets an appropriate flag in the channel status register. After completing the data transport and triggering service, the program would then check the STIM status flags. Status flags indicating errors might cause the STIM to assert the interrupt signal line of the TII interface to inform the NCAP, which, in most cases, would read out the STIM status and respond with appropriate actions. Because the STIM usually works in a passive mode, most activities are initiated from the NCAP. The interrupt signal line, together with the status registers, provides a means for the STIM to actively request a service from the NCAP. Because the transducer’s status is self-registered in the STIM, it provides a capability of self-diagnosis. If no error is detected, the STIM would check the TII interface again for a data transport request or a transducer trigger request (Fig. 3).

6. TEDS design For the STIM of weed sensor 1, Meta TEDS, Channel TEDS, and Calibration TEDS were developed. The Meta TEDS is a mandatory TEDS, which contains data that describe the STIM in general, such as software revision level, a unique STIM identifier, worst case timing values, and number of implemented channels. The Channel TEDS defines channel data type (integer, float, double, etc.), physical unit in SI, upper and lower limits, timing restrictions, and other information that is needed to fully describe the function of a transducer channel. Meta TEDS and channel TEDS are available at the compilation time, and are loaded when the program codes are stored in the flash memory. Calibration TEDS, on the other hand, is obtained during the run-time, when an on-line transducer calibration is conducted. The IEEE 1451 standards specify a calibration function using a set of multinomial equations, each having the best statistical fit with the calibration data within a segment of the measurement range (IEEE, 1999b). For example, the light sensor in the STIM uses a simple linear calibration equation to convert the voltage signal derived from a phototransistor and its signal conditioning circuit in each channel to a digital output with a unit of candela. Only one segment is used within the measurement range. It should be noted that the calibration method specified in the 1451.2 standard not only applies to sensors, it also applies to actuators. For actuators, control commands generated by the NCAP are converted to analog, digital, or pulse control signals to activate actuators connected in specific channels using the calibration equations specified for these channels. As an example to describe the TEDS table, content of the calibration TEDS of the smart weed sensor is shown in Table 1. The first field in the table indicates the total length of the

252

J. Wei et al. / Computers and Electronics in Agriculture 48 (2005) 245–255

Table 1 Contents of Calibration TEDS for channel 5 of the light sensor No.

Field name

Field length (bytes)

Content

Explanation

1 2

Calibration TEDS length Last calibration date-time

4 4

3

Calibration interval

4

38 1032699131 (10:05:31, 9/20/2002) 31536000 (1 year)

4

1

1

1

5

Channel number for calibration

1

0

0 for sensors and 1 for actuators

7

Number of correction input channels Connection input channel list Direction of the calibrated channel Channel degree list

Length of this table in bytes Last calibration time (UTC), as the number of seconds since 00:00:00 on January 1, 1970 Length of time, in seconds, this channel can operate without another calibration Number of input channels used

4

1

8

Number of segments list

1

1

9

Segment boundary values table

4

0

4

1023

4

0

Order of linear regression calibration models Number of segments used in piecewise linear regression Lower limit of the segment in LSB Upper limit of the segment in LSB Segment offset

4

25.3

4

704.8

2

9784

5 6

10 11

12

Segment offset values table Coefficients

Checksum for calibration TEDS

Intercept of the linear regression model Slope of the linear regression model NCAP can verify the correctness of TEDS with this information

TEDS table (in bytes). This informs the NCAP of the total number of bytes to be expected when reading the TEDS. The last field is the “checksum” for the entire table, with which the NCAP can verify the correctness in transmission of the table content. These two fields are also included in other TEDS, such as meta TEDS and channel TEDS. The second and third fields of the calibration TEDS indicate the time when the last calibration was conducted and the effective duration of current calibration. Field 4 indicates the number of channels involved in the calibration. This number ranges from 0 to 255. The most commonly used number is one. If this number is greater than one, readings from several sensors can be “fused” to generate a digital signal if these channels are for sensors, and several actuators can be activated from the same control commend issued by the NCAP if these channels are for actuators. Field 5 lists the channels involved. Field 6 indicates whether the calibrated channel is connected to a sensor or an actuator. Field 7 indicates the order of the multinomial regression equation. Field 8 gives the number of segments used in the calibration model. Fields 9–11 gives the parameters needed to define the multinomial calibration equation for segment 1, including the boundary values (Field 9), the offset value

J. Wei et al. / Computers and Electronics in Agriculture 48 (2005) 245–255

253

(Field 10), and the coefficients of the multinomial equation (Field 11). Fields 9–11 would repeat for additional segments.

7. Discussion The sensing part and the weed-recognition algorithm used for weed sensors 0 and 1 are identical. Performance of the two sensors also was identical, despite the difference in their structures. Both sensors successfully communicated with the VT without transmission errors. Both also successfully accomplished the task of classifier training and real-time, infield weed detection. The TII interface had a throughput of 469 data transfers per second, which was much higher than the required weed detection rate (10 Hz). Thus, no algorithm delay caused by the STIM and TII was observed in weed sensor 1. Adding an STIM to raw sensors would increase the cost. However, several advantages of the smart transducer concept may help offset the cost increase, especially when low-cost microcontrollers are used and the smart sensors are being put in mass-production. (1) The STIMs provide signal conditioning and processing functions to various sensors. Thus, outputs of the sensors are digital signals with physical units, which greatly reduce the tasks of system integrators. (2) The TEDS in the STIM provides the capabilities of self-recognition and selfdocumentation for a smart transducer. ECUs obtained from different vendors can recognize the functions, usages, and specifications of the transducer, including software revision level, number and type of sensors, channel addresses, data types, physical units, signal ranges, calibration models, and time when last calibration was conducted, by reading its TEDS. These self-recognition and self-documentation features would allow easy implementation of plug-and-play for the IEEE1451-conformant sensors. (3) Because an STIM can handle up to 255 sensor channels, sensors located in a close neighborhood may share the same STIM, and thus, reducing the number of STIM needed. This also would allow implementation of various sensor-fusion algorithms. Experience gained from the modified weed sensor showed that design of the STIM and TII interface is rather straightforward. Current discussion on using RS-232, RS-485, and USB to access the STIM may further enhance the 1451.2 standard (Johnson and Woods, 2002) and further simplify the design procedure. For the smart weed sensor developed in this study, the STIM was designed to fully comply with the IEEE 1451.2 standard. For the NCAP, however, only the software module that handles the TII interface was implemented in accordance with the IEEE 1451.1 standard. The networking part of the NCAP for CAN bus connection was only partially implemented based on the standard. The NIST has developed an IEEE 1451.1-conformant NCAP for Ethernet (Schneeman, 1999). However, up to date, no commercial CAN-based NCAP has become available (Personal communication with Dr. Rick Schneeman of NIST in June 2002). This study can be considered the first attempt to developing an IEEE1451-conforming NCAP for CAN. The availability of CAN-based NCAPs would provide a versatile tool to facilitate integration of many precision agricultural applications.

254

J. Wei et al. / Computers and Electronics in Agriculture 48 (2005) 245–255

8. Summary and conclusions In this paper, we reviewed the essence of the IEEE 1451 smart transducer standards and its relationship with the ISO 11783 standard. We also reported a successful implementation of a smart weed sensor that conforms with the IEEE 1451 standard and the LBS standard, a predecessor of ISO 11783. The implementation demonstrated that the IEEE 1451 standards can be integrated with agricultural bus standards to provide a flexible solution for integration of embedded systems applied to precision agriculture. The smart transducer concept extends the modular design approach from the CAN node level to the transducer level. At the CAN node level, implement controllers made by different manufacturers can be “plugged” into a CAN bus that conforms to the ISO 11783 standard and immediately start to “play”. At the transducer level, on the other hand, various types of sensors and actuators made by different manufacturers can be “plugged” into the implement controllers that conform to the IEEE 1451 standards and start to “play”. Thus, combined use of the IEEE 1451 and ISO 11783 standards may provide complete plug-and-play capabilities for sensors, actuators, and implement controllers for system integration. As precision agriculture technology advances, modular design, and plug-and-play capabilities have become a future trend that would be appreciated by sensor manufacturers, system integrators, as well as farmers. Introducing the IEEE 1451 smart transducer standards may prove to be a major help to speed up further development of precision agriculture technologies. Acknowledgements The authors would like to thank the AGCO Corporation for providing hardware. The authors also would like to acknowledge the technical assistance provided by Dickey-John Corporation and National Institute of Standards and Technology. References AGCO Corporation, 2002. FieldStar, the Science of Agriculture, Virtual Terminal User’s Guide. Publication No. 79015206 (English). February 2002, Duluth, GA. Deere & Company, 2001. Electrical/Electronic Certification. Deere & Company, Moline, IL. Deutsches Institut f¨ur Normung, 1998. Landmaschinen und Traktoren-Schnittstellen zur Signal¨ubertragungInitialisierung. Beuth Verlag, Berlin, Germany. IEEE, 1997. IEEE Standard for a Smart Transducer Interface for Sensors and Actuators—Transducer to Microprocessor Communication Protocol and Transducer Electronic Data Sheet. IEEE standard 1451.2. The Institute of Electrical and Electronics Engineers, Inc. 345 East 47th Street, New York, NY. IEEE, 1999a. IEEE Standard for a Smart Transducer Interface for Sensors and Actuators—Network Capable Application Processor (NCAP) Information Model. IEEE standard 1451.1. The Institute of Electrical and Electronics Engineers, Inc. 345 East 47th Street, New York, NY. IEEE, 1999b. IEEE Draft Standard for a Smart Transducer Interface for Sensors and Actuators–Digital Communication and Transducer Electronics Data Sheet (TEDS) Formats for Distributed Multidrop Systems. IEEE Draft Standard P1451.3. The Institute of Electrical and Electronics Engineers, Inc. 345 East 47th Street, New York, NY.

J. Wei et al. / Computers and Electronics in Agriculture 48 (2005) 245–255

255

IEEE, 1999c. IEEE Draft Standard for a Smart Transducer Interface for Sensors and Actuators-Mixed Mode Communication Protocols and Transducer Electronic Data Sheet (TEDS) Formats. IEEE Draft Standard P1451.4. The Institute of Electrical and Electronics Engineers, Inc. 345 East 47th Street, New York, NY. ISO, 2001. ISO 11783: Tractors and Machinery for Agriculture and Forestry–Serial Control and Communications Data Network. International Organization for Standardization, Geneva, Switzerland. Johnson, R., Woods, P., 2002. Proposed Enhancement to the IEEE1451.2 Standard for Smart Transducers. Available at: http://www.sensorsmag.com/events/index.htm. Accessed on 27 January 2003. Johnson, R., 1997. Building Plug-and-Play Networked Smart Transducers. EDC research paper. Electronics Development Corporation, 9055F Guilford Road, Columbia, MD. Schneeman R., 1999. Implementing a Standards-based Distributed Measurement and Control Application on the Internet. Technical Report US. Department of Commence, National Institute of Standards and Technology, Gaithersburg, MD 20899, USA. Wang, N., Zhang, N., Dowell, F., Sun, Y., Peterson, D., 2001. Design of an optical weed sensor using plant spectral characteristics. Trans. ASAE 44 (2), 409–419. Wei, J., 2003. Modular Design of Embedded System For Precision Agriculture. Doctoral dissertation, Kansas State University. Wiczer, J., 2004. IEEE 1451.2 Standard for a Smart Transducer Interface for Sensors and Actuators. In: A Presentation at the Sensors Expo & Conference, June 7–10, 2004, Detroit, MI. Wynn, R., 2000. Plug-and-Play Sensors. National Instrument technical paper. National Instruments, Austin, TX.