Skip to content

darkfanxing/genetic-algorithm-with-pid-control-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Genetic Algorithm with PID Control system

1. Control System I used

1.1 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

2. Execute Project

2.1 Environment Setup

pip install pipenv
pipenv shell --python 3.9
pipenv install

2.2 Run the Project

Open the src/main.ipynb file, and run all cells

3. Results

The result table is based on the following settings of genetic algorithm:

  1. population number: 50

  2. iteration number: 100

  3. mutation probability: 0.1

  4. crossover rate: 0.9

  5. PID value boundary: [0, 1]

  6. eta value boundary: [0.30001, 0.69999]

  7. 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]

About

A PID Control System with Genetic Algorithm

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published