THIET KE BO DIEU KHIEN THONG MINH TREN NEN DSPIC33F Phgm Xudn Khdnh ^"\ Nguyin Viet Hung, Phgm Tudn Anh ^'" (a) Trudng CDN Cdng nghe cao Hd Ndi (b)Tru-ang Dgi hgc Bach khoa Hd Ngi Tdm tdt: Bdi bdo trinh bdy ve thiet ke hg dieu khien thdng minh tren nin dsPIC33F ciia Microchip Nhieu thugt todn dieu khien dua tren ly thuyet dieu khiin kinh diin vd hifn dgi duac cdi dgt Bo cue bdi bdo cd thi chia thdnh phan Phan I Ca sa ly thuyet thiet ke bg diiu khiin, trinh bdy cu the ve cdc thugt todn dugc cdi ddt: PID, md ddng, PID-Fuzzy Interx'ention vd PIDFUZZY Self- Tunning Phdn 2: Ca sd thiet ke phdn cirng bg diiu khiin, dua nhung im diem cua ddng DSPIC33F vd cdc modules cdn thiet cho irng dgng cdng nghiep Phdn 3: lfng dung bd dieu khien thiet ke cho ddi tirgnig thuc Id binh mire, tdt cd cdc thudt todn diu duac cdi dgt vd cd xet den dnh hudng ciia nhieu, qua dd thi hiin duac uu nhugrc diim cua timg thudt todn vd khd ndng irng dung da dgng ciia bd dieu khien Tir thiet ki phdn cimg vd phdn mim cua bd dieu khien, vd nhung kit c^iid thuc nghiem dd chirng td khd ndng thay thi hiiu qua cua bo dieu khien ndy cho cdc bd diiu khiin chuyen dung dd cd cdng nghiep Chu viit tdt I Integral PD Proportional - Derivative PI Proportional - Integral PID Proportional - Integral - Derivative PWM Pulse Width Modulation I DAT V A N D E Phuang phap dieu khien kinh dien PID Id phuang phdp dugc dp dyng phd bien nhdt cdc bd dieu khien cdng nghiep Sy phd bien Id tfnh dan gidn cua phuang phdp vd yeu cdu ve chdt lugng dieu khien khdng qud cao cua he thdng Phuang phdp dieu khien thong minh, ma md la mgt dai dien tieu bieu dang dugc khai thdc va img dyn» bdi khd ndng hoat ddng mdt cdch dgc lap hodc ket hgp vdi thudt todn PID de dem lai chat lugng cao cho he thdng dieu khien Thiet ke mdt bd dieu khien thdng minh cd khd ndng thyc hien cdc thuat todn PID, Fuzzy dgng, PID-Fuzy Intervention, PID-Fuzzy Self-tunning Id mdt hudng di hiia hen tuong lai De xdy dung mdt bd dieu khien nhu vay, thiet ke phdn cung ddi hdi viec sir dyng ddng vi dieu khien cd dung lugng nhd Idn, tdn sd boat dgng cao vd cdc yeu cdu can thilt khdc ve ngoai vi Ddng dsPIC33F mgt nhung ddng vi dilu khiln manh nhdt hien cua Microchip vdi nhieu tfnh ndng uu viet - Id sy lya chgn phii hgp, ddp ung dugc yeu cdu II CO SO LY THUYET DIEU KHIEN 2.1 Thuat toan dieu khiln PID Thudt todn PID[I,6] Id sy kit hgp ciia ba thdnh phdn: Khulch dai (P), vi phdn (I) va vi phan (D) ciia sai lech ddu vdo Uu diem Idn dem lai iing dyng rdng rai cho thudt todn Id tfnh don gidn ve cau triic vd nguyen ly lam viec Vdi he thdng lam viec mdi tmdng ft bj dnh 714 Kp * • Doitixcmg Kd.5 Hinh He dieu khiln thirc hien thuat toan PID hudng CLia nhieu, thdng sd ciia doi tugng chi thay doi nhd qua trinh Idm viec va yeu cdu ve chfnh xac va on djnh khdng cao thi PID la mdt giai phap dieu khien hiru hieu 2.2 Thuat toan dilu khiln md dong Thudt toan md ddng[l,4] la thudt toan ket hgp giiia he kinh dien vd he md, cu the Id su kit hgp ciia thuat todn dilu khiln md co ban va cac phdn P, I, D Cac thdnh phdn P, D thudng Id cac thdnh phdn ciia sai lech dau vao, c6n I Id phdn cua ddu bg dilu khiln mdcobdn 0 Mgt sd cdu true he thyc hien thudt toan md dgng: Thuat toan md dgng PD Thuat toan md dgng PI 1— m •'^',- Bo dii$u e — • «;:, - • d dt > kluennw y(t) iu vao si 20mA, 0-5V, 0-IOV Khoi XU' ly Dau v4o trung tam &lura • Ban phfm cho phep nhdp cdc tham ti/omgnr ti.roiigM sd, che dieu khien tryc tiep tren bd dieu khien T '' T • LCD cho phep hien thj cdc tham so CSflg chi'nh qud trinh thiet lap budc Biiphim LCD RS232 ddu vd cdc bien qud trinh ô ã \ Giao tiep RS232 cho phep bd dieu khien ket ndi vdi mdy tfnh, truyen 0 Hinh 10 Sa cau true bo dieu khien \ nhdn cdc tham sd, che dieu khien vd hien thj qud trinh dieu khien Nhd thilt kl da dang ddu vdo vd theo cac chudn cdng nghiep nhu tren, bd dieu khien cd khd ndng giao tiep vdi nhieu loai thiet bj cdm bien vd chdp hdnh khdc Chuang trinh vi dilu khien dugc viet bdng phdn mem MPLAB 8.0, C30 (Microchip) Phdn giao dien ngudi diing dugc viet bdng phdn mim Visual C+-H 6.0 (Microsoft) Hinh ve sau minh hga cua sd giao dien chi'nh: •XZJ I^^LM^ ^Tnvjrrr.Mf :ằeô;^ÊaURiiKv' ã#tằig^rffJMw.w ^wyãli^Ll' ^n^^'!.^^o;YW^gwftô;w?ytHBffn].^^ằgtf.yằ;?gy* Hinh 11 Ciia so giao dien chinh ciia chuong trinh giao difn nguoi dung 717 IV HE THONG DIEU KHIEN MLIC NU'6C Ddi tugng dilu khiln mire nhu Hinh 12 Thilt bi mire la cam bien dp sudt ddt tai day ciia binh, ddu cdm biln dudi dang^chudn ddng cdng nghiep: 4-20mA, Adapter biln ddi tuyin tfnh tfn hieu ndy thdnh tfn hi?u di?n dp dugc dua vao ADC cua dsPIC33F Co cdu chdp hdnh Id van ti I? dugc dilu khien theo phuang phdp PWM V KE:T QUA TH^C NGHIEM Nhdm tac gid tiln hdnh thf nghiem tr6n ca sd khdo sat dap img cua he thing vdi cdc thuat todn dilu khiln khdc thay dii gid trj ddt dhng thdi cd xem \6t din dnh hudng ciia nhilu: Hinh 12 Dii tugng dieu khien mire nud^c 5.1 Ket qud Hinh 13 Thuat toan PID va Fuzzy d$ng Setpoint=80mm, khong nhieu Hinh 14 Thufit to^n PID, Fuzy d$ng Setpoint=120nun, khong nhiSu mmt Wô-*l /'ã' * 'v.^ K> ằ i K / " »/ C m m 120 sm XB kMHI Hinh 15 Thuat toan PID va PID-FUZZY Intervention; Setpoint=:120mm, khong nhieu 718 Hinh 16 Thudt toan PID, Fuzy dong va PIDFUZZY Self-Tunning Setpoint=100mm, nhieu hang tac dgng tVong thoi gian 5s bat dau tir thoi dilm t=180s ^xd 5.2 Nhan xet Thuat toan PE) c6 chdt lugng dilu khiln phy thugc vdo gia tri ddt, nhu tren cac hinh ve H.13, H.14, H.15, H 16, thay dii gia trj dat, chat lugng dilu khiln kem ddn gia tri dat tang ddn, ddng thdi chju dnh hudng kha rd ciia nhilu Thudt todn Fuzzy dgng dem lai chdt lugng dilu khiln tit ca gid trj ddt thay dii, ddng thdi khdng cd anh hudng cua nhieu thi thudt toan ndy la thudt todn hieu qud nhdt: gan nhu triet tieu qud dieu chinh va gidm thdi gian qua dg Tuy nhien thudt todn khdng dem lai chdt lugng tot nhieu tac dgng Thudt toan PID-Fuzzy Intervention cdi thi^n ddng kl chat lugng dilu khiln tmdng hgp xay hien tugng Windup, dan din qud dilu chinh Idn lie thong (H 16) Thudt todn PID-FUZZY Self-Tunning cd khd nang dem lai chdt lugng dilu khiln khd tdt khong cd dnh hudng ciia nhilu, mat khdc thi hien dugc uu dilm so vdi cdc thudt todn khdc tmdng hgp he thdng cd nhieu tdc ddng (H 17, dudng net dirt) VI KET LUAN Bd dilu khiln dugc thilt kl dya tren ddng vi dilu khiln DSC dsPIC33F cho phep tang hi?u qud tfnh todn, mat khdc lai cd khd ndng kit nli vdo theo cdc chudn cdng nghiep phd biln, qua gdp phdn dem lai khd nang dilu khiln da dang cdc doi tugng cdng nghiep cd chu ky dieu khien Idn nhd khdc nhau,, Bd dilu khien thdng minh (thyc hien cdc thudt todn PID, Fuzzy ddng, PID-Fuzzy Intervention, PID-Fuzzy Self-tunning) cd khd ndng img dyng linh boat, cho chdt lugng dilu khiln tdt thay ddi gid tn ddt vd cd he thing chju dnh hudng ciia nhieu Dilu khdc phyc ban chl ciia bd dilu khien PID kinh diln, thudng khdng dem lai chdt lugng mong mudn he thdng cd gid trj ddt thay ddi khodng rdng hoac cd nhilu tdc ddng Phuang phdp dilu khien md ddc lap hodc kit hgp vdi phuang phdp dilu khiln PID kinh dien dya tren nen vi dieu khien manh, nhu dsPIC33F hira hen khd nang xdy dyng bd dilu khien cdng nghiep tuong lai TAI LIEU THAM K H A O Phan Xudn Minh, Nguyen Doan Phuac; Ly thuylt dilu khiln md; NXB KHKT, 2004 Nguyin Dodn Phuac; Ly thuylt dilu khiln tuyin tfnh; NXB KHKT, 2002 L X Wang; A course in Fuzzy Systems and Control; Prentice Hall Intemational, Inc K M Passino, Stephen Yurkovich; Fuzzy Control; Addison Wesley E Chakir El Alaoui, H Ayad and S Doubabi; Fuzzy Anti-Windup Schemes for PID Controllers; ISSN 0973-4562 Volume Number (2006) pp 295-306 Intemational Journal of Applied Engineering Research Aidan O'Dwyer; Handbook of PI and PID Controller Tuning Rules; Imperial College Press, 2003 Microchip Technology Incorporated; dsPIC33F Family Data Sheet; DS70165A, 2005 719 ... kinh dien dya tren nen vi dieu khien manh, nhu dsPIC33F hira hen khd nang xdy dyng bd dilu khien cdng nghiep tuong lai TAI LIEU THAM K H A O Phan Xudn Minh, Nguyen Doan Phuac; Ly thuylt dilu khiln... mdt cdch hiiu nao dd, ddng la san phdm ket hgp giira vi xir ly tfn hieu sd DSP vd vi dilu khien dsPIC33F, mdt nhiing ddng DSC manh nhat ciia Microchip, sd hiiu rat nhieu ddc tfnh uu viet phu hgp... vdi thu vien phong phd vd dl sir dyng 3.2 Bo dicu khien • Khdi xir ly trung tam Id vi dilu khien dsPIC33F • Ddu vao sd: Digital & Counter • Ddu vdo tuong ty: 0-20mA, 4Nguon 20mA,0-5V,0-10V ~220V