## 5 Software of Near-Field Based Communication for the WPT System  
In this section, the software that was implemented in FPGA for near-field communication is presented. The proposed near-field communication is based on orthogonal frequency division multiplexing (OFDM), using multiple subcarriers with different frequencies to transfer information. Only binary-phase shift keying (BPSK) was applied in this work to ensure the robustness of the communication; however, multiple PSKs can also be applied to improve the data rate when necessary. The synchronization in the time domain and calibration in the frequency domain are implemented so that the communication also works when misalignment occurs or in non-stationary scenes. Besides the symbols of synchronization and calibration, all the other symbols are used to transmit information, while the upcoming five symbols are reserved for the WPT state and control parameters. One data package is illustrated in Figure 8.  
The initial symbol (Symbol 0) synchronizes the to-be-demodulated receiver signal so that the start point of the receiver signal can be determined roughly. The start point is important to the demodulation process because an earlier or later start point leads to a phase shift of the by fast Fourier transform (FFT) processed signal in the frequency domain or an intersymbol interference, which results in a flash-bit decision. The synchronization signal  
Figure 7: Block diagram of the communication path. Data are sent from the secondary side to the primary side, and crosstalk from the WPT system via misalignment is introduced. transmitted through the NFC coils is modulated as a superposition of several frequency-selectable sinusoidal functions:  
\[s_{\text{frag}}(n)=\Sigma_{i=1}^{M_{\text{f}}}A_{\text{i}}\sin(\omega_{\text{i}} \frac{n}{f_{\text{s}}}+\varphi_{\text{i}})\text{ for }n\in[0,N_{\text{s}}-1], \tag{32}\]  
where \(A_{\text{i}}\) and \(\varphi_{\text{i}}\) are the amplitudes and phases of the \(M_{\text{f}}\) frequency components, and \(N_{\text{s}}\) is the number of sample points. The modulated signal is repeated \(N_{\text{r}}\) times:  
\[s_{\text{sync}}(n+k\cdot N_{\text{s}})=s_{\text{frag}}(n)\text{ for }k\in[0,N_{\text{r}}-1]. \tag{33}\]  
The generated synchronization signal is shown in the first row of Figure 9, and the second row shows the result of the auto-correlation. The auto-correlation of the signal can be expressed as follows:  
\[s_{\text{result}}(n)=\Sigma_{m=0}^{N_{\text{sync}}-1}s_{\text{sync}}^{\#}(n+m -N_{\text{s}})s_{\text{sync}}^{\#}(n+m), \tag{34}\]  
where \(s_{\text{sync}}^{\#}\) is the distorted signal due to the NFC channel. During the periodic repetition of the synchronization signal, the previous equation is kept constant until the \"Sync.\" signal runs out and the signal in the next symbols comes up. The value of the constant stage can be obtained as follows:  
\[s_{\text{result}}(n)=2N_{\text{s}}\cdot\Sigma_{i=1}^{M_{\text{f}}}(A_{\text{i }}^{\#})^{2}\text{ for }n\in[N_{\text{s}},N_{\text{s}}N_{\text{r}}-1], \tag{35}\]  
where \(A_{\text{i}}^{\#}\) is the changed amplitude of the frequency component due to the NFC channel. Since the synchronization signal is generated on one side and the end of the signal can be detected on another side, both sides of the WPT system can, thus, be synchronized. To detect the synchronization (i.e., the end of the \"Sync.\" signal), the parameters \"Setup Threshold\", \"Minimal Hold Time\", and \"Release Threshold\" should be set appropriately,  
Figure 8: The sequence of the symbols in one data package, which starts from the synchronization signal. Figure 9: The synchronization signal and the processed result signal for synchronization. which mainly avoids the false trigger of synchronization. Different parameters can lead to a shift in the synchronization position; however, the phase shift is compensated in the \"Calib.\" stage. In symbol 1 (the calibration symbol), the phases of all subcarriers are pre-defined on both the transmitter and the receiver.