A Biproportional Construction Algorithm for Correctly Calculating Fourier Series of Aperiodic Non-Sinusoidal Signal
Abstract: The Fourier series (FS) applies to a periodic non-sinusoidal function satisfying the Dirichlet conditions, whereas the being-processed function in practical applications is usually an aperiodic non-sinusoidal signal. When is aperiodic, its calculated FS is not correct, which is still a challenging problem. To overcome the problem, we derive a direct calculation algorithm, a constant iteration algorithm, and an optimal iteration algorithm. The direct calculation algorithm correctly calculates its Fourier coefficients (FCs) when is periodic and satisfies the Dirichlet conditions. Both the constant iteration algorithm and the optimal iteration algorithm provide an idea of determining the states of . From the idea, we obtain an algorithm for determining the states of based on the optimal iteration algorithm. In the algorithm, the variable iteration step is introduced; thus, we present an algorithm for determining the states of based on the variable iteration step. The presented algorithm accurately determines the states of . On the basis of these algorithms, we build a biproportional construction theory. The theory consists of a first and a second proportional construction theory. The former correctly calculates the FCs of at the present sampling time

1. Introduction

The Fourier series (FS) was proposed by Jean Baptiste Joseph Fourier (1768-1830, a French mathematician and physicist) to solve the heat equation in a metal plate in 1807. The FS since then has been continually developed and perfected by many mathematicians, such as Dirichlet, Dini, Gibbs, Kolmogorov  , Carleson  , and Iserles  . The FS is a branch of Fourier analysis nowadays. The FS has been applied to almost all disciplines, including physics   , architectonics   , electronics   , electrical engineering    , and signal processing    .

The FS applies to a periodic non-sinusoidal function satisfying the Dirichlet conditions: The function must have a finite number of maxima, minima, and discontinuities in one period, and be absolutely integrable over a period. However, the being-processed function $f\left(t\right)$ in practical applications is usually an aperiodic non-sinusoidal signal defined as follows. $f\left(t\right)$ is aperiodic for $t\in \left({t}_{s},\text{}{t}_{s}+mT\right)$, and is T-periodic and satisfies the Dirichlet conditions for $t\in \left[0,\text{}{t}_{s}\right]\cup \left[{t}_{s}+mT,\text{}+\infty \right]$, where ${t}_{s}>0$, t is time, and m is a sufficiently small positive integer like 1 or 2. For instance, $g\left(t\right)$ is illustrated in Figure 1, where $g\left(t\right)$ is aperiodic for $t\in \left(0.17,\text{}0.21\right)$, and is periodic and satisfies the Dirichlet conditions for $t\in \left[0,\text{}0.17\right]\cup \left[0.21,\text{}0.34\right]$.

According to the FS, the FS of the being-processed function $f\left(t\right)$ can be expressed as

$f\left(t\right)~{a}_{0}^{\ast }+\underset{k=1}{\overset{\infty }{\sum }}\left[{a}_{k}^{\ast }\mathrm{cos}\left(k\omega t\right)+{b}_{k}^{\ast }\mathrm{sin}\left(k\omega t\right)\right]\text{ }\text{ },$ (1)

where

$\left\{\begin{array}{l}{a}_{0}^{\ast }=\frac{1}{T}{\int }_{0}^{T}f\left(t\right)dt=\frac{1}{T}{\int }_{{t}_{1}-T}^{{t}_{1}}f\left(t\right)dt\\ {a}_{k}^{\ast }=\frac{2}{T}{\int }_{0}^{T}f\left(t\right)\mathrm{cos}\left(k\omega t\right)dt=\frac{2}{T}{\int }_{{t}_{1}-T}^{{t}_{1}}f\left(t\right)\mathrm{cos}\left(k\omega t\right)dt,\text{}k=1,\text{}2,\text{}3,\text{}\cdots \end{array}$ (2)

and

${b}_{k}^{\ast }=\frac{2}{T}{\int }_{0}^{T}f\left(t\right)\mathrm{sin}\left(k\omega t\right)dt=\frac{2}{T}{\int }_{{t}_{1}-T}^{{t}_{1}}f\left(t\right)\mathrm{sin}\left(k\omega t\right)dt,\text{}k=1,\text{}2,\text{}3,\text{}\cdots$ (3)

Figure 1. An aperiodic non-sinusoidal signal $g\left(t\right)$.

In Equations (1)-(3), ${a}_{0}^{\ast }$, ${a}_{k}^{\ast }$, and ${b}_{k}^{\ast }$ are all called the Fourier coefficients (FCs) of $f\left(t\right)$ ; T is the period of $f\left(t\right)$, and $\omega =2\pi /T$ ; and ${t}_{1}>0$.

From the FS, a precondition for Equation (1) is that $f\left(t\right)$ is a periodic non-sinusoidal function satisfying the Dirichlet conditions.

When $f\left(t\right)$ is periodic and satisfies the Dirichlet conditions, the precondition for Equation (1) is satisfied, and thus it is correct that $f\left(t\right)$ is expressed as Equation (1). Hence, ${a}_{k}^{\ast }$ and ${b}_{k}^{\ast }$ are correctly calculated by Equations (2) and (3), respectively, and thus its FS is correctly calculated by Equation (1). However, when $f\left(t\right)$ is aperiodic, the precondition for Equation (1) is not satisfied, and thus it is not correct that $f\left(t\right)$ is expressed as Equation (1). Therefore, ${a}_{k}^{\ast }$ and ${b}_{k}^{\ast }$ are not correctly calculated by Equations (2) and (3), respectively, and thus its FS is not correctly calculated by Equation (1). At present, how to calculate its FS correctly when $f\left(t\right)$ is aperiodic is still a problem necessary to solve.

The FS of $f\left(t\right)$ is correctly calculated if the FCs of $f\left(t\right)$ are. Therefore, numerous methods have been researched and reported as follows: many methods and algorithms for calculating the FCs  -  , some estimates of the FCs   , a few methods for determining the FCs of the particular functions   , various formulae for computing the FCs of the special functions    , and other methods. Each of these methods has its own applicability and merits, whereas how to calculate its FS correctly when $f\left(t\right)$ is aperiodic is still a challenging problem.

In practical applications, myriad signals in various disciplines (like the nonlinear load current in electrical engineering) can be considered as the being-pro- cessed function defined above. The being-processed function is denoted by $f\left(t\right)$ unless a specific description is given in this article. Although its FS is correctly calculated when $f\left(t\right)$ is periodic and satisfies the Dirichlet conditions, its FS is not correctly calculated when $f\left(t\right)$ is aperiodic. Nowadays, how to calculate its FS correctly when $f\left(t\right)$ is aperiodic is an important engineering calculation problem difficult to solve, and also an interesting mathematical- physical problem. The problem has to be solved because of numerous practical applications. To solve the problem, we will achieve the following main contributions:

1) Four basic concepts will be correctly defined.

2) A direct calculation algorithm, a constant iteration algorithm, and an optimal iteration algorithm will be derived.

3) A biproportional construction theory will be built, and then a biproportional construction algorithm will be proposed from the theory.

4) An algorithm for determining the states of $f\left(t\right)$ based on the variable iteration step will be presented.

The proposed biproportional construction algorithm correctly calculates its FCs whether $f\left(t\right)$ is periodic or aperiodic, and thus its FS. Therefore, the problem is solved. The rest of this article will be organized as follows. Section 2 will define four basic concepts and prove one theorem. In Sections 3-5, a direct calculation algorithm, a constant iteration algorithm, and an optimal iteration algorithm will be derived, respectively. A biproportional construction theory, a biproportional construction algorithm, and an algorithm for determining the states of $f\left(t\right)$ based on the variable iteration step will be proposed in Section 6. The proposed biproportional construction algorithm will be validated by the simulation results and the experimental results. Finally, Section 7 will summarize the main conclusions.

2. Definitions and Theorem

It is assumed that $\left(3N-2\right)$ samples of $f\left(t\right)$ and those of $\mathrm{cos}\left(k\omega t\right)$ are defined as $f\left(i\right)=f\left({t}_{1}+iT/\left(N-1\right)\right)$ and ${\mathrm{cos}}_{k}\left(i\right)=\mathrm{cos}\left(k\omega \left({t}_{1}+iT/\left(N-1\right)\right)\right)$, respectively, for $i=0,\text{}1,\text{}\cdots ,\text{}\left(3N-3\right)$ in any three consecutive periods $\left[{t}_{1},\text{}{t}_{1}+3T\right]$, where ${t}_{\text{1}}>0$.

Definition 2.1. If $f\left(t\right)=f\left(t-T\right)$ for all t in the period $\left[{t}_{1},\text{}{t}_{1}+T\right]$,then $f\left(t\right)$ changes periodically in the period. That is, $f\left(t\right)$ is in stable states in

the period. Thus, ${a}_{k}^{\ast }=\frac{2}{T}{\int }_{{t}_{1}-T}^{{t}_{1}}f\left(t\right)\mathrm{cos}\left(k\omega t\right)dt=\frac{2}{T}{\int }_{{t}_{1}}^{{t}_{1}+T}f\left(t\right)\mathrm{cos}\left(k\omega t\right)dt$ in the

period.

Definition 2.2. If $f\left(t\right)\ne f\left(t-T\right)$ for any t in the period $\left[{t}_{1},\text{}{t}_{1}+T\right]$, then $f\left(t\right)$ changes nonperiodically in the period. That is, $f\left(t\right)$ is in unstable states in the period.

Definition 2.3. If $f\left(t\right)$ is in stable states in the period $\left[{t}_{1},\text{}{t}_{1}+T\right]$ and if $f\left(N\right)=f\left(1\right)$, then $f\left(t\right)$ changes periodically at the sampling time $t={t}_{1}+NT/\left(N-1\right)$. That is, $f\left(t\right)$ is in a stable state at the sampling time. Thus,

${a}_{k}^{\left(N\right)\ast }=\frac{2}{T}{\int }_{{t}_{1}-T}^{{t}_{1}}f\left(t\right)\mathrm{cos}\left(k\omega t\right)dt=\frac{2}{T}{\int }_{{t}_{1}}^{{t}_{1}+T}f\left(t\right)\mathrm{cos}\left(k\omega t\right)dt$, where ${a}_{k}^{\left(N\right)\ast }$ denotes

${a}_{k}^{\ast }$ of $f\left(t\right)$ at the sampling time.

Definition 2.4. If $f\left(t\right)$ is in stable states in the period $\left[{t}_{1},\text{}{t}_{1}+T\right]$ and if $f\left(N\right)\ne f\left(1\right)$, then $f\left(t\right)$ changes nonperiodically at the sampling time $t={t}_{1}+NT/\left(N-1\right)$. That is, $f\left(t\right)$ is in an unstable state at the sampling time.

Thus, ${a}_{k}^{\left(N\right)\ast }=\frac{2f\left(N\right)}{Tf\left(1\right)}{\int }_{{t}_{1}-T}^{{t}_{1}}f\left(t\right)\mathrm{cos}\left(k\omega t\right)dt=\frac{2f\left(N\right)}{Tf\left(1\right)}{\int }_{{t}_{1}}^{{t}_{1}+T}f\left(t\right)\mathrm{cos}\left(k\omega t\right)dt$.

Definitions 2.1-2.3 are correctly defined from the FS of $f\left(t\right)$. Besides, $f\left(t\right)$ is in stable states in the period $\left[{t}_{1},\text{}{t}_{1}+T\right]$ and $f\left(N\right)\ne f\left(1\right)$. Thus, we infer that $f\left(t\right)$ should change in the same proportion $f\left(N\right)/f\left(1\right)$ for all t in the period $\left[{t}_{1}+NT/\left(N-1\right),\text{}{t}_{1}+NT/\left(N-1\right)+T\right]$. For this reason, Definition 2.4 is defined above.

Theorem 2.1. If $f\left(t\right)$ is a periodic non-sinusoidal function satisfying the Dirichlet conditions, then ${\int }_{{t}_{1}-T}^{{t}_{1}}{\left[f\left(t\right)-{a}_{k}\mathrm{cos}\left(k\omega t\right)\right]}^{2}dt$ attains its absolute minimum at ${a}_{k}={a}_{k}^{\ast }$ for $k=0,\text{1,2,}\cdots$, where T is the period of $f\left(t\right)$ and $\omega =2\pi /T$.

Proof. It is assumed that $h\left({a}_{k}\right)={\int }_{{t}_{1}-T}^{{t}_{1}}{\left[f\left(t\right)-{a}_{k}\mathrm{cos}\left(k\omega t\right)\right]}^{2}dt$. Then, it follows from ${h}^{\prime }\left({a}_{k}\right)=0$ and Equation (2) that

$\left\{\begin{array}{l}{a}_{0}=\frac{1}{T}{\int }_{{t}_{1}-T}^{{t}_{1}}f\left(t\right)dt=\frac{1}{T}{\int }_{0}^{T}f\left(t\right)dt={a}_{0}^{\ast },\\ {a}_{k}=\frac{2}{T}{\int }_{{t}_{1}-T}^{{t}_{1}}f\left(t\right)\mathrm{cos}\left(k\omega t\right)dt=\frac{2}{T}{\int }_{0}^{T}f\left(t\right)\mathrm{cos}\left(k\omega t\right)dt={a}_{k}^{\ast },\text{}k=1,\text{}2,\text{}3,\text{}\cdots \end{array}$

Moreover, ${h}^{″}\left({a}_{0}^{\ast }\right)=2T>0$ and ${h}^{″}\left({a}_{k}^{\ast }\right)=T>0$ for $k=0,\text{1,2,}\cdots$. Therefore, $h\left({a}_{k}\right)$ attains its absolute minimum at ${a}_{k}={a}_{k}^{\ast }$ for $k=0,\text{1,2,}\cdots$. Thus, Theorem 2.1 is proved.

3. Direct Calculation Algorithm

3.1. Direct Calculation Algorithm

It is assumed that $p\left({a}_{k}^{\left(N-1\right)}\right)=\underset{i=0}{\overset{N-1}{\sum }}{\left[f\left(i\right)-{a}_{k}^{\left(N-1\right)}{\mathrm{cos}}_{k}\left(i\right)\right]}^{2}$. Then, it is obtained

from ${p}^{\prime }\left({a}_{k}^{\left(N-1\right)}\right)=0$ that

${a}_{k}^{\left(N-1\right)}=\underset{i=0}{\overset{N-1}{\sum }}\left[f\left(i\right){\mathrm{cos}}_{k}\left(i\right)\right]/\underset{i=0}{\overset{N-1}{\sum }}{\left[{\mathrm{cos}}_{k}\left(i\right)\right]}^{2},\text{}k=0,\text{}1,\text{}2,\text{}\cdots .$ (4)

At the sampling time $t={t}_{1}+T$, ${a}_{k}^{\left(N-1\right)}$ is calculated by Equation (4), and then ${a}_{k}^{\ast }\mathrm{cos}\left(k\omega t\right)={a}_{k}^{\left(N-1\right)}{\mathrm{cos}}_{k}\left(N-1\right)$. Similarly, at the next sampling time, ${a}_{k}^{\ast }\mathrm{cos}\left(k\omega t\right)={a}_{k}^{\left(N\right)}{\mathrm{cos}}_{k}\left(N\right)$. …. This algorithm is designated as a direct calculation algorithm for calculating ${a}_{k}^{\ast }\mathrm{cos}\left(k\omega t\right)$ because ak is directly calculated by Equation (4).

Similarly, a direct calculation algorithm for calculating ${b}_{k}^{\ast }\mathrm{sin}\left(k\omega t\right)$ can be derived. The direct calculation algorithm for calculating ${a}_{k}^{\ast }\mathrm{cos}\left(k\omega t\right)$ and that for calculating ${b}_{k}^{\ast }\mathrm{sin}\left(k\omega t\right)$ are collectively designated as a direct calculation algorithm for calculating the FS of $f\left(t\right)$, or a direct calculation algorithm for short.

3.2. Calculation Complexity Analysis

Although the FS of $f\left(t\right)$ consists of infinite terms, it is only necessary to calculate one or a few of the infinite terms in practical applications. Thus, taking calculating the term ${a}_{1}^{\ast }\mathrm{cos}\left(\omega t\right)$ as an example, we conduct the calculation complexity analysis, calculation accuracy analysis, simulation, and experiment.

From the direct calculation algorithm for calculating ${a}_{1}^{\ast }\mathrm{cos}\left(\omega t\right)$, it is appropriate to utilize a DSP (digital signal processing) to implement it. Its calculation complexity is much reduced by using space in exchange for time. The block diagram of the memory cells and calculation process of this algorithm is presented in Figure 2. At the beginning, N consecutive memory cells from 0 to $\left(N-1\right)$, having the same number of words, store $f\left(i\right){\mathrm{cos}}_{1}\left(i\right)$ for $i=0,\text{}1,\text{}\cdots ,\text{}\left(N-1\right)$, respectively. A first product pointer points to Memory cell 0.

$to{t}_{N-1}=\underset{i=0}{\overset{N-2}{\sum }}\left[f\left(i\right){\mathrm{cos}}_{1}\left(i\right)\right]$, and $to{t}_{N}=\underset{i=0}{\overset{N-1}{\sum }}\left[f\left(i\right){\mathrm{cos}}_{1}\left(i\right)\right]$. The calculation process

of this algorithm is as follows. When the present samples $f\left(p\right)$ and ${\mathrm{cos}}_{1}\left(p\right)$ arrive, $f\left(p\right){\mathrm{cos}}_{1}\left(p\right)$ is obtained by multiplying ${\mathrm{cos}}_{1}\left(p\right)$ by $f\left(p\right)$, $to{t}_{N}$ by

Figure 2. The block diagram of the memory cells and calculation process of the direct calculation algorithm for calculating ${a}_{1}^{\ast }\mathrm{cos}\left(\omega t\right)$.

adding $to{t}_{N-1}$ and $f\left(p\right){\mathrm{cos}}_{1}\left(p\right)$, a1 by dividing $to{t}_{N}$ by $\underset{i=0}{\overset{N-1}{\sum }}{\left[{\mathrm{cos}}_{1}\left(i\right)\right]}^{2}$, and

${a}_{1}{\mathrm{cos}}_{1}\left(p\right)$ by multiplying ${\mathrm{cos}}_{1}\left(p\right)$ by a1. Finally, $to{t}_{N-1}$ is obtained by subtracting the product, stored in the memory cell being pointed to by the first product pointer, from $to{t}_{N}$. Then, $f\left(p\right){\mathrm{cos}}_{1}\left(p\right)$ is stored in the memory cell, and the pointer points to the next memory cell. If the pointer is pointing to Memory cell N, then it points to Memory cell 0 immediately. Moreover,

$\underset{i=0}{\overset{N-1}{\sum }}{\left[{\mathrm{cos}}_{1}\left(i\right)\right]}^{2}$ is a constant because N is. Thus, its calculation complexity per

iteration is one addition operation, one subtraction operation, two multiplication operations, and one division operation. Therefore, it is very low and does not change with N.

3.3. Calculation Accuracy Analysis

When $f\left(t\right)$ changes periodically, the precondition for Equation (1) is satisfied. Thus, the larger N, the higher the accuracy of the calculated a1, according to the direct calculation algorithm for calculating ${a}_{1}^{\ast }\mathrm{cos}\left(\omega t\right)$, the FS of $f\left(t\right)$, and the sampling theorem. For this reason, the calculated a1 is correct within an allowable error because N can be large enough because of the very low calculation complexity of this algorithm and the very high calculation speed of existing DSPs.

When $f\left(t\right)$ changes nonperiodically, the precondition for Equation (1) is not satisfied. Thus, the calculated a1 is not correct, and its accuracy depends on the tracking performance of this algorithm. From the following simulation results and experimental results, the calculated a1 tracks ${a}_{1}^{\ast }$ smoothly.

3.4. Simulation Results and Experimental Results

The experimental system block diagram is shown in Figure 3, where, the system consists of a zero-crossing comparator, an UA206, and a computer.

The zero-crossing comparator is implemented by an operational amplifier

Figure 3. The experimental system block diagram.

OP07, its input is $\mathrm{cos}\left(\omega t\right)$, and its output is a square-wave signal acting as $f\left(t\right)$. The UA206 is an A/D data acquisition board, developed by a company in Beijing; and it has sixteen 16-bit A/D converters. Its highest sampling frequency is 500 kHz, and its analog input signals range up to ±10 V. Moreover, a VB source code framework demonstrating that signals are sampled and displayed is provided by the company. Thus, from the framework and the direct calculation algorithm for calculating ${a}_{1}^{\ast }\mathrm{cos}\left(\omega t\right)$, the experimental program is easily designed. When the experiments are done, the two analog signals $f\left(t\right)$ and $\mathrm{cos}\left(\omega t\right)$ are the inputs of the UA206 and are converted into two digital signals by two of the A/D converters. Then, the two digital signals are sent to the computer via its PCI port. When the experimental program is executed, $f\left(t\right)$, $\mathrm{cos}\left(\omega t\right)$, the calculated a1, and the computed ${a}_{1}\mathrm{cos}\left(\omega t\right)$ are displayed on the computer screen. Thus, it is convenient to observe and record the experimental waveforms.

To validate the direct calculation algorithm for calculating ${a}_{1}^{\ast }\mathrm{cos}\left(\omega t\right)$, the simulations and the experiments are carried out. The simulation results are depicted in Table 1 and Figure 4, and the experimental results in Figure 5. In

Table 1, $f\left(t\right)=\left\{\begin{array}{l}-10,\text{5}\le t<15\\ +10,\text{15}\le t<25\end{array}$ and $f\left(t+20\right)=f\left(t\right)$ ; and a1 and ${a}_{1}^{\ast }$ are

calculated by Equations (4) and (2), respectively. Table 1 indicates that the calculated a1 is correct within an allowable error when $f\left(t\right)$ changes periodically and when N is large enough. In Figure 4, MATLAB 7.0 is applied, $N=500$, and $T=0.02\text{\hspace{0.17em}}\text{s}$. In Figure 5, $N=200$ and $T=0.02\text{\hspace{0.17em}}\text{s}$. Figure 4 and Figure 5 indicate that the calculated a1 is a constant and thus correct, when $f\left(t\right)$ changes periodically. The calculated a1 tracks ${a}_{1}^{\ast }$ smoothly and thus is not correct, and all response times are 0.02 s (one period), when $f\left(t\right)$ changes nonperiodically. Particularly, the calculated a1 has a considerably large error when $f\left(t\right)$ step changes. In addition, the further experiments indicate that this algorithm is stable and reliable, and its calculation results are very slightly affected by small changes in the frequency of $f\left(t\right)$.

3.5. Brief Summary

We have derived a direct calculation algorithm. This algorithm correctly calculates its FCs when $f\left(t\right)$ changes periodically, but not when $f\left(t\right)$ changes nonperiodically. Particularly, this algorithm has a considerably large calculation error when $f\left(t\right)$ step changes. Thus, it is necessary to find a method for correctly calculating its FCs, when $f\left(t\right)$ changes nonperiodically.

Table 1. The datasheet of N, a1, and ${a}_{1}^{\ast }$.

Figure 4. (a)-(c) The simulation results of the direct calculation algorithm for calculating ${a}_{1}^{\ast }\mathrm{cos}\left(\omega t\right)$ with a step increase, a linear increase, and an exponential decrease, respectively, in $f\left(t\right)$.

4. Constant Iteration Algorithm

4.1. Constant Iteration Algorithm

It is assumed that ${a}_{k}^{\left(N-1\right)}$ denoting ${a}_{k}^{\left(N-1\right)\ast }$, ${a}_{k}^{\ast }$ of $f\left(t\right)$ at the sampling time $t={t}_{1}+T$, has been calculated iteratively; and that ${a}_{k}^{\left(N\right)}$ denoting ${a}_{k}^{\left(N\right)\ast }$, ${a}_{k}^{\ast }$ of $f\left(t\right)$ at the next sampling time, will be calculated iteratively. On the basis of ${a}_{k}^{\left(N-1\right)}$, ${a}_{k}^{\left(N\right)}$ will approach ${a}_{k}^{\left(N\right)\ast }$ when $f\left(t\right)$ changes periodically, and track when $f\left(t\right)$ changes nonperiodically. However, whether ${a}_{k}^{\left(N-1\right)}\ge {a}_{k}^{\left(N\right)\ast }$ cannot be determined; thus, a tentative comparison is adopted to determine the iterative calculation direction according to Theorem 2.1.

It is assumed that hk represents the iteration step. Then, it follows from Theorem 2.1 that

${A}_{k0}=\underset{i=1}{\overset{N}{\sum }}{\left[f\left(i\right)-{a}_{k}^{\left(N-1\right)}{\mathrm{cos}}_{k}\left(i\right)\right]}^{2},$ (5)

${A}_{k1}=\underset{i=1}{\overset{N}{\sum }}{\left\{f\left(i\right)-\left[{a}_{k}^{\left(N-1\right)}+{h}_{k}\right]{\mathrm{cos}}_{k}\left(i\right)\right\}}^{2},$ (6)

Figure 5. (a)-(c) The experimental results of the direct calculation algorithm for calculating ${a}_{1}^{\ast }\mathrm{cos}\left(\omega t\right)$ with no change, a slow decrease, and a step decrease, respectively, in $f\left(t\right)$.

and

${A}_{k2}=\underset{i=1}{\overset{N}{\sum }}{\left\{f\left(i\right)-\left[{a}_{k}^{\left(N-1\right)}-{h}_{k}\right]{\mathrm{cos}}_{k}\left(i\right)\right\}}^{2}.$ (7)

From Equations (5)-(7), it is obtained that

$\begin{array}{l}{A}_{k12}={A}_{k1}-{A}_{k2}=-4{h}_{k}\underset{i=1}{\overset{N}{\sum }}\left[f\left(i\right){\mathrm{cos}}_{k}\left(i\right)\right]+4{h}_{k}{a}_{k}^{\left(N-1\right)}\underset{i=1}{\overset{N}{\sum }}{\left[{\mathrm{cos}}_{k}\left(i\right)\right]}^{2}\\ \text{}=-4{h}_{k}\underset{i=1}{\overset{N}{\sum }}\left[f\left(i\right){\mathrm{cos}}_{k}\left(i\right)\right]+4{h}_{k}{a}_{k}^{\left(N-1\right)}{C}_{SS}=4{h}_{k}{A}_{k00},\end{array}$ (8)

${A}_{k1\text{0}}={A}_{k1}-{A}_{k0}=2{h}_{k}{A}_{k\text{00}}+{h}_{k}^{2}{C}_{SS},$ (9)

and

${A}_{k2\text{0}}={A}_{k2}-{A}_{k0}=-2{h}_{k}{A}_{k\text{00}}+{h}_{k}^{2}{C}_{SS}.$ (10)

In Equations (8)-(10),

${C}_{SS}=\underset{i=1}{\overset{N}{\sum }}{\left[{\mathrm{cos}}_{k}\left(i\right)\right]}^{\text{2}}$ (11)

and

${A}_{k\text{00}}=-\underset{i=1}{\overset{N}{\sum }}\left[f\left(i\right){\mathrm{cos}}_{k}\left(i\right)\right]+{a}_{k}^{\left(N-1\right)}{C}_{SS}.$ (12)

According toEquations (8), (11), and (12), Ak00 and Ak12 have the same sign;and fromthe signsofAk00, Ak10, and Ak20, the absolute minimumisdetermined. Thus,from Theorem 2.1, analgorithm for calculating ${a}_{k}^{\left(N\right)}$ is obtained and illustratedin Figure 6.

At the sampling time $t={t}_{1}+NT/\left(N-1\right)$, ${a}_{k}^{\left(N\right)}$ is calculated by the algorithm illustrated in Figure 6 , and then ${a}_{k}^{\ast }\mathrm{cos}\left(k\omega t\right)={a}_{k}^{\left(N\right)}{\mathrm{cos}}_{k}\left(N\right)$. Similarly, at the next sampling time, ${a}_{k}^{\ast }\mathrm{cos}\left(k\omega t\right)={a}_{k}^{\left(N+1\right)}{\mathrm{cos}}_{k}\left(N+1\right)$. …. This algorithm is designated as a constant iteration algorithm for calculating ${a}_{k}^{\ast }\mathrm{cos}\left(k\omega t\right)$ because it has the constant iteration step hk.

Similarly, a constant iteration algorithm for calculating ${b}_{k}^{\ast }\mathrm{sin}\left(k\omega t\right)$ can be derived. The constant iteration algorithm for calculating ${a}_{k}^{\ast }\mathrm{cos}\left(k\omega t\right)$ and that for calculating ${b}_{k}^{\ast }\mathrm{sin}\left(k\omega t\right)$ are together designated as a constant iteration algorithm for calculating the FS of $f\left(t\right)$, or a constant iteration algorithm for short.

4.2. Calculation Complexity Analysis

From the constant iteration algorithm for calculating ${a}_{1}^{\ast }\mathrm{cos}\left(\omega t\right)$, its calculation complexity depends mainly on calculating A100 and A110, or A100 and A120. The calculation complexity of A110 is the same as that of A120. Moreover, 2h1, −2h1,

$\underset{i=1}{\overset{N}{\sum }}{\left[{\mathrm{cos}}_{1}\left(i\right)\right]}^{2}$, and ${h}_{1}^{2}\underset{i=1}{\overset{N}{\sum }}{\left[{\mathrm{cos}}_{1}\left(i\right)\right]}^{2}$ are constants because h1 and N are. Thus,

similarly, from the calculation complexity analysis of the direct calculation algorithm for calculating ${a}_{1}^{\ast }\mathrm{cos}\left(\omega t\right)$, the calculation complexity of A100 is one addition operation, one subtraction operation, and two multiplication operations. That of A110 is one addition operation and one multiplication operation. Thus, its main calculation complexity per iteration is two addition operations, one subtraction operation, and three multiplication operations. Therefore, it is very low and does not change with N.

4.3. Calculation Accuracy Analysis

When $f\left(t\right)$ changes periodically, the precondition for Equation (1) is satisfied.

Figure 6. The constant iteration algorithm for calculation ${a}_{k}^{\left(N\right)}$.

Thus, the larger N and the smaller h1, the higher the accuracy of the calculated a1, according to the constant iteration algorithm for calculating ${a}_{1}^{\ast }\mathrm{cos}\left(\omega t\right)$, the FS of $f\left(t\right)$, and the sampling theorem. For this reason, the calculated a1 is correct within an allowable error because h1 can be small enough and N large enough because of the very low calculation complexity of this algorithm and the very high calculation speed of existing DSPs.

When $f\left(t\right)$ changes nonperiodically, the precondition for Equation (1) is not satisfied. Thus, the calculated a1 is not correct, and its accuracy depends on the tracking performance of this algorithm. From the following simulation results, the calculated a1 tracks ${a}_{1}^{\ast }$ smoothly.

4.4. Simulation Results

To validate the constant iteration algorithm for calculating ${a}_{1}^{\ast }\mathrm{cos}\left(\omega t\right)$, the simulations are done, and the simulation results are presented in Figure 7. In Figure 7, $N=500$, $T=0.02\text{\hspace{0.17em}}\text{s}$, and ${h}_{1}=0.025$. Figure 7 indicates that the calculated a1 is a constant and thus correct, when $f\left(t\right)$ changes periodically. The calculated a1 tracks ${a}_{1}^{\ast }$ smoothly and thus is not correct, and all response times are about 0.02 s (one period), when $f\left(t\right)$ changes nonperiodically. Besides, h1 gravely affects the calculation performance of this algorithm, and should be selected appropriately.

Figure 7. (a)-(c) The simulation results of the constant iteration algorithm for calculating ${a}_{1}^{\ast }\mathrm{cos}\left(\omega t\right)$ with a step increase, a linear increase, and an exponential decrease, respectively, in $f\left(t\right)$.

4.5. Brief Summary

We have derived a constant iteration algorithm. This algorithm has the constant iteration step seriously affecting its calculation performance. Therefore, the constant iteration step should be neither too large nor too small, and be selected appropriately. This algorithm does not perform as well as the direct calculation algorithm does; however, it provides an idea of determining the states of $f\left(t\right)$. The idea may have significant applications in further research.

5. Optimal Iteration Algorithm

5.1. Optimal Iteration Algorithm

The iteration step of the constant iteration algorithm for calculating ${a}_{k}^{\ast }\mathrm{cos}\left(k\omega t\right)$ is the constant hk, and thus cannot accurately reflect the actual conditions. Under the actual conditions, the iteration step should be large when $|{a}_{k}^{\left(N-1\right)}-{a}_{k}^{\left(N\right)\ast }|$ is large, and small when $|{a}_{k}^{\left(N-1\right)}-{a}_{k}^{\left(N\right)\ast }|$ is small. Then, how do we determine the optimal iteration step hk-opt?

In Figure 6, if ${A}_{k10}<0$, then ${a}_{k}^{\left(N\right)}={a}_{k}^{\left(N-1\right)}+{h}_{k}$ ; and Ak10 can be regarded as a function of hk, according to Equation (9). If it is assumed that $q\left({h}_{k}\right)={A}_{k10}=2{h}_{k}{A}_{k00}+{h}_{k}^{2}{C}_{ss}$, then $q\left({h}_{k}\right)$ attains its absolute minimum at ${h}_{k}=-{A}_{k00}/{C}_{ss}$. Thus, the optimal iteration step is ${h}_{k\text{-}opt}=-{A}_{k00}/{C}_{ss}$.

Similarly, the optimal iteration step is ${h}_{k\text{-}opt}={A}_{k00}/{C}_{ss}$, according to Equation (10).

Thus, from Figure 6, an algorithm for calculating ${a}_{k}^{\left(N\right)}$ is obtained and depicted in Figure 8.

At the sampling time $t={t}_{1}+NT/\left(N-1\right)$, ${a}_{k}^{\left(N\right)}$ is calculated by the algorithm depicted in Figure 8 , and then ${a}_{k}^{\ast }\mathrm{cos}\left(k\omega t\right)={a}_{k}^{\left(N\right)}{\mathrm{cos}}_{k}\left(N\right)$. Similarly, at the next sampling time, ${a}_{k}^{\ast }\mathrm{cos}\left(k\omega t\right)={a}_{k}^{\left(N+1\right)}{\mathrm{cos}}_{k}\left(N+1\right)$. …. This algorithm is designated as an optimal iteration algorithm for calculating ${a}_{k}^{\ast }\mathrm{cos}\left(k\omega t\right)$ because it has the optimal iteration step hk-opt.

Figure 8. The optimal iteration algorithm for calculating ${a}_{k}^{\left(N\right)}$.

Similarly, an optimal iteration algorithm for calculating ${b}_{k}^{\ast }\mathrm{sin}\left(k\omega t\right)$ can be derived. The optimal iteration algorithm for calculating ${a}_{k}^{\ast }\mathrm{cos}\left(k\omega t\right)$ and that for calculating ${b}_{k}^{\ast }\mathrm{sin}\left(k\omega t\right)$ are collectively designated as an optimal iteration algorithm for calculating the FS of $f\left(t\right)$, or an optimal iteration algorithm for short.

5.2. Brief Summary

We have derived an optimal iteration algorithm. This algorithm is essentially consistent with the direct calculation algorithm. It has the optimal iteration step, and thus performs better than the constant iteration algorithm does. Besides, this algorithm, like the constant iteration algorithm, provides an idea of determining the states of $f\left(t\right)$. The idea may be important in discovering an algorithm for determining the states of $f\left(t\right)$.

6. Biproportional Construction Algorithm

6.1. Biproportional Construction Theory

If $f\left(t\right)$ is in stable states in the period $\left[{t}_{1},\text{}{t}_{1}+T\right]$, then ${a}_{k}^{\left(N-1\right)}$ calculated by Equation (4) equals ${a}_{k}^{\left(N-1\right)\ast }$ within an allowable error when N is large enough, according to Definition 2.1.

If $f\left(t\right)$ is in a stable state at the sampling time $t={t}_{1}+NT/\left(N-1\right)$ : $f\left(N\right)=f\left(1\right)$, then it follows from Equation (4) that

${a}_{k}^{\left(N\right)}=\underset{i=1}{\overset{N}{\sum }}\left[f\left(i\right){\mathrm{cos}}_{k}\left(i\right)\right]/\underset{i=1}{\overset{N}{\sum }}{\left[{\mathrm{cos}}_{k}\left(i\right)\right]}^{2}.$ (13)

From Definition 2.3, ${a}_{k}^{\left(N\right)}={a}_{k}^{\left(N\right)\ast }$ within an allowable error when N is large enough. On the contrary, if $f\left(t\right)$ is in an unstable state at the sampling time $t={t}_{1}+NT/\left(N-1\right)$ : $f\left(N\right)\ne f\left(1\right)$, then ${a}_{k}^{\left(N\right)}={a}_{k}^{\left(N\right)\ast }$ cannot be ensured within an allowable error even though N is large enough. However, ${f}_{1}\left(t\right)$ is constructed from $f\left(1\right)$, $f\left(N\right)$, and $f\left(t\right)$ in stable states in the period $\left[{t}_{1},\text{}{t}_{1}+T\right]$. The constructed ${f}_{1}\left(t\right)$ in the period satisfies

${f}_{\text{1}}\left(t\right)/f\left(t\right)=f\left(N\right)/f\left(1\right)=\lambda ,\text{}f\left(1\right)\ne 0.$ (14)

That is, ${f}_{\text{1}}\left(t\right)$ is proportional to $f\left(t\right)$ in the period. If it is assumed that N discrete values of ${f}_{\text{1}}\left(t\right)$ are defined as ${f}_{1}\left(i\right)={f}_{1}\left({t}_{1}+iT/\left(N-1\right)\right)$, then ${f}_{1}\left(i\right)=\lambda f\left(i\right)$ from Equation (14), for $i=0,\text{}1,\text{}\cdots ,\text{}\left(N-1\right)$. Thus, it is obtained from Equation (4) that

${a}_{k}^{\left(N\right)}{}^{\prime }=\frac{\underset{i=0}{\overset{N-1}{\sum }}\left[{f}_{\text{1}}\left(i\right){\mathrm{cos}}_{k}\left(i\right)\right]}{\underset{i=0}{\overset{N-1}{\sum }}{\left[{\mathrm{cos}}_{k}\left(i\right)\right]}^{\text{2}}}=\lambda \frac{\underset{i=0}{\overset{N-1}{\sum }}\left[f\left(i\right){\mathrm{cos}}_{k}\left(i\right)\right]}{\underset{i=0}{\overset{N-1}{\sum }}{\left[{\mathrm{cos}}_{k}\left(i\right)\right]}^{\text{2}}}=\lambda {a}_{k}^{\left(N-1\right)}\text{.}$ (15)

According to Equation (15) and Definition 2.4, ${a}_{k}^{\left(N\right)}{}^{\prime }={a}_{k}^{\left(N\right)\ast }$ within an allowable error when N is large enough. This discovery is designated as a first proportional construction theory discovered with the aims of calculating ${a}_{k}^{\left(N\right)}{}^{\prime }$ and ensuring that ${a}_{k}^{\left(N\right)}{}^{\prime }={a}_{k}^{\left(N\right)\ast }$ within an allowable error when N is large enough.

At the sampling time $t={t}_{1}+NT/\left(N-1\right)$, the precondition for the first proportional construction theory correctly calculating ${a}_{k}^{\left(N\right)}{}^{\prime }$ is that $f\left(t\right)$ is in stable states in the period $\left[{t}_{1},\text{}{t}_{1}+T\right]$. Here, the term “stable states” mean that $f\left(t\right)$ is in “stable states” in the period if ${a}_{k}^{\left(N-1\right)}$ calculated by Equation (4) equals ${a}_{k}^{\left(N-1\right)\ast }$ within an allowable error when N is large enough.

When the next sample $f\left(N+1\right)$ arrives, $f\left(t\right)$ is in unstable states in the period $\left[{t}_{1}+T/\left(N-1\right),\text{}{t}_{1}+NT/\left(N-1\right)\right]$. Thus, the precondition for correctly calculating ${a}_{k}^{\left(N+1\right)\ast }$, ${a}_{k}^{\ast }$ of $f\left(t\right)$ at the sampling time $t={t}_{1}+\left(N+1\right)T/\left(N-1\right)$, does not exist. For this reason, although ${a}_{k}^{\left(N+1\right)}{}^{\prime }$ denoting ${a}_{k}^{\left(N+1\right)\ast }$ can be calculated similarly to ${a}_{k}^{\left(N\right)}{}^{\prime }$, ${a}_{k}^{\left(N+1\right)}{}^{\prime }={a}_{k}^{\left(N+1\right)\ast }$ cannot be ensured within an allowable error even though N is large enough. Nevertheless, ${f}_{2}\left(t\right)$ is constructed from ${a}_{k}^{\left(N\right)}$, ${a}_{k}^{\left(N\right)}{}^{\prime }$, and $f\left(t\right)$ in unstable states in the period $\left[{t}_{1}+T/\left(N-1\right),\text{}{t}_{1}+NT/\left(N-1\right)\right]$. The constructed ${f}_{2}\left(t\right)$ in the period fulfils

${f}_{\text{2}}\left(t\right)/f\left(t\right)={a}_{k}^{\left(N\right)}{}^{\prime }/{a}_{k}^{\left(N\right)}=\eta .$ (16)

That is, ${f}_{2}\left(t\right)$ is proportional to $f\left(t\right)$ in the period. If it is assumed that N discrete values of ${f}_{2}\left(t\right)$ are defined as ${f}_{2}\left(i\right)={f}_{2}\left({t}_{1}+iT/\left(N-1\right)\right)$, then

${f}_{2}\left(i\right)=\eta f\left(i\right)$ from Equation (16), for $i=1,\text{}2,\cdots ,N$. Thus, from Equations (4), (13), and (16), and the first proportional construction theory, it is deduced that

${a}_{k}^{\left(N\right)}{}^{\prime \text{​}\prime }=\frac{\underset{i=1}{\overset{N}{\sum }}\left[{f}_{\text{2}}\left(i\right){\mathrm{cos}}_{k}\left(i\right)\right]}{\underset{i=1}{\overset{N}{\sum }}{\left[{\mathrm{cos}}_{k}\left(i\right)\right]}^{\text{2}}}=\frac{\eta \underset{i=1}{\overset{N}{\sum }}\left[f\left(i\right){\mathrm{cos}}_{k}\left(i\right)\right]}{\underset{i=1}{\overset{N}{\sum }}{\left[{\mathrm{cos}}_{k}\left(i\right)\right]}^{\text{2}}}=\eta {a}_{k}^{\left(N\right)}={a}_{k}^{\left(N\right)}{}^{\prime }={a}_{k}^{\left(N\right)\ast }.$ (17)

From Equation (17), ${f}_{2}\left(t\right)$ is in stable states in the period $\left[{t}_{1}+T/\left(N-1\right),\text{}{t}_{1}+NT/\left(N-1\right)\right]$. Therefore, the period is considered as the period in front of $f\left(N+1\right)$, and thus a precondition for correctly calculating ${a}_{k}^{\left(N+1\right)\ast }$ is created. This discovery is designated as a second proportional construction theory discovered with the goal of creating the precondition.

The first and the second proportional construction theory are together designated as a biproportional construction theory for calculating ${a}_{k}^{\ast }$, which correctly calculates ${a}_{k}^{\ast }$ even though $f\left(t\right)$ is in an unstable state.

Similarly, a biproportional construction theory for calculating ${b}_{k}^{\ast }$ can be obtained, which correctly calculates ${b}_{k}^{\ast }$ even though $f\left(t\right)$ is in an unstable state. The biproportional construction theory for calculating ${a}_{k}^{\ast }$ and that for calculating ${b}_{k}^{\ast }$ are collectively designated as a biproportional construction theory for calculating the FCs of $f\left(t\right)$, or a biproportional construction theory for short. The biproportional construction theory correctly calculates its FCs even though $f\left(t\right)$ is in an unstable state.

6.2. Biproportional Construction Algorithm

It is assumed that ${f}_{d}\left(i\right)$ corresponding to $f\left(i\right)$ represent the data processed by the biproportional construction theory for calculating ${a}_{k}^{\ast }$ for $i=1,\text{}2,\text{}\cdots ,\text{}N$ ; and that the calculated ${a}_{k}^{\left(N-1\right)}{}^{\prime }$ equals ${a}_{k}^{\left(N-1\right)\ast }$ within an allowable error at the sampling time $t={t}_{1}+T$.

The direct calculation algorithm for calculating ${a}_{k}^{\ast }\mathrm{cos}\left(k\text{ω}t\right)$ is used to calculate ${a}_{k}^{\ast }$ accurately when $f\left(t\right)$ changes periodically, and the biproportional construction theory for calculating ${a}_{k}^{\ast }$ when $f\left(t\right)$ changes nonperiodically. Therefore, an algorithm for calculating ${a}_{k}^{\left(N\right)}{}^{\prime }$ is obtained and shown in Figure 9 .

At the sampling time $t={t}_{1}+NT/\left(N-1\right)$, ${a}_{k}^{\left(N\right)}{}^{\prime }$ is calculated by the algorithm shown in Figure 9 , and then ${a}_{k}^{\ast }\mathrm{cos}\left(k\omega t\right)={a}_{k}^{\left(N\right)}{}^{\prime }{\mathrm{cos}}_{k}\left(N\right)$. Similarly, at the next sampling time, ${a}_{k}^{\ast }\mathrm{cos}\left(k\omega t\right)={a}_{k}^{\left(N+1\right)}{}^{\prime }{\mathrm{cos}}_{k}\left(N+1\right)$. …. This algorithm is designated as a biproportional construction algorithm for calculating ${a}_{k}^{\ast }\mathrm{cos}\left(k\omega t\right)$ because it is based on the biproportional construction theory for calculating ${a}_{k}^{\ast }$.

Similarly, a biproportional construction algorithm for calculating ${b}_{k}^{\ast }\mathrm{sin}\left(k\omega t\right)$ can be obtained. The biproportional construction algorithm for calculating ${a}_{k}^{\ast }\mathrm{cos}\left(k\omega t\right)$ and that for calculating ${b}_{k}^{\ast }\mathrm{sin}\left(k\omega t\right)$ are together designated as a biproportional construction algorithm for calculating the FS of $f\left(t\right)$, or a biproportional construction algorithm for short.

6.3. Algorithm for Determining the States of f(t)

From the biproportional construction algorithm for calculating ${a}_{k}^{\ast }\mathrm{cos}\left(k\omega t\right)$, it

Figure 9. The biproportional construction algorithm for calculating ${a}_{k}^{\left(N\right)}{}^{\prime }$.

is required to determine the states of $f\left(t\right)$ accurately. Thus, how to determine the states of $f\left(t\right)$ accurately is certainly a key problem that has to be solved.

In the optimal iteration algorithm for calculating ${a}_{k}^{\ast }\mathrm{cos}\left(k\omega t\right)$, at the sampling time $t={t}_{1}+NT/\left(N-1\right)$, $f\left(t\right)$ may be in a stable state when ${a}_{k}^{\left(N\right)}={a}_{k}^{\left(N-1\right)}$, and must be in an unstable state when

${a}_{k}^{\left(N\right)}=\underset{i=1}{\overset{N}{\sum }}\left[f\left(i\right){\mathrm{cos}}_{k}\left(i\right)\right]/\underset{i=1}{\overset{N}{\sum }}{\left[{\mathrm{cos}}_{k}\left(i\right)\right]}^{\text{2}}$. Thus, this algorithm provides an idea

of determining the states of $f\left(t\right)$. From the idea, an algorithm for determining the states of $f\left(t\right)$ based on the optimal iteration algorithm is obtained; and the algorithm for determining the state of $f\left(t\right)$ at the sampling time $t={t}_{1}+NT/\left(N-1\right)$ is illustrated in Figure 10.

The constant hk is the iteration step of the algorithm, and thus must seriously affect its determination accuracy. For this reason, hk should be selected appropriately to determine the states of $f\left(t\right)$ accurately, whereas it is very difficult to do so. Therefore, it is necessary to find the variable iteration step that can help in accurately determining the states of $f\left(t\right)$ and that can change with $f\left(t\right)$.

The computation formulae of ${a}_{k}^{\left(N-1\right)}$, ${a}_{k}^{\left(N\right)}$, Ak0, Ak1, and Ak2 are Equations (4), (13), (5), (6) and (7), respectively. If $f\left(t\right)$ is in a stable state at the sampling time $t={t}_{1}+NT/\left(N-1\right)$, then ${A}_{k0}\le {A}_{k1}$ and ${A}_{k0}\le {A}_{k2}$. From ${A}_{k0}\le {A}_{k1}$ and ${A}_{k0}\le {A}_{k2}$, it follows that

${h}_{k}\ge 2\left[{a}_{k}^{\left(N\right)}-{a}_{k}^{\left(N-1\right)}\right]$ (18)

and

${h}_{k}\ge 2\left[{a}_{k}^{\left(N-1\right)}-{a}_{k}^{\left(N\right)}\right],$ (19)

respectively. If $f\left(t\right)$ is in an unstable state at the sampling time $t={t}_{1}+NT/\left(N-1\right)$, then ${A}_{k0}\ge {A}_{k1}$ or ${A}_{k0}\ge {A}_{k2}$. From ${A}_{k0}\ge {A}_{k1}$ and ${A}_{k0}\ge {A}_{k2}$, it is obtained that

${h}_{k}\le 2\left[{a}_{k}^{\left(N\right)}-{a}_{k}^{\left(N-1\right)}\right]$ (20)

Figure 10. The algorithm for determining the state of $f\left(t\right)$ at the sampling time $t={t}_{1}+NT/\left(N-1\right)$ based on the optimal iteration algorithm.

and

${h}_{k}\le 2\left[{a}_{k}^{\left(N-1\right)}-{a}_{k}^{\left(N\right)}\right],$ (21)

respectively.

From inequalities (18)-(21), ${h}_{k}=2|{a}_{k}^{\left(N\right)}-{a}_{k}^{\left(N-1\right)}|=2{x}_{k}$ must be a critical value to determine the states of $f\left(t\right)$, where ${x}_{k}=|{a}_{k}^{\left(N\right)}-{a}_{k}^{\left(N-1\right)}|$.

In the algorithm for determining the states of $f\left(t\right)$ based on the optimal iteration algorithm, if it is assumed that ${h}_{k}>2{x}_{k}$, ${h}_{k}=2{x}_{k}$, or ${h}_{k}<2{x}_{k}$, then a function of $2{x}_{k}$ can be studied. To discover the function, the simulations are conducted. The simulation results indicate that $f\left(t\right)$ is in stable states at all sampling times when ${h}_{k}>2{x}_{k}$, and in stable states at some sampling times and in unstable states at the others when ${h}_{k}=2{x}_{k}$. Fortunately, this algorithm accurately determines the states of $f\left(t\right)$ when ${h}_{k}<2{x}_{k}$.

It is assumed that ${h}_{k\text{-}va}=2{\lambda }_{k}{x}_{k}=2{\lambda }_{k}|{a}_{k}^{\left(N\right)}-{a}_{k}^{\left(N-1\right)}|$, where $0<{\lambda }_{k}<1$. Then, substituting hk-va for hk in Equations (9) and (10) yields

${A}_{k10v}=4{\lambda }_{k}|{a}_{k}^{\left(N\right)}-{a}_{k}^{\left(N-1\right)}|{A}_{k00}+{\left(2{\lambda }_{k}|{a}_{k}^{\left(N\right)}-{a}_{k}^{\left(N-1\right)}|\right)}^{2}{C}_{SS}$ (22)

and

${A}_{k20v}=-4{\lambda }_{k}|{a}_{k}^{\left(N\right)}-{a}_{k}^{\left(N-1\right)}|{A}_{k00}+{\left(2{\lambda }_{k}|{a}_{k}^{\left(N\right)}-{a}_{k}^{\left(N-1\right)}|\right)}^{2}{C}_{SS},$ (23)

respectively.

From the algorithm for determining the states of $f\left(t\right)$ based on the optimal iteration algorithm, an algorithm for determining the states of $f\left(t\right)$ based on the variable iteration step hk-va is obtained. The algorithm for determining the state of $f\left(t\right)$ at the sampling time $t={t}_{1}+NT/\left(N-1\right)$ is presented in Figure 11.

6.4. Calculation Complexity Analysis

According to the biproportional construction algorithm for calculating ${a}_{1}^{\ast }\mathrm{cos}\left(\omega t\right)$,

Figure 11. The algorithm for determining the state of $f\left(t\right)$ at the sampling time $t={t}_{1}+NT/\left(N-1\right)$ based on the variable iteration step.

its main calculation complexity per iteration depends on that the N data are updated. That is, $f{\left(1\right)}^{\prime }=\eta f{\left(1\right)}^{\prime }$, $f{\left(2\right)}^{\prime }=\eta f{\left(2\right)}^{\prime }$, $\cdots$, and $f{\left(N\right)}^{\prime }=\eta f{\left(N\right)}^{\prime }$. Thus, it is N multiplication operations.

The calculation complexity of this algorithm is much higher than that of the direct calculation algorithm or the constant iteration algorithm for calculating ${a}_{1}^{\ast }\mathrm{cos}\left(\omega t\right)$. However, it is relatively low compared to the very high calculation speed of existing DSPs. Therefore, this algorithm can be implemented because N can be large enough.

6.5. Calculation Accuracy Analysis

From the biproportional construction algorithm for calculating ${a}_{1}^{\ast }\mathrm{cos}\left(\omega t\right)$, the direct calculation algorithm for calculating ${a}_{1}^{\ast }\mathrm{cos}\left(\omega t\right)$ correctly calculates ${{a}^{\prime }}_{1}$ when $f\left(t\right)$ changes periodically. The biproportional construction theory for calculating ${a}_{1}^{\ast }$ correctly computes ${{a}^{\prime }}_{1}$ when $f\left(t\right)$ changes nonperiodically. Thus, this biproportional construction algorithm correctly calculates ${{a}^{\prime }}_{1}$ whether $f\left(t\right)$ changes periodically or nonperiodically.

Figure 12. (a)-(c) The simulation results of the biproportional construction algorithm for calculating ${a}_{1}^{\ast }\mathrm{cos}\left(\omega t\right)$ with a step increase, a linear increase, and an exponential decrease, respectively, in $f\left(t\right)$.

6.6. Simulation Results and Experimental Results

To validate the biproportional construction algorithm for calculating ${a}_{1}^{\ast }\mathrm{cos}\left(\omega t\right)$, the simulations and the experiments are conducted. The simulation results are depicted in Figure 12, and the experimental results in Figure 13. In Figure 12, $N=500$, ${\lambda }_{1}=0.75$, and $T=0.02\text{\hspace{0.17em}}\text{s}$. In Figure 13, $N=200$, ${\lambda }_{1}=0.75$, and $T=0.02\text{\hspace{0.17em}}\text{s}$. In Figure 12 and Figure 13, s represents the state of $f\left(t\right)$ : $s=0$ signifies that $f\left(t\right)$ is in a stable state, and $s=1$ that $f\left(t\right)$ is in an unstable state. Figure 12 and Figure 13 indicate that the calculated ${{a}^{\prime }}_{1}$ is a constant and thus correct, when $f\left(t\right)$ changes periodically. All response times are 0 s and thus the calculated ${{a}^{\prime }}_{1}$ is also correct, when $f\left(t\right)$ changes nonperiodically. In addition, this algorithm accurately determines the states of $f\left(t\right)$.

Figure 13. (a)-(c) The experimental results of the biproportional construction algorithm for calculating ${a}_{1}^{\ast }\mathrm{cos}\left(\omega t\right)$ with no change, a slow decrease, and a step decrease, respectively, in $f\left(t\right)$.

6.7. Brief Summary

We have built a biproportional construction theory, and then proposed a biproportional construction algorithm from the theory. From this biproportional construction algorithm, the direct calculation algorithm correctly calculates its FCs when $f\left(t\right)$ changes periodically, and the biproportional construction theory when $f\left(t\right)$ changes nonperiodically. Therefore, this biproportional construction algorithm correctly calculates its FCs whether $f\left(t\right)$ changes periodically or nonperiodically, and thus its FS.

7. Conclusions

The FS applies to a periodic non-sinusoidal function satisfying the Dirichlet conditions, whereas the being-processed function $f\left(t\right)$ in practical applications is usually an aperiodic non-sinusoidal signal. When $f\left(t\right)$ is aperiodic, its calculated FS is not correct, being still a challenging problem today.

To resolve the problem, we have correctly defined several basic concepts, such as $f\left(t\right)$ in a stable state, $f\left(t\right)$ in an unstable state, the FCs of $f\left(t\right)$ in a stable state, and the FCs of $f\left(t\right)$ in an unstable state. In particular, the definition of the FCs of $f\left(t\right)$ in an unstable state is of great significance in correctly calculating these FCs.

We have derived a direct calculation algorithm, a constant iteration algorithm, and an optimal iteration algorithm. The direct calculation algorithm correctly calculates its FCs when $f\left(t\right)$ changes periodically. Both the constant iteration algorithm and the optimal iteration algorithm provide an idea of determining the states of $f\left(t\right)$. From the idea, we have obtained an algorithm for determining the states of $f\left(t\right)$ based on the optimal iteration algorithm. In the algorithm, the variable iteration step is introduced, and thus we have presented an algorithm for determining the states of $f\left(t\right)$ based on the variable iteration step. The presented algorithm accurately determines the states of $f\left(t\right)$.

On the basis of the definitions and algorithms, we have built a biproportional construction theory. The biproportional construction theory consists of a first and a second proportional construction theory. The first proportional construction theory correctly calculates the FCs of $f\left(t\right)$ at the present sampling time. The second proportional construction theory creates a precondition for correctly calculating the FCs of $f\left(t\right)$ at the next sampling time. From the biproportional construction theory, we have proposed a biproportional construction algorithm. The proposed biproportional construction algorithm correctly calculates its FCs whether $f\left(t\right)$ is periodic or aperiodic, and thus its FS. Therefore, the problem is solved.

The biproportional construction theory and the biproportional construction algorithm extend the application range of the FS, and have considerable theoretical and practical significance.

Acknowledgements

This work was supported by the Priority Academic Program Development of Jiangsu Higher Education Institutions (PAPD). The authors would like to thank the editors and referees for their valuable advice for the improvement of this article.

Cite this paper: Li, Z. , Ren, M. , Chen, Z. and Liu, G. (2021) A Biproportional Construction Algorithm for Correctly Calculating Fourier Series of Aperiodic Non-Sinusoidal Signal. Engineering, 13, 503-525. doi: 10.4236/eng.2021.1310036.
References

   Kendall, D.G., Batchelor, G.K., Bingham, N.H., Hayman, W.K., Hyland, J.M.E., Lorentz, G.G., Moffatt, H.K., Parry, W., Razborov, A.A., Robinson, C.A. and Whittle, P. (1990) Andrei Nikolaevich Kolmogorov (1903-1987). Bulletin of the London Mathematical Society, 22, 31-100. https://doi.org/10.1112/blms/22.1.31

   Carleson, L. (1966) On Convergence and Growth of Partial Sums of Fourier Series. Acta Mathematica, 116, 135-157. https://doi.org/10.1007/BF02392815

   Iserles, A. and Nørsett, S.P. (2008) From High Oscillation to Rapid Approximation I: Modified Fourier Expansions. IMA Journal of Numerical Analysis, 28, 862-887.
https://doi.org/10.1093/imanum/drn006

   Mozumder, M. and Tarvainen, T. (2020) Time-Domain Diffuse Optical Tomography Utilizing Truncated Fourier Series Approximation. Journal of the Optical Society of America A, 37, 182-191. https://doi.org/10.1364/JOSAA.37.000182

   Khazaeli, R., Nazari, M.R. and Zadehgol, A. (2008) Introducing Unsteady and Nonuniform Source Terms in Entropic Lattice Kinetic Models Using Fourier Series. Physical Review E, 98, Article ID: 053303.
https://doi.org/10.1103/PhysRevE.98.053303

   Tsai, C.L., Chen, W.T. and Chang, C.S. (2016) Polynomial-Fourier Series Model for Analyzing and Predicting Electricity Consumption in Buildings. Energy & Buildings, 127, 301-312. https://doi.org/10.1016/j.enbuild.2016.05.083

   Niu, F., O’Neill, Z. and O’Neill, C. (2018) Data-Driven Based Estimation of HVAC Energy Consumption Using an Improved Fourier Series Decomposition in Buildings. Building Simulation, 11, 633-645. https://doi.org/10.1007/s12273-018-0431-2

   Lin, Y., Quindroit, C. and Jang, H. (2015) 3-D Fourier Series Based Digital Predistortion Technique for Concurrent Dual-Band Envelope Tracking with Reduced Envelope Bandwidth. IEEE Transactions on Microwave Theory and Techniques, 63, 2764-2775. https://doi.org/10.1109/TMTT.2015.2452271

   Gómez-Arista, I., Dávila-Pintle, J.A., Montalvo-Montalvo, N., Rubin-Alvarado, A.A., Bravo-García, Y.E. and Reynoso-Lara, E. (2020) Fourier Coefficients Applied to Improve Backscattered Signals in a Short-Range LIDAR System. Electronics, 9, 390. https://doi.org/10.3390/electronics9030390

   Tavighi, A., Marti, J.R. and Galvan, V.A. (2018) Time-Window-Based Discrete-Time Fourier Series for Electromagnetic Transients in Power Systems. IEEE Transactions on Power Delivery, 33, 2551-2561.
https://doi.org/10.1109/TPWRD.2018.2794887

   Hamed, H.D. and Reza, G. (2019) A New Approach to Design an Observer for Load Current of UPS Based on Fourier Series Theory in Model Predictive Control System. International Journal of Electrical Power & Energy Systems, 104, 898-909.
https://doi.org/10.1016/j.ijepes.2018.07.047

   Liu, G., Chi, C., Jin, Y., Ma, Y., Sun, L., Li, L. and Sun, Y. (2017) Analysis of Non-Sinusoidal Steady Electric Field of ±500 kV Converter Transformer. Energy and Power Engineering, 9, 53-62. https://doi.org/10.4236/epe.2017.94B007

   Bolhasani, M., Ghafi, E.K., Ghorashi, S.A. and Mehrshahi, E. (2019) Waveform Covariance Matrix Design Using Fourier Series Coefficients. IET Signal Processing, 13, 562-567. https://doi.org/10.1049/iet-spr.2019.0024

   Bahaz, M. and Benzid, R. (2018) Efficient Algorithm for Baseline Wander and Powerline Noise Removal from ECG Signals Based on Discrete Fourier Series. Australasian Physical & Engineering Sciences Medicine, 41, 143-160.
https://doi.org/10.1007/s13246-018-0623-1

   Mastriani, M. (2018) Quantum-Classical Algorithm for an Instantaneous Spectral Analysis of Signals: A Complement to Fourier Theory. Journal of Quantum Information Science, 8, 52-77. https://doi.org/10.4236/jqis.2018.82005

   Scheibler, R. and Hurley, P. (2012) Computing Exact Fourier Series Coefficients of IC Rectilinear Polygons from Low-Resolution Fast Fourier Coefficients. Proceedings of the International Society for Optical Engineering, 8326, Article ID: 83262V.
https://doi.org/10.1117/12.916360

   Zadiraka, V.K., Kolomys, E.N. and Luts, L.V. (2013) Effective with Respect to Accuracy Algorithms of Approximation of Some Classes Functions by Fourier Series. Journal of Automation and Information Sciences, 45, 14-29.
https://doi.org/10.1615/JAutomatInfScien.v45.i7.30

   Maddi, A., Guessoum, A. and Berkani, D. (2013) Applying a Technique of Identification for Computing Fourier Series Coefficients. Proceedings of the World Congress on Engineering, London, 3-5 July 2013, Vol II.

   Gruber, C. and Abrykosov, O. (2016) On Computation and Use of Fourier Coefficients for Associated Legendre Functions. Journal of Geodesy, 90, 525-535.
https://doi.org/10.1007/s00190-016-0891-z

   Nakagawa, K. and Fujimori, K. (2018) Design of the RF-DC Conversion Circuit by GA Adopting Mutation Based on Fourier Coefficients on Unit Structures. 2018 Progress in Electromagnetics Research Symposium, Toyama, 1-4 August 2018, 1900-1904.
https://doi.org/10.23919/PIERS.2018.8597950

   Ruiz, A. (2018) Fourier Coefficients and Moments of Piecewise-Circular Curves. Pattern Recognition Letters, 116, 238-245.
https://doi.org/10.1016/j.patrec.2018.10.033

   Lytvyn, O.M., Lytvyn, O.G. and Lytvyn, O.O. (2019) Method of Calculating Fourier Coefficients of Three Variable Functions Using Tomogram. 9th International Conference on Advanced Computer Information Technologies, Kharkiv, 5-7 June 2019, 125-128. https://doi.org/10.1109/ACITT.2019.8779938

   Kumar, A. and Ramakrishnan, B. (2018) Estimates for Fourier Coefficients of Hermitian Cusp Forms of Degree Two. Acta Arithmetica, 183, 257-275.
https://doi.org/10.4064/aa170301-26-10

   Gibert, P., Panciatici, P., Losseau, R., Guironnet, A., Tromeur-Dervout, D. and Erhel, J. (2018) Speedup of EMT Simulations by Using an Integration Scheme Enriched with a Predictive Fourier Coefficients Estimator. IEEE PES Innovative Smart Grid Technologies Conference, Europe, 1 October 2018, 1-6.
https://doi.org/10.1109/ISGTEurope.2018.8571899

   Jiang, D. and Liu, B. (2013) On Fourier Coefficients of Automorphic Forms of GL(n). International Mathematics Research Notices, 2013, 4029-4071.
https://doi.org/10.1093/imrn/rns153

   Alaca, A., Alaca, S. and Aygin, Z.S. (2015) Fourier Coefficients of a Class of Eta Quotients of Weight 2. International Journal of Number Theory, 11, 2381-2392.
https://doi.org/10.1142/S1793042115501109

   Tang, H. (2013) Estimates for the Fourier Coefficients of Symmetric Square L-Functions. Archiv der Mathematik, 100, 123-130.
https://doi.org/10.1007/s00013-013-0481-8

   Dickson, M.J. (2015) Fourier Coefficients of Degree Two Siegel-Eisenstein Series with Trivial Character at Square Free Level. Ramanujan Journal, 37, 541-562.
https://doi.org/10.1007/s11139-014-9633-0

   Hundley, J. and Zhang, Q. (2016) Fourier Coefficients of Theta Functions at Cusps other than Infinity. Acta Arithmetica, 175, 341-383.
https://doi.org/10.4064/aa8278-4-2016

Top