*3.1. Temperature and Humidity Variation*

In order to ascertain a proper fixing of the FBG to the lithium-ion cell surface and to gain information about the influence of the cell temperature as well as of the relative air humidity on the reflected wavelength, first, the cell is exposed to temperature variations. For this purpose, the temperature chamber 1 is set to 20 ◦C for a sufficiently long time, followed by a step to 25 ◦C, and after a rest time of 4 h, the temperature is increased by a step of 5 K again. The temperature is held at 30 ◦C for 4 h and afterwards the temperature is decreased to 20 ◦C again, by means of 5 K steps, with the same resting periods as during temperature raise. These steps are conducted two times, followed by 40 h with constant temperature. The results can be seen in Figure 5.

During the experiment, relative humidity of the surrounding air in the temperature chamber 2 is additionally recorded with a digital sensor (HYT 939, Innovative Sensor Technology, Ebnat-Kappel, Switzerland). As a result of the regional weather changes, the values for the relative air humidity vary between 45%–55% inside the non-air-conditioned laboratory. For the isothermal period starting from experiment hour 30, no change of the reflected wavelength is expected and almost none is measured by the OSA. Nevertheless, the variation of the reflected wavelength measured by the AWG is 110 pm, as shown in Figure 5.

It is well known that polymeric plastics in general and the EpoClad/EpoCore photoresists used within this research work in particular are hygroscopic [38], and the absorption of water molecules, in turn, changes the optical properties of the AWG. In Figure 6, it can be seen, that for the herein presented humidity range, a linear relationship, including a hysteresis, exists.

**Figure 5.** FBG wavelength measured by the OSA and the AWG, respectively, during the temperature experiment together with the relative air humidity in the surrounding of the AWG. The humidity strongly influences the optical properties of the AWG. The corrected AWG values (blue course) are calculated by using Equation (2).

**Figure 6.** FBG wavelength measured by the AWG during the isothermal period of the temperature experiment shown in Figure 5. In the relevant humidity range there is a linear correlation between the optical output of the AWG and the relative humidity.

To minimize the variation of the AWG output due to the change of relative humidity, a multiple linear regression fit is done, expressed by Equation (2), where ξ is the relative air humidity in percent and ξ the change of the relative humidity in %/min. Λ is the regression constant determined to 853.1 nm, α and β are coefficients determined to −0.0128 nm/% and 0.9077 nm·min/%, respectively. Λc, as the result of Equation (2), represents the corrected wavelength, shown as the blue course in Figure 5.

$$
\Lambda\_{\mathfrak{C}}(\xi, \dot{\xi}) = \Lambda + \mathfrak{a}\,\xi + \,\mathfrak{F}\dot{\xi} \tag{2}
$$

The disturbance-related variation of the AWG values can be decreased to 20 pm during the isothermal period by applying Equation (2). The deviation from the values measured by the OSA during change of the temperature is also improved.
