# 概述

FOC主要模块包括：Clarke、Park、iPark、SVPWM等基础单元组成

# Carke变换

1、采集u、v、w三相电流；
2、采集u、v两相电流；

alpha = u;
beta = (u+2*v)/sqrt3;


2、采集u、w两相电流；

alpha = u;
beta = -(u+2*w)/sqrt3;


3、采集v、w两相电流；

u = alpha;
v = (beta*SQRT3-alpha)/2;
w = -u - v;


# Park变换

d = alpha * CosAngle + beta * SinAngle;
q = beta * CosAngle - beta * SinAngle;


# iPark变换

alpha =  d * CosAngle + q * SinAngle;
beta = d * CosAngle -  q * SinAngle;


# SVPWM

	int hTimePhA, hTimePhB, hTimePhC;
int X, Y, Z;
int sector;

int T = PWM_PERIOD;
int T_2 = T * 0.50f;
int T_4 = T * 0.25f;

int Ualpha	=  - T * Valpha * SQRT3;
int Ubeta	=  T * Vbeta;

X = Ubeta;
Y = ( Ubeta - Ualpha ) * 0.5f;
Z = ( Ubeta + Ualpha ) * 0.5f;

if ( Y < 0 ) {
if (Z < 0) {
sector = 5;
} else {
if (X > 0) {
sector = 3;
} else {
sector = 4;
}
}
} else {
if (Z < 0) {
if (X > 0) {
sector = 1;
} else {
sector = 6;
}
} else {
sector = 2;
}
}

switch (sector) {
case 1:
case 4:
hTimePhA = T_4 + ( ( T_2 + X - Z ) * 0.5f );
hTimePhB = hTimePhA + Z;
hTimePhC = hTimePhB - X;
break;

case 2:
case 5:
hTimePhA = T_4 + ( ( T_2 + Y - Z ) * 0.5f );
hTimePhB = hTimePhA + Z;
hTimePhC = hTimePhA - Y;
break;

case 3:
case 6:
hTimePhA = T_4 + ( ( T_2 + Y - X ) * 0.5f );
hTimePhC = hTimePhA - Y;
hTimePhB = hTimePhC + X;
break;
}

PWM1 = hTimePhA;
PWM2 = hTimePhB;
PWM3 = hTimePhC;

• 点赞
• 评论
• 分享
x

海报分享

扫一扫，分享海报

• 收藏
• 手机看

分享到微信朋友圈

x

扫一扫，手机阅读

• 打赏

打赏

A MAN NAMED MAGIC

你的鼓励将是我创作的最大动力

C币 余额
2C币 4C币 6C币 10C币 20C币 50C币
• 一键三连

点赞Mark关注该博主, 随时了解TA的最新博文

06-06
05-15 9560