【正文】
0 while phase control word is set as 180. When the enable signal is turned into low level, the first output value is the waveform data of address 180 in the ROM table. With each rising edge of system clock, the waveform data of address 180, 181, 182, 183 are sent out. The output values are respectively 76, 76, 77, 77.. Harmonic synthesis moduleHarmonic synthesis module implements the synthesis of fundamental wave, 3th harmonic, 5th harmonic and 7th harmonic. The 3th, 5th and 7th harmonic data are respectively multiplied by their proportion control words. Then the results of multiplication are added to the fundamental wave data. The realization of multiplication is the emphasis of the module. Because it is difficult to implement the multiplication of floatingpoint format on FPGA, harmonic proportion is divided into numerator and denominator. The numerator is defined as proportion control word while the denominator is 100. Firstly, harmonic data is multiplied by the proportion control word in the multiplier. Then, the product of multiplier is divided by 100 in the divider. Finally, the remainder is excluded and the quotient is preserved. Using Altera IP tools, the multiplier and the divider of harmonic synthesis module are realized. Block diagram of harmonic synthesis module is shown. Simulation result of harmonic synthesis module is. Control words are set before . Fundamental wave frequency is 50Hz, and its initial phase is 0o. The 3th harmonic frequency is 150Hz, initial phase is 45o and proportion is 50%. The 5th harmonic frequency is 250Hz, initial phase is 90o and proportion is 25%. The 7th harmonic frequency is 350Hz, initial phase is 135o and proportion is 17%. When enable signal is turned into low level, harmonic synthesis module begins to generate the harmonic synthesis data.5. Test resultsFigure 7. Twochannel sine waves (frequency is50Hz and phase difference is 180o)Figure 8. Twochannel sine waves (frequency is50Hz and phase difference is 120o)Figure 9. Harmonic synthesis waveformAfter the design of the system, the whole function is tested. shows twochannel sine waves whose frequency is 50Hz and phase difference is 180o. shows twochannel sine waves whose frequency is 50Hz and phase difference is 120o. shows the harmonic synthesis waveform, whose fundamental wave proportion is 100%, 3th harmonic proportion is 25%, and 5th harmonic proportion is 10%. Test waveforms indicate that the parameter adjustable harmonic signal generator fulfils the design requirements.6. ConclusionIn the detection field of power system, standard signal generators which can simulate the power harmonic are highly needed to calibrate the power detecting equipment. To solve this problem, a harmonic signal generator whose frequency,