Genetic Algorithm with PID Control system
1.3 The Input of The Control System
4 periods of standard rectangular signal
Each period was cut into 60 pieces (ticks)
1.2 The Output And PID Setting of The Control System
pip install pipenv
pipenv shell --python 3.9
pipenv install
Open the src/main.ipynb
file, and run all cells
The result table is based on the following settings of genetic algorithm:
population number
: 50
iteration number
: 100
mutation probability
: 0.1
crossover rate
: 0.9
PID value boundary
: [0, 1]
eta value boundary
: [0.30001, 0.69999]
fitness function
:
Control System Output
Chromosome Value
Control System Setting
P / I / D / eta: 0.990 / 0.249 / 0.021 / 0.3001
initial_y_now / u_boundary: -2 / [-20, 20]
P / I / D / eta: 1.000 / 0.301 / 0.025 / 0.3001
initial_y_now / u_boundary: 0 / [-20, 20]
P / I / D / eta: 1.000 / 0.269 / 0.012 / 0.3001
initial_y_now / u_boundary: 2 / [-20, 20]
P / I / D / eta: 0.938 / 0.249 / 0.030 / 0.3001
initial_y_now / u_boundary: -2 / [-50, 50]
P / I / D / eta: 1.000 / 0.257 / 0.000 / 0.3001
initial_y_now / u_boundary: 0 / [-50, 50]
P / I / D / eta: 1.000 / 0.251 / 0.006 / 0.3001
initial_y_now / u_boundary: 2 / [-50, 50]