This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MCF8316AEVM: the motor didn't spin well in a closed loop

Part Number: MCF8316AEVM

Hello

I got an evaluation board, but I haven't succeeded in controlling the motor rotation correctly.
What should I do to get closed loop control?

I roughly tried the following

1. Cannot Quick Start
I followed the Quick Start Guide, but the motor didn't spin.
→ Fault (: Lock current limit) is indicated

2. The recommended setting also failed to rotate the motor.

3. I manually set the motor parameters to skip the automatic measurement of MPET and the motor rotated.
But, the motor stopped at the moment of transition from open loop to closed loop.
→ Fault (: Abnormal BEMF) is indicated

4. When I changed the BEMF Constant register value from the setting in 3. above, Fault (: Abnormal BEMF) disappeared.
But, when it went from open loop to closed loop, the motor stopped.
→ The algorithm state of the motor became [Closed loop aligned], but the rotation of the motor stopped and it moved jerks.

5. I tried Manual Tuning from the GUI --Guided tuning settings --Inproving speed regulation, but the motor didn't spin well in a closed loop and it stopped.
Step A-D: I disabled the speed loop and closed loop, and I measured the A phase current.


Step E: I didn't know what to fill in, but I entered the maximum measurement: 739 [mA] * 110 [%] = 813 in [FORCE_IQ_REF_SPEED_LOOP_DIS].
Step F: When I re-enable the closed loop, the motor stops and I can't proceed to the next step.
As a test, I changed [FORCE_IQ_REF_SPEED_LOOP_DIS] in the range 600-1000, but the closed loop didn't work.
The smaller this value, the larger the current when the motor stopped.

Regards,
Tetsuya K

  • Hi Tetsuya-san,

    Our MCx expert will get you a reply this week.

    Thanks,
    Aaron

  • Hello Mr. Aaron.

    I have additional information.
    Hope this helps you get the answer.

    I rotated the motor while suppressing the rotation with my finger,
    and when the speed increases, release the finger and it changed to the closed loop.


    Setting data is shown below.

    {
    "signature": "oneui-register-data",
    "data": [
    [
    {
    "idx": 0,
    "id": "isd_config",
    "value": "0x44638C20"
    },
    {
    "idx": 1,
    "id": "rev_drive_config",
    "value": "0x283AF064"
    },
    {
    "idx": 2,
    "id": "motor_startup1",
    "value": "0x6A2407D0"
    },
    {
    "idx": 3,
    "id": "motor_startup2",
    "value": "0x12066034"
    },
    {
    "idx": 4,
    "id": "closed_loop1",
    "value": "0x0D3201B0"
    },
    {
    "idx": 5,
    "id": "closed_loop2",
    "value": "0x1AADD801"
    },
    {
    "idx": 6,
    "id": "closed_loop3",
    "value": "0x24000000"
    },
    {
    "idx": 7,
    "id": "closed_loop4",
    "value": "0x0A004870"
    },
    {
    "idx": 8,
    "id": "speed_profiles1",
    "value": "0x00000000"
    },
    {
    "idx": 9,
    "id": "speed_profiles2",
    "value": "0x00000000"
    },
    {
    "idx": 10,
    "id": "speed_profiles3",
    "value": "0x00000000"
    },
    {
    "idx": 11,
    "id": "speed_profiles4",
    "value": "0x00000000"
    },
    {
    "idx": 12,
    "id": "speed_profiles5",
    "value": "0x00000000"
    },
    {
    "idx": 13,
    "id": "speed_profiles6",
    "value": "0x00000000"
    }
    ],
    [
    {
    "idx": 0,
    "id": "fault_config1",
    "value": "0x5FE8820E"
    },
    {
    "idx": 1,
    "id": "fault_config2",
    "value": "0x74C08000"
    }
    ],
    [
    {
    "idx": 0,
    "id": "pin_config",
    "value": "0x2DD0E480"
    },
    {
    "idx": 1,
    "id": "device_config1",
    "value": "0x08000001"
    },
    {
    "idx": 2,
    "id": "device_config2",
    "value": "0x00000000"
    },
    {
    "idx": 3,
    "id": "peri_config1",
    "value": "0x00000000"
    },
    {
    "idx": 4,
    "id": "gd_config1",
    "value": "0x00000000"
    },
    {
    "idx": 5,
    "id": "gd_config2",
    "value": "0x00000000"
    }
    ],
    [
    {
    "idx": 0,
    "id": "ana_trim3",
    "value": "0x48004800"
    },
    {
    "idx": 1,
    "id": "ana_trim4",
    "value": "0x00000000"
    },
    {
    "idx": 2,
    "id": "ana_trim5",
    "value": "0x00000013"
    },
    {
    "idx": 3,
    "id": "ana_trim6",
    "value": "0x00000000"
    },
    {
    "idx": 4,
    "id": "ana_trim7",
    "value": "0x00000000"
    },
    {
    "idx": 5,
    "id": "ana_trim8",
    "value": "0x00005C95"
    },
    {
    "idx": 6,
    "id": "ana_trim9",
    "value": "0x008D55D7"
    },
    {
    "idx": 7,
    "id": "ana_trim10",
    "value": "0x537E013A"
    }
    ],
    [
    {
    "idx": 0,
    "id": "int_algo_1",
    "value": "0x00000000"
    },
    {
    "idx": 1,
    "id": "int_algo_2",
    "value": "0x00000000"
    }
    ],
    [
    {
    "idx": 0,
    "id": "gate_driver_fault_status",
    "value": "0x00000000"
    },
    {
    "idx": 1,
    "id": "controller_fault_status",
    "value": "0x00000000"
    }
    ],
    [
    {
    "idx": 0,
    "id": "algo_status",
    "value": "0x81250000"
    },
    {
    "idx": 1,
    "id": "mtr_params",
    "value": "0x00000000"
    },
    {
    "idx": 2,
    "id": "algo_status_mpet",
    "value": "0x0A000000"
    }
    ],
    [
    {
    "idx": 0,
    "id": "algo_ctrl1",
    "value": "0x20000000"
    }
    ],
    [
    {
    "idx": 0,
    "id": "algo_debug1",
    "value": "0x00000000"
    },
    {
    "idx": 1,
    "id": "algo_debug2",
    "value": "0x00000000"
    },
    {
    "idx": 2,
    "id": "current_pi",
    "value": "0x00058007"
    },
    {
    "idx": 3,
    "id": "speed_pi",
    "value": "0x00000000"
    }
    ],
    [
    {
    "idx": 0,
    "id": "speed_ref_closed_loop",
    "value": "0x00000000"
    },
    {
    "idx": 1,
    "id": "vm_voltage",
    "value": "0x033F4000"
    },
    {
    "idx": 2,
    "id": "voltage_gain_feedback",
    "value": "0x00000001"
    },
    {
    "idx": 3,
    "id": "csa_gain_feedback",
    "value": "0x00000003"
    },
    {
    "idx": 4,
    "id": "phase_voltage_va",
    "value": "0x00000000"
    },
    {
    "idx": 5,
    "id": "phase_voltage_vb",
    "value": "0x00000000"
    },
    {
    "idx": 6,
    "id": "phase_voltage_vc",
    "value": "0x00000000"
    },
    {
    "idx": 7,
    "id": "id_ref_closed_loop",
    "value": "0x00000000"
    },
    {
    "idx": 8,
    "id": "iq_ref_closed_loop",
    "value": "0x00000000"
    },
    {
    "idx": 9,
    "id": "id",
    "value": "0x00000000"
    },
    {
    "idx": 10,
    "id": "iq",
    "value": "0x00000000"
    },
    {
    "idx": 11,
    "id": "vd",
    "value": "0x00000000"
    },
    {
    "idx": 12,
    "id": "vq",
    "value": "0x00000000"
    },
    {
    "idx": 13,
    "id": "ialpha",
    "value": "0x00000000"
    },
    {
    "idx": 14,
    "id": "ibeta",
    "value": "0x00000000"
    },
    {
    "idx": 15,
    "id": "valpha",
    "value": "0x00000000"
    },
    {
    "idx": 16,
    "id": "vbeta",
    "value": "0x00000000"
    },
    {
    "idx": 17,
    "id": "bus_current",
    "value": "0xFFFCF3B1"
    },
    {
    "idx": 18,
    "id": "ipd_state",
    "value": "0x00000000"
    },
    {
    "idx": 19,
    "id": "isd_state",
    "value": "0x00000000"
    },
    {
    "idx": 20,
    "id": "algorithm_state",
    "value": "0x00000000"
    },
    {
    "idx": 21,
    "id": "phase_current_a",
    "value": "0x00000000"
    },
    {
    "idx": 22,
    "id": "phase_current_b",
    "value": "0x00000000"
    },
    {
    "idx": 23,
    "id": "phase_current_c",
    "value": "0x00000000"
    },
    {
    "idx": 24,
    "id": "ipd_angle",
    "value": "0x00000000"
    },
    {
    "idx": 25,
    "id": "isd_speed",
    "value": "0x00000000"
    },
    {
    "idx": 26,
    "id": "speed_ref_open_loop",
    "value": "0x00000000"
    },
    {
    "idx": 27,
    "id": "iq_ref_open_loop",
    "value": "0x00000000"
    },
    {
    "idx": 28,
    "id": "iq_ref_rotor_align",
    "value": "0x00000000"
    },
    {
    "idx": 29,
    "id": "ed",
    "value": "0x00000000"
    },
    {
    "idx": 30,
    "id": "eq",
    "value": "0x00000000"
    },
    {
    "idx": 31,
    "id": "theta_est",
    "value": "0x00000000"
    },
    {
    "idx": 32,
    "id": "speed_fdbk",
    "value": "0x00000000"
    },
    {
    "idx": 33,
    "id": "sin_commutation_angle",
    "value": "0x00000000"
    },
    {
    "idx": 34,
    "id": "cos_commutation_angle",
    "value": "0x00000000"
    }
    ]
    ]
    }

    Regards,
    Tetsuya K

  • Hi Tetsuya-san,

    We may be delayed until Monday to get a response, please be patient. 

    Thanks,
    Aaron

  • Tetsuya-san 

    Thank you for sharing your configurations. can you also share couple of more information for us to debug this further:

    1. DC bus voltage applied to motor

    2. Current limit set in GUI for your application 

    3. Motor parameters such as R, L, Ke/Kt 

  • Mr. Prajkta

    Thank you for your response.
    I will answer your question below.

    1. DC bus voltage applied to motor
         24 [V]
    2. Current limit set in GUI for your application
    ・ Open loop current limit [OL_ILIMIT]: 0.5 [A]
    ・ Current Limit for Torque PI Loop [Ilimit]: 5.0 [A]
    There are many parameters to set and it is difficult for me to know which one is working and when.
    3. Motor parameters such as R, L, Ke / Kt
    ・ DC resistance R
         U-V: 11.75[Ω]
         U-W: 11.79[Ω]
         V-W: 11.78[Ω]
    ・ L (at 1KHz)
         U-V: 541.13[μH]
         U-W: 531.17[μH]
         V-W: 526.67[μH]
    ・ Ke / Kt
         Ke: 0.01274[Vs/rad]
         Kt: 12.7 [mNm / A]

    Thanks,
    Tetsuya K

  • Hi Kobayashi,

    In general it is quite challenging to tune low power motors. I see that you are using a low inductance motor. Can you increase the PWM output frequency (switching frequency) to 50 kHz or even higher? Also, can you set the Abnormal BEMF fault threshold % to 10%?

    Regards,

    Vishnu.

  • Hi Vishnu,

    Thank you for your response.
    I am a beginner in motor control.
    So I didn't know that it was difficult to control low power motors.

    I will answer your question below.

    PWM output frequency
    I increased it from 30 to 50 [kHz], but the motor stopped in a closed loop.
    And the motor current became larger.
    By the way, I need to rotate the motor at a low speed of 30 [fps],
    The lower the PWM output frequency, the more stable it rotated.

    Abnormal BEMF threshold
    When I changed from 40 to 10 [%],
    Abnormal BEMF fault is no longer indicated.
    However, the rotation of the motor often stopped, and it moved jerky and could not rotate stably.

    Thanks,
    Tetsuya K

  • Hi Tetsuya,

    I checked your EEPROM configuration and noticed that the inductance is programmed incorrectly. I made some modifications to the EEPROM configuration. Can you try the attached EEPROM configuration (JSON file)? If it works then I will explain the changes I made. 

    {
      "signature": "oneui-register-data",
      "data": [
        [
          {
            "idx": 0,
            "id": "isd_config",
            "value": "0x04638C20"
          },
          {
            "idx": 1,
            "id": "rev_drive_config",
            "value": "0x283AF064"
          },
          {
            "idx": 2,
            "id": "motor_startup1",
            "value": "0x0A8407D0"
          },
          {
            "idx": 3,
            "id": "motor_startup2",
            "value": "0x12066034"
          },
          {
            "idx": 4,
            "id": "closed_loop1",
            "value": "0x0D3201B4"
          },
          {
            "idx": 5,
            "id": "closed_loop2",
            "value": "0x1AADD858"
          },
          {
            "idx": 6,
            "id": "closed_loop3",
            "value": "0x24000000"
          },
          {
            "idx": 7,
            "id": "closed_loop4",
            "value": "0x0A004870"
          },
          {
            "idx": 8,
            "id": "speed_profiles1",
            "value": "0x000007E8"
          },
          {
            "idx": 9,
            "id": "speed_profiles2",
            "value": "0x70000000"
          },
          {
            "idx": 10,
            "id": "speed_profiles3",
            "value": "0x00000000"
          },
          {
            "idx": 11,
            "id": "speed_profiles4",
            "value": "0x00000000"
          },
          {
            "idx": 12,
            "id": "speed_profiles5",
            "value": "0x00000000"
          },
          {
            "idx": 13,
            "id": "speed_profiles6",
            "value": "0x00000000"
          }
        ],
        [
          {
            "idx": 0,
            "id": "fault_config1",
            "value": "0x5FE8820E"
          },
          {
            "idx": 1,
            "id": "fault_config2",
            "value": "0x74008000"
          }
        ],
        [
          {
            "idx": 0,
            "id": "pin_config",
            "value": "0x2DD0E480"
          },
          {
            "idx": 1,
            "id": "device_config1",
            "value": "0x08000001"
          },
          {
            "idx": 2,
            "id": "device_config2",
            "value": "0x00003000"
          },
          {
            "idx": 3,
            "id": "peri_config1",
            "value": "0x00000000"
          },
          {
            "idx": 4,
            "id": "gd_config1",
            "value": "0x00000000"
          },
          {
            "idx": 5,
            "id": "gd_config2",
            "value": "0x00000000"
          }
        ],
        [
          {
            "idx": 0,
            "id": "ana_trim3",
            "value": "0x48004800"
          },
          {
            "idx": 1,
            "id": "ana_trim4",
            "value": "0x00000000"
          },
          {
            "idx": 2,
            "id": "ana_trim5",
            "value": "0x00000013"
          },
          {
            "idx": 3,
            "id": "ana_trim6",
            "value": "0x00000000"
          },
          {
            "idx": 4,
            "id": "ana_trim7",
            "value": "0x00000000"
          },
          {
            "idx": 5,
            "id": "ana_trim8",
            "value": "0x00005C95"
          },
          {
            "idx": 6,
            "id": "ana_trim9",
            "value": "0x008D55D7"
          },
          {
            "idx": 7,
            "id": "ana_trim10",
            "value": "0x537E013A"
          }
        ],
        [
          {
            "idx": 0,
            "id": "int_algo_1",
            "value": "0x00020000"
          },
          {
            "idx": 1,
            "id": "int_algo_2",
            "value": "0x00000140"
          }
        ],
        [
          {
            "idx": 0,
            "id": "gate_driver_fault_status",
            "value": "0x00000000"
          },
          {
            "idx": 1,
            "id": "controller_fault_status",
            "value": "0x00000000"
          }
        ],
        [
          {
            "idx": 0,
            "id": "algo_status",
            "value": "0x81250000"
          },
          {
            "idx": 1,
            "id": "mtr_params",
            "value": "0x00000000"
          },
          {
            "idx": 2,
            "id": "algo_status_mpet",
            "value": "0x0A000000"
          }
        ],
        [
          {
            "idx": 0,
            "id": "algo_ctrl1",
            "value": "0x20000000"
          }
        ],
        [
          {
            "idx": 0,
            "id": "algo_debug1",
            "value": "0x00000000"
          },
          {
            "idx": 1,
            "id": "algo_debug2",
            "value": "0x00000000"
          },
          {
            "idx": 2,
            "id": "current_pi",
            "value": "0x00058007"
          },
          {
            "idx": 3,
            "id": "speed_pi",
            "value": "0x00000000"
          }
        ],
        [
          {
            "idx": 0,
            "id": "speed_ref_closed_loop",
            "value": "0x00000000"
          },
          {
            "idx": 1,
            "id": "vm_voltage",
            "value": "0x033F4000"
          },
          {
            "idx": 2,
            "id": "voltage_gain_feedback",
            "value": "0x00000001"
          },
          {
            "idx": 3,
            "id": "csa_gain_feedback",
            "value": "0x00000003"
          },
          {
            "idx": 4,
            "id": "phase_voltage_va",
            "value": "0x00000000"
          },
          {
            "idx": 5,
            "id": "phase_voltage_vb",
            "value": "0x00000000"
          },
          {
            "idx": 6,
            "id": "phase_voltage_vc",
            "value": "0x00000000"
          },
          {
            "idx": 7,
            "id": "id_ref_closed_loop",
            "value": "0x00000000"
          },
          {
            "idx": 8,
            "id": "iq_ref_closed_loop",
            "value": "0x00000000"
          },
          {
            "idx": 9,
            "id": "id",
            "value": "0x00000000"
          },
          {
            "idx": 10,
            "id": "iq",
            "value": "0x00000000"
          },
          {
            "idx": 11,
            "id": "vd",
            "value": "0x00000000"
          },
          {
            "idx": 12,
            "id": "vq",
            "value": "0x00000000"
          },
          {
            "idx": 13,
            "id": "ialpha",
            "value": "0x00000000"
          },
          {
            "idx": 14,
            "id": "ibeta",
            "value": "0x00000000"
          },
          {
            "idx": 15,
            "id": "valpha",
            "value": "0x00000000"
          },
          {
            "idx": 16,
            "id": "vbeta",
            "value": "0x00000000"
          },
          {
            "idx": 17,
            "id": "bus_current",
            "value": "0xFFFCF3B1"
          },
          {
            "idx": 18,
            "id": "ipd_state",
            "value": "0x00000000"
          },
          {
            "idx": 19,
            "id": "isd_state",
            "value": "0x00000000"
          },
          {
            "idx": 20,
            "id": "algorithm_state",
            "value": "0x00000000"
          },
          {
            "idx": 21,
            "id": "phase_current_a",
            "value": "0x00000000"
          },
          {
            "idx": 22,
            "id": "phase_current_b",
            "value": "0x00000000"
          },
          {
            "idx": 23,
            "id": "phase_current_c",
            "value": "0x00000000"
          },
          {
            "idx": 24,
            "id": "ipd_angle",
            "value": "0x00000000"
          },
          {
            "idx": 25,
            "id": "isd_speed",
            "value": "0x00000000"
          },
          {
            "idx": 26,
            "id": "speed_ref_open_loop",
            "value": "0x00000000"
          },
          {
            "idx": 27,
            "id": "iq_ref_open_loop",
            "value": "0x00000000"
          },
          {
            "idx": 28,
            "id": "iq_ref_rotor_align",
            "value": "0x00000000"
          },
          {
            "idx": 29,
            "id": "ed",
            "value": "0x00000000"
          },
          {
            "idx": 30,
            "id": "eq",
            "value": "0x00000000"
          },
          {
            "idx": 31,
            "id": "theta_est",
            "value": "0x00000000"
          },
          {
            "idx": 32,
            "id": "speed_fdbk",
            "value": "0x00000000"
          },
          {
            "idx": 33,
            "id": "sin_commutation_angle",
            "value": "0x00000000"
          },
          {
            "idx": 34,
            "id": "cos_commutation_angle",
            "value": "0x00000000"
          }
        ]
      ]
    }

    Regards,

    Vishnu

  • Hi Vishnu,

    Thank you for adjusting for me.

    I tried with your .json file but the motor didn't rotate well.
    It stopped in a closed loop.
    It wasn't jerks, the fault wasn't indicated.
    The algorithm state is "Closed loop aligned".

    Thanks,
    Tetsuya K

  • Ok, so the programmed BEMF constant might be incorrect. How many poles does your motor have?

  • My motor has 4 poles.

    Motor parameters
         Ke: 0.01274[Vs/rad]
         Kt: 12.7 [mNm / A]

  • Based on Kt that you provided, BEMF constant in mV/Hz is 40 mV/Hz (Line-Line) and 23 mV/Hz (Line-neutral). Can you try both values and see if this helps resolve the issue?

    Regards,

    Vishnu

  • Hi,

    I tried setting the BEMF constant to 23 and 40 [mV / Hz], but neither setting gave me the rotation I wanted.

    If the value is 23, the motor stopped in a closed loop,
    if it is 40, the motor current was higher than I expected in a closed loop.
    (actually, I did not measure the current,the supply current to the evaluation board was limited (750 [mA])).

    Thanks,
    Tetsuya K

  • Hi Tetsuya,

    Under open loop, can you disable auto-handoff and set the handoff threshold % to around 10% and keep increasing this until the motor successfully enters closed loop?

    Regards,

    Vishnu

  • Hi Vishnu,

    When I raised the handoff threshold value to about 30 [%], the motor started to rotate stably in a closed loop.
    * I also raised the Open loop acceleration coefficient A1.
    This looks similar when I hold down the rotation with my finger.

    I still have some issues, but this one has been resolved.
    I will close this thread and post a new one.

    Thank you for your kind support.
    Tetsuya K