SVPWM控制的应用领域

工业控制

1201人已加入

描述

SVPWM控制是一种控制三相交流电机的方法,它可以实现高效、精确的控制。由于它具有快速响应、低噪声、高精度等特点,在工业控制、船舶、风力发电、太阳能发电、新能源汽车等领域得到了广泛的应用。以下是一些应用领域:

**1. ** 变频空调 SVPWM控制可以降低功率因数,提高空气质量,节约能源。

2. 电动船和潜水 器: SVPWM控制可以通过改变电机转速来改变船或潜水器的速度和方向。

3. 风力发电系统: SVPWM控制可以将变频器输出的直流电转换为交流电,以控制发电机的转速和输出功率。

4. 太阳能发电系统: SVPWM控制可以优化光伏逆变器的输出,最大限度地提高太阳能电池板的能量利用效率。

5. 汽车电动驱动系统: SVPWM控制可以提高电驱动车辆的性能和节能效果,使其具有更好的加速性能和更长的续航里程。

总之,SVPWM控制在许多工业领域和新兴领域都具有广泛的应用前景,其高效、精确的控制特性使其成为一种技术上先进的控制方法。

下面是一份基于MATLAB的SVPWM程序代码:

function [v1, v2, v3] = svpwm(theta, va, vb, vc)
% theta:当前时刻的角度值
% va, vb, vc:三相电压值


% 转换输入电压为ab、bc、ca轴正向电压值
va_b = -0.5 * va + 0.5 * sqrt(3) * vb;
va_c = -0.5 * va - 0.5 * sqrt(3) * vb;
vb_c = sqrt(3) * vc;


% 计算电压矢量的幅值和角度
Vmax = max([va_b va_c vb_c]); % 电压矢量的最大幅值
theta_tilda = pi/3; % 电压/电流星型转换因子
tau = theta_tilda - mod(theta, theta_tilda); % 计算角度离竖直线顶点的偏差
Vm_alpha = Vmax * sin(tau/2); % 电压矢量在alpha轴上的投影
Vm_beta = Vmax * cos(tau/2); % 电压矢量在beta轴上的投影
phi = acos(Vm_alpha / Vmax); % 电压矢量与alpha轴的夹角


% 根据所处的扇区计算PWM信号
if (phi < pi/6)
    T1 = Vm_alpha / sin(phi);
    T2 = Vm_beta / sin(pi/3 - phi);
    v1 = 0.5 * (T1 + T2);
    v2 = 0.5 * (T1 - T2);
    v3 = -v1 - v2;
elseif (phi < pi/3)
    T1 = Vm_beta / sin(phi);
    T2 = Vm_alpha / sin(pi/3 - phi);
    v1 = 0.5 * (T2 - T1);
    v2 = 0.5 * (T2 + T1);
    v3 = -v1 - v2;
else
    v1 = Vmax / sqrt(3);
    v2 = Vmax / sqrt(3);
    v3 = Vmax / sqrt(3);
end

这段代码中,theta是当前时刻的角度值,va、vb、vc是三相电压值。首先通过对输入电压的正向投影获得各轴正向电压值,然后计算电压矢量的幅值和角度,根据所处的扇区计算PWM信号,并最终得到输出的电压值v1、v2和v3。需要注意的是,在扇区一和二中,存在一个机电转动角度(受跨越VRT变化的影响),需要在程序中进行补偿。

以下是一份基于TMS320F28035的SVPWM程序代码:

//--------------------------------- Include Files ---------------------------------
#include "DSP28x_Project.h"      // Device Headerfile and Examples Include File
#include 


//--------------------------------- Definitions ---------------------------------
#define  Fsw              10000          // SVPWM Switching Frequency (Hz)
#define  Vdc              24.0           // DC Bus Voltage (V)
#define  PI               3.141592       // Pi Value


//--------------------------------- Global Variables ------------------------------
float Va_REF = 0.0;
float Vb_REF = 0.0;
float Vc_REF = 0.0;
float theta_elec = 0.0;
Uint16 SVPWM_Trip = 0;


//-------------------------------- Function Prototypes -----------------------------
void SVPWM(void);
interrupt void epwm1_isr(void);


//----------------------------------- Main Routine --------------------------------
void main(void)
{
    // Initialize system variables
    InitSysCtrl();
    InitPieCtrl();


    //Enable CPU interrupts
    DINT;
    InitPieVectTable();
    EALLOW;
    PieVectTable.EPWM1_INT = &epwm1_isr; //Assign ISR address to vector
    EDIS;


    // Load PWM configuration
    InitEPwm1Gpio();            // Initialize EPWM1 GPIO pins
    EPwm1Regs.TBPRD = 1500;     // 10 kHz PWM frequency
    EPwm1Regs.TBCTL.bit.CTRMODE = TB_COUNT_UPDOWN;  // Count up-down mode
    EPwm1Regs.TBCTL.bit.PHSEN = TB_DISABLE;         // Enable phase loading
    EPwm1Regs.TBCTL.bit.SYNCOSEL = TB_CTR_ZERO;     // Set SYNCOUT to zero
    EPwm1Regs.TBCTR = 0x0000;   // Clear counter


    // Set CMPA register to adjust duty cycle
    EPwm1Regs.CMPA.half.CMPA = 0;


    // Configure timer period
    EPwm1Regs.TBPRD = 1500;


    // Configure CMPA to generate interrupt when its value matches the counter value
    EPwm1Regs.ETSEL.bit.INTEN = 1;
    EPwm1Regs.ETSEL.bit.INTSEL = ET_CTR_ZERO; // Interrupt on Counter Zero event
    EPwm1Regs.ETPS.bit.INTPRD = ET_1ST;       // Generate an interrupt on every event
                                              // Not necessary, but added for clarity
    // Enable PWM interrupts
    IER |= M_INT3;           // Enable INT3 (EPWM1) in IER register
    PieCtrlRegs.PIEIER3.bit.INTx1 = 1;        // Enable EPWM1 INT in PIE


    // Enable global interrupts and start the timer
    EINT;
    EPwm1Regs.TBCTL.bit.CTRMODE = TB_COUNT_UPDOWN;
    EPwm1Regs.TBCTL.bit.HSPCLKDIV = TB_DIV1;
    EPwm1Regs.TBCTL.bit.CLKDIV = TB_DIV1;
    EPwm1Regs.TBCTL.bit.SWFSYNC = 1;


    while(1)
    {
        // Call SVPWM function to calculate duty cycles
        SVPWM();

        // Update PWM duty cycles based on reference voltages
        EPwm1Regs.CMPA.half.CMPA = Va_REF*750/Vdc + 750;
        EPwm1Regs.CMPB = Vb_REF*750/Vdc + 750;
        EPwm2Regs.CMPA.half.CMPA = Vc_REF*750/Vdc + 750;
    }
}


//------------------------------- Function Definitions ------------------------------
void SVPWM(void)
{
    float sin_theta, cos_theta, sector_angle, Va_mag, Vb_mag, Vc_mag, t1, t2, t0;

    //Update mechanical angle 
    theta_elec += 2.0 * PI / (Fsw * 6); 

    //limit increment of theta between (0,0.99999)
    if(theta_elec > 2.0 * PI)
    {
        theta_elec -= 2.0 * PI;
    }


    sector_angle = floor(theta_elec * Fsw / (2.0 * PI));


    switch((Uint16)sector_angle)
    {
    case 0: //Sector1 (0 - 60 degrees)
        sin_theta = sin(theta_elec);
        cos_theta = cos(theta_elec);
        Va_mag = (Vdc/sqrt(3))*cos_theta;
        Vb_mag = (Vdc/sqrt(3))*(sin_theta*cos(30*PI/180) - cos_theta*sin(30*PI/180));
        Vc_mag = -Vb_mag - Va_mag;
        break;
    case 1: //Sector2 (60 - 120 degrees)
        sin_theta = sin(theta_elec - 2.0*PI/3.0);
        cos_theta = cos(theta_elec - 2.0*PI/3.0);
        Va_mag = (Vdc/sqrt(3))*(sin_theta*cos(30*PI/180) - cos_theta*sin(30*PI/180));
        Vb_mag = (Vdc/sqrt(3))*cos_theta;
        Vc_mag = -Vb_mag - Va_mag;
        break;
    case 2: //Sector3 (120 - 180 degrees)
        sin_theta = sin(theta_elec - 4.0*PI/3.0);
        cos_theta = cos(theta_elec - 4.0*PI/3.0);
        Va_mag = -(Vdc/sqrt(3))*cos_theta;
        Vb_mag = -(Vdc/sqrt(3))*(sin_theta*cos(30*PI/180) - cos_theta*sin(30*PI/180));
        Vc_mag = -Vb_mag - Va_mag;
        break;
    case 3: //Sector4 (180 - 240 degrees)
        sin_theta = sin(theta_elec + PI);
        cos_theta = cos(theta_elec + PI);
        Va_mag = -(Vdc/sqrt(3))*cos_theta;
        Vb_mag = (Vdc/sqrt(3))*(cos_theta*sin(30*PI/180) - sin_theta*cos(30*PI/180));
        Vc_mag = -Vb_mag - Va_mag;
        break;
    case 4: //Sector5 (240 - 300 degrees)
        sin_theta = sin(theta_elec + 4.0*PI
打开APP阅读更多精彩内容
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉

全部0条评论

快来发表一下你的评论吧 !

×
20
完善资料,
赚取积分