# Traceability and Spectral Analysis of Transmission Error in Rotary Vector Planetary Gear Reducers
## 4 Transmission Error Spectrum Experiment
### Fourier Spectrum Analysis  
The recorded TE signal is a discrete, finite-length time-domain array that encapsulates information about all sources of error. When a sufficient amount of error data are collected, a Fourier transform can identify all the frequency components within the error, and their contributions can be evaluated by calculating the harmonic amplitude and phase. The TE curve \(E(t)\) is a continuous time-domain curve with a period \(T\) that can be expressed as the sum of a constant term and \(N\) cosine functions:  
\[E(t)=\frac{a_{0}}{2}+\sum_{n=1}^{N}A[n]\cos\Bigl{(}2\pi\frac{n}{T}t+\phi[n] \Bigr{)}, \tag{15}\]  
where \(a_{0}/2\) represents a constant term resulting from reducer rigidity and clearance; \(A[n]\) denotes the amplitude of the nth harmonic; \(n/T\) is the nth harmonic frequency; and \(\phi[n]\) is the phase of the nth harmonic. Decomposing the trigonometric function in Equation (15) into orthogonal sine and cosine components, we obtain the following:  
\[E(t)=\frac{a_{0}}{2}+\sum_{n=1}^{N}\Bigl{[}a[n]\cos\Bigl{(}2\pi\frac{n}{T}t \Bigr{)}+b[n]\sin\Bigl{(}2\pi\frac{n}{T}t\Bigr{)}\Bigr{]}, \tag{16}\]  
where \(a[n]=A[n]\cos(\phi[n])\) and \(b[n]=A[n]\sin(\phi[n])\). According to [PERSON]'s formula, the sine and cosine components in Equation (16) can be expressed as complex terms:  
\[\sin\Bigl{(}2\pi\frac{n}{T}t\Bigr{)} = \Bigl{(}e^{2\pi\frac{n}{T}t}+e^{-2\pi\frac{n}{T}t}\Bigr{)}/2,\] \[\cos\Bigl{(}2\pi\frac{n}{T}t\Bigr{)} = \Bigl{(}e^{2\pi\frac{n}{T}t}-e^{-2\pi\frac{n}{T}t}\Bigr{)}/2i\]  
Thus, based on the conjugate properties of complex numbers, Equation (16) can be transformed into the following:  
\[E(t)=\sum_{n=-N}^{N}\frac{a[n]-ib[n]}{2}e^{2\pi}\frac{n}{T}t \tag{17}\]  
Equation (17) represents the complex form of the Fourier series, where \(n=0\) corresponds to the constant term in Equation (15). Let \(c[n]=(a[n]-ib[n])/2\). Since \(c[n]\) is a conjugate complex number, Equation (17) introduces a negative frequency harmonic term of \(-n/T\). According to the properties of complex conjugates, the amplitudes of the positive and negative frequency harmonics are equal, while their phases are opposite. Multiplying both sides of Equation (17) by \(e^{-2\pi\frac{n}{T}t}\) and integrating over one period \(T\), the complex coefficient \(c[n]\) for \(E(t)\) can be derived using the orthogonality of complex functions:  
\[c[n]=\frac{1}{T}\int_{t_{0}}^{t_{0}+T}E(t)e^{-i}\frac{2\pi}{T}nt\mathrm{d}t \tag{18}\]  
The modulus of \(c[n]\) and its conjugate \(c[-n]\) represent half the amplitude of the harmonic at that frequency:  
\[|c[n]|=\frac{1}{2}\sqrt{a[n]^{2}+b[n]^{2}}\]  
Since the error signal obtained is a discrete time-domain sequence, integration is not possible. Let \(X[j]\) be the sampled sequence of \(E(t)\), with N evenly spaced points and time interval \(t\) represented by the sampling frequency \(f_{s}\). When the period of \(X[j]\) is unknown,assume the period equals the number of samples \(N\). Thus, the fundamental frequency is as follows:  
\[f_{0}=f_{\mathrm{s}}/N \tag{19}\]  
Let \(Y[n]\) be the product of complex numbers \(c[n]\) and \(N\). Then, Equation (18) can be expressed in summation form:  
\[Y[n]=\sum_{j=1}^{N}X[j]e^{-i\frac{2\pi}{N}(j-1)(n-1)} \tag{20}\]  
where \(n\) and \(j\) are positive integers from \(1\) to \(N\). Equation (20) represents the exponential form of the discrete Fourier transform (DFT), which can be efficiently computed using fast Fourier transform (FFT) methods. \(Y[n]\) corresponds to a frequency of \((n-1)f_{0}\), where \(Y[n]\) represents the \((n-1)^{\mathrm{th}}\) harmonic. Let the real part of \(Y[n]\) be \(R[n]\) and the imaginary part \(I[n]\). When \(n=1\), it represents the fundamental frequency at \(0\), with \(Y[1]\) being a real constant, representing the constant error component. For \(n>1\), \(Y[n]\) is a complex number, with a modulus equal to \(c[n]\) multiplied by \(N\), which is half the amplitude of the error component at that frequency.