更新了FOC控制器中的速度环和角度环PID参数以改善控制响应,并微调电流环参数提升稳定性。 feat(Filter): 改进卡尔曼滤波器初始化逻辑及速度计算方式 引入系统运行时间计数器,修正编码器角度和速度卡尔曼滤波器的初始化流程,并基于实际时间间隔优化角速度估算精度。 refactor(Filter): 移动成员变量声明顺序 调整`EncoderAngleKalman`类中`last_angle`成员变量的访问权限和声明位置,增强封装性和可读性。 feat(Flash): 新增Flash EEPROM功能支持 添加FlashEEPROM类及相关头文件,支持电机角度等关键数据掉电保存,并在CAN通信复位时进行角度存储操作。 refactor(Timer): 优化定时器配置和中断优先级设置 删除冗余的TIMER3定义,修改TIMER1中断服务函数可见性,并调整NVIC子优先级分配,确保中断响应合理有序。 feat(AngleSensor): 完善角度传感器初始化与角度设定接口 重构角度传感器初始化方法并新增角度设置函数,支持从Flash读取初始角度值并与减速比结合应用。 feat(Health): 实现母线电压监测与保护策略 新增电源管理函数,在母线电压异常下降时自动关闭电机输出,防止因供电不足导致设备损坏。
81 lines
2.3 KiB
YAML
81 lines
2.3 KiB
YAML
project:
|
|
groups:
|
|
- group: Source Files
|
|
files:
|
|
- file: main.h
|
|
- file: main.cpp
|
|
- group: sys
|
|
files:
|
|
- file: sys/systick.cpp
|
|
- file: sys/systick.h
|
|
- file: sys/initial.cpp
|
|
- file: sys/initial.h
|
|
- file: sys/health.h
|
|
- file: sys/health.cpp
|
|
- file: sys/flash.h
|
|
- file: sys/flash.cpp
|
|
- group: device
|
|
files:
|
|
- file: device/Can.cpp
|
|
- file: device/Can.h
|
|
- file: device/ang_sensor.cpp
|
|
- file: device/ang_sensor.h
|
|
- file: device/ADC.cpp
|
|
- file: device/adc.h
|
|
- file: device/Timer.cpp
|
|
- file: device/Timer.h
|
|
- file: device/test.cpp
|
|
- file: device/motor.cpp
|
|
- file: device/motor.h
|
|
- group: Algorithm
|
|
files:
|
|
- file: Algorithm/Filter.cpp
|
|
- file: Algorithm/Filter.h
|
|
- file: Algorithm/DengFOC.cpp
|
|
- file: Algorithm/DengFOC.h
|
|
- file: Algorithm/pid.cpp
|
|
- file: pid.h
|
|
components:
|
|
- component: ARM::CMSIS:CORE
|
|
- component: Device:Startup
|
|
- component: Device:GD32C10x_StdPeripherals:ADC
|
|
- component: Device:GD32C10x_StdPeripherals:CAN
|
|
- component: Device:GD32C10x_StdPeripherals:DMA
|
|
- component: Device:GD32C10x_StdPeripherals:EXTI
|
|
- component: Device:GD32C10x_StdPeripherals:FMC
|
|
- component: Device:GD32C10x_StdPeripherals:GPIO
|
|
- component: Device:GD32C10x_StdPeripherals:MISC
|
|
- component: Device:GD32C10x_StdPeripherals:PMU
|
|
- component: Device:GD32C10x_StdPeripherals:RCU
|
|
- component: Device:GD32C10x_StdPeripherals:SPI_I2S
|
|
- component: Device:GD32C10x_StdPeripherals:TIMER
|
|
- component: Device:GD32C10x_StdPeripherals:USART
|
|
- component: Device:GD32C10x_libopt
|
|
- component: Device:GD32C10x_StdPeripherals:DBG
|
|
- component: Device:EVAL:GD32C10x
|
|
- component: Device:GD32C10x_StdPeripherals:FWDGT
|
|
- component: Device:GD32C10x_StdPeripherals:WWDGT
|
|
output:
|
|
type:
|
|
- elf
|
|
- hex
|
|
- map
|
|
packs:
|
|
- pack: ARM::CMSIS
|
|
- pack: GigaDevice::GD32C10x_DFP
|
|
misc:
|
|
- for-compiler: AC6
|
|
C-CPP:
|
|
- -fshort-enums
|
|
- -fshort-wchar
|
|
- -D__MICROLIB
|
|
- -Wno-register
|
|
C:
|
|
- -D__packed=packed
|
|
ASM:
|
|
- -D__packed=packed
|
|
- -D__MICROLIB
|
|
Link:
|
|
- --library_type=microlib
|
|
- --entry=Reset_Handler
|