I am using the InstaSPIN BLDC and InstaSPIN FOC and I want to know how I would go about knowing the values of Kp and Ki for controlling the motor in velocity and current mode? Also is there a formula for the InstaSPIN FOC gui as well?
Thank you.
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.
I am using the InstaSPIN BLDC and InstaSPIN FOC and I want to know how I would go about knowing the values of Kp and Ki for controlling the motor in velocity and current mode? Also is there a formula for the InstaSPIN FOC gui as well?
Thank you.
InstaSPIN-FOC
Current Controllers:
Per page 27 of C:\ti\motorware\motorware_1_01_00_12\docs\guis\universal\qsg_gui_universal.pdf
Current Controllers
The Iq and Id Current PI controller gains are numerically calculated & initialized
- Kp = ¼ * Bandwidth
- Bandwidth = [ Ls / CTRL_FREQ_Hz * IQ_CURRENT / IQ_VOLTAGE ]
- This ¼ factor is just to loosen the controller to support initial motor bring-up
- For high speed and high dynamics you must increase Kp by up to a factor of 4
- (this was true before we released the angle compensation capability)
- Ki = CTRL_FREQ_Hz / Ls * Rs
These can be changed simply through the GUI, which instruments the following user code
gMotorVars.Kp_Idq = CTRL_getKp(ctrlHandle,CTRL_Type_PID_Id);
CTRL_setKp(handle,CTRL_Type_PID_Id,gMotorVars.Kp_Idq);
Some applications may want to do step response testing to meet desired response of over/undershoot and settling time
Note, current controllers can only be updated starting in proj_lab5a, previous to this any changes to those variables in the GUI will have no effect
There is also information on the speed controller in this doc.
And there is a large section in the proj_lab05b write-up (which comes from Dave Wilson's blog series)
C:\ti\motorware\motorware_1_01_00_12\docs\labs\instaspin_labs.pdf
InstaSPIN-BLDC doesn't do automatic tuning.
But the same forumulas can be used...this is straight out of control theory text books.
After reviewing the motorware folder. I have a quick question regarding Speed Controller section in the TI Spins Motors.pdf - for determining the value of Kp and Ki, terms such as MAX_HZ, MAX_CURRENT, IQ_CURRENT and CTRL_HZ can be determined from user.h? Does this also apply for InstaSPIN BLDC ?
For InstaSPIN-FOC the speed controller are not tuned. The formula is a good starting point for stability, but not tuned.low inertia motors will need MUCH smaller values while large inertia will need much larger.
The instaspin_labs proj_lab05b discusses calculating these gains if you know your inertia.
5c uses InstaSPIN-MOTION To do inertia ID and allows you to tune velocity (and position in lab 13) with a single variable.
Regarding the lab 5b document you suggested is there any similar document which contains information for InstaSPIN BLDC?
Is the speed loop tuning the same even when the motor is operated on low speed? If no, why?
If you use SpinTAC from InstaSPIN-MOTION typically the same tuning works across entire operating range.
For PI you typically need to stage a few sets of gains across operating conditions.
Chris,
Regarding the lab 5b, can you please explain what is Mech(s) is in equation 14?
Also please explain (k/s).
Thank you.
S domain. This is basic control theory....which really just confuses you as it is the theoretical background for a control system...but it is not required to understand any of the equations to use InstaSPIN.
Look at the example on page 96.
Or, tune by trial and error.
Or, tune by step response.
Or, use InstaSPIN-MOTION SpinTAC and be done in about 5 minutes :)