## 2 Methods
### Design and Implementation Approach  
The gait cycle is the summation of two phases of a complete step, namely the stance and swing phases. The stance phase corresponds to the duration during which the foot contacts the ground, while the swing phase corresponds to the time when the foot is lifted off the ground and moves forward in the air, facilitating the advancement of the body. Knee kinematics is represented by two cycles, flexion and extension. The objective is to represent graphically, as a function of the measured wavelength and the measured angle made between the tibia and femur, the full human gait period centered on the knee joint. This is performed by using just one FBG, a single-mode optical fiber, and electronics modules based on two modules, with each containing 3-axis accelerometer and magnetometer sensors that are used to measure their relative angle. The main objective of this study is to validate the proposed concept by measuring the knee's kinematics. For this purpose, a single FBG sensor and a single fiber are placed at the center of the knee joint, while two electronic modules are positioned above and below the knee to measure the subject's motion. To detect the complete range of knee movement during gait, a highly sensitive sensor is required, which can accurately capture movements from the leg's completely straight position to the maximum knee deflection during gait, including the stance and swing phases. The sensing system is designed as a flexible structure that can be easily attached and removed from the knee using small pressure buttons. Figure 6 illustrates the metallic pressure buttons used to attach the various components of the sensing system, including the elastic knee band and the foil with the embedded FBG. The benefits of using FBG sensors as embedded sensing devices are discussed in detail in reference [33]. Figure 5: The inertial modules were strapped with Velcro straps onto the lower thigh (marked with a red circle) and upper leg (marked with a green circle), measuring the different angles obtained by these sections of the leg during a full gait cycle. The placement of the inertial modules in relation to the foil with the FBG. The elastic knee band utilized in this study is commonly employed as a precautionary measure for individuals with temporary or permanent muscle injuries, allowing for the flexible structure to be used by anyone and in any part of the body. The use of pressure buttons guarantees that the sensing component can accurately measure knee flexion and extension during subject movement. The immunity of optical fibers to electromagnetic interference (EMI), as well as their ability to operate effectively in wet environments or underwater, increases the range of potential applications for this technology. Temperature variation is a well-known challenge in Fiber Bragg Grating (FBG) sensor systems, as it affects both the grating period and the effective refractive index of the fiber core, leading to wavelength shifts that can be misinterpreted as mechanical strain. In this work, temperature effects were minimized primarily through signal processing, specifically by applying a high-pass finite impulse response (FIR) filter with a 15 Hz cutoff frequency. This filter effectively eliminates low-frequency components, such as slow temperature drifts, while preserving the higher-frequency signals associated with dynamic limb movement. However, in scenarios where quasi-static measurements or variable environmental conditions are involved, more robust compensation strategies may be required. A commonly used method involves the inclusion of a second, mechanically isolated FBG sensor exposed to the same thermal conditions; the differential signal between the two FBGs provides a temperature-compensated strain measurement. Alternatively, FBG packaging with thermally matched or insulating materials can reduce sensitivity to ambient fluctuations by minimizing thermal gradients.