183 lines
5.9 KiB
C
183 lines
5.9 KiB
C
|
#ifndef _PARAMS
|
|||
|
#define _PARAMS
|
|||
|
|
|||
|
|
|||
|
#if(_FLOOR6)
|
|||
|
|
|||
|
|
|||
|
#define _ENABLE_PWM_LINES_FOR_TESTS 0//1
|
|||
|
#define _ENABLE_PWM_LINES_FOR_TESTS_ROTOR 0//1
|
|||
|
#define _ENABLE_PWM_LINES_FOR_TESTS_PWM 0//1
|
|||
|
#define _ENABLE_PWM_LINES_FOR_TESTS_RS 0//1
|
|||
|
#define _ENABLE_PWM_LINES_FOR_TESTS_SYNC 0//1
|
|||
|
#define _ENABLE_PWM_LINES_FOR_TESTS_GO 0//1
|
|||
|
|
|||
|
#else
|
|||
|
|
|||
|
#define _ENABLE_PWM_LINES_FOR_TESTS 0
|
|||
|
#define _ENABLE_PWM_LINES_FOR_TESTS_ROTOR 0
|
|||
|
#define _ENABLE_PWM_LINES_FOR_TESTS_PWM 0
|
|||
|
#define _ENABLE_PWM_LINES_FOR_TESTS_RS 0
|
|||
|
#define _ENABLE_PWM_LINES_FOR_TESTS_SYNC 0//1
|
|||
|
#define _ENABLE_PWM_LINES_FOR_TESTS_GO 0//1
|
|||
|
#endif
|
|||
|
|
|||
|
|
|||
|
#if(_FLOOR6)
|
|||
|
#define MODE_DISABLE_ENABLE_WDOG 1 // 0 - wdog <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, 1 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
#else
|
|||
|
#define MODE_DISABLE_ENABLE_WDOG 0 // 0 - wdog <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, 1 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
#endif
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
#define CHECK_IN_OUT_TERMINAL 1
|
|||
|
|
|||
|
#define WORK_ON_STEND_D 0//1
|
|||
|
|
|||
|
|
|||
|
|
|||
|
////////////////////////////////////////////////////////////////////
|
|||
|
#ifndef MODE_DISABLE_ENABLE_WDOG
|
|||
|
#define MODE_DISABLE_ENABLE_WDOG 0
|
|||
|
#endif
|
|||
|
|
|||
|
|
|||
|
#ifndef CHECK_IN_OUT_TERMINAL
|
|||
|
#define CHECK_IN_OUT_TERMINAL 0
|
|||
|
#endif
|
|||
|
|
|||
|
#ifndef WORK_ON_STEND_D
|
|||
|
#define WORK_ON_STEND_D 0
|
|||
|
#endif
|
|||
|
|
|||
|
|
|||
|
|
|||
|
/*************************************************************************************/
|
|||
|
//#define BAN_ROTOR_REVERS_DIRECT 1
|
|||
|
|
|||
|
//#define TIME_PAUSE_ZADATCHIK 750//500
|
|||
|
|
|||
|
//#define TIME_SET_LINE_RELAY_FAN 3000 // <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
//#define LEVEL_FAN_ON_TEMPER_ACDRIVE 1400 //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
//#define LEVEL_FAN_OFF_TEMPER_ACDRIVE 1200 //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
//(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> LEVEL_FAN_ON_TEMPER_ACDRIVE <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ~20 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> )
|
|||
|
//#define TIME_SET_LINE_RELAY_FAN 3000 //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
/*
|
|||
|
#define MAX_TIME_DIRECT_ROTOR 5000 // <20><><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
#define MIN_TIME_DIRECT_ROTOR -5000 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
#define LEVEL_FORWARD_TIME_DIRECT_ROTOR 4000 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
#define LEVEL_BACK_TIME_DIRECT_ROTOR -4000 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
#define MAX_TIME_ERROR_ROTOR 5000 // <20><><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
#define MIN_TIME_ERROR_ROTOR 0 // <20><><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
|
|||
|
#define LEVEL_ON_ERROR_ROTOR 4000 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
#define LEVEL_OFF_ERROR_ROTOR 1000 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
*/
|
|||
|
|
|||
|
|
|||
|
/*
|
|||
|
#define PID_KP_IM 0.018 //0.036 //0.018 //0.18 //0.095 // PID Kp
|
|||
|
#define PID_KI_IM 0.08 // 0.008 // PID Ki
|
|||
|
#define PID_KD_IM 0.0000 //100 // PID Kd
|
|||
|
#define PID_KC_IM 0.09 // PID Kc
|
|||
|
|
|||
|
|
|||
|
#define PID_KP_F 12//26//12 //40 //20 //12 //20 //60.0 //20.0 //0.095 // PID Kp
|
|||
|
#define PID_KI_F 0.00010 // 0.008 // PID Ki
|
|||
|
#define PID_KD_F 0.000 //100 PID Kd
|
|||
|
#define PID_KC_F 0.005 // PID Kc
|
|||
|
//#define PID_KC_F 0.000 // PID Kc
|
|||
|
|
|||
|
#define ADD_KP_DF (1000.0/NORMA_MZZ)//(500.0/NORMA_MZZ)//(50.0/NORMA_MZZ)
|
|||
|
#define ADD_KI_DF (2000.0/NORMA_MZZ)//(1000.0/NORMA_MZZ)//(100.0/NORMA_MZZ)
|
|||
|
#define MAX_DELTA_pidF 2.0
|
|||
|
#define MIN_MZZ_FOR_DF 1761607 //(210/NORMA_MZZ)
|
|||
|
*/
|
|||
|
|
|||
|
/*
|
|||
|
#define Im_PREDEL 600 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>
|
|||
|
#define I_OUT_PREDEL -20 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>. <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>y <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>
|
|||
|
#define U_IN_PREDEL 500 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>y<EFBFBD><79><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
#define IQ_NORMAL_CHARGE_UD_MAX 12163481 // 1450 V //13002342 // 1550 //_IQtoF(filter.iqU_1_long)*NORMA_ACP
|
|||
|
#define IQ_NORMAL_CHARGE_UD_MIN 10066329 // 1200 V
|
|||
|
|
|||
|
|
|||
|
#define U_D_MAX_ERROR_GLOBAL 17616076 // 2100 V //17196646 //2050V // 16777216 //2000V/2000*2^24
|
|||
|
#define U_D_MAX_ERROR 16777216 // 2000V //16357785 //1950V //15938355 //1900V/2000*2^24
|
|||
|
|
|||
|
//#define U_D_NORMA_MIN 3774873 // 450 V // 13421772 // 450 V 22.05.08 //1600V/2000*2^24
|
|||
|
//#define U_D_NORMA_MAX 15518924 // //15099494 //1850V/2000*2^24
|
|||
|
|
|||
|
#define U_D_MIN_ERROR 10905190 // 1300V/2000*2^24
|
|||
|
|
|||
|
#define I_IN_MAX_ERROR_GLOBAL 18454937 // 2200 A //16777216 //2000 A // 13421772 //1600 A //10905190 //1300 // 900A
|
|||
|
|
|||
|
#define KOEFF_WROTOR_FILTER_SPARTAN 7//8
|
|||
|
#define MAX_DELTA_WROTOR_S_1_2 1
|
|||
|
|
|||
|
#define ENABLE_I_HDW_PROTECT_ON_GLOBAL 1 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
#define TIME_WAIT_CHARGE 2000 //5000 // 10000
|
|||
|
#define TIME_WAIT_CHARGE_OUT 15000 //15000
|
|||
|
#define TIME_SET_LINE_RELAY 10000
|
|||
|
#define TIME_SET_LINE_RELAY5 3000
|
|||
|
#define TIME_WAIT_LEVEL_QPU2 3000
|
|||
|
*/
|
|||
|
|
|||
|
|
|||
|
/*
|
|||
|
///--------------------------- 22220 paremetrs -------------------/////////
|
|||
|
|
|||
|
////////////////////////////////////////////////////////////////
|
|||
|
// Loaded capasitors level
|
|||
|
#define V_CAPASITORS_LOADED_IQ 11184810 //13421772 ~ 2400V // 11184810 ~ 2000V
|
|||
|
#define V_NOMINAL 15099494 //15099494 ~ 2700V
|
|||
|
|
|||
|
// Level of nominal currents
|
|||
|
#define I_OUT_NOMINAL_IQ 10066329 //8388608 ~ 1500A //5592405 ~ 1000A // 10066329 ~ 1800A
|
|||
|
//11184811 ~ 2000A // 12482249 ~ 2232A // 6710886 ~ 1200A
|
|||
|
#define I_ZPT_NOMINAL_IQ 6123683 //1095A
|
|||
|
|
|||
|
|
|||
|
|
|||
|
#define NORMA_MZZ 3000 //5000
|
|||
|
//#define NORMA_ACP 3000
|
|||
|
#define DISABLE_TEST_TKAK_ON_START 1
|
|||
|
//#define MOTOR_STEND 1
|
|||
|
|
|||
|
|
|||
|
//#define FREQ_PWM 350 //401 //379
|
|||
|
|
|||
|
#ifdef MOTOR_STEND
|
|||
|
#define POLUS 4 // <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
#define BPSI_NORMAL 0.9//0.7 //Hz
|
|||
|
#define MAX_FZAD_FROM_SU 16.7 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><>
|
|||
|
#define MAX_FZAD_FROM_SU_OBOROT 1100
|
|||
|
|
|||
|
#else
|
|||
|
#define POLUS 6 // <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
#define BPSI_NORMAL 0.9 //Hz
|
|||
|
#define MAX_FZAD_FROM_SU 16.7 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><>
|
|||
|
#define MAX_FZAD_FROM_SU_OBOROT 1650
|
|||
|
#define COS_FI 0.83
|
|||
|
|
|||
|
#endif
|
|||
|
*/
|
|||
|
|
|||
|
#define KOEF_TEMPER_DECR_MZZ 2.0
|
|||
|
|
|||
|
#endif
|
|||
|
|
|||
|
|
|||
|
|