Introduction

The monitoring of bunch development and of within-bunch variations in grape composition during on-vine ripening is an essential part of ensuring high-quality wines; winemakers nearly always identify uniform batches of good-quality fruit as their main priority (Bramley 2005).

Since grape heterogeneity may influence final wine composition and quality, it should be carefully evaluated at harvest (Kontoudakis et al. 2011). At any given date, the physiological characteristics of grape berries in a vineyard may vary considerably (Torchio et al. 2010).

It is equally important for winemakers to be aware of the factors influencing harvest timing, many of which are beyond their control. Among the major factors are weather conditions: seasonal variations including heat waves and sudden heavy rains can be extremely detrimental to plant health and may lead to over-ripening, thus impairing final wine quality (Ruíz-Hernández 2001).

At present, grape ripeness is mostly evaluated by laboratory analysis, using traditional physical/chemical methods to test representative grape samples obtained at regular intervals throughout the ripening period (Krstic et al. 2003; Iland et al. 2004). Analysis is aimed primarily at measuring sugar content, titratable acidity and malic acid content; secondary measurements include pH, 100-berry weight and tartaric acid content. The sample used has to be representative, i.e. it should provide the results that would be obtained if the whole plot were to be harvested at the same time (Blouin and Guimberteau 2000). In order to ensure representativity, measurements should be made on bunches selected alternately from sunny and shady positions and on berries taken from the outer and inner areas of the bunch (Moreno and Peinado 2010). However, laboratory analysis is still something of a bottleneck for the proper estimation of grape status, and there are a few published studies on variations in grape composition within a single bunch, due largely to data-collection constraints (Ben Ghozlen et al. 2010).

Visual inspection of bunches throughout ripening and up until harvest shows that berry colour changes considerably as a function of bunch position on the vine; even within a single bunch, berry colour may vary substantially depending on the degree of exposure to the sun (Blouin and Guimberteau 2000). Moreover, sugar content is highest on grapes growing higher on the bunch, close to the stalk, and gradually declines down the bunch; acid content displays the reverse pattern (Hidalgo 2006).

Of the various analytical techniques available, near-infrared (NIR) spectroscopy has shown considerable potential for the non-destructive measurement of internal attributes and ripeness in fruits (Nicolaï et al. 2007; Sánchez and Pérez-Marín 2011). Over the last few years, moreover, the development of handheld near-infrared devices has enhanced the potential of NIR spectroscopy for the in situ monitoring and analysis of the fruit ripening process (Pérez-Marín et al. 2009; Sánchez et al. 2011).

However, no published studies have yet focused on the use of miniaturised, handheld, near-infrared devices based on micro-electro-mechanical system (MEMS) technology in grapes as a means of characterising variations in on-vine ripening as a function of grape position and bunch orientation, with a view to optimising harvesting times and thus enabling selective harvesting depending on the type of wine to be made. This was the purpose of the present study.

Materials and Methods

Grape Sampling During Ripening

The experiment was carried out in 2008, in a vineyard belonging to the Agricultural Research and Training Centre in Cabra (Cordoba, Spain). Two grape (Vitis vinifera L.) varieties were selected: one white (cv. Pedro Ximénez) and one red (cv. Cabernet Sauvignon), both grown under regulated deficit irrigation. For each variety, two bunches were selected from each of six selected vines, giving a total of 24 bunches (12 white and 12 red). Bunches were labelled and analysed by NIR spectroscopy on the vine throughout the ripening process.

Spectrum collection started on 20 August. On-vine measurements were made every 3 or 4 days (except for the second measurement, which was made 6 days after the first) until harvest (9 Sept); a total of six measurements were made during the ripening process. NIR spectra were captured from samples taken from selected bunches using the handheld MEMS spectrometer; bunches from adjacent vines were then collected for physical–chemical analysis, in order to provide reference values for the properties measured. On arrival at the laboratory, grapes were promptly placed in refrigerated storage at 0 °C and 95 % relative humidity. Prior to each physical–chemical measurement, samples were allowed to stabilise at laboratory temperature (25 °C).

Spectra Collection

Spectra were collected on grapes in reflectance mode (log 1/R) using a handheld MEMS spectrometer (Phazir 2400, Polychromix, Inc., Wilmington, MA, USA). The Phazir 2400 is an integrated near-infrared handheld analyser that incorporates all the essential components to deliver on-vine applications (Geller and Ramani 2005). The spectrophotometer scans at 8-nm intervals (pixel resolution, 8 nm and optical resolution, 12 nm), across a range of NIR wavelengths from 1,600 to 2,400 nm. Sensor integration time is 600 ms.

Each of the twelve bunches selected for each variety was divided into three areas (high, middle and low), and four spectra were captured for each area to reflect orientation (north, south, east and west).

Since measurements were made on the vine, sample temperature was not controlled beforehand; mean temperature on measurement days ranged from 22 to 29 °C. Spectral acquisition was performed in sunlight, i.e. no light-tight box was used.

Reference Data Analysis

Immediately after sampling, berries from adjacent vines were weighed on an electronic balance (0–320 ± 0.0001 g; model C600-SX, Cobos, Barcelona, Spain) to determine the average 100-berry weight. Samples were then analysed for soluble solids content, reducing-sugar content, pH value, titratable acidity, tartaric acid and malic acid contents.

For this purpose, berries were passed through a hand-operated food mincer, which enabled constant pressure to be maintained during juice extraction with minimal seed and skin shearing. The must was then centrifuged (Centronic 7000577, Selecta, Barcelona, Spain) to remove suspended solids. Soluble solids content (°Brix) were measured using an Abbé-type refractometer (model B, Zeiss, Oberkochen, Würt, Germany). Reducing sugar content was measured by titration using an automatic titrator (Crison Micro TT 2050, Crison, Alella, Barcelona, Spain), using a modification of the Rebelein method (Rebelein 1971). Results were expressed as grams per litre. Must pH value and titratable acidity were measured using an automatic titrator (Crison Micro TT 2050, Crison, Alella, Barcelona, Spain); titratable acidity was measured by titration with 0.1 NaOH to an end point of pH 7.0. Results are expressed as grams per litre of tartaric acid (OJEU 2005). Tartaric acid was measured with a HP 8452 spectrophotometer (Hewlett Packard Corporation, Palo Alto, California, USA) as previously described by Rebelien (1969) and expressed as grams per litre of tartaric acid. Malic acid was measured using a portable RQflex reflectometer (model 16970, Merck Co., Darmstadt, Germany) using the enzyme method (MAPA 1993). Results were expressed as grams per litre of malic acid.

Data Processing

Chemometric analysis was performed using the Unscrambler software package version 9.1 (CAMO ASA, Oslo, Norway) and the WinISI II software package version 1.50 (Infrasoft International, Port Matilda, PA, USA).

Principal component analysis (PCA) was used to reduce the dimensionality of the data to a smaller number of components, to examine any possible grouping and to visualise the presence of outliers (Massart et al. 1988; Naes et al. 2002). PCA analysis was performed using the Unscrambler software. Pre-treatments consisted of Savitzky–Golay first derivative with a gap of six.

The PCA scores represent the weighted sums of the original variables without significant loss of useful information, and loadings (weighting coefficients) were used to identify major variables responsible for specific features appearing in the scores.

Scores for the first principal component (PC1) were subjected to one-way analysis of variance (ANOVA), using grape position, bunch orientation and the various ripening stages as factors. Means were compared using Tukey’s test at P = 0.05.

All data were analysed using the Minitab statistical software package version 15.1 (Minitab Inc., State College, Pennsylvania, USA).

Development of NIRS Classification Models

Discriminant models were constructed to classify grapes by ripening stage throughout the ripening process, using partial least squares discriminant analysis (PLS-DA) for supervised classification. Specifically, the PLS2 algorithm was applied, using the “discriminant equations” option in the WINISI II version 1.50 software package (ISI 2000).

Briefly, PLS-DA uses a training set to develop a qualitative prediction model which may subsequently be applied for the classification of new unknown samples. This model seeks to correlate spectral variations (X) with defined classes (Y), attempting to maximise the covariance between the two types of variable. In this type of approach, the Y variables used are not continuous, as they are in quantitative analysis, but rather categorical “dummy” variables created by assigning different values to the different classes to be distinguished (Naes et al. 2002).

In order to construct discriminant models to classify bunch spectra by ripening stage, six measurement dates during the ripening process were established for each variety. A total of 12 mean spectra (6 vines × 2 bunches) were thus obtained for each of the six dates analysed. The mean spectrum for each bunch was obtained by averaging the 12 spectral measurements made for that bunch (3 positions × 4 orientations). Spectral variations were correlated with the six categories established.

All models were constructed using full cross-validation (leave-one-out), suitable for small sample sets (Naes et al. 2002). A combined standard normal variate and detrending treatment was applied for scatter correction (Barnes et al. 1989), and four derivative mathematical treatments were tested in the spectral region 1,600–2,400 nm: 1,5,5,1; 2,5,5,1; 1,10,5,1; and 2,10,5,1, where the first number denotes the derivative order, the second denotes the number of data points in the segment used to calculate the derivative and the third and fourth numbers denote the number of data points over which running-average smoothing was conducted (Shenk and Westerhaus 1996).

A one-way ANOVA was subsequently performed for reducing-sugar content, an excellent indicator of the optimum harvesting time depending on the type of wine to be made, using ripening stage as factor. Means were compared using Tukey’s test at p = 0.05.

On the basis of the results obtained, ripening stages were grouped and new discriminant models were constructed to classify those bunches which could be harvested simultaneously for making a given type of wine.

Results and Discussion

Physical–Chemical Analysis

Physical–chemical changes taking place in adjacent grapes during on-vine ripening are shown in Table 1. A relatively wide range was covered for reducing-sugar content (165.99–211.19 g/l for white and 219.05–268.80 g/l for red grapes) since sampling was carried out simultaneously for the two varieties throughout the ripening process.

Table 1 Physical–chemical changes in ‘Pedro Ximénez’ and ‘Cabernet Sauvignon’ adjacent grapes during ripening

Towards the end of veraison, a rapid berry-growth phase is observed due to cell enlargement prompted by the swift development of grape physical–chemical characteristics (Table 1). This is accompanied by a progressive increase in reducing-sugar content in vine shoots, leaves and fruits (Reynier 2003). Sugar content increases very rapidly in the berry during ripening, but the rate of increase slows down as ripening progresses, and stabilises at the moment of full ripeness; absolute values may even fall thereafter when the berry becomes overripe (Hidalgo 2006.)

Although the two varieties clearly differed in 100-berry weight and thus in berry size, trends over the ripening period were very similar. Red grape varieties tend to have a greater number of berries per bunch, thus favouring the steeping process during alcoholic fermentation, and 100-berry weight is considerably lower than for white varieties (Table 1).

Analysis of reducing-sugar content showed that ‘Pedro Ximénez’ grapes exhibited a ripening pattern different from that of ‘Cabernet Sauvignon’ grapes: at the start of the study, which was performed simultaneously for the two varieties, ‘Cabernet Sauvignon’ grapes were already approaching the final stage of ripeness, and sugar accumulation during the study period was comparatively slight. By contrast, ‘Pedro Ximénez’—a later variety—displayed the typical rise in reducing-sugar content during the early stages of ripening, although the last two measurements were affected by rainfall, and the ripeness levels expected for making Fino wines in the Montilla-Moriles region (Córdoba) were not in fact attained.

The optimal harvesting time for ‘Cabernet Sauvignon’ grapes used for making high-quality red wines is based on an optimal balance of sugar content, colour, aromas and acidity. The best time for harvesting ‘Pedro Ximénez’ grapes, used for making high-quality young white wines, is the point of maximum aroma and acidity; this is usually achieved by earlier harvesting (Martínez-Valero et al. 2001). However, the same variety is also used for making Fino wines, for which the main requirement is a high reducing-sugar content (above 244 g/l); this is achieved by later harvesting. In order to determine the optimal harvesting time, it is therefore essential to analyse bunch ripening with a view to charting changes in major components.

Fluctuations in acidity-related parameters (titratable acidity, tartaric and malic acid content) were due to a decline in grape acidity during ripening, as a result of the migration or consumption and dilution of these two predominant acids (Blouin and Cruege 2003). After veraison, tartaric acid content decreased only slightly, remaining virtually constant for both varieties, since variations in temperature during the ripening period were offset by vine water availability (Table 1). High temperatures tend to prompt increased respiratory combustion of tartaric acid, while the presence of moisture increases the levels of this acid in the bunch (Hidalgo 2006). By contrast, malic acid levels fell steadily throughout ripening, displaying a more marked decline when external temperatures were higher (López et al. 2009) (Table 1).

Influence of Position, Orientation and Ripening Stage on Bunch Ripeness

Principal component analysis was performed to examine the relationship between the various configurations of bunch orientation and grape position and ripening stages and the spectral measurements recorded during on-vine ripening of red and white grapes.

Score plots for ‘Pedro Ximénez’ grapes are shown in Fig. 1. The first two principal components accounted for a high degree of variance (80.18 and 6.47 %, respectively). In these plots, no grouping of samples by grape position (high, middle and low), by bunch orientation (north, south, east and west) or even by ripening stage (stages 1 to 6) were apparent.

Fig. 1
figure 1

Principal component analysis for bunch configuration during ripening in ‘Pedro Ximénez’ grapes

For ‘Cabernet Sauvignon’ grapes (data not shown), the first two principal components together accounted for 93.28 % of total variance; PC1 accounted for 86.13 % and PC2 for 7.15 %. Analysis revealed no apparent grouping by position, orientation or ripening stage.

Loadings (weighting coefficients) for the two first principal components (Fig. 2) in both grape varieties showed that the key wavelengths for distinguishing between ripening stages were associated with the first sugar-related overtone at around 1,750 and 2,067 nm and with water peaks at around 1,900 and 1,970 nm (Williams 2001).

Fig. 2
figure 2

X-loading weights for ‘Pedro Ximénez’ and ‘Cabernet Sauvignon’ grapes during ripening process

A statistical analysis was carried out in order to identify possible significant differences attributable to these three factors in both varieties throughout ripening. One-way ANOVA was performed on the first principal component for ‘Pedro Ximenez’ grapes—which accounted for over 80 % of variance in the sample set—taking orientation, position and ripening stage as factors (Table 2). Significant differences (p < 0.05) were found for all three factors: bunch orientation accounted for 2.77 % of total variance in the first principal component, grape position for 1.90 % and ripening stage for 17.35 %. Tukey’s test distinguished the behaviour of east-facing bunches from that of bunches facing in other directions; the test also revealed significantly different behaviour (p < 0.05) for grapes high on the bunch, compared with those in central or lower positions. Statistical analysis enabled three ripening stages to be distinguished (p < 0.05): stages 1, 2 versus stages 3, 4 and versus stages 5, 6.

Table 2 Analysis of variance of the first principal component mean scores for raw spectra of whole bunches of ‘Pedro Ximénez’ grapes during ripening

For ‘Cabernet Sauvignon’ grapes, the ANOVA revealed no significant differences (p > 0.05) for the factors bunch orientation and grape position, which accounted for 0.40 and 0.01 %, respectively, of variance; ripening stage, by contrast, accounted for 28.82 % of total variance for the first principal component, with significant differences between stages (p < 0.05). Tukey’s test for ripening stage enabled the following stages to be distinguished: stage 1; stage 2; stage 3 and stages 4, 5, 6 (data not shown).

A new PCA was then performed using the mean spectrum for each ripening stage (Fig. 3). Components PC1 and PC2 accounted for 93.72 and 4.0 %, respectively, of the variance in the NIR spectra range (1,600–2,400 nm) for white grapes, and for 97.90 and 1.62 % in the case of red grapes. PC1 mainly illustrated bunch development over the ripening period while PC2 may be related to bunch reducing-sugar content.

Fig. 3
figure 3

Principal component score plot based on average spectra for each stage of ripening in ‘Pedro Ximénez’ and ‘Cabernet Sauvignon’ grapes. Arrows indicate ripening process

Discriminant Analysis for Classification by Ripening Stage

The ability of NIR technology to distinguish and thereby classify grape bunches by ripening stage using PLS-DA is shown in Table 3. The classification results are shown in the form of a confusion matrix. Numbers of correctly classified ripening stages are shown on the diagonal, whereas off-diagonal numbers denote misclassifications.

Table 3 Classification results by PLS discriminant analysis at different ripening stages for ‘Pedro Ximénez’ and ‘Cabernet Sauvignon’ grapes

The models correctly classified 81 % of white grapes and 86 % of red grapes while the percentage of correctly classified samples by group was greater than 75 % in all representative groups, except for the 4th and 3rd stages (67 %) in ‘Pedro Ximénez’ and ‘Cabernet Sauvignon’ grapes, respectively.

The results achieved with these discriminant models may be considered satisfactory, although they did not classify bunches by ripening stage with sufficient precision to enable selective harvesting at the optimal time depending on the type of wine to be made, largely because rainfall during ripening affected reducing-sugar content and thus the alcoholic strength of the future wine. For that reason, ANOVA and Tukey’s test were performed using reducing-sugar content as factor; this parameter has proved to be an excellent indicator of the optimal time for harvesting. The aim was to group ripening stages, in order to identify the grouping that best indicated optimal harvesting times for the making of different types of wine using the varieties studied.

For white grapes, statistical analysis succeeded in reducing the number of groups from six to four: values for reducing-sugar content were similar at ripening stages 2 and 6 (Table 1) so these were merged in Tukey’s test. The same applied to stages 3 and 4. The merging of stages 2 and 6 may be attributed to weather conditions: rainfall led to water absorption in stages 5 and 6, increasing berry weights. Increased water content in turn prompted a drop in reducing-sugar levels (Table 1).

When the same procedure was applied to red grapes, Tukey’s test reduced the number of groups from six to three, reflecting a difference in the behaviour of reducing-sugar content with respect to white grapes (Table 1). Stages 2, 5 and 6 were merged into one group, and stages 3 and 4 into another, leaving stage 1 alone in its group. This grouping by reducing-sugar levels can again be attributed to rainfall prior to the measurement of stage 5.

The results obtained with the best classification models, using PLS-DA and various mathematical treatments, for predicting the optimal time for harvesting depending on the type of wine to be made are shown in Table 4.

Table 4 Classification results by PLS discriminant analysis for reducing-sugar content in ‘Pedro Ximénez’ and ‘Cabernet Sauvignon’ grapes

The models correctly classified 88 % of white grapes and 88 % of red grapes while the percentage of correctly classified samples by group was greater than 83 % in all representative groups, except for the 3rd stage in ‘Cabernet Sauvignon’ grapes (79 %).

These classification results were better than those obtained earlier (Table 3), both generally and individually, for both varieties. In the case of ‘Pedro Ximénez’ grapes, bunches could be distinguished by ripening level as: insufficiently ripe (1), optimally ripe (2 and 6), and overripe (3, 4 and 5) for the making of young white wines. However, rainfall during ripening prevented sufficiently precise identification of ripeness levels for making Fino wines in the Montilla-Moriles area (Córdoba).

‘Cabernet Sauvignon’ grape bunches were also sufficiently distinguished by ripeness to enable selective harvesting for making young red wines (1), vintage reds (2, 5 and 6) and even sweet reds (3 and 4).

The good classification accuracy achieved suggests that the NIR spectral range (1,600–2,400 nm) contains information enabling reducing-sugar content to be distinguished and predicted, thus identifying optimal times for harvesting depending on the type of wine to be produced.

There are few references in the scientific literature to NIR spectroscopy-based models for classifying white and red grapes by ripening stage. In the only paper addressing this issue, Le Moigne et al. (2008) constructed models for classifying ‘Cabernet Franc’ grapes by ripeness stage, using a Foss-NIR Systems 6500 spectrophotometer in the spectral range 400 a 2,500 nm; because of its specific features, this instrument cannot be used for in-situ monitoring of grape bunches. The models correctly classified between 73.4 and 83 % of samples for each of the plots tested; these percentages are lower than those obtained here (88 % for both varieties). The poorest individual classification percentages were also worse than those obtained here: 63 vs. 83 and 79 %, respectively, for white and red grapes. Finally, grouping in the present study was based not on time but rather on reducing-sugar content, a much more reliable indicator for determining optimal harvesting time as a function of the wine to be made.

Conclusions

The overall results sufficiently demonstrate that NIR spectroscopy using a handheld NIR-MEMS spectrometer has excellent potential for the field monitoring and evaluation of grapes (berry by berry) as a function of on-vine ripening stage.

Principal component analysis of the spectral data obtained in situ during ripening highlighted differences as a function of grape position on the bunch (high versus middle and low) and bunch orientation (E versus N, S and W) during ripening. The results obtained using the classification models suggest that NIRS technology enables the selective harvesting of grape bunches depending on the type of wine to be made. To our knowledge, this is the first attempt to implement NIR spectroscopy on-vine for this purpose.