Skip to content

Commit

Permalink
Do more iterations
Browse files Browse the repository at this point in the history
  • Loading branch information
mcells committed Sep 29, 2024
1 parent a9e4842 commit 0df3840
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/common/base_classes/FOCMotor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ int FOCMotor::characteriseMotor(float voltage){
float Lq = 0;
float Ld = 0;

uint cycles = 20;
uint cycles = 10;
uint risetime_us = 200;
uint settle_us = 100000;
float timeconstant = 0.0f;

for (size_t i = 0; i < 2; i++)
for (size_t i = 0; i < 4; i++)
{
for (size_t i = 0; i < cycles; i++)
{
Expand Down Expand Up @@ -153,7 +153,7 @@ int FOCMotor::characteriseMotor(float voltage){

}

Lq /= cycles;
Lq /= cycles + 1;

SIMPLEFOC_DEBUG("MOT: Estimated Q-inductance in mH: ", Lq * 1000.0f);

Expand Down Expand Up @@ -188,7 +188,7 @@ int FOCMotor::characteriseMotor(float voltage){

}

Ld /= cycles;
Ld /= cycles + 1;

SIMPLEFOC_DEBUG("MOT: Estimated D-inductance in mH: ", Ld * 1000.0f);

Expand Down

0 comments on commit 0df3840

Please sign in to comment.