You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using this code to control the speed of two dc motors. But the output is not what I am expecting. I have set the bias to 0 as I only wish to get the PID value for my error. As I am using two motors and want them to work like differential, I plan to manually add and subtract the PID value with my motor's base speed (base speed = 200).
But the problem is when I set output limits to (0, 255), after mycontroller.calculate() I am getting an output value of either 0 or 255 resulting in my ultimate motor speed1 = base speed + output = 455 and motor speed2 = base speed - output = -55. But I expect a value between 0 and 255 depending on the error. Any hints on how I can achieve that?
The text was updated successfully, but these errors were encountered:
I'm not sure I understand your approach/issue, but regardless: the bias is the output bias. Usually, this is set to the midpoint between your min and max output
I am using this code to control the speed of two dc motors. But the output is not what I am expecting. I have set the bias to 0 as I only wish to get the PID value for my error. As I am using two motors and want them to work like differential, I plan to manually add and subtract the PID value with my motor's base speed (base speed = 200).
But the problem is when I set output limits to (0, 255), after mycontroller.calculate() I am getting an output value of either 0 or 255 resulting in my ultimate motor speed1 = base speed + output = 455 and motor speed2 = base speed - output = -55. But I expect a value between 0 and 255 depending on the error. Any hints on how I can achieve that?
The text was updated successfully, but these errors were encountered: