this is using GA to optimize PID control for ball and beam system. Before that, set the paramaters of system before running
File list:
mo phong
.......\LQR control
.......\...........\gocthanhbeam.fig
.......\...........\mophongLQR.mdl
.......\...........\mophongLQR.mdl.r2010b
.......\...........\thongsohethong.m
.......\...........\vitrihonbi.fig
.......\PID control
.......\...........\slprj
.......\...........\.....\_sfprj
.......\...........\.....\......\mophongPID
.......\...........\.....\......\..........\_self
.......\...........\.....\......\..........\.....\sfun
.......\...........\.....\......\..........\.....\....\html
.......\...........\.....\......\..........\.....\....\....\chart2_URrYS9aq83zGgUqVCA4eWH
.......\...........\.....\......\..........\.....\....\info
.......\...........\.....\......\..........\.....\....\....\binfo.mat
.......\...........\.....\......\..........\.....\....\....\chart2_URrYS9aq83zGgUqVCA4eWH.mat
.......\...........\.....\......\..........\.....\....\src
.......\...........\.....\......\..........\.....\....\...\c2_mophongPID.c
.......\...........\.....\......\..........\.....\....\...\c2_mophongPID.h
.......\...........\.....\......\..........\.....\....\...\c2_mophongPID.obj
.......\...........\.....\......\..........\.....\....\...\lccstub.obj
.......\...........\.....\......\..........\.....\....\...\mophongPID_sfun.bat
.......\...........\.....\......\..........\.....\....\...\mophongPID_sfun.c
.......\...........\.....\......\..........\.....\....\...\mophongPID_sfun.exp
.......\...........\.....\......\..........\.....\....\...\mophongPID_sfun.h
.......\...........\.....\......\..........\.....\....\...\mophongPID_sfun.lib
.......\...........\.....\......\..........\.....\....\...\mophongPID_sfun.lmk
.......\...........\.....\......\..........\.....\....\...\mophongPID_sfun.lmko
.......\...........\.....\......\..........\.....\....\...\mophongPID_sfun.obj
.......\...........\.....\......\..........\.....\....\...\mophongPID_sfun_debug_macros.h
.......\...........\.....\......\..........\.....\....\...\mophongPID_sfun_registry.c
.......\...........\.....\......\..........\.....\....\...\mophongPID_sfun_registry.obj
.......\...........\.....\......\..........\.....\....\...\rtwtypes.h
.......\...........\.....\......\..........\.....\....\...\rtwtypeschksum.mat
.......\...........\Cross_BLX.m
.......\...........\Cross_Twopoint.m
.......\...........\Decode_Decimal_Unsigned.m
.......\...........\Encode_Decimal_Unsigned.m
.......\...........\gocthanhbeam.fig
.......\...........\Init.m
.......\...........\mophongPID.mdl
.......\...........\mophongPID_sfun.mexw32
.......\...........\Mutate_Random.m
.......\...........\Mutate_Uniform.m
.......\...........\pidGA.m
.......\...........\PID_thayLuu.m
.......\...........\Select_Linear_Ranking.m
.......\...........\thongsohethong.m
.......\...........\thongsoPIDtimduoc.txt
.......\...........\vitrivienbi.fig