controlvf.c

来自「DSP实现三相异步电机矢量控制的C语言算法」· C语言 代码 · 共 51 行

C
51
字号
/**
* @file controlVF.c
*
* Copyright (c) 2004 Atmel.
*
* @brief Ce fichier permet de
*
* This file is included by all source files in order to access to system wide
* configuration.
* @version 1.0 (CVS revision : $Revision: 1.2 $)
* @date $Date: 2005/11/16 17:18:43 $ (created on 06/04/2004)
* @author $Author: raubree $ (created by Emmanuel David)

*****************************************************************************/

#include "config.h"
#include "inavr.h"

#define Vf_SLOPE 5
#define OMEGA_TS_MAX 192 // 192
#define OMEGA_TS_MIN 32 // 32


/*
   w_max.Te_scal = (480/2*pi) * Te * w_max = 12
     Te = 1/1000
     w_max = 1500 .(pi/30) = 50.pi

    => w_max = 16 * w_max.Te_scal = 192

*/



// V/f law
U16 controlVF(U16 wTs) {

    U16  amp ;

    if (wTs <= OMEGA_TS_MIN )        // boost frequency
    {
         amp = 160 ;       // boost voltage
    }
    else
         if ( (wTs > OMEGA_TS_MIN) & (wTs < OMEGA_TS_MAX) )
          amp = 5 * wTs ;  // V/f law
         else
          amp = 960;       // rated value
    return amp ;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?