In the Interrupt routine, I would like to know the number 150 ( in mode x ) and number 200 ( in mode v )
What do they represent ??? ( Ill do a define for those numbers )
switch (mode) {
case 'x':
e = (r - yw);
SerialUSB.print(y);
SerialUSB.print(";");
SerialUSB.print(e);
SerialUSB.println(";");
ITerm += (pKi * e);
if (ITerm > 150) ITerm = 150;
else if (ITerm < -150) ITerm = -150;
u = ((pKp * e) + ITerm - (pKd * (yw - yw_1))); //ARDUINO library style
//u = u+lookup_force(a)-20;
// u = u_1 + cA*e + cB*e_1 + cC*e_2; //ppt linked in octave script
// u = 20*e;//
break;
case 'v':
e = (r - ((yw - yw_1) * Fs*0.16666667));//error in degrees per rpm (sample frequency in Hz * (60 seconds/min) / (360 degrees/rev) )
ITerm += (vKi * e);
if (ITerm > 200) ITerm = 200;
else if (ITerm < -200) ITerm = -200;
u = ((vKp * e) + ITerm - (vKd * (yw - yw_1)));//+ lookup_force(a)-20; //ARDUINO library style
break;
In the Interrupt routine, I would like to know the number 150 ( in mode x ) and number 200 ( in mode v ) What do they represent ??? ( Ill do a define for those numbers )