A Biproportional Construction Algorithm for Correctly Calculating Fourier Series of Aperiodic Non-Sinusoidal Signal

The Fourier series (FS) applies to a periodic non-sinusoidal function satisfying the Dirichlet conditions, whereas the being-processed function ( ) f t in practical applications is usually an aperiodic non-sinusoidal signal. When ( ) f t 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 ( ) f t 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 ( ) f t . From the idea, we obtain an algorithm for determining the states of ( ) f t 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 ( ) f t based on the variable iteration step. The presented algorithm accurately determines the states of ( ) f t . 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 ( ) f t at the present sampling time, and the latter creates a precondition for correctly calculating the FCs of ( ) f t at the next sampling time. From the biproportional construction theory, we propose a biproportional construction algorithm. The proposed biproportional construction algorithm correctly calculates its FCs whether ( ) f t is periodic or aperiodic, and thus its FS.

( ) f t 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 ( ) f t 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 ( ) f t . From the idea, we obtain an algorithm for determining the states of ( ) f t 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 ( ) f t based on the variable iteration step. The presented algorithm accurately determines the states of ( ) f t . 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 ( ) f t at the present sampling time, and the latter creates a precondition for correctly calculating the FCs of ( ) f t at the next sampling time. From the biproportional construction theory, we propose a biproportional construction algorithm. The proposed biproportional construction algorithm correctly calculates its FCs whether ( )
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 In Equations (1)-(3), 0 a * , k a * , and k b * are all called the Fourier coefficients (FCs) of ( ) f t ; T is the period of ( ) f t , and 2 T ω = π ; and 1 0 t > .
From the FS, a precondition for Equation (1) is that ( ) f t is a periodic nonsinusoidal function satisfying the Dirichlet conditions.
When ( ) f t is periodic and satisfies the Dirichlet conditions, the precondition for Equation (1) is satisfied, and thus it is correct that ( ) f t is expressed as Equation (1). Hence, k a * and k b * are correctly calculated by Equations (2) and (3), respectively, and thus its FS is correctly calculated by Equation (1). However, when ( ) f t is aperiodic, the precondition for Equation (1) is not satisfied, and thus it is not correct that ( ) f t is expressed as Equation (1). Therefore, k a * and k b * are not correctly calculated by Equations (2) and (3) [28] [29], and other methods. Each of these methods has its own applicability and merits, whereas how to calculate its FS correctly when ( ) f t 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-processed function defined above. The being-processed function is denoted by ( ) f t unless a specific description is given in this article. Although its FS is correctly calculated when ( ) f t is periodic and satisfies the Dirichlet conditions, its FS is not correctly calculated when ( ) f t is aperiodic. Nowadays, how to calculate its FS correctly when ( ) f t is aperiodic is an important engineering calculation problem difficult to solve, and also an interesting mathematicalphysical 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 t based on the variable iteration step will be presented.
The proposed biproportional construction algorithm correctly calculates its FCs whether ( ) f t 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 t 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.

Definitions and Theorem
It is assumed that ( )

Direct Calculation Algorithm
It is assumed that At the sampling time are collectively designated as a direct calculation algorithm for calculating the FS of ( ) f t , or a direct calculation algorithm for short.

Calculation Complexity Analysis
Although the FS of ( ) f t 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 ( ) 1 cos a t ω * as an example, we conduct the calculation complexity analysis, calculation accuracy analysis, simulation, and experiment.
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.

Calculation Accuracy Analysis
When ( ) f t changes periodically, the precondition for Equation (1) is satisfied.
Thus, the larger N, the higher the accuracy of the calculated a 1 , according to the direct calculation algorithm for calculating ( ) 1 cos a t ω * , the FS of ( ) f t , and the sampling theorem. For this reason, the calculated a 1 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 t changes nonperiodically, the precondition for Equation (1) is not satisfied. Thus, the calculated a 1 is not correct, and its accuracy depends on the tracking performance of this algorithm. From the following simulation results and experimental results, the calculated a 1 tracks 1 a * smoothly.

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   Table 1 and Figure 4, and the experimental results in Figure 5. In Table 1, ( )  (4) and (2), respectively. Table 1 indicates that the calculated a 1 is correct within an allowable error when ( )

Brief Summary
We have derived a direct calculation algorithm. This algorithm correctly calculates its FCs when ( ) f t changes periodically, but not when ( )

Constant Iteration Algorithm
It is assumed that ( ) f t at the sampling time 1 t t T = + , has been calculated iteratively; and that ( ) f t at the next sampling time, will be calculated iteratively. On the basis of   cos .
According to Equations (8), (11), and (12), A k00 and A k12 have the same sign; and from the signs of A k00 , A k10 , and A k20 , the absolute minimum is determined. Thus, from Theorem 2.1, an algorithm for calculating is obtained and illustrated in Figure 6.
At the sampling time ( ) is calculated by the algorithm illustrated in Figure 6, and then ( ) ( are together designated as a constant iteration algorithm for calculating the FS of ( ) f t , or a constant iteration algorithm for short.

Calculation Complexity Analysis
From the constant iteration algorithm for calculating ( ) 1 cos a t ω * , its calculation complexity depends mainly on calculating A 100 and A 110 , or A 100 and A 120 . The calculation complexity of A 110 is the same as that of A 120 . Moreover, 2h 1 , −2h 1 , ( ) That of A 110 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.

Calculation Accuracy Analysis
When ( ) f t changes periodically, the precondition for Equation (1) is satisfied.  , the FS of ( ) f t , and the sampling theorem. For this reason, the calculated a 1 is correct within an allowable error because h 1 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 t changes nonperiodically, the precondition for Equation (1) is not satisfied. Thus, the calculated a 1 is not correct, and its accuracy depends on the tracking performance of this algorithm. From the following simulation results, the calculated a 1 tracks 1 a * smoothly.

Simulation Results
To validate the constant iteration algorithm for calculating

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 t .
The idea may have significant applications in further research.

Optimal Iteration Algorithm
The iteration step of the constant iteration algorithm for calculating ( )  , according to Equation (10).
Thus, from Figure 6, an algorithm for calculating ( ) are collectively designated as an optimal iteration algorithm for calculating the FS of ( ) f t , or an optimal iteration algorithm for short.

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 t . The idea may be important in discovering an algorithm for determining the states of ( ) f t .

Biproportional Construction Theory
If ( ) f t is in stable states in the period [ ] That is, (14), for According to Equation ( When the next sample ( ) Thus, the precondition for correctly calculating ( )  (16), and the first proportional construction theory, it is deduced that From Equation (17), ( ) 2 f t is in stable states in the period  . Therefore, the period is considered as the period in front of ( ) 1 f N + , and thus a precondition for correctly calculating ( ) 1 N k a + * 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 k a * , which correctly calculates k a * even though ( ) f t is in an unstable state.
Similarly, a biproportional construction theory for calculating k b * can be obtained, which correctly calculates k b * even though ( ) f t is in an unstable state.
The biproportional construction theory for calculating k a * and that for calculating k b * are collectively designated as a biproportional construction theory for calculating the FCs of ( ) f t , or a biproportional construction theory for short.
The biproportional construction theory correctly calculates its FCs even though ( ) f t is in an unstable state.

Biproportional Construction Algorithm
It is assumed that or a biproportional construction algorithm for short.

Algorithm for Determining the States of f(t)
From the biproportional construction algorithm for calculating ( ) is required to determine the states of ( ) f t accurately. Thus, how to determine the states of ( ) f t accurately is certainly a key problem that has to be solved.
In the optimal iteration algorithm for calculating ( )  Figure 10.
The constant h k is the iteration step of the algorithm, and thus must seriously affect its determination accuracy. For this reason, h k should be selected appropriately to determine the states of ( ) f t 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 t and that can change with ( ) f t .
The computation formulae of ( ) and ( ) ( ) 1 2 , respectively. If    (9) and (10) yields and respectively. From the algorithm for determining the states of ( ) f t based on the optimal iteration algorithm, an algorithm for determining the states of ( )  Figure  11.

Calculation Complexity Analysis
According to the biproportional construction algorithm for calculating 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 ( ) 1 cos a t ω * . 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.

Calculation Accuracy Analysis
From the biproportional construction algorithm for calculating

Simulation Results and Experimental Results
To validate the biproportional construction algorithm for calculating ( ) 1 cos a t ω * , 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, 500 N = , 1 0.75 λ = , and 0.02 s T = . In Figure 13,

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 t changes periodically, and the biproportional construction theory when ( ) f t changes nonperiodically. Therefore, this biproportional construction algorithm correctly calculates its FCs whether ( ) f t changes periodically or nonperiodically, and thus its FS.

Conclusions
The FS applies to a periodic non-sinusoidal function satisfying the Dirichlet conditions, whereas the being-processed function ( ) f t in practical applications is usually an aperiodic non-sinusoidal signal. When ( ) f t 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 t in a stable state, ( ) f t in an unstable state, the FCs of ( ) f t in a stable state, and the FCs of ( ) f t in an unstable state. In particular, the definition of the FCs of ( ) f t 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 t changes periodically. Both the constant iteration algorithm and the optimal iteration algorithm provide an idea of determining the states of ( ) f t . From the idea, we have obtained an algorithm for determining the states of ( ) f t 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 t based on the variable iteration step. The presented algorithm accurately determines the states of ( ) f t . 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 t at the present sampling time. The second proportional construction theory creates a precondition for correctly calculating the FCs of ( ) f t 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 t 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.