# Indoor Localization Using 6G Time-Domain Feature and Deep Learning
## 2 Channel Modeling and Indoor Positioning System  
### Channel Modeling  
In the context of the 6G terahertz communication channel model, the ray-tracing method is employed to determine the loss and frequency response characteristics. The frequency response of the channel is mathematically expressed as follows:  
\[H(f)=\sum_{k=1}^{N_{p}}A_{k}(f)e^{i\varphi_{k}(f)} \tag{1}\]  
The term \(\varphi(f)\) denotes the phase shift delay associated with the corresponding path. This equation encapsulates the channel frequency response as the superposition of multiple propagation paths, each contributing with a distinct amplitude attenuation and phase shift, which collectively influence the received signal. \(N_{p}\) is the total number of paths, \(f\) is the frequency, and \(A\) is the amplitude of the \(k\)-th ray.  
The shooting and bouncing ray technique is used to transmit a triangular ray tube. As each ray tube interacts with the environment, the system determines whether the receiver lies within a reflected ray tube. If so, the signal from the ray tube is treated as originating from an equivalent source. The system assesses whether a ray encounters an obstacle. When an interaction occurs, it is classified as either a reflection or a transmission. If reflection occurs, the reflection count is increased, and the newly reflected ray is added to the stack; otherwise, the transmitted ray is added without changing the reflection count. This process iterates until all ray tubes are processed. In the simulation, reflections are limited to six bunces to capture a realistic set of detectable rays, while diffraction is constrained to a single instance, as power attenuation is significant beyond the first diffraction event. The carrier frequency is set to 120 GHz with a bandwidth of 14 GHz. The coordinate system uses a three-dimensional model, with the x-y plane representing the horizontal plane and the z-axis representing the height above the ground.  
Once the frequency response is obtained, the inverse Fourier transform is applied in wideband systems to convert the frequency-domain data into time-domain data. The inverse Fourier transform of \(H(f)\) is applied to obtain the time-domain impulse response:  
\[h(t)=\int_{-\infty}^{\infty}H(f)e^{i2\pi ft}df \tag{2}\]  
where \(h(t)\) represents the impulse response of the channel. The integral accumulates contributions from all frequency components, reconstructing the temporal behavior of the signal propagation. The impulse response is fundamental in characterizing channel-induced distortions, including multipath effects and delay spread, which are critical for the design and optimization of high-frequency wireless communication systems. The primary focus of this research is on time-domain processing using CIR to enhance the accuracy of indoor positioning. CIR provides detailed multipath characteristics essential for precise localization. The system collects impulse responses from terahertz wireless sensors, which capture spatial patterns within the indoor environment. The channel characteristics are extracted from the CIR to provide sufficient available information for localization. The extracted characteristics are the first path amplitude, time of arrival for the first path, channel impulse response power, root mean square delay spread, and Received Signal Strength Indicator (RSSI) [7]. This CIR matrix is converted into an image format for neural network processing.