Skip to content

Commit

Permalink
[acmsimc] 正弦波转速会导致D轴磁链控制误差,怎么破?是我哪里没有实现完全Marino05吗?
Browse files Browse the repository at this point in the history
  • Loading branch information
horychen committed Jan 7, 2021
1 parent 9995a0b commit e6466bb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion emachinery/acmsimcv5/c/ACMConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define INDIRECT_FOC 1
#define MARINO_2005_ADAPTIVE_SENSORLESS_CONTROL 2
#define CONTROL_STRATEGY MARINO_2005_ADAPTIVE_SENSORLESS_CONTROL
#define NUMBER_OF_STEPS 180000
#define NUMBER_OF_STEPS 80000
#define DOWN_SAMPLE 1
#define SENSORLESS_CONTROL TRUE
#define SENSORLESS_CONTROL_HFSI FALSE
Expand Down
10 changes: 5 additions & 5 deletions emachinery/acmsimcv5/c/im_controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ struct ControllerForExperiment CTRL;
void CTRL_init(){

// struct Marino2005
marino.kz = 2*700.0; // zd, zq
marino.kz = 1*700.0; // zd, zq

marino.k_omega = 88*60.0; // 6000 // e_omega // 增大这个可以消除稳态转速波形中的正弦扰动(源自q轴电流给定波形中的正弦扰动,注意实际的q轴电流里面是没有正弦扰动的)
marino.k_omega = 0.5*88*60.0; // 6000 // e_omega // 增大这个可以消除稳态转速波形中的正弦扰动(源自q轴电流给定波形中的正弦扰动,注意实际的q轴电流里面是没有正弦扰动的)
marino.kappa = 24; //0.05; // e_omega // 增大这个意义不大,转速控制误差基本上已经是零了,所以kappa取0.05和24没有啥区别。

marino.lambda_inv = 1e-1 * 6000.0; // omega 磁链反馈为实际值时,这两个增益取再大都没有意义。
Expand Down Expand Up @@ -402,11 +402,11 @@ void controller(){

static REAL local_dc_rpm_cmd = 0.0;
if(CTRL.timebase>3){
#define OMG1 (2*M_PI*1)
#define OMG1 (2*M_PI*4)
rpm_speed_command = 100 * sin(OMG1*CTRL.timebase) + local_dc_rpm_cmd;
CTRL.omg_cmd = (100 * sin(OMG1*CTRL.timebase) + local_dc_rpm_cmd)*RPM_2_RAD_PER_SEC;
CTRL.deriv_omg_cmd = 1*100*OMG1 * cos(OMG1*CTRL.timebase)*RPM_2_RAD_PER_SEC;
CTRL.dderiv_omg_cmd = 1*100*OMG1*OMG1*-sin(OMG1*CTRL.timebase)*RPM_2_RAD_PER_SEC;
CTRL.deriv_omg_cmd = 100*OMG1 * cos(OMG1*CTRL.timebase) *RPM_2_RAD_PER_SEC;
CTRL.dderiv_omg_cmd = 100*OMG1*OMG1*-sin(OMG1*CTRL.timebase) *RPM_2_RAD_PER_SEC;
}else if(CTRL.timebase>2){
rpm_speed_command = local_dc_rpm_cmd;
CTRL.omg_cmd = rpm_speed_command*RPM_2_RAD_PER_SEC;
Expand Down
2 changes: 1 addition & 1 deletion emachinery/gui/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"path2acmsimc": "D:\\DrH\\Codes\\emachineryTestPYPI\\emachinery\\acmsimcv5",
"EndTime": "9",
"EndTime": "4",
"CLTS": "1/20e3",
"VLTS": "4/20e3",
"LoadTorque": "2*0",
Expand Down

0 comments on commit e6466bb

Please sign in to comment.