SVPWM原理介绍

时间:2024-02-21 21:30:44

SVPWM原理介绍

​ PWM(Pulse Width Modulation)脉宽调整,这是一种利用面积等效原理实现的控制技术。SVPWM(Space Vector PWM)空间矢量PWM控制,因为控制电动机内部的圆形旋转磁场,最终需要控制的是电压空间矢量。一般控制电机的三相电压相互成120度,以正弦的形式变换。我们需要控制的就是这三相电压呈现这种形式来最终控制到电磁转矩。主电路图如下所示:

image-20210611152428175

​ 由于逆变器三相桥臂共有6个开关管,为了研究各相上下桥臂不同开关组合时逆变器输出的空间电压矢量,特定义开关函数Sx(x=a、b、c) 为:

image-20210611152523981

(Sa、Sb、Sc)的全部可能组合共有八个,包括6个非零矢量 Ul(001)、U2(010)、U3(011)、U4(100)、U5(101)、U6(110)、和两个零矢量 U0(000)、U7(111),下面以其中一种开关组合为例分析,假设Sx(x=a、b、c)=(100),此时:

image-20210611152546722

image-20210611152557793

求解上述方程可得:UaN=2Ud/3、UbN=-Ud/3、UcN=-Ud/3。同理可计算出其它各种组合下的空间电压矢量,列表如下:

Sa Sb Sc 矢量符号 Uab Ubc Uca UaN UbN UcN
0 0 0 U0 0 0 0 0 0 0
1 0 0 U4 Udc 0 -Udc 2/3*Udc -1/3*Udc -1/3*Udc
1 1 0 U6 0 Udc -Udc 1/3*Udc 1/3*Udc -2/3*Udc
0 1 0 U2 -Udc Udc 0 -1/3*Udc 2/3*Udc -1/3*Udc
0 1 1 U3 -Udc 0 0 -2/3*Udc 1/3*Udc 1/3*Udc
0 0 1 U1 0 -Udc Udc -1/3*Udc -1/3*Udc 2/3*Udc
1 0 1 U5 Udc -Udc 0 1/3*Udc -2/3*Udc 1/3*Udc
1 1 1 U7 0 0 0 0 0 0

八个基本电压空间矢量的大小和位置如下图所示:

image-20210611153315416

如果某一瞬间要求的电压控制键矢量在第一扇区,那么可以根据第一扇区的矢量U4以及U6以及零矢量U0或U7合成所要求的矢量U。经过计算,可以得到各矢量的状态保持时间为:

image-20210611155032766

式中 m 为 SVPWM 调制系数(调制比):若要求Uref的模保持恒定,则Uref的轨迹为一圆形;若要求三相电压波形不失真(即不饱和),则Uref的轨迹应在正六边形内部;结合此两点可知Uref的模取最大值时的轨迹为正六边形的内切圆,此时m=1,故m<=1。

我们以减少开关次数为目标,将基本矢量作用顺序的分配原则选定为:在每次开关状态转换时,只改变其中一相的开关状态。并且对零矢量在时间上进行了平均分配,以使产生的 PWM对称,从而有效地降低PWM的谐波分量。当 U4(100)切换至 U0(000)时,只需改变 A 相上下一对切换开关,若由 U4(100)切换至 U7(111)则需改变 B、C 相上下两对切换开关,增加了一倍的切换损失。因此要改变电压矢量U4(100)、U2(010)、U1(001)的大小,需配合零电压矢量U0(000),而要改变U6(110)、U3(011)、U5(101),需配合零电压矢量U7(111)。这样通过在不同区间内安排不同的开关切换顺序, 就可以获得对称的输出波形,其它各扇区的开关切换顺序如表 所示:

Uref 所在的位置 开关切换顺序 三相波形图
Ⅰ区(0°≤θ≤60°) …0-4-6-7-7-6-4-0… 1439959-20181106142350555-1603096115
Ⅱ区(60°≤θ≤120°) …0-2-6-7-7-6-2-0… 1439959-20181106142403045-1109520183
Ⅲ区(120°≤θ≤180°) …0-2-3-7-7-3-2-0… 1439959-20181106142417012-487724155
Ⅳ区(180°≤θ≤240°) …0-1-3-7-7-3-1-0… 1439959-20181106142451863-748877876
Ⅴ区(240°≤θ≤300°) …0-1-5-7-7-5-1-0… 1439959-20181106142503303-1368894269
Ⅵ区(300°≤θ≤360°) …0-4-5-7-7-5-4-0… 1439959-20181106142513660-512707456

1. 扇区判断

空间矢量调制的第一步是判断由 Uα 和 Uβ所决定的空间电压矢量所处的扇区,以TI程序为例:

pV->tmp1= pV->Ubeta;   // 相当于二相静止坐标--到三相静止变换出Uabc
pV->tmp2= _IQdiv2(pV->Ubeta) + _IQmpy(28377,pV->Ualpha); //0.866*32768=sqrt(3)/2*2^15
pV->tmp3= pV->tmp2 - pV->tmp1;

pV->VecSector=3;   // 根据三相电压符号计算矢量扇区
pV->VecSector=(pV->tmp2> 0)?( pV->VecSector-1):pV->VecSector;
pV->VecSector=(pV->tmp3> 0)?( pV->VecSector-1):pV->VecSector;
pV->VecSector=(pV->tmp1< 0)?(7-pV->VecSector) :pV->VecSector;

2. 有效电压矢量作用时间计算

根据公式可以计算每个扇区两侧的有效电压矢量作用时间(以扇区Ⅰ为例):

image-20210611155536257

注:六个有效电压矢量的幅值为2/3*Udc

对于不同的扇区,将对应的角度代入即可计算。

若假设三个临时变量:

image-20210611160215492

通过计算每个扇区内有效电压矢量的作用时间,代入上式,可以得到:

扇区 时间
I 1439959-20181106143344082-1884390921
1439959-20181106143405938-995567705
1439959-20181106143443925-280019886
1439959-20181106143511042-189754981
1439959-20181106143531321-512971371
1439959-20181106143549473-1755423347

3. PWM寄存器配置时间

扇区Ⅰ中的时间图为:

1439959-20181106143802981-2071497892

对于七段式来说,三相PWM对应的比较寄存器参数配置为:

image-20210617172057424

注:

  1. 每个有效电压矢量的作用时间实际只有中心对称的两小段

  2. 对应中心对称PWM,其周期寄存器配置参数为主频/PWM频率/2

  3. 对于TI例程中的不同,是因为TI的PWM动作模式为“反逻辑”,例如

    按照上述计算结果得到的PWM动作时间为:

    \[% MathType!MTEF!2!1!+- % feaahqart1ev3aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn % hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr % 4rNCHbWexLMBbXgBd9gzLbvyNv2CaeHbl7mZLdGeaGqipw0Je9sqqr % pepC0xbbL8F4rqqrFfpeea0xe9Lq-Jc9vqaqpepm0xbba9pwe9Q8fs % 0-yqaqpepae9pg0FirpepeKkFr0xfr-xfr-xb9adbaqaaeGaciGaai % aabeqaamaabaabauaakeaadaGabaqaauaabeqadeaaaeaacaWG0bWa % aSbaaSqaaiGac2gacaGGPbGaaiOBaiaad+gacaWGUbaabeaakiabg2 % da9maalaaabaGaaGymaaqaaiaaisdaaaGaamivamaaBaaaleaacaWG % ZbaabeaakmaadmaabaGaaGymaiabgkHiTmaabmaabaWaaSaaaeaada % GcaaqaaiaaiodaaSqabaaakeaacaaIYaaaaiaadwhadaqhaaWcbaGa % eqySdegabaGaaiOkaaaakiabgUcaRmaalaaabaGaaGymaaqaaiaaik % daaaGaamyDamaaDaaaleaacqaHYoGyaeaacaGGQaaaaaGccaGLOaGa % ayzkaaaacaGLBbGaayzxaaaabaGaamiDamaaBaaaleaacaWGTbGaam % yAaiaadsgacaWGVbGaamOBaaqabaGccqGH9aqpdaWcaaqaaiaaigda % aeaacaaI0aaaaiaadsfadaWgaaWcbaGaam4CaaqabaGcdaWadaqaai % aaigdacqGHsisldaqadaqaaiabgkHiTmaalaaabaWaaOaaaeaacaaI % ZaaaleqaaaGcbaGaaGOmaaaacaWG1bWaa0baaSqaaiabeg7aHbqaai % aacQcaaaGccqGHRaWkdaWcaaqaaiaaiodaaeaacaaIYaaaaiaadwha % daqhaaWcbaGaeqOSdigabaGaaiOkaaaaaOGaayjkaiaawMcaaaGaay % 5waiaaw2faaaqaaiaadshadaWgaaWcbaGaciyBaiaacggacaGG4bGa % am4Baiaad6gaaeqaaOGaeyypa0ZaaSaaaeaacaaIXaaabaGaaGinaa % aacaWGubWaaSbaaSqaaiaadohaaeqaaOWaamWaaeaacaaIXaGaeyOe % I0YaaeWaaeaacqGHsisldaWcaaqaamaakaaabaGaaG4maaWcbeaaaO % qaaiaaikdaaaGaamyDamaaDaaaleaacqaHXoqyaeaacaGGQaaaaOGa % eyOeI0YaaSaaaeaacaaIXaaabaGaaGOmaaaacaWG1bWaa0baaSqaai % abek7aIbqaaiaacQcaaaaakiaawIcacaGLPaaaaiaawUfacaGLDbaa % aaaacaGL7baaaaa!92A9! \left\{ {\matrix{ {{t_{\min on}} = {1 \over 4}{T_s}\left[ {1 - \left( {{{\sqrt 3 } \over 2}u_\alpha ^* + {1 \over 2}u_\beta ^*} \right)} \right]} \cr {{t_{midon}} = {1 \over 4}{T_s}\left[ {1 - \left( { - {{\sqrt 3 } \over 2}u_\alpha ^* + {3 \over 2}u_\beta ^*} \right)} \right]} \cr {{t_{\max on}} = {1 \over 4}{T_s}\left[ {1 - \left( { - {{\sqrt 3 } \over 2}u_\alpha ^* - {1 \over 2}u_\beta ^*} \right)} \right]} \cr } } \right. \]

    但是TI例程中计算结果为:

    \[% MathType!MTEF!2!1!+- % feaahqart1ev3aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn % hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr % 4rNCHbWexLMBbXgBd9gzLbvyNv2CaeHbl7mZLdGeaGqipw0Je9sqqr % pepC0xbbL8F4rqqrFfpeea0xe9Lq-Jc9vqaqpepm0xbba9pwe9Q8fs % 0-yqaqpepae9pg0FirpepeKkFr0xfr-xfr-xb9adbaqaaeGaciGaai % aabeqaamaabaabauaakeaadaGabaqaauaabeqadeaaaeaacaWG0bWa % aSbaaSqaaiGac2gacaGGPbGaaiOBaiaad+gacaWGUbaabeaakiabg2 % da9maalaaabaGaaGymaaqaaiaaisdaaaGaamivamaaBaaaleaacaWG % ZbaabeaakmaadmaabaGaaGymaiabgUcaRmaabmaabaWaaSaaaeaada % GcaaqaaiaaiodaaSqabaaakeaacaaIYaaaaiaadwhadaqhaaWcbaGa % eqySdegabaGaaiOkaaaakiabgUcaRmaalaaabaGaaGymaaqaaiaaik % daaaGaamyDamaaDaaaleaacqaHYoGyaeaacaGGQaaaaaGccaGLOaGa % ayzkaaaacaGLBbGaayzxaaaabaGaamiDamaaBaaaleaacaWGTbGaam % yAaiaadsgacaWGVbGaamOBaaqabaGccqGH9aqpdaWcaaqaaiaaigda % aeaacaaI0aaaaiaadsfadaWgaaWcbaGaam4CaaqabaGcdaWadaqaai % aaigdacqGHRaWkdaqadaqaaiabgkHiTmaalaaabaWaaOaaaeaacaaI % ZaaaleqaaaGcbaGaaGOmaaaacaWG1bWaa0baaSqaaiabeg7aHbqaai % aacQcaaaGccqGHRaWkdaWcaaqaaiaaiodaaeaacaaIYaaaaiaadwha % daqhaaWcbaGaeqOSdigabaGaaiOkaaaaaOGaayjkaiaawMcaaaGaay % 5waiaaw2faaaqaaiaadshadaWgaaWcbaGaciyBaiaacggacaGG4bGa % am4Baiaad6gaaeqaaOGaeyypa0ZaaSaaaeaacaaIXaaabaGaaGinaa % aacaWGubWaaSbaaSqaaiaadohaaeqaaOWaamWaaeaacaaIXaGaey4k % aSYaaeWaaeaacqGHsisldaWcaaqaamaakaaabaGaaG4maaWcbeaaaO % qaaiaaikdaaaGaamyDamaaDaaaleaacqaHXoqyaeaacaGGQaaaaOGa % eyOeI0YaaSaaaeaacaaIXaaabaGaaGOmaaaacaWG1bWaa0baaSqaai % abek7aIbqaaiaacQcaaaaakiaawIcacaGLPaaaaiaawUfacaGLDbaa % aaaacaGL7baaaaa!9288! \left\{ {\matrix{ {{t_{\min on}} = {1 \over 4}{T_s}\left[ {1 + \left( {{{\sqrt 3 } \over 2}u_\alpha ^* + {1 \over 2}u_\beta ^*} \right)} \right]} \cr {{t_{midon}} = {1 \over 4}{T_s}\left[ {1 + \left( { - {{\sqrt 3 } \over 2}u_\alpha ^* + {3 \over 2}u_\beta ^*} \right)} \right]} \cr {{t_{\max on}} = {1 \over 4}{T_s}\left[ {1 + \left( { - {{\sqrt 3 } \over 2}u_\alpha ^* - {1 \over 2}u_\beta ^*} \right)} \right]} \cr } } \right. \]

    这里正好有一个加减号的相反关系(后者等于Ts/2减去前者)

    image-20210611161726242

  4. 这里给出的表达式是指min、mid和max对应的PWM动作时间,而不是ABC三相PWM的动作时间,所以程序中的设置的正确的,即:

    if  (pV->VecSector==1 || pV->VecSector==4)  // 根据矢量扇区计算矢量占空比Tabc
    		{  
    			pV->Ta= pV->tmp2;
    			pV->Tb= pV->tmp1-pV->tmp3;
    			pV->Tc=-pV->tmp2;
    		}
    else if(pV->VecSector==2 || pV->VecSector==5)
    		{  
    			pV->Ta= pV->tmp3+pV->tmp2;
    			pV->Tb= pV->tmp1;
    			pV->Tc=-pV->tmp1;
    		}
    else
    		{   
    			pV->Ta= pV->tmp3;
    			pV->Tb=-pV->tmp3;
    			pV->Tc=-(pV->tmp1+pV->tmp2);
    		}