目录
目录......................................................................................................i
1 FOC 原理..........................................................................................1
1.1 FOC 控制流程......................................................................................................................1
1.2 坐标变换...............................................................................................................................2
1.3 单电阻电流采样...................................................................................................................5
2 程序结构............................................................................................7
2.1 大循环...................................................................................................................................7
2.1.1 电机状态控制............................................................................................................7
2.2.1 串口数据处理..........................................................................................................10
2.2 定时器 1 中断.....................................................................................................................10
2.2.1 速度捕获溢出中断..................................................................................................10
2.2.2 位置检测中断..........................................................................................................11
2.3 定时器 0 中断.....................................................................................................................17
2.4 定时器 4 中断.....................................................................................................................17
2.4.1 数据采集..................................................................................................................18
2.4.2 开关机控制..............................................................................................................18
2.4.3 故障检测与保护......................................................................................................18
(1) 通信故障....................................................................................................................18
(2) 过欠压保护.................................................................................................................19
(3) Hall 传感器故障保护.................................................................................................19
(4) 过零丢失.....................................................................................................................19
(5) 堵转保护.....................................................................................................................19
(6) 过温保护.....................................................................................................................20
2.4.4 故障显示..................................................................................................................20
2.4.5 速度闭环控制..........................................................................................................20
2.4 串口中断.............................................................................................................................21
2.5 比较器中断.........................................................................................................................21
i