This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

PID regulator
#8
Try this:

To make it work as expected, i.e output 0-100%:
The p-term is calculated in range 0-1, so it should be multiplied with 100 in the script.
 
Some other points:
Kp = 1 / P-band --> P-band = 4 K -> Kp = 0,25
Ki = Kp / Ti * 100 --> Ti = (1 min * 60 s) -> Ki = 0.42
 
You can easily test this:
Current: 20
Setpoint: 21
P-term immediately gives output: 25%
After 1 min output is 50% (as the I-term is aiming reaching P-term i Ti-time)
 
So if you want 5 K / 240 min
 
Kp = 1 / 5 -> 0,2
Ki = (0,2 / 240 * 60) * 100 -> 0.0014
Reply


Messages In This Thread
PID regulator - by tomnord - 28.01.2021, 08:04
RE: PID regulator - by admin - 28.01.2021, 09:28
RE: PID regulator - by tomnord - 28.01.2021, 10:28
RE: PID regulator - by Daniel - 28.01.2021, 10:55
RE: PID regulator - by tomnord - 28.01.2021, 14:08
RE: PID regulator - by Daniel - 28.01.2021, 14:22
RE: PID regulator - by admin - 28.01.2021, 14:38
RE: PID regulator - by Erwin van der Zwart - 28.01.2021, 18:50
PID regulator - by tomnord - 29.01.2021, 15:36
RE: PID regulator - by tomnord - 01.02.2023, 09:33
RE: PID regulator - by admin - 01.02.2023, 09:37
RE: PID regulator - by tomnord - 01.02.2023, 10:05
RE: PID regulator - by admin - 01.02.2023, 10:28
RE: PID regulator - by tomnord - 01.02.2023, 11:42
RE: PID regulator - by admin - 01.02.2023, 12:03
RE: PID regulator - by tomnord - 01.02.2023, 12:44

Forum Jump: