**1. Introduction**

Shape memory alloys (SMA) composites show their exceptional performance in adapting some physical parameters, such as shape, vibration, and impact resistance through a centralized control system [1,2]. However, a deformation of composite structures, resulting in the complex redistribution of stress states between matrix and reinforcement, is considered to be an important research topic that has been reported in the literature [2]. Thus, critical states reached by extreme deformation can be detected by using embedded sensors, which provide reliable information to the system.

In the last years, important issues related with some constraints identified in SMA alloys, such as nickel–titanium (NiTi), have been reported: (1) The importance of indirect identification of the present phases and their transformations in a composite system incorporating SMA elements [3], (2) the incorporation of SMA allows to monitor the deformation/stress state of structural components but, if shape memory alloying elements are to be used to act as actuators, composite monitoring must be done by third sensory elements added. It is, therefore, important that these sensors can identify not only temperature variations and mechanical stress, but also, indirectly, the structural constituents present and the structural changes they undergo, especially given the nonlinearities of response that may exist in certain contexts [4].

The use of optical fiber sensors (OFS) for structural monitoring and detection of defects and temperature fluctuations in different materials has been suggested by several researchers [5–7]. There are many advantages associated with OFS technology, such as its reduced dimensions, immunity to electromagnetic interference, passivity, chemical inertness, multiplexing capability, nearly punctual sensing, and the capability to measure different parameters within one single optical fiber [8]. Regarding the specific application of OFS as a Non-Destructive Testing (NDT) for Additive Manufacturing (AM), different solutions can be applied as a complementary technique [9].

There are multiple OFS configurations, depending on the application, the required resolution, and/or sensitivity [8,10]. From all these possible configurations, fiber Bragg gratings (FBGs) are the most favorable solutions to NDT for AM based composite products. However, these sensors suffer from large cross-sensitivity, mainly strain, and temperature. To overcome this, a method based on using two different FBGs in two different fibers has shown to be the most reliable and easy technique to simultaneously monitor and discriminate these parameters [11]. Nevertheless, when it is intended to discriminate the parameters in embedded materials, such as polylactic acid (PLA) samples, this method can be a challenge, due to the need of having strain-free FBGs introduced inside other protective materials (for instance, a capillary tube), increasing the invasiveness on the sample [12].

To solve the need for internal discrimination of temperature and strain when monitoring their simultaneous variations, hybrid sensors comprising FBG and interferometric FP sensors can be fabricated, forming a cascaded optical sensor in which each element has different sensitivities. This way, the invasiveness inside the host material decreases, once only a single optical fiber is used to monitor the same point [13]. However, when this type of sensor is embedded in materials, an internal calibration for temperature and strain is needed, due to the mechanical stresses induced by the surrounding material [14,15]. Therefore, the use of OFS can be an important tool to assess and detect characteristic parameters in different types of materials, such as polymeric and/or SMA, depending on the sensing configuration used, behaving as an NDT.

This work is about the use of AM (MEX) technology for the production of polymer matrix composite materials reinforced with previously functionalized NiTi wires. Three essential aspects of the application of this technology for the production of these composite materials were addressed: (1) The evaluation of the effect of the process (AM-MEX) on the properties of NiTi wires and their heat treatment (by monitoring the time and temperature to which it is subjected during production), (2) the evaluation of the mechanical and thermal behavior of the material in service (with the measurement of the stresses during tensile tests, evaluation of the adhesion of the matrix wires), (3) non-destructive inspection/material quality, using thermography and Joule effect on embedded NiTi wires to confirm disposition and whether heat-treatment (functionally graded materials) has been maintained. For that, an optical fiber sensing network based on FBGs and cascaded OFS was embedded in a 3D printed PLA matrix reinforced by NiTi wires to real-time monitor, temperature and strain shifts, in the PLA matrix, and temperature variations, which are associated to structural transformations in NiTi wires, during Joule heating of the NiTi wires and tensile cyclic load/unload.

#### **2. Materials and Methods**

#### *2.1. Fiber Optic Sensors*

Usually, an FBG sensor consists of a short segment of a single-mode optical fiber (SMF) with a photoinduced periodic modulation of the fiber core refractive index. When this device is illuminated by a broadband optical source, the reflected power spectrum shows a sharp peak, which is caused by interference of light with the planes of the grating and can be defined through Equation (1) [10]:

$$
\lambda\_B = 2n\_{eff}\Lambda\_\star \tag{1}
$$

where λ*<sup>B</sup>* is the so-called Bragg wavelength, *ne*ff is the effective refractive index of the core mode, and Λ is the grating period. When the optical fiber is exposed to external parameters, such as temperature and strain, both *ne*ff and Λ can be modified, resulting in a shift of the Bragg wavelength.

The sensor sensitivity towards a given parameter is obtained by monitoring the Bragg wavelength behavior while exposing the sensor to pre-determined and controlled conditions. In the case of a linear response, the sensitivity is provided by the slope of the obtained linear fit. The effects of temperature are accounted for in the Bragg wavelength shift by differentiating Equation (1):

$$
\Delta\lambda = \lambda\_B \left(\frac{1}{n\_{eff}} \frac{\partial n\_{eff}}{\partial T} + \frac{1}{\Lambda} \frac{\partial \Lambda}{\partial T}\right) \Delta T = \lambda\_B (\alpha + \xi) \Delta T = k\_T \Delta T,\tag{2}
$$

where α and ξ are the thermal expansion and thermo-optic coefficient of the optical fiber material, respectively [15]. By inscribing FBGs with different Bragg wavelengths, by changing the grating period, it is possible to get multiple temperature sensors within one single fiber. Thus, inspection and mapping of the sample temperature can be done by simultaneously monitoring the spectral variations of all sensors. This technique can be combined with other conventional methods, such as thermography analysis to produce a complete thermal analysis of a given sample material [16].

The sensing configuration that was employed to monitor the internal temperature and strain shifts on the PLA matrix consisted of cascaded optical fiber sensors, whose configuration scheme is shown in Figure 1. The simultaneous strain and temperature discrimination inside the PLA sample can be performed, combining the signals of the FBG sensor with the FP cavity interferometer, forming a cascaded optical fiber sensor. The FP cavity was fabricated by producing an air microbubble between a single-mode fiber (SMF 28e) and a multimode fiber (MMF, GIF625) [17]. To achieve point-of-care monitoring, the FBG was inscribed as close as possible to the FP interferometer.

**Figure 1.** Diagram of the cascaded optical fiber sensor. LFP represents the cavity length.

Assuming a linear response of the FBG to strain and temperature, the strain and temperature shifts (Δε and Δ*T*, respectively) are provided by:

$$
\Delta\lambda\_{\rm FBG} = k\_{\rm FBG\_{\rm I}}\Delta\varepsilon + k\_{\rm FBG\_{T}}\Delta T,\tag{3}
$$

where *kFBG*ε, and *kFBGT* are the strain and temperature sensitivities of the FBG, respectively, which were determined in the calibration procedure.

The FP interferometer can also work as a strain and temperature sensor, where the wavelength shift, Δλ*FP*, is given by:

$$
\Delta\lambda\_{FP} = k\_{FP\_\varepsilon}\Delta\varepsilon + k\_{FP\_\Upsilon}\Delta T\_\prime \tag{4}
$$

where *kFP*<sup>ε</sup> and *kFPT* are the strain and temperature sensitivities, respectively. Thus, the temperature and strain variations can be discriminated through the matrixial method, using Equations (3) and (4). If the sensitivity values are known, a sensitivity matrix for simultaneous measurement of strain and temperature can be obtained as:

$$
\begin{bmatrix}
\Delta \varepsilon \\
\Delta T
\end{bmatrix} = \frac{1}{\mathcal{M}} \begin{bmatrix}
k\_{FP\_T} & -k\_{FBG\_T} \\
\end{bmatrix} \begin{bmatrix}
\Delta \lambda\_{FBG} \\
\Delta \lambda\_{FP}
\end{bmatrix} \tag{5}
$$

where *M* = *kFPT* × *kFBG*<sup>ε</sup> − *kFP*<sup>ε</sup> × *kFBGT* is the determinant of the coefficient matrix, which must be non-zero for simultaneous measurement. Thus, internal discrimination of strain and temperature in the PLA matrix can be improved by combining the reflection spectra of this cascaded optical sensor.

The main advantages of this process are different strain and temperature sensitivities between the two sensing elements, together with the use of a single fiber to monitor the same point, decreasing the invasiveness inside the PLA matrix composite. No extra-material integration is needed with this method. Moreover, the strain values obtained can be converted to displacement variations (Δ*L*), by multiplying the detected strain values by the sample length.
