## 3 Coupling Phytoremediation and Bioenergy Production
### Thermochemical Conversion of Contaminated Biomass: Combustion, Gasification, and Pyrolysis
papryifera_ biomass harvested from phytoremediation can be successfully used to recover HMs by adsorption-pyrolysis technology. In addition, it was observed that the pH value is crucial to increase the adsorptive value of biomass; at pH 6.0, they observed the highest sorption value for Cu and Cd (2.7 wt% and 1.25 wt%). The pyrolysis experiments demonstrated that the highest pH value promotes the yield of solid-phase products and the enrichment of the potentially toxic metals into the residues. Finally, at pH 6 and a pyrolysis temperature of 450 \({}^{\circ}\)C, the residue contained 7.13 wt% (Cd) and 6.58 wt% (Cu), which can be considered as bio-ore. He et al. [83] reported the biomass characterization of _Avicennia marina_, a species distributed in tropical and subtropical coastal mangroves contaminated with metals and metalloids, and the pyrolytic products were studied. In this study, the effect of pyrolysis temperature on the properties of the polluted biomass contaminated with metals (300-800 \({}^{\circ}\)C) and on the subsequent pyrolytic products (biochar, bio-oil, and gas) was studied. The researchers concluded that the presence of metals in the biomass contributes to a significantly higher ash content, and it was also found that during pyrolysis, toxic metals in biomass increase the relative evolution of CO2 and H2 in volatiles, while slightly reducing the CO content. Frequently, metals are not the only soil pollutant. For example, mangroves are environmentally affected by organic and inorganic contaminants such as oil spills and toxic metals runoff. For this reason, He et al. [83] employed _Avicennia marina_ to study the removal of metals in these ecosystems and then evaluated the effect of temperature on the pyrolysis products of this biomass. It was reported that contaminated roots were exposed to land and sediments polluted with metals, such as As, Cr, Ni, and Pb. The biomass was preconditioned by drying and milling and tested with computer-aided thermal analysis (CATA) to calculate the specific heat of the biomass and thermogravimetric analysis (TGA) to determine the change in biomass samples during pyrolysis. The results demonstrated that slow pyrolysis might be an effective technology for converting metal-contaminated biomass into valuable products, remarking that the pyrolysis temperature is the main factor that regulates the physicochemical properties of the pyrolytic products. At the same time, the presence of metals in samples did not have a negative effect; on the contrary, the presence of these metals contributed significantly to higher biochar and pyrolytic gas yields, with a lower bio-oil yield at a temperature range of 300-800 \({}^{\circ}\)C.  
The implementation of pretreatments has been tested to increase the yield of pyrolysis technologies. For example, He et al. [84] pretreated metal-contaminated biomass of _A. marina_ with ferric salts (FeCl3 and Fe(NO3)3) prior to pyrolysis (300-700 \({}^{\circ}\)C) to increase the yield of gases and reduce the bio-oil production. The results showed that the impregnated ferric salts increased the fixed carbon content of biochar, the hydrocarbon fraction in bio-oils, and the evolution of CO2 and H2. During pyrolysis, the ferric salts enhanced the recovery of metals, i.e., As, Cr, Ni, and Pb, in biochar and decreased their distribution in gases. Interestingly, the ferric salt pretreatment inhibited the mobility and bioavailability of most elements in the biochar. This study indicates that ferric salt impregnation catalyzes the pyrolysis process of metal-contaminated biomass, with minimal environmental risks. It provides a new process to optimize the phytoremediation-pyrolysis technology in a safe and value-added way. In an innovative effort to contribute to the sustainability of the valorization of phytoremediation biomass, Zeng et al. [85] evaluated the performance of a solar reactor where metal-contaminated biomass was pyrolyzed. Willow wood (_Salix_ spp.)