I. z . 1.. :35... . I . .. L r $§é$fi «Egg; 9.... «If IL .uhfifg . a,“ .., ‘ut usawmmge . bra uawmflui ‘ s rvrnvaKt- .0.....:., in L. 33.23.; . .. “ma 5“; 3. :yNuzizsy.» 2..., a; an...“ . V) 9. r‘ Err...“ n 1 3 .u .r of“. ‘ 1.4%... _ w! .., 1. rm. .. fin. “Km; 3% . . .‘ 3%“? V v 1 .x. : BREE? . , rum? :nufl \ . . , .4.Lu.wm.. 1w .n :u z» m I «1 Q5,“ . A; _ . As .12 é». .3 . fimww a s ‘3“me nah». . .0 ,; pain» {59%. in: . w“. .91.... dflfiwamrmmvvun .1 us an . . 3.2!. ,S‘Iéf "2 1 a .1 L :k .n u? 9 .r... 5...! 3.. . .c...') I "1ng yr 1‘: a... .3 .7ut...:. r12... . v. I. r41 2 1r 5 2.1.. 6 z i . . 311: 2?? 5 3:1}. ‘9‘ .. at... A , ‘31: . E. ... gayuyanégfiwg a5 thwwfi. a. w z)... .5 t. THESE :2 200‘ LIBRARY , Michigan State University This is to certify that the dissertation entitled A NEW OVERMODULATION METHOD BASE ON A PROPORTIONAL REFERENCE SIGNAL GENERATOR presented by Andres J. Diaz-Castillo has been accepted towards fulfillment of the requirements for Ph.D degree in E]ECtrica1 Eng 64> éfL‘ Major professor Date W MS U i: an Affirmatiw Action/Equal Opportunity Institution 0-12771 A ._—.‘-————-f ‘4 —--——-————_.——‘_-___ 44 . PLACE IN RETURN BOX to remove this checkout from your record. TO AVOID FINE return on or before date due. MAY BE RECALLED with earlier due date if requested. DATE DUE DATE DUE DATE DUE moo animapssmc A New Overmodulation Method Based on a Proportional Reference Signal Generator By Andres J. Diaz-Castillo A DISSERTATION Submitted to Michigan State University in partial fulfillment of the requirements for the degree of DOCTOR OF PHILOSOPHY Department of Electrical and Computer Engineering 2000 HWII HI ' , LS1“: ABSTRACT A New Overmodulation Method Based on a Proportional Reference Signal Generator By Andres J. Diaz-Castillo In order to obtain the maximum fundamental output voltage from a three phase inverter, a transition from PWM to six-step mode needs to be done. Because of the nonlinear behavior of this overmodulation range, different methods have been proposed to linearize it. Those methods use complex equations and look-up tables, limiting their application to powerful microprocessors with considerable amount of memory. In this thesis an overmodulation method is proposed, which has a perfect output linearity and requires only linear equations for implementation. This method can be applied to both sinusoidal and space vector PWM. A new method to calculate the modulation index from the instantaneous phase values is also proposed. Mathe- matical analysis, simulations, real microprocessor implementation, and a stand-alone digital design are presented here to demonstrate the effectiveness and simplicity of the proposed method. Copyright © by Andres J. Diaz-Castillo 2000 To my wife, Angeles iv 1 “mil 1 his summit .' of my IMHII. .l sperm] w Zanardrlli fn to the rlvpar' {0 my {mini Thanks to 11 goals in my Ellllill) and ACKNOWLEDGMENTS I would like to express my gratitude to my advisor Professor Elias Strangas for his support and excellent guidance. I would also like to thank to the other members of my committee for their time and effort in being in my committee. A special words of thanks to my lab colleagues in special, Ali Khurram and Wes Zanardelli for their friendship and their help with LaTex and computers. Many thanks to the department staff in special to Marilyn Shriver for her assistance. Special thanks to my friends Walter Zuluaga and Mary Sherby for their help with the corrections. Thanks to my parents for always being my guide and inspiration in obtaining the big goals in my live. Finally, thanks to my wife Maria de los Angeles and my kids: Diego, Emilio and Leticia for their love, support and sacrifice. LIST OF l 1 Introdu 2 Previm ‘2.l C, 2 2 ‘2. 4 I -5 R 3 Prom 3.1 1 3:2 . 3.3 ‘ 9 'J. 3.5 4 .\lat 4.1 I 2.2 Ti] II. 2.3 5,. I TABLE OF CONTENTS LIST OF FIGURES 1 2 Introduction Previous Work 2.1 Compensating Modulation Index .................... 2.2 Third Harmonic Injection ........................ 2.3 Space Vector Modulation ......................... 2.3.1 Mode I ............................... 2.3.2 Mode II .............................. 2.3.3 Mode III .............................. 2.4 Adding a Square Wave to the Reference ................ 2.5 Reshaping the Modulation Command. ................. Proposed Method 3.1 Description of the Proposed Method .................. 3.2 Approximation of the Modulation Index ................ 3.3 PRSG Using Unmodified Reference ................... 3.4 PRSG Using Modified Reference ..................... 3.5 Two-Step Transformation ........................ Mathematical Analysis 4.1 Linearity of the PRSG method ..................... 4.1.1 Linearity of the PRSG-Unmodified ............... 4.1.2 Linearity of the PRSG-Modified ................. 4.1.3 Linearity of the PRSG-General Case .............. 4.2 Harmonic Distortion of the PRSG Method ............... 4.3 Optimization of Constants for Modulation Index Calculation ..... Simulation 5.1 Proportional Reference Signal Generator (PRSG) ........... vi viii «was: 12 15 18 19 21 23 23 26 29 29 33 36 36 36 38 40 42 44 48 48 5.1 3.1 5.1 5.1 5.2 .\l« 5.3 CHI 5.3.. 5.3.; 6 Experin‘ 6.1 Gun 6.1.1 6.1.2 6.1. 6.1. ‘1 CI: 7.2 T... 6 7 5.1.1 PRSG Components ........................ 5.1.2 PRSG Using Unmodified Reference signal ........... 5.1.3 PRSG Using Modified Reference Signal ............. 5.1.4 PRSG using Two-Step Transformation ............. 5.2 Mode I and Mode II ........................... 5.3 Comparison of PRSG and Existing Methods .............. 5.3.1 Linearity .............................. 5.3.2 Harmonic Distortion ....................... Experimental Results 6.1 General Description ............................ 6.1.1 One Byte Resolution ....................... 6.1.2 Internal Generation of vd and vq ................ 6.1.3 Three Phase Output Signals ................... 6.1.4 Voltage Source Inverter ...................... 6.1.5 Data Acquisition Systems .................... 6.2 PRSG Microcontroller Assembler Implementation ........... 6.2.1 Timing System .......................... 6.2.2 Reference Signal Generation ................... 6.2.3 PRSG-Unmodified Reference Case Results ........... 6.2.4 PRSG-Modified Reference Case Results ............. VHDL Implementation 7.1 General Specification ........................... 7.2 Test Procedure .............................. 7.2.1 PRSG Using Modified Reference Signal ............. 7.2.2 PRSG Using Modified Reference Signal ............. 7.2.3 PRSG Using Two-step Transformation ............. 7.3 Analysis of Results ............................ Conclusions 8.1 Future Work ................................ A VHDL code for AD-pack B VHDL code for test bench I BIBLIOGRAPHY vii 48 54 59 61 64 64 69 70 73 73 73 74 75 75 76 76 76 78 78 83 87 88 91 91 96 96 101 102 104 107 116 119 IQ IQ ‘Q H ru ta 1:; Q‘ .1... 00 r») ‘3‘.» C. O W. W +- (,0 U O CO C" I PI: 1.1 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 2.10 2.11 2.12 2.13 2.14 3.1 3.2 3.3 3.4 3.5 3.6 5.1 5.2 5.3 5.4 5.5 5.6 5.7 LIST OF FIGURES Voltage source inverter ........................... Pulse width modulation. ......................... Increasing reference signal beyond one .................. Third harmonic injection. ........................ Space vectors ................................ Space vector projection. ......................... Limit of the linear range in SVPWM ................... Overmodulation Mode 1. ......................... Modulation index vs. reference angle in Mode I. ............ Mode 11. Reference angle vs. command angle (holding ang1e=12°). . . Fundamental vs. holding angle in Mode II ................ Reference signal and THD for mode I-II. ................ Reference signal and THD for Mode III. ................ Square wave addition method ....................... Reshaping the modulation command method. ............. Representation of proposed method .................... Waveforms for calculation of the modulation index ........... Proportional Reference Signal Generator (unmodified reference case). Proportional Reference Signal Generator (modified reference case). . . Proportional Reference Signal Generator (two-step case). ....... Total harmonic distortion for the three proposed versions of PRSG. 3-to-2 transformation. .......................... Phase ordering block diagram ....................... Modulation index and offset calculations ................. Normalized m,- and normalizing factor N arm. ............. Square-sinusoidal mixer. ......................... Complete system for PRSG. ....................... PRSG block diagram with parameters. ................. viii OI QDCOOOUI 13 13 16 17 18 20 21 22 24 28 30 32 33 34 49 50 52 53 55 56 57 5.1? Tm 3.13 8111: £3.11 .\lm 5.13 8111: 5.16 P11: 3.1? Ni 6.] F1, 6.2 1‘}? 6.3 Pr 6.1 1‘11 6.5 m ~r —r Iv ,__. ”D. C7 3' :3. fl --1 ' “ .: é; - (:73 ’/ >——] b-A-a fl ‘1 oil .9 111 110 5.8 5.9 5.10 5.11 5.12 5.13 5.14 5.15 5.16 5.17 6.1 6.2 6.3 6.4 6.5 7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 7.9 7.10 Simulations results for PRSG-unmodified using approximate mi. . . . Simulations results for PRSG-unmodified using actual mi. ...... Simulation results for PRSG-modified using approximate mi. . . . . . Simulation results for PRSG-modified using actual m.,-. ........ Two-step state diagram and equations. ................. Simulation results for PRSG-two—step. ................. Mode I and Mode II state diagrams and equations. .......... Simulation result for Mode I and Mode II. ............... PRSG-two-step and Mode I-Mode II Linearity comparison. ..... PRSG-two—step and Mode I-Mode II THD comparison. ........ Flow diagram of the assembler program. ................ PRSG-unmodified experimental results using actual m, ......... PRSG-unmodified experimental results using approximate mi. . . . . PRSG-modified experimental results using actual mi. ......... PRSG-modified experimental results using approximate m,- ....... Digital system main block ......................... Calculation and timing blocks ....................... Subsystem block diagram. ........................ Partial VHDL code for PRSG digital system ............... Test procedure for PRSG-PWM digital system. ............ Mixer simplification. ........................... Simulation results for PRSG-unmodified. ................ Simulation results PRSG-modified. ................... Mixer simplification for PRSG-two-step transformation ......... Simulation results for PRSG-two—step. ................. ix 86 89 89 90 92 Intrm Pulse Width .\ This IPI'hIllqll' distortiun. Hm taper-hr of fin of the llIM’ pl 1 hen the nun I'tiihage 1666. the 13216. The We the: 6613' l grarluallj‘: 0i Thi- fur If‘ffiren“. Silifiliiil ild‘ E 21.7; 5' r; r ‘9’“ Kiwi”), . 1.4.4,, Elflfanirl- g' " C? {(1 U‘ff-Y‘N , 44/9/43 (I, . 4 ’41,; [A] . on I CHAPTER 1 Introduction Pulse Width Modulation [PWM] has been used for decades in voltage source inverters. This technique produces a two-level output voltage with significantly low harmonic distortion. However, this technique does not permit utilizing the maximum voltage capacity of the DC bus. On the other hand, by applying a pure square wave to each of the three phases, we can obtain an output voltage fundamental of 1.27 times higher than the maximum obtainable with PWM. This 27% additional gain in the output voltage fundamental is obtained by allowing almost 30% of harmonic distortion at the load. The tradeoff between harmonic distortion and output voltage fundamental is not the only issue here. It is necessary to design an over-modulation technique that gradually converts the sinusoidal voltage reference to a square wave as the amplitude of the fundamental increases. That means the modulation technique should provide a reference signal for each desired modulation index between 1 and 1.27. This technique should have the following three characteristics. Linearity: The output voltage fundamental should have a linear relationship with the modulation index command. This is the most important characteristic, since linearity is a requirement of high performance control drives. Authors who proposed overmodulation techniques have sometimes focused on linearity at the expense of simplicity or 1 5: rrigiiir ; t which do 1101 hire the over- DC Bus K K 00"” v v V \ \ \ Figure 1.1. Voltage source inverter. simplicity or harmonic distortion. Simplicity: Many techniques are available to operate PWM in the linear range, which do not require complex hardware or software in their implementation. There- fore the over-modulation technique should retain this simplicity, since it only con- tributes an additional 27% extension to the linear range. Complex solution in hard- ware could mean additional cost. A complex solution in software could mean longer sampling period which will degrade the dynamics of the system. Low total harmonic distortion (THD) path: Once the first two characteristics have been achieved it is desirable to obtain the minimum harmonic distortion for each modulation index. The THD of a square wave is about 30%. However, it is known that by dividing the overmodulation range into three subranges, it is possible to obtain a minimum low THD path. In the first subrange (1 < m,- < 1.15) it is possible to obtain higher fundamental output without increasing the THD at the output, by injecting third harmonics or using space vector technique. In the second shimmy) mmllllml >li lQl (Illc II. THD (1.6 .. the? rvlvrmw hthvnr umhrml ll Still? of (hm: arv so ('mnplr) lellPP (llift‘ri into (llfl-Pl'i‘lll f methods 11sz methi‘ld Wllll'll sub-range (1.15 < m,- < 1.21) low harmonic distortion is obtained by converting the modified sinusoidal reference to a trapezoidal one. A maximum modulation index of 1.21 (the middle of the range where 1.15 < m, < 1.27) is obtained, with only 5% of THD (1/6 of the maximum 30%) at the load. In the third range (1.21 < m,- < 1.27) the reference signal is converted gradually into a square wave. In the next chapter, different methods proposed for the overmodulation range are analyzed. Most provide a technique to extend the linearity beyond the linear range. Some of them provide analytical solutions, using Fourier series expansion, but some are so complex that they need to be implemented using look-up tables. These methods produce different harmonic distortions. Those that divide the overmodulation range into different subranges produce better results. After analyzing the more important methods used so far, their disadvantages and limitations are discussed. Finally, a method which satisfies the three characteristics mentioned previously is proposed. Previ ln Pulse \l'hl‘ sisnal is mm; period of Ihv \ olthcse slam} The mirpm l0 illf.‘ mod ll.- ltili : n , .utrlamemal p 1dr. 15 the \ m: -‘ , «mum fin-1,; TL 1L ulh \AIlzf' ;\ CHAPTER 2 Previous Work In Pulse Width Modulation (triangular comparison method) a sinusoidal reference signal is compared with a triangular signal in order to determine the conduction period of the switching devices. The modulation index is the ratio of the amplitude of these signals. L; 9' ts ' 7712' : p(.zm.ozdal) (21) l/;J(triangular) The output voltage fundamental obtained for the two-level PW M is pr0portiona1 to the modulation index when it is in the range of 0-1 (linear range). The maximum fundamental peak voltage in the linear range is r L[dc L[dc vlmam : Tnimax— = - 2 2 (2.2) Vdc is the voltage of the DC bus and 77“me is the modulation index. However, when a square wave is applied to each one of the three phases (six-step mode) the maximum fundamental peak voltage is 2 VIC , 2VC VmaI = —/ i 8111 tdt = d . (2.3) 7r 2 This value is the maximum obtained for a two level voltage source inverter. W'hen .0 or Reference and Triangular Signals ('3 in o _1 .. 3 4 5 1.5 I x u 1 —¢ _o_5 l I m 1 1 O 1 2 4 5 3 Ang|e( radians) Figure 2.1. Pulse width modulation. Fmdamental . 0.4 ‘ L O 2 4 6 0.5 1 1 .5 Angle(rad|ans) Modulation Index Figure 2.2. Increasing reference signal beyond one. 2 this l'alllr' 1 .- ln lumlarw . lhurinr- forming lllr lsralln‘l Ill!" 1 Phil imn sir 2.1 C0 The mnfil Ml! the simrsnirl; prnl‘lnhs vi linearly \Vhl f‘lllhlltlll 1H Mex mrhn index m, r hl‘irdure r} ‘I l . 1‘1 this value is compared with the maximum obtained with PW M, the additional gain in fundamental output voltage becomes £21; 4 (gain) 2 1:; = E 21.27. (2.4) 2 Therefore, an additional 27% of fundamental voltage can be obtained by trans- forming the PWM into six-step mode. This modulation index range from 1 to 1.27 is called the overmodulation range, and the method used to smoothly transform the PW M into six-step mode is known as an overmodulation method. 2.1 Compensating Modulation Index The most obvious overmodulation method is to continue increasing the amplitude of the sinusoidal reference beyond the amplitude of the triangular peak. There are two problems with this method. First, the output voltage fundamental does not change linearly with respect to the amplitude of the sinusoidal reference signal. Second, an infinite amplitude sinusoidal reference is needed to reach the six-step mode. An equation to linearize the output voltage fundamental with respect to the modulation index command was proposed by Kerman et al. [9]. For a given desired modulation index m,, the equation provides a compensated modulation index mic,” which will produce the desired output voltage 1 1 , l + 1 — L/bus / 2 7f Tnicp "l'icp "hep (2.5) Even if a look-up table is used to implement this equation, a reference signal with a large amplitude is impractical to implement. 2.2 T I Another 3? this work. ' lUWPl the p. write (lt‘ll‘rll signal withtt' the third ll'dl that the nptit The t‘Qllilllt tll llllll lllls llntrltlstt'nrth ‘r: contributes tn ortpttt t'nltttgc- intirtrrrertt in t range. since it 2.3 Spa 1“ - .irrtithPr Pllqtr . l PlllS‘? lhltlf} ‘ l ,‘i l0} rv '- rdth phase 9 r 17‘ drum) W): k. 'd‘ In y» diigf‘ {if 2.2 Third Harmonic Injection Another approach to correct this non-linearity was proposed by Houldsworth [6]. In this work, third harmonics are added to the sinusoidal reference signal in order to lower the peak of the fundamental. This action makes both signal fit inside the square wave determined for the DC source. Third harmonic can be added to the reference signal without increasing the total harmonics distortion of the output voltage, since the third harmonic currents are eliminated in the three phases load. It was shown that the Optimal value of third harmonics is one 6th of the fundamental amplitude. The equation for the new reference signal is therefore l 12,, = V sin wt + 6V sin 3wt. (2.6) With this method, the linearity is extended from m,- = 1 to m,- = 1.155. Houldsworth also shows that only the third harmonic, not other triplen harmonics, contributes to increase the fundamental. This increment of 15% in the fundamental output voltage is obtained without increasing the harmonic distortion. However, this increment in the output voltage fundamental does not cover the entire modulation range, since it can not reach m1: = 1.27. 2.3 Space Vector Modulation Another PW M method with an important role in overmodulation is the Space Vector Pulse Width Modulation (SVPWM). This method determines the state of switches for each phase of a voltage source inverter, based on the module and the angle of the desired voltage. No carrier (triangular wave) is needed with this method. The. linear range of SVPWM is 15% greater than Sinusoidal Pulse Width Modulation. The switching states of the three phases are determined by selecting one of the eight 05‘ neuron“ 5.9:“! o l, —05 '--..rll‘ l l llt' _1.. K 0 pnssihle spare E. rrnrtttet-tntl t this: do not, pt \‘E‘tfi‘ttl'tlS. The - and the rest e These six C1181] a thin 10 Whlth set-r 3‘10 adjatgerrt The two r Ph‘ihg them } 55'1th zero r The result If Y“, J“. 8“)? l o The 9}). :ii'llllllllllttfltttttttttttt’ 2 4 1 1 .2 1 .4 Angle(radlans) Modulatlon Index Figure 2.3. Third harmonic injection. possible space vectors (0-7). Space Vectors 0:” 000” and 7:” 111” (0 means the phase is connected to the negative DC bus, and 1 means it is connected to the positive DC bus) do not produce any effective voltage on the three-phase load, and are called zero vectors. The other six vectors (1-6) have at least one of the three phases equal to 1 and the rest equal to 0. Those six vectors are located 60° apart, dividing the circle into six regions (I-VI). Given a desired vector voltage, V, (module and angle), the SVPWM algorithm finds to which sector (I—VI) it corresponds. Then the desired vector is projected into the two adjacent space vectors that define the region. The two resulting vectors, Va and Vb, are converted to time ta and tb, by multi— plying them by the switching period T. The remaining time to = T — ta — tb is used for the zero vectors 0 and 7. The resulting voltage is the vector summation of Va and Vb, which are 60° apart. However, the corresponding times ta and tb are added arithmetically and restricted -+_ + +- 010 110 ABC ABC 3 >\ //‘ 2 -++ ,/ £er + -- +++ - - - 01 1 \x / 100 1 11 000 ABC ‘ r ) ABC ABC ABC 4 \\ 1 7 O / \ + // \\ Zero Vectors -- / \ + -+ 001 \ / . 101 ABC p )1 ABC 5 6 Figure 2.4. Space vectors. Figure 2.5. Space vector projection. lti l)? lt‘SS HI lllttlliglt’. Ft. nhtaitttti is H thesethirifh Ihesettt eagle. nrttts ttith Straijlh1 in order tn l‘ mhhenfd; (“I 5‘ . ‘ UTIfbljtinq" C At ft hi ' . .mb ‘ 1* p31» :1 Lini- Vector Projection Times Definitions 2 z' ' ’7 . - . . Va 2 75-h, srn a, ta 2 %!:T T =sw1tch1ng perrod ,7 __ 2 ' ‘X 7 /7 la —— 73V; sm(§ — or) ta = TfT V, = Space-Vector. amp.:§ldc To = T — ta — tb (V,, a.) 2 reference voltage (122,00) 2 Command voltage (V,, or) = (Vma'c) Linear range Table 2.1. Space Vector Equations to be less or equal than T. Therefore, the maximum obtainable voltage varies with the angle. For example, in the border of the sector (0° or 60°), the maximum voltage obtained is equal to that of the space vectors (Vmax = 2Vdc / 3), while in the middle of the sector (30°), the maximum voltage is \/3 r ’fdc f _ / _ l/ rmax '— l s ‘— 2 7:3," The set of points, which are described by the maximum possible voltage for each (2.7) angle, forms a hexagon. This hexagon can be drawn by joining the six space vectors with straight lines. The trajectory of the resulting vector Vr should describe a circle, in order to have zero harmonics distortion. Therefore, the value of the radius in the middle of the chord is the maximum voltage obtained in the linear range. This value corresponds to a modulation index of "—QQVmax fiZVdC 2 m, = —,— = ——?—— = — = 1.155. 2.8) 1%; l/dc \/§ ( Surprisingly, this is the same value obtained with the injection of third harmon- ics [6]. However, when analyzed, the equivalent reference waveform generated by SVPWM contains more than third harmonics. The difference between this waveform and the pure sinusoidal looks like a triangular waveform with a frequency 3 times the fundamental. Therefore, all harmonics of this injected signal will be triplen harmon- 10 its of thtt fit the ntrtptrt ‘ Blasts "2“ _ a that S\'P\\ 1.. lti‘c‘ll tit-v'r' ..‘l ( {warm ‘ ....I_>r11.‘l lfil-jl r 1 ' mariner ‘ x Tf'" \ 4‘]. i h 31(ng Fr t t" " dig? r): r'l p .,,,.l 1601!] 3"” A KR at? Figure 2.6. Limit of the linear range in SVPWM. ics of the fundamental. As Houldsworth [6] shows, these harmonics do not appear at the output but neither do they contribute to the fundamental (except the third one). Blasko [2] and Chung [3] explain this increment of 15% in the linear range by showing that SVPWM inherently compensated the movement of the voltage of the three-phase load neutral that occurs because of non-sinusoidal values of the three phases. The overmodulation range of SVPWM is (1.15 g m,- _<_ 1.27). Holtz [5] prOposed two complementary techniques to obtain the remaining 12% of the fundamental: Mode 1, which modifies the module of the desired voltage to fit in the hexagon and covers the range of (1.15 < m,- g 1.21). Mode II, which modifies modulus and angle, in order to reach gradually the six-step mode and covers the range of (1.21 < m,- g 1.27). 11 2.3.1 .l lhtthth tin) pnit‘tts~ ; [)‘CtllilS are t . htflhflhfibn inrrrashrg '3 new anflles. ( thnhnhrvnu mrhhntnft Arhnre llidll [)3] l 13. lhltzi? 'X‘iv . l' h 0'. Of 4 3 4 ’3‘ i6 and f 2.3.1 Mode I The circle that corresponds to the desired voltage vector intersects the hexagon in two points in each sector as shown in Figure 2.7 . The angles that correspond to those points are called 01 and (1:2. The area, between 01 and Q2 that is outside the hexagon is compensated with an area between the hexagon and the circle. This is done by increasing the voltage reference. The new circle will intersect the hexagon at two new angles, a] and at. The common area, inside the hexagon and between the two circumferences, determines the compensating area. Using the equal area criterion, the limit of this modulation index can be calculated from the geometry: 1’? fit? = ”T" (2.9) 4 3 3 2 2 V. = [Hf—V. = [fig/12,, = — i. (2.10) 27r 2n 3 x/37r V. t/TirVdc 8 m,= , = ——,,.—— = —= 1.2125. (2.11) V —““~ 7r\/3 7710.37 2 A more precise value of m,- can be obtained with Fourier series, but the error is less than 0.35%. The relation between (1’1 and the modulation index is shown in Figure 2.8. Holtz [5] does not provide the equations that relate the desired modulation index with a’l or with the new reference vector amplitude, but provides the equations for ta, tb and to when the reference vector traces the hexagon. \/3cosa — sinoz ta : T 2.12 x/3cos a + sin a ( ) tb = T — ta (2.13) to = 0 (2.14) 12 123\ s \ 1,21 _ c 2 1 19.. ~M=~L°P~§ninhs§uk ll3~ 1 .22 1.21 1.2 Compensating Area Figure 2.7. Overmodulation Mode I. l l l l J 5 1 O 1 5 20 25 30 Reference Angle Figure 2.8. Modulation index vs. reference angle in Mode 1. 13 Sim‘t‘ ’3 simpllfi‘ll i I Other 1“? hpxagnll. Ti {am 31'], at with a pm I These wit that it is need modulation 1' lHlllPS of m, the fundamei h)‘ using the with the area m, and a: is T! 1‘ , Since the equation for ta is too difficult to implement, the author suggests a simplified version CY ta :T . 7r/3 (2.15) Other authors suggest another approach to bring the reference voltage within the hexagon. The times ta and tb are calculated for the new V, (using the equations in table 2.1), and the portion of V, outside the hexagon is brought back to the hexagon with a proportional equation: for ta+tb>T2 ta = ‘ (2.16) ta + tb t' t” t T f (2 17) . : or = — .a. . b ta + 15;, 0 Those equations do not require powerful hardware to implement. Therefore, all that it is needed to implement Mode I is an equation that relates the vref to the desired modulation index. There are three possible ways to do this. First, by obtaining the values of m, for each V,., and using them in a look-up table. This is done by finding the fundamental component of the new signal derived from each value of V}. Second, by using the equal area criterion, where the area outside the hexagon is compensated with the area inside of the hexagon. Third, by using Fourier series, a relation between m,- and a1 is found. This method was proposed by Lee [10]. The equation for m, is 2 1 9 9 \/§ , 3 m,- : :73 fig“. + fial)(11+('2—7;01 — 3 '— 927) 811101 + 5071 (2.18) v. = V“ . (2.19) \/§cos(f.)E — m) 14 Given. new refer)”. emhuhnn; CMlQVPSE not guarazt llltfllt’ l llli . inhhnnentt Ill? pmressii lDihPaHQh‘ in geneh il_l3 _<_ m, Thernustii MPHDUdUhl Six-Step mt} All adlllllm Given a modulation index 171,-, a) can be found using numerical methods. Then the new reference vector 1’}. is found from equation (2.19). The implementation of both equations is impractical, since they require a lot of computation. Equal area criterion can give simpler equations but perfect linearity between 771,- and the fundamental is not guaranteed. Bakhsay et al. [1] proposed another approach that works in the mode I modulation range. A classification algorithm (neural network) is used to implement the space vector modulation. Although the authors claim a reduction in the processing time of the algorithms, the equation that relates the modulation index to the angle 01 is still complex 1 1 1+ sin(7r/6 — at) m : 2 (7r/6 — at) ln 1 — sin(7r/6 — at). (220) In general, Mode I is a method to obtain the modulation index in the range of (1.15 g m,- g 1.21) by converting the modified sinusoidal reference in a trapezoid. The most important characteristic of this method is that it covers about half of the overmodulation range, while the method only produces 20% of the distortion of the six-step mode. 2.3.2 Mode II An additional 6% of the fundamental output (from 1.21 to 1.27) can be obtained using mode 11. In this method the angle and the modulus are modified. Given a modulation index between 1.21 and 1.27, a holding angle a), is selected. For commanded angles between 0° and oh, the reference angle remains equal to that of the space vector that corresponds to 0°. For commanded angles between (60° — oh) and 60°, the reference angle remains equal to the space vector that corresponds to 60°. The remaining angle range (ah, 60° — (1,.) will be expanded to cover the sector (0°,60°). Figure 2.9 shows how the reference angle is modified, given command angles with Reference Anglo (A o N O '—-"l_‘— r fl ‘-T values hen mhvence r meduhniui hnear.aivl In 199‘. a tune-titty) 70 I T l T f T 1 60'- so—A ~ 40.- ..... Reference Angle 10_ ------ :— '- —1 0 0 1 0 20 30 4O 50 60 70 Command Angle Figure 2.9. Mode 11. Reference angle vs. command angle (holding ang1e=12°). values between 0° and 60°. The holding angle for this case is 12°. In this range the reference magnitude will be determined by the hexagon. The relation between the modulation index and the holding angle is shown in figure 2.10. This relation is not linear, and was proposed first by Holtz [5] in a form of a graph. In 1998, Lee [10] presented the analytical expression for the modulation index as a function of the holding angle. This equation is _ sin(-gE — ah) 7r 6 a), This expression has the same drawbacks as the one used for the reference angle in mode I. The modulation index appears in the left side of the equation. This equation requires the use of numerical methods or the use of a look-up table, in order to express the holding angle as a function of the modulation index. In his classification 16 1281'" 127* i 126* 125‘ 124‘ f'fl;vv<1n"“’"'aI algtirithiii. B Dilllf: ltiillllll N' As in 4‘ 1.28 I I 1 .27 1 .26 1 .25 1 .24 Fundamental 1.22 1 .21 i i i O 5 10 1 5 20 25 30 holding Angle .- )— 1.2 Figure 2.10. Fundamental vs. holding angle in Mode 11. algorithm, Bakhshai [1] proposed another equation for modulation index as a function of the holding angle _4\/§ 7r 7r 71’ m n2 [20,, COS<fi — ah) + 28in(g — ah) + a), cos(g — ah) 7r —— sin(6 + (1,.) + 0,, sin or), + cos 0),]. (2.22) As in the previous method, Bakhshai uses a look up table to implement this equation. Overmodulation Mode I and mode 11 are used together in order to cover the entire overmodulation range in SVPWM (1.15-1.27). The reference signal generated by both methods and their harmonic distortion is plotted in figure 2.11. The reference signal in Mode I is transformed from modified-sinusoidal waveform to trapezoidal waveform. In Mode II, the signal is transformed from trapezoidal to 17 Ampln uda 0.4L \ .O r...) AlphaUadmns) Q N .0 .4 OR 1.16 1 Square “at-.4 H implemlzn 2"0’3 1: (fl llllje HUl l 2 .ersinns of additional r proposed a ‘ on Space \‘1 112111 point. 0‘ in x" 36‘ f0r ti 1 . “I“ U “590. [l Amplitude Angle(radians) 0.5 Y ‘ i ' ‘1 0'3 I. 025* 0.4’ ‘i ; . g 0.2»: -‘ ' ' $0.3 Q _ . :, Io.15)._.,... ( 202 '— i % ‘ 0.1» 01. . OMOS" 0 . . . . . A o A A k . A 1.16 1.18 1.2 1.22 1.24 1.26 1.28 1.16 1.18 1.2 1.22 1.24 1.26 1.28 Modulation Index Modulation Index Figure 2.11. Reference signal and THD for mode I-II. square waveform. The overmodulation method Mode I-Mode II shows the best THD of the methods prOposed so far. However, all the proposed versions of Mode I-Mode II implementation require a look-up table because of their complex equations. 2.3.3 Mode III Since Holtz proposed Mode I and mode II, many authors have proposed different versions of them. However, these two methods require two different coding, and additional code to determine which method should be used. Diaz and Strangas [4] proposed a method for the entire range of the overmodulation (1 < m,- _<_ 1.27) based on Space Vector Modulation. This method holds the reference angle at the intersec- tion point of the hexagon and the circumference (described for the desired modulation index) for the entire command angle, when the desired vector module is outside the hexagon. This method has significant advantages over previous methods. One ad- 18 vantag" l‘ allrantafl" index is m. a powerful The {1060897 The me! one alguritl illt‘ prol'l‘w shown in fit. a llle‘f‘rilll ' function i a: 2.4 A Rama and Illii'llllailtll it increases that Of illli I . 1‘ thI 8197;. Set" l MIG Wm (”iii 31 the a ”,5, . 1m. .4“ rll in) l LI“ ()\"‘,!-I' (.f 1' W 1' C" in vantage is easy implementation since only the command angle is modified. Another advantage is that the equation of the variable to be changed with the overmodulation index is expressed explicitly. Therefore, this method can be implemented online, if a powerful processor is available, or an easy look-up table can be generated without the necessity of interactive methods. The equation for as is fink as = arcsin( ) — (2.23) 7r 6' The method can be applied to the entire overmodulation range. Therefore, only one algorithm has to be implemented, saving memory code and execution time in the processor. The reference signal, angle 01, and THD distortion for method III is shown in figure 2.12. Despite all the advantages discussed above, a lookup table or a powerful processor has still to be used, since the equation requires a trigonometric function (arcsin). 2.4 Adding a Square Wave to the Reference Kaura and Blasko [8] proposed another method to extent the linearity to the over- modulation range. A square wave is added to the original sinusoidal waveform. When it increases beyond the DC bus voltage, the new reference signal is made equal to that of the DC bus. For a sinusoidal reference command with amplitude less than 1, the signal is not altered. For values of modulation index between 1 and 1.27, a square wave of amplitude S is added at the bottom of the reference‘and the total is cut at the top, making it look like a trapezoidal. The value of S will be equal to 0 for a reference signal less than 1 and will be equal to 1 for a reference signal command equal to 1.27, when the new reference signal will be a square wave. The value of S in the overmodulation range is found using Fourier analysis. The equation that relates S with mi(V) is 19 Arnpm ude O .o (.0 b F—‘V'vvy // Alphafladians) .0 . yo and an ”pr! ti . JP allihrjrg Amplitude 3 Angle(radians) 05 ' W . 0-3' ' ' r 0.4 g 0.2» :60‘3 ............ Q . S 1015,.'. 76 i— ' . . . 0.2 i ' : ‘ ' : 0.1 ------- 0.05»; ...... : ..... ' ..... ...... , 0 L L L L L L o L L L L L L 1.16 1.18 1.2 1.22 1.24 1.26 1.28 1.16 1.18 1.2 1.22 1.24 1.26 1.28 Modulation Index Modulation Index Figure 2.12. Reference signal and THD for Mode III. 2 ; QM) (ewe) )._(_1_,—,_s_) V=33+V 7T V is the output voltage fundamental. In this equation, S can not be easily isolated and an iterative method has to be used. In order to implement this method online, the authors proposed an approximation .SzKfimr—D? 923 K 3 is a constant; its optimal value, over the entire range is 5.5. Equation 2.25 is easier to implement in a DSP than the previous equation. However, the error of S at the limit of the range (1.27) using this equation is about 40%. Fortunately, the error in the fundamental is less than that. The reference signal and the value of S versus modulation index are shown in the 20 0 U1 _A 1* 1. LR . Ampl It ude <5 . m o r—fifij- I .4 O ‘l 9 co .0 a: Squa re amplitude S .0 ‘8 O .n .n O) L.‘ (le figure '0 .13. the graph. I approximate desired one l change the fa L nefare. imp] (. l. Amplitude . 1 . . . . _ . . .1 . . _ . , . .1, . O 1 2 3 Angle(radians) 1 0.3 . a) . . a ‘ D L. ' L : l S 1015., . . I- : . . . 90-4 ‘ I ' " : ' i : : g _ ' aprox. 3 . _ A A A A A L o A A A A A A 1.16 1.18 1.2 1.22 1.24 1.26 1.28 1.16 1.18 1.2 1.22 1.24 1.26 1.28 Modulation Index Modulation Index Figure 2.13. Square wave addition method. figure 2.13. The amount of square wave added is plotted in the left bottom side of the graph. The relation between S and the modulation index is nonlinear. When the approximate equation is used (dotted line), the square wave added differs from the desired one by about 40% at the end of the range (1.27). The authors suggested to change the factor K 3 in order to correct that difference. As other methods discussed before, implementation of this method requires selection between the use of look-up tables or an approximate curve (sacrificing linearity). 2.5 Reshaping the Modulation Command. In this method, proposed by Kaura [7], the reference signal is switched from sinusoidal to square wave for a range of angles determined by the modulation index. Given a modulation index in the range of (1-1.27), an angle a, is calculated by using Fourier 21 Arnpmud" O '_ _ I \ 0.4 c) w Alpmtrfld'a'“) O N andyns.ant Inerefin nifgnntfl l” -' ”SfUIE. ll. fl: if) lllf.‘ mgr) the ‘ l ‘ lmlllffihi The} inr “h u dud SII'|[I’ “1 A>Ulf range, Th; I.‘ I r i l I , m,=1-15 -> , ......... _. a) . 1: . .3 : (”[f —o.5 — Mf- — ‘1 h I ' r 1 4 1 0 1 2 4 5 6 Angle(radians) 0.5 0'3 f , 7 _ 0.4 U) . g 0.2 'o 0.3 D g I 0.15 - 2 o 2 L— 3 Q . 0.1 005. o L L 4 L L L 0 L L L L L L 1.16 1.18 1.2 1.22 1.24 1.26 1.28 1.16 1.18 1.2 1.22 1.24 1.26 1.28 Modulation Index Modulation Index Figure 2.14. Reshaping the modulation command method. analysis, and the equation is 4 12’ . m,- = — cos(as) + 1[2as — sm(2as)]. (2.26) 7r 7r The reference signal, as, and the THD, for different modulation indexes, are shown in Figure 2.14. This method suffers the same problem than the others discussed before: it does not offer an equation where as was expressed explicitly with respect to the modulation index. Therefore iterative methods and lookup tables are used in the implementation of this method. The previous method and this method suggest the idea of interchanging square and sinusoidal waves in order to obtain the reference signal in the overmodulation range. This idea was used in the technique proposed in this work. 22 Prop After anal} any ut'ernrr signal into theory. win are shown the rnaxirnt problem of this way of 3.1 D The DIOPUS 3191191211 trig P. 1 “Hill? of 30: CHAPTER 3 Proposed Method After analyzing all the methods in the previous section, it can be concluded that any overmodulation method consists of gradually converting a sinusoidal reference signal into a square signal. Even methods originally described as using space vector theory, when they are analyzed as using an equivalent triangular-comparison method, are shown to do the same. This way of reducing a complex problem, obtaining the maximum output voltage from a three-phase inverter, to a simple mathematical problem of waveform transformation, has not been discussed directly so far. However, this way of isolating the problem suggests new method of doing overmodulation. 3.1 Description of the Proposed Method The proposed method, Proportional Reference Signal Generator (PRSG), consists of generating reference signals by linearly interpolating between the unitary sinusoidal and square waveform values. For example, for a modulation index of 1.13 and an angle of 30°, the value of the proposed reference signal will be (Square(9) — sin(l9)) misq — misin vref(mi16) : (mi _ msin) + 8111(6) (31) 23 Amplitude 04» cal llf‘fengl that corms, fl Eh“ liltea {bf-Sifligl‘ ( l , . '4' Fm .» 1.. emit}: 1'2 j I I I I r ml=1.27 (square) mi: 1.1 3 (Proposed) 0.8 n 0.6-'~ Amplitude ' mi: 1 (sinusoidal) 0.2 )— ... . . )— -O.2 l 1 I 0 0.5 1 1 .5 2 2.5 3 Angle(radians) Figure 3.1. Representation of proposed method. 1—. vrsf(1.13,30°) = [WE—[(1.13 — 1) + .5 = 0.74, (3.2) where use, is the proposed reference signal and miss is the maximum modulation index that corresponds to the square wave (1.27). miss" is the maximum modulation index in the linear range that corresponds to the unitary sinusoidal (m, = 1). The value of 3171(6) corresponds to the instantaneous value of one of the three phase reference signals: DA 2 m,- sin(0) (3.3) v3 = m,- sin(0 — 120°) (3.4) v0 = m,- sin(0 + 120°). (3.5) 24 Sillt'P nul 111 pi" [mill lllt‘ if Tlit‘rt‘lt 'I tannins valt' Square fl , . rant-nun nnl as (ll Since the input signals are normally given in rectangular coordinates (vs, us) and not in polar (rm-,6), these three instantaneous voltage values are obtained directly from the input signals with a 2—to—3 transformation: 11A 2 Ltd (3.6) —1 3 123 = —2—vd + —\g—_vq (3.7) _1 \/§ DC 2 771d — 77%. (3.8) Therefore, the value of the unitary sinusoidal can be calculated from the instan- taneous values of the three phases vw=amm=ls em Square(6) is the value of the unitary square at the desire angle 6. This square function only has two values, 1 and -1, and can be synthesized using the sign function as Square(()) 2 sign(7r — 0) (3.10) 01' Square(9) : sign(sin(())) = sig'n.(vs,,). (3.11) Since vsu is available, the second equation is used. Substituting all those terms in equation (3.1) yields (sign ( van) — van.) .27 (m.- — 1) + ass. (3.12) Uref(vda vq) : The same equation is obtained for the other three phases by substituting um, by l‘bu- l'w‘ ‘ I Hume" Plllhedtied lalllt‘S It) lit to obtain it] 3.2 A This li‘l'llll phase sinn: These twl ,. ii and 85 Will lily. S‘lefrfqi 1:) (J vb,“ vs”. The modulation index, 771., can be calculated from Ltd, 1),, as m, = (M5 + v3. (3.13) However, the square root is not a direct instruction in micrOprocessors used in embedded systems, requiring a Taylor expansion routine or the use of a look-up tables to be implemented. In order to retain the simplicity used so far, an equation to obtain an approximated value of m,— is proposed. 3.2 Approximation of the Modulation Index This technique takes advantage of the fact that two reference signals of the three phase sinusoidal reference signal can be approximated by a straight line every 30°. These two phases are v1 = min(abs(v,4, v3, 110)) (3.14) and v2 = mid(abs(vA, v3, 110)). (3.15) '01 and 112, are available (calculated for other purposes) in some PWM techniques, as will be shown later. In order to set the linear equation, the region (0° — 30") is selected. In this region v1 = 11A 2 mssin(6) (3.16) and v2 = no 2 m,- sin(6 + 120°). (3.17) In order to find the linear approximation of each sinusoidal segment, their values 26 at the lllll l'sing tln beanie and Stilt-mg. f an anthem. at the limits of the range are selected as v1(0°) = 0 (3.18) 171(30°) = é—m, (3.19) user) = @m, (3.20) 32(30°) = $771,. (3.21) Using the slope and intersection to approximate these lines, the two equations become 3 ’01 Z -—m,-0 (3.22) 7r and 3 1 — 3 ' 7r Solving for 6 in equation (3.22) and substituting it in equation (3.23), a value for an approximate modulation index is found: m. : 2((fl3)-1)v +— 2 W3) 1 \/3 m,- = 161111 + [62122 = 0.85111 -l— 1.15212 (3.25) ’02 (3.24) This equation coincides with the actual modulation index every 30°, (0°,30°,60°...). However, in the middle of each region (15°,45°,75° ..... ) it shows an error of 3.4%. Since the approximate value of m,- is always greater than the actual value, it is possible to reduce this error by half (1.7%) by redistributing it below and above the real value. This can be done by changing the values of k1 and kg to produce 27 ll‘llll lll‘ 1: Primal m 1 l. Three Phases Reference Signal vayb and v0 l l y— I— II- 0 1 2 3 4 5 6 Angle(radians) Absolute values of va,vb and vc v1,v2,mi=k1v1+k2v2 1.2 i . a 1.2 . . mi 1 1 VVWVVN : 5 \ \ ’ / 0.8 » ~ ~ :~ 3 4 O.8*\ ,’\ /\ ,. . : : \ V2 , / \ / . i \ / \ / \ / 06. . . . 06’ \ / \ / \ / , I . ‘1 ‘.« v 0.41 ~ ~ :' - -- » - 4» - i- < o.4~ v1 f ‘ 092 ...... .. . . , .l 02 .' 0 . A . 0 ' ." A . O 1 2 3 O 1 2 3 Angle(radians) Angle(radians) Figure 3.2. Waveforms for calculation of the modulation index . mi 2 0.83m + 1.13122. (3.26) With these values of k1 and leg, the average of the approximated modulation index iS equal to the actual modulation index. Figure 3.2 shows the three phases and the Signals associated with the modulation index calculations. 28 3.3 1 Nwrmm - l l.)lut_‘l{ ('llil‘. the first ll: nuun absul addfiiunall 112,. This 11 ulllplll equu lfifidflldlhlh udng the Qt usal for [Wu (“omen 214 u index: The mm “71"? that \\ mmlulatiun §l§r.~‘ “gildl. 3.3 PRSG Using Unmodified Reference The complete procedure to generate the proposed reference signal is shown in the block diagram in figure 3.3. The equations for the 2-to-3 transformation are inside the first block, which converts ed and 11,, into ca, vb and vc. The minimum and maxi- mum absolute values of the three phases are found using logic comparisons, requiring additional blocks. The modulation calculation block uses 1.1mm, ”Umid, 22mm to produce m). This modulation index command is passed through a limiter. That keeps its output equal to 1 for m,- > 1. This limiter output is subtracted from the original modulation index in order to produce an output of 0 for m,- < 1. This logic allows using the generator in the linear range as well. The output of the addition block is used for two purposes. First, it is added to the value of 1 to form a divisor, which will convert vA into my. Second, it is divided by 0.27 to create the normalized modulation index: 0 for (O < m, g 1) 771m 2 m-—1 . ——1—0..27 for(1 < m, S 1.27). The normalized modulation index determines the amount of square or sinusoidal wave that will be present at the output. Finally, the wave mixer uses the normalized modulation index and the unitary sinusoidal value to produce the proposed reference signal. 3.4 PRSG Using Modified Reference The proportional signal generator is able to convert a sinusoidal reference signal into a square wave. However, some PWM techniques (mentioned in the previous section) produce a modified sinusoidal reference (SVPWM). This modified sinusoidal reference allows extending the linear range (no distortion at the load) to 1.15. This modified 29 limiter l + f _ l 3.66 mi Normalize klvl+k2v2 mi Square T f / Sinusoidal Minimum Middle 1207.6 t0 >6 v 3 Vb ° abs(a,b,c) v6 5 Figure 3.3. Proportional Reference Signal Generator (unmodified reference case). 30 sinusui values wit l1 I l l (:1; m. l i ll] for nu is use. [190115 the it. sinusoidal is obtained by adding an offset to each of the instantaneous command values of the three phases. This offset is equal to half the voltage value of the phase with the minimum absolute value. The modified sinusoidal references (ll/Mm, Vim," and chm) are defined as Vaum = w... + %- (3.27) Wm... = V... + 321- (3.28) IQ... = V... + g (3.29) In the process of finding v1, 222 is also obtained. Therefore the proposed technique for modulation index approximation does not introduce extra calculations when it is used in conjunction with the modified sinusoidal reference signal. The instanta- neous unitary modified sinusoidal reference signals replace the sinusoidal signal, in the formula of the proposed reference signal, equation 3.12 to produce (Sign(vaum) — Vaum) .- — . . 0 0.12 (ml 1)+Vaum (33 ) Uref(vda vq) : Figure 3.4 shows the proportional signal generator for the modified sinusoidal case. The reference signals for the three phases are generated from inputs vd and vq. It will be shown in next chapter by, mathematical analysis, that the proportional reference signal generator possesses a perfect linearity. This means that the fun- damental component of the new reference signal is equal to the modulation index. The T HD of the proposed method varies also linearly with respect to the modu- lation index. In the unmodified reference case, THD increases as the modulation index increases beyond 1. In the modified sinusoidal case the distortion starts at the modulation index of 1.15, which means lower THD path. If sinusoidal pulse width modulation is used in the linear range, the first version (PRSG-Sinusoidal) is better 31 ure 3.. Fig limiter /l_.15 :|\ . 3.33m mi 2 Normalized klvl+k2v2 1 mi Tvz vl '." Minimum Middle abs(a.b,c) ,1 l Va V L, 2 t0 vq 3 Vb —> Vb Figure 3.4. Proportional Reference Signal Generator (modified reference case). 32 Fit:I than Ih“ 4“" is usrd. the" sinusoidal C 3.5 T The linear. tun-step U erence in? U waveform. are needed trapezoida function. ' and two a. Limiter . . Limiter /u + 0.06 i O - O/— ’"i T - Trapezoidal —> 2 to 3 Figure 3.5. Proportional Reference Signal Generator (two-step case). than the second one. When modified sinusoidal Pulse Width Modulation (SVPWM) is used, the second version is preferable, since the THD distortion is lower than the sinusoidal case, and v1 and v2 are already calculated. 3.5 Two-Step Transformation The linear behavior of the total harmonic distortion can be improved even further if a two-step transformation is used. That means converting the modified sinusoidal ref- erence into a trapezoidal waveform and then converting the trapezoidal into a square waveform. A one-phase version of this method is shown in figure 3.5. Two mixers are needed in this approach. The first mixes the unitary modified sinusoidal with a trapezoidal wave. The trapezoidal wave can be synthesized using the absolute value function. The second mixes the unitary trapezoidal with a square wave. Two limiters and two adders constitute the logic to decide between the two transformations. 33 Tom] Ha rvnnnlca Distortion 0.3 r 0.1? 005 ~ 0.25 - 0.2 spwm 3 Total Harmonics Distortion O a: l o.1—--~-- o.os»—~A i i i l 111 0.9 0.95 1 1.05 1.1 1.15 1.2 1.25 Modulation Index Figure 3.6. Total harmonic distortion for the three proposed versions of PRSG. In the first step, the modulation index changes from 1.15 to 1.21 since the funda- mental of the trapezoidal is 1.21. In the second step the modulation index changes from 1.21 to 1.27. It will be shown later that this two.step transformation reduces the harmonic content, while preserving the linearity of modulation index vs. fundamen- tal. The THD also varies linearly within each one of the sub-ranges. However, since the harmonic distortion of the trapezoidal wave is only 5%, these two straight lines describe a better THD path than a single line that covers the entire range (1.15-1.27). The total harmonic distortion of the three proposed versions are shown in Fig— ure 3.6. In the simulation chapter, the steps followed to develop this scheme are 34 discussed. 35 Mat ln lllls (:lm; in is (mm for the mud :sinuslilidal- lal Changes. Constants 1’; 41 Li 4.1.1 L “hen the sinusmdal l: lill-Tl] a Squa ti, at 1 ud‘ OF‘l PH“ CHAPTER 4 Mathematical Analysis In this chapter, the proposed method is mathematically investigated. First, linear— ity is tested for the sinusoidal case. Second, the same linearity test is performed for the modified sinusoidal case. Third, linearity is examined for general case mixer (sinusoidal-trapezoid and trapezoid-square), which shows that not only the fundamen— tal changes linearly but also the harmonic distortion. Finally, an optimization of the constants k1 and k2, which are used for modulation index calculation, is performed. 4.1 Linearity of the PRSG method 4.1.1 Linearity of the PRSG-Unmodified When the proposed method (PRSG), is used to extend the linearity from the sinusoidal PWM to six-step mode, the unitary sinusoidal reference signal is mixed with a square wave at a ratio determined by the modulation index. The equation that determines the new reference signal is (signWw) — V411) .27 vref(m,-) 2 (mt —' 1) + VAU: (4-1) 36 where l modular; - b1“ llS (‘th Slurp r. m 111,. Tlu ("clnlpjnimn Since l' rearranged 51913513,.) 1 lOT 7 < HUWPVPL 5 the same 5:; “fihprp 1. ‘ .u' where VAU is the unitary sinusoidal reference signal, sin 19, and m, is the reference modulation index. In order to obtain an exact solution, the value of .27 is substituted by its exact value (4/7r — 1) 7r(m,- — 1) 4 _ 7r (sign(VAU) — VAU) +15”). (4.2) “ref (7712') : Since the reference signal is normalized, the desired output fundamental is equal to m,. Therefore, a linearity proof for this method consists of showing that the first component of the Fourier series of uref is equal to the modulation index command 271' F1: —/ v.6, sin6d9 = 771,-. (4.3) 0 Since VAU is a continuous function of 6 while mi and sign(sinfi) are not, ure; is rearranged as 4 — 7rm, , 7r(m — z‘ 1 . Uref =2 Urefo + Urefk Z TFl/AU + 73—)‘SZQH(VA(1). (4.4) sign(VAU) is a discontinuous function, the values of which are 1 for 0 < 6 3 7r and -1 for 7r < 0 g 27r. This suggests to divide the integral in these two sub-ranges. However, since sign(sinO) and sinH have half cycle symmetry functions, "uref possess the same symmetry as well, therefore only the first sub-range needs to be integrated. 2n 2 1r F1 2 — f 21..., sin9d6 = — / irrefsinfi d6. (4.5) 0 7T 0 In this range sign(sin 6) always has a value of 1, which means emf), becomes a constant that depends on m,. Solving the integral: (fl—”milE/Wsin2gd9+m—_llg/Wsin0d9, (4.6) 0 0 F1: (4—7r) 7r (4—7r) 7r where VAU is substituted by sin 6. Solving both integrals we obtain: 37 which is 1'. the reft‘rt’lt PRSG (sin 4.1.2 I In order to for the rum ofa sinus” phase \\ 1th A 171,81th 1 the offset i FIJI I ll (1 titre. the In _ (4 — Trmi) 7r(m,- — 1) 4 F1 — (4 — 7r) + (4 — 7r) 7r (47) F1 : (4 — mm + 4m, — 4) 2 mi. (4.8) 4—7r which is exactly what was stated in equation (4.3). The fundamental amplitude of the reference signal is equal to the modulation index command, which shows that PRSG (sinusoidal case) posses a perfect linearity. 4.1.2 Linearity of the PRSG-Modified In order to test linearity for the PRSG (SVM case), it is necessary to find an expression for the modified sinusoidal reference signal. This signal can be considered as the sum of a sinusoidal signal and an offset. This offset corresponds to the half value of the phase with the lowest absolute value. In the first 30° this phase corresponds to phase A (m,- sin6). Using phase A as reference for the modified sinusoidal, the equation for the offset in the first 30°(i.e. 7r / 6) is obtained: . 1 . 3 . VAM = m, sm0 + gm,- 51nd : m6 sm0 (4.9) For the next 60° the offset corresponds to phase B (i.e. m,- sin(6 — 27r / 3)) There- fore, the modified sinusoidal equation is: 3 VAM = m, sin0 + gm, sin(6 + 27r/3) = "If-é: sin(6 + 7r/6). (4.10) Because of the one fourth cycle symmetry of this reference signal, it is not neces- sary to continue synthesizing it beyond 90°. For the unitary version of the modified sinusoidal signal m,- = 2 / \/3, the equations for this signal become: 38 Shim: (he exptt“ This P< parts. fit is PXtentlt Second. 51 104,57. ' function i and fi .4 lit.- ‘— , \/38in6 for0£0<§ l’AUM = - sin(6 + 7r/6) for g g 9 <% Substituting VAUM in equation (4.4) and then substituting emf in equation (4.5) the expression for the fundamental is derived: \/3(4—7rm-) 4 7r/6 7r/‘2 7r F: ‘— 3/ '29d6/ '6—‘0d6 1 (4\/§_27r) 7r(\/— 0 sm + ”/6 sm( +6)sm > 7r(\/3m,-—2) 4/4/2 , + — 6d6 4.11 (4\/3—27r) 7r 0 5m ( ) This equation, compared to the one of the sinusoidal case (4.6), differs in three parts. First, the constant expression outside the integral changes, since m,- in SVM is extended from 1 to 2/\/3 and the factor 4/ (4 — 7r) becomes \/37r/(4\/3 — 2n). Second, since only one fourth of the cycle is integrated, the constant 2 / 7r is changed to 4/7r. Third, the integral of VAUM, is divided in two parts, since this modified function is discontinues as was defined above. These three integrals become: 1r/6 2 — \/3/ sin26d6 2 19.1.3 (4.12) 0 24 1r/2 7r 2\/37r+9 ' 0 - ° 0d = —— 4.13 /fl/6 sm( -+— 6)s1n 6 24 ( ) 7r/2 / sin6d6 = 1, (4.14) 0 and finally 39 \/3(4 — 7r 771,-) 4 2x/37r — 9 2\/3n + 9 7r(\/3m,- —— 2) 4 .— F1 (4/3 — 27r) 7r < 24 + 24 > + (4/3 -— 27f) ; (410) F1 2 2(4 — 7rm,) + 4(\/3m, — 2) : mi. (4.16) (4J3 — 27r) (Ln/3 — 271) This proves that the fundamental amplitude of the new reference signal generated with the PRSG has a linear behavior with respect to the modulation index command for the space-vector case as well. It is possible to continue the Fourier analysis for other mixer cases (sinusoidal-trapezoid and trapezoid-square). However, the results of the two previous cases suggest that there should exist a general case proof that. justifies the linear behavior of the PRSG method, based on the orthogonality of the Fourier components. 4.1.3 Linearity of the PRSG-General Case In order to prove that the PRSG has a linear behavior for all cases, including harmonic distortion, a general case test is performed for the PRSG. The heart of the PRSG is the output mixer which takes as inputs two different waveform signals. In some cases, the second signal is generated based in the first one. It also takes as inputs the normalized modulation index, which determines the amount of each input reference signal that will be at the output, and has values between 0 and 1. The general equation for the PRSG mixer is (1’2 — '01) ~ Uref(m,-) = (m,- — mum) + '01. (4.11) ("limar _ m’ilim) This linear mixer transforms the output from 221 for m,- = min", to 112 for m,- 2 mm”, where mm,” and mum, correspond to the normalized fundamental amplitudes of U2 and 01 respectively. Defining the normalized modulation index as 40 ('mi — Tnilim) k = mmorm = (4.18) 3 mimaz: — Ilnilim the equation for the mixer can be expressed in a linear way rout = kvl + (1 — k)’U2. (4.19) 211 and 1:2 are odd functions and their Fourier series are 00 oo 01 = Z (11,, sin(n0) 122 = Z agn sin(n6). (4.20) n:1,3,5,.. n:1,3,5.. Substituting these expressions in the previous equation: ”no,“ 2 k 2 (11,, sin(m9) + (1 — k) E (1.2,, sin(nf)) n=1,3,5,.. n=1,3,5.. trout = Z: (italn + (1 — Mag") sin(n6’). (4.21) n:1.3,5... Therefore, Vout appears here as another Fourier serie, in which each component, n, is a linear function of the corresponding n components of V1 and V2. It can be concluded that, because of the linearity of the mixer and the orthogonality of the Fourier components, each harmonic is mixed separately. Therefore, the output fundamental only depends on the fundamental of both input signals and the variable k. If each input is substituted by its fundamental (v1 = mum, vg 2 mm”, and no,“ 2 F1) in the mixer equation (4.17), the linearity proof is trivial: (m'imax — nzilim) (m, (7nima1: _ Tnilim F1 2 ‘ mitt-m) + 771mm = 7ni (422) 41 4.2 Harmonic Distortion of the PRSG Method From the previous analysis and the preliminary Matlab simulations, it appears that the harmonic distortion changes linearly as the modulation index is changed in the overmodulation ranges. However, the following analysis will show that this is not true. The linear behavior of THD in PRSG is due to some special conditions and not to the separate mixing of its components. The THD is defined as the Euclidean norm of all the components excluding the fundamental. Al the components are divided also by the fundamental. However it can be omitted here without affecting the linearity test. The THD of the two inputs and the output of the PRSG mixer are defined as: THD(’Ul) = \ 2 (13,1 (4.23) n=5,711,13 THD(U-2) = \ 2 6,2,, (4.24) n:5,7,11,l3 THD(U(mt) \ Z ((1 — [00711 + kan2)2 (4.25) n=5,7,11,13 The THD of the resulting you is equal to the THD of v1 (THDI) for k=0 and is equal to the THD of U2 (TH D2) for k=1. However, linear behavior also requires that the THD of em varies linearly between TH D1 and TH D2 as k changes from 0 to 1. The equation for linear THD should be: THD(vm,,) = (1—k)THD1+kTHD2 (4.26) THD(V0ut) = [(l—k) Z a?” nZSJv” l 2 + 2k(1—k)\J Z aid 5: 632+k Z 63,, . (4.27) :53”. 25]”. nZSJu. Doing the same manipulation over the actual THD equation (4.25), it is obtained: THD(’L 0,.) = \ Z (1—14)2 3,,+2tc(1—k)a,,,a,,2+k‘za3,2 (4.28) n:5,7.. THD(-vo,,,) = \( (1—4) )2: a3,+2k(1—k)§: anlan2+k2 Z 63,, (429) n: 57 ”:5 n:)7 The equations for the linear THD (4.27) differs from that of the actual THD (4.29) in the middle terms of the expression inside of the square root, which shows that the THD is not linear. Fortunately, it is possible to show that the actual THD is upper bounded by the linear THD. Z antan2< Z an] E an2_ \J E: a 3.1\J 2 03.2 (4-30) 71 n=5,7.. n:5,7.. n: 5,..7 11:5,..7 25,..7 It is important to remember here that the optimal THD is not the one that behaves linearly, but the one that has the lowest possible value for each modulation index command. Although it is possible to find vectors for which the two equation analyzed above differ, this will not be the case when the PRSG mixer is used. The reason why THD results (obtained with PRSG) appears so linear is because one of the two input waveforms does not contain harmonics and the THD equation is reduced to 11:5, 7.. THD(V,,,,,) :\lk [.2 2 (121,2 :kTHD2 (4.31) The modified sinusoidal waveform contains triplem harmonics, but these harmon- ics are not considered in this calculation, since as mentioned before, they do not affect the output. The only transformation in which there are some harmonics in the input signal is in the trapezoid-square wave. Even in this case, the difference between the T HD curves is negligible. Although the linear behavior of the PRSG THD is not 43 optimal, it helps to predict the THD, which also helps to design the optimal two-step transformation, as it is shown in the next chapter. 4.3 Optimization of Constants for Modulation In- dex Calculation In the previous chapter, a new way to calculate the modulation index from the vd and vq input signals was described. This method uses the information of the instantaneous values of en, vb and 220, to calculate the modulation index, using a linear equation that involves only the constant values k1 and k2. Since there are two constants, and in order to obtain the modulation index equal to the desired one, we established one constraint, a degree of freedom is obtained. This situation can be exploited to minimize the average square error obtained with this method. In order to obtain the first relation between [Cl and k2, we add an equation, so that the average error between actual m,- and calculated m,- is made zero: 7r/6 ’ / (m, — m, — made = 0 (4.32) 0 7r/6 . f (1 — k1 sin0 — k2 sin (6 —- 23%)) d6 = o. (4.33) O In this equation, the integration range covers the first 30", since the calculated modulation index curve is repeated every 30". In this range, 1), corresponds to phase A (sinfl) and v2 corresponds to phase C (sin(6 — 27r / 3)) To simplify the integration, the modulation index m,- is made equal to 1. Evaluating (4.33): 2,”. 7r/6 6 + k1 cos6’ + k2 cos(f) — —§-)] 2 0 (4.34) 0 - 1 3 / k1 (2 273) + k2 ( 43$) = i;— (4.35) 44 k,(2 — \/3) + k2(1+ \/'3‘) = (4.36) 0°|>l In order to get a second equation that relates k1 and k2, the integral of the square error over the same angle range (0" — 30") is minimized. . . ”/6 . 27r 2 m1n(e,,s) = min (/ (1 — k1 81n6 + k2 sin (6 + —3—)) d6.) (4.37) 0 The expression inside the integral becomes: w/6 2, ea, = / (1+ 1.351112 9 + 13351112 (0 + g) — 2131mm) — 2k,2 sin (a + 3371) 0 +2k1k2 sin 03in (0 + 27%)) (16’. (4.38) Calculating each part of this integral and substituting in equation (4.37) 3 3 — L—WkleMBQ) £132.13.((3-2)...(1_vg)1.)+ 1, e __7r+ “—6 24 1 12 The expression in parentheses is equal to that in the first equation (4.36), and can be substituted by —7r / 3. The last equation becomes 7r 27r—3x/3 . 7r 3J3—7r ———k‘2 — 2 —— ., 4.40 + 24 1+12142+ 12 Isl/<2 ( ) Using equation 4.36and expression for kg in terms of k1 and use it in the 4.40 equa- tion to obtain an expression in terms of k1. To simplify we introduce constants M, N, Q, R, S: / A] 2 k; + Qk1k2 (4-41) 80,5 2 —17l/[+ Nkf + k2 = R—Sk1, (4.42) 45 where these variables correspond to _27r—3\/3Q_3\/3—7r _ 24 " 12 R=_ZT_S=_2__£. 3(73—1) 73—1 M = 3 .v 6 Substituting equation (4.42) in equation (4.41), — ll V’kz M R2 MRS}: MSI‘ZIC2 k R "2 €03——.’ +1 1+3” _.’ . 1+—2_ 1+Q1 —QSA1. This equation, in terms of k1, can be rewritten as ea, 2 (1k? + bk] + c where a, b, e are M M 0=(N+?S2—'QS) b:(Q—A[S)R CZ—AI-l-3R2 In order to minimize the error, its derivative is made equal to 0: and finally the values of Is, and k2 are found: k = — = 1.1282 1 2a k2 = R — Skl : .8245 (4.43) (4.44) (4.45) (4.46) (4.47) (4.48) (4.49) (4.50) Those values are very similar to the ones proposed in the description chapter (1.13 and 0.83) and were found in a very different way. Those original values were found using Matlab simulations, where In and kg were changed in steps of .001 and the 46 minimum error was evaluated. This analytical expression fully verifies the previous results. 47 CHAPTER 5 Simulation This chapter shows the test results obtained from the simulation of the proposed method. Block diagrams, state graphs, electric circuits, and equations where used to model the different components of the new method. Simulations for the modified and unmodified cases were performed using block diagrams and equations. Each one of this cases was tested with actual and predicted modulation index, in order to evaluate the effectiveness of the proposed modulation index calculation method. Then, the two-state case and Mode I and Mode II were simulated separately using a state graph design. Finally the proposed method (PRSG-TWO-STEP) and the best of the existing methods (Mode I and II) are compared. 5.1 Proportional Reference Signal Generator (PRSG) 5.1.1 PRSG Components 2—to-3 transformation One of the advantages of simulations is that they can lead to simplification of the actual implementation. One example of this is the classical 2-to—3 transformation, 48 LP +Vb Vc Figure 5.1. 3-to—2 transformation. which converts the reference vector described by 21,, and 2),, to the three phase reference signals va,vb,vc. In this transformation it is required to multiply a 2 by 3 matrix by 21,; and vq. However, seeing the matrix elements in detail, we notice that only one multiplication, a division by two, two additions, and a negation are needed to implement the conversion. The following block diagrams show this simplification. Phase Ordering block In order to calculate the offset that it is needed to generate the reference signal for space vector modulation and for the predicted modulation index, it is necessary to know the maximum, middle, and minimum instantaneous values of the reference voltage of the three phases. In the experimental implementation (Intel 80C196 Mi- crocontroller) an algorithm to order the three phases value is used. However, the Simplorer simulation package provides built-in blocks, which calculate maximum and 49 J MAX 4 KP := -1 I— MAX1 e P Figure 5.2. Phase ordering block diagram. minimum values of the three given inputs. These two blocks are used here to simplify this ordering procedure. Since the three instantaneous values add to 0, the middle value can be calculated from the other two (maximum and minimum). In Figure 5.2 the phase ordering blocks are shown. Offset Calculation As was explained previously, the offset needed to produce the SVM reference signal can be calculated from the maximum and minimum phase values. When this idea was first proposed, the offset used was _ Tmin) 2 . Offset = (Tmm (5.1) Where Tmam and Tm," are the equivalent times of the maximum and minimum values of the three reference signals 120,115,110. However, if this offset is calculated as voltage, before converting to time, it is equal to 50 — -maa: + )m‘in llmz' Offset = (U 2 7 ) : 32—d. (5.2) Therefore, it is the same to find 21mm, and 11mm or to find directly rum-d. In terms of algorithms, both procedures have the same difficulty. If the absolute values are used, the offset becomes min(|va|, lvbla lvcl) 2 vmi .- lOffsetl = —§—d = ). (0.3) This last equation appears easier to apply, since only a minimum value is needed. However, only the magnitude of the offset is known with this method. In order to know the sign, we use the index of this minimum value, which makes the procedure as complicated as the previous two. An alternative method to calculate the modulation index without using absolute values will be used. Modulation Index Calculation Since the sign of the reference signal is lost when the absolute values are calculated, a method to find 121 and v2 from the three original (signed) reference signals is proposed here. Assume 111 is the minimum absolute value of the three reference signals, which it is always the middle value of the signed reference signals. Assume 222 is the middle value of the absolute reference signals, then 212 is equal to em” if 111 is positive and it is equal to ”um,” if v, is negative. Hence, the final procedure to be implemented is reduced to the following algorithm ”1 : —(Uma;r: + vmin) (54) offset = til/2 (5.5) if 221 > 0 U2 = vmar (5.6) 51 KP := .5 P value := 1 ‘ ICONS! ‘f" _.Jr— X l COMP2 > SUM2_1 MULS P _.. X + l Vmin_in -_;z value := .83 value := 1.13 § 1" KONST .KONS‘I' = count 41 L—- x x #— MUL7 MUL6 J .7 .4 . . ~~ Mindex . abs rm Figure 5.3. Modulation index and offset calculations. m,=|k1 *U1+k2*’l}2|. (5.8) With this procedure, the absolute value over each phase, and the procedure to find the sign of the offset are eliminated. Notice that an absolute value has to be calculated only once at the end, since m,- is always positive. The decision to select between ”man: and 21min is implemented with comparators and multipliers. The block diagram of this method is shown in Figure 5.3. 52 CONST Mi_in rnakeunit one X value := 7.69 SUM2_3 KONST > X . NEG 4 1.1st +4 Inverter NormMi NEGl LIMITER1 rm V NorMi Figure 5.4. Normalized m,- and normalizing factor Norm. Normalized m,- and normalizing factor The normalized modulation index determines which portion of the square or the sinu— soidal reference signal will be present in the output reference signal. The normalized modulation index is calculated by subtracting the reference m,- from the limited mi and dividing then by 0.27. For m,- < mm", the minor", = 0 and for m,- > mm", the modulation index has a value between 0 and 1. The normalizing factor keeps the amplitude of the reference signal through all the overmodulation range. The unitary factor is calculated by dividing the real m,- by the limited m,. For m, less than mum, mum“ is equal to 1 and for mi greater than mum, mium-t is equal to (miunit — 1) /0.27. The block diagram for the calculation of those two normalizing factors (mmmm, mium-t) is shown in Figure 5.4. 53 Square Sinusoidal Mixer This stage is implemented as described in Chapter 2. The sign signal is computed from a comparator with zero reference and output values of -1 and 1. The three-phase mixers follow the addition blocks used to implement the offset and multiplier blocks to keep the reference signal with amplitude 1. The blocks to implement the mixer are shown in Figure 5.5. Complete System Each component described above was encapsulated in separated blocks and connected together to form the proposed proportional reference generator. In Figure 5.6 the block diagram for this one-step version of PRSG is shown. 5.1.2 PRSG Using Unmodified Reference signal In sinusoidal pulse width modulation, SPWM, the reference signal is unmodified for the linear range. The maximum modulation index (mm-m) for the linear range is equal to 1. The PRSG for this mode starts its interpolation between unitary sinusoidal and square waveform at this point, until the maximum modulation index of 1.27. The complete system shown in Figure 5.6 can be used to simulate both sinusoidal PW M and space vector PWM. For space vector PW M the following condition has to be set: Offset = 0 (5.9) ”Lil-in: = 1 (5.10) (mi. — mum) .. ,- = . " .11 mlTIOTm .27 ('J ) In order to analyze the linearity and total harmonic distortion, in the simulation, the modulation index is changed from 1.0 to 1.27 in increments of 0.03. This mod- 54 Offset MkUnit Mindex Figure 5.5. Square-sinusoidal mixer. 55 i - i 7 ’7‘ k ni .. ".7 I...) M] _‘7V {'1‘ if? M U I ,._ 3 7:" Offset . : NorMi *‘ {“1 - ' g ---. ‘ is" *** u —» — - E ( VquGen1 2‘031 ‘ OrderPhasesl Mioflsetl Normalizerl ( ( ’MkUni? ' 7 *7 ’ 1* Offset l I NorMi _-__ 777777 _ I. EE Va 0 0 , Vrefa _ *fl )Iarel .“?E_ “‘7 Vbref Vb Mixer ~ Vrcfb__ '1 pl..- _ E VCE ; , Vijefc __,fri;fll Vcref » LE--...‘..2 Mixer Figure 5.6. Complete system for PRSG. ulation index is applied to the amplitude of the 2201 and 1),, generator. This generator has a fixed frequency of 60Hz, and each modulation index is kept constant for each cycle. Therefore, about 1000 points are recorded in each cycle for Fourier analysis. The waveform analyzed is the phase voltage, since it does not contain triple harmon- ics. The phase voltage can be obtained by applying the three output voltages to a resistive Y configuration, and measuring the voltage of one leg. Using the flexibility of Simplorer we obtain the phase voltage by subtracting the neutral voltage from the reference signal: vn : varef + vbref + vcref (512) van 2 varef — 1)". (5.13) 56 nirz=Mindex k12=5 svj=0 k2;:.5 U I=l Vq / Va Va PRSG Valuables NorMi WI “1 2 , 3 W ’/ Vb Vb MkUnit mm .4 w / , ~ Vc V / . m 4 p (4 2to31 SVMP VquGenl vmw 0"“ Modlnd:=Mindex P Nomi Eb 1m 14w 10 w M'ndex Offset NorMi ”we W Va (7;: Vrefa VA1_1 9 mm Van := (2'Varel-Vorel-Vcrefy3 9 We! Vb V . / v m E l Mixer / FL mum \ / Vcrel Figure 5.7. PRSG block diagram with parameters. Actual or aproximate modulation index The block diagram presented above uses the proposed formula for modulation index calculation m,- 2 1:1 :1: v1 + k2 =1: v2. In order to measure the accuracy of the proposed method, the actual modulation index, that it is present in the system, is used. The blocks for phase ordering, modulation index calculation, and normalizing factor were grouped in one. Some components were added to this block to allow the simulation of both sinusoidal and space vector case, each one with predicted and actual modulation index. Figure 5.7 shows this new block diagram. Therefore, for sinusoidal modulation case, two versions of results are shown: real and predicted modulation index. Figure 5.8 shows the simulation results for PRSG sinusoidal case with calculated modulation index. In the left-top corner of Figure 5.8 the fundamental output voltage is plotted 57 Output Voltage Fundamental Total Harmonics Distortion Fundamental Vs Modulation Index Output Voltage 1.3 - , 1 3 o m=1 1.25 < -1 * - . . 0 5 1'0 1'5 1 1.2 a E 0 t mi=1.03 -1 . L 4 1-15 o 5 1'0 1'5 , 1 ' ' O. . . . m.=1.06 « 1.1 l : " E O V f : -1 ' . . . { E o s 1'0 1'5 105 .._ . . ./ ..... .......... .......... .. . 1 / g — Actual 3 o- mi=1.09 . : — - Ideal < _1 _ , 1 A A A . A 1 1.1 1.2 1.3 0 5 1'0 1.5 Modulation Index , 1 1 Q —— E 0 . mi_1.12 . -1 - - THD Vs Modulation Index 0 5 10 15 0.35 7 4 ’ . - , 0.3 0.25 d E 0.2 0.15 1 . O. E < 0.1 0.05 . . ......... ......... .......... . . ' ' g o - mi=1 .27 < - - -1- T 0 1 1 ‘ . ‘ Modulation Index time(ms) Figure 5.8. Simulations results for PRSG—unmodified using approximate mi. 58 against the m,- command. The modulation index it also plotted against itself as a reference for the linearity of the tested method. This graph shows that PRSG posses a perfect linearity. The total harmonic distortion (THD) also changes linearly with respect to m,. Although this linear behaviour of the THD can be satisfactory for many applications, it can be improved with space vector modulation and two-step transformation. In the right part of the graph, the amplitude of the reference signal is plotted vs. time, for each of 10 selected values of m,- in the overmodulation range. For modulation index of 1.0 the reference signal looks almost sinusoidal. As the modulation index increases, the waveform looks more like the six-step waveform. In order to evaluate the effectiveness of the modulation index calculation, the same simulation was repeated using actual modulation index. This value could be calculated from 11d and '11,, with the formula m,- = (mg + 113,. (5.14) This actual value of the modulation index is taken from the (11,, and vq) generator which is available. This 777.,- value corresponds to the stair generator which produce the ten different values of modulation index. This waveform is generated in Simplorer with a sawtooth waveform generator and a sample-and- hold block. The sample-and- hold block keeps the modulation index constant during each period. Figure 5.10 shows that the output voltage fundamental obtained with PRSG, using the calculated modulation index, is similar to the ones obtained with the actual ‘ modulation index. This shows the accuracy of the calculated modulation index. 5.1.3 PRSG Using Modified Reference Signal The PRSG-SVM case extends the linearity of the linear range of the space vector PWM to six step mode. The main advantage of the SVM is that the linear range is 59 Output Voltage Fundamental Total Harmonics Distortion Fundamental Vs Modulation Index Output Voltage 1.3 , 1 E o m=1 1.25 < —1 . . _ 0 5 1'0 115 1 1.2 o. E 0 - mi=1.03 1 -1 . ‘ 1.15 o 5 19 115 , 1 O. . m.=1.06 - -1 . . . ‘ . 0 5 110 15 1.05- _ 1 1 Q — E 0) mi—1.09 . -1 b J 1 A A A 1 1.1 1.2 1.3 0 5 1'0 15 Modulation Index _ 1 1 o. E: o. m,=1.12 . -1 . . - ‘ d. E < THD Vs Modulation Index 0.35 y 1 . . d. E 0.3 . <1: 0.25 0.2 0.15 0.1 0.05 ........... .......... .......... ., Q . . . 5 Cl mi=1.27 4 - -1 I I o A A A A A 1 1.1 1.2 1.3 0 5 10 15 Modulation Index time(ms) Figure 5.9. Simulations results for PRSG-unmodified using actual mi. 60 extended to m, = 1.15 and the THD is practically zero until this limit. The PRSG interpolates between the modified sinusoidal reference signal with the square wave, in a way similar to the sinusoidal case. All the block diagrams remain the same, except the following parameters Offset = '03“ (5.15) mi "' mimin 'inorm : _- 17 m .12 (5 ) The simulation results for this case are shown in Figure 5.10. The output voltage fundamental changes linearly with respect to the modulation index. The total har- monic distortion also changes linearly with respect to the modulation index. This fact shows that the sinusoidal-square mixer operates linearly over the Fourier components of the input signal (sinusoidal or space vector reference). Although the THD also changes linearly with respect to the mi, this case offers low THD output response for each m,, since it starts later, at m, = 1.15. The same simulation was performed on the SVM case, using the actual modu- lation index instead of the aproximate one. As is shown in figure 5.11, the output fundamental is the same as when the estimated modulation index is used. This shows that the effect of the ripple caused for linearazing formula and the amplification of this ripple by the reduction of the overmodulation range is negligible. 5.1.4 PRSG using Two-Step Transformation Although the THD for modified reference case of the PRSG is lower than the un- modified refernce case, it is still higher than that of the classical Mode I and Mode II. In order to improve the THD, even more the PRSG is applied in two steps. First, 61 Output Voltage Fundamental Total Harmonics Distortion Fundamental Vs Modulation Index Output Voltage 1.3 1.25 1.2 Amp. .1; o .5 -3 ll u-L O b w < 1.15 o 5 1'0 fl 1 a. . m.=1.06 1.1 -t E O l -1 . I 0 5 10 15 1.05 - Amp. .L o _L __3 Il —L O ‘0 1 1 1 1 1 2 1 3 0 5 10 15 Modulation Index , 1 g 0 . mi=1.12 I -1 r . 1 0 5 1p 15 1 O. E 0. mi=1.15 THD Vs Modulation Index 0.35 y y . . d. E 0.3 < 0.25 d. E 0.2 0.15 . O. E < 0.1 < . . -1 . o A A A A 1 1.1 1.2 1.3 0 5 10 15 Modulation Index time(ms) Figure 5.10. Simulation results for PRSG-modified using approximate m,-. 62 Output Voltage Fundamental Total Harmonics Distortion 1.3 Fundamental Vs Modulation Index 1.25 1.2 1.1 1.05 r Modulation Index THD Vs Modulation Index 1.3 0.35 0.3 0.25 0.2 0.15 0.1 0.05 1 1.1 1.2 Modulation Index 1.3 Amp. Amp. Amp. Amp. Amp. Amp. Amp. Amp. Amp. Output Voltage m.=1 l 0 5 1'0 15 mi=1 .03 0 5 1'0 15 I mi=1 .06 .( 0 5 1'0 1.5 t mi=1 .09 . 1 0 5 10 1'5 0 5 1'0 15 mi=1 .15 O 101- 10 1'5 mi=1 .24 0 5 1'0 15 . mi=1 .27 4 0 5 10 15 time(ms) Figure 5.11. Simulation results for PRSG-modified using actual m,. the pure or modified sinusoidal (SVM) is converted to a trapezoid. The conversion is done by linearly interpolating between trapezoid and the unitary sinusoidal reference signal. The key of this step is to synthesize the trapezoid waveform with the infor- mation of the unitary sinusoidal. A trapezoid can be created with the information of the angle which is not available. Although this method was used in the prelimi- nary simulation in Matlab, a more efficient way to synthesize a trapezoid is required for Simplorer simulation and experimental implementation. This method consists of multiplying the unitary sinusoidal by 2 and then applying a limiter of 21:1. Figure 5.12 shows the two step state diagram and equation used for Simplorer simulation. Figure 5.13 shows the linearity, THD and waveform transformation of this method. 5.2 Mode I and Mode II In order to compare the proposed overmodulation method with the classical methods Mode I and Mode II, a Simplorer simulation was performed. These two modes work together to cover the entire overmodulation index range. They were implemented using state diagrams and equations. The angle 01 in Mode I and the angle 02 in Mode II were implemented using linear equations. Although these methods are normally implemented using complex equations, numerical methods, or look up tables, here they were implemented using linear equation to show that they do not have inherently linearity as the PRSG. Figure 5.14 shows the state diagram and the code needed to implement the Mode I and II in Simplorer. Figure 5.15 shows the linearity, THD and waveform transformation of this method. 5.3 Comparison of PRSG and Existing Methods Figures 5.12 and 5.15 for the PRSG and existing method are presented in this section in a different way, than they were presented in the previous section, in order to 64 1"“"\ . lIC-A E21 Vreta V Mimax2 := 1.216 Wag" .. . VC VA2 ; L ~§i;=.;?}-,.1:1.3;?7.7;5_:i‘~';'i‘-‘:=2i ,... g . V'efc mtheta := theta1+PI/2-int((theta1+Pl/2)'3/(2'PI))'2‘Pi/3 VA1_1 offtheta := abs(mtheta-PI/3)-Pl/6 theta := (arctan(Vqs/Vds)+(1-Vds/abs(Vds))*PI/2) offset := Mi'sin(offtheta)/2 , MI := sqrt(Vds'Vds+Vqs'Vqs) Phao i: Mi'sin(theta1)+oftset theta1 := theta+(1-theta/abs(theta))*Pl Pth I: Ml'Slnuheta"2'Pl/3)+Ofiset alpha :: rad(mod60(grd(theta1)+30)) Phco := Mi'sin(theta1+2'Pl/3)+offset Minorm2z=0 Mkunit:=Mimax1/Mi Minorm1:=(Mi-Mimax1)/(Mimax2-Mimax1) M 1 0 Mi>1.154 M1 i<1.216 inonn := - - _ EA __ ->« 1 v 4 Minorm1:=1 Mkun't‘=1 M0 O Q” Mkunit:=Mimax1/Mi . '= V I i M'"°""2' ° 1 55_6_5 f I. ; _ _ _ Minorm2:=(Mi-Mimax2)/(4/Pl-Mimax2) Mi<=1.1547 i>=1.216 VA] VA1_3 VA] Pha1 Z= Phao'Mkunit » “‘5 4.9393. em := Phbo'Mkunit VA1_2 lEX l ___ «1.1mm Phc1 := Phco‘Mkunit ‘A 1‘ Z'Sinuh‘atal) ' tra e Pha2 := Pha1+(trapA-Pha1)"Minorm1 B -- 2* ‘ h 1 2‘PI/3 18 p l -- Slnlt eta ' l Phb2 := Phb1+(trapB-Phb1)'Minorm1 ‘0 ‘= 2'3'"““°'a1+2'P"3l (EXT HgPWITER Phc2 := Phc1+(trapC-Phc1)'Minorm1 SqA := Phao/abs(Phao) tC , S B ._ Phbo/abs(Phbo) .. , FEPP_-E Pha3 I: Pha2+(SqA-Pha2)‘MInorm2 q "' ‘ 1' ' Phb3 := Phb2+(SqB-Phb2)'Minorrn2 ; EXT: >-- {.fl‘ltMtTték ~ , i5; . .3”- ,..“ ;. ___.; 5°C ‘= P"°°/a°s(Ph°°) mm := Phc2+(SqC-Ph02)*Minorm2 Figure 5.12. Two-step state diagram and equations. 65 Output Voltage Fundamental Total Harmonics Distortion 1.3 1.25 1.2* 0.35 0.3 0.25 .0 m .o _L U" .0 —-L 0.05 Fundamental Vs Modulation Index T / — Actual / I — ' Ideal 1.15 1.2 1.25 1.3 Modulation Index THD Vs Modulation Index 1' .15 1.2 1.25 1.3 Modulation Index Amp. Amp. Amp. Amp. Amp. Amp. Amp. Amp. Amp. Output Voltage mi=1.135 1'0 1'5 mi=1.15 1'0 1'5 mi=1.165 1'0 1'5 mi=1 .27 ——l__l_'—1 10 time(ms) Figure 5.13. Simulation results for PRSG-two-step. 15 Modlnd := Mindex Vq @ Vq L. Vd ... .. ..-_, '1 ‘ . ‘1 j" *v‘ S & 'i l. .1 "1.. EXT La... .._.4 L.- . “.2... .J Mit EXT5 Mindex : FXT~ . "Wm VquGem 1‘ “ ~ ‘ - ‘ ' . Vrefa VA1_4 ”"1 51.2; EXT” alpha1 :=Pl'(1.21-Mi)/(.36) Van := (2*Vrefa-Vrefb-Vretc)/3 '~ ‘-~“-=-‘J alpha2:=Pl/3-alpha1 Vrefb M11:=2/(sqrt(3)‘sin(2"Pl/3-alpha)) _ M12::2/(sqrt(3)'sin(2"Pl/3-alpha1)) 1133341411 .1. Mi>1.1547 1 " 8“”? , “("W‘iMidms Vrefc M0 1 1 M2 alpha2:=Pl/3-alpha1 » e___ _ . _>___ _ alpham2:=(alpha-alpha1)‘Pl/(3'(alpha2~alpha1)) Mi<=1.1547 Mi>=1 .216 M22:=2/(sqrt(3)'sin(2'PI/3-alpham2)) [J ’12- _ i alpha>alpha1 alpha<=alpha2 _ a1 -—-)——a #2 ~— —-- MiO := Mi'Z'MO' ‘ ' F ‘ Mit := M11'Z'M1"Z'a1'+M12*Z'M1"(Z'a2"+Z‘a0') Q) Q 2 Mi2 := Z'M2"(4*(Z'aO'+Z"a2")/3+M22"Z"a1') a , fleas---) Y “31>”. : a alphao := alpha"(Z'M1“+2“M0“)+Z"M2"(alpham2’Z'a1'+PI'Z"a2"/3) Mio := Mi0+Mi1+Mi2 alpha<=alpha1 alpha>alpha2 thetao := theta1-alpha+alphao VA] , mtheta := thetao+PI/2-int((thetao+PI/2)‘3/(2'Pl))'2"Pi/3 Eiiii‘.’31:1.:;ii‘;:ii:;:2.:'5 offtheta := abs(mtheta-Pl/3)-Pl/6 VA1_1 offset := Mio'sin(offtheta)/2 theta := (arctan(Vquds)+(1-Vds/abs(Vds))‘PI/2 Pha := Mio'sin(thetao)+offset Mi 2: sqrt(Vds'Vds+Vqs'Vqs) Phb ;= Mio‘sin(thetao-2‘PI/3)+offset theta1 := theta-H1-theta/abs(theta))'Pl Phc := Mio'sin(thetao+2'PI/3)+oftset alpha := rad(mod60(9rd(theta1)+30)2 Figure 5.14. Mode I and Mode II state diagrams and equations. 67 Output Voltage Fundamental Total Harmonics Distortion Fundamental Vs Modulation Index 1.3 Amp. 1.25 - 12* / — Actual , : — - Ideal 1.15 1.2 1.25 1.3 Modulation Index THD Vs Modulation Index 0.35 0.3 0.25 .0 to .0 -.L 01 0.1 Amp. 1 .15 1.2 1 .25 1 .3 Modulation Index Figure 5.15. Simulation result for 68 Output Voltage 1 ' i 0 mi=1.135 _1 t . A ‘7 0 +01. d O 1.5 time(ms) Mode I and Mode 11. compare separately each one of the desirable characteristics of the overmodulation method: linearity, simplicity and harmonic distortion. Although other methods were studied in the literature review, and simulated with Matlab files, Mode I and Mode II report the lowest THD of all. 5.3. 1 Linearity Linearity requires that the desired modulation index vs. output voltage fundamental follows an straight line. The overmodulation range has been considered until now as a very nonlinear one, therefore all the existing methods including Mode I and Mode II, use linearizing methods in their implementation. The prOposed method claims for the first time that only linear equations are necessary to obtain a perfect linearity at the output. In order to make a fair comparison between existing methods and the proposed method, the first were implemented using straight line equations. That means for example, that the holding angle, ah, in Mode II, which changes from 300 to 00 for m,- from 1.21 to 1.27, is changed using the linear equation below 0" — 30" =———— ,- 0. 5.18 1.27—1.21*m+30 ( ) 0h In a similar way, angle al, which changes from 00 to 300 for 771,- between 1.15 to 1.21 in Mode I, is changed using the linear equation below 30° — 00 Z ————-————- 1k 7712* (5.19) 1.21— 1.15 011 The output voltage fundamental vs. modulation index curve for both the existing and the proposed method is plotted in Figure 5.16. The curve for the proposed method follows a straight line, while the curve for Mode I and II does not. Linearity as was explained in Chapter I, makes the feedback control loops easier to design. 69 Figure 5.16 shows the linearity comparison between Mode I and Mode 11 and the PRSG two-step mode. 5.3.2 Harmonic Distortion The harmonic distortion of the proposed method was compared to that produced by Mode I and Mode II. Both curves were plotted in the same graph. The PRSG curve shows higher harmonic distortion in the first part of the range (1.15 g m,- _<_ 1.20), and it shows lower THD than mode I-II for m,- > 1.20. This is because the harmonic distortion of the trapezoid created in the two-step transformation contains less harmonics that the trapezoid resulted from the projection of the hexagon. PRSG shows lower THD in the most important range, where the distortion tends to have higher values. Therefore, PRSG-two-step has better overall THD performance than Mode I and Mode II. Figure 5.17 shows the results of this comparison. 70 Mode | & II and PRSG linearity comparison 1 .28 r 1 l l l l ,_26_.._.g _____ . ...... j ...... - ...... ; ........... g ........... .......... _ 1.24_..._;._....._.._. ........... .......... g ........... 3, .......... _ 122- ........... ....... / ........... .......... .......... _ Ouput Voltage Fundamental 1_18_....E ........... /‘. ........... .......... ........... .......... _ 116” ........... ....................... ....... ...... _ 1.16 1.18 1.2 1.22 1.24 1.26 1.28 Modulation Index Figure 5.16. PRSG-two-step and Mode I-Mode II Linearity comparison. 71 Total Harmonics Distortion Mode I & II and twostep PRSG THD comparison l I i l I I 0.3 0.25 .0 to 0.15 0.1 0.05 0 __ 1; ‘— 1 i 1 i i 1.16 1.18 1.2 1.22 1.24 1.26 1.28 Modulation Index Figure 5.17. PRSG-two-step and Mode I-Mode II THD comparison. 72 CHAPTER 6 Experimental Results In this chapter the implementation of the new overmodulation method in a Intel 80C196 microcontroller is described. This 16 bit microcontroller has three 8-bit and one 4-bit port. It also contains Event-compare registers (EPA), which make the implementation of the PWM easier. The modulation index command was sent from a PC to one of the ports of the microcontroller. PRSG was implemented in assembler code and used to control (open loop) a three-phase inverter. The inverter was connected to a three phase induction motor. The phase voltages are recorded to verify the results about linearity and harmonic distortion obtained in the mathematical analysis and simulation chapters. 6. 1 General Description 6.1.1 One Byte Resolution The microcontroller receives the modulation index command from the parallel port of a PC. This is a word of 7 bits, allowing the modulation index word to vary from 0- 127. This resolution was selected for many reasons. First, is the same resolution to be used in the proposed chip, therefore it will be a way to test if this resolution is good 73 enough. Second, there is a one-to-one relationship between the modulation index value 0-1.27 and the 7 bit binary resolution (0-127), which makes it unnecessary to scale all the constants used in the theoretical analysis. When this modulation index is converted to amplitude (-127 to 127), it still fits in a byte. Third, with this resolution the counter of the timing section only has to count 200 different values, which allows to reach a switching frequency of 60kHz if necessary. Finally, although the 80c196 is a 16 bit microcontroller, it is more convenient to use the extra 8-bits to do the necessary scaling. when working with fixed point operations. 6.1.2 Internal Generation of ed and vq The value of m,- received through the parallel port is used to calculate the 21,, and 1),, reference signals, using sine and cosine look-up tables inside the microcontroller. Al- though it appears a contradiction, since it is claimed earlier than the PRSG method works directly with ed and 12,, and does not need a look-up table, this approach its necessary for several reasons: First, the real modulation index was necessary to com- pare with the one calculated with the proposed method. Second, although the 80C196 has three and a half 8-bit digital ports, the serial communication is lost when more than two of them are used simultaneously. In the actual set-up one port is used for the modulation index and the other in the output signal. The serial communication is necessary to have available troubleshooting technics. Third, only one parallel port is necessary to send the modulation index, reducing wiring and I / 0 PC requirements. Finally, if the angle information is generated outside of the microcontroller, the in- formation sent through the parallel port has to be 255 times faster. Since everything is controlled from Matlab involving DSP read and write operation, this speed is too high for the complete cycle of measurement. The modulation index information is not changed at each cycle but one every 10 cycles, since each modulation index is sampled several times. Therefore the difference in speed using this approach is even 74 higher. Since all the plots required for this experiment have the modulation index as a base, it is more convenient to send the modulation index to the microcontroller and to generate the angle automatically inside it. Once the program is running using the generated values of ed and vq, the 80C196 port used for m,- can be used to receive ed and port2 (shared with serial communication), can be used to receive vq. The code for vd and 11,, generation and the look-up tables can be removed and the program will be ready for vector control operation. 6.1.3 Three Phase Output Signals The output generated by the microcontroller corresponds to the timing signals of the three phases. These signals feed the voltage source inverter and determine whether each phase will be connected to the positive or negative rail of the DC bus. Although six signals are needed to drive the IGBT bridge, the rest of them are generated inside the inverter. The dead time necessary to avoid short circuit in each phase leg is also generated inside the inverter. 6.1.4 Voltage Source Inverter The three phase inverter is really an AC—AC converter where the input is a three- phase 60Hz, 208 system. These three AC inputs are rectified by a diode bridge and filtered by a capacitor. In this application the DC bus voltage was controlled by changing the input voltage with a three-phase Variac. This voltage was set to 150V, lower than the normal 300V, since the motor rated voltage is 120Vrms and to prevent saturation when the voltage applied goes into the overmodulation range. The control circuit inside the inverter not only creates the gate signals for the other three IGBTs, and the signal delays, but also the gate voltages necessary to drive the IGBTs. 75 6.1.5 Data Acquisition Systems The voltage applied to the motor is measured across two of the phases (V2,) through a voltage sensor and is fed to the DSP. The DSP, which is an internal card inside the PC, takes 123,000 samples per second with a 12 bit analog-to- digital converter. Over 4208 points that correspond to two cycles are taken and saved inside the DSP board. A compiled C program is in charge of taking the data from the DSP board and saving it in a file. This file is then opened by a Matlab program and analyzed. The program finds zero crossing points in order to determine an exact cycle, and the correct phase, before performing the Fourier analysis. Then the fundamental and harmonic distortion is calculated and saved together with the modulation index. After that, a new modulation index is sent to the parallel port starting the cycle again. This procedure is repeated for each modulation index in steps of 0.01 over the entire overmodulation range. 6.2 PRSG Microcontroller Assembler Implemen- tation In this section the different parts of the assembler program with are relevant to the real implementation are explained. Then the results obtained for each case are shown. 6.2.1 Timing System After the three reference signals are calculated using the PRSG technique, they are sent to the EPA units. These units compare the data saved in their register (reference signals) with the count of counter 2. Once these values they become equal, the EPA changes the output of one external pin of the microcontroller without intervention of the CPU. However, an interrupt routine has to be executed with the following task: 76 load reference signal data in EPA1-3 registers, change the direction of the counter, load the starting state of the three signals, 0 program each EPA1-3 to set or reset the output pin, set the count when the next interrupt will be produce. A fourth EPA(0) is necessary to make the comparison between counter 2 and the count for the next interrupt and causes the interrupt routine be executed. The change of direction of the counter is necessary to produce the triangular wave that produces (through the comparison with the EPA1-3 registers) the PWM. Since the EPAs only change state when the compared values are equal, it is necessary to synchronize each EPA by programing it to set the output pin when the counter is counting up and programing it to reset it when the counter is counting down. Finally, setting the starting state of the three signals is a requirement of the overmodulation, since even when a value high or low enough can be set to avoid the EPA to change the output pin, it has to be set with the right value at the beginning of each cycle. Another part of the assembler program is dedicated to comparing each of the three reference phases voltages to their maximum and minimum possible values (triangular peaks). In case that the phase values are out of range (overmodulation), another set of values are assigned to them, just to make sure than the counter will never reach this value and a glitch is not produced. The starting signal vector, which is updated during the interrupt routine, is formed in this routine. Therefore, about 24 instruction lines are added to the assembler program to avoid these glitches. This routine and the interrupt routine create some overhead of time and code space that could be avoided in a dedicated chip implementation. 77 6.2.2 Reference Signal Generation Once vd and 13,, are generated, the 3-to-2 transformation described in the simulation chapter is implemented to obtain va, abandvc. The most important differences with the simulation is that shift-right arithmetic is used to create the factor 12,, / 2 and that all constants are multiplied by 100 to produce the necessary scaling to carry out the fixed-point operation. After 110,121, and 126 are obtained, the phases are ordered. As in the simulation part, the signed values and not the absolute values are ordered. To implement an ordering routine of three values it is necessary to use decision instructions. An efficient routine uses only two decision instructions and swapping of two variables. Once the phases are ordered, the middle value phase corresponds to 121 and the other phase whose has the same sign as 111 becomes v2. The modulation index is calculated using k1 and 112. Another difference between simulation and microcontroller assembler implementa- tion is that once the modulation index falls within the linear range, all overmodulation procedures are skipped, including all the mixers. The normalizing factor(Norm), the normalized modulation index(m,en) and the mixers, are implemented in a similar way as in the simulation. However, some differ- ences were introduce here to substitute the absolute values and limiter for decision instructions. The complete block diagrams for the assembler implementation is shown in figure 6.1. 6.2.3 PRSG-Unmodified Reference Case Results actual m,- case In the sinusoidal case of the PRSG, the subroutine for offset calculation and addition is skipped. For actual mi case the ordering of the phases is not needed. Therefore this is the smallest version of the assembler program. The value for m,- is taken from 78 . Modulation Begin . Index . ' Caluculation - / v d 1 v q / Input Signals F vA = V4 J3 Yes q 2 2103 l 1 J3 Transformation (J. ) Vc=--2—Vq'7Vd mm = Normalized 1 min =P—3—m—1_:_2_ ~ ~ 3 andLimiter § fi_ 2p Absolute values m it = l 3 Modulation ‘ i Indexs j m it : ml. v1 = ab5(vA) . . 1 ... .1 Linear Range : Overmodulation : v2=abs(vB) . . v3 = abs (vc ) | Sign, =sign (VA)+sign (VB)+sign(vC) "m l’ AMU = Ordering p” ’ ' No- v1,v2,v3 v EMU : _t_ 1 Limiter v : V, v _ VCM x CMU ' vX — v2 m I]. — vi = V2 V2 _ V3 Yes 1 V = V v — v 2 x . 3 x vrth =mm(5'8" (VA/nu )’ VAMU )+VAMU T A Sinusoidal vrth = min (sign (”my )' ”(mu )1' VBMU No ’ 53:38 vrefA = min (Sign (VCMU )' VCMU )+VCMU Yes vl , § Space V°°I°' Output signals V”, = VA +—srgnv ; Reference . 2 Signals Vl , " "‘ " ' vrefA ’vrefB ’vrefC VBM 2V3 +351gn, v _ I - ch vc + szgnv End Figure 6.1. Flow diagram of the assembler program. 79 the input port. When the programs were modified in order to receive vd and vq, an extra subroutine was necessary for modulation index calculation. The modulation index is evaluated. and in case of this value fall in the linear range, all overmodulation procedures are skipped and the reference signals are send directly to the EPAs. On the other hand, if m,- is in the overmodulation range, the normalizing factor and normalized modulation index are calculated, and used later in the linear mixers. Figure 6.2 shows the results obtained for this case. In the left t0p corner the fundamental vs. modulation index is plotted. Although this graph does not look as smooth as in the simulation, the linear behavior of the fundamental is observed. In the bottom left corner the THD is plotted vs. the modulation index, which shows a linear behavior as predicted. In the right part of the graph the transformation is shown of the voltage applied to the motor, from sinusoidal to six-step mode. This voltage is filtered in the sensor and then in the Matlab program in order to minimize the noise created for the data acquisition system. Approximate m,- Case In the approximate modulation index case of the PRSG-sinusoidal, the ordering of the phases, is performed in order to determine v1 and 222. Then the modulation index is evaluated to determine whether it is in the overmodulation range. If it is, the normalizing factor is calculated using this estimated modulation index. No effect is noticed in the output fundamental. Only at the end of the range a difficulty is noticed to reach exactly the maximum modulation index of 1.27. The THD varies linearly with m,- but under the imaginary straight line which connects 0 and 30% which is acceptable. In the waveform transformation graph some noise appears in the envelope of the voltage, but because of its high frequency it does not have effect on the load. 80 Output Voltage Fundamental THD 1.3 1.25 1.2 1.15 1.1 1.05 r 0.35 0.3 0.25 0.2 0.15 0.1 0.05 Experimental Data with Intel 80c196 / — Actual 1 1.1 1.2 1.3 Modulation Index Total Harmonic Distortion of PRSG fl e 1 1.1 1.2 1.3 Modulation index Amp. Amp. Amp. Amp. Amp. Amp. Amp. Amp. Amp. Amp. Amp. Amp. Output Voltage 2 , 1 _2 . "11:1.15 ‘ 2 1 0. mi=1.1592 /"""""". -2 . . 2 . o \ m=1.1685 / '\ -2 . . 2 o ’ z _2 . m,=1.1777\ . 2 . 1 o \ m,=1.1369/ ‘\ -2 . . 2 r o \ m=1.1962 / N -2 . 2 1 o \ m=1.2054 / \ -2 _ . 2 1 o ’ ,..a _2 . m,=1.2146\ . 2 u _g , mi=1.2238 “F J 2 p 1 o \ m=1.2331 / \ -2 . . 2 . n o _2 mi=1.2423 , 2 r ‘ o m.=1.2515 -2 I . 2 . 1 _g _ mi=1.2608 , 2 . f - ' i o 5 1o 15 time(ms) Figure 6.2. PRSG-unmodified experimental results using actual m,. 81 Output Voltage Fundamental THD Experimental Data with Intel 800196 1 .3 . . 1.25 1.2 1.15 1.1 1.05 / : — Actual 1 1.1 1.2 1.3 Modulation Index Total Harmonic Distortion of PRSG 0.35 0.3 . .......... .......... .......... . 0,25 ........... .......... .......... . 0.2 0.15 0.1 - 0.05 0 m ; 1 1 .1 1 .2 1 .3 Modulation index Amp. Amp. Amp. Amp. Am Amp. Amp. Amp. Amp. Amp. Amp. Output Voltage 2 . 0 ,\-’ _2 _ mi=1.15 1 2 0 _2 t mi=1.1592 2 . . 0 ,\.’ _2 , "11:” 685 2 . , 0 N -2 _ £21.17” 2 _ 4 0 N _2 , mi=1.1869 , 2 . . 0 N _2 . m§=1.1962 . 2 > 4 o N _2 _ ml=1.2054 ‘ 2 . . 0 N _2 . m5=1.2146 2 . 0 N _2 . mé=1.2238 2 > 1 _g_ mj=1.2331 , 2 > 4 0 N _2 . ”151.2423 2 . . _g _ mi=1.2515 , 2 . 4 0 m.=1.260 -2 » 2 . o . _2 , mé=1.27 L . 0 5 10 15 time(ms) Figure 6.3. PRSG-unmodified experimental results using approximate 772,-. 82 6.2.4 PRSG-Modified Reference Case Results Actual m, case In the Space \r’ector Reference case, an offset is always added to the three phase signals before they are mixed. Therefore, the ordering subroutine is always executed. However, for the actual m, sub-case the modulation index is not calculated but taken from the input values. The offset algorithm is the same as was used in the simulation, where the signed phase values are used. Once the range of the overmodulation index is determined, the mixer action is performance. Figure 6.4 shows that the fundamental changes linearly with respect to the modu- lation index. It can be observed that the actual and ideal lines are exactly one above the other. The THD curve also shows similar result to those obtained in the theory and simulations. T HD remains very low until m, = 1.15, then it behaves linearly from 1 up to 1.27. The waveform transformation also produces satisfactory results, since it shows very clearly how the space vector reference waveform is converted to six-step mode. aproximate m,- case For the approximate modulation index sub-case the subroutine for mi calculation is executed. The graph for this case (figure 6.5) shows an output fundamental with a linear behavior. However at the end of the overmodulation range it was difficult to reach the maximum fundamental output of 1.27. This is because the ripple of the modulation index is amplified by 8(= 1 / .12) and even when the average error is zero, this ripple is clamped for the limitation of the power supply and can not compensate the part where the calculated m,- is under the average. Even so the imperfection of the data acquisition system and the precision of the assembler program appear to 83 Output Voltage Fundamental THD Experimental Data with Intel 80C196 Output Voltage 1.3 Q 2 i E 0 PT "\ . . / < _2 ,, m,=1.15 125 ........... j .......... ..... /. . . . .4 ' i I / d. 2 . i / E 0 L-f \_ 1 2 L ......... -' .......... / ......... . < —2 r mé=1'1592 , /. d 2 / E 0 r N 1.15 .. .............. /. ./ .............. < _2, m,=1.1685 / . 2 > . . Q. 1 1 ........... './ ......... ' .......... . E 0 .-—-— \— - /: : < -2. m,=1.1777 / ; : 2, / 3 3 d o .. m=1.1869 ,..—— 1.05 .. . . ./ ..... I .......... . .......... . g , / j " ' Ideal -2 ‘ 1 i O. 1, 1.1 12 13 E o a. m.=1.1962 ,..—— Modulation lndex ’2 ' . 2 r ‘51 o ... m.=1.2054 ,.— < _2 _ . 2 » Q E 0 ~—-____ < _2 . mi=1.2146 Total Harmonic Distortion of PRSG d. 2 ' 0.35 f r E 0 r" \ : ; < _2 . m5=1.2238 0.3 a 2 E 0 F \ < _2 . m,=1.2331 0.25 d 2 _ o 2 < -2 . m,=1.2423 . 2 . g- o ,—.-— 0.15 < _2 _ m,=1.2515 - 2 ' 1 0'1 ‘51 0» m.=1.2608 < _2 , 0.05 d 2 . - l s 0 :1 ol A i < -2» r . 1 1.1 1.2 1.3 0 5 10 Modulation index time(ms) Figure 6.4. PRSG-modified experimental results using actual mi. 84 play also some role in the output obtained, since the simulations show better results. 85 Output Voltage Fundamental THD 1.3 1.25 r 1.2 1.1 1.05 0.35 0.3 0.25 0.2 0.15 0.1 0.05 Experimental Data with Intel 800196 1 1 .1 1.2 Modulation Index Total Harmonic Distortion of PRSG 1.3 ............................... ............................... 4L 1 1.1 1.2 Modulation index 1.3 Amp. Amp. Amp. Amp. A Amp. Amp. Amp. Amp. Amp. Amp. Amp. Amp. Amp. Output Voltage ’/mi:;5\_/‘ mi=1.1592 ‘ p m.=1.1685 4 m.=1.1869 q m=1.1962 p m.=1 .2054 J , mi=1.2146 ‘ , m,=1.2238 mi=1.2515 d m mi=1 .2608 '— W O 5 10 15 time(ms) Figure 6.5. PRSG-modified experimental results using approximate mi. 86 CHAPTER 7 VHDL Implementation The Visic Hardware Description Language (VHDL) is a computer language that al- lows designers to describe and model digital systems at different levels of hierarchy. It is possible for example, to define components based on simple gates. Then, those components can be called and used by just knowing their input and output require- ments and the function they perform. That abstraction capability allows designers to build complex digital systems. Furthermore, each component can be defined us— ing behavioral architecture, which is closer to the concept and specification of the component than an structural architecture. In this chapter, a VHDL implementation of the new overmodulation method is described. The objective is to show that the new overmodulation method is simple enough to be implemented in a separate digital block, saving the cost of a microproces- sor. The code in VHDL can be mapped in an FPGA or any other logic programmable device. The system is first described in a block diagram, as it was in the simulation chapter. However, each block is now described based on the logic components needed to accomplish its function. The complete implementation is done using VHDL code. First, a simulation of the complete system using behavioral architecture is done. Then, this code is separated into procedures and functions in order to identify the different blocks. Finally, each procedure is converted to components and simulated 87 again. Some of these components are then described in structural architecture using standard libraries. The rest of them, which require more mathematical calculations, are converted to behavioral architecture that can be synthesized to an FPGA using available packages. 7 .1 General Specification The digital system to be implemented in VHDL is shown in Figure 7.1 and has the following specifications: 0 two 8-bit digital input ports for 21,; and vq; o 3 single-bit digital output for inverter main devices switching state; 0 sampling rate of 10kHz (21,; and 12,, are read); 0 2MHz frequency clock for triangular generator. The function of this overmodulation digital system can be divided into two major sub-functions. The first executes the mathematical algorithm to obtain the three new reference signal voltages (8 bits wide) based on the 2 input digital vectors. This part of the system requires multiplication and addition blocks in order to be implemented. The second part converts the eight-bit information to time (PWM). This part consists of counters, comparators and a decoder. This part can be mapped directly using structural architecture since those components already exist in libraries. Figure 7.2 shows these two blocks. The first block is called the calculation block, while the second is called the timing block. The calculation block has to realize three functions. The first is a 2-to-3 trans- formation, converting vd and vq to the instantaneous three reference voltages vmvb and 116. The second function is to calculate the normalized modulation index and the normalization constant (mm, Norm) to be used in the mixer. The third function is to 88 tsa _—> V_d 8-Bits / PRSG Digital tsb System ‘———> v_q \ 8-Bits / tsc ——> Figure 7.1. Digital system main block. PRSG Digital System A *. r ‘f‘s T tsa V_a , l i ——> 8-Bits 7, ’83 m C i a n | I g tsb c ——————> u b l I a o t a c i l : .. __t:c_. o l Figure 7 .2. Calculation and timing blocks. 89 PRSG Digital System Calculations Timing Figure 7.3. Subsystem block diagram. mix the sinusoidal reference signal with its respective square signal using the instan- taneous voltage and the constants previously calculated. The timing block consists of two parts: the triangular generator which includes counters, and the comparator block, which consists on three eight-bit comparators. Figure 7.3 shows these five main parts of the PRSG digital system. The complete system was first simulated using a single component in VHDL with two 8-bit input ports and 3 single-bit output ports. The five blocks were coded as VHDL procedures, which were stored in a user package. The procedures that in- volve the 2-to—3 calculation used directly multiplication and division functions, which are allowed in VHDL. This first architecture, although difficult to synthesize, shows that the PRSG method is easier to implement than previous methods, since VHDL does not allow the use of more complex mathematical functions like direct and in- verse trigonometric functions. This first code is also useful to verify if the selected frequencies and word length provide the required resolution to produce a good re- 90 sult. Although is not practical to show the complete VHDL code (including the five procedures), the entity and architecture are described in Figure 7.4. 7 .2 Test Procedure In order to test this behavioral architecture of the PRSG-PW’M digital system, a test bench VHDL code was used. This code reads data for 21,; and 2),, from an ASCII file. This file, created using a Matlab code, contains the reference voltage for 10 cycles. Each cycle consists of 83 points, with values in the range of (-127,+127). In order to simulate data that actually come from a PC or DSP, this data is saved in 2’s complement form. Therefore the ASCII file contains values from 0 to 255. This data is read with a sampling frequency of 10kHz. The test-bench file converts these data into bit-vectors that are mapped to the input ports of the pwmchz‘p module. The output bit ports of the pwmchip module (swa, swb, swc) are also mapped to a three-bit signal, which is then converted to a single integer (0-7), using the data conversion function from the user package AD-pack. This was necessary, because of the large amount of data that is generated during the simulation. The pwmchz'p model runs one process each 500ps. This time corresponds to the clock of the triangular wave generator. During this process all five procedures described above are executed. The five procedures are coded and compiled in the file AD_pack.vhd. The procedure to test the behavioral architecture of the PRSG-PWM digital system is shown in Figure 7.5. 7 .2.1 PRSG Using Modified Reference Signal The equations for the 2-to-3 transformation are the same as used in the simulation and microprocessor implementation. However, the equations used to calculate the 91 ENTITY pwmchip IS PORT (Vd,Vq : in std_logic_vector(7 DOWNTO 0); swa,swb,swc : out std_logic); END pwmchip; ARCHITECTURE chipv1 OF pwmchip IS SIGNAL swai,swbi,swci: std_logic; BEGIN PROCESS VARIABLE triang: INTEGER:=100; VARIABLE inc: INTEGER:=-1; VARIABLE Var,Vbr,Vcr: INTEGER; VARIABLE Va,Vb,Vc: INTEGER; VARIABLE Mi,Norm: INTEGER; BEGIN -- 2 to 3 transformation conv2t03(Vd,Vq,Var,Vbr,Vcr); -- modulation index calculation minorm(Var,Vbr,Vcr,Mi,Norm); -- mix square with sinusoidal mixer(Var,Vbr,Vcr,Mi,Norm,Offset,Va,Vb,Vc); -- Triangular generator tri_wave(triang,inc,triang,inc); -- PWM compare triang with vref PWM(Va,Vb,Vc,triang.swai.swbi.swci); swa <= swai; swb <= swbi; swc <= swci; WAIT FOR 500 NS; END PROCESS; END chipv1; Figure 7.4. Partial VHDL code for PRSG digital system. 92 Packect VHDL code AD _pack.vhd Procedurest 2toS,MiNorm Mixer,triang.PWM} Functioninst.sv2i.sb2i} VHDL code PWMchlp.vhd Enttity{Vd,Vq,Sabc} Ardhitecture behave( Process (500nS) Call Procedures) Test Bench VHDL code tb_chlp.vhd Component.process(100uS),read file.Data conv..write fiI Matlab code Data File Data File Matlab code VquWaveIO-m Vqu3.dat(ASCll) ReadFIIe-m Generate 10x83x2 integers 10'83'200 integers Separate,Filter. Vd,Vq data (.1 27-127) (0.7) Fourier.THD. Va+2'Vb+4"Vc Display 10 cyles (11: (127 — m.,-) >I< 100 va —. (7.4) m,- * 27 32 The first 100 constant in equation (7.4) corresponds to m, = 1, while the second eliminates a multiplication in the mixer. In the second term, the 100 constant is used to scale before the division by m,. The factor 32 is a power of two that does the scaling before the division by 27. Defining min and Norm as 94 . i V X ‘ ’ /T“\ Sign + l i r’ . v / \ - , ar a—-———>\ X l A + _—> \/ Norm m .n l _>, +/- r l . va————> X ————>' + ———> Figure 7.6. Mixer simplification. (m, — 100) * 100 32 * (127 — m,) =1: 100 'in Z d N = , 7.? m 27 an arm mi * 27 ( o) the equation for the user is reduced to , Norm 2),, U"; = mmszgnwa) + —. (7.6) 32 The range for Mm is (0-100), while the range for Norm is (0-32). These factors eliminate one division, one multiplication and one subtraction from the mixer. Since these Operations are performed three times in the mixer, 9 operations and 6 scalings are saved. Figure 7.6 shows this simplification. The results for the simulation of this behavioral architecture for sinusoidal case is shown in Figure 7.7. The modulation index has been changed from 1 to 1.27 in steps 95 of 0.03. The fundamental and harmonic distortion appear linear, but because of lim- itations (resolution) in the modulation index calculation some distortion is observed. 7.2.2 PRSG Using Modified Reference Signal For the space vector modulation case the minorm procedure was modified. The new equations for m,- and Norm are: (m,- — llo) * 100 and Norm : 32 * (127 — 772,-) * 115 7.7 12 m,*12 ( ) film I The simulation results for this case are shown in Figure 7.8. The harmonics distor- tion performance is better than the SVM case, as was expected. The output voltage was not distorted until a modulation index of 1.15 is reached. The fundamental appears linear over the overmodulation range. 7 .2.3 PRSG Using Two-step Transformation For two-step transformation, procedures minorm and mixer were modified. Two values of mm (mm and ming) and two of Norm (Norml and N0rm2) are needed for the two stages. In the first modulation sub-range (1.15 < m,- < 1.21) the second mixer does not affect the reference signal and the equations for those four variables are 0— r 2 121 — ,- 115 (m, llo)*128 and Norml : 3 *( m) * 6 m,- * 6 min-2 = O; and N0rm2 = 32; (7.9) min] I In the second modulation index sub-range (1.21 < m,- < 1.27) the first mixer 96 Fundamental THD (%) F1 vs mi (VHDL simulation) Output Voltage 1.3 . . _ 1 Q — E 0 ml-1 , 1.25 ~ _1 . L . g 0 {5 19 1'5 , 1 Q 12 E 0 W _1 . . ‘ A ‘ 0 5 10 15 1.15 1 - _ . a. - _ r 4 1.1 1 . . . 0 5 1'0 15 1 Q — 1-05’ g 0% mi_1.09 _1 . . 0 5 1'0 1'5 1 . 1 Q I m=1.12 , I -1 ’ ‘ 0 5 1'0 1'5 . 1 i Q — d Harmonic Distortion g 0 ‘ mi-1-15 0.3 . T _1 _ ‘ . . ‘ 0.25 0.2 0.15 0.1 o.os~ o m time(ms) Figure 7.7. Simulation results for PRSG-unmodified. 97 Fundamental THD (01.) F1 vs mi (VHDL simulation) Output Voltage 1.3 . . , 1 Q E: 0’ "11:1 . 1.25 ., —1» ‘ - . 0 5 1'0 1'5 , 1 Q -1 » . ‘ A ‘ 0 5 10 15 1.15 4 1 r . g o» mi=1.06 , 1.1 ‘1 ’ . * 0 5 1'0 175 1 . Q _- 1-05 E o mi—1.09 , -1. ‘ - 4 . . o 5 1.0 15 1 1 . 1 _ 1 1'1 1'2 1'3 3 o» m=1.12 , m, < l l -1. A ‘ 0 5 1'0 15 1 . Q _- Harrnonic Distortion g 0 "1,-1-15 0.3 . f _1, ‘ . . J 0.25 0.2 0.15 0.1 0.05 o 1 . . _ 1 1.1 1.2 1.3 o 5 1o ,5 m time(ms) Figure 7.8. Simulation results PRSG-modified. 98 Norm1 £1111 Norm2 Min2 ¢ +100 , )(22 'l" __//—_-"’jf )x: j _____1.. .11]- -100 ‘ /// Va .1. , \ Var —+ +<+ x, +>—+ \V’f" ‘\“‘\ .{f/ \,I// v‘/ Figure 7.9. Mixer simplification for PRSG-two-step transformation. should produce a trapezoidal unitary signal. Therefore, the equations for these four variables are changed to mml = 100; (7.10) Norm1: 0; (7.11) mm2 : (m,- — 121) at 100 (7.12) Norm2 = 32 * (1267 — mi). (7.13) The simplification in the one-step case is used in the second sub-range of the two- step case mixer. For the creation of the trapezoidal waveform, more information is needed about the phase than for the creation of the square wave, and therefore one multiplication has to be left in the mixer for the first subrange. Figure 7.9 shows the simplification of the mixer for the two-step case. The simulation results for this case are shown in Figure 7.10. 99 I":1 vs mi (VHDL simulation) Output Voltage 1.3 . . . i _ 1 a. .— E 0 m._1 1.25 4 _1 r - L 0 5 1'0 1‘5 , 1 Q - 1'2 i g 0 > mi—1.03 , r2 _, , ‘ ‘ ‘ ‘ C E 0 5 1o 15 a, 1 15 . 1 . E Q 3 E 0+ m.=1.06 , LL < I 1.1 -1 . 0 5 1'0 1'5 . 1 ' Q — -1. . ‘ L ‘ 0 5 19 1'5 1 . 1 _ 1 1 1 1 2 1 3 g 0 PW m l < _1 + - ‘ A ‘ 0 5 1‘0 15 1 . Q — Harmonic Distortion E 0 ‘ mi-1-15 0.3 . f _1 , . . . ‘ 0.25 0.2 THD (%) O 51‘ 0.1 0.05 m time(ms) Figure 7.10. Simulation results for PRSG-two-step. 100 7 .3 Analysis of Results The test results for the VHDL architecture presented in this chapter shows that the pr0posed design is suitable for implementing the PRSG-PWM in a separate digital block, in terms of resolution and output quality. The compiler used for the simulation was BlueHDL from Blue Pacific Computing, Inc. The timing block was described in a structural architecture using standard components. The triangular generator was implemented using two bidirectional 4-bit counters and logic gates to limit the count from 27 to 227. The PWM blocks were described using standard 4-bit comparator (2 for each phase) and the output was latched using flip—flops. The calculation blocks remain in an behavioral architecture. However, signed multiplication and division, were converted to a code that is possible to be synthesized for available package as Xilinx or Altera. The implementation of this design in VHDL makes it more portable to be mapped using different technologies and different software packages, than if it was implemented using schematic entry. 101 CHAPTER 8 Conclusions In order to obtain a better transient response and maximum torque from an induction motor-drive system, the maximum fundamental output voltage should be obtained from any given DC source. This maximum voltage is obtained when an overmodula- tion method is used to extend the normal PWM method until it the reaches six-step mode. In this thesis, it is shown that it is possible to make this extension using only linear equations. The advantage of simplicity over the previous methods allows this overmodulation method to be easily integrated in the overall PWM scheme. The pro- posed method, called Proportional Reference Signal Generator, is based on a linear interpolation between a sinusoidal reference signal and a square one. The key of the method is a sinusoidal-square mixer, which obtains the square and sinusoidal unitary waveforms from the instantaneous values of the 12,1 and 1),, reference signals. The modulation index, which is necessary for the interpolation, is also calculated from the instantaneous reference values of the voltages of the three phases, using a linear equation proposed in this work. The total harmonic distortion of the reference signal created by the PRSG, varies linearly with respect to the modulation index command. Since the optimal THD performance is not the one that behaves linearly, but rather the one which shows the lowest THD values for each modulation index, a two-step transformation is also proposed. This consists of converting the sinusoidal 102 waveform into a trapezoidal one, and then converting the trapezoidal waveform into a square one as the value of the modulation index increases. Mathematical analysis showed that the modified voltage reference signal, behaves linearly with respect to the modulation index. This analysis also showed that the mixer used in the PRSG can transition from any waveform into any other, while the fundamental varies linearly from the fundamental of the first signal to the funda- mental of the other. That means that PRSG works perfectly either for sinusoidal PWM, space vector PWM or any other transformation as used in the two-step case (sinusoidal-trapezoidal and trapezoidal-square). The linearity of the THD with re- spect to the overmodulation index command was also shown in this analysis. Finally, an optimization for the constants, used in the modulation index, proposed equations was performed. Simulations using the Simplorer and Matlab packages verified the linear behavior of the proposed method. The new method was described in block diagrams, state diagrams and equations. The data was analyzed using the Matlab package. For both cases, unmodified and modified reference signal, the fundamental of the output varies linearly with the reference, as was predicted in the mathematical analysis. The two-step transformation case was simulated and compared with the classic overmodulation methods Mode I and Mode II. Although linearity and the simplicity of implementation were a clear advantage in the proposed method, it was important to compare its THD to that of the overmodulation method consisting of Mode I and Mode II, since this last method has shown the better result so far. The test results Show that the PRSG (two-step transformation case) has a lower THD than Mode I and Mode II in the second subrange of 1.21 < m,- < 1.27. The proposed overmodulation method was implemented in a microcontroller (In- tel 80C196) and was used to control a three-phase voltage inverter. The results of this experiment verify the linearity and simplicity of the PRSG method. In the experi- 103 mental setup the difference between the calculated modulation index and the actual modulation index was larger than predicted by simulation. Also, the maximum fun- damental obtained with the calculated modulation index was 1.256, which is very close to the theoretical maximum of 1.27. This difference is caused by two different factors: the limited numerical resolution of the calculations inside the microproces- sor which amplified the ripple of the modulation index, and inability to produce an average error of zero at the extremes of the voltage range. The simplicity of the new method can be exploited by implementing it in a stand alone device like an FPGA. A digital system was designed, using the VHDL language. Some equations were modified in order to minimize the number of numerical opera- tions and enhance the performance of the system. The test results show that the new overmodulation method is suitable to be implemented in a stand-alone system. The proposed PRSG method is suitable to be used in vector control, since the reference signals are calculated from the instantaneous reference values of vd and vq. Additionallly this new method uses variables calculated for other methods in the linear range, being suitable to be easily integrated with them. The results obtained with the PRSG methods suggests that this research extends into the overmodulation range the simplicity obtained recently in the linear range, with the unification of the space vector theory and classical triangular comparison methods. 8. 1 Future Work A number of tasks can be carried out to further analyze, enhance and apply the proposed overmodulation technique. These include: 1. Convert the VHDL design into a real stand-alone device. This device could be integrated with the inverter, simplifying the control setup. 2. Investigate the ripple torque caused by the overmodulation method as the mod- 104 ulation index approach 1.27. All overmodulation methods are based on a com- plete cycle. This means that the fundamental is calculated over an entire wave— form cycle. In vector control, if the angle applied differs from the desired ones, reverse torque could be produced in the motor. A new overmodulation method that alleviates this effect can be derived from this investigation. . Investigate analytically the optimal path for THD of a transformation from sinusoidal to square wave. Then, the actual method including PRSG can be compared with it. . Find an algorithm to avoid the tedious maximum and minimum calculations in the space vector PW M. Although the unified approach is simpler than the original approach for space vector modulation, the implementation in software of the maximum and minimum of the three phases values takes approximately 12 instructions in C Language and 17 in the 80C196 assembler language. . Investigate the possibility of applying the overmodulation method directly from references 1),; and vq. If the overmodulation is based on the reference signals, 2),; and vq instead of va, 2),, and vc, 50% of the calculations are saved. 105 APPENDICES 106 APPENDIX A VHDL code for AD-pack -- File: AD_pack.vhd —- -- Description: A generic package used by the design "PWMchip" -- -- Author: -- DOC: -- (c) Andres Diaz -- July 24, 2000 -- Copyright 1999-00 Custom Solution Group, Inc. -- ALL RIGHTS RESERVED -- library ieee; use ieee.std_1ogic_1164.all; package AD_pack is function sv2i (sv: std_logic_vector) return integer; function sb2i (sv: std_logic_vector) return integer; function i23v (integ: integer) return std_logic_vector; procedure procedure procedure procedure procedure procedure procedure procedure end AD_pack; conv2t03 (Vd,Vq: in std_logic_vector( 7 downto 0); vra,vrb,vrc: out integer); tri_wave(triang,inc: in integer; tri,incre: out integer); PWM(Var,Vbr,Vcr,triang: in integer; signal swa,swb,swc: out std_logic); minorm(Var,Vbr,Vcr: in integer; Mi,Norm,0ffset: out integer); mixer(Var,Vbr,Vcr,Mi,Norm,0ffset:in integer; Vao,Vbo,Vco: out integer); mixer3(Var,Vbr,Vcr,Mil,Norml,Mi2,Norm2,0ffset:in integer; Vao,Vbo,Vco: out integer); minorm2(Var,Vbr,Vcr: in integer; Mi,Norm,0ffset: out integer); minorm3 (Var,Vbr,Vcr: in integer; Mi1,Norm1,Mi2,Norm2,0ffset: out integer); package body AD_pack is 107 function sv2i (sv: std_logic_vector) return integer is variable result, num: integer; begin result := 0; num := 1; for i in 0 to sv’length-l loop if (sv(i) /= ’0’) and (sv(i) /= ’1’) then return -1; elsif (sv(i) = ’1’) then result := result + num; end if; num := num * 2; end loop; return result; end sv2i; function sb2i (sv: std_logic_vector) return integer is variable result, num: integer; begin result := 0; num := 1; for i in 0 to sv’length-l loop if (sv(i) /= ’0’) and (sv(i) /= ’1’) then return -1; elsif (sv(i) = ’1’) then result := result + num; end if; num := num * 2; end loop; if result > 127 then result:=result-256; end if; return result; end sv2i; function i2sv (integ: integer) return std_logic_vector is variable result: std_logic_vector(7 downto 0); variable num: integer; begin num := integ; for i in 0 to 7 loop if num mod 2 = 0 then result(i) := ’0’; else result(i) := ’1’; end if; num := num / 2; 108 end loop; return result; end i23v; -- Convert from vd,vq to va,vb,vc procedure conv2to3 (Vd,Vq: in std_logic_vector(7 downto O); vra,vrb,vrc: out integer) is variable Vdi,ti: integer; begin Vdi := sB2i(Vd); ti := sB2i(Vq); vra := Vdi; vrb := -(Vdi/2)+((86*ti)/100); vrc °= -(Vdi/2)-((86*ti)/100); end conv2t03; -- Triangular generator procedure tri_wave(triang, inc: variable t1,i1 : integer; BEGIN IF triang >= 227 THEN 11 := -1; ELSIF triang <= 27 THEN ii := 1; else il := inc; END IF; t1 := triang + i1; tri := t1; incre := il; END tri_wave; in integer; tri,incre: out integer) is -- compare vref with triangular wave procedure PWM(Var,Vbr,Vcr,triang: in integer; signal swa,swb,swc: out std_logic) is begin IF Var > triang THEN swa <= ’1’; ELSE swa <= ’0’; END IF; IF Vbr > triang THEN swb <= ’1’; ELSE swb <= ’0’; 109 END IF; IF Vcr > triang THEN swc <= ’1’; ELSE swc <= ’0’; END IF; end PWM; procedure minorm(Var,Vbr,Vcr: in integer; Mi,Norm,0ffset: out integer) is variable v1,v2,v3,Mit: integer; variable flag: bit:=1; begin if Var < Vbr then v1:=Var; v2:=Vbr; else v2:= Var; v1:= Vbr; end if; if Vcr < v1 then v3:= v2; v2:= v1; v1:= Vcr; elsif Vcr < v2 then v3:= v2; v2:= Vcr; else v3:=Vcr; end if; if v2>0 then v1 := v3; end if; Mit:=abs(83*v2+115*v1)/100; if Mit < 100 then Mi := ; Norm := 100; else Norm:=(((32*(127-Mit))/27)*100)/Mit; Mi := ((Mit-100)*100)/27; end if; 0ffset:=0; end minorm; 110 procedure mixer(Var,Vbr,Vcr,Mi,Norm,0ffset:in integer; Vao,Vbo, Vco:out integer) is variable Va,Vb,Vc,Mit: integer; begin Va:=Var+0ffset; Vb:=Vbr+0ffset; Vc:=Vcr+0ffset; if Mi /= 0 then Mit:=Mi; if Va > 0 then Va:=(Norm*Va)/32+Mit; elsif Va < 0 then Va:=(Norm*Va)/32-Mit; else Va:=0; end if; if Vb > 0 then Vb:=(Norm*Vb)/32+Mit; elsif Vb < 0 then Vb:=(Norm*Vb)/32-Mit; else Vb:=0; end if; if Vc > 0 then Vc:=(Norm*Vc)/32+Mit; elsif Vc < 0 then Vc:=(Norm*Vc)/32-Mit; else Vc:=0; end if; end if; Vao:=Va+127; Vbo:=Vb+127; Vco:=Vc+127; end mixer; procedure minorm2(Var,Vbr,Vcr: in integer; Mi,Norm,0ffset: out integer) is variable v1,v2,v3,Mit: integer; variable flag: bit:=1; begin 111 if Var < Vbr then v1:=Var; v2:=Vbr; else v2:= Var; v1:= Vbr; end if; if Vcr < v1 then v3:= v2; v2:= v1; v1:= Vcr; elsif Vcr < v2 then v3:= v2; v2:= Vcr; else v3:=Vcr; end if; if v2>0 then v1 := v3; end if; Mit:=abs(83*v2+115*v1)/100; if Mit < 116 then Mi := 0; else Norm:=(((32*(127-Mit))/12)*115)/Mit; Mi := ((Mit-115)*100)/12; end if; 0ffset:=v2/2; end minorm2; procedure minorm3 (Var,Vbr,Vcr: in integer; Mil,Norm1,Mi2,Norm2,0ffset: out integer) is variable v1,v2,v3,Mit: integer; variable flag: bit:=1; begin if Var < Vbr then v1:=Var; v2:=Vbr; else 112 v2:= Var; v1:= Vbr; end if; if Vcr < v1 then v3:= v2; v2:= v1; v1:= Vcr; elsif Vcr < v2 then v3:= v2; v2:= Vcr; else v3:=Vcr; end if; if v2>0 then v1 := v3; end if; Mit:=abs(83*v2+115*v1)/100; 116 then 0; 9 if Mit Mi1 : Mi2 := Norm1 : 32; Norm2 : 32; elsif Mit < 122 then Norm1:=(((32*(121-Mit))/6)*115)/Mit; Mil := ((Mit-115)*128)/6; Mi2 :=0; Norm2 := 32; else Norm1:=0; Mi1 : 128; Mi2 :=((Mit-121)*100)/6; Norm2 := (32*(127-Mit))/6; end if; IIA IIO 0ffset:=v2/2; end minorm3; procedure mixer3(Var,Vbr,Vcr,Mi1,Norm1,M12,Norm2,0ffset:in integer; Vao,Vbo,Vco:out integer) is 113 variable Va,Vb,Vc: integer; variable tra,trb,trc: integer; begin Va:=Var+0ffset; Vb:=Vbr+0ffset; Vc:=Vcr+0ffset; if Mi1 /= 0 then tra:=2*Va; if tra > 100 then tra:=100; elsif tra < —100 then tra:=-100; end if; Va:=(Norm1*Va)/32+(Mi1*tra)/128; if Va > 0 then Va:=(Norm2*Va)/32+Mi2; elsif Va < 0 then Va:=(Norm2*Va)/32-Mi2; end if; trb:=2*Vb; if trb > 100 then trb:=100; elsif trb < ~100 then trb:=-100; end if; Vb:=(Norm1*Vb)/32+(Mi1*trb)/128; if Vb > 0 then Vb:=(Norm2*Vb)/32+Mi2; elsif Vb < 0 then Vb:=(Norm2*Vb)/32-Mi2; end if; trc:=2*Vc; if trc > 100 then trc:=100; elsif trc < -100 then trc:=-100; end if; Vc:=(Norm1*Vc)/32+(Mi1*trc)/128; if Vc > 0 then Vc:=(Norm2*Vc)/32+Mi2; elsif Vc < 0 then Vc:=(Norm2*Vc)/32-Mi2; 114 -- Trapezoidal Generation -- First transformation -- second transformation -- Trapezoidal Generation -- First transformation -- second transformation -- Trapezoidal Generation -- First transformation -- second transformation end if; end if; Vao:=Va+127; Vbo:=Vb+127; Vco:=Vc+127; end mixer3; end AD-pack; 115 APPENDIX B VHDL code for test bench -- test ADpackage -- Andres Diaz Ju1,9,2000 library ieee; use ieee.std_logic_1164.all; use std.textio.all; use ieee.std_logic_arith all; use work.AD_pack.all; ENTITY testchip IS END testchip; ARCHITECTURE testchip_0 0F testchip IS COMPONENT pwmchip IS PORT (Vd,Vq: in std_logic_vector(7 downto O); swa,swb,swc: out std_logic); END COMPONENT; SIGNAL vdg,vqg: std_logic_vector(7 DOWNTO 0); SIGNAL ta,tb,tc: std_logic; SIGNAL FLAG: BIT ;=O; BEGIN uut: pwmchip port map (Vd => vdg, Vq => vqg, swa => ta, swb => tb, swc => tc); PROCESS VARIABLE v1,v2zstd_logic_vector(7 DOWNTO 0); VARIABLE vdi,vqi:INTEGER; VARIABLE BUFleine; FILE dataint: text OPEN READ_MODE IS "vdvq3.dat"; BEGIN 116 READLINE(dataint,buff); READ(buff,vdi); v1:=i2sv(vdi); -- convert integer to binary vector vdg <= v1; READ(buff,vqi); v2:=i2sv(vqi); -- convert integer to binary vector vqg <= v2; WAIT FOR 100 US; END PROCESS; END testchip_0; 117 BIBLIOGRAPHY 118 BIBLIOGRAPHY [1] A. R. Balhshai, G. Joos, and H. Jin. Incorporating the overmodulation range in space vector pattern generators using a classification algorithm. IEEE Transac- tions on Power Electronics, 13:1007~1013, 1995. [2] V. Blasco. Analysis of a hybrid pwm based on modified space-vector and triangle- comparison methods. IEEE Transactions on Industrial Applications, 33(3):756- 764, May/June 1997. [3] D. W. Cheng, J. S. King, and S. K. Sul. Unified voltage modulation technique for real-time three-phase power conversion. IEEE Transactions on Industrial Applications, 34(2):374-380, March/April 1997. [4] A. Diaz and E. Strangas. New wide range overmodulation method. IEEE Applied Power Electronics Conference, pages 1276—1280, Febuary 2000. [5] J. Holtz, Wolfang Lotzkat, and A. M. Khambadkone. On continuous control of pwm inverters in the overmodulation range including the six-step mode. IEEE Transactions on Power Electronics, 8(4), October 1993. [6] J. A. Houldsworth and D. A. Grant. The use of harmonic distortion to increase the output voltage of a three-phase pwm inverter. IEEE Transactions on Indus- trial Applications, vol. IA-20(2):1124—1127, Sept/Oct 1984. [7] V. Kaura. A new method to linearize any triangle comparison based pwm by reshaping the modulation command. IEEE Industrial Application Meeting, 33(5):]254—1256, May 1996. [8] V. Kaura and Blasko V. A new method to extend linearity of a sinusoidal pwm in the overmodulation region. IEEE Transactions on Industrial Applications, 32(5), Sep./Oct. 1996. [9] R. J. Kerman, T.M Rowan, D.Leggate, and B. J. Seibel. Control of pwm volt- age inverters in the pulse dropping region. IEEE Transactions on Industrial Electronics, 43(1):132—141, 1995. 119 [10] D. C. Lee and G. M. Lee. A novel overmodulation technique for space vector pwm inverters. IEEE Transactions on Power Electronics, 13:1014—1019, Nov 1998. 120