Rapid Design and Implementation of AC‑DC Converter‑based dsPIC ...

4 downloads 0 Views 846KB Size Report
The design procedure uses Simulink model of the AC‑DC converter system, drive circuitry, Matlab ... Section 2, the analysis of PPWM semi‑controlled AC‑DC.
IETE_JR‑729_12R3

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56

Rapid Design and Implementation of AC‑DC Converter‑based dsPIC Blockset Using Differential Evolution Algorithm Hedi Yahia, Noureddine Liouane and Rachid Dhifaoui1 Departments of Electrical Engineering, Engineering School of Monastir, 5019 Monastir, 1National Institute of Applied Science and Technology, Tunis, Tunisia

ABSTRACT Programmed PWM techniques are some of the control methods used in voltage/current source converters. However, challenges are the task of defining and solving a set of nonlinear transcendental equations in order to obtain the switching angles. The paper presents an efficient Differential Evolution  (DE) algorithm that significantly reduces the computational burden resulting in a fast convergence. The design procedure of a Programmed Pulse Width Modulation (PPWM) rectifier using Matlab/Simulink Blockset and code generation tools for Microchip dsPIC Digital Signal Controller  (DSC) is also presented. The proposed approach follows the standard practice to utilize Matlab/ Simulink and related toolboxes as the design framework to develop a rapid prototype system in a reliable procedure. The design procedure uses Simulink model of the AC‑DC converter system, drive circuitry, Matlab Real‑Time Workshop, and Microchip MPLAB IDE development tools. The generated and self‑developed codes on dsPIC 30F4013 are tested with the dsPICDEM 2 Development Board. The output rectifier waveform and spectrum results from simulation and experimental DSC PPWM are presented. Keywords: Differential evolution, dsPIC blockset, Programmed pulse width modulation, Rapid design, Semi‑controlled rectifier.

1. INTRODUCTION The AC‑DC conversion is used increasingly in a wide diversity of applications: Power supply for microelectronics, household‑electric appliances, electronic ballast, battery charging, DC‑motor drives, power conversion, DC front end inverter, etc., [1‑4]. Four‑wire, semi‑controlled rectifier system charging a split DC supply used as a DC link inverter in Switched Reluctance Machine (SRM) applications is developed to meet the requirements of V/f law. Variable DC voltage and full DC voltage are available for magnetization and demagnetization purposes, respectively [5]. The simplest line‑commutated converters use diodes to transform the electrical energy from AC to DC. The use of thyristors allows for the control of energy flow. The main disadvantage of these naturally commutated converters is the generation of harmonics and reactive power [6]. Harmonics have a negative effect in the operation of the electrical system and therefore, an increasing attention is paid to their generation and control [7,8]. Programmed Pulse Width Modulation eliminating lower‑order harmonics [9] generates high‑quality output spectra which in turn results in minimum current ripples. Performance characteristics of a rectifier power 242

conversion scheme largely depend on the choice of the particular pulse width modulation strategy employed. A variant of differential evolution algorithm (DEA) is used to find the switching angles of a PPWM semi‑controlled rectifier in a way that selected harmonics are removed from its output and the magnitude of DC component is set at any desired level [10,11]. Developing engineering applications with usual methods make the development process time consuming and costly [12]. The workload includes development of a mathematical model as well as algorithm design and implementation, off‑line simulation, and optimization. Rapid prototyping is an alternative way of this situation, especially if the control algorithm is complex and a lot of iteration steps are necessary. Application of microcontrollers and Digital Signal Controllers (DSCs) in high‑performance power electronic systems has been a long‑term pursuing goal in the development of control solutions for power‑converting systems. Computer Aided Design (CAD) tools are extensively used to generate real‑time code automatically [13,14]. The graphical programming approach is followed by automatic conversion from Matlab/Simulink to code generation and optimization for the Embedded Target for Microchip dsPIC using Real‑Time Workshop. IETE JOURNAL OF RESEARCH | VOL 59 | ISSUE 3 | MAY-JUN 2013

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56

AQ1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56

Yahia H, et al.: Kindly provide running title???

A low‑cost digital signal processing chip dsPIC30F4013 is employed to generate the PPWM patterns. The remaining of this paper is organized as follows. In Section 2, the analysis of PPWM semi‑controlled AC‑DC converter is introduced. The build‑up of the PPWM converter toolboxes and the output voltage are given in Section 3. The extension to real‑time implementation is show in Section 4. Experimental results are drawn in Section 5. The last section concludes the paper.

2.

ANALYSIS OF PPWM SEMI‑CONTROLLED RECTIFIER AND PROBLEM FORMULATION

Four‑wire, semi‑controlled rectifier system charging a split DC supply used as a DC link inverter in SRM applications is developed to meet the requirements of V/f law. Variable DC voltage and full DC voltage are available for magnetization and demagnetization purposes, respectively. The half‑controlled bridge, or semi‑controlled converter, is analyzed by considering it as a phase‑controlled, half‑wave circuit in series with an uncontrolled half wave rectifier. The basic power circuit of the semi‑controlled PPWM AC‑DC converter is illustrated in Figure 1. High side is built with semiconductors with gate‑turn‑off capability. The gate‑turn‑off capability allows full control of the converter, because valves can be switched ON and OFF whenever required. This feature has the following advantages: The current or voltage can be modulated (PWM), generating less harmonic pollution, power factor can be controlled, and even it can be made leading  [15,16]. Low side is simplified by replacing three controlled rectifiers with power diodes. This simplification is economically attractive because diodes are considerably less expensive than transistors, and they do not require firing angle control electronics. Inverter operation is not required for this application. Figure 2 shows the idealized output voltage waveform of the AC‑DC voltage controller when a switching function is applied to gate terminal. By the proper choice of PWM switching angles, the DC component can be

controlled and a selected low order of harmonics can be eliminated. Setting up N switching angles per half cycle allows the elimination of (N−1) low‑order harmonics and the remaining angle is used to control the DC component. Consider, for example, an output voltage of PPWM AC‑DC converter with N = 5 pulses per half cycle as in the case of Figure 2. Fourier series can easily express the general high‑side output voltage of the converter as follows: VDC =

3Vm (sin α 1 − sin α 2 + sin α 3 ...sin α N ) (1) π

 sin ( 3 k + 1) α − sin ( 3 k + 1) α   1 2    1  3V  3 k + 1  + sin ( 3 k + 1) α 3 ...sin ( 3 k + 1) α N   V = m  k π  1 sin ( 3 k − 1) α 1 − sin ( 3k − 1) α 2      + n ( 3 k − 1) α    3 k − 1  + sin ( 3 k − 1) α 3 ...sin N  (2) where, k = 1, 2, …, N‑1 is the number of harmonics to be eliminated, αi is the ith switching angles, and Vm is the maximum value of the input voltage. The problem objective is to find the switching instants such that the DC component (VDC) is set to required amplitude and low‑order harmonics (Vk) are set to zero. An objective function describing a measure of effectiveness of eliminating selected order of harmonics by controlling the DC component is specified as f ( 1 ,  2 , ...,  N ) = (VDC − md )2 + V12 + V22 + ... + VN2 − 1

(3)

md = ( πVDC 3Vm ) (4) Minimizing (3) that is subject to the constraint of (5), the optimal switching angles are generated and consequently selected harmonics are eliminated. These switching angles are generated for different values of 9 9P



Figure 1: Three‑phase, four‑wire, semi‑controlled rectifier. IETE JOURNAL OF RESEARCH | VOL 59 | ISSUE 3 | MAY-JUN 2013

D D D D D S

ȦW

Figure 2: Upper‑side output voltage of PWM AC‑DC voltage. 243

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56

AQ1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56

Yahia H, et al.: Kindly provide running title???

modulation index and then stored in look‑up tables to be used to control the converter for certain operating point. 2.1 Differential Evolution Algorithm The various objective functions chosen to generate a particular programmed PWM technique are associated with the difficult task of computing specific switching angles, such as prolonged and tedious computational steps and convergence to local optima [17,18]. Normally, iterative methods such as Conjugate Gradient Descent Method and Newton‑Raphson Method, are used to solve these equations [19]. To obtain convergence with numerical techniques, the initial values of the variables must be selected considerably close to the exact solution. Also, in most cases, only a local minimum can be obtained after considerable computational time. Global optimization  (GO) is concerned with finding the optimum points of a multi‑modal function in an m‑dimensional space. A number of methods of GO were soon developed [20‑22]. The class of search and optimization techniques has become very popular in many engineering applications [23]. These methods search from a population of points instead of a single point as in conventional search and optimization techniques. Moreover, they do not require a suitable initial guess. Differential Evolution (DE) method is one among them. DE is a powerful population‑based evolutionary algorithm for GO, which was originally proposed by Storn and Price [24]. Recently, DE is gaining ground due to its strong optimization capability and simple implementation, and now it has been successfully applied to many real‑world applications [25,26]. In this paper, a DE‑based method has been proposed for solving the complex equations in a PPWM problem. DE algorithm utilizes NP (population size) and D‑dimensional vectors as a population for each iteration (called a generation of this algorithm). Xi = ( xi 1 , xi 2 ,..., xiD )

T

i = 1,..., NP (5)

At each generation, two operators namely mutation and crossover are applied on each individual, thus producing the new population. Then, a selection phase takes place, where each individual of the new population is compared to the corresponding individual of the old population, and the best between them is selected as a member of the population in the next generation [24]. According to the mutation operator, for each individual XiG , i = 1,..., NP , at generation G, a mutation vector

(

(G + 1) Vi( G + 1 ) = vi(1G + 1 ) , vi(2G + 1 ) ,..., viD

244

)

T

(6)

is determined using (8). The choice of (8) dictates the variant of DE to be used in the application.

(

)

Vi( G + 1 ) = Xr( G1 ) + F Xr( G2 ) − Xr( G3 ) (7) where, F ≥ 0 is a real parameter, which controls the amplification of the difference between two individuals so as to avoid search stagnation, and r1, r2, and r3 are mutually different integers, randomly selected from the set {1, 2 ,..., NP} . Following the mutation phase, the crossover operator is applied on the population. For each mutant vector, Vi( G +1 ), an index rnbr ( j ) ∈ {1, 2 ,..., D} is randomly chosen, and a trial vector T

(G + 1)  (8) U i( G + 1 ) = ui(1G + 1 ) , ui(2G + 1 ) ,..., uiD

is generated, with (G + 1) ij

u

 vijG + 1 if [r and b( j ) ≤ CR ] or [ j = rnbr ( j )] = G (9) xij if [r and b( j ) > CR ] and [ j ≠ rnbr ( j )]

where, j = 1, 2, …, D; r and b (j)= jth evaluation of a uniform random number generator within [0,1], and CR = user defined crossover constant in the range [0,1] [23]. To decide whether the vector U i( G +1 ) should be a member of the population of the next generation, it is compared to the corresponding vector XiG. Thus, if f denotes the objective function to minimize, then X

(G + 1) i

U iG + 1 if f (U iG + 1 ) < f ( XiG ) = G (10) Xi otherwise

Therefore, each individual of the trial vector is compared with its parent vector and the better one is passed to the next generation. The pseudo code for DE algorithm (DE/rand/1/bin) is given in Figure 3. 2.2 Results and Simulation The system is simulated using discrete‑time simulation option and the integration step size of the solver is chosen to be 50 microseconds in Matlab/Simpower environment. Figure 4 presents the simulation results for the lower side DC output and resulting in harmonic spectrum. In this result, the presence of lower order abnormal harmonics is clearly evident. New control strategy‑based DE which selectively cancels the generated lower order harmonics at the output terminal DC upper side of rectifier is adopted. A set of Matlab files implementing the proposed DE method has been successfully applied to a number of cases to IETE JOURNAL OF RESEARCH | VOL 59 | ISSUE 3 | MAY-JUN 2013

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56

AQ1

Input D, NP , F ∈[0 , 1], CR ∈[0 , 1], and initial bounds : lower ( x j ), upper ( x j ), j = 1,... , D initialize X

{x

G=0 i1

}

G=0 i

=

G=0 ,..., xiD as

for eacch individual i ∈ {1,..., NP} (upper ( x j ) − lower ( x j )), j = 1,... , D

end for each Evaluate the fitness for each individual k=1 while the halting criterion is not satisfied doo for i = 1 to NP do select uniform randomly r1 ≠ r2 ≠ r3 ≠ i jrand = rnd int(11, D) for j = 1 to D do if rnd j [0 , 1] < CR ∧ j = jrand then

To verify the validity of the proposed method, a PWM AC‑DC voltage controller was simulated using Matlab/Simpower based on the firing angles obtained in Figure 5. Time domain waveforms and spectrum of output voltage, while maintaining the DC component at 50% (md = 0.5) and eliminating of 1st, 2nd, 3rd and 4th order harmonic components, are presented in Figure 6. The simulation results given by Figure 6 are in full agreement with theoretical result. It is evident that DE method works successfully in programmed PWM problem by eliminating all the desired harmonics (150, 300, 450, and 600 Hz) and also maintaining required DC component output voltage.

U ij = X rj ,3G = k − 1 + F × ( X rj ,1G = k − 1 − X rj ,2G = k − 1 ) else U ij = X ij ,G = k − 1 end if end for

Case II: Harmonics to be eliminated 1-6: Seven switching angles are considered in this case allowing the elimination of 6 low‑order harmonics, and the remaining angle is used to control the DC component. The solution sets for the switching angles for different values of the modulation index (0.1 ≤ md ≤ 0.9) are illustrated in Figure 7. Figure 8 presents the waveforms and spectrum of the output voltage of PPWM converter while maintaining the DC component at 50% (md = 0.5) and eliminating of 1st, 2nd, 3rd, 4th, 5th, and 6th order harmonics. It can be clearly seen that the selected harmonics are totally reduced. It is worth noting that the first significant harmonic in this case (i.e., 7th harmonic) is relatively high.

Evaluate the offspring U i if f (UGi = k ) < f ( XGi = k − 1 ) then XiG = k = U iG = k else XiG = k = XiG = k − 1 end if end for k = k+1 end while return the best encountered d solution Figure 3: The Differential evolution algorithm.

3.

     









illustrate its robustness. The parameters selected for the implementation of DE are: The initial population was set to 100, CR = 0.3, mutation constant F = 0.5, and maximum number of generations = 500. Case I: Harmonics to be eliminated 1-4: Setting up 5 switching angles, allowing the elimination of 4 low‑order harmonics and the remaining angle is used to control the DC component. The angles  1 ,  2 ,...,  5 are plotted for different values of the modulation index (0.1 ≤ md ≤ 0.9) in Figure 5.

x ij ,G = 0 = lower ( x j ) +r and j [0 , 1] ×

+DUPRQLFDPSOLWXGH 9

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56

Yahia H, et al.: Kindly provide running title???





)UHTXHQF\ +]

Figure 4: Output voltage of lower side and corresponding harmonic spectrum. IETE JOURNAL OF RESEARCH | VOL 59 | ISSUE 3 | MAY-JUN 2013

BUILD‑UP OF THE PPWM SEMI‑CONTROLLED RECTIFIER

From the point of view of the commutation process, controlled rectifiers can be classified in two important categories, Line Commutated Controlled Rectifiers (Thyristor Rectifiers) and Force Commutated PWM Rectifiers  [14]. Force‑commutated rectifiers are built with semiconductors with gate‑turn‑off capability. The gate‑turn‑off capability allows full control of the converter, because valves can be switched on and off whenever is required. This feature has the following advantages: The current or voltage can be modulated (Pulse Width Modulation), generating less harmonic contamination, power factor can be controlled, and even it can be made leading. The additional 245

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56

AQ1 6ZLWFKLQJDQJOHV GHJUHHV



applications such as rectifiers with harmonic elimination capability  (active filters), power factor compensators, machine drives with four‑quadrant operation, and regenerative converters for traction power supplies. If inverter operation is not required, the circuit may be simplified by replacing three controlled rectifiers with power diodes. This simplification is economically attractive because diodes are considerably less expensive than thyristors, and they do not require firing angle control electronics. The half‑controlled bridge or semi‑controlled rectifier is analyzed in this section.

D D

 D D



D 









0RGXODWLRQLQGH[ PG

8SSHUVLGHRXWSXWGF 9

Figure 5: Switching angles versus modulation index.





 









+DUPRQLFDPSOLWXGH 9

7LPH V      





)UHTXHQF\ +]

Figure 6: Output voltage of upper side and corresponding harmonic spectrum with 5 switching angles at md = 0.5. 

D D



D



D

D D



Using Matlab and Simulink for modeling, analysis, design, and offline simulation has become a standard for control system development [27‑29]. Figure 9 shows a block diagram of the proposed system. The power circuit consists of a four‑wire, semi‑controlled rectifier topology using IGBT and power diodes. The three common cathode transistors generate a positive voltage respect to the neutral and the three common anode diodes produce a negative voltage. The chopping angles or gating patterns are a function objective‑based DE. By the proper choice of PWM switching angles, the DC component can be controlled and a selected low‑order harmonics can be eliminated. The block ZCD is a zero crossing detector circuit that is used to detect a zero point of input line voltage waveform. This circuit uses voltage comparator LM311 to complete this function. 3.1 Simulink Model



6ZLWFKLQJDQJOHV GHJUHHV

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56

Yahia H, et al.: Kindly provide running title???

D 







0RGXODWLRQLQGH[ PG

In preparation for a full system simulation, a Simulink block diagram of the semi‑controlled rectifier was created. Figure 10 shows the overall block diagram of the developed rectifier system. The power converter employs three IGBT switches with three serial diodes for high side and three diode rectifiers for low side, which are arranged in a typical semi‑controlled bridge rectifier configuration. The zero‑crossing detection functionality was successfully demonstrated in hardware using voltage comparator LM311. In the simulation, zero‑crossings in the voltage waveform are detected by comparing the instantaneous voltage input to its last measured value [30]. Inequality of the current and previous values of the voltage state represent a zero‑crossing, which triggers the integrator block. Phase‑shift trigger pulse generator unit is a key block for controlling rectifier. This is based on comparison between integrator signal output and switching angle values result from DE algorithm.

Figure 7: Switching angles versus modulation index.

3.2 Generation of Gating Patterns

advantages of force‑commutated rectifiers with respect to line‑commutated rectifiers make them better candidates for industrial requirements. They permit new

Second stage is concerned with generation of gating patterns. The Control part can be directly implemented in a real‑time application using dsPIC for experimental

246

IETE JOURNAL OF RESEARCH | VOL 59 | ISSUE 3 | MAY-JUN 2013

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56

AQ1 8SSHUVLGHRXWSXWGF 9

validation. The circuit model of the chopping angles is constructed in MATLAB/Simulink, which contains power system, discrete Blockset, and logical operation tools to analyze the systems and specific blocks used in code generation for 30F4013 dsPIC. The Simulink model of the controller algorithm is presented in Figure 11.





 









7LPH V +DUPRQLFDPSOLWXGH 9

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56

Yahia H, et al.: Kindly provide running title???

  

The triggering pulses of the three–phase, semi‑controlled bridge are shown in Figure  12. From this figure, we can see the output waveform of the series of triggering pulses. Simulations show that the method of trigger pulse phase‑shifting is practicable, and confirms the rationality of the software in the laboratory environment, and the effect is satisfying.

4.

  







)UHTXHQF\ +]

Figure 8: Output voltage of upper side and corresponding harmonic spectrum with 7 switching angles at md = 0.5. $& ZLUHV 6\QFKURQL]DWLRQ

1XPEHURIKDUPRQLFV 7RHOLPLQDWH :'( $OJRULWKP

3:03DWWHUQ *HQHUDWRUV

8SSHU VLGH

6HPLFRQWUROOHG 6SOLWGFUHFWLILHU

0RGXODWLRQ,QGH[ PG

/RZHU VLGH

Figure 9: The block diagram of PPWM AC‑to‑DC converter. DOSKD 'LVFUHWH 7V HV

DOSKD 

SRZHUJXL



DOSKD

DOSKD

DOSKD

DOSKD 

Y  Y 

Once the stable operation of the system is ensured in simulations, the C‑code of the dsPIC blocks is generated using Embedded Target for microchip and Real‑Time Workshop Embedded Coder. Problems related to the manually coded software arise from its huge complexity on one side and the requirement of its high reliability and short time to the market on the other side. Block programming is much closer to the engineers and the scientists than other types of programming. Block programming enables them to force their energy to the system design and not into the code development process, like it was in the practice in the previous era. The code generation process must be quick and transparent to the system designer. If so, they can quickly test and validate designed algorithms on the intended target (microcontrollers, DSP…) [31]. Control algorithms for the dsPIC 30F4013 microcontroller can be developed using blocks from the Target for

3:0*HQHUDWRU



DOSKD 

REAL‑TIME IMPLEMENTATION

KLJKVLGH

DOSKD 2XW DOSKD

7R:RUNVSDFH 6FRSH

DOSKD

5HFW

V\Q Y 

$& 0DLQ3RZHU

Y 

J 

 L

6FRSH

/

6FRSH

5 Y 

/  /

5

ORZVLGH 7R:RUNVSDFH

Figure 10: The Matlab/Simulink/SimPowerSystems model of the PPWM AC‑to‑DC converter. IETE JOURNAL OF RESEARCH | VOL 59 | ISSUE 3 | MAY-JUN 2013

247

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 AQ5 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56

AQ1 DOSKD 

!

. $GG

7DOSKD

 &RQVWDQW



.7V ]  ]

IUHT !



6LQH:DYH DOSKD

!

.

 DOSKD

$GG

7DOSKD

$GG

7DOSKD

DOSKD

!

.

 DOSKD

$GG

7DOSKD

$GG

7DOSKD

25 25

!

!

.



!

!

.



6FRSH $1'

&RQVWDQW 

!

7DOSKD !

. $GG

7DOSKD

25 !

. $GG

!

7DOSKD !

. $GG

7DOSKD !

. $GG

XLQW

!

. $GG

25

127

7DOSKD

Figure 11: The Matlab/Simulink model of the controller.

 7ULJJHULQJSXOVHV

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56

Yahia H, et al.: Kindly provide running title???



 









7LPH V

Figure 12: Triggering pulses of the controller output. Microchip dsPIC toolbox and predefined blocks from Simulink or user‑defined blocks. After the validation of the model, code can be generated using the Real‑Time Workshop. To convert from Matlab/Simulink to C code, the Real‑ Time Workshop (RTW) environment provides automatic code generation. In addition, RTW also provides several ways to optimize controllers for particular types of processors. Several customizations must be made. 248

First, RTW is selected under the Configuration menu. Next, the Solver option is chosen, and under Solver options, the Type box must be changed to Fixed‑Step for an embedded target. Because this application is implemented on a microcontroller chip, the proper. Tlc file needs be selected. In the RTW system target value, type ert.tlc, which causes RTW to produce code targeted for embedded systems. The makefile option allows for further customization such as conversion for microcontroller‑enabled floating point or integer operations. Next, the Configuration of hardware implementation must be selected. Once this has been selected, RTW is selected again from the selection menu and the Build button is pressed to start building the C files. A Target Preference block has to be added to the model; in this case, the dsPIC30f target the block. This block, by double clicking, allows initialization purposes for peripherals. The dsPIC30fxx Main block is essential for every application model. It does not connect to any other blocks, but stands alone to set the target preferences for the model. This allows the user to control build options for the compiler, IETE JOURNAL OF RESEARCH | VOL 59 | ISSUE 3 | MAY-JUN 2013

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56

AQ1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56

Yahia H, et al.: Kindly provide running title???

assembler, and linker who will be invoked to generate the executable image file for download to the dsPIC. The input to the controller algorithm is the voltage synchronizations. It is decoded from the input capture blocks. The output of the controller algorithm is the PWM signal controlling transistors switching the voltage applied on the AC/DC converter. The write port output block is used. The target subsystem is presented in Figure 13. 'RXEOH&OLFNWR&RQILJXUH IRUGV3,&BVWIWOF &RQILJ 3RUW&RQILJ

GV3,&I[[0DLQ

XLQW

,Q

XLQW

2XW 'DWD

,&7LPHU&DSWXUH

XLQW :ULWH3RUW2XWSXW

3:0*HQHUDWRU

Figure 13: Simulink block diagram for controller with target.

5.

EXPERIMENTAL RESULTS

For fast prototyping, we use the dsPICDEM 2 Development Board with the dsPIC30F4013, a 16‑bit microcontroller. The PICkit 3 uploads the hex file onto the dsPIC. Figure 14 shows the experimental setup consisting of a PC with Matlab/Simulink interfaced with MPLAB (debugger), connected to the dsPICDEM 2 evaluation board through the PicKit3, with the dsPIC30F 4013 micro‑controller unit (MCU). Code is deployed from Matlab/Simulink controller model into dsPIC30F4013 using the MPLAB, the debugger, and through the dsPICDEM2 evaluation board. After flashing the code into the dsPIC30F4013, chip running is carried out at an internal clock of 7.3728 MHz. By using the experimental setup, we find the triggering pulses given by Figure 15. The goal of this experiment confirms the validity of the hardware circuit and the rationality of the software in the laboratory environment, and the effect is satisfying.

6. CONCLUSION DEA was proposed to optimize the programmed PWM AC‑DC converter circuit. Hence, the difficulty and amount of calculations are greatly reduced. The implementation of Real‑time Matlab/Simulink Interface for Programmed PWM control of three‑phase, four‑wire semi‑controlled rectifier using dsPIC30F4013 is as well presented. In combination with Embedded RTW, the time needed for application development is reduced. Generated code is well optimized and it is comparable with the hand‑written code. The result of simulation and experiment shows that the real‑time library is useful in Rapid Design and Implementation for the target dsPICDEM 2 systems.

Figure 14: Experimental setup.

REFERENCES 1.

Figure 15: Experimental result of the PPWM controller.

R Ghosh, and G Narayanan, “Control of Three‑Phase, Four‑Wire PWM Rectifier”, IEEE Transactions on Power Electronics, Vol.  23, pp. 96‑106, 2008. J Dannehl, J F Fuchs, and S Hansen, “Rectifier with LCL‑Filter using different Current Control Structures”, EPE 2007 – Aalborg, pp. 1‑10, 2007. H Yahia, M F Mimouni, and R Dhifaoui, “New Control Strategy of Switched Reluctance Machine Drives”, International Review of Modelization and Simulation (IREMOS), Vol. 3, pp. 299‑305, 2010. J Wiseman, and C B Wu, “Active Damping Control of a High‑Power PWM Current‑Source Rectifier for Line‑Current THD Reduction”, IEEE Transactions on Industrial Electronics, Vol. 52, pp. 759‑64, 2005. D Karagiannis, E Mendes, A Astolfi, and R Ortega, “An Experimental Comparison of Several PWM Controllers for a Single‑Phase AC– DC Converter”, IEEE Transactions on Control Systems Technology, Vol. 11, pp. 940‑7, 2003. R Espinoza, J G Joos, J J Guzman, I L A Moran, and R P Burgos, “Selective Harmonic Elimination and Current/Voltage Control in Current/Voltage‑Source Topologies: A  Unified Approach”, IEEE Transactions on Industrial Electronics, Vol. 48, pp. 71‑81, 2001.

IETE JOURNAL OF RESEARCH | VOL 59 | ISSUE 3 | MAY-JUN 2013

249

2. 3. 4. 5.

6.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 AQ5 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 AQ2 55 56

AQ1

Yahia H, et al.: Kindly provide running title???

7. A K Al‑Othman, N A Ahmed, A M Al‑Kandari, and H K Ebraheem, 19. M Karpagam, and N Devarajan, “Extenuation of Voltage Harmonics 1 1 “Selective Harmonic Elimination of PWM AC/AC Voltage Controller in PWM AC Chopper Using Differential Evolution”, European Journal 2 2 Using Hybrid RGAPS Approach”, World Academy of Science, of Scientific Research, Vol. 42, pp. 204‑2013, 2010. AQ3 3 3 Engineering and Technology, Vol. 29, pp. 140‑6, 2007. 20. E Mesura‑Montes, and C A Monterrosa‑Lopez, “Global and Local 4 AQ2 8. G Gong, M L Heldwein, U Drofenik, J Minibock, K Mino, and W J W Kolar, 4 Selection in Differential Evolution for Constrained Numerical “Comparative Evaluation of Three‑ Phase High‑Power‑Factor AC–DC Optimization”, Journal of Computer Sciences and Technology, Vol. 9, 5 5 Converter Concepts for Application in Future More Electric Aircraft”, pp. 43‑52, 2009. 6 6 IEEE Transactions on Industrial Electronics, Vol. 52, pp. 727‑37, 2005. 21. H Yahia, N Liouane, and R Dhifazoui, “Weighted Differential Evolution 7 7 9. V G Agelidis, A I Balouktsis, and C Cossar, “On Attaining the Multiple Based PWM Optimization for Single Phase Voltage Source Inverter”, 8 8 Solutions of Selective Harmonic Elimination PWM Three‑Level International Review of Electrical Engineering, Vol.  9, pp.  125‑30, Waveforms Through Function Minimization”, IEEE Transactions on 2010. 9 9 Industrial Electronics, Vol. 55, pp. 996‑1004, 2008. 22. B V Babu, P G Chakple, and J H S Mubeen, “Multi‑objective Differential 10 10 10. A Bhat, and P Agarwal, “Three Phase Power Quality Improvement Evolution  (MODE) for Optimisation of Adiabatic Styrene Reactor”, 11 11 AC‑DC Converters”, Electric Power Systems Research, Vol.  78, Journal of Chemical Engineering Science, Vol. 60, pp. 4822‑37, 2005. 12 12 pp. 276‑89, 2008. 23. R Storn, and K Price, “Differential Evolution‑A simple and Efficient 13 13 11. M S A Dahidah, and M V C Rao, “A Hybrid Genetic Algorithm for Heuristic for Global Optimization over Continuous Spaces”, Journal Selective Harmonic Elimination PWM AC/AC Converter Control”, 14 14 of Global Optimisation, Vol. 11, pp. 341‑59, 1997. Electrical Engineering, Vol. 89, pp. 285‑91, 2007. 15 15 24. E M Montes, C A C Coello, and J V Reyes, “Increasing Successful 12. M Smolnikar, and M Mohorcic, “A Framework for Developing Offspring and Diversity in Differential Evolution for Engineering 16 16 a Microchip PIC Microcontroller Based Applications”, WSEAS Design”, Proceedings of the Seventh International Conference on 17 17 Transactions on Advances in Engineering Education, Vol. 5, pp. 83‑91, Adaptive Computing in Design and Manufacture  (ACDM 2006), 2008. 18 18 pp. 131‑9, 2006. 13. A Castro, P Zumel, O Garcia, T Riesgo, and J Uceda, “Concurrent 19 19 25. M F Tasgetiren, and P N Suganthan, “for Solving Constrained and Simple Digital Controller of an AC/DC Converter with Power Optimization Problem”, CEC, pp. 33‑40, 2006. 20 20 Factor Correction Based on an FPGA”, IEEE Transactions on Power 26. R Duma, P Dobra, M Abrudean, and M Dobra, “Rapid Prototyping 21 21 Electronics, Vol. 18, pp. 334‑43, 2003. of Control Systems using Embedded Target for TI C2000 DSP”, 22 22 14. M S A Dahidah, and V G Agelidis, “Selective Harmonic Elimination th Proceeding of the 15   Mediterranean Conference on Control and PWM Control for Cascaded Multilevel Voltage Source Converters: 23 23 Automation, pp. 3‑11, 2007. A  Generalized Formula”, IEEE Transactions on Power Electronics, 24 24 27. L Samet, N Masmoudi, M W Kharrat, and L Kamoun, “A Digital PID Vol. 23, pp. 1620‑30, 2008. Controller for Real‑time and Multi‑loop Control: A  Comparative 25 25 15. B Singh, B N Singh, A Chandra, K Al‑Hadad, K A Pandey, and Study”, IEEE Int. Conf. on Electronics, Circuits and Systems, Vol.  1, 26 26 D Kothari, “A Review of Single‑Phase Improved Power Quality AC‑DC pp. 291‑6, 1998. Converters”, IEEE Transactions on Industrial Electronics, Vol.  50, 27 27 28. A Monti, E Santi, R A Dougal, and A M Riva, “Rapid prototyping of pp. 962‑81, 2003. 28 28 digital controls for power electronics”, IEEE Transactions on Power AQ2 16. A M R M R Hasanzadeh, S Kaboli, and A Homaifar, “A Genetic Electronics, Vol. 18, pp. 915‑23, 2003. 29 29 Algorithm Based Programmed PWM Optimum Switching Pattern 29. D Xu, Y W Li, and B Wu, “Direct PWM Synchronization Using an 30 30 Calculation”, IEEE Transactions on. Industry Applications, pp. 1081‑5, all Digital Phase‑locked Loop for High Power Grid‑interfacing 2003. 31 31 Converters”, IEEE Applied Power Electronics Conference, Anaheim, 17. N A Azli, and A H Yatim, “Curve Fitting Technique for Optimal Pulse 32 32 CA, pp. 901‑6, 2007. Width Modulation  (PWM) on Line Control of a Voltage Source 33 33 30. J A Asumadu, and R G Hoft, “Microprocessor Based Sinusoidal Inverter  (VSI)”, IEEE Transactions on Industry Applications, Vol.  5, 34 34 Waveform Synthesis Using Walsh and Related Orthogonal Functions”, pp. 419‑22, 2000. IEEE Transactions on Power Electronics, Vol. 4, pp. 234‑41, 1989. 35 35 18. V G Agelidis, A Balouktsis, I Balouktsis, and C Cossar, “Multiple sets 31. J Affari, and A Dastfan, “Optimization of Single‑phase PWM Rectifier of solutions for harmonic elimination PWM bipolar waveforms: 36 36 Performance by Using the Genetic Algorithm”, International Conference Analysis and experimental verification”, IEEE Transactions on Power 37 37 on Renewable Energies and Power Quality, pp. 115‑21, 2010. Electronics, Vol. 21, pp. 1833‑7, 2006. 38 38 39 39 40 40 41 41 AQ4 AUTHORS 42 42 Rachid Dhifaoui Hedi Yahia 43 43 44 44 45 45 46 46 47 47 E‑mail: ??? E‑mail: ??? 48 48 Noureddine Liouane 49 49 50 50 51 51 52 52 E‑mail: ??? 53 53 54 54 DOI: ???; Paper No JR 729_12; Copyright © 2013 by the IETE 55 55 Author Queries??? AQ4: Kindly provide Authors' biography, photo and 56 56 AQ1: Kindly provide running title??? E-mail ID

AQ2: AQ3:

250

Please confirm author names and initial Please confirm page no

AQ5:

Please check whether the edit in the sentence conveys the intended meaning.

IETE JOURNAL OF RESEARCH | VOL 59 | ISSUE 3 | MAY-JUN 2013