DSP单相逆变器光伏并网程序


本装置采用单相桥式DC-AC逆变电路结构,以TI公司的浮点数字信号控制器TMS320F28335 DSP为控制电路核心,采用规则采样法和DSP片内ePWM模块功能实现SPWM波。最大功率点跟踪(MPPT)采用了恒压跟踪法(CVT法)来实现,并用软件锁相环进行系统的同频、同相控制,控制灵活简单。采用DSP片内12位A/D对各模拟信号进行采集检测,简化了系统设计和成本。本装置具有良好的数字显示功能,采用CPLD自行设计驱动的4.3’’彩色液晶TFT LCD非常直观地完成了输出信号波形、频谱特性的在线实时显示,以及输入电压、电流、功率,输出电压、电流、功率,效率,频率,相位差,失真度参数的正确显示。本装置具有开机自检、输入电压欠压及输出过流保护,在过流、欠压故障排除后能自动恢复。
资源截图
代码片段和文件信息
// TI File $Revision: /main/5 $
// Checkin $Date: October 23 2007   13:34:09 $
//###########################################################################
//
// FILE: DSP2833x_Adc.c
//
// title: DSP2833x ADC Initialization & Support Functions.
//
//###########################################################################
// $TI Release: DSP2833x/DSP2823x C/C++ Header Files V1.31 $
// $Release Date: August 4 2009 $
//###########################################################################

#include “DSP2833x_Device.h“     // DSP2833x Headerfile Include File
#include “DSP2833x_Examples.h“   // DSP2833x Examples Include File

#define ADC_usDELAY  5000L

//---------------------------------------------------------------------------
// InitAdc:
//---------------------------------------------------------------------------
// This function initializes ADC to a known state.
//
void InitAdc(void)
{
    extern void DSP28x_usDelay(Uint32 Count);


    // *IMPORTANT*
// The ADC_cal function which  copies the ADC calibration values from TI reserved
// OTP into the ADCREFSEL and ADCOFFTRIM registers occurs automatically in the
// Boot ROM. If the boot ROM code is bypassed during the debug process the
// following function MUST be called for the ADC to function according
// to specification. The clocks to the ADC MUST be enabled before calling this
// function.
// See the device data manual and/or the ADC Reference
// Manual for more information.

    EALLOW;
SysCtrlRegs.PCLKCR0.bit.ADCENCLK = 1;
ADC_cal();
EDIS;




    // To powerup the ADC the ADCENCLK bit should be set first to enable
    // clocks followed by powering up the bandgap reference circuitry and ADC core.
    // Before the first conversion is performed a 5ms delay must be observed
// after power up to give all analog circuits time to power up and settle

    // Please note that for the delay function below to operate correctly the
// CPU_RATE define statement in the DSP2833x_Examples.h file must
// contain the correct CPU clock period in nanoseconds.

    AdcRegs.ADCTRL3.all = 0x00E0;  // Power up bandgap/reference/ADC circuits
    DELAY_US(ADC_usDELAY);         // Delay before converting ADC channels
}

//===========================================================================
// End of file.
//===========================================================================

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2010-06-01 14:12  源码
     目录           0  2010-06-01 14:12  源码DSP2833x_common
     目录           0  2016-09-22 14:33  源码DSP2833x_commoncmd
     文件        7139  2009-08-04 13:04  源码DSP2833x_commoncmd28332_RAM_lnk.cmd
     文件        7332  2009-08-04 13:04  源码DSP2833x_commoncmd28334_RAM_lnk.cmd
     文件        7326  2009-08-04 13:04  源码DSP2833x_commoncmd28335_RAM_lnk.cmd
     文件        8991  2009-08-04 13:04  源码DSP2833x_commoncmdF28332.cmd
     文件        9567  2009-08-04 13:04  源码DSP2833x_commoncmdF28334.cmd
     文件        9569  2010-01-14 17:58  源码DSP2833x_commoncmdF28335.cmd
     目录           0  2016-09-22 14:33  源码DSP2833x_commongel
     目录           0  2016-09-22 14:33  源码DSP2833x_commongelccsv4
     文件       21864  2009-06-12 14:02  源码DSP2833x_commongelccsv4f28232.gel
     文件       22358  2009-06-12 14:02  源码DSP2833x_commongelccsv4f28234.gel
     文件       22421  2009-06-12 14:02  源码DSP2833x_commongelccsv4f28235.gel
     文件       22014  2009-06-12 14:02  源码DSP2833x_commongelccsv4f28332.gel
     文件       22508  2009-06-12 14:02  源码DSP2833x_commongelccsv4f28334.gel
     文件       22555  2009-06-12 14:02  源码DSP2833x_commongelccsv4f28335.gel
     文件      115167  2009-06-12 14:05  源码DSP2833x_commongelf28232.gel
     文件      119748  2009-06-12 14:05  源码DSP2833x_commongelf28234.gel
     文件      119803  2009-06-12 14:05  源码DSP2833x_commongelf28235.gel
     文件      115881  2009-06-12 14:05  源码DSP2833x_commongelf28332.gel
     文件      120460  2009-06-12 14:05  源码DSP2833x_commongelf28334.gel
     文件      120515  2009-06-12 14:05  源码DSP2833x_commongelf28335.gel
     目录           0  2016-09-22 14:33  源码DSP2833x_commoninclude
     文件        6326  2009-08-04 13:04  源码DSP2833x_commonincludeDSP2833x_DefaultIsr.h
     文件        2004  2009-08-04 13:04  源码DSP2833x_commonincludeDSP2833x_Dma_defines.h
     文件        3999  2009-08-04 13:04  源码DSP2833x_commonincludeDSP2833x_EPwm_defines.h
     文件        5530  2009-08-04 13:04  源码DSP2833x_commonincludeDSP2833x_Examples.h
     文件        8431  2009-08-04 13:04  源码DSP2833x_commonincludeDSP2833x_GlobalPrototypes.h
     文件        4079  2009-08-04 13:04  源码DSP2833x_commonincludeDSP2833x_I2c_defines.h
     文件      145094  2009-08-04 13:04  源码DSP2833x_commonincludeDSP2833x_SWPrioritizedIsrLevels.h
............此处省略121个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)