Predictive Direct Torque Control Application-Specific Integrated Circuit with a Fuzzy Proportional–Integral–Derivative Controller and a New Round-Off Algorithm

This study developed a predictive direct torque control (PDTC) application-specific integrated circuit (ASIC) with a fuzzy proportional.integral.derivative (PID) controller and a new round-off calculation circuit for improving the ripple response of a hysteresis controller when sampling and calculating delay times in an induction motor drive. The proposed PDTC ASIC not only calculates the stator’s magnetic flux and torque by detecting three-phase currents, three-phase voltages, and rotor speed but also eliminates large ripples in the torque and flux by using the fuzzy PID controller. Furthermore, the proposed round-off algorithm reduces the calculation error of the composite flux. A fuzzy voltage vector switching table is proposed not only to speed up the calculating speed but also to resolve the instability generated by its large torque and flux ripples. The Verilog hardware description language was used to implement the hardware architecture, and the aforementioned ASIC was fabricated using the 0.18-μm 1P6M CMOS process of the TSMC by employing the cell-based design method. The predictive calculations, fuzzy PID controller, fuzzy voltage vector switching table, and round-off calculation algorithm improved not only the ripple issue faced in traditional direct torque control but also the control stability and robustness. The measurement results indicate that the proposed PDTC ASIC has an operating frequency, a sampling rate, and a dead time of 50 MHz, 100 kS/s, and 100 ns, respectively, at a supply voltage of 1.8 V. The power consumption and chip area of this ASIC are 1.0027 mW and 1.169 × 1.168 mm2, respectively. The main advantages of the proposed PDTC ASIC are its low power consumption, small chip area, robustness, and convenience.


I. INTRODUCTION
Direct torque control (DTC) schemes can produce rapid and robust responses; however, they usually perform similar to a hysteresis controller with low switching frequencies. In [1], two schemes were investigated to modify the classical DTC method. A new approach was presented to compensate for torque ripples by referring to the tolerance band around the command torque. The best results were obtained with 25% of the applied voltage compensating for the voltage drops within the motor drive. Next, a predictive algorithm was used to command the flux value for reducing the torque ripple of the IM drive. Experimental results confirmed that the switching frequency remained constant and that the torque ripple was improved with two schemes [1]. However, a DTC system with a traditional proportional-integral-derivative (PID) controller cannot easily exhibit ideal performance because the IM drive performs with multivariable, strongcoupling, nonlinear, and time-varying characteristics [2]. A This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. fuzzy logic PID regulator for motor speed was proposed in [2] to adjust the nonlinear control variables. Compared with a conventional PID controller, the aforementioned controller provides superior performance in terms of dynamic response and static deviation in a DTC system [2]. Furthermore, a novel model predictive direct torque control (MPDTC) scheme was proposed in [3] for maintaining the motor torque, stator flux, and inverter's neutral point potential within the given hysteresis bounds while minimizing the switching frequency of the inverter. Specifically, compared with the standard DTC scheme, the aforementioned scheme reduces the switching frequency by up to 50% while maintaining the torque and flux more accurately within their bounds [3]. Moreover, compared with the standard DTC scheme, the proposed MPDTC scheme reduces the inverter switching frequency by 16.5% on average (over the entire operating range) and up to 37.4% under specific operating conditions [4]. The results in [4] prove that computational control solutions are becoming computationally and economically feasible and that versatile and flexible control algorithms can be developed for electric motor drives with favorable performance.
A new quick-response and high-efficiency control method for an IM was proposed in [5]. This method is based on the limit cycle control of the flux and torque by using the optimum pulse-width-modulated (PWM) output voltage, which can be achieved by controlling the amplitude of the flux according to the torque command. The aforementioned approach is superior to the corresponding field-oriented control method. The control circuit used in the aforementioned method can be compensated easily and automatically to minimize the effect of the variation of machine constants [5]. In practice, DTC is achieved using a two-level voltage source inverter that requires limited computation time and can be implemented without mechanical speed sensors. However, DTC based on hysteresis controllers suffers from certain drawbacks such as variable switching frequency and high torque ripple [6]. A DTC scheme with a constant switching frequency was proposed in [6] according to the concept of imaginary switching time. Simulation results indicate that the performance of classical DTC can be improved using a voltage modulation scheme with a constant switching frequency. The imaginary switching vector designed in [6] requires low memory and a short computation time.
An improved DTC scheme based on the fuzzy logic technique was developed in [7]. This scheme not only reduces the torque and flux ripples but also improves the performance of a DTC drive system. The control algorithm of the aforementioned scheme is based on the space vector modulation (SVM) technique so that a constant inverter switching frequency can be obtained. Furthermore, an MPDTC scheme was developed in [8] as an alternative control strategy for permanent magnet synchronous motor drives. This control strategy is based on the control model system, prediction components, and optimization problem [8]. MPDTC is a complicated control scheme because it computes the stator flux reference and predicts the stator flux in the next cycle. The MPDTC scheme can improve the speed tracking performance of a DTC system and its robustness against disturbance and uncertainties [8].
Despite the increasing interest in the use of multiphase drives for fault-tolerant applications [9]- [11], three-phase machines remain dominant in industrial applications. Various fault-tolerant, three-phase motor drive topologies have been developed, and their performances have been investigated by considering the effects of current and voltage limits for the inverter and machine. In the evaluation of the postfault power of a fault-tolerant drive, the postfault torque and speed, which depend on the postfault current and voltage limits, should be considered [12]. However, the gains in postfault torque and power depend on machine parameters, which are floating-point numbers. A tariff plan is recommended to not only eliminate the rounding-off error completely but also reduce the floating-point-number operations [13]. Furthermore, two models have been proposed for reducing the rounding-off error in fixed-point arithmetic. The first model is a generic model with no assumptions on the predicted system or weight matrices, and the second model is a parametric model that exploits the Toeplitz structure of the linear model predictive control (MPC) problem for a Schur stable system. Experimental results obtained using the aforementioned two models indicate that they significantly reduce the resource usage, computational energy, and execution time of a fieldprogrammable gate array (FPGA) [14]- [15]. To minimize torque ripples, a heuristic-based optimization technique was applied in [16]- [17] to an IM model. Next, the feasibility condition for the design parameters was checked, and the optimized design parameters were rounded off to the nearest feasible design values. The torque ripple was reduced to a negligible value in the optimized machine model [16].
The Model predictive control (MPC) is a popular and effective technique to fulfill high drive performance in electrical machines and systems. The finite control set model predictive control (FCS-MPC) [18], continuous control set model predictive control (CCS-MPC) [19], and finite control set model predictive direct torque control (FCS-MPDTC) [20]- [21] have been presented with optimum duty ratio for electric drives in [22]. Those issues and solutions for the abovementioned control techniques have been discussed in details with many experimental results based on different kinds of machines and drives. However, there are some serious issues for the MPC to be solved in future, which include large computation time, heavy dependence on parameter, slow dynamics, and lack robustness [23]. As the rapid technology evolution of the microcontroller and digital signal processor, the MPC would find more opportunities for the industrial application [22]. Furthermore, the FPGA development board and ASIC technology not only provide fast computation time but also give more and more opportunities to improve the robustness and to enhance convenience, especially in ASIC with low power consumption and small chip area. The present study proposes a predictive DTC (PDTC) application-specific integrated circuit (ASIC) with a fuzzy PID controller and a proposed round-off calculation circuit. The fuzzy controller and round-off calculation circuit can improve the performance of a three-phase induction motor (IM) drive system. The rest of this paper is organized as follows. Section II describes the design of the proposed circuit for an IM drive system. Section III presents the simulation and measurement results for functional verification. Finally, Section IV presents the conclusions of this study. Figure 1 shows a block diagram of the proposed PDTC ASIC with a fuzzy PID controller and a new round-off calculation circuit. The aforementioned scheme was developed for IM drives. The scheme involves three-phase to two-phase transformation (abc-dq transformation), voltage calculation, flux calculation, torque calculation, speed feedback, predictive calculation, sector selection, fuzzy PID control, fuzzy voltage vector switching, and short-circuit prevention. All the blocks were designed using the Verilog hardware description language (HDL) and verified using a FPGA development board. Finally, an ASIC was fabricated in 0.18μm 1P6M CMOS process for a three-phase IM drive system.

A. COORDINATE TRANSFORMATION AND CALCULATION FORMULAS
The advantage of coordinate transformation is that it reduces the calculation burden and increases response speed. The three-phase voltages, namely v s as, v s bs, and v s cs, and three-phase currents, namely i s as, i s bs, and i s cs, can be transformed into twophase voltages, namely v s ds and v s qs, and two-phase currents, namely i s ds, and i s qs, respectively. Then the stator current vector i s s(t) and stator voltage vector v s s(t) can be calculated in the stationary coordinate system.
where i s ds and i s qs are the real and imaginary parts of the stator current vector; and that v s ds and v s qs are the real and imaginary parts of the stator voltage vector. By adding a conversion constant c to the stationary coordinate system, the i s ds and i s qs can be expressed as follows [24], [25]:  Next, we find that the instantaneous power Pabcs of the three-phase system and the instantaneous power Pdqs of the two-phase system can be expressed in (5) and (6) Substituting (3) and (4) into (6), we can prove that the following equation is correct between Pabcs and Pdqs with i s Considering the non-power constant, the conversion constant c can be selected to be 2/3. Then the following equation can be obtained.
Thus, the two-phase currents, i s ds and i s qs, can be expressed as follows:    (11) Similarly, the two-phase voltages, v s ds and v s qs, can be expressed as follows: For the voltage calculation, the output voltages of the U, V, and W phases, namely Sa, Sb, and Sc, respectively, and the dc voltage Vd are measured at the output terminals of the inverter. Then, the two-phase voltages VD and VQ are calculated as follows: This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication.
Next, the flux and torque calculations can be completed using the two-phase output voltages v s ds and v s qs and twophase output currents i s ds and i s qs. The flux () can be calculated using the single-phase stator winding resistance RS as follows: According to the Laplace transform, the variable p is defined as the complex s, and T is the sampling period. Then, the following transform can be obtained: (16) Thus, the fluxes  s ds and  s qs can be expressed as follows [25]:  (18) where P is the motor pole number.
In the speed calculation, the rotating speed r is equal to the frequency of the digital signal obtained from the rotary encoder (Pa). The phase difference between two digital signals, namely Pa and Pb, indicates the rotation direction of the IM.

B. SECTOR SELECTION
Sector selection can be completed by calculating the twophase stator fluxes  s ds and  s qs and determining the resultant magnetic flux  s dqs. In general, the voltage space vector can be divided into six sectors, each of which has an angle of 60°. To simplify the analysis, the first quadrant of the coordinate plane is illustrated in Fig. 2. If  s ds and  s qs are positive, the first quadrant contains two sectors, namely S1 and S2. The first sector (S1) extends from 0° to 30°, and the second sector (S2) extends from 30° to 90°. In trigonometry, the following relations exist:  Table I  presents the sector selection table for the proposed PDTC ASIC. The output sector can be easily selected using this table. The symbols "0" and "1" represent a positive value (>0) and negative value (<0), respectively [26].

C. PREDICTION CALCULATION CIRCUIT
A DTC scheme can achieve satisfactory decoupled flux and torque control through prediction calculation circuit (PCC) and thus reduce voltage and current ripples. Figure 3 displays block diagrams of PCC for flux (s) and torque (Te) calculations. It is used to calculate the flux or torque without increasing the burden on the processor. In general, reluctance torque ripples are generated by the time delay in traditional DTC systems. High-speed and high-precision motor control can alleviate the aforementioned problem. The predictive control model is used to reduce the calculation burden and to decide the motor position rapidly [26]. As depicted in Fig. 3(a)  in Fig. 3(b). By adding the designed PCC scheme, the proposed PDTC scheme not only has the advantages of the traditional DTC scheme but also reduces the delay time and thus improves the IM drive performance.

D. FUZZY PID CONTROLLER
A PID controller is a well-known tool for controlling the speed of an IM drive. In general, the Ziegler-Nichols (Z-N) method is used to define three key parameters of the traditional PID controller: Kp, Ki, and Kd [27]. The general formula of a PID controller is expressed as follows: where s is a complex frequency and KP, Ki, and Kd represent the proportional, integral, and derivative coefficients, respectively. These three coefficients significantly influence the stability of the PID controller. The performance of a fuzzy controller is superior to that of a non-fuzzy linear proportional-integral controller because of the nonlinearities introduced in the fuzzy controller by the nonlinear defuzzification algorithm [28]. Figure 4 illustrates a block diagram of the adopted fuzzy PID controller. It operates with an input error e(t) and input error variation e(t). By passing through the fuzzy PID controller, two outputs, namely Kp and Kd, can be obtained. The integral coefficient Ki can be calculated as follows: where  is a constant.
The operating principle of the fuzzy controller is to determine the output u(t) with three coefficients by using the membership function and fuzzy rule base. The output of the fuzzy PID controller (u(t)) is expressed as follows: This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication.  (24) where e(t) is the input error. After u(t) is calculated, a closed-loop control procedure is executed for the IM drive system. This self-adjusting mechanism is completed with the feedback speed r. The fuzzy PID controller works with adequate adaptability. The fuzzy rule tables of KP, Kd, and  are listed in Tables II-IV, respectively [24]. The fuzzy membership functions of Kp and Kd vary between 0.0 and 1.0 while the  parameter alters from 0.2 to 1.2. Figure 5 depicts the block diagram of the adopted fuzzy controller.

E. FUZZY CONTROLLER
As shown in Fig. 5, the error et and error variation Δet derived from the speed feedback are input variables of the fuzzy controller. Moreover, the output variable u is obtained through with the fuzzy controller. Figure 6 Table V presents the rule table for the fivestage fuzzy controller.   TABLE V  RULE TABLE OF

F. FUZZY VOLTAGE VECTOR SWITCHING TABLE
The main disadvantage of the conventional DTC hysteresis controller is the instability generated by its large torque and flux ripples. A fuzzy voltage vector switching table is proposed to resolve the aforementioned problem. Figure 7 illustrates the fuzzy torque of the five-stage hysteresis controller. The input variables of this controller are the torque error dT, which is defined as dT = Te* − Te, and the torque error variation dT.

G. PROPOSED ROUND-OFF ALGORITHM
After the two electric fluxes, namely ds and qs, are obtained, the synthetic flux dqs can be calculated using a square root circuit, a round-off calculation circuit, and a DFF circuit. The aforementioned square root circuit is determined using the shadow tree algorithm [5], and the DFF circuit is used to achieve synchronization according to the clock signal (Clk). The round-off method is used to reduce the calculation error of the square root circuit. Figure 8 To complete the round-off calculation, a calibration constant Cal is used for modifying the output code of the round-down calculation. Table VII presents (26) Moreover, the decision formula is expressed as follows: (27)  As shown in Table VII, there are two differences at input values (IN) of 3 and 7. For IN = 3, the RD is 1, but RO is 2; and that RD = 2 and RO = 3 for IN = 7. The absolute deviations of the round-down and round-off calculation circuits, namely |ERD| and |ERO|, obtained using (26) and (27), respectively, are listed in the sixth and seventh columns of mean deviation of the round-down circuit |MERD| is approximately 0.3467. Thus, the round-off method exhibits a significantly lower mean deviation than does the rounddown method. In general, the round-off calculation is widely used in microprocessor with analog output, which is not suitable for calculating in digital circuit. This is the reason why we need to propose a new round-off algorithm to complete the digital calculation in FPGA development board.

III. SIMULATION AND MEASUREMENT RESULTS
After the designed modules were implemented using the Verilog HDL, the ModelSim software was used to complete the behavioral simulation with the HDL test bench file. Figure 9 shows the simulated waveforms of the six-arm voltage signals of the inverter at a clock frequency of 10 MHz and a basic frequency of 1200 rpm (approximately 50 ms). As depicted in this figure, the up arm (Si) and down arm (Si) move in accordance with inverse waveforms in each phase with i = a, b, and c. Thus, Sa, Sb, and Sc are the up-arm output voltages of the U, V, and W phases, respectively. The behavior simulation confirms that the designed functions work correctly.  After the behavior simulation was completed, an FPGA development board was used to verify the designed functions and a logic analyzer was used to analyze the measured digital signals. Figure 10 illustrates the measured waveforms of the six-arm voltage signals of the inverter. These waveforms were measured using the logic analyzer at a clock frequency of 10 MHz and a basic frequency of 1200 rpm (approximately 50 ms). The measured waveforms are similar to those obtained in the behavior simulation, as displayed in Fig. 9. Furthermore, a dead time must be generated between the up arm and the down arm to prevent the three-phase IM  from burning because of the short-circuit current. Figure 11 presents the dead time measured in the U phase with the logic analyzer (3 s), which is suitable for the adopted IM drive system.
The proposed PDTC ASIC with a fuzzy PID controller exhibits smaller ripples in the stator flux than does a conventional DTC system, which generates a stator flux with a hysteresis controller [29]. Figure 12 shows the measured locus of the stator flux from 10 to 200 ms with the FPGA board for the proposed PDTC with a fuzzy PID controller and the conventional DTC with a hysteresis controller, respectively. As displayed in Fig. 12(a), the proposed controller exhibited small flux ripples and a smooth unit cycle. The stator flux ripples are significantly lower in the proposed PDTC scheme than in the conventional DTC system. Figure 13 displays the standardized composite flux ( s dqs) values for the proposed ASIC and traditional DTC system, respectively. The proposed PDTC ASIC that performs with new round-off calculation exhibits small composite flux ripples in Fig. 13(a). The proposed round-off algorithm can improve the performance of IM drive. 9 VOLUME XX, 2022 After the designed functions were verified with the FPGA board, the Verilog HDL codes were incorporated into an ASIC and fabricated using the 0.18-m 1P6M CMOS process of TSMC. A generic digital IC (ASIC) design method was used to complete the logic synthesis based on the standard cell library, which is provided with TSMC in 0.18-m 1P6M CMOS process. Figure 14 shows the measurement instruments, including an ac motor with a speed controller, an inverter, an oscilloscope, a differential probe, and a chip test platform (printed circuit board). Figure  15 illustrates the measured stator fluxes of the proposed PDTC ASIC, namely  s ds and  s qs. The measured phase shift was approximately 91. As depicted in Fig. 16, the measured dead time was 200 ns, which is suitable for preventing shortcircuiting. Figures 17 and 18 illustrate the locus of the stator flux in the proposed PDTC ASIC and traditional DTC system, respectively. A comparison of the stator flux trajectories of the proposed PDTC and traditional DTC system confirmed that the performance of the proposed PDTC ASIC is superior to that of the traditional DTC system. The circular ripples of the PDTC ASIC with a fuzzy PID controller and round-off calculation circuit were smaller than those of the conventional DTC system. Figure 19 shows the photomicrograph of the proposed PDTC ASIC with a fuzzy PID controller and round-off calculation circuit. The measurement results indicate that the proposed PDTC ASIC works correctly at an operating frequency of 10 MHz and a sampling rate of 100 kS/s.     Figure 20 displays the measured line currents (Ias, Ibs, and Ics) at a sampling frequency of 100 kHz and a rotation frequency of 1200 rpm for a three-phase, 0.75-kW IM. As presented in (11), Ias and Ibs can be transformed into the twophase stator currents i s ds and i s qs, respectively, through trigonometric calculations. Furthermore, Figures 21 and 22 illustrate the measured line voltages for the U-V, V-W, and W-U phases (Vab, Vbc, and Vca, respectively). The proposed PDTC ASIC operates correctly, and the three-phase IM is driven smoothly with small ripples.

IV. CONCLUSIONS
In this study, a PDTC ASIC with a fuzzy PID controller and a new round-off calculation circuit was designed to achieve stable control for a three-phase IM drive. After the designed functions were verified using an FPGA development board, an ASIC was fabricated using the 0.18-m 1P6M CMOS process of TSMC. The measurement results indicate that the stator flux trajectory of the proposed PDTC ASIC is superior to that of the traditional DTC system with a hysteresis controller. Furthermore, the standardized composite flux  s dqs in the proposed ASIC is more accurate than that in the traditional DTC system. The proposed round-off algorithm results in small composite flux ripples and improves the IM drive performance. A fuzzy voltage vector switching table is proposed not only to speed up the calculating speed in FPGA design but also to resolve the instability generated by its large torque and flux ripples. The predictive calculations, fuzzy PID controller, fuzzy voltage vector switching table, and round-off calculation algorithm improved not only the ripple issue faced in traditional direct torque control but also the control stability and robustness. The measurement results indicate that the dead time and power consumption of the developed ASIC are 100 ns and 1.0027 mW, respectively, at an operating frequency of 10 MHz, a sampling rate of 100 kS/s, and a supply voltage of 1.8 V. Moreover, the gate counts and chip area of the proposed ASIC are 56,766 and 1.169 × 1.168 mm 2 , respectively. The proposed PDTC ASIC has a smaller chip area and lower power consumption than does the traditional DTC system developed using an FPGA board. It can be used in various kinds of motors. The main advantages of the proposed PDTC ASIC are its low power consumption, small chip size, robustness, convenience, and correctness.