cvra / pid

A PID controller implementation
68 stars 27 forks source link

Sign / (scaling) factor for filter output #7

Closed froj closed 10 years ago

froj commented 10 years ago

Sometimes we need to flip the sign of the filter output because of how our hardware is constructed. Should this be a property of our filter or some other abstraction layer?

Stapelzeiger commented 10 years ago

If it's just a question of motor cabling it should be done in the hardware abstraction. For more complex systems (like the holonomic base) there should be a transformation function applied after the PID mapping control outputs to motors. Scaling factors for output are no longer necessary, because we have float P, I and D parameters.

antoinealb commented 10 years ago

I agree that this should be done in abstraction layer because it is not always trivial to decide where to switch the sign if you do it in the controller and you can easily end up with a positive feedback system...

froj commented 10 years ago

OK, I think we all agree.