Quote:
Originally Posted by Ether
Yaxis is your setpoint and (m*currentPotValue+b) is your process variable.
Adjust the gain "m" and the offset "b" so that your process variable corresponds to your Yaxis output.
Then,
error = setpoint - process_variable;
motor_voltage_command = Kp*error;
Kp is your proportional gain which you tune for the desired response.
|
So (m*(currentPotValue+b)) should have range of -1 to 1? or it doesn't matter because Kp takes care of that?