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.
Currently, the reference code and library can't be used for F280041 directly. We are working on updating the IPD&HFI library for the latest C2000 device including F28004x. Will let you know if it's ready. Thanks!
BTW, please let's know the detailed questions if you try to design an IPD&HFI algorithm by yourself.
Is there a timeline from when the code and library will be ready? Is there an early release that can be shared or tried?
Is there nothing available for F280041 that can improve my start from zero?
We have implemented our own IPD but after it runs, there is still backwards movement so it does not seem to be transitioning well from IPD to the observer. Can you provide guidance/help to transition from our IPD to the Instaspin Observer? Is there a step we are missing or not turning off properly? We have tried turning force angle off but its still not working as we thought as the rotor rotates backwards a several degrees.
Is it possible to take these questions offline and discuss via email?
Sorry. It's difficult to share the code with you early, and we don't have a solid schedule to release it.
Is there nothing available for F280041 that can improve my start from zero?
No yet if want to start the motor with full load.
We have implemented our own IPD but after it runs, there is still backwards movement so it does not seem to be transitioning well from IPD to the observer. Can you provide guidance/help to transition from our IPD to the Instaspin Observer?
You can try to set the angle form IP to the estimator for start with InstaSPIN-FOC.
You can try to use the code as below:
EST_setAngle_rad(obj->estHandle, obj->angleFOC_rad);
Can you detail where that code should live?
Should anything be commented out once used?
I would think force angle might not be needed at that point?
Can you detail where that code should live?
You can add the code in ISR or control loop after you enable the FAST estimator and try to start the motor.
Should anything be commented out once used?
No.
I would think force angle might not be needed at that point?
No. Force angle is for the low speed, not for the rotor alignment.
Should force angle be turned off or is it expected to have no impact?
When the motor currently starts (no IPD), force angle has an impact to quality of start.
If you don't use the HFI for low speed, it's better to enable force angle.
Yes, as described in InstaSPIN user's guide as below
Having an incorrect Rs value (especially a value higher than the actual Rs) will make the start-up behave poorly. You might refer to chapter 14 "Managing Full Load at Startup, Low-Speed and Speed Reversal" in InstaSPIN-FOC and InstaSPIN-MOTION User's Guide
https://www.ti.com/lit/spruhj1
I don't see HFI in the UG, do I have access somewhere on how to implement it?
UG 14.5.2.2 Fastest Motor Startup with Full Load and Motor Alignment Example:
This seems like the most relevant section to me. Rs recalibration though describes describes the motor physically moving during realignment. If I am implementing an IPD then I should not be ding Rs recalibration?
My motor has a one way bearing that is used as a backstop, therefore the motor only physically turns in one direction.
Yes. The User's Guide doesn't include IPD contents. Currently, the IPD&HFI only supports IPM motor with significant saliency ratio, and it can't be implemented with InstaSPIN-FOC on F28004x.
Rs is not necessary. You can use your own IPD algorithm to detect the initial rotor position.
Ok. We will review our implementation from the IPD to the estimator. Maybe there is an issue here.
You can add the code in ISR or control loop after you enable the FAST estimator and try to start the motor.
Can you share this in more detail - maybe a screen shot from code composer so we can get it right?
Yanming can you ellaborate on which code is enabling the Fast estimator?
You can add the code in ISR or control loop after you enable the FAST estimator and try to start the motor.
We are currently running IPD after InstaSpin is turned on and enabled. I am not sure this is the same thing as enabling FAST estimator or not.
I am based in Houston and close to Sugarland. Is it possible to bring my board/motor and help work through the integration? I feel that will help get to the solution more efficiently.
Which example lab are you using? You may add the code after you enable the FAST estimator as below. Or when you try to start the motor to use the angle from the FAST estimator.
// enable the estimator
EST_enable(obj->estHandle);
EST_setAngle_rad(obj->estHandle, obj->angleFOC_rad);
It should be based off of Lab07 and will confirm.
Below is what the code looks like at Enable the Estimator.
Should I update from Est_enable(estHandle) to Est_enable(obj->estHandle)
Then insert est_setAngle_rad(obj->estHandle, obj->angleFOC_rad) below on line 664?
Is there an example you can share based on the IPD work that is coming?
Are you able to give a high level breakdown of how we should be implementing IPD and integrating with Instaspin?
Is there an example you can share based on the IPD work that is coming?
Sorry. There is not a IPD&HFI example for F28004x.
Are you able to give a high level breakdown of how we should be implementing IPD and integrating with Instaspin?
As mentioned above, we are planning to work on this. If you just want to use the IPD to detect the initial position for startup without reveres rotation, you just need to do the IPD first, and set the detection initial angle to start/run the FAST.
This seems a bit more simple then what I expect it will take to implement the handoff between IPD to the start of FAST.
Do you know this will work based on actual implementation of your own IPD?
Do you have experience with the motor starting under load after IPD and transitioning to FAST to know if it will be able to?
Do you know this will work based on actual implementation of your own IPD?
Do you have experience with the motor starting under load after IPD and transitioning to FAST to know if it will be able to?
IPD is just for initial position detection that can be used for low speed. HFI method is used for IPD and low speed. If you need to run the motor with low speed and heavy load. The IPD is not enough, and it's better for avoiding the reversing rotation.
As mentioned above, the current IPD&HFI only works for the IPM motor with significant saliency ratio. So I am nor sure that it's able to your motor.
Yes, IPD is just for position detection. What do you consider low speed?
HFI is used in conjunction with IPD for low speed operation?
If you need to run the motor with low speed and heavy load. The IPD is not enough, and it's better for avoiding the reversing rotation.
Is this supposed to be one complete sentence? What is considered low speed and heavy load here? Is low speed 10% of RPM rating and high load 90% of torque rating? I would imagine it varies by system but is there a rough estimate?
I do have an IPM motor. How would I determine if there is significant saliency ratio?
Yes, IPD is just for position detection. What do you consider low speed?
HFI is used in conjunction with IPD for low speed operation?
Yes. You have to use HFI or Sensored based FOC for low speed.
Is this supposed to be one complete sentence? What is considered low speed and heavy load here? Is low speed 10% of RPM rating and high load 90% of torque rating? I would imagine it varies by system but is there a rough estimate?
Yes. The estimation angle will be not accurate and stable that can be difficult to run the motor with higher load. Not a specific data that depends on the motor and current&voltage sampling circuit.
I do have an IPM motor. How would I determine if there is significant saliency ratio?
You can get the motor parameters (Ld and Lq) from its manufacturer.
I have a single value for inductance (line to line) so it must not be significantly salient, correct?
With IPD the estimation angle isn't expected to be 100% accurate, I understand that.
It is expected to give single direction start, correct?
Based on the accuracy there will be a torque loss until FAST takes over. If the IPD estimation was 50% accurate then would I expect 50% of max torque until FAST takes over?
I have a single value for inductance (line to line) so it must not be significantly salient, correct?
Seems like correct. You need to confirm this with the motor's manufacture.
It is expected to give single direction start, correct?
As replied to you. The IPD&HDI only works for IPM motor. If the motor is SPM with Ld is equal or close to Lq, the IPD&HFI doesn't work and can't detect the initial rotor position as you want for avoiding the reverse. You have to use your own IPD algorithm to detect the initial rotor angle and set the angle to FAST to start and run the motor as mentioned before.
Based on the accuracy there will be a torque loss until FAST takes over. If the IPD estimation was 50% accurate then would I expect 50% of max torque until FAST takes over?
I am no fully understand what do you mean. If you don't need to run the motor with very low speed and just start the motor to a higher motor, the FAST should be fine as mentioned above.
Yanming - Right now we have IPD running, an angle is generated, but instaspin does not take the angle. The motor starts with the same response as if IPD did not run. We were also able to test the IPD without integrating into instaspin so there is an issue of instapsin not taking the value properly.
You may try to insert IPD code as below in mainISR().
if(ipd_run_flag == true)
{
EST_setAngle_rad(estHandle, angle_IPD_rad);
if(ipd_done_flag == true)
{
IPD_run();
ipd_run_flag = false;
ipd_done_flag = false;
}
}
//
// run the estimator
//
EST_run(estHandle, &estInputData, &estOutputData);
You may send your code to me if you still have any further questions on this.
We will update our code to match. Our code is not far from what you showed.
What is the best way to share our code for your review?
You can have a try first as mentioned above. You may send me the email if you still have any questions on this. I can send a link to you for uploading the codes to TI drive.
This did not work.
When we move the IPD execution to that spot Instaspin takes over before IPD completes. We are able to successfully run IPD at the beginning of the ISR and set the angle in the suggested position.
Please send me your email, and then I can send you a link for sharing your project codes with me. Thanks!
Will check it. Seems like the control flow is right, but I am not sure that the angle of the IPD is correct, so you may try to use the alignment method to verify this.
What makes you think the angle is incorrect?
How would I use the alignment method to verify?
The initial test I ran - we moved the rotor by hand 360 degrees and ran IPD to verify the values at least made sense. Then we moved repeatedly from position A to position B and test IPD at each position. The values seemed repeatable.
Right now it seems like the estimator isn't taking the IPD value but sort of ignoring it and doing its normal start, therefore wobbling back/forth when out of position.
Yes, have done. Can you upload the whole project to the link I shared with you? I may test the project directly on a board directly.
Yes, I can get the files. But don't have an opportunity to test the code yet. May will do this in a couple of days.
Have taken a look your project. Seems like the control flow is correct if the "motor.ipd.flag" is set to "0" and set the angle from your IPD module to the FAST estimator, and reset the values of the Ui of speed, Id and Iq controller to zero to run/start the motor with FAST estimator.
If the control flow is correct, is there a reason you see its not working?
Were you able to test the code on a board directly?
Just checked the codes to understand the control flow you used. It's difficult to test your code on a kit directly in a short time. What happens when you try to start the motor? Any load is adding on the motor during startup?
IPD runs, but the motor start acts the same as if there is no IPD. The rotor wiggles backwards majority of the time. Its like IPD is being ignored and reverts to the default start.
Any load during this test? Is it possible to check the rotor angle using the on-chip DAC?
Used the alignment mode to test the flow that seems works. 1. Injection a current on d-axis, and set the angle to "0.0". 2. Start the motor enabling the force angle. You can have a try to see what happens.
1 - injection current is IPD, correct?
- which angle are you setting to 0.0?
I assume its not the IPD
If its not the IPD angle is it the default starting angle from the Instaspin start?
2 - ok
did you test this on an actual motor with my IPD code?
Does the IPD angle then get added to the 0.0 and should then be the correct starting angle?