基于DSP和CPLD的电力谐波检测系统的研究与设计
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
由于电网中非线性器件和设备的广泛使用,电力系统中产生了大量的高次谐波,本文主要研究并设计实现电力系统中电力谐波参数的实时检测。确切掌握电网中谐波的运行状况,有利于防止谐波的危害、维护电网的安全运行。
     本文首先介绍了当前电力谐波参数检测的快速傅立叶变换方法,FFT算法技术比较成熟、易于实现,但算法本身很难做到同步采样和整周期截断,由此会造成频谱泄漏和栅栏效应,影响谐波检测结果。论文引入加窗插值FFT算法进行修正,对加窗插值FFT算法进行了较为深入的分析,并给出较详细的数学推导计算过程。
     其次,较详细介绍了电力谐波检测系统的DSP+CPLD硬件平台,通过采用锁相环实现硬件同步采样,保证严格同步和减小频谱泄漏;采用TMS320C6713B浮点DSP实现加窗插值FFT算法的运算,实时检测电力谐波的参数;采用CoolRunner-II系列XC2C512 CPLD控制系统的外围器件。
     再次,简要介绍系统前端信号调理、数据采集和外围模块硬件设计部分,以及CPLD逻辑控制部分,包括PLL锁相跟踪、ADC数据采集、本地温度监控、LCD液晶显示,以及CPLD与DSP的外部存储器接口(EMIF)数据通信等模块。重点介绍了DSP系统软件设计部分,包括DSP芯片配置、DSP外设初始化、增强型直接存储器访问(EDMA)、乒乓缓冲传输等底层软件设计,以及算法的设计实现。DSP软件开发采用芯片支持库CSL配置外设、方便代码移植,采用DSP/BIOS实时多任务操作系统管理DSP的线程优先级调度,包括EDMA硬件中断HWI、信号处理算法任务TSK等,它们之间通过信号量保持线程间的同步和通信。
     最后使用Matlab仿真分析了矩形窗(信号截断)和非整周期采样对FFT算法的影响,并分析比较窗函数和加窗正弦信号的频谱,表明Hanning窗或Blackman窗、整周期采样可以有效地减小频谱泄漏。随后在硬件平台上验证了加窗插值FFT算法的正确性和有效性,表明加Blackman窗的FFT插值算法在非整周期采样时仍然具有较高的精度,幅值误差为e-4数量级,相位误差为e-3数量级。仿真及硬件调试结果表明,算法的精度和实时性都能很好地满足电力系统谐波分析和谐波检测的实际要求。
Because of large-scale employment of non-linear devices and equipments, power system generates a lot of harmonics. The main purpose of the paper is to research, design and realize electric harmonic parameter real-time measurement of power system. Mastering harmonic state accurately is in favor of preventing harmonics harming power grid, maintaining power grid safe running state.
     At first, Fast Fourier Transform method is introduced for current electric harmonic parameter measurement because it is mature and realizable. However it is difficult to perform synchronized sampling and integral period truncation, and the results will be disturbed by spectrum leakage and fence effect caused consequently. So it is necessary to correct FFT algorithm by adding window and introducing interpolation algorithm. The paper analyzes the interpolating windowed FFT algorithm in depth, and gives accurate mathematic deduced process and calculated formula.
     Next, DSP & CPLD hardware platform is presented for the electric harmonic measurement system, which employs PLL to realize hardware synchronized sampling to ensure accurate synchronized sampling and diminish spectrum leakage, employs TMS320C6713B floating-point DSP to realize interpolating windowed FFT algorithm and measure harmonic parameters, and employs CoolRunner-II XC2C512 CPLD to control peripheral devices logically.
     Then, the schematic diagram about front-end signal conditioning, data acquisition and peripheral module is introduced. Logic control of CPLD includes PLL frequency trace module, ADC data acquisition module, thermometer I2C bus module, LCD display module, and CPLD communicating with DSP external memory interface (EMIF) module. DSP system software design is emphasized, which includes DSP chip configuration, peripheral initialization, enhanced direct memory access (EDMA) ping-pong buffering transmission. DSP software development employs Chip Support Library (CSL) to configure on-chip peripherals, and employs real-time multi-task operating system DSP/BIOS to manage and schedule DSP threads, including EDMA hardware interrupt (HWI) and signal processing algorithm task (TSK) maintaining synchronization and communication between threads by semaphore. The hardware platform ensures data acquired by ADC flow into DSP internal memory through CPLD.
     At last, the paper introduces, simulates and analyzes rectangle window’s (signal is truncated) and non-integer-period sampling’s disturbance to FFT algorithm, compares and analyzes window function’s and windowed sine signal’s spectrum using Matlab. The results show adding Hanning window or Blackman window, integer-period sampling can diminish spectrum leakage effectively. Finally, interpolating windowed FFT algorithm is realized on DSP & CPLD hardware platform. And it shows adding Blackman window and interpolating FFT algorithm has high precision even non-integer-period sampling, and amplitude error is e-4 magnitude and phase error is e-3 magnitude. The simulation and hardware debug show that harmonic measurement theory in this paper is correct; hardware platform, system bottom software and algorithm design is also correct. And it meets the requirement of power system harmonic analysis for high-precision and real-time situation. The whole system has a valuable application for power industry.
引文
[1]瓦基莱[奥地利].电力系统谐波.北京:机械工业出版社,2003
    [2]李圣清,朱英浩,周有庆,何立志.电网谐波检测方法的综述.高电压技术,2004年3月
    [3] Sutherland Peter E. Harmonic Measurements in Industrial Power Systems [J]. IEEE Trans on Industry Applications, 1995, IA31(1)
    [4]邵明,钟彦儒,余建明.基于小波变换的谐波电流的实时检测.电力电子技术,2000年34(1)
    [5]杨桦,任震,唐卓尧.基于小波变换检测谐波的新方法.电力系统自动化,1997年10月
    [6]王群,吴宁,王兆安.一种基于人工神经网络的电力谐波测量方法.电力系统自动化,1998年11月
    [7]柴旭峥,文习山,关根志,彭宁云.一种高精度的电力系统谐波分析算法.中国电机工程学报,2003年9月
    [8]张伏生,耿中行,葛耀中.电力系统谐波分析的高精度FFT算法.中国电机工程学报,1999年3月
    [9]潘文,钱俞寿,周鹗.基于加窗插值FFT的电力谐波测量理论(I)窗函数研究.电工技术学报,1994年2月
    [10] Jain V K, Collins W L, Davis D C. High-accuracy analog measurements via interpolated FFT. IEEE Trans on Instrumentation and Measurement, 1979, IM28(2)
    [11] Grandke T. Interpolation algorithms for discrete fourier transforms of weighted signals. IEEE Trans on Instrumentation and Measurement, 1983, IM32(2)
    [12] Andria G, Savino M, Trotta A. Windows and interpolation algorithms to improve electrical measurement accuracy. IEEE Trans on Instrumentation and Measurement, 1989, IM38(4)
    [13]李红斌,刘延冰.光学电流互感器温度补偿方法.仪表技术与传感器,2004年第4期
    [14]黄纯,何怡刚,江亚群,彭建春.交流采样同步方法的分析与改进.中国电机工程学报,2002年9月
    [15]毛晓波,赵文丽,黄俊杰.交流采样技术及其DSP实现方法.微计算机信息,2005年2月
    [16]王义辉,陆丰勤,陈庆伟.现代电能质量监测装置的数据采集系统设计.淮阴工学院学报,2006年10月
    [17]江道灼,马进,章鑫杰.锁相环在电力系统现场测控装置中的应用.继电器,2000年8月
    [18]曹孝宁,吴华仁,龙可徽,李晓慧.锁相环同步采样技术在电网数据采集中的应用.电力自动化设备,1996年11月
    [19]郑毅,杜坚,喻伟林.基于锁相环的频率变化信号的测量方法.仪器仪表与分析监测,2003年第1期
    [20] A.V.奥本海姆,R.W.谢弗等[美国].刘树棠,黄建国译.离散时间信号处理,第2版.西安:西安交通大学出版社,2001年9月
    [21]陈怀琛.数字信号处理教程——MATLAB释义与实现.北京:电子工业出版社,2005年8月
    [22] Andrew Bateman,Iain Paterson-Stephens[英国].陈健,陈伟等译.DSP算法、应用与设计.北京:机械工业出版社,2003年7月
    [23]汪安民,程昱.DSP应用开发实用子程序.北京:人民邮电出版社,2005年9月
    [24]陈亮,杨吉斌,张雄伟.信号处理算法的实时DSP实现.北京:电子工业出版社,2008年2月
    [25]庞浩,李东霞,俎云霄,王赞基.应用FFT进行电力系统谐波分析的改进型算法.中国电机工程学报,2003年6月
    [26] Ignacio Santamaria-Caballero, Carlos J. Pantaleon-Prieto, Jesus Ibanez-Diaz. Improved procedures for estimating amplitudes and phases of harmonics with application to vibration analysis[J]. IEEE Transactions on Instrumentation and Measurement, 1998, IM47(1)
    [27] Roberto Marcelo Hidalgo, Juana Graciela Fernandez, Raul Ruben Rivera. A simple adjustable window algorithm to improve FFT measurements[J]. IEEE Transactions on Instrumentation and Measurement, 2002, IM51(1)
    [28]董在望.通信电路原理(第二版).北京:高等教育出版社,2002年8月
    [29] On Semiconductor. MC14046B Phase Locked Loop, Rev.10. August 2005
    [30] Texas Instruments Incorporated. ADS8364 Analog-To-Digital Converter. August 2006
    [31] Dallas-Maxim Semiconductor. DS1631/DS1631A/DS1731 High-Precision Digital Thermometer and Thermostat
    [32]肇庆金鹏电子有限公司.OCM12864系列图形点阵液晶显示模块使用说明书
    [33]苏涛,何学辉,吕林夏.实时信号处理系统设计.西安:西安电子科技大学出版社,2006年5月
    [34] http://www.laogu.com/wz_789.htm
    [35]石英,李新新,姜宇柏.ISE应用与开发技巧.北京:机械工业出版社,2007年1月
    [36]王冠,黄熙,王鹰.Verilog HDL与数字电路设计.北京:机械工业出版社,2006年1月
    [37] Xilinx Incorporated. CoolRunner-II CPLD Family. DS090 (v3.0), March 8, 2007
    [38] Xilinx Incorporated. XC2C512 CoolRunner-II CPLD. DS096(v3.2), March 8, 2007
    [39]江思敏,刘畅.TMS320C6000 DSP应用开发教程.北京:机械工业出版社,2005年2月
    [40] Texas Instruments Incorporated. TMS320C6713B Floating-point Digital Signal Processor. SPRS294B, June 2006
    [41] Texas Instruments Incorporated. TMS320C621x/C671x DSP Two-Level Internal Memory Reference Guide. SPRU609B, June 2004
    [42] Texas Instruments Incorporated. TMS320C6000 DSP Cache User’s Guide. SPRU656A, May 2003
    [43] Texas Instruments Incorporated. TMS320C6000 DSP Enhanced Direct Memory Access (EDMA) Controller Reference Guide. SPRU234C, November 2006
    [44] Texas Instruments Incorporated. TMS320C6000 DSP External Memory Interface (EMIF) Reference Guide,SPRU266E, January 2008
    [45]彭启琮,管庆.DSP集成开发环境——CCS及DSP/BIOS的原理与应用.北京:电子工业出版社,2004年7月
    [46] Texas Instruments Incorporated. TMS320C6000 Code Composer Studio Tutorial. SPRU301C, February 2000
    [47] Texas Instruments Incorporated著.王军宁何迪马娟胡启龙等编译.TI DSP/BIOS用户手册与驱动开发.北京:清华大学出版社,2007年4月
    [48] Texas Instruments Incorporated. TMS320C6000 DSP/BIOS User’s Guide. SPRU303B, May 2000
    [49] Texas Instruments Incorporated. TMS320C6000 DSP/BIOS 5.31 Application Programming Interface (API) Reference Guide. SPRU403N, September 2006
    [50] Texas Instruments Incorporated. TMS320C6000 Chip Support Library API Reference Guide. SPRU401J, August 2004
    [51] Texas Instruments Incorporated. TMS320C6000 DSP Software-Programmable Phase-Locked Loop (PLL) Controller Reference Guide, SPRU233C, November 2006
    [52] Texas Instruments Incorporated. TMS320C67x/C67x+ DSP CPU and Instruction Set Reference Guide. SPRU733A, November 2006
    [53] Spectrum Digital Incorporated. TMS320C6713 DSK Technical Reference. Rev. A, May 2003
    [54] Texas Instruments Incorporated. TMS320C67x DSP Library Programmer’s Reference Guide. SPRU657B, March 2006
    [55] http://www.ti.com/
    [56] http://www.bdti.com/
    [57] http://www.xilinx.com/

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700