controller settings

I have a analog PI controller connecting to final control element through driver and using arduino for data logging purpose only. The gains of analog PI controller are alterable using pot. Recently, there was requirement to know how much of Kp and Ki values have changed. Is there a way to know the change of these values by some technique or should we change the design and implement PI controller in arduino to make these parameters configurable?

analog PI controller

You cannot control PI, it's value is fixed 3.1415927... throughout the known universe. In other words, don't assume we will understand what you mean by PI, or the other concepts mentioned in your post.

PI stands for Proportional + integral controller

The unit-step response should reveal more, provided that you know about the related maths. I don't :frowning:

The PID library has display functions e.g. GetKp(), so you can ask the PID what its current settings are. If you want to keep history (or just min max) you'll need to keep a record of what you set the parameters to when you read the pots.

No need to rewrite the library, just set the tuning parameters according to the pot settings and do whatever record keeping you need when you change them.

Unless you have a way of outputting the P & I terms from your controller , then there is no way to measure them . You can’t really do it with maths unless you can characterise the whole loop in the process, ( the response of the controller and the process affect what you will see in a step response)

I can’t see why you would want to keep changing the controller terms anyway, let alone measure them- this sounds like a problem in your process , that needs fixing of a different control technique .

hammy:
I can’t see why you would want to keep changing the controller terms anyway, let alone measure them- this sounds like a problem in your process , that needs fixing of a different control technique .

I can see that in some circumstances, you might want to use the pots for fine tuning the params without having to reload the sketch. A balancebot for example.

From how I read it , the Arduino is seperate from the PI controller - might be wrong , but it’s nit 100% clear

An "analog PI controller" is something analog, not digital. The characteristics of such a bare controller can be determined by its unit-step response, with any environment unplugged.

hammy:
From how I read it , the Arduino is seperate from the PI controller - might be wrong , but it’s nit 100% clear

I do agree.
The OP wants to measure the Kp and Ki values which are adjusted by pots, the Arduino at the moment logs a process controlled by the PI Controller but not the Kp or Ki values.
As already stated, the values of Kp and Ki are internal to the controller and not monitor-able with a simple analog input to the Arduino.
Tom..... :slight_smile: