I am trying to udertand the source code for the PID block. The red_pitaya_pid_block module has 3 parameters: PSR, ISR and DSR. Do you use them to denote the fraction bits in the fixed-point arithmetics? Otherwise, I can't understand this
kp_reg <= kp_mult[29-1:PSR] ;
However, the set point parameter set_sp_i according to the C-code
looks like a number without fraction. The same for the P, I, D coefficients.{ /* pid_NN_sp - PID NN set-point in [ADC] counts. */
"pid_11_sp", 0, 1, 0, -8192, 8191 },
Cam someone clarify the purpose of PSR, ISR and DSR parameters?