73 CHAPTER 6 NEURO-FUZZY CONTROL OF TWO-STAGE KY BOOST CONVERTER 6.1 INTRODUCTION TO NEURO-FUZZY CONTROL The block diagram in Figure 6.1 shows the Neuro-Fuzzy controlling technique employed to control the two-stage KY boost converter. The output voltage (V o ) is compared with the reference voltage (V ref ) by a comparator to produce error (e) signal. From the error (e) signal change in error (ce) is estimated and these two signals are fed to the Fuzzifier section of the Neuro-Fuzzy where the signals are classified into membership functions and based on the rule base adopted in Adaptive Neuro Fuzzy Inference System (ANFIS) the output is produced by the Defuzzifier which is duty cycle (D). Based on the duty cycle (D) PWM generator generates PWM pulse which controls the switching action of the two-stage KY boost converter. Figure 6.1 Neuro-Fuzzy control block diagram
74 6.2 SIMULINK MODELING OF NEURO-FUZZY CONTROLLER Adaptive Neuro Fuzzy Inference System (ANFIS) is the implementation of Neural network architecture in the inference engine of a Fuzzy controller. Figure 6.2 shows the proposed controller Simulink model for two-stage KY boost converter with ANFIS controller for a reference output voltage of 28 V. The difference in reference voltage to the output voltage termed as error (e) and the change in error (ce) are given as input to the ANFIS controller and the output is the duty cycle (D) to the PWM pulse generator, the PWM pulse generated is given as switching signal to the MOSFET switches as shown in Figure 6.2 below. Figure 6.2 ANFIS Control of KY Boost converter Simulink model 6.2.1 TWO-STAGE KY BOOST CONVERTER SIMULINK MODELING A two-stage KY converter [12]-[14] consists of four MOSFET switches S 11, S 12, S 21 and S 22 along with body diodes D 11, D 12, D 21 and D 22 and two diodes D b1 and D b2 ; two energy transferring capacitor C b1 and C b2 ; output inductor L, output load resistor R and output capacitor C as shown by the Figure 6.3.
75 Figure 6.3 2-stage KY Converter Based on the PWM switching sequence of the MOSFET switches, the converter operation is classified into 1-plus-2D converter and 2-plus-D converter, where D is the duty cycle of the switching signal. If the switching sequence of MOSFET is in the order S 11, S 21 and S 12, S 22 then it is classified as 1-plus-2D converter. If the switching sequence of MOSFET is S 12, S 21 and S 11, S 22 then it is classified as 2-plus-D converter. In this work we have taken the 2-plus-D KY converter which operates in two modes. In first mode switches S 12 and S 21 are ON and in second mode S 11 and S 22 are switched ON. 6.2.2 PWM SIGNAL GENERATOR SIMULINK MODELING Figure 6.4 shows the PWM control signal generation block which generates control signal (c) from the duty cycle (D) obtained from ANFIS controller with a switching frequency of 200 KHz. Figure 6.4 PWM block with 195 KHz switching frequency
76 6.2.3 ANFIS CONTROLLER SIMULINK MODELING Figure 6.5 shows a general block diagram of ANFIS controller, where the Neural network is implemented in the rule base of the Fuzzy controller and Figure 6.6 describes the general structure of a five layer ANFIS algorithm using first order Sugeno type Fuzzy-Neural network architecture with two input functions and one output function, whose input function is classified with 7 membership functions implemented in the creation of rule base. The ANFIS structure comprises three distinct layers namely input layer (Layer I); hidden layer (Layer II to Layer IV) and output layer (Layer V). The input layer namely Layer I consist of input membership functions X 1 and X 2 which transmit the input signal for classification through membership functions into fuzzy linguistic variables in Layer II. In this thesis ANFIS controller input variables are chosen as output voltage error (e) and change in error (ce); fed as input variables X 1 and X 2 respectively. The layer II consists of 14 nodes, as each input is classified into 7 membership functions to convert to fuzzy linguistic variables. The layer III comprises of 49 nodes, each node representing a fuzzy rule, denoted as rule layer whose function is to multiply the input signal and is denoted by the symbol R in Figure 6.6. Layer IV consist of output membership functions comprising 49 nodes termed as sigmoidal layer whose node consist of nonlinear mapping imposing bounds on the signal to enhance the stability of the system. The output layer denoted by Layer V consist of output function Y 0 represented by the symbol C in Figure 6.6 which sums all the signals to acquire final inferred result.
77 Crisp Input Fuzzifier Membership values ANFIS Rule Base Membership values Defuzzifier Crisp Output Figure 6.5 Neuro Fuzzy System general block diagram u 1 R 1 V 1 X 1 u 2 R 2 V 2 C u 3 R 3 V 3 X 2 u 4 R 4 V 4 Layer I Layer II Layer III Layer IV Layer V Figure 6.6 Neuro Fuzzy architecture for mamdani model The ANFIS controller implemented in this thesis is of the model described as above whose fuzzifier section comprise the input signals error (e) and change in error signal (ce) whose membership functions are selected as Gaussian membership function and are classified into seven functions namely Negative Big (NB); Negative Medium (NM); Negative Small (NS); Zero (ZE); Positive Small (PS); Positive Medium (PM) and Positive Big (PB). The defuzzifier section comprises the output signal which is the duty cycle (D) is considered as linear signal in ANFIS model with the classification of membership functions as assumed above. The membership function plots for the input variables e and ce is shown by the figures Figure 6.7 and Figure 6.8 respectively and the values of these functions for the
78 various input variables are explained in following sections. 6.2.3.1 Error input membership function classification The input function error (e) classified by Gaussian membership function is varied from -20 to +20 and the membership functions are tuned to the values as NB is -20; NM is -11.5; NS is -5; ZE is 0; PS is +5; PM is +11.5 and PB is +20. The following Figure 5.7 depicts the classification of membership funtions for the input variable error (e). Figure 6.7 Membership function view for input error signal 6.2.3.2 Change in error input membership function classification The input function change in error (ce) classified by Gaussian membership function is varied from -10 to +10 and the membership functions are tuned to the values as NB is -10; NM is -6; NS is -2.5; ZE is 0; PS is +2.5; PM is +6 and PB is +10. The following Figure 5.8 depicts the classification of membership funtions for the input variable error (e).
79 Figure 6.8 Membership function view for input change in error signal The input membership functions are mapped to the output membership function by 49 rules through grid partitioning method using FIS generator in Matlab Simulink ANFIS trainer and the five level ANFIS rule base model is portrayed by the Figure 6.9. Figure 6.9 ANFIS rule base model structure
80 6.2.4 ANFIS CONTROLLER TRAINING The ANFIS model is trained with data sets obtained from the workspace by loading the data into ANFIS trainer from the workspace variable itr. The data is then trained through back propagation technique for 50 epochs for minimum error tolerance. It is found that the error minimizes at epoch 33 during training and it is constant as depicted by Figure 6.10. Figure 6.10 ANFIS training output The final ANFIS rule base surface view after training is depicted by the Figure 6.11 as given below. Figure 6.11 ANFIS rule base surface view
81 6.3 HARDWARE IMPLEMENTATION The hardware implementation model is shown in the following Figure 6.12 as given below. Figure 6.12 Hardware Implementation of Adaptive Neuro Fuzzy Controller The output voltage of the two stage KY converter is fed to the sensing unit for scaling down the voltage level and it is then send to Analogto-Digital Converter (ADC) to convert the analog signal of the output voltage into a digital signal which is sent to the microcontroller which in turn calibrate the actual output voltage of the converter and compares it with the reference voltage of 28 V to produce the error in output voltage. It calculates the rate of change in error by comparing the present error in voltage with that of previous error. The error and change in error are fed to the fuzzification process to convert them into fuzzy values and the corresponding output fuzzy value is fetched from the fuzzy rules table by the controller and the de-
82 fuzzification process is carried out by the controller to convert the fuzzy value into a crisp value which acts as the control signal. Based on the control signal value the controller generates Pulse Width Modulated (PWM) signal which is fed to the converter through the driving circuit consisting of optocoupler and logic gates which send the PWM signal to the converter switches there by activating the converter circuit. The following Figure 6.13 shows the two stage KY converter hardware prototype as given below. Figure 6.13 Two Stage KY Converter Hardware Prototype 6.4 SUMMARY In this chapter the Simulink design of neuro fuzzy controller for two stage KY boost converter and its hardware prototype implementation part is explained in detail.