Precision Farming and Linux: An Expose

Farming is not a place one would expect to fine Linux, but there it is. Mr. Haverland tells us how Linux is used in this unusual area.
Adventures in Analysis

Precision farming is filled with analytical adventure. Conventionally, precision farming starts with a map of crop yield from the field. To acquire this map, we put a DGPS receiver on some known location on the combine harvester, and a yield monitor somewhere in the path grain takes from entering the header to the clean grain tank. (The closer this is to the threshing part of the combine, the shorter the throughput delay time.)

Position Information

The DGPS antenna is fixed on some point on the combine harvester, usually the cab roof. The grain is removed from the field along the leading edge of the header, i.e., a line segment remote from the point where the GPS antenna is. If we are interested in only coarse resolutions, the difference between the GPS receiver location on the leading edge of the combine header is not important. At fine resolutions, we do need to make this correction, and in order to make it, we need to know the orientation of the vehicle in 3-D space. This information is not currently collected—it must be calculated later.

Velocity Information

Combine harvesters typically move at about two meters per second. With high accuracy DGPS equipment, errors are typically on the order of 10cm. This results in velocities having errors on the order of 10%. GPS position errors are highly correlated in time. Events called “blunders” can occur, which result in relatively huge position errors. Once a blunder has occurred, its presence may live on for several seconds. This results in two huge velocity errors on either end of a “short” track of biased position estimates.

Combine harvesters usually operate under the conditions of constant mass and wheel power traveling in straight lines. (This means the position as a function of time must be twice continuously differentiable. The only places where third and higher order derivatives can exist are on corners. This information can be used to help smooth the position information.) Therefore, we should be able to use low-order polynomials or splines to smooth the position as a function of time data.

Digital Elevation Models (DEMs)

If one assumes the vehicle is always traveling in a forward direction and there is no side slip of the wheels, it is possible to calculate the orientation of the vehicle in space. However, if one has an available model of the elevation as a function of position in the field, they can obtain a much better estimate of the surface normal to the ground.

Stereo photography is one way to obtain a DEM. Another is to start from GPS position information and correct it for the GPS receiver mounting position and the vehicle's geometry and orientation in space.

The DEM is quite useful, as landscape is one of the contributing factors in crop yields. For example, during a wet year, low-lying concave parts of the field are typically too wet to produce good crops. Another example is lower yields on high-elevation convex hilltops during dry years. The DEM is most useful when it is interpreted with terrain analysis and combined with crop yield and other data sets in a GIS. Sometimes (more often than desired) precision farming requires new and specialized procedures.

Yield Time Lags

Basically, the time it takes for the crop to travel from the leading edge of the combine header to the yield sensor is not a single, unique value. Some of the crop takes a relatively short time, and some takes longer. This process smears and averages crop yield over a period which is typically 25 seconds long.

Linux and Open Source Software

Linux is a good platform for doing this research-oriented work. Much of the analysis can be translated into such mainstream topics as signal processing or multi-dimensional statistics. Some of the best software for exploring software in these topics is the product of government and university research and is “free”--an important quality in tight budgets. GRASS, xldlas and Santis are three packages which have helped in precision farming.

Perl has also proven itself to be quite useful. Our participation in precision farming has lasted six years now. Several kinds of GPS equipment and yield monitors have been used, even updates of individual systems. Of course, everybody has to have his own “standard” data format. Our method of analyzing the data evolves, which for us means re-analyzing the previous year's data with the current best method. This results in many format changes in data—an area where Perl excels. The ability to use pseudo-ttys in Perl has been useful when it was necessary to change coordinate systems on thousands of data points using GRASS programs.

One area which has not seen a lot of development is the safe storage of data. A farmer does not want to discover that the data is not “on the card” after he has harvested a crop—this has been known to happen. Using radio modems to transmit the data to a home computer would be one way of avoiding this situation.