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.

Using the IPD and HFI together with the CLA

We are using the InstaSPIN FOC for quite a while in our application and everything is running fine.

We use the CLA to calculate the ADC-values for currents and voltages into the correct value.

It will also be evaluated, which current measurement has to be done first and depending on that, the two channels which have the shortest PWM-low-time are measured together, therefore the ADC gets all the time reconfigured. If one channel cannot be measured, because the time is too short, we measure only the other 2 channels, as well together.

The clarke-transformation for voltage and for current are also done inside the CLA.

Also the offset calculation is done inside the CLA.

The PWM also gets set inside the CLA.

This does all function as we expected it, the whole application runs without any problems. Maybe even better than the labs, because we measure the voltage of the 3 phases before and after the current measurement and use the mean-value.

Now we tried to use the IPD and HFI libraries. It runs on our hardware, after configuring everything fitting to it.

The motor is only slightly salient, but it seems to be enough to run with lab21.

Now we tried to use our CLA approach together with the IPD and HFI libraries.

This is also working, we left most of the project as it is, only the HAL-module got completely replaced.

But now we see a difference, while we can set the gThrottle_Result inside the lab21 to a value of 0.1 and the motor starts running properly, we can set it only to a maximum of 0.02 in our project using the CLA. If we set it higher the motor starts to oscillate back and forth. Even when we try to adjust the HFI parameters, it does not get better, also raising Kspd did'nt help.

In general everything should work the same, with and without the CLA. Both is measuring the currents and voltages and setting the PWM.

Since everything is hidden inside the library, I have no clue where we should look at.

Does anybody of you have an idea, why it is not working with our CLA-approach?

Can you recommend me a way to debug the different behaviour, at what parameters should I look at?

Thank you in advance!

Best regards,

Markus