MTPA 控制:最大转矩电流比
系列:电机控制系列 - 第 14 篇 难度:⭐⭐⭐
前言
问题:给定转矩,如何用最小电流?
MTPA:最大转矩电流比(Maximum Torque Per Ampere)
好处:
- ✅ 最小铜损耗(I²R)
- ✅ 最高效率
- ✅ 最低发热
一、MTPA 原理
1.1 转矩方程
Te = (3/2)·P·[ψf·iq + (Ld - Lq)·id·iq]
└─────┬─────┘ └──────────┬──────────┘
永磁转矩 磁阻转矩SPM(Ld = Lq):Te ∝ iq(简单)
IPM(Ld < Lq):磁阻转矩可利用!
1.2 MTPA 条件
拉格朗日乘数法:
目标:max(Te)
约束:id² + iq² = Is²
解得:
id = (ψf / 2(Lq - Ld)) · (1 - √(1 + 4(Lq - Ld)²·iq² / ψf²))简化公式:
void MTPA_Calculate(float Te_ref, float *id_ref, float *iq_ref,
Motor_Params_t *motor) {
// 迭代求解(或查表)
float psi_f = motor->Psi_f;
float Ld = motor->Ld;
float Lq = motor->Lq;
// 初始猜测
float iq = Te_ref / (1.5f * motor->P * psi_f);
// 迭代 5 次
for (int i = 0; i < 5; i++) {
float a = psi_f / (2.0f * (Lq - Ld));
float b = 4.0f * (Lq - Ld) * (Lq - Ld) * iq * iq / (psi_f * psi_f);
*id_ref = a * (1.0f - sqrtf(1.0f + b));
// 更新 iq
float Te_calc = 1.5f * motor->P * (psi_f * iq + (Ld - Lq) * (*id_ref) * iq);
iq = iq * Te_ref / Te_calc;
}
*iq_ref = iq;
}二、查表法(推荐)
// MTPA 查找表(离线生成)
float mtpa_id_table[100];
float mtpa_iq_table[100];
/**
* @brief MTPA 查表
*/
void MTPA_Lookup(float Te_ref, float *id_ref, float *iq_ref) {
// 二分查找
int index = Binary_Search(mtpa_Te_table, Te_ref, 100);
// 线性插值
*id_ref = Linear_Interpolate(mtpa_id_table, index, Te_ref);
*iq_ref = Linear_Interpolate(mtpa_iq_table, index, Te_ref);
}三、MTPA + 弱磁融合
void Current_Reference_Update(FOC_t *foc) {
// 1. MTPA 计算
MTPA_Lookup(foc->Te_ref, &foc->id_ref, &foc->iq_ref);
// 2. 弱磁调整
Flux_Weakening_Update(foc);
// 3. 电流限幅
float i_mag = sqrtf(foc->id_ref * foc->id_ref + foc->iq_ref * foc->iq_ref);
if (i_mag > foc->motor.i_max) {
float scale = foc->motor.i_max / i_mag;
foc->id_ref *= scale;
foc->iq_ref *= scale;
}
}四、总结
MTPA 核心要点:
- 利用磁阻转矩(IPM)
- 给定转矩 → 最小电流
- 查表法效率高
下一篇:DTC 直接转矩控制