New to using PIDs. When normalizing a range, we would need to know the maximum and minimum of that range. Since a PID is summing the error in the I portion wouldn't the range be potentially infinite? How would we limit the output to the expected range, (-1 to 1 in my case). Would we also need to normalize the error that is passed in?
In the textbook PID controller, the output is not limited. In a real PID controller the output has saturation limits. Normally you should at least stop integrating when the output is saturated, otherwise the integral term will "wind up" and cause a large amount of overshoot.
I write "at least" because there are other algorithmic barnacles that are often added onto the PID calculation to reduce or eliminate the overshoot or undershoot that would happen even with an ideal controller.
The "velocity" form of the PID controller relies on the output actuator to perform the integration so it does not have that particular problem, however then you have to calculate the derivative for the P term and calculate the 2nd derivative for the D term, which is not easy to do in practice.
After more research, I believe to clip the output to the maximum and minimum values and further research "integral windup" to combat the issues that will cause.