## 5 Process Control and Traceability  
The control of the quality and safety of food ingredients and commodities are still based on the utilization of discontinuous analyses, where traditional analytical methods used in the laboratory (or sometimes as at/on-line measurements) are commonly used [66; 67]. However, this approach is no longer satisfactory to fulfill the needs of a modern food or waste industry [66; 67]. In particular, because of higher safety and quality standards imposed as well as high-throughput demands in the production facilities, the number of samples to be analyzed is increasing yearly [66; 67]. It is in this context that IRspectroscopy and process analytical technologies (PAT) have been implemented to address these needs along the production, supply, and value chains, leading to a better understanding and control of raw materials, intermediate products in the production process, as well as the final products to be packaged and delivered [66, 67]. Overall, the main objective of PAT is to reach real time analysis to better monitor a process, to avoid waste and efficiencies during the process, and to detect faults [66, 67]. One of the fields in which IR spectroscopy is proven to contribute the most is during the processing of larvae and along the supply and value chain of BSFL [4, 5, 29, 51, 68]. Process analytics have become essential to increase the efficiency and sustainability of the processing. The use of IR spectroscopy can support decision management systems during the evaluation of the most suitable processing methods and control systems during the quality control of either feed or BSFL samples [18, 19, 52].  
The benefits of traceability technologies have been identified and discussed by different authors [68, 69, 70]. Traceability is a common practice by the industry, as it is an integral part of logistics management [68, 69, 70]. Traceability systems require knowledge about the processes from different points of view, including economic, legal, technological, and social issues [68, 69, 70]. The integration of traceability with processing and logistic activities has become important for the manufacturing industries [68, 69, 70]. BSFL production does not avoid these requirements where the traceability of the production system (e.g., assuring the consistency and integrity of the organic waste utilized during the process) is considered to be of importance to implement sustainable rearing systems [68]. The ability of NIR spectroscopy combined with a classification method such as PLS-DA was used to trace the food waste used to grow BSFL [51, 68]. Different BSFL (5 th and 6 th instar) samples collected from commercial production facilities were analyzed where the PLS-DA models were able to distinguish different larval instars. The classification models were able to predict the feed source used for rearing the fifth instar larvae (R\({}^{2}\) of 0.89) and sixth instar prepupae (R\({}^{2}\) of 0.91) [51]. Figure 1 illustrates the key steps or control points where infrared spectroscopy could play a role in black soldier fly production and the circular economy.  
Figure 1: Schematic representation of the key steps where infrared spectroscopy techniques will play a role in black soldier fly production and the circular economy: process control and traceability.