Adaptive Quasi-PID Control Method for Switching Power Amplifiers

Quasi-PID control method that is able to effectively inhibit the inherent tracking error of PI control method is proposed on the basis of a rounded theoretical analysis of a model of switching power amplifiers (SPAs). To avoid the harmful impacts of the circuit parameter variations and the random disturbances on quasi-PID control method, a single neuron is introduced to endow it with self-adaptability. Quasi-PID control method and the single neuron combine with each other perfectly, and their formation is named as single-neuron adaptive quasi-PID control method. Simulation and experimental results show that single-neuron adaptive quasi-PID control method can accurately track both the predictable and the unpredictable waveforms. Quantitative analysis demonstrates that the accuracy of single-neuron adaptive quasiPID control method is comparable to that of linear power amplifiers (LPAs) and so can fulfill the requirements of some high-accuracy applications, such as protective relay test. Such accuracy is very difficult to be achieved by many modern control methods for converter controls. Compared with other modern control methods, the programming realization of single-neuron adaptive quasi-PID control method is more suitable for real-time applications and realization on low-end microprocessors for its simple structure and lower computational complexity.


Introduction
Generating and amplifying waveforms with medium power (i.e., from 1 or 2 W to 1 or 2 kW) have many important applications in various industrial fields, such as protective relay test, and audio process.The task of generating and amplifying a waveform is tracking the command signal of the waveform in current form and voltage form.An amplifier designed for current tracking is called as a current amplifier, and that designed for voltage tracking is called as a voltage amplifier.
Apparently, it is easy to generate and amplify a wave-form accurately with low power (i.e., less than 1 or 2 W), but, with medium power, the accuracy is difficult to control.So, linear power amplifiers (LPAs) [1] that consist of high-power transistors are widely used to retain the linear relationships between the command signals and the output waveforms to acquire a high tracking accuracy.
However, with the development of power electronics technology, switching power amplifiers (SPAs) based on converters (including rectifiers and inverters) are also used in a good many waveform generation and amplification occasions, such as active power filters (APFs), and low-fidelity audio amplifiers.
Compared with LPAs, SPAs have those advantages: 1) SPAs do not need the digital-to-analog converters that are sometimes very expensive; 2) the nominal capacity of a switching device is usually much higher than that of a high-power transistor, and thus there is no need to parallel or cascade several devices to obtain a high output power in SPAs, implying a high performance-price ratio of SPAs; 3) unlike LPAs, which need at least 3 stages to obtain a high amplifying gain, traditionally, SPAs need only 1 amplifying stage, meaning that the basic architecture of SPAs is much simpler; 4) the efficiency of SPAs is much higher than that of LPAs because the devices operate in a high-speed switching state; 5) it is easy to isolate the digital signals from the high-power output signals in SPAs by photoelectric couplers.
Although SPAs have the advantages above, the tracking accuracy of SPAs is harder to control than LPAs.To improve the tracking accuracy of SPAs, the authors tested some modern control methods for converter controls.Repetitive control method [2] [3] [4], which is based on the internal model principle and is a high-performance feed forward control strategy, can effectively track the periodic signals and eliminate the periodic disturbances or distortions.However, when the command signal is nonperiodic or unpredictable, the dynamic response becomes slow, and the tracking accuracy degrades significantly.Deadbeat control method [5] [6], which is a superior predictive control strategy, has excellent dynamic response and good transient tracking accuracy.However, the actual tracking accuracy depends greatly on its predictive model, the choice of which is empirical and subjective, and thus it is difficult to ensure the optimality of the predictive model.Moreover, the predictive model is sensitive to the uncertainties of the control object, e.g. the parameter variations of the load, which sometimes influence the tracking accuracy.Sliding mode control method [7] [8] [9] shows a good robustness against system parameter variations once the operating point enters the predefined sliding surface.However, it is difficult to design an optimal sliding surface that can adapt to all types of situations.In addition, it is based on an ideal assumption that the sliding velocity of the operating point is infinitely fast, which is unattainable in practical implementations due to X. M. Sun the switching frequency limitations of the devices and other factors.These problems always induce oscillations in the output waveforms.Moreover, without complex improvements, it may suffer from great switching frequency variations.
In short, these control methods are more suitable for generating and amplifying deterministic waveforms to deterministic loads (e.g. in frequency converters), or tracking various frequency components with relatively low accuracy (e.g. in APFs).Their applications in high-accuracy and variable-load fields are usually limited.
In the process of testing the control methods above to find out the most favorable one for generating and amplifying waveforms with unpredictable characters to variable loads with high-accuracy, the authors discovered an interesting control method, which inherits certain characteristics of both PID control method and deadbeat control method.Because it is more similar to PID control method, it is called quasi-PID control method.Further study shows that quasi-PID control method can be integrated with a single neuron perfectly, so the self-adaptability to variable loads and self-adjustment to random errors can be achieved conveniently.It is called single-neuron adaptive quasi-PID control method, and this paper focuses on discussing its derivation details and its application in SPAs for protective relay test.

Modeling of an SPA
The SPA discussed in this paper is based on a single-phase full-bridge topology and an independent DC source (shown in Figure 1), which can be combined as independent blocks to obtain multiple-channel outputs.

Open-Loop Model
In Figure 1, Q1-Q4 are insulated-gate bipolar transistors (IGBTs), D1-D4 are fast-recovery free-wheeling diodes, L and C are inductor and capacitor of LC output filter, R is a load resistor, dc V (a constant) is average voltage of DC

Triangular Wave Generator Phase
and mod u is modulation signal.The snubber circuits of SPA are omitted for simplicity, the design of which can be found in [10].
Figure 2 illustrates the principle of generating the bipolar pulse width modulation (PWM) signals, where c V is the amplitude of the isosceles-triangle car- rier, s T is the carrier period and also the switching period and the sampling pe- riod (the sampling frequency 1 ).According to the equivalent-area principle [11] [12], the area of the curved-edge trapezoidal pulse ABCDE should be equal to the net area of the PWM pulses, i.e.

S u T =
(1) where modc u is the ordinate of the intersection point S S = , the following relationship is obtained: where the relationship

Closed-Loop Model
To realize the closed-loop control, the output of SPA should be fed back to affect mod u , and there are 2 ways to do so: 1) let ( ) Although it is easy to write out the closed-loop transfer function according to Figure 3, it is difficult to design the controller due to the pure-delay term s T s e − which leads the system to be a non-minimum phase system [15].Further, although the system can be turned into a minimum phase system by expanding s T s e − into a power series and taking a finite number of the fore terms, this would suffer a great loss of the system bandwidth.Therefore, it is wise to design the controller from another angle, i.e., in time domain.

Discrete Model in Time Domain
For digital simulation in time domain, G(s) must be discretized in time domain.The first step is to transform G(s) in s domain to G(z) in z domain by virtue of the relationship between Laplace transform and z transform: where Z[•] denotes performing z transform on the expressions in the square brackets.To maintain the invariability of the system step response after z transform, a zero-order holder, i.e., ( ) is very complex if expressed with parameter symbols, so, instead, it is expressed in numerical type with detailed values of the parameters substituted into the expression and calculated (the values of the parameters are listed in Appendix A): ( ) ( ) ( ) The second step is to perform inverse z transform on G(z) to get the difference equation: ) where k is the integer index of the discrete time series, 0,1, 2, 3,

Quasi-PID Control Method
The Kirchhoff voltage and current equations of the SPA in Figure 1 are as follows: ( ) where ( Q r is the equivalent switching resistance of IGBT, L r is the winding resistance of L) and p is a unipolar two-valued-logic switching function: when the symmetric regular sampling method is adopted in the modulating X. M. Sun process as shown in Figure 2, it is easy to write out the duty cycle The duration time for 1 p = is on t and that for 0 p = is off t .
Given that s T is very small, the integration of current differential L di with- in a s T is equal to the summation of small current variations, which is ap- proximate to inductor current variation L i ∆ .Thus, by integrating both sides of Equation ( 9) over a s T , an expression is obtained: when L i is increasing, i.e., 0 ( ) where i e * is defined as the inherent tracking error.Likewise, when L i is de- creasing, i.e., 0 cates that e i is fluctuating around a nonzero value, that is to say, the non-staticerror tracking cannot be realized.
To counteract the nonzero i e * , the authors creatively construct a modified current command signal: ( ) By replacing the R i * in ( ) e e i i * = in Equations ( 12) and ( 13) with ˆR i * , the modified duty cycle D and the modified inductor current variation ˆL i ∆ are written as ( ) According to Equation (17), whether ˆL i ∆ is increasing or decreasing, i e is fluctuating around 0 now, and thus the inherent tracking error is eliminated.
If the coefficient of i e in Equation ( 17) is intentionally forced to be equal to 1, then and this leads to a concise form of Equation ( 17): In practice, the duty cycle is the final control quantity of SPAs, and it needs to be discretized for digital control, which entails the discretization of Equation ( 16): and the incremental type, i.e., ( ) ( ) ( ) Similarly, Equation ( 10) is discretized as where the first-order backward difference is adopted to approximate the firstorder differential.The incremental type of Equation ( 22), i.e., ( ) ( ) ( ) And the discretized type of Equation ( 19) is Substitute Equation (24) into Equation (23), Equation (23) can be rearranged as Then substitute Equations ( 24) and (25) into Equation (21), Equation ( 21) becomes A widely used type of PID control method [15] is

j T e k e k T
where ( ) u k is the control quantity, ( ) e k is the error between the real output and the expected output (command signal), K P , K I and K D are P, I and D parameters.The incremental type of Equation ( 27), i.e., ( ) ( ) ( )

X. M. Sun
A term-to-term comparison between Equations ( 26) and (28) discloses that the first 2 terms are in accordance with each other, and the third term of Equation (26) is composed of ( ) R i k while that of Equation ( 28) is composed of ( ) e k .Therefore, Equation ( 28) is not a real PID controller, yet it does have a structure similar to that of a PID controller.Due to this, Equation ( 28) is called as quasi-PID control method.From the comparison, it is easy to write out the quasi-PID parameters: where the quasi-D parameter is denoted as ˆD K to be distinguished from D K .
Considering that the control quantity in Equation ( 8) is s

Single-Neuron Adaptive Quasi-PID Control Method
Equation (29) shows that all 3 quasi-PID parameters are related to the circuit parameters L, s f , dc V , r, R and C.These "known" parameters actually vary with loads, operating conditions and disturbances.For example: (i) the fluctuation of the output power would lead to the fluctuation of dc V , so the presumption that dc V is a constant should be discounted; (ii) the resistance of R is always drifting with the load temperature; (iii) the nonlinear variations of Q r and L r may make r ripple nonlinearly.All these issues would influence the accuracy of the quasi-PID parameters and further degrade the tracking accuracy.In addition, the dead-time embedded in turn-on time and the side effect of snubber circuits may introduce extra errors.The authors found that quasi-PID control method can be integrated with a single neuron perfectly, and so the adaptive online adjustment of the quasi-PID parameters can be realized conveniently, making the dynamic compensations for the aforementioned detrimental influences and extra errors feasible.

Adaptive Control Structure
The structure of single-neuron adaptive quasi-PID control method is presented in Figure 4, where ( ) x k and ( ) x k are the 3 inputs of the single neuron: ( x k e k e k x k e k i k i k , , .
The single neuron sums the 3 weighted inputs up by its adder component "Σ" to form a total input signal: Substitute Equations ( 32) and (33) into Equation (34), it is seen that Equation (34) actually realizes the same calculation of Equation (31).
The 3 connection weights in Equation (34) should be normalized to maintain their relative magnitudes to promote the robustness of simulation and actual control.The normalization can be carried out by virtue of vector norms.There are 3 commonly used vector norms [16]: 1) 1-norm, the summation of the absolute values of the elements; 2) 2-norm, the square root of the quadratic sum of the elements; 3) ∞-norm, the maximum value of the absolute values of the elements.Comparisons show that 2-norm is of the greatest computational complexity, and simulations show that it does not give a better control effect than 1-norm.Although ∞-norm is of the lowest computational complexity, it always makes one of the 3 normalized connection weights equal to 1, causing the corresponding input to have the greatest impact on the control quantity and thus inducing oscillations on the output waveform during the first 1 or 2 power frequency periods.Therefore, 1-norm is the best choice, and the normalized type of Equation (34) based on 1-norm is where ( ) ( ) ( ) ( ) is the connection weight vector, ( ) , and j w is defined to replace the coefficient of ( ) The single neuron takes where a linear proportional function with amplitude limitations is chosen as ( ) • f , and sl K is the slope of the linear segment of ( ) • f .The choice of this ex- citation function lies on 2 considerations: (i) limiting the amplitude of the control quantity is indispensable to prevent the control quantity from overreaching; (ii)

S
k has already been the required control quantity, further processes with complex excitation functions (such as the sigmoid function or the radial basis function) may not only deprive its physical meanings but induce unnecessary computational complexities, so it is better to choose a simple function to slightly adjust its amplitude.It should also be noted that the amplitude limitations of ( ) are set as ±5 instead of ±1 (±1 are the amplitude limitations defined in normalization theory).The reasons are: 1) avoiding pure decimalfraction computations on fixed point microprocessor used in this paper, which may introduce large rounding errors to the calculated data; 2) slightly loosening the amplitude limitations to enhance the fault tolerance of the algorithm.
In Equation ( 8), the coefficients of

Adaptive Learning Algorithm
The general learning rule [17] for connection weight adjustment is as follows: ( ) where w is the connection weight vector, ∆w is the incremental vector of w , 0 η > is the learning rate, x is the input vector, d (a scalar quantity) is the expected output and is called the teacher signal, function ( ) is the learning signal and 0 λ ≥ is a real constant.
which is perceptron learning rule based on least mean square standard.This learning rule includes d, so it is a supervised learning rule with teacher guidance, and theory [18] verifies that it is asymptotically stable.The expanded type is where, in this paper, ( ) ( ) ( ) = and 1, 2, 3 j = . Simulations show that this learning rule possesses outstanding stability but lacks "independence" or "self-learning enthusiasm".When illustrated on the output waveform, the phenomenon is that the steady-state errors of the output waveform are very small while the response speed is fairly slow.
Argument 2: If ( ) ( u is the control quantity and a scalar quan- tity) and 0 x, which is Hebb learning rule.This learning rule does not include d, so it is an unsupervised learning rule without teacher guidance, and theory [18] verifies that it is unstable under certain conditions.
The expanded type is where, in this paper, ( ) . Simulations show that this learning rule has strong "independence" and "self-learning ability", and its learning speed is very fast.So the output waveform has a fairly high response speed.However, because of the lack of teacher guidance, the steady-state errors are relatively large.
To better illustrate the 2 arguments above, a periodic square waveform is chosen as an example.The reasons for the choice are: 1) for periodic waveform, comparisons can be made between different waveforms or among different segments of the same waveform; 2) for square waveform, it has rising and falling edges and smooth segments, so the steepness of the former can be used to compare the response speed while the smoothness of the latter can be used to compare the steady-state errors.The simulated output waveform using perceptron learning rule is presented in Figure 5(a), which shows that the rising and falling edges are not steep (i.e., the response speed is slow) but the smooth segments are very flat (i.e., the steady-state errors are very small).The simulated output waveform using Hebb learning rule is presented in Figure 5(b), which shows that the rising and falling edges are steeper than those in Figure 5(a) (i.e., the response speed is faster), but there exist oscillations and great overshoots in the smooth segments (i.e., the steady-state errors are large); the oscillations seem to grow larger, implying the likelihood to become unstable.
Given that the strong point of perceptron learning rule is the weak point of Hebb learning rule and vice versa, the authors creatively combine them together and propose the perceptron-Hebb learning rule: The simulated output waveform using the new learning rule is presented in  meaning that both the response speed and the steady-state errors are improved-the new learning rule inherits the strong points of the two but gets rid of their weak points to a large extent; moreover, the possible unstability of Hebb learning rule never exists.

Control Flow and Stability Analysis
The control flow of single-neuron adaptive quasi-PID control method for simulation or actual control is summarized in Figure 6.It is shown that Equations (32), ( 41) and (36) are the 3 most important computational procedures of the flow chart, but they introduce only a small amount of floating additions and multiplications.These calculations are of relatively low computational complexities, meaning that the control method is very suitable for real-time control and for realization on low-end microprocessors.
From Equation (33), it is seen that ( ) By performing z transforms on Equations ( 36) and (37) respectively, then solving the resultant simultaneous equations, the system function can be obtained.After rationalizations of both the numerator and the denominator polynomials of ( ) H z , the denominator polynomial becomes the characteristic polynomial that is in the following form: ( ) where 0 1 5 , , , a a a  are the coefficients acquired from rationalizations.In terms of Jury criteria [19], the constraint conditions for system stability are as follows: 1) The first criterion requires ( ) 3) The third criterion requires 0 5 a a < , the calculation of which gives the in The punctuation "…" means the curtailment of the subsequent calculations.
From calculations, it is found that as long as the choice of sl K fulfills both Eq- uation (43) and Equation ( 44), the curtailed in equations are fulfilled as well; what's more, all the in equations have some margins to retain their inequalities, which not only gives the choice of sl K certain freedom, but also makes the im- pacts of the small unpredictable errors caused by variations of quasi-PID parameters on the initializations of ( ) In short, the initializations of ( ) 0 j w according to Equation (33) and the choice of sl K according to in equa- tions ( 43) and (44) can ensure the system stability.

Simulation and Experimental Results
In this section, the effectiveness of single-neuron adaptive quasi-PID control method is illustrated by 4 groups of simulation and experimental results.Section 5.1 tests the sheer ability of quasi-PID control method to counteract the inherent tracking error without the aid of the single neuron.The next 3 sections concentrate on testing the adaptabilities of single-neuron adaptive quasi-PID control method to different loads, operating conditions and disturbances.

Ability to Counteract the Inherent Tracking Error
A5A (RMS), 50 Hz sinusoidal waveform is chosen for the test.Here, in order to compare the actual performances of quasi-PID control method with the current command signal R i * (with R i * , the control method is actually the PI control method [20]) and with the modified command current signal ˆR i * , the single neuron is temporarily thrown off.The results are presented in Figure 7, and it is clear that the simulated waveforms and the experimental ones are alike.

Adaptability to Waveforms with Different Frequency Components
Different types of output waveforms contain different frequency components, the content and duration of which, in practice, may be unpredictable.Although since the frequency components of these waveforms are predetermined and the parameters of the controller can be directly adjusted towards these frequency components to acquire a relatively high and stable tracking accuracy; however, for waveforms with unpredictable frequency components, the tracking accuracy of these control methods may decline uncontrollably if there exist some frequency components not preconsidered during the design process of the controller due to the poor adaptability of these control methods.Thus, in this subsection, the adaptability of single-neuron adaptive quasi-PID control method to different types of waveforms, with and without unpredictable frequency components, is tested, and the simulation and experimental results are presented in However, merely assessing the accuracy of the output waveforms from a qualitative angle, i.e., from the subjective impression, is very superficial, especially when the waveform is too complex to discriminate its subtle discrepancies.Therefore, a quantitative criterion for accuracy assessment is constructed, which is able to assess the accuracy of the waveforms by making point-to-point comparisons between the actual output waveform and the expected one and then give a score.This quantitative criterion is mean square error where N is the length of the time series.As an example, Equation ( 45) is performed on the experimental fault current waveform in Figure 10 term, quasi-PID control method gains a relatively high accuracy by compensating the inherent tracing error of PI control method, which, to some extent, is already comparable to the accuracies of deadbeat control method and sliding mode control method.And the improvement owing to the single neuron is more impressive, and this high accuracy has made the applications of SPAs in some of the high-accuracy fields possible.For example, the regenerated fault current and fault voltage in Figure 10(h) and Figure 10(j) can be used for protective relay test or other similar tests [21], the accuracy requirement of which is generally prescribed as ≤1.5%; this means that by virtue of single-neuron adaptive quasi-PID control method SPAs can also be used in protective relay test equipment so as to make the equipment small in volume and weight but high in performance.

Conclusions
1) Quasi-PID control method that is directly derived from the circuit topology of SPA can effectively inhibit the inherent tracking error, and its derivation process reveals an important fact: the quasi-D term is not a real D term in PID control method, so PID control method is actually not suitable for the control; because the real D term may serve as a weird disturbance causing system unstability, that is why few references reported such an application.2) Although quasi-PID control method may suffer from quasi-PID parameters variations caused by circuit parameters drift and random disturbances, it can be combined with a single neuron to form single-neuron adaptive quasi-PID control method to maintain its excellence.3) Simulation and experimental results illustrate that single-neuron adaptive quasi-PID control method is able to accurately track both the predictable and the unpredictable waveforms, and the quantitative analysis demonstrates that its accuracy is higher than most of the modern control methods and is comparable to that of LPAs.4) Compared with many modern control methods, the programming realization of single-neuron adaptive quasi-PID control method is very simple, and the computational complexity is very small.

X. M. Sun
excellently describes the whole process of turn-on and turn-off, andis the correct open-loop model of SPA.

Figure 3 .
Figure 3. Continuous model of SPA in frequency domain.
are the 3 connection weights: the error between d and the actual output y, e and y are scalar quantities) and 0 λ = , then ( )

Figure 5 .
Figure 5.Comparison of the simulated output waveforms using 3 learning rules.(a) Perceptron learning rule, (b) Hebb learning rule, (c) perceptron Hebb learning rule.

Figure 5 (
Figure 5(c), which shows that the rising and falling edges are steeper than those in Figure 5(a) and the smooth segments are flatter than those in Figure 5(b),

Figure 6 .
Figure 6.Flow chart of single-neuron adaptive quasi-PID control method for simulation or actual control. Figure

Figure 7 .Figure 8 .
Figure 7. Ability of quasi-PID control method to counteract the inherent tracking error.(a) Simulation result, (b) experimental result.

Figure 9 .
Figure 9. Adaptability of single-neuron adaptive quasi-PID control method to abrupt load variation.(a) The simulated actual output waveform, (b) dynamic tracking error.

Figure 10 .
Figure 10.Adaptability of single-neuron adaptive quasi-PID control method to waveforms with and without unpredictable frequency components.(a) Simulated square waveform, (b) experimental square waveforms of phases A and B, (c) simulated triangular waveform, (d) experimental triangular waveforms of phases A and B, (e) simulated sinusoidal waveform, (f) experimental sinusoidal waveforms of phases A and B, (g) a fault current waveform recorded by DFR, (h) experimental fault current waveform of (g), (i) a fault voltage waveform recorded by DFR, (j) experimental fault voltage waveform of (i).

2.3. Continuous Model in Frequency Domain
(h), which is a waveform with unpredictable frequency components, and the result is ˆ0.11%MSE ε ≈.For comparison, the same fault current waveform is generated by quasi-PID control method (without the single neuron), and the result is ˆ2.9%MSE ε