motor

所属分类:DSP编程
开发工具:C/C++
文件大小:5432KB
下载次数:29
上传日期:2010-10-20 18:56:33
上 传 者2693944
说明:  TMS320F2812的电机程序,已经经过测试运行。
(TMS320F2812 motor program has been tested to run.)

文件列表:
motor\~$总体框图.doc (162, 2011-07-19)
motor\~WRL0001.tmp (38400, 2011-07-20)
motor\dspbios_flash\my_sorce\ISR.c (6359, 2010-07-29)
motor\dspbios_flash\my_sorce\PRD.c (1515, 2010-07-29)
motor\dspbios_flash\my_sorce\function.c (4592, 2010-07-29)
motor\dspbios_flash\my_sorce\initial.c (9464, 2010-07-29)
motor\dspbios_flash\my_sorce\function.asm (77595, 2010-08-02)
motor\dspbios_flash\my_sorce\initial.asm (282153, 2010-08-02)
motor\dspbios_flash\my_sorce\ISR.asm (211550, 2010-08-02)
motor\dspbios_flash\my_sorce\PRD.asm (48626, 2010-08-02)
motor\dspbios_flash\my_sorce\main.c (3892, 2010-08-02)
motor\dspbios_flash\my_sorce\main.asm (41663, 2010-09-20)
motor\dspbios_flash\include\ADCcalibrationDriver.h (5449, 2010-07-29)
motor\dspbios_flash\include\Angle.h (2174, 2010-07-29)
motor\dspbios_flash\include\Capcfg.h (936, 2010-07-29)
motor\dspbios_flash\include\Capturecfg.h (679, 2010-07-29)
motor\dspbios_flash\include\DSP281x_Adc.h (8482, 2010-07-29)
motor\dspbios_flash\include\DSP281x_CpuTimers.h (5804, 2010-07-29)
motor\dspbios_flash\include\DSP281x_DefaultIsr.h (4792, 2010-07-29)
motor\dspbios_flash\include\DSP281x_DevEmu.h (3584, 2010-07-29)
motor\dspbios_flash\include\DSP281x_Device.h (3820, 2010-07-29)
motor\dspbios_flash\include\DSP281x_ECan.h (46005, 2010-07-29)
motor\dspbios_flash\include\DSP281x_Ev.h (23575, 2010-07-29)
motor\dspbios_flash\include\DSP281x_Examples.h (3244, 2010-07-29)
motor\dspbios_flash\include\DSP281x_GlobalPrototypes.h (2508, 2010-07-29)
motor\dspbios_flash\include\DSP281x_Gpio.h (29751, 2010-07-29)
motor\dspbios_flash\include\DSP281x_Mcbsp.h (34837, 2010-07-29)
motor\dspbios_flash\include\DSP281x_PieCtrl.h (5887, 2010-07-29)
motor\dspbios_flash\include\DSP281x_PieVect.h (6384, 2010-07-29)
motor\dspbios_flash\include\DSP281x_SWPrioritizedIsrLevels.h (146853, 2010-07-29)
motor\dspbios_flash\include\DSP281x_Sci.h (8105, 2010-07-29)
motor\dspbios_flash\include\DSP281x_Spi.h (6145, 2010-07-29)
motor\dspbios_flash\include\DSP281x_SysCtrl.h (11913, 2010-07-29)
motor\dspbios_flash\include\DSP281x_XIntrupt.h (2163, 2010-07-29)
motor\dspbios_flash\include\DSP281x_Xintf.h (3690, 2010-07-29)
motor\dspbios_flash\include\Functions.h (936, 2010-07-29)
motor\dspbios_flash\include\GlobalDefine.h (3035, 2010-07-29)
motor\dspbios_flash\include\IQmathLib.h (151653, 2010-07-29)
motor\dspbios_flash\include\ISR.h (620, 2010-07-29)
motor\dspbios_flash\include\PI_Control.h (558, 2010-07-29)
... ...

修改记录: 1、2009年10月10日,修改20us死区时间为50us,计数值由80改为203。 2、由于在用gel菜单修改拼波角度的时候,出现严重的畸形的情况。见相关的图。 2009年10月11日,修改程序每10s,拼波角度自动增加10度,增到160角度往下减。 3、2009年10月12日,由于之前在9.5ms(t4)处,开Capture的窗,不太合适,所以加入周期函数PRD为9.7ms,即97ticks。 4、2009年10月14日,利用IO口的电平的变化,去测试PRD周期函数。最后是往2001的地址写1或者0.。 5、capture4改为capture6,相关寄存器作出相应的改变。 6、加入算法,算出角度和档位 7、修正算法,将相应的档位进行调整,例如656V设置于660与1700拼波档。 8、增加AD采样,将AD采集的4~20mA信号计算成对应的电压信号,从而调节拼波角度。 9、2009年10月31日,将AD的触发改为Capture,设置标志位 10、将全局变量Voltage_Inc的值由int型变为float型,使电压分辨率更高; 11、2009年11月 2日,定义新的拼波角度AngleValue_Reader和档位标志位VBig_Reader,用于更新拼波参数 使一个周期波形的上半周期和下半周期对称; 12、2009年11月 3日,加入采样失败处理任务,假如采样失败,则进入Failure_TSK,停机! 13、2009年11月 3日,将ramfuncs对应到H0SARAM中,除去warning和可能出现的load program错误; 14、2009年11月 4日,将Timer2的角度窗口改为[28.8,168.3],减小共态导通的可能性; 15、2009年11月 5日,修正拼波档位,加入死区的影响; 16、2009年11月 5日,在void Timer1SWI(void)函数中加入对于斩波并且角度小于170.1°的情况下,系统不发导通信号; 17、2009年11月 5日,由于可能的计算角度失败,在Angle_Alg.c角度判断部分中,加入:如果计算的角度值==0,则发170.1°; 18、2009年11月 5日,在Angle_Alg.c中将计算次数Find_Cnt增加为20,降低计算结果failure的可能性; 19、2009年11月 5日,将死区改为1.0ms,相应的大波和小波导通角度改变,详见程序内部注释; 20、2009年11月 6日,对设定电流判断,假如电流小于一个定值,那么认为计算出的电阻值误差较大,则电阻值继承上次的值。 21、2009年12月24日,加入AD校正程序,使采样精度更高; 22、2009年12月24日,修改functions文件中的代码顺序; 23、2009年12月24日,修改PI算法的积分系数,减小电流跟踪波动; 24、2009年12月24日,修改事件管理器捕获单元Capture6为Capture4,相应的初始化作出修改; 25、2010年01月13日,添加采样值冒泡法排序,将采样的10个值的最大值和最小值剔除; 26、2010年01月19日,添加4档变压器电压值,为做实验做准备;版本:3.2 27、2010年01月21日,在Angle.h头文件中的变量名称,用于电压档位设置和电压值设置; 修改头文件 1、ADCcalibrationDriver.h //----------------------------------------------------------------- // User needs to select refernce channels and ideal values: // // For example: A6 = RefHigh = 2.5V ( 2.5*4095/3.0 = 3413 ideal count) // A7 = RefLow = 1.0V (1.0*4095/3.0 = 1365 ideal count) //说明:REF_HIGH_CH对应为:参考电压高电压,需修改为校正电压对应的结果寄存器的 // 位置 // REF_LOW_CH对应为:参考电压低电压,需修改为校正电压对应的结果寄存器的 // 位置 #define REF_HIGH_CH A7 #define REF_LOW_CH A6 #define REF_HIGH_IDEAL_COUNT 3413 #define REF_LOW_IDEAL_COUNT 1365 //----------------------------------------------------------------- 2、Angle.h //----------------------------------------------------------------- //修改档位的判定,根据变压器抽头电压,修正为对应的加入死区后的电压有效值 //Matlab代码为: syms x; sqrt(int(sin(x)*sin(x),(28/180)*pi,pi))*sqrt(2/pi)*250 syms x; sqrt(2/pi)*sqrt(660*660*int(sin(x)*sin(x),(28/180)*pi,(90/180)*pi) +1700*1700*int(sin(x)*sin(x),(90/180)*pi,(180/180)*pi)) 28――死区角度 90――拼波角度 660――小电压值 1700――大电压值 大波导通时间的范围[1.15ms,9.5ms] 大波导通角度的范围[20.7°,171°] 小波导通时间的范围[1.05ms,9.6ms] 小波导通角度的范围[18.9°,172.8°] //#define V1700 1679 //#define V660 654 //#define V340 336 //#define V250 247 //#define V40 40 //#define V0 0.66 //#define V20 19.96 //------------------上下环路---------------------- //V0――为10V电压斩波时,9.6ms死区的小电压值 //#define V77 76.6541 ------------ 44.8676 //#define V45 44.8032 ------------ 29.9034 //#define V30 29.8573 ------------ 9.9955 //#define V10 9.9511 ------------ 0.2861-----斩波 //#define V0 0.2861 //------------------中间环路---------------------- //V0――为4V电压斩波时,9.6ms死区的小电压值 //#define V20 19.9136 ------------ 13.9537 //#define V14 13.93*** ------------ 9.9666 //#define V10 9.9530 ------------ 3.9937 //#define V4 3.***05 ------------ 0.1144-----斩波 //#define V0 0.1144 3、PI_Control.h //--------------------------------------------------------------- //PI算法的限值 #define P_LIMIT 0.05 //the negative and positive limit(5%) of V_set //--------------------------------------------------------------- 4、variant.h //主要包含时间量的设定,已经自己定义的结构体。可修改具体的固定的 //时间量 5、DSP281x_Adc.c //修改ADC采样的一些参数,包括:采样方式,采样通道 6、functions.c //修改变送器换算关系 7、

近期下载者

相关文件


收藏者