Jean Hercher-Pasteur

Eléonore Loiseau

Carole Sinfort

Arnaud Hélias

Identifying the resource use and circularity in farm systems: Focus on the energy analysis of agroecosystems

Keywords: Agricultural production system, energy stocks, energy flows, associated ecosystem, circularity, soil mineralization

ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

Graphical abstract: 1. Introduction

Modern agriculture is facing crucial challenges [START_REF] Foley | Solutions for a cultivated planet[END_REF]. Farm systems need to adapt their production level and productivity to provide a balanced diet for a growing population while ecosystems must be preserved and the use of non-renewable resource inputs should be restrained (see Sustainable Development Goals target 2.4). These resources are not only limiting but also have a strong impact on the climate, which in turn threatens the resilience of biomass production [START_REF] Altieri | Agroecology and the design of climate change-resilient farming systems[END_REF]. In response to these challenges, new production modes, such as agroecology or organic farming, are emerging. However, tools are still required for assessing their potential benefits and trade-offs. Farm systems can be defined as both (i) agroecosystems (i.e. a modified ecosystem submitted to agricultural activity) interacting with the ecosphere (i.e. the environmental and natural mechanisms), and (ii) socio-economic activities interacting with the technosphere (i.e. related to human activities). The sustainability of an agricultural production system, which will henceforth be referred to as a farm agroecosystem, involves both dimensions, i.e. natural resources (i.e. sun, water, organic matter) and socio-economic inputs.

Different tools and methods such as Ecological Network Analysis (ENA) or Life Cycle Assessment (LCA) can be used for assessing the performance of agricultural systems [START_REF] Huysveld | Resource use assessment of an agricultural system from a life cycle perspective -a dairy farm as case study[END_REF][START_REF] Stark | Assessment of agroecological properties of mixed farms in the humid tropics : the application of ecological network analysis[END_REF]. However, for two main reasons, energy analysis is particularly relevant when the efficiency of resource exploitation and sustainability of the farm agroecosystem are to be assessed [START_REF] Hercher-Pasteur | Energetic assessment of the agricultural production system. A review[END_REF]. On one hand, for a given ecosystem, energy represents a thermodynamic state variable [START_REF] Jørgensen | New method to calculate the work energy of information and organisms[END_REF] characterizing the biotic trophic chain, selforganization and ecosystem development [START_REF] Odum | Self-Organization, Transformity, and Information[END_REF]. On the other hand, energy is a key driver for increasing agriculture productivity. Since the beginning of fossil fuel energy exploitation, the world population has grown from 1 to 8 billion humans, while areas cultivated for agricultural purposes have only increased by 67% [START_REF] Smil | Feeding the world: A challenge for the twenty-first century[END_REF]. Technological advances have revolutionized human productivity, comfort and increased Gross Domestic Production, although it has been at a severe cost. Our present model is based on the use of non-renewable fossil resources, that is changing our global climate, and leading the world into the Anthropocene [START_REF] Steffen | Trajectories of the Earth System in the Anthropocene[END_REF].

Initially, the energy analysis of an agricultural production system bases its framework on the assessment of direct (e.g. fuels) and indirect (i.e. the embodied energy of the production and transport of an input) energy requirements, with particular focus on the socio-economic inputs and outputs [START_REF] Dalgaard | A model for fossil energy use in Danish agriculture used to compare organic and conventional farming[END_REF][START_REF] Fathollahi | Comparative energy, economic and environmental analyses of forage production systems for dairy farming[END_REF][START_REF] Pimentel | Energy in Food Production[END_REF]. The efficiency of the system is investigated in terms of heating values, which are generally represented by the Energy Return On Investment (EROI) ratio. This approach has the advantage of being comparable to present-day economic concerns [START_REF] Stolarski | Energy and economic efficiency of camelina and crambe biomass production on a large-scale farm in northeastern Poland[END_REF], and is used as a proxy for environmental performance (Green House Gas, GHG, emissions) [START_REF] Arrieta | Greenhouse gas emissions and energy efficiencies for soybeans and maize cultivated in different agronomic zones: A case study of Argentina[END_REF][START_REF] Gomiero | Environmental Impact of Different Agricultural Management Practices: Conventional vs. Organic Agriculture[END_REF]. However "externalities" such as natural and biotic flows and associated environmental impacts are not taken into account. Other energetic approaches offer a more ecological point of view (e.g. emergy) by considering natural renewable and non-renewable resources [START_REF] Martin | Emergy evaluation of the performance and sustainability of three agricultural systems with different scales and management[END_REF]. Recent studies have presented a circular perspective on energy assessment, based on the internal biomass reinvested in the agroecosystem (i.e. the unharvested biomass), and involved in the maintenance of its functionalities [START_REF] Guzmán | Energy Efficiency in Agrarian Systems From an Agroecological Perspective[END_REF][START_REF] Harchaoui | Energy, Nitrogen, and Farm Surplus Transitions in Agriculture from Historical Data Modeling. France, 1882-2013[END_REF][START_REF] Parcerisas | From mixed farming to intensive agriculture: energy profiles of agriculture in Quebec, Canada, 1871-2011[END_REF]. With its role in biotic energy storage, soil organic matter has also become a significant component in the energetic balance [START_REF] Fan | Emergy and energy analysis as an integrative indicator of sustainability: A case study in semi-arid Canadian farmlands[END_REF][START_REF] Jordan | The Farm as a Thermodynamic System: Implications of the Maximum Power Principle[END_REF].

According to these new features, and to an extensive review of the different energetic assessments applied to agricultural production systems [START_REF] Hercher-Pasteur | Energetic assessment of the agricultural production system. A review[END_REF], the research question to address is: "How can energy analysis be used for assessing and establishing an efficient and sustainable agricultural production system?" The objectives of the present work are to combine external input-output flows, internal flows, circularity and internal energy stocks and to assess the services provided by the agroecosystem. A generic and operational method is proposed for evaluating the energy profile and sustainability of a farm agroecosystem. Through energy, the following framework contributes towards an exhaustive evaluation of the resources mobilized by the agricultural production system, both from the ecosystem (internal flows) and from the market (external flows).

Sustainability is assessed via two temporal dimensions [START_REF] Therond | A new analytical framework of farming system and agriculture model diversities[END_REF]: the first is related to short term and current performance, the second is based on long term and resilience (i.e., stability over time and the capacity to resist to external shocks). Current performance was measured by focusing on resource use efficiency through a set of EROIs, and integrating the agroecosystem in the flow inventory. To evaluate the resilience of the system, the circularity between farm activity and its agroecosystem was selected by distinguishing two steps in the circularity: Inflow Circularity and Outflow Circularity, respectively and . The operational objective aims at providing a set of accessible indicators of performance, stability and self-sufficiency, in order to support decisionmaking, to reduce the dependence on fuel and chemical-based inputs and to promote ecosystem services.

Section 2 describes the initial energy assessment method, which is illustrated by a case study on a mixed-farming system. In addition, three contrasting scenarios (i.e., intensive breeding, intensive crop production and extensive mixed-farming systems) have been compared. Section 3 presents the results with flow diagrams and an input/output table. Finally, the ability to assess the potential sustainability of the farming system, the relevance of the method and its limits are discussed in section 4.

Material and Method

Theoretical construction of the method

This work shares common methodological principles with agroecological energy analysis (AEA) [START_REF] Guzmán Casado | Energy in Agroecosystems. A tool for assessing sustainability[END_REF][START_REF] Tello | Opening the black box of energy throughputs in farm systems: A decomposition analysis between the energy returns to external inputs, internal biomass reuses and total inputs consumed (the Vallès County, Catalonia, c.1860 and 1999[END_REF], emergy [START_REF] Cavalett | Emergy assessment of integrated production systems of grains, pig and fish in small farms in the South Brazil[END_REF][START_REF] Odum | Energy Analysis of the Environmental Role in Agriculture[END_REF] and Life Cycle Assessment (LCA) [START_REF] Hauschild | Introducing Life Cycle Impact Assessment[END_REF].

As for AEA, the present energy assessment model resembles a bio-economic concept [START_REF] Georgescu-Roegen | Inequality, limits and growth from a bioeconomic viewpoint[END_REF][START_REF] Mayumi | The Origins of Ecological Economics: The Bioeconomics of Nicholas Georgescu-Roegen[END_REF] where two types of natural resources are considered: fund resources (implying circularity to maintain productivity, i.e. a biological resource) and stock resources (finished resource according to its extraction benefit / cost ratio, i.e. a fossil resource). In accordance with AEA, the farm system is comparable to an agroecosystem, requiring circular energy flows (in the form of biomass) to maintain its structure and functions. The present method therefore assesses the whole amount of biomass produced by the agricultural system in terms of Net Primary Production (NPP).

Emergy analysis is carried out by applying a systemic approach to the farm system model, according to an energy flow diagram [START_REF] Ferraro | A long-term sustainability assessment of an Argentinian agricultural system based on emergy synthesis[END_REF] where two main sub-system typologies are distinguished, i.e. producer and storage sub-systems. A sub-system can be defined as a "producer" when, at the end of the transformation process, it aims at obtaining material or energy products (e.g. the cultivated biomass or livestock that provide food, the biomass plant or the photovoltaic plant producing an energy vector). A sub-system can be qualified as "storage" when, during its process, it can provide services (e.g. the tractor and its associated tools that prepare the field, the biodegradation of biomass by soil living organisms to provide available nutrients to plants) [START_REF] Jordan | The Farm as a Thermodynamic System: Implications of the Maximum Power Principle[END_REF]. Energetic services represent the sum of useful work plus energy dissipation.

Moreover, as for LCA, flow inventory is based on a life cycle perspective where all the direct and indirect energy flows required by the farm system to operate from cradle to farm gate are considered.

The proposed method combines the circular energy flow perspective of the AEA, several elements of system representation in emergy analysis and the flow inventory as performed in LCA. It can be applied following 5 steps: i) flow inventory, ii) energy conversion, iii) flow representation, iv) calculation of the indicators and v) interpretation. Concerning flow inventory, a farm audit crossed over with all available administrative documents is performed in order to describe the characteristics of the farm (e.g. building, tools, fertilizer consumption, etc.) and of the agroecosystem (e.g. pedoclimatic conditions, land configuration, soil samples). According to the vegetal biomass yields, all biomass production can be calculated using product:residue ratios and root:shoot ratios from the literature [START_REF] Guzmán | Methodology and conversion factors to estimate the net primary productivity of historical and contemporary agroecosystems[END_REF]. Energy conversion, based on heating values, is computed using the Cumulative Energy Demand (CED) (e.g. Ecoinvent database) for external inputs, and the Gross Calorific Value (GCV) for internal flows of biomass (e.g. Feedipedia or Feedtable database). Finally, the energy flow configuration and indicators are computed and discussed.

System modelling

The model represents the farm system at a steady state via four interconnected sub-systems that reflect the different components of the agricultural production system at the intersection between the ecosphere and technosphere: i) Cultivated biomass, ii) Domestic animals, iii) Facilities and tools, iv) Associated ecosystem. Figure 1 illustrates all the potential flows.

The Cultivated Biomass (CB) sub-system refers to the vegetal biomass intentionally produced and managed by the farmer. This corresponds to all agricultural land and cultivated meadows. The biomass produced can be mobilized by other production processes (e.g. animal feed, anaerobic digestion plants, etc.) or exported to the market (biomass sold). The other major use of produced biomass will be to supply organic matter to the agroecosystem (i.e. the unharvested biomass).

The Domestic Animals (DA) sub-system involves animals raised within a farm system.

Presently, the main function of animal breeding is to produce milk or meat, with a sustainable livestock turnover rate (i.e. fund resource). However, before the Industrial Revolution and today in certain traditional farm systems, its main function consists in providing energetic services (i.e. field labour or transport).

The Facilities and Tools sub-system (FT) refers to all the machines, tools and facilities employed by Man for increasing power, ability, performance and comfort. This sub-system involves the "exosomatic" instruments of the farm, i.e. based on power that is external to the agroecosystem [START_REF] Georgescu-Roegen | Inequality, limits and growth from a bioeconomic viewpoint[END_REF][START_REF] Jordan | The Farm as a Thermodynamic System: Implications of the Maximum Power Principle[END_REF]. FT mainly provides support for cultivating biomass and animal breeding. However, it can also be a source of material and energy products by transforming biomass or direct natural resources into other products of interest (e.g. sun radiation can be converted into electricity using photovoltaic panels, biomass into methane using a biogas plant, and grain into flour using a mill).

Finally, "Associated Ecosystem" (AE) represents the portion of the ecosystem associated to the agricultural production system. This concurs with [START_REF] Tello | Opening the black box of energy throughputs in farm systems: A decomposition analysis between the energy returns to external inputs, internal biomass reuses and total inputs consumed (the Vallès County, Catalonia, c.1860 and 1999[END_REF] who modelled an interconnected sub-system called Associated Biodiversity. AE refers to ecosystem mechanisms and to the natural biomass that provide regulating and supporting services to agroecosystems. These include nutrient recycling by microbial soil communities, water recycling, or pollination. In contrast with FT, AE involves the "endosomatic" instruments of an agroecosystem.

Figure 1 depicts an aggregated energy system diagram, based on the [START_REF] Odum | Environment, Power and Society[END_REF] scheme convention, and on the input-output table (Tab. 1). Each sub-system merges storage and production, according to how they predominantly define the type of sub-system. Agroecosystem farms interact with an external market that provides and receives four types of external inputs described in the section below. The green lines represent the material and energy flows and the yellow line the support and services energetic flows. Stock variations are represented for storage sub-systems, i.e. FT and AE (green arrows indicate an increase in stock, while red arrows indicate a decrease in stock). Arrow numbering refers to the input output table energy flows presented below with the same colour code.

Materials & equipment - - Purchased material - - - - - (Amortization) Services (Plant assessment) (Veterinary) (Repair) (Ecological assessment) - - - - 185
186 188

Flow inventory 189

The market produces the external flows. These are organized into four categories: i) energy carriers, ii) materials and equipment, iii) products and iv) services.

An energy carriers comprise all inputs necessary for operating tools and machines (see table 1, flow 5,3). Material and equipment involves a fixed capital acquired for constituting the FT sub-system stock. Products comprise consumable inputs that ensure machine maintenance or productive processes (e.g. fertilizer, agrochemical products, animal feed, medication, paint, spare parts). Services include diverse external activities required by a farm system (e.g. agronomic advice, veterinary, mechanic, etc.). To compute the energetic value of this external input, the embodied energy mobilized by the operator (e.g. energetic cost of transport) to provide the service is evaluated. In order to evaluate the state of health and depreciation rate of the fixed capital, amortization is classified as an energetic service.

On-farm energy flows are produced by the agroecosystem and are expressed in gross calorific values (GCV). These flows are mobilized in a production process in order to obtain a new product (e.g. animal feed biomass for producing milk, biomass to obtain an energy carrier). They can also be employed as energy carriers to fuel a process (e.g. electric power from photovoltaic panels) or invested within a storage sub-system (e.g. biomass used in FT such as timber). The inputs invested from producer sub-systems into the AE stock associate unharvested biomass, animal excretions, and co-products such as digestate from a biogas plant, with flows (1,4), (2,4) and (3,4) respectively (Table 1). Direct solar energy was not taken into account as it can mask the remaining flows. Here the amount of solar energy appropriated by the plant was investigated, considering the entire biomass production of the system (i.e. Net Primary production of the system) [START_REF] Guzmán | Spanish agriculture from 1900 to 2008: a long-term perspective on agroecosystem energy from an agroecological approach[END_REF][START_REF] Haberl | Global human appropriation of net primary production (HANPP)[END_REF].

On-farm energetic service flows generated by the agroecosystem were more difficult to measure since they involve both complex and intangible processes, particularly for the AE. Farm services essentially provide support for the farm producer sub-system (e.g. CB and DA) but can also be used as external outputs such as housing, ecotourism, or rental of tools and animal labour (see Tab.1 and Fig. 1). This should, partly, depend upon the capital stock of the sub-systems (e.g. richness in biodiversity and landscape of the agroecosystem, bedroom equipment, etc.) Indeed, these types of services can be assessed through an input-output analysis of the system.

For FT, all consumed energy carriers are transformed into mechanical work and entropy.

Depending on how a machine is utilized, the consumed energy is allocated to support cultivating practices (mainly fuel consumption), animal production or process production, corresponding to flows (3,1), (3,2) and (3,3) respectively (see Tab.1 and Fig. 1). The depreciation of materials is integrated within these flows. According to a similar logic, the service provided by animal labour is equivalent to the total amount of energy consumed by the latter. To avoid double counting, energy exported by animals is deducted (i.e. the manure invested into the AE and the product exported to the market).

In addition to photosynthetic energy from sunlight, the ability of the AE to provide energetic services (and in extent to produce entropy) partly depends on the amount of energy stored within the system that supports natural services, i.e. the accumulated carbon biomass in the system. According to the Soil Organic Matter (SOM), soil appears to represent the main source of carbon stock [START_REF] Minasny | Soil carbon 4 per mille[END_REF], with a role in the biotic energy storage of the AE. The energy services provided by the AE are characterized using soil mineralization processes (see flow (4,1) in Tab.1). Soil provides essential ecosystem services [START_REF] Vidal Legaz | Soil quality, properties, and functions in life cycle assessment: an evaluation of models[END_REF] including nutrients and water regulation, food and fiber production, and climate change mitigation with the carbon stock [START_REF] Minasny | Soil carbon 4 per mille[END_REF]. It plays a central role in agriculture productivity and sustainability [START_REF] Amin | A systematic review of soil carbon management in Australia and the need for a social-ecological systems framework[END_REF][START_REF] Dornbush | Intensified Agroecosystems and Their Effects on Soil Biodiversity and Soil Functions[END_REF][START_REF] Pimentel | Annual vs. perennial grain production[END_REF]. However, soil still remains a complex opaque matrix [START_REF] Geisen | A methodological framework to embrace soil biodiversity[END_REF] which is yet under investigation in order to better understand the soil biota and interactions involving SOM, nutrient availably, water-holding capacity, etc.… [START_REF] Barrios | Soil biota, ecosystem services and land productivity[END_REF][START_REF] Dominati | A framework for classifying and quantifying the natural capital and ecosystem services of soils[END_REF][START_REF] Oldfield | Global meta-analysis of the relationship between soil organic matter and crop yields[END_REF][START_REF] Vogel | A systemic approach for modeling soil functions[END_REF]. Nonetheless, soil mineralization indicates soil activity and is a measurable and available type of data. It is considered as a proxy for services provided by the associated ecosystem.

Soil mineralization depends on the structure and composition of the soil, on the local climate, and on the local biota. For practical reasons, agronomic science uses a mineralization coefficient (k2) corresponding to a specific pedoclimate condition applied to SOM. It can be defined according to a formula based on soil samples [START_REF] Boiffin | Cropping system and organic status of soils : application of the Hénin-Dupuis model (in french)[END_REF][START_REF] Girard | Sols et environnement-2e édition[END_REF][START_REF] Mary | Intérêts et limites des modèles de prévision de l'évolution des matières organiques et de l'azote du sol[END_REF] or through a model such as AMG (Saffih-Hdadi and Mary, 2008) (See supplementary material, section 1).

Taking energy stocks into account

The first mandatory step in understanding and describing the services provided by a farm system is to define its present stock. In the case of the AE, SOM was considered to be the master driver of the energetic stock, acting as a "bio-battery" for the agroecosystem. As AE is a fund system, its dynamic depends on the energy flows invested in it (in terms of biomass) and on the energy loss (in terms of mineralized SOM). The other form of biotic energy storage is the biomass accumulated on a perennial plant that can offer specific services and support (e.g. Soil erosion control, shelter for animals, biodiversity habitats). Compared to SOM, their potential for energy storage remains low [START_REF] Pellerin | Identifying cost-competitive greenhouse gas mitigation potential of French agriculture[END_REF]. Nevertheless, they hold a key role in the reinforcement of SOM [START_REF] Pimentel | Annual vs. perennial grain production[END_REF]. The AE stock is defined as the average SOM of the different land use typologies and the accumulated biomass present on perennial plant.

For FT, the energy used to build the different infrastructures and equipment in terms of CED was taken into account and weighted according to the time already spent (see eq. in supplementary material). The longer the lifespan, the less is the stock depreciation. The larger the capital in FT, the greater is its capacity to provide services. However, unlike AE, FT is an exosomatic instrument, i.e. a stock system in constant depreciation. Its renewal ought to depend on inputs provided by the technosphere, which is presently essentially derived from non-renewable resources (i.e. minerals and fossil resources).

Indicators used in the assessment

A large variety of energetic indicators has been used to assess the farm system [START_REF] Hercher-Pasteur | Energetic assessment of the agricultural production system. A review[END_REF]. To evaluate the performance, focus is put on the Energy Return On Investment ratio (EROI) [START_REF] Hall | Energy Return on Investment[END_REF], i.e. the efficiency of the system.

(1) = with (MJ) the sum of the outputs from the farm to the market and (MJ) the sum of the inputs from the market to the farm. EROI is not sufficient for describing farm system dimensions [START_REF] Tello | Opening the black box of energy throughputs in farm systems: A decomposition analysis between the energy returns to external inputs, internal biomass reuses and total inputs consumed (the Vallès County, Catalonia, c.1860 and 1999[END_REF]. Therefore, in addition to conventional EROI, an Agroecosystem EROI has been presented as follows:

(2) = where (MJ) is the sum of the outputs from the farm to the associate ecosystem and

(MJ) the sum of the inputs from the associated ecosystem to the farm. Considering the farm system as a socio-economic activity, EROI represents the energy efficiency between the cumulative energy consumed from the market and the energy produced for the market. Agroecosystem EROI combines socio-economic flows with associated ecosystem dynamics. This essentially represents SOM stock dynamics, thus highlighting both the amount of biomass invested in the associated ecosystem and the service provided in the opposite direction.

In order to better assess circularity within the system, circularity indicators proposed by Tanzer (2020) were selected. In the present framework, circularity characterizes the relationship between the flows issued or invested from/to the associated ecosystem (AE) and the total energy consumed or produced. Two indicators are used. Inflow circularity (eq. 4) describes the portion of energy provided by the AE (i.e. soil mineralization) relative to the total energy consumed by the agroecosystem. It can be associated to an indicator of self-sufficiency which would reveal to what extent the farm system depends on flows coming from the AE. Outflow circularity (eq. 5) describes the portion of vegetal biomass left to the AE relative to the total biomass produced (i.e. the NPP).

(

) = (4) = 3

Case study

The case study concerns a real 39 hectare (ha) mixed organic farm located in western France (Maine-et-Loire). Its main products are milk and cereal. The farm owns 30 livestock unit (LU) equivalents grazing over 10 ha of permanent pastures. There are 18.5 ha of temporal pastures and 10.5 ha dedicated to crops (wheat, rapeseed, sunflower, rye, maize and fodder beet). Part of the crop production is consumed on the farm (as animal feed) while the rest is transformed (i.e. into flour and oil) and sold directly to the local market. The farm possesses a traditional barn and a new barnstable.

Crop rotation is organized according to an eight-year cycle corresponding to five years of temporal pasture and three years of commercial culture. In a similar way, 9 ha have been dedicated to agroforestry, i.e. introducing trees in field crops.

SOM values are obtained from the average of soil samples collected by the farmer on the different land types (i.e. permanent pasture (4.5% of SOM), temporal pasture (2.90%) and crop

(2.30%)). The mineralization coefficient (k2) is 2.2% and has been calculated according to the equation of [START_REF] Mary | Intérêts et limites des modèles de prévision de l'évolution des matières organiques et de l'azote du sol[END_REF] (see supplementary material). In order to assess the volume of biomass stock accumulated on hedges, 2 types of hedges (i.e. implemented hedges and young hedges)

were classified according to the Bouvier typology [START_REF] Simon | Evaluation de la biomasse bocagère en Bretagne[END_REF]. Isolated trees and trees implemented for agroforestry have also been included in the total stock of biomass (see supplementary material for detailed data).

Scenarios to test the method

In order to exemplify the use of the model and the energetic indicators identified for assessing the farm system, 3 contrasting scenarios were investigated. These have been named: i) Intensive breeding scenario, ii) Intensive vegetal production scenario and iii) Extensive mixed-farming scenario (see supplementary material for a comparative description of the scenarios and case study).

For the intensive breeding scenario, the herd based on the maximum nitrogen unit per hectare allowed (i.e. 170kg of N unit/ha) and based on the farmers recommendation was increased, resulting in a 90 LU herd. In this scenario, the installation of new facilities has also been considered to support milk production (1000 m 2 ).

The second scenario suggests animal production is halted, to be replaced by an exclusively vegetal biomass production. In this scenario, crops were focused on 20 ha of wheat, 9 ha of rapeseed, 5.5 of barley and 4.5 ha of sunflower. Transformation activities were maintained on the farm (flour and oil) in order to preserve a certain degree of comparability.

In the extensive mixed-farming scenario, a seven-year cycle is proposed, based on four years of temporal pasture working as fallows (i.e. 22.5 ha) and three years of commercial culture (i.e. 5.5ha of wheat, 5.5ha of rapeseed and 5.5ha of barley). The livestock was reduced so it might keep a role as a storage sub-system rather than a producer sub-system. Indeed, to replace mowing practices, domestic animals have a role in maintaining meadow productivity by grazing over an extensive pasture (6000 kg.ha -1 of grass dry matter). The livestock intake ratio (MJ/LU), the electric consumption ratio (kWh/LU) and the veterinary expenses ($/LU) were all maintained as before. This results in a 10 LU for the extensive scenario. Milk productivity per LU fell by 22% [START_REF] Clark | A systems comparison of once-versus twice-daily milking of pastured dairy cows[END_REF] as milking was chosen to be performed only once a day in order to trade-off loss with other nonmilking activities. proportional to the quantity of energy. This reveals that the largest flow of energy and material is issued from cultivated biomass, domestic animal feeding (1,2) and AE stock fueling (1,4). The AE stock level remains stable, thus pointing out that the biomass invested in the system allows for its functions to be maintained and for the provision of energetic service flows (4,1). The latter is generated by SOM mineralization and represents the most important flow of energy services. More than 50% of the biomass invested in domestic animal feed is irreversibly lost (mainly through metabolic heating). From the remaining material flows, manure represents the largest DA output, i.e.

RESULTS

Energetic flows of the farm agroecosystem and studied scenarios

invested in the AE. Finally, the main external input flow is purchased feed (6,2), even if this flow only represents 15% of the total animal intake. Similarly to the value of purchased feed, the second most important external input concerns energy carriers (fuel 56% and electricity 44%). The main difference between purchased feed and energy carriers is that the first originates from 94% of renewable biomass, while fuel is a 100% non-renewable resource and 95 % of electricity derives from non-renewable resources (see supplementary material). Another noteworthy flow is the amortization of the material and equipment that constitute the fixed capital (7,3), mainly due to the energy embodied in facilities.

The farm system diagrams of the different scenarios (see supplementary material) indicate that on one hand purchased feed is the major external input for intensive breeding. On another hand, in the case of an intensive vegetal production scenario, fuel for the tractor and electricity for processing are

Farm agroecosystem efficiency and circularity

In the case study, the (0.43) is low (Tab.3), when compared for example with other organic dairy farm studies (1.7) [START_REF] Smith | The energy efficiency of organic agriculture: A review[END_REF]. This is due to the amount of forage purchased, but also to the choice of model and to the use of CED (i.e. in addition to the embodied energy of the purchased forage, the GCV of the biomass is considered). This farm is presently going through a transition period, reducing its animal activities and reinforcing vegetal production. These might account for certain yield values observed during the case study that forced the farmer to purchase feed.

is greater than one (1.41). This can be explained by important flows reinvested within the farm (3847 GJ) (Tab.2). results (89%) indicate that the main part of the output is invested in the system. results are lower, with 64% of the input coming from the agroecosystem.

The intensive breeding scenario presents a similar (0.47) to that of the case study and a higher (1.98). A higher is due to an important increase in manure transferred to the AE. At the same time, changes in land use (fewer pastures and more crops) lead to a reduction in the mineralization rate and consequently in the energetic service provided by the AE. As the flow of manure to the AE is in the numerator (output) while the energetic service is in the denominator (input), the resulting rises. and , respectively 29% and 83%, show contrasting results that suggest an unbalanced situation. The Intensive breeding scenario increased its facilities to support new livestock (90LU), and increase FT stock (7678 GJ). Even though the use of machines and engines is larger, a strong increase in facilities leads to a lower depreciation rate.

For the intensive vegetal production scenario, the (4.3) and the (4.77) are both higher. Firstly, this is because there are no more cows with their associated metabolic loss. Secondly the use of fertilizer, and particularly nitrogen, has boosted the yields. In this scenario, the was observed to be the lowest value (52%) relatively to the (47%). Here, the stock of cultivated biomass was highest (129 GJ) as it requires a larger amount of seeds to be sowed. The depreciation rate of FT is most significant due to a higher use of engines without modification of FT stock (2664 GJ).

The Extensive mixed-farming scenario presents an of (2.11) and an of (2.79).

The reduction in the presence of animals leads to a higher amount of biomass invested in the system and exported from the system. This is also the result of a lower consumption of external inputs.

Fertilizers were not used and engines were only dedicated to the reaping of crops and not for any mowing of pasture. In this scenario, and present most similar results, respectively 83% and 78%.

Discussion

Capacity of indicators to support decision making in favor of sustainability

Sustainable farming implies that present needs should be met without compromising the ability of future generations to deal with their own requirements [START_REF] Brundtland | Report of the World Commission on Environment and Development: Our Common Future[END_REF]. Two temporal dimensions of sustainability have been considered (see introduction) to which answers will be given via the proposed indicators.

With the ratio, the current performance of the system (i.e. short term sustainability) is described through resource use efficiency, focusing on the ability of the system to produce an output according to the amount of inputs consumed. and show equivalent tendencies (Fig. 3).

The introduction of soil organic matter in the flattens variations between scenarios thus reflecting the capacity of the agroecosystem to produce biomass. The scenario with a complete vegetal production logically demonstrates higher since it has one process stage less than before (i.e.

livestock transforming vegetal biomass into milk and meat). In the case of the intensive breeding, the was similar to the case study with a higher . Modifications in land use tended to increase biomass production (corn silage) while, simultaneously, energetic services provided by the AE (pastured land to crop land with lower SOM) decreased. This resulted in a higher compared to the case study. However, the unbalanced situation in the circularity ratio of the intensive scenario (Fig. 3) calls for a closer investigation on the degree of sustainability of the systems.

With less stored energy to provide internal energetic services, intensive breeding becomes more dependent upon external inputs, and more sensitive to resource availability and price variations.

In addition, Circularity ratios of scenario 1 indicate an important provision in organic matter associated with a lower rate of mineralization. A first assumption suggests that the "bio-battery" of the system charges when the AE ∆ stock is high (Tab. 3). A second assumption suggests this unbalanced situation (i.e., Contrasted Circularity) could damage the "bio-battery" when the level of charge is too high. The persistent issue related to nitrate leaching in intensive breeding systems seems to confirm this second assumption. In contrast, extensive mixed-farming (scenario 3) demonstrates the most balanced In/Out Circularity. In terms of resource uses, Circularity and the AE state of charge are significant indicators when assessing the resilience of a system. Further studies are still required to confirm this tendency.

The results of the case study need to be weighted. Considering a normal yield for permanent grassland, the farm might be self-sufficient in terms of animal feed, thus significantly increasing its resource use efficiency. The extensive mixed-farming system appears to be the most sustainable one, with an reaching 2 and a high and balanced Circularity (Fig. 3). By increasing the complexity of the farm system, the different functions of a process and in particular the services provided by one process to another are enhanced. However, economic viability has not been assessed. Currently, the farmer's first source of income represents the milking activity. By dividing the livestock by three, the economy would be clearly impacted. Therefore, it is assumed that by rather reducing the time devoted to animal husbandry (e.g. only one milking per day, free pasture, etc.), the farmer would gain more time for other types of income.

Interpretation of the proposed indicators

Regarding the interpretation of the indicators, no direct relationship seems to exist between and Circularity. However these two indicators each present complementary information. EROI allows for the system current performance to be quantified, while circularity reflects the resilience of the system (See supplementary material, figure 6). The value of indicates to what extent the system is based on internal flow from the AE and is self-sufficient. The lower the , the more the system will be governed by external inputs and sensitive to external socio-economic shocks.

Moreover, a system based on its AE implies a functional agroecosystem with reinforced capacity to resist to external environmental shocks (e.g. better water retention in a soil makes it more resistant to drought episodes). Another interesting outcome concerns the degree of balance between and . On one hand, low and high suggest investment in the AE without relying on it (i.e. intensive breeding scenario) and eventually causing deterioration (e.g. risk of pollution such as eutrophication). On the other hand, high and low suggest that the farm activity depends on its AE without any investment on it and that this may compromise farm agroecosystem stability over time. On the contrary, a strong and balanced circularity suggests a highly resilient system.

In the light of the case study and different scenarios, the purchase of animal feed (i.e. the case study and the intensive breeding scenario) generates low . On the other hand, the presence of animals promotes high values of (Fig. 3), thus favoring the establishment of a strong and balanced circular system. Nevertheless, it is the production of vegetal biomass that appears to be the most efficient system. Consequently, a sustainable agricultural production system could enhance the production of plant biomass with the introduction of a minimum amount of animal production. This is the case for scenario 3 (extensive mixed-farming system) that presents the most balanced dimensions for sustainability (see a radar graph representation in supplementary material, section 6)

Significance and suitability of the framework

A picture is worth more than a thousand words [START_REF] Brown | A picture is worth a thousand words: Energy systems language and simulation[END_REF]. Indeed, an energy flow diagram provides a better assessment of the different energy flows present in the farm system as well as a first mandatory step for the farmer and the stakeholders to comprehend the agricultural production system. The introduction of a sub-system called Associated Ecosystem should reveal the master internal flow that maintains farm agroecosystem functions [START_REF] Guzmán | Energy Efficiency in Agrarian Systems From an Agroecological Perspective[END_REF].

The conversion of a conventional industrial farming system towards agroecology practices can be a difficult challenge. However, by mobilizing the concept of energy efficiency, which is already present in farm management schemes, and by using the present energetic approach, which is based on thermodynamic laws, a conventional farming system can be encouraged to take up more sustainable practices.

Indeed, the capacity to mobilize endosomatic energy relies on the energy stored in the agroecosystem [START_REF] Jordan | The Farm as a Thermodynamic System: Implications of the Maximum Power Principle[END_REF]. The more the latter provides energetic services, less is the need for exosomatic energy to produce a significant output. This statement represents another opportunity for decision-makers to propose policies, where incentives aim at agricultural production systems that promote energy storage in the agroecosystem. The significance of these measures could be doubled, if energetic services were provided and if climate mitigation could be implemented (through biotic carbon storage and reduction in the use of exosomatic energy).

Limits and perspectives of the method

The use of soil mineralization is a primary attempt in expressing the services provided by an ecosystem. This requires precise data, since the mineralization coefficient has an incidence on the results. Nevertheless, recent advances in the modelling of mineralization [START_REF] Clivot | Modeling soil organic carbon evolution in long-term arable experiments with AMG model[END_REF] and satellite imagery [START_REF] Vaudour | Sentinel-2 image capacities to predict common topsoil properties of temperate and Mediterranean agroecosystems[END_REF] ought to improve the data and its accessibility. In addition, a better description of the different components that contribute to mineralization (e.g. soil biota) should help characterize specific services provided by the AE. Indeed, a service provided by the ecosystem includes the self-organization of the trophic chain biota, which is associated to biodiversity (corresponding to flow (4,4) in table1). The internal regulation of functions in agroecosystems largely depends on the existing biodiversity [START_REF] Altieri | The ecological role of biodiversity in agroecosystems[END_REF], which contributes to the enhancement of nutrient availability and to the reduction in crop diseases [START_REF] Roese | Plant diseases in afforested crop-livestock systems in Brazil[END_REF]Zhang et al., 2020). The notion of services raises the question of related knowledge and information. The Energetic representation of this information still represents a flaw in this kind of energy assessment. A promising line of research was proposed by Jorgensen who suggested using Eco-exergy [START_REF] Jørgensen | New method to calculate the work energy of information and organisms[END_REF] in order to express the information embodied in the Ecosystem.

Traditionally, energy efficiency focuses on the ability of a process to provide an output, and aims at minimizing energetic losses with a negative view on entropy generation. In the case where the ecosystem is able to provide natural services, this point of view can be reversed, since the maintenance of a complex internal organization (i.e. the provider of services) relies on the generation of entropy [START_REF] Skene | The energetics of ecological succession: A logistic model of entropic output[END_REF]. This ecological modelling statement highlights the capacity of agroecosystems to provide internal natural services through its degree of complexity and its capacity to generate entropy.

Resource use efficiency on external inputs can be increased partly by improving the capacity of the system to use endosomatic energy. This depends on the energy stores and on the system's level of complexity.

The different energetic flows have been measured in terms of heating values. Material and energy were distinguished from services: the first is based on quantified physical flows, the second relies on proxies. However, the use of heating values to measure energy can represent a limit when expressing the different qualities of energetic vectors. One Megajoule of diesel is not equivalent to 1 MJ of hot water, and 1 MJ of milk is not equivalent to 1 MJ of straw. The choice of an accessible metric for the different stakeholders thus induces trade-off.

A site specific approach was selected, since an agroecosystem depends on local conditions. Although the farm system has been the scope of the study in order to test the method, the framework could be used at other scales (e.g. regional scales), which are the object of current lines of research. A comparison of the different scenarios was performed on the same agricultural land area with the aim of providing decision support elements for the farmer to design an efficient and resilient system. The sustainability of the system should depend on the correct balance between vegetal biomass production (perennial and annual), animal biomass production, technical capital and natural capital. However, other indicators could be integrated to support farmers' decisions since the studied strategies do not provide the same products or quantities. For example, this can lead to differences in the farmers' income. Integration of economic indicators would provide guidelines for the implementation of agricultural policies to adjust the short-sightedness of markets facing long-term sustainability strategies. In addition, a site specific approach does not highlight the market integration effort performed by the farmer who transforms vegetal biomass on the farm. In this approach on-farm and upstream flows can be taken into account. However, in future studies, it would be worthwhile to take into account downstream flows and to consider the output from the farm gate to its consumption site, and eventually its return towards the agroecosystem through a recycling process chain. Finally, this would entail an assessment of the circularity between the market and the agroecosystem.

The framework does not involve human labour. In the present case study and in systems containing significant exosomatic instrumentation, the energetic value is low compared to other flows mobilized by machines. However, for certain agricultural systems, human labour appears to be an important consumer of resources. In this case, it would be possible and worthwhile to integrate human labour as an additional energetic storage sub-system provider of energetic services. Another reason why human labour has not been included is because the manner of considering human labour is still in debate [START_REF] Wu | Human Labour and Green Manure, Two Overlooked Factors for Energy Analysis in Agriculture[END_REF] (i.e. should only metabolic requirements or also lifestyles be taken into account; should a level of knowledge with an impact on different farming practices be considered?).

Conclusion

A method has been presented, aiming at assessing the energy flows within an agricultural production system in order to evaluate the resource use efficiency and sustainability through circularity. This method is based on the latest line of research in energy assessment, where the agricultural production system is considered as a socio-economic activity and as an agroecosystem.

This assumption entails the mobilization of different energetic ratios in order to reflect the different dimensions of an agricultural production system.

According to a systemic approach, the framework was based on a diagram representation of a farm agroecosystem. A sub-system called the Associated Ecosystem was introduced and the production processes from storage sub-systems were differentiated. This also involves the distinction between energy and material flows and energetic service flows. In order to characterize the energetic service flows provided by the AE, soil mineralization was selected as an accessible expression of soil activity which holds a key role in the production of biomass. The model revealed that the main energetic flow occurring in the agricultural production system is a circulating flow towards the AE and returning to the production processes through energetic services.

Energy storage is a critical issue in our present-day society. This is also true for agricultural systems, since the provision of ecosystem services depends on the biotic energy storage, avoiding extensive use of external inputs. This approach could represent a suitable tool for conceiving better agricultural farm management and public policies.

The trends revealed by the Circularity indicators are promising and could play a fundamental role in the assessment of the resilience of a system in its management of resources. Unbalanced circularity should affect the energy stock equilibrium and the temporal stability of the farm agroecosystem. In addition, low inflow circularity results would point to systems depending on external inputs, with low self-sufficiency and a reduced capacity to resist to external shocks. In such a case, the analysis of the renewability of these flows becomes necessary.

The proposed method represents a step forward in energy analysis and characterization of the flows involved in an agricultural production system. A key service provided by the agroecosystem has been integrated here: this concerns soil fertility, where the mineralization of soil organic matter is used as a proxy to express soil microbial activity. The proposed model also depicts a vision of agricultural activity as a farm agroecosystem where the nature and function that a subsystem may have are differentiated. On this basis, 4 indicators have been defined for a rapid first assessment to be made on the sustainability of the farm over a short term (i.e., resource use efficiency), and over a long term via its temporal stability (i.e., balanced circularity) and degree of self-sufficiency (i.e., ).

The framework encourages better in depth understanding of agricultural systems through the different energetic flows that occur and could represent a useful source of knowledge when designing a more sustainable future agriculture.

Figure 1 :

 1 Figure 1: Generic energy flow diagram of the farm system. Arrow numbers refer to the input-

Figure 2 :

 2 Figure 2: Energy flow diagram of the case study (see energy flow diagram of the scenarios in supplementary material). The width of the arrows is proportional to the amount of energy

  the main flows. Unlike the case study and extensive scenario, both intensive scenarios reveal unbalanced flows between what is invested in the AE and what is provided by the latter for cultivated biomass. Both present lower energetic service flows provided by the AE due to changes in land use (more crop fields with lower SOM and less mineralization). Simultaneously, more inputs are invested in the AE (scenario 1 due to animal feed import, scenario 2 due to an increase in yield with the use of fertilizers).

Figure 3 :

 3 Figure 3: Graphical representation of EROIs and Circularity indicators for the case study and different scenarios. The EROI value is represented on the left. The circularity value is indicated on the right.

Table 1 :

 1 Generic input-output table of material and energy flows and energetic service flows (in

	1	2	3	4	5	6	7	8
		INTERNAL INPUT			EXTERNAL INPUT
	Cultivated biomass	Domestic animal	Facilities & tools	Associated Ecosystem	Energy Carriers	Products	Materials & equipment	Services

italic), discriminating external from internal flows

Table 2 :

 2 Input Output table of the case study in GJ. Energetic services are in italic (see input/output table of the different scenarios in supplementary material)

				1	2	3	4	5	6	7	8
					INTERNAL INPUT			EXTERNAL OUTPUT
				Cultivated biomass	Domestic animal	Facilities & tools	Associated Ecosystem	Energy Carrier	Products	Materials & equipment	Services	Flows provided
	1 2 3 4	INTERNAL OUTPUT	Cultivated biomass Domestic animals Facilities & tools Associated Ecosystem	20.9 (0.0) (211.7) (1964.8)	2741.7 26.6 (0.0) 55.4 (142.9) 0.0	201.4 0.0 0.0 (62.3) -	2943.8 902.9 0.0 0.0	0.0 -0.0 -	0.0 327.0 145.9 0.0	--0,0 -	(0.0) (0.0) (0.0) (0.0)	5908 (0) 1257 (0) 201 (417) 0 (1965)
	5		Energy carriers	-	-	416.9	-	-	-	-	-	417
	6 7	EXTERNAL INPUT	Products Materials & equipment	4.9 -	482.0 -	0.0 0.0 (135)	--	--	--	--	--	487 0 (135)
	8		Services	(0.0)	(13.2)	(43)	(0.0)	-	-	-	-	(56)
			Flows	26	3306	618	3847		473
			received	(2176)	(58)	(204)	0	0	0	0	-

Table 3 :

 3 Indicators and Stocks for the Case study and for the 3 scenarios

					Mixed-farming case study	Scenario 1: intensive breeding	Scenario 2: intensive vegetal production	Scenario 3: extensive mixed-farming
				EROI	0.43			0.47	112 %		4.30	1013 %		2.11	498 %
		EROI	Agroecosystem EROI Output circularity	1.41 89 %			1.98 83 %	141 %		4.77 52 %	340 %		2.79 83 %	199 %
				Input circularity	64 %			29 %			47 %			78 %
					GJ	∆Stock		GJ	∆Stock	%	GJ	∆Stock	%	GJ	∆Stock	%
	k	relati	ve	varia Associated Ecosystem	89287	1882	2.1 % 69050	7101	10.3 %	65129	6201	9.5 %	74931	3270	4.4 %
				Facilities & tools	2664	-154	-5.8 % 7678	-278	-3.6 %	2664	-197	-7.4 %	2664	-158	-5.9 %

Acknowledgments:

The authors wish to thank the ANII (Agencia Nacional de Investigacíon e Innovatíon, Uruguay) for funding its Ph.D thesis in France.

Conflict of Interest:

The authors declare that they have no conflict of interest.

Authors contribution:


Alexandre Mallet
email: alexandre.mallet@bioentech.eu

Margaud Pérémé

Lorraine Awhangbo

Cyrille Charnier

Jean-Michel Roger

Jean-Philippe Steyer

Éric Latrille

Ryad Bendoula

Jean- Philippe Steyer

Fast at-line characterization of solid organic waste: Comparing analytical performance of different compact near infrared spectroscopic systems with different measurement configurations

Keywords: Near infrared spectroscopy, anaerobic digestion, process monitoring, biochemical methane potential, compact systems, measurement modes

ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

Introduction

In anaerobic digestion processes, different organic waste are often co-digested to enhance the production of both biogas and fertilizers [START_REF] Hagos | Anaerobic co-digestion process for biogas production: Progress, challenges and perspectives[END_REF]. A tremendous diversity of waste is concerned by these bioprocesses such as agricultural residues (animal manure, crop stems/stalks, silage), food industry waste (brewery, sugar refinery), urban solid waste, meat waste or catering waste. This implies that these waste cover a large range of biochemical composition and physical properties. Moreover, such properties may fluctuate according to factors such as crop seasonality, transport or storage. This brings important challenges for ensuring the stability of the process and the efficiency of biogas production in digesters [START_REF] Wu | Anaerobic digestion: A review on process monitoring[END_REF]). To answer this, online monitoring of the feeding substrate quality could allow the direct adaptation of the feeding strategy to the feeding substrate quality [START_REF] Jacobi | Use of near infrared spectroscopy in online-monitoring of feeding substrate quality in anaerobic digestion[END_REF]. However, up to today, this has only been shown to be possible on digesters fed with a single type of substrate (like maize silage), while the usefulness of such system appears greater with important variations of substrate type and quality [START_REF] Jacobi | NIRS-aided monitoring and prediction of biogas yields from maize silage at a full-scale biogas plant applying lumped kinetics[END_REF]. In light of this, for co-digestion plants, there is a need for the development of fast and reliable characterization methods that are applicable on highly diverse organic waste.

Near infrared spectroscopy (NIRS), coupled with multivariate analysis techniques [START_REF] Naes | Multivariate calibration. II. Chemometric methods[END_REF], has been successfully used as a fast and robust characterization method of solid organic waste [START_REF] Skvaril | Applications of near-infrared spectroscopy (NIRS) in biomass energy conversion processes: A review[END_REF]. In the composting process, NIRS was used to monitor the degradation phases of compost [START_REF] Albrecht | Efficiency of near-infrared reflectance spectroscopy to assess and predict the stage of transformation of organic matter in the composting process[END_REF], or to predict biochemical characteristics such as the carbon/nitrogen ratio [START_REF] Vergnoux | Monitoring of the evolution of an industrial compost and prediction of some compost properties by NIR spectroscopy[END_REF]. In the anaerobic digestion process, the technology was initially used for in-situ monitoring of dry solids (DS), volatile solids (VS), chemical oxygen demand (COD) and volatile fatty acids (VFA) in digesters [START_REF] Jacobi | Use of near infrared spectroscopy in monitoring of volatile fatty acids in anaerobic digestion[END_REF][START_REF] Lomborg | Near infrared and acoustic chemometrics monitoring of volatile fatty acids and dry matter during co-digestion of manure and maize silage[END_REF][START_REF] Stockl | Near-infrared spectroscopy (NIRS) for a real time monitoring of the biogas process[END_REF][START_REF] Wolf | Optimisation of biogas production by infrared spectroscopy-based process control[END_REF]. NIRS was then proposed for the determination of biochemical methane potential (BMP) on municipal solid waste [START_REF] Lesteur | First step towards a fast analytical method for the determination of Biochemical Methane Potential of solid wastes by near infrared spectroscopy[END_REF], and has since been extended to other types of waste [START_REF] Doublet | Predicting the biochemical methane potential of wide range of organic substrates by near infrared spectroscopy[END_REF][START_REF] Fitamo | Rapid biochemical methane potential prediction of urban organic waste with near-infrared reflectance spectroscopy[END_REF][START_REF] Godin | Biochemical methane potential prediction of plant biomasses: Comparing chemical composition versus near infrared methods and linear versus non-linear models[END_REF][START_REF] Triolo | Near Infrared Reflectance Spectroscopy (NIRS) for rapid determination of biochemical methane potential of plant biomass[END_REF][START_REF] Yang | Biochemical methane potential prediction for mixed feedstocks of straw and manure in anaerobic co-digestion[END_REF]. Today, NIRS appears the most suitable method for predicting BMP on various organic substrates [START_REF] Rodrigues | Comparative analysis of methods and models for predicting biochemical methane potential of various organic substrates[END_REF].

More recently, NIRS was used to estimate complementary characteristics such as carbohydrates content, lipid content, nitrogen content, COD, and kinetic parameters [START_REF] Charnier | Fast characterization of solid organic waste content with near infrared spectroscopy in anaerobic digestion[END_REF]. In terms of process monitoring, these developments allow time-consuming reference measurements (which last typically one to two months for a characteristic like BMP) to be available in less than five days. Today, what limits the adoption of NIRS in full-scale biogas plants is its low applicability and high costs [START_REF] Wu | Anaerobic digestion: A review on process monitoring[END_REF]. Indeed, freeze-drying and grinding steps are necessary to avoid water and particle size effects in NIRS [START_REF] Mallet | Unveiling non-linear water effects in near infrared spectroscopy: A study on organic wastes during drying using chemometrics[END_REF], which currently limits the online applicability of such system. Moreover, the high costs of the spectrometer and the logistics involved in sending the sample at the laboratory still limits a regular and exhaustive analysis of the feeding substrates. Whether NIRS is applied directly on fresh waste or with a prior freeze-drying step, there is a need to develop cheap and reliable instruments which can be used on a wide range of substrate types in order to promote a greater adoption of NIRS in codigestion plants. This could be addressed by an at-site use of low-cost and compact near infrared (NIR) systems.

In the past few years, the use of NIRS has developed out of laboratories, thanks to important progress in the miniaturization of instruments. In particular, handheld Fourier transform near infrared (FT-NIR) micro spectrometers have appeared in the market, and make use of a micro-electro-mechanical systems-based (MEMS) Michelson interferometer [START_REF] Beć | Principles and Applications of Miniaturized Near-Infrared (NIR) Spectrometers[END_REF]. While conventional Michelson interferometers are made of discrete elements (including the moving mirror actioned by a motor, the fixed mirror, and beam splitter), MEMS technology enables a monolithic integration of these elements on a single chip, with the particularity that the moving mirror is operated by an electrical signal. Amongst the spectrometers making use of this technology, the NeoSpectra instrument has shown good analytical performance results for soil organic and total carbon content characterization [START_REF] Sharififar | Evaluating a low-cost portable NIR spectrometer for the prediction of soil organic and total carbon using different calibration models[END_REF][START_REF] Tang | Evaluating low-cost portable near infrared sensors for rapid analysis of soils from South Eastern Australia[END_REF], or authenticity screening in food [START_REF] Mcvey | A rapid food chain approach for authenticity screening: The development, validation and transferability of a chemometric model using two handheld near infrared spectroscopy (NIRS) devices[END_REF]. These compact spectrometers allow the measurements to be performed on site, thanks to their compactness, robustness and cost. However, these compact portable spectrometers tend to have poorer instrument performances than laboratory spectrometer, with lower resolution, spectral range, and signal-to-noise ratio [START_REF] Beć | Handheld near-infrared spectrometers: Where are we heading?[END_REF][START_REF] Crocombe | Portable Spectroscopy[END_REF]. Therefore, the suitability of such systems for the characterization of diverse organic waste still needs to be assessed.

Another aspect of these compact systems concerns their modularity and the possibility of testing different measurement configurations, in order to enhance the measured signal. Indeed, in complex matter such as solid organic waste, the Bouguer-Beer-Lambert law does not hold due to important light scattering [START_REF] Dahm | Relation of representative layer theory to other theories of diffuse reflection[END_REF]). To answer this, spectral pre-processing has been proposed to remove both additive and multiplicative effects [START_REF] Rabatel | VSN: Variable sorting for normalization[END_REF][START_REF] Rinnan | Review of the most common preprocessing techniques for near-infrared spectra[END_REF][START_REF] Zeaiter | Robustness of models developed by multivariate calibration. Part II: The influence of pre-processing methods[END_REF] and thus, make the problem linear again. However, other developments have rather focused on enhancing the measured signal directly. A promising optical pre-processing method, based on polarized light spectroscopy [START_REF] Backman | Polarized light scattering spectroscopy for quantitative measurement of epithelial cellular structures in situ[END_REF] has been proposed to improve the absorbance signal measurement on such scattering samples [START_REF] Bendoula | Improvement of the chemical content prediction of a model powder system by reducing multiple scattering using polarized light spectroscopy[END_REF][START_REF] Gobrecht | Combining linear polarization spectroscopy and the Representative Layer Theory to measure the Beer-Lambert law absorbance of highly scattering materials[END_REF][START_REF] Xu | Development of a polarized hyperspectral imaging system for investigation of absorption and scattering properties[END_REF]. Such system has shown analytical performance improvements for soils [START_REF] Gobrecht | A new optical method coupling light polarization and Vis-NIR spectroscopy to improve the measurement of soil carbon content[END_REF], and more recently, for digestate [START_REF] Awhangbo | Multi-block SO-PLS approach based on infrared spectroscopy for anaerobic digestion process monitoring[END_REF], but has never been evaluated on solid organic waste. Still in the aim of enhancing the measured spectra, time-resolved spectroscopy shows a promising future : applied to pharmaceutical tablets, collected photons with a particular propagation time were shown to be most informative for quantification [START_REF] Alayed | Time-resolved diffuse optical spectroscopy and imaging using solid-state detectors: Characteristics, present status, and research challenges[END_REF][START_REF] Johansson | Time-resolved NIR/vis spectroscopy for analysis of solids: Pharmaceutical tablets[END_REF]. However, the cost of this technology still remains prohibitive for the organic waste management sector. Finally, the measurement mode (at distance or in contact, in reflectance or in interactance) also plays an important role in the final accuracy for estimating biochemical properties [START_REF] Hemrattrakun | Comparison of Reflectance and Interactance Modes of Visible and Near-Infrared Spectroscopy for Predicting Persimmon Fruit Quality[END_REF][START_REF] Khodabakhshian | A comparative study of reflectance and transmittance modes of Vis/NIR spectroscopy used in determining internal quality attributes in pomegranate fruits[END_REF][START_REF] Schaare | Comparison of reflectance, interactance and transmission modes of visible-near infrared spectroscopy for measuring internal properties of kiwifruit (Actinidia chinensis)[END_REF]. Though current used laboratory spectrometers make use of a distance reflectance measurement, a contact immerged probe measurement has been shown to be useful for prediction of parameters on digestates [START_REF] Awhangbo | Multi-block SO-PLS approach based on infrared spectroscopy for anaerobic digestion process monitoring[END_REF].

Authors observe higher reflectance levels with less noise in the collected spectra, as well as new chemical features which were not apparent in a remote probe configuration. In light of this, it appears that the use of different measurement configurations could enable the calibration of more accurate and more robust NIRS models on diverse solid organic waste.

As mentioned, the applicability of compact and low-cost spectroscopic systems remains to be assessed for biochemical characterization of highly diverse solid organic waste. Moreover, the modularity offered by such compact systems is a unique opportunity to evaluate whether the use of different measurement configurations can help build more robust models. This study aims to assess these two matters by comparing the analytical performances of four different NIRS systems: a standard laboratory spectrometer, a portable spectrometer with two measurement configurations (contact mode and polarized mode), and a microspectrometer. For this purpose, measurements were acquired with each system on a selection of solid organic waste. Then, for each spectroscopic system, prediction models for five biochemical characteristics (carbohydrates, lipids, nitrogen, COD and BMP) were calibrated and their performances were compared.

Materials and Methods

Sample preparation and reference analyses

Thirty-three substrates were selected amongst various waste types that have been collected in rural, territorial and industrial anaerobic digestion plants in France.

These substrates cover a wide range of biochemical and physical properties: solid cellulosic waste (like silage, cereals and corn cobs), liquid cellulosic suspensions (such as manure), liquid fat suspensions (catering waste or biowaste), sweet emulsions (such as lactoserum), or protein and fat solid pastes (such as egg waste or cacao butter). The visual aspect of some of these substrates in raw form is presented in Appendix A.

For spectral measurements, each substrate sample was freeze-dried and ground to 1 mm. The dataset is fully described in a data paper [On-site substrate characterization in the anaerobic digestion context: a dataset of NIR spectra acquired with four different optical systems on freeze-dried and ground organic waste -this data paper is submitted jointly with this article, reference will need an update after reviewing] and available online [https://doi.org/10.15454/SQQTUU].

Biochemical characterization of substrates was obtained by using a NIRS calibrated model [START_REF] Charnier | Fast characterization of solid organic waste content with near infrared spectroscopy in anaerobic digestion[END_REF], with errors on independent test sets of 53 mg(O2).gTS -1 for carbohydrates content, 3.2*10 -2 g.gTS -1 for lipids content, 8.6 mg.gTS -1 for nitrogen content, and 83 mg(O2).gTS -1 for COD. The histograms of obtained prediction values are presented in Figure 1.

Spectroscopic systems

The four spectroscopic systems compared in this study are presented below. In addition, spectral measurement protocols are compared in Table 1.

Laboratory spectroscopic system

The laboratory spectroscopic system consists of a NIR-Flex N-500 solids FT-NIR spectrophotometer with a vial accessory (Buchi, Flawil, Switzerland), scanning in reflectance mode with a spectral range of 4 000 cm -1 to 10 000 cm -1 (1000-2500 nm) and a resolution of 4 cm -1 . An external white reference (Spectralon ® ) signal is automatically taken every 10 minutes. For each sample, an intensity signal was collected, and the pseudo-absorbance signal was computed:

= -= -.

(Eq. 1)

Portable spectrometer with immersed contact probe

The immersed contact probe system consists of a FT-NIR Rocket spectrometer (Arcoptix, Neuchatel, Switzerland) scanning in reflectance mode with a spectral range of 3 800 cm -1 to 11 000 cm -1 (900-2500 nm) and a resolution of 4 cm -1 . The spectrometer was connected to two optical fibers (for illumination and signal collection) of 1000 μm core diameter and numerical aperture of 0.39 (BFY1000, Thorlabs). A tungsten-halogen source (Ocean Optics HL-200-FHSA) was used for illumination. For each sample, the intensity was collected. A white reference (SRS99, Spectralon®) was scanned every hour during the measurements resulting in . Finally, a dark current signal corresponding to the instrumental noise was recorded and subtracted to all spectra. A pseudo-absorbance signal was thus calculated:

= - = - - - .
(Eq. 2)

Portable spectrometer with polarized light spectroscopy

The polarized light system consists of the same elements (spectrometer, light source, optical fibers) as the immersed contact probe system, however, measure-ments were made at a distance of 5 cm from the samples, and a polarized light component [START_REF] Awhangbo | Multi-block SO-PLS approach based on infrared spectroscopy for anaerobic digestion process monitoring[END_REF] was connected to the spectrometer. This (Eq. 3)

= 2 --.

(Eq. 4)

= ∥ -+ --.

(Eq. 5)

Handheld micro spectrometer

The micro spectrometer system consists of a MEMS FT-NIR NeoSpectra spectrometer (Si-Ware, Cairo, Egypt) scanning in reflectance mode with a spectral range of 3 921 cm -1 to 7 407 cm -1 (1350-2550 nm) and a resolution of 66 cm -1 . A white reference (SRS99, Spectralon®) signal was collected before each measurement. For each sample, an intensity signal was collected and the pseudo-absorbance signal " was computed:

" = - " = - .
(Eq. 6)

Data analysis: model calibration

All the data analysis was performed using Python 3.6.5: data wrangling with Pandas 0.25.1, NumPy 1.17.3, SciPy 1.3.1, Scikit-learn 0.21.3, and plotting with Matplotlib 2.2.2 [START_REF] Harris | Array programming with NumPy[END_REF][START_REF] Hunter | Matplotlib: A 2D graphics environment[END_REF][START_REF] Mckinney | Data Structures for Statistical Computing in Python[END_REF][START_REF] Pedregosa | Scikit-learn: Machine Learning in Python[END_REF][START_REF] Van Rossum | Python 3 Reference Manual[END_REF][START_REF] Harris | Array programming with NumPy[END_REF].

Measurements of the 33 substrates on the four spectroscopic configurations yielded six different matrices : the absorbance signal from the laboratory spectrometer, the absorbance signal from the immerged contact probe system, the three reflectance signals , and (respectively single scattered, multiple scattered, total back-scattered) from the polarized system, and finally the absorbance signal " from the micro spectrometer system.

For noise reduction and baseline correction, a selection of seven pretreatments that have proven to be efficient in previous studies on organic waste [START_REF] Charnier | Fast characterization of solid organic waste content with near infrared spectroscopy in anaerobic digestion[END_REF][START_REF] Lesteur | First step towards a fast analytical method for the determination of Biochemical Methane Potential of solid wastes by near infrared spectroscopy[END_REF] have been used: the standard normal variate [START_REF] Barnes | Standard normal variate transformation and de-trending of near-infrared diffuse reflectance spectra[END_REF] (SNV), the first-order detrend [START_REF] Barnes | Standard normal variate transformation and de-trending of near-infrared diffuse reflectance spectra[END_REF]) (DT1), the first-order Savitzky-Golay [START_REF] Savitzky | Smoothing and Differentiation of Data by Simplified Least Squares Procedures[END_REF]) derivation (SG1), the sec-ond-order Savitzky-Golay derivation (SG2), combinations of SNV and first-order Savitzky-Golay derivation (SNV+SG1 or SG1+SNV) and finally, a weighted EMSC with variable sorting for normalization (VSN) [START_REF] Rabatel | VSN: Variable sorting for normalization[END_REF]. The raw signal was used directly as well, which resulted overall in testing eight different preprocessing conditions.

In order to evaluate the models built on each spectroscopic system, a validation test set was constituted. With the aim of producing a representative validation test set, the Duplex algorithm [START_REF] Snee | Validation of Regression Models: Methods and Examples[END_REF] was run for each reference characteristic (carbohydrates content, lipid content, total nitrogen content, COD, BMP). This resulted in a training set of 22 substrates, and a validation test set of 11 substrates.

To assess the representativeness of the validation test set in terms of spectral variability, a principal components analysis [START_REF] Cordella | PCA: The Basic Building Block of Chemometrics[END_REF] was done, and obtained scores were plot in Figure 2 and Appendix C.

Models were built using a partial least squares regression (PLS1-R) with NI-PALS algorithm [START_REF] Naes | Multivariate calibration. II. Chemometric methods[END_REF][START_REF] Wold | Nonlinear Iterative Partial Least Squares (NIPALS) Modelling: Some Current Developments[END_REF]. To determine the number of latent variables, a cross-validation was done using a repeated randomized group-k-fold cross-validation with # = 5 the fold number and %_'()(*+, = 30 the repetition number. Sample triplicates were always kept within one fold to ensure independence. For each cross-validation run, various metrics were then calculated:

the root-mean-square error (RMSE), the mean absolute error (MAE) [START_REF] Willmott | Advantages of the mean absolute error (MAE) over the root mean square error (RMSE) in assessing average model performance[END_REF], the coefficient of determination (R 2 ), and B-coefficients metrics which are the Durbin-Watson statistic (DW) and the variance [START_REF] Rutledge | Durbin-Watson statistic as a morphological estimator of information content[END_REF]. The choice of the number of latent variables was made by analyzing all these metrics together (i.e. choosing the minimal number of latent variables while minimizing RMSE and MAE, maximizing R 2 , and detecting rate increase of DW and variance of B-coefficients).

Spectral range was also optimized for each of the signal types. This was done by calibrating a first model, analyzing its B-coefficients (available in Appendix E), and shrinking the spectral range adequately before recalibrating the model.

The final performances of the obtained models were evaluated on the validation test set, based on the root-mean-square error (RMSE) and the coefficient of determination (R 2 ).

To assess prediction repeatability of a given model, the variance of each sample's triplicate spectra predictions was calculated:

, / 0 = ∑ 2 3 -2 3 4 0 5 6
, (Eq. 7)

and the global prediction repeatability standard deviation was calculated as the quadratic mean of each , / : Although this is not optimal for evaluating calibration models alone, such method-ology appeared to be the best to compare different spectroscopic systems on identical samples without bias.

7 / =

Raw spectra analysis

Figure 3 presents the raw reflectance signals obtained with each spectroscopic system. In all signals, the main peaks found in organic waste were apparent: the CH, CH2 and CH3 combination bands particularly present in fat (1731 nm, 1764 nm, 2310 nm, 2350 nm), the OH bands present in simple sugars (1436 nm, 1932 nm), the OH combination bands in starch or cellulose (2092 nm), and the NH combination bands present in proteins (2180 nm) [START_REF] Williams | Near-infrared Technology: Getting the best out of light[END_REF][START_REF] Workman | Practical Guide and Spectral Atlas for Interpretive Near-Infrared Spectroscopy[END_REF]. However, the relative amplitude of these peaks seems to differ. For example, in the micro spectrometer signal (Rμ) the CH2 combination bands at 2310 nm and 2350 nm seem much less sharp than in the laboratory spectrometer signal (Rlab). This can be well explained by the lower resolution of the micro-spectrometer (66 cm -1 ) compared to the laboratory spectrometer (4 cm - 1 ). A consequence of this is that the models built on compact systems such as the micro spectrometer will be based on more simple features, which could lead them to be less accurate models but potentially also more robust.

In addition, the sensitivity with respect to the spectral range appears to differ from one spectrometer to another. For the micro spectrometer, the measured signal below 1600 nm seems much noisier than in other systems. Such sharp peaks are not, a priori, expected in NIR spectra of complex matter. Similarly, for the immersed probe contact (Rip) or polarized signals (Rss, Rms, Rbs), it seems the measured signals below 1200 nm and over 2240 nm are as well very noisy. For this reason, these spectral regions were later removed from the calibration of the built models.

Another point of comparison concerns the observed reflectance levels (Figure 4).

The reflectance levels of Rlab, Rbs, and Rμ are much higher (with 75% of the values that range respectively between 0.46 and 0.73, 0.43 and 0.66, and 0.60 and 0.90), than the reflectance levels of Rip (with 75% of the values that range between 0.15 and 0.35). This is mostly related to the way the signal is acquired (i.e. the measurement configuration). Indeed, reflectance levels are the result of both the absorption level (dependent of chemical composition) and the scattering level (modifications of light optical path-length, and photon leakage [START_REF] Gobrecht | Major Issues of Diffuse Reflectance NIR Spectroscopy in the Specific Context of Soil Carbon Content Estimation[END_REF]).

Therefore, the chosen measurement configuration might favour one or the other, leading to differences in the measured reflectance levels. Results show here that the distant mode systems (i.e. Rlab, Rbs, and Rμ) collect much more scattering photons than the contact mode system (i.e. Rip). Regarding the advantage of one measurement mode over the other, this will mostly be dependent on the characteristic to be predicted, and its dependency on physical properties.

In the polarized light system, a clear difference of reflectance level can also be observed: 75% of the values of the multiple scattering signal Rms range between 0.52 and 0.76, against 0.05 and 0.11 for the single scattering signal Rss. This is con-sistent with the sole principle of polarized spectroscopy where Rss corresponds to single scattering photons with low penetration in the media while Rms corresponds to multiple scattering photons with a longer optical path length in the media due to refraction events. This further confirms the efficiency of polarized spectroscopy as an optical method to remove the scattering effects in the measured signal [START_REF] Bendoula | Improvement of the chemical content prediction of a model powder system by reducing multiple scattering using polarized light spectroscopy[END_REF][START_REF] Gobrecht | A new optical method coupling light polarization and Vis-NIR spectroscopy to improve the measurement of soil carbon content[END_REF]. However, the impacts on the subsequent models built on such signals remain to be studied.

Model performances

For the five reference characteristics that were studied, the best selected models obtained on each of the six signals are presented in Table 2.

For prediction models built using the laboratory spectrometer system, the errors obtained on the test set (RMSEP) were of 0.108 g.gTS -1 for carbohydrates content, 5.8 mg.gTS -1 for nitrogen content, 0.034 g.gTS -1 for lipids content, 0.060 NL(CH4).gTS -1 for BMP, and 136.4 mg(O2).gTS -1 for COD. These are all consistent to the performances of reference models [START_REF] Charnier | Fast characterization of solid organic waste content with near infrared spectroscopy in anaerobic digestion[END_REF]. The slightly lower performances obtained can be explained by the more limited number of samples on which these models were built (22 samples) compared to the original models (about 80 samples).

For all predicted characteristics, the laboratory system (Alab) showed better analytical performance results than the compact systems (Aip, Aμ, Rss, Rms, Rbs). However, in many cases, these latter systems showed similar performances to the labora-tory system. For example, for BMP prediction, the prediction error (RMSEP) of the model obtained with the laboratory spectrometer signal Alab was 60 mL(CH4).gTS -1 .

In comparison, for the polarized system signals Rss, Rms, Rbs, the model prediction errors were of respectively 115 mL(CH4).gTS -1 , 111 mL(CH4).gTS -1 and 100 mL(CH4).gTS -1 , while for the micro spectrometer signal Aμ the model's error was of only 91 mL(CH4).gTS -1 . Similarly, for carbohydrates content prediction, while the prediction error for the laboratory spectrometer was 0.108 g.gTS -1 , the errors for the micro-spectrometer and the immersed probe system were of only 0.134 g.gTS - 1 and 0.104 g.gTS -1 . Such observation can be made for all the other characteristics studied. This is very promising because these models have acceptable errors compared to the laboratory spectrometer. This means that the models built on organic waste rely on sufficiently simple features so that the lower spectral resolution of compact spectrometers does not affect too much the performances. Such result is consistent with similar studies on low-cost compact NIR spectrometers with limited spectral range that are applied to herbaceous feedstock such as corn stover or sorghum [START_REF] Wolfrum | A Performance Comparison of Low-Cost Near-Infrared (NIR) Spectrometers to a Conventional Laboratory Spectrometer for Rapid Biomass Compositional Analysis[END_REF]. Knowing that these spectrometers are low-cost (while the laboratory spectrometer costs about 50 000€, the immersed contact probe and polarized systems each cost about 20 000€ and the micro spectrometer only costs about 3 000 €), and can be used at-site, this holds great promises regarding an increased adoption of NIRS for robust solid organic waste characterization in anaerobic digestion plants.

Models built on the three signals Rss, Rms, Rbs obtained using the polarized spectroscopy system show different performances. While Rbs is a signal very similar to those obtained from the other set-ups because it includes information from all the backscattering light, Rss and Rms differ in terms of type of photons that are captured by the spectrometer (respectively single scattering photons, and multiple scattering photons). For all characteristics, models built on Rbs signal show better performances than models built on the Rss and Rms signals. For example, for COD prediction, while the prediction error (RMSEP) of the model using the total backscattering signal (Rbs) is of 129.2 mg(O2).gTS -1 , it is of 147.8 mg(O2).gTS -1 using Rms and 273.9 mg(O2).gTS -1 using Rss. This suggests that the use of polarized spectroscopy for predicting these characteristics on organic waste may not be particularly recommended.

In fact, for lipids content, COD and nitrogen content, the models built with Rss signals show much greater errors than models built with Rms signals (respectively 0.124 g.gTS -1 greater than 0.068 g.gTS -1 , 273.9 mg(O2).gTS -1 greater than 147.8 mg(O2).gTS -1 , and 21.4 mg.gTS -1 greater than 12.1 mg.gTS -1 ). This came as a surprise, as the single scattering signal is theoretically supposed to be more related to absorbing constituents and less impacted by scattering effects (Gobrecht et al., 2015). This can be explained by the fact that for a dataset with such diverse solid organic substrates, the biochemical composition is closely related to the physical properties. For example, high lipid content substrates (which also correspond to substrates with high COD) tend to form liquid transparent solutions (like oil), which transmit light much more than low lipid content substrates which usually form highly scattering porous media. This relatively poor performance obtained with the single scattering signal is consistent with results obtained on digestates where physical structure appeared determinant [START_REF] Awhangbo | Multi-block SO-PLS approach based on infrared spectroscopy for anaerobic digestion process monitoring[END_REF]. One additional reason can be found in the measurement technique itself: the intensity captured for the single scattering signal is much more limited than a classical total backscattering signal, leading to higher signal-to-noise ratios. Further investigations could concentrate on the use of a multi-block approach combining these three complementary signals, as proposed on digestates [START_REF] Awhangbo | Multi-block SO-PLS approach based on infrared spectroscopy for anaerobic digestion process monitoring[END_REF].

Apart from the single scattering signal, all signals allowed to build satisfactory models for the biochemical characterization of organic waste. However, no spectroscopic system allowed to surpass the analytical performance of the laboratory spectrometer system. Figure 5 presents the observed and prediction plots for each signal for the prediction of biochemical potential. In Alab (upper left subplot), the predictions for each of the three replicate spectra do not differ (for one observed value, the prediction values are overlaid on the graph); while for the other spectroscopic systems, the predictions for each of the three replicate spectra are very different. For example, the sample with a BMP of 0.63 NL(CH4)g.TS -1 has predictions that vary for Alab between 0.869 NL(CH4)g.TS -1 and 0.870 NL(CH4)g.TS -1 , while the predictions for Aip and Aμ vary respectively between 0.863 NL(CH4)g.TS -1 and 0.940 NL(CH4)g.TS -1 and between 0.709 NL(CH4)g.TS -1 and 0.771 NL(CH4)g.TS -1 . This is observed for all the other characteristics as shown in Appendix D. It appears that in all the compact systems, the replicate spectra vary much more from each other than with the laboratory spectrometer. This could explain the greater errors obtained using the compact systems. The following result may be investigated more quantitatively by calculating the global repeatability standard deviations as presented in Figure 6. Indeed, for all characteristics, the compact systems show much higher repeatability standard deviations than the laboratory spectrometer (in red). Such differences are due to the way the spectral measurements are acquired.

As detailed in Table 1, the systems do not have the same number of scans and sampling surface. While for one measurement, the laboratory spectrometer collects scans during a full rotation of the sampling cup, the other systems only collect scans on a fixed point of the sample's surface. This means that in compact systems the spectral measurement is much less representative of the total sample. It appears that the performance of compact systems could be enhanced by optimizing the way the spectra are taken: increasing the number of scans and the number of replicates to ensure a better stability of the measurements.

While the suitability of the compact and low-cost spectrometers has been demonstrated, some challenges remain. Though models could be calibrated on the compact systems' signals directly as in this study, it is most probable that models will remain being built and maintained on standard laboratory spectrometers, with transfer functions being built between the laboratory spectrometer (referred as the "master" spectrometer) and the compact spectrometers (referred as the "slave" spectrometers). This transfer approach has already been proven to be successful between a laboratory spectrometer and an online spectrometer for in situ monitoring of anaerobic digestion [START_REF] Krapf | Transfer of a near infrared spectroscopy laboratory application to an online process analyser for in situ monitoring of anaerobic digestion[END_REF]. However, the robustness of these transfer functions applied to compact systems still needs to be assessed.

Conclusions

Results have shown that compact and low-cost systems including a hand-held micro spectrometer are suitable for online characterization of diverse solid organic waste. However, the use of new measurement configurations such as the polarized mode was not shown to be an effective way to enhance the quality of predictive models. This suggests that the physical scattering properties of the substrates are the main determinant of analytical performance of NIRS calibration models built on such highly diverse solid organic waste. Keys for the improvement of the compact systems appear to lie in further optimization of the sampling protocol. These results set the path to a new era of low-cost and on-site NIRS analysis of the feeding substrates in co-digestion plants.

Tables Table 1. Spectral measurement protocol characteristics.

Laboratory

  component consisted in a wire-grid polarizer (Thorlabs WP25L-UB) to s-polarize the incident light; and a calcite Wolaston polarizer (Thorlabs WP10P) to split the reflected light in an s-polarized and p-polarized image, corresponding to parallel ∥ and perpendicular light signals. As in the previous system, both the dark current signal , and a white reference signal = ∥ + were collected. Three signals were then calculated following Bendoula et al. (2015) formula[START_REF] Bendoula | Improvement of the chemical content prediction of a model powder system by reducing multiple scattering using polarized light spectroscopy[END_REF]: the single scattering reflectance Rss , the multiple scattering reflectance Rms , and the total backscattering reflectance Rbs :

  validation test set For each reference characteristic, train and test set distributions (respectively in blue and orange) are presented as histograms in Figure 1. Very similar distributions (same mean, same standard deviation) for all characteristics show that the Duplex algorithm succeeded in obtaining a representative test set in terms of biochemical composition. To complete this analysis, the representativeness in terms of signal is assessed by looking at the scores of train and test sets for each signal type in Figure 2 (only the first and second component scores are displayed, but scores up to the tenth component were checked). As shown, the test set signals (in orange) cover most of the range covered by train set signals. However, in some cases, the variability of train set signals is not fully well represented in the test set.For example, in the upper left score plot representing the laboratory spectrometer configuration signal Alab, no test set signal (orange square) is found in the far right plot where there are two train set signals (blue triangles). This is consistent with the fact that the Duplex algorithm was run on the reference values and not on the spectral values, so there is no guarantee for test set spectral representativeness.

FiguresFigure 1 .

 1 Figures

Figure 3 .

 3 Figure3. Raw reflectance spectra of each spectroscopic system (Rlab: laboratory spectrometer, Rip: immersed probe system, Rμ: micro-spectrometer, Rss: single scattered signal of polarized system, Rms: multiple scattered signal of polarized system, Rbs: total backscattered signal of polarized system). Each spectrum corresponds to the mean of the triplicate measurements.

Figure 6 .

 6 Figure 6. Global prediction repeatability standard deviations as calculated with (Eq. 7) and (Eq. 8). For each reference characteristic (carbohydrates, nitrogen, lipids, BMP, COD), a bar plot colored by signal type is provided (Alab in red, Aip in blue, Aμ in green, Rss in violet, Rms in orange, and Rbs in yellow).

Table 2 .

 2 Descriptive statistics of the calibrated models. For each predicted refer-

	ence measurement (carbohydrates, nitrogen, lipids, BMP, COD), the retained model for each spectroscopic system signal (Alab, Aip, Aμ, Rss, Rms, Rbs) is presented. The optimized parameters are provided (the spectral range, the pretreatment and the number of latent variables) along with the different performance metrics (RMSEC, RMSECV, RMSEP, R 2 C, R 2 P).
	Experiment		Optimized parameters		Performance metrics
		Sig	Spectral	Pretreat-
	Reference				#LV RMSEC RMSECV RMSEP R 2 C R 2 P
		nal	range (nm)	ment
	Carbohydrates	Alab 1400-2240 SNV+SG1 2	0.143 0.192	0.108	0.78 0.83
	g.gTS -1	Aip 1450-2240 SNV	2	0.188 0.169	0.104	0.82 0.84
		Au 1400-2500 SNV+SG1 3	0.146 0.137	0.134	0.75 0.88
		Rss 1200-2240 SNV	2	0.259 0.296	0.207	0.28 0.37
		Rms 1200-2240 Raw	4	0.121 0.185	0.112	0.82 0.82
		Rbs 1300-2300 SNV+SG1 3	0.119 0.158	0.130	0.74 0.91
	Nitrogen	Alab 1200-2240 SNV+SG1 10 3.6	15.0	5.8	0.98 0.89
	mg.gTS -1	Aip 1200-2240 SNV+SG1 5	9.9	18.4	7.5	0.87 0.83
		Au 1400-2500 SNV	5	10.1	20.7	13.1	0.85 0.51
		Rss 1200-2240 SG2	3	17.2	23.1	21.4	0.62 -0.4
		Rms 1200-2240 SNV+SG1 5	12.6	22.6	12.1	0.80 0.54
		Rbs 1300-2300 SG1+SNV 4	10.7	17.6	11.7	0.83 0.61
	Lipids	Alab 1400-2240 SNV	6	0.025 0.056	0.034	0.99 0.98
	g.gTS -1	Aip 1200-2240 VSN	9	0.057 0.066	0.066	0.99 0.93
		Au 1400-2500 SG1+SNV 6	0.039 0.081	0.067	0.98 0.92
		Rss 1200-2240 Raw	5	0.084 0.110	0.124	0.91 0.74
		Rms 1200-2240 SG2	5	0.029 0.059	0.068	0.99 0.92

Acknowledgements

Financial support from the National Research Institute for Agriculture, Food and Environment (INRAE), the French Agency of National Research and Technology (ANRT) [grant number 2018/0461] and the Biogaz-RIO platform [FEDER-FSE Languedoc Roussillon 2014-2020] is hereby acknowledged.