re
Hi guys,
currently I have these settings:
kp = 1
ki = 0.25
kd=0
so it is indeed a PI controller.
Use 50% proportional control and set the integral part for 1.5min initially. If the circuit reacts too slowly decrease timing or increase the P-value to 60%.
Just to confirm, you are saying to use:
kc=0.5
ki=1.5 (or more)
and tackle slow response by increasing the sample rate? I will give it a go, shouldn't hurt.
I agree 1000ms is a bit slow and I can go lower (50ms is the minimum at the moment but I can change that), I used that value simply because the pump response was a bit slow and thus I thought it would be better to sample less frequently.
Why not just wait the 4-5 seconds after the pump started...
That was my initial idea, but if I start the pump in manual mode and apply max voltage to it, so that it runs at max speed and fills the chamber very quickly it's quite hard to switch back to auto mode without getting overshoot. The reason behind this is that with the control signal being at maximum when the PID goes to auto it's needs a moment to decrease it and that means overshot. I can't keep the signal to the pump at maximum and start the PID auto mode with control signal set to 0 as this will mean a sudden dip in pump speed when the PID takes over the control and keeps increasing the voltage from 0. I would really need the pump signal to sit at around 50%-75% before the PID kicks in, so it doesn't start at max control signal and even after a second or two it doesn't go way above the setpoint. This actually led me to the following idea:
What if I was to change the parameters of the PID after 4-5s (or when the pressure starts to rise)? that way I could have two controlers, one for the very slow/no rise phase to build up the pump voltage slowly, and one for the phase when the chamber is full and the pump is more responsive. The pump acts a bit like having two types of behavour, so I can use two different types of parameter sets to cope with that.
OR
Setting the controller to Manual mode, sitting at say 50% max output and when the pressure starts to rise switch to Auto mode.
I always have my PID controllers either in Manual or tracking mode while the equipment stream they are to control is not operational. That prevents integral windup.
So when you switch from Manual to Auto what happens to the control signal? I see this as a bit of a problem, unless you set the controller output to something quite small in Manual mode and leave it at that level when the PID Auto kicks in. Also can you explain tracking mode a bit more?
Just as a note this is a very simple 8-bit PID controller with an 8bit output value which is limited to 150. That corresponds to around 3V on the PWM output from the uC (0=0V, 150=3V). The pump itself is not super fast, it takes around 1000ms to see the changes of the voltage, so nothing happens quickly in the system.
Regards,
dsc.