feedback controller for percentual variables

24 views Asked by At

I am working on a control system which controls a system based on percentual parameters.

Both the setpoint and output data are in percentages, as well as the integer value which is being controlled.

I am having trouble figuring out how to use a proper feedback controller for this kind of situation, especially since many seem to rely on non-integer values.

For example, if we look at a proportional controller I am left with a few values I cannot use.

if setpoint is 60, and output is 80; we take a gain of 0.5 Use the error which is 20*0.5 = 10. The controller logic will then add 10 to the integer value, there is nothing wrong with this approach.

but what is the setpoint is 61, and output is 86; with the same gain of 0.5. Using the error, which is now 25*0.5 = 12,5. We now have a value which I cannot add to my integer value, since integers don't support doubles. Rewriting the software whereas doubles are used, is not possible.

I am very new to these types on controllers, and I would like some advice on this problem or some sources which can help me understand how to tackle this properly if possible.

0

There are 0 answers