Tool/software: Code Composer Studio
int32 kp;
iv.pis.p = iv.pis.kp * steady_state_error; //Q15*Q12
Why Kp defaults to Q15 in PID?
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.
Tool/software: Code Composer Studio
int32 kp;
iv.pis.p = iv.pis.kp * steady_state_error; //Q15*Q12
Why Kp defaults to Q15 in PID?
Hello
I would think its Q15 as you get enough resolution, but are still under 32 bits when multiplying by a Q12 (the error is from the 12-bit ADC so will always be Q12).
Hope this helps
best regards
Cormac