Hoi nghi Khoa hoc ky mim 35 ndm \ 'iin Khoa hoc vd Cong nghi Viit Nam - Hd Not 10 2010<br />
<br />
<br />
<br />
PHAT TRIEN CAC CONG NGHE NHUNG TIEN TIEN TRONG<br />
CAC HE THONG THIET BI THONG MINH PHUC VU DO LU^ONG<br />
DIEU KHIEN VA TRUYEN THONG<br />
Thai Quang Vinh<br />
Vien Cong nghe thong tin<br />
18- Hoang Quoc Viet, Cau Giay, Ha Noi<br />
Email: tqvinh@,ioit.ac.vn<br />
<br />
<br />
Tom tat:<br />
Qud trinh nghiin ciru vd ung dung cdc hi thdng nhiing cho thdy do tinh da<br />
dgng ciig cdc chip nin cita hi nhimg vd sir thay ddi tinh chdt cua cdc bdi todn<br />
irng dung trong do ludng. diiu khiin ddi hoi cdn thiit xdy dung cdng cii nhimg<br />
hiiu qua ddp irng nhanh chdng thiit ki hode thgy ddi cdc thom sd phii hgp vdi<br />
tirng irng dung cu thi. Bdo cdo trinh bdy vi md hinh phdt triin cdc hi thdng<br />
nhimg, xdy dung cdng cu nhimg dug trin phdn mim dd hgg kit ndi cdc khdi hdm<br />
chirc ndng tuang irng vdi tgp cdc md dun thudt todn mdu vd cdc khdi hdm ca ban<br />
trong timg ITnh vuc cu thi ciia do ludng diiu khiin. Cdc hi nhimg cd thi lien kit<br />
vdi nhau qua cdc giao thirc truyin thdng nhdm xir ly cdc thudt todn phirc tgp.<br />
thdng minh trong thdi gian thuc. Cdc chirang trinh irng dung nhung cd thi duo'c<br />
xdy dirng nhanh chdng, linh hogt thgy ddi tu cdc td hap cdc thdnh phdn khdi riing<br />
le trong mdi tnrdng gioo diin dd hgg vd true tiip nhiing vdo cdc he nen tiiu<br />
chudn.<br />
Abstract:<br />
Varied master embedded processors and wide-changed of embedded<br />
application in the field of measurement and control call for effective development<br />
tools in design of embedded applieation sofivares. This report presents the<br />
methodologies in design of embedded systems and some results in developing of<br />
embedded sofivare tools based on graphical programming. The function blocks<br />
and basic operation blocks is built on the set of typical algorithms that results<br />
from decomposition and coordination of measurement's and control's tasks. The<br />
object files created by compilation on graphical programmer's host computer is<br />
ready to be transferred to the standard targed embedded system.<br />
<br />
<br />
I. Md DAU<br />
Cac he thong nhiing tren cac chip nen tien tien ngay cang dugc ung dung manh me trong<br />
cac he thong thiet bi do, dieu khien va truyen thong, nai doi hoi toe do xir ly cao . tinh toan<br />
va xu ly phuc tap cac dir lieu. Viec nghien cuu phat trien cac chip nen nhiing doi hoi dinh<br />
hudng lira chon phii hop nham dap img cac yeu cau thuc te thiet ke va che tao cac thiet bi va<br />
he thong cho cac bai toan img dung trong linh \'uc do luang dieu khien va truyen thong. Mo<br />
hinh phat trien cac he thong nhiing tren nen cac chip can phai lira chon phii hgp theo cau true:<br />
lap img dung - lap phan mem he thong - lap phAn vat ly. Day khong phai la lop cku. true<br />
thong nhat de thiet ke cac he thong nhiing. tuy nhien no mang tinh mo dun hoa cao va cho<br />
phep phan loai va xay dung cac cong cu hieu qua thiet ke cac he thdng nhiing c6 kha nang<br />
<br />
<br />
95<br />
Tieu ban: Cong nghi thong tin - Tir dong hod - Cong nghi Vii tru ISBN: 978-604-913-010-6<br />
<br />
<br />
<br />
thich ung nhanh vai cac thay doi cua cac bai toan iing dung. Ciu true mo dun hoa va phan lop<br />
cua cac he thdng nhiing chu yeu dugc chia theo chirc nang va tinh den quan he phirc hgp giira<br />
cac thanh phan he thong.<br />
II. PHAT TRIFN LCn* TTNG DUNG HE THONG NHUNG<br />
ciu tnic phan ra - tong hgp doi vai cac bai toan do luang di§u khien, xir ly tin hieu va<br />
truy8n thong [5,6] eo thi hinh thanh tong quat nhieu tap hgp cac bai toan ca sa phan cap, lien<br />
quan l§n nhau, trong do doi vai dieu khien ca ban la cac bai toan on dinh che do lam viec ciia<br />
ddi tugng cong nghe dual tac dgng cua nhieu va cac bai toan toi uu cac che do lam viec do.<br />
Cac bai toan phu trg bao gdm lien quan den nhan dang vai cac dac tinh khdng xac dinh ban<br />
dAu ciia doi tugng cdng nghe, lien quan den do luong va xir ly sd lieu nhu lgc sd, tuyen tinh<br />
hda, ndi suy, ngoai suy, kiSm tra, xir ly thdng ke danh gia va uac lugng trang thai... Cac thuat<br />
do va dilu khiln phiic hgp dugc tdng hgp bang each td chiic ket ndi cac thuat toan mau giai<br />
cac bai toan co sd theo cac td hgp khac nhau tuang ung vdi muc tieu dieu khien. Thu vien<br />
thuat toan va chuang trinh mau tuong img vdi cau triic phan cap cac bai toan ca sd vdi day dii<br />
chirc nang do ludng va dieu khien dugc xay dung thanh tap tdi thieu va tieu chuan cac md<br />
dun va dugc chia thanh cac nhdm sau:<br />
- Nhdm kiem tra, do ludng va xir Iy ban dau cac thdng tin sd lieu<br />
- Nhan dang va danh gia cac trang thai ciia ddi tugng dieu khien<br />
- Xac dinh dac tinh va md hinh hda<br />
- Dieu khien vdi chat lugng cho trudc<br />
- Tdi uu cac che do gan tinh ciia qua trinh<br />
- Tdi uu cac che do ddng<br />
Cac khdi ham ea ban hd trg xir ly tin hieu va trao ddi dii lieu dugc td chiic thanh cac nhom<br />
chirc nang khac nhau :<br />
- Nhdm cac ham sd hgc<br />
- Nhdm cac ham logic<br />
- Nhdm cac ham truyen thdng<br />
- Nhdm cac ham xir ly tin hieu sd<br />
- Nhdm cac ham chung<br />
- Nhdm cac ham tao tin hieu<br />
- Nhdm cac ham bien ddi (transform)<br />
- Nhdm cac ham hien thi<br />
- Nhdm cac ham cira sd (Window functions)<br />
- Nhdm cac ham td chirc vao/ra....<br />
Thu vien cac md dun thuat toan va chuang trinh mau tuong ung theo cac nhdm tren_trinh bay<br />
tren bang 1:<br />
Kiem tra - xu ly thong ke<br />
Bdng I<br />
<br />
Hieu chinh va tuyen Kiem tra do tin cay<br />
Lgc so li?u Ndi suy Ngoai suy<br />
tinh hda sd lieu<br />
<br />
Tinh toan danh gia Tinh toan ham tuong Kiem tra cac gia thiet<br />
cac thdng ke quan thdng ke<br />
<br />
<br />
<br />
96<br />
Hgi nghi Khoa hoc ky' niim 35 ndm Vien Khoa hoc vd Cong nghi Viet Nam - Hd Ngi 10/2010<br />
<br />
<br />
<br />
Nhdn dgng - ddc tinh hda - ddnh gid trang thdi<br />
<br />
Nhan dang cac ddi Nhan dang cac kenh<br />
Nhan dang ddi tugng tinh Nhan dang cac<br />
tugng tinh. tuyIn kenh nhieu dieu khien<br />
dang binh phuang<br />
tinh<br />
<br />
<br />
Nhan dang toa Xac dinh dac tinh ddi Danh gia trang<br />
Giai tich hdi quy<br />
dd tugng thai<br />
<br />
Diiu khien vdi chdt luang chg trudc<br />
Dieu chinh PID Dieu chinh hai<br />
Dieu chinh Tinh toan tham Bg<br />
nhieu vdng quan hoac ba trang dieuchinh<br />
PID mdt vdng sd tdi uu PID<br />
he thai PID toi uu<br />
Diiu khiin tdi uu trong che tTnh<br />
Ph. phap don hinh Ph. phap phan bd tai tdi uu Ph. phap phan bd bang tdi uu<br />
<br />
Diiu khien tdi uu trong che do ddng<br />
<br />
Thiet ke giai tich dieu Quy hoach tdi uu theo thdi On dinh toa do tdi<br />
khien gian uu<br />
<br />
Md hinh hgd qud trinh cdng nghi<br />
Md hinh hda ddi Md hinh hda Cac module Tinh toan Tinh toan Ve dd thi<br />
tugng theo ddi tugng ham truyen ham thdi ham tan<br />
ph.trinh trang theo ham dat mau gian sd<br />
thai truyen dat<br />
<br />
<br />
Cac md dun thuat toan mau dugc xay dung thanh cac md dun chuang trinh mau hoac bang<br />
cac cdng cu lap trinh truyen thdng C/Crossassembler/linker hoac bang td hgp cac khdi ham<br />
CO ban trong nhdm hd trg ndi tren va ket ndi thdng qua lap trinh dd hga .<br />
Cac khdi ham ca ban trong phan mem dd hga dugc md ta bang cac bieu tugng vdi cac thdng<br />
sd vao/ra va gidi ban viing lam viec. Phan Idn cac khdi ham dugc xay dung tir ma ngudn C va<br />
bien dich cheo sang ma assembler cua chip co sd ciia he nhiing nhu cac khdi ham trong cac<br />
nhdm sd hgc, logic, xir ly tin hieu sd, bien ddi...Cdn cac khdi ham khac lien quan den cac file<br />
vao/ra tao tin hieu, mdt sd ham trong nhdm xir ly tin hieu... deu dugc true tiep xay dung tir<br />
ma ngudn assembler phii hgp vdi timg he nhiing tieu chuan. Cac khdi ham vdi cac bieu thirc<br />
tinh phiic tap (lgc, bidn ddi tin hieu...) ngoai phuang phap xay dung bang thuat toan tinh<br />
true tilp, cdn cd the dugc thilt kl dd hoa ket ndi tir cac khdi ham ca ban khac. Hinh 1.1 minh<br />
hoa khau lgc cd ham truyen dat:<br />
<br />
y(Z-') b,+b^Z'' +b^Z-<br />
H(Z-') = (2.1)<br />
x ( Z " ' ; fifo +g^Z~^ +a,Z''^<br />
<br />
dugc md ta bang dd hoa phan cap tir cac khdi ham ca ban hon<br />
j ( z " ' ) x ( a ^ + a , z - ' + a , z - - ) = x(z"')x(6o+6,z"'+&2z")<br />
<br />
<br />
<br />
97<br />
Tiiu ban: Cong nghi thong tin - Tir dong hod - Cong nghi Vii tru ISBN: 978-604-913-010-6<br />
<br />
<br />
<br />
<br />
Gainl<br />
^B<br />
Five Input Add 1<br />
bl<br />
-k<br />
Deldv 2 Gam 2 Delay 3<br />
<br />
<br />
ao=l<br />
<br />
Delay 1 Gain 3<br />
<br />
z' Gain 4<br />
<br />
<br />
<br />
<br />
Gain 5<br />
<br />
<br />
<br />
<br />
Hinh 2.1 Do hoa phan cap khau loc so H(Z" )<br />
<br />
<br />
HI. XAY DUNG CAC ITNG DUNG TRUC TIEP VAO HE THONG NHUNG<br />
Cdng cu Compiler/Assembler/Linker truyen thdng la each thdng thudng tao ma thirc<br />
hien eae thuat toan img dung cu the tren cac he (chip) nen ciia he thdng nhiing. Ca che nay<br />
bao gdm mdt hoac vai td hgp tien xir ly, dich va bien dich cheo tao ma ddi tugng. Sau khi cac<br />
file ddi tugng ket ndi vdi cac file thu vien can thiet tao thanh cac file ma may va san sang nap<br />
vao he (chip) nen ciia he thdng nhiing. Tuy nhien de tao ra chuong trinh thuc thi (exe.) thdi<br />
gian thuc cho he thdng nhiing ddi hdi nhieu cdng siic hieu chinh, sir dung nhieu phuang phap<br />
khac nhau bao gdm tir md phdng he thdng, danh gia thdi gian thuc tren PC. Hinh 3.1 [1] md<br />
ta qua trinh xay dung chuong trinh img dung cho he thdng nhiing tir he phat trien theo qui<br />
trinh thdng thudng trong dd tien xir ly (preprocessor) nham td chirc va td chirc lai file ngudn<br />
phii hgp vdi cac he phat trien cu the de de dieh va thich hgp cho md phdng tren PC phii hgp<br />
vdi ldp phan mem he thdng va ldp phan ciing ciia he phat trien.<br />
<br />
May chu (He phat trien) He thong nhung<br />
<br />
Preprocessorss — • Compiler -• Linker Lop irng dung<br />
<br />
Lop phan mem he thong Lop phan mem he thong<br />
<br />
Lop phan cimg Lop phan ciing<br />
<br />
Hinh 3.1. Quy trinh tao chuong trinh iing dung cho he thdng nhiing<br />
Han che ciia nhung phuang phap thilt kl mang tinh trung gian la thieu kha nang md ta phAn<br />
cung he nen (ldp phan mem he thdng va ldp phin cimg) ciia he thdng nhiing tren do se nhiing<br />
cac ma ddi tugng sinh ra tir thuat toan dd hoa. De cd the nhan dugc mdt file thuc thi hoan<br />
chinh can qua trinh hieu chinh {mk kha nhilu cdng siic va thdi gian) cac ma ddi tugng theo<br />
cau hinh he nen nhiing. Dac dilm chung ciia cac phuang phap nay la sau khi thuat toan duac<br />
<br />
98<br />
Hoi nghi Khoa hoc ky niim 35 ndm Viin Khoa hoc vd Cong nghe Viet Nam - Hd Noi 10/2010<br />
<br />
<br />
<br />
xay dung va kilm chiing qua md phdng, thilt kl ket ndi cac khdi ham cd the tao ra ma ngudn<br />
C hoac assembler va tiep tuc thuc hien hieu chinh thiet kl. Ma ngudn cudi cimg dugc tao ra<br />
cd thi duac sir dung nap vao he nIn bang cac cdng cu C compiler/assembler/linker (hinh<br />
3.2).<br />
De cd thi phat triln cac he thdng nhiing tren nhieu loai chip nen thich irng ddi vdi cac loai<br />
img dung khac nhau can thilt dua ra mdt phuong phap tao ma ddi tugng hieu qua tir ket ndi<br />
dd hga cac md dun chuong trinh mau. Van de bieu dd khdi trong thiet ke (graphical<br />
proramming) da dugc nhieu hang Idn nghien ciiru trong nhieu nam va dua ra nhieu phuang<br />
phap lap trinh dd hga hieu qua nhu Labview, MatLab, Visual Designer, RIDE... Phat trien<br />
thuat toan trong lap trinh dd hga cung tuong tu nhu phat trien trong C bdi vi cac bien, toan<br />
hang, bieu thuc, va cac ham dugc diing de tao ra cac ham khac va toan bd chuang trinh. Su<br />
khac nhau d day la mdt ben xay dung tren mdi trudng dd hga, mdt ben tren ca sd van ban.<br />
Phuang phap nay dac biet him ich cho nhirng ngudi thiet ke cd kinh nghiem ban che trong eae<br />
cdng cu phat trien thuat toan nguyen ban truyen thdng C, assembly hay nhiing cdng cu tuong<br />
tu khac. Do do phuang phap cho phep tao ra kha nang thuc hien he nhiing trong thdi gian<br />
thuc, kha nang hd trg mdt sd lugng cac vi xir ly khac nhau cho phep chuyen kha de dang tir<br />
hg vi xir ly nay sang hg khac. Vdi kien tnic phan mem md, ta cd the tao ra va md rdng cac<br />
thanh phan mdi mdt each de dang.<br />
Phuang phap thiet ke ca sd thanh phan tao cho ngudi thiet ke khdng phai viit cac ma ham<br />
thuat toan tir vach xuat phat. Thay vao dd, ngudi thiet ke cd the md xe toan bd thuat toan<br />
thanh cac nhdm rieng biet - cac hop den (process), ma mdi mdt nhdm thuc thi mdt nhiem vu<br />
rieng. Theo each nay, img dung nhiing thdi gian thuc cd the dugc xay dung tir cac thanh phan<br />
khdi rieng le. Vi the, mdt each de dang va nhanh chdng, ta cd the xay dung cac thuat toan va<br />
xuat true tiep ma ddi tugng trong pham vi mdi trudng ma khdng yeu cau compiler C hay<br />
assembler va nhiing vao cac chip nen ciia he thdng nhiing .<br />
PC-based<br />
simulation<br />
Process<br />
1<br />
^ J Object<br />
code<br />
Process Process<br />
3 4 n Process<br />
C source file<br />
<br />
Process 6 1<br />
2 Process<br />
5<br />
J C compiler<br />
<br />
1<br />
He nen<br />
<br />
<br />
<br />
<br />
Hinh 3.2. Thiet ke dd boa cac thuat toan va minh hoa cac phuang phap khac nhau tao ma<br />
ddi tugng<br />
Cac cdng cu nhiing cac ung dung thdi gian thuc cho cac he thdng nhung dam bao true tiep<br />
tao ra ma ddi tugng cho chip nen he nhiing thdng qua viec thiet ke ket ndi cac khdi ham<br />
mong mudn, xac lap ddng dii lieu, ket ndi logic cd dieu kien giira cac khdi ham va lira chgn<br />
cac tham sd phii hgp. De dam bao cac dieu kien ket ndi, tieu chuan hda ddng dir lieu va dac<br />
biet xac dinh cac thdng sd vao/ ra khi tao ma ddi tugng cua chuong trinh img dung nhiing<br />
cAn thiet phai tieu chuan hda cac he nen. He nen tieu chuan ciia he thdng nhiing cd cau tnic<br />
tdi thieu va dugc md ta d hinh 3.3. Cau tnic chung cua he nen tieu chuan tdi thieu tren chip<br />
nen bao gdm cac thanh phan ca ban sau: he chip xir ly, mach giao tiep vao ra analog vdi cac<br />
<br />
99<br />
Tieu ban: Cong nghe thong tin - Tu dong hod - Cong nghi I ii tru ISBN: 978-604-913-010-6<br />
<br />
<br />
<br />
tiln xir ly tin hieu phii hgp vdi cac iing dyng, cac giao dien kit ndi vdi PC (cdng LPT. USB<br />
va serial) va cac giao tiep md rdng he thdng. Trong cdng nghiep \'a tren thi trudng cho the<br />
th4y cac chip nIn tieu chuan dang DSK, EVM kh..<br />
<br />
Flash memorv<br />
•< '<br />
<br />
yo •4 1<br />
expansion ^ 1<br />
Analog<br />
• A23-A0<br />
-4— D31-D0 Serial AlC<br />
Control port ^<br />
ft<br />
TMS320CXX Analog<br />
out<br />
Parallel port<br />
4— n IV<br />
interface<br />
• " 1'<br />
^—' XDS510<br />
MPSD Port Interface<br />
<br />
<br />
Hinh 3.3. Cdu tnic chung ciia he nen tieu chudn tren nen DSP TMS320CXX<br />
<br />
Tep ma ddi tugng trudc khi nap (nhiing) vao chip nen da cd the kiem tra tinh diing dan thdng<br />
qua thuc hien true tiep tren he nhung da lira chgn, dtr lieu cd the dugc quan sat mdt each sinh<br />
ddng d bat ky diem nao tren sa dd thiet ke dd hoa tren may chu . Bang each bd xung cac khdi<br />
chuang trinh assembler khdi ddng eae thanh phan vao/ra trong AIC va ket ndi vdi chip nen<br />
he nhung cho phep mdi trudng lap trinh dd hoa xay dung cac ma ddi tugng phii hgp vdi nhieu<br />
he nen nhiing tieu chuan tdi thieu dang DSK, EVM....<br />
<br />
Process<br />
1<br />
Process Process<br />
3 4 ^<br />
Process<br />
Process • • He nen<br />
6<br />
2 tieu chuan<br />
Process<br />
5 1<br />
Process<br />
I/O<br />
<br />
<br />
Htnh 3.4 Phdt triin chuang trinh ung dung cho cdc hi nin tiiu chudn<br />
<br />
IV. MO HINH TRUYEN THONG MO CUA HE THONG NHUNG<br />
Kien tnic truyen thdng ciia cac he thdng nhiing dugc xay dung tren nen ldp ph4n cung va<br />
ldp phan mem he thdng va cac thanh phan ciia kiln tnic dd phu thugc cu thi vao khoang each<br />
giira cac thiet bi nhiing, mdi trudng truyen dan va thudng dugc quy chieu din md hinh kiln<br />
true tuong ung. Ddi vdi cac he thdng nhiing cac thanh phan truyen thdng cd thi nhdm lai<br />
tuong img vdi cac ldp ciia md hinh OSI trong dd ldp vat ly qui chieu tdi ldp phSn ciing cua<br />
h | thdng nhiing. cac ldp 2-4 trong OSI qui ve ldp phan mem he thdng va cac ldp cdn lai quy<br />
ve ldp ling dung ciia he thdng nhung nhu md ta hinh 4.1<br />
<br />
<br />
<br />
<br />
100<br />
Hoi nghi Khoa hoc ky niim 35 ndm \ 'tin Khoa hoc vd Cong nghe Viet Nam ^ Hd Ngi 10/2010<br />
<br />
<br />
<br />
Lop irng dung<br />
<br />
Lop phan mem he thong<br />
<br />
<br />
TCP/IP Stack GSM<br />
BSSMAP DTA?<br />
<br />
GPRS<br />
<br />
SCCP BSSAP BSSM.4P IDSN<br />
<br />
<br />
<br />
Lop phan cirng<br />
<br />
LAN WAN<br />
<br />
i<br />
•Wireless Wired Wireless Wired<br />
<br />
<br />
IEEE802.il *• GPRS !-• RS232<br />
Wireless Radio&IR<br />
GSM ^><br />
Bluetooth Radio<br />
& Broadband<br />
<br />
<br />
<br />
<br />
Hinh 4.1. Md hinh OSI cita kiin triic truyen thdng ciia hi thdng nhiing<br />
<br />
<br />
Trong thiet ke cac he thdng nhung tham gia trong mang truyen thdng vdi cac ung dung phan<br />
tan trong khdng gian rdng nhu lien quan den mdi trudng, giao thdng...ddi hdi iing dung<br />
mang khdng day, dac biet ddi vdi van de ciia tinh toan khap nai (ubiquitous computing) ket<br />
hgp giira thu thap dir lieu true tiep nhieu thdng sd vdi phat hien tai nguyen va phan tuyen.<br />
Viec xay dung mang khdng day cac he thdng nhiing la da dang vdi su tham gia nhieu chip<br />
nen trong he thdng nhiing . Ddi vdi mang LAN hoac mang WAN deu cd cac giai phap cu the<br />
lien quan din chuSn (RS232, Ethernet, 802.11, 802.15.4, Bluetooth...) hoac GSNLGPRS...<br />
<br />
V. MOT SO HE THONG NHUNG TIEN TIEN iTNG DUNG TRIEN KHAI<br />
5.1. He thdng do va xir ly sd heu da nang MDA104<br />
He thdng do va xir ly sd lieu da nang MDA104S xay dung tren cdng nghe PC 104 gdm cd<br />
cac thiet bi dau cudi do xa MDA104S va truyen ve may tinh xir ly trung tam, ciing vdi cac<br />
ph4n mem cdng cy nhiing MDATool cho he PC 104 tinh toan, hien thi, xir ly, canh bao, luu<br />
trii chay tren he dieu hanh Windows qua mang RS2485/Ethemet.<br />
He thong do va xir ly sd lieu da nang MDA104S gdm cd :<br />
• Thilt bi do va xir ly dir lieu da nang MDAI04S<br />
• Phan mem nhiing MDARUN chay tren thilt bi MDA104S do va xu ly dir lieu da nang<br />
vdi nhieu thuat toan thdng minh.<br />
<br />
<br />
101<br />
Tiiu ban: Cong nghi thong tin - Tu dong hod - Cong nghi ' ii tru ISBN: 978-604-913-010-6<br />
<br />
<br />
<br />
• Cdng cu MDABUILDER chay tren PC thilt kl giao dien van hanli cho MDA104S.<br />
• Phan mim MDAVIEWER giam sat va thu thap dii lieu tir xa qua mang MDASCADA<br />
quan ly cac thilt bi MDA104S theo chu4n RS485/Ethemet.<br />
He thdng do va xir ly sd lieu da nang MDA104S bao gdm 02 cAp mang tru)'en thdng:<br />
Mang MDA-DevieeNet ket ndi cac thiet bi do, sensor \o\ MDA104S qua cac cdng<br />
DI/DO/AI/AO/RS232/ RS48 \'a mang MDA-SCADA kit ndi cac thilt bi thu thap sd lieu<br />
MDA104S \'di may chii qua chuan RS485 hoac Ethernet.<br />
<br />
<br />
M a y tiiih RlDABiiider<br />
chu<br />
<br />
MDA-SCADA<br />
RS232/RS485/ETHERHET<br />
<br />
<br />
MDA104S ]\rD.A.104S<br />
<br />
DI/D 0/AI/AO/RS23 2/RS 48 5<br />
<br />
<br />
<br />
<br />
OH<br />
<br />
<br />
<br />
<br />
« a Q<br />
«<br />
MDA-DeviceNet<br />
<br />
<br />
Phan mem nhiing MDARUN tren thiet bi MDA104S cd chirc nang ca ban sau:<br />
• Dgc/ghi sd lieu tir cdng vao/ra DI /AI, DO/AO<br />
• Truyen thdng vdi thiet bi ngoai vi qua RS232/RS485.<br />
• Hien thi dd hoa cac ddi tugng Button/Text/Chart/Datalog/Led thilt kl tren may tinh chii.<br />
• Tru)'en thdng xdi md}' tinh chii qua RS232/RS485/ Ethernet.<br />
• Quan ly ca sd dii lieu viing nhd he thdng Tag database<br />
• Luu dir lieu dudi dang ca sd dir lieu MSAccess.<br />
• Bao cao thdng ke dir lieu va trang thai canh bao<br />
MDARun<br />
<br />
Network Quan ly c h ^ d6 t r u y i n thong k4t n6l<br />
Configuration trong mang M D A - S C A D A<br />
<br />
<br />
Tag Q u ^ n ly c a s6' d y lieu v u n g nhdr<br />
Database h ^ thang D I / D O / A I / A O / D B B / D B W<br />
<br />
<br />
Screen<br />
•- Hien thi m^n hinh cSng nghe d a n g do hoa<br />
Viewer<br />
<br />
<br />
Alarm T h o n g ke trang thai canh bao History<br />
Logging cua cac vung n h d D I / D O / A I / A O / D B B / D B W<br />
<br />
<br />
Data T h o n g ke du' lieu History cua cac<br />
Logging vung n h a D I / D O / A I / A O / D B B / D B W<br />
<br />
<br />
User Quan ly tai khoan ngi>6i d u n g<br />
Management<br />
<br />
Hinh 5.2 ; Sa dd khdi cdu triic phdn mim MDARun<br />
<br />
102<br />
Hoi nghi Khoa hoc ky niim 35 ndm Viin Khoa hoc vd Cong nghi Viet Nam - Hd Not 10/2010<br />
<br />
<br />
<br />
5.2. Thiet kl chuang trinh nhiing do va dieu khien cho cac he DSP tieu chuan<br />
Sir dung phan mim cdng cu lap trinh dd hoa Block Diagram & RIDE vdi cac khdi ham ca<br />
ban va cac khdi ham bd xung trong bang 1 cd the xay dimg cac phan mem nhiing do va dilu<br />
khien tren cac he DSP tieu ehuAn h.2.3. Hinh 5.3, hinh 5.4 trinh bay vi du thilt kl he dilu sd<br />
tir cac khdi ham ca ban Substractl, Gain, Hierarchy biquad 02 (PID), Hierarchy biquad 03<br />
(ddi tugng dieu khiln) va cac khdi vao ra analog AI, AO tuong ung vdi AIC tren he DSP tieu<br />
chuSn dang DSK TMS320VC33.<br />
2-Amplitude<br />
<br />
<br />
<br />
<br />
Unit Step<br />
<br />
<br />
<br />
Gam 1 Hierarchy BiquadO Sichy BiquadO 3<br />
<br />
Unit Step Respond l l i m e<br />
<br />
<br />
<br />
I Subtract<br />
<br />
<br />
<br />
<br />
0,0453 ( Z ' ' + 0,904 Z ' ^ )<br />
Go(Z) =<br />
(1 - 0,905 Z ' ' ) { 1 - 0 , 8 1 9 Z - '<br />
1 - 1,724 Z ' ' + 0.782 Z ' ^ Unit Step Respond 2<br />
Gc(Z) =<br />
1-Z-'<br />
<br />
<br />
Hinh 5.3. Thiet ke do hog vd md phdng he dieu khien sd<br />
<br />
<br />
Cac bd lgc sd dugc sir dung rdng rai ca trong viing tin sd thip lin tin sd cao nhd kha nang xir<br />
ly tin hieu tdc do cao ciia cac mach DSP, cd thi thay ddi cac thdng sd bd lgc thich nghi vdi sir<br />
thay ddi tin hieu thdng qua thay ddi chuang trinh. Cac he trich mau trong cac he thdng do<br />
ludng va dieu khien thudng diing cac bd lgc IIR dang :<br />
<br />
<br />
m=0 N{Z)<br />
//(Z) = £/7,Z-' =<br />
D{Z)<br />
<br />
<br />
trong dd N(Z) va D(Z) la cac da thiic bac m va n tuong img.<br />
Bang each sir dung kit ndi lien tilp cac khdi ham biquad 01, biquad 02, biquad 03 cd thi thilt<br />
ke va md phdng bd lgc IIR dang Butterworth bac 5 tren Block Diagram (hinh 5.4) va dugc<br />
nhiing vao he DSP tieu chuan vdi khdi ham vao/ra analog tuong iing.<br />
<br />
<br />
<br />
<br />
103<br />
Tieu ban: Cong nghi thong tin - Tir dong hod - Cong nghi I 'ii tru ISBN: 978-604-913-010-6<br />
<br />
<br />
<br />
<br />
Noise Generator 1<br />
<br />
<br />
<br />
Biquad 1 Biquad2 Biquad 3 Gain!<br />
<br />
<br />
<br />
<br />
Sine Signal Filtered S i g n a l<br />
<br />
<br />
<br />
<br />
Hinh 5.4 Bo loc so Butterworth ^„„=v4„„„.c<br />
<br />
<br />
<br />
VI. K E T LUAN<br />
De trien khai img dung cac he thdng nhiing hieu qua trong ITnh vuc do ludng dieu khien va<br />
truyen thdng tren nen cac chip nen tien tien can thiet xay dung cdng cu nhiing phii hgp vdi su<br />
da dang ciia cac chip nen va cd kha nang dap img linh boat ddi vdi sir thay ddi ciia cac bai<br />
toan img dung. Phat trien phan mem nhiing dua tren ca sd cac cdng cu lap trinh dd hga ket<br />
ndi cac khdi ham chirc nang tuong ung vdi tap thuat toan mau phuc vu cho cac bai toan do,<br />
dieu khien va xir ly tin hieu va truyen thdng la mdt hudng phat trien cho phep thiet ke nhanh<br />
chdng va linh boat cac thiet bi va he thdng nhiing cd kha nang dap img thdng minh sir thay<br />
ddi cac yeu cau ciia cac bai toan irng dung.<br />
<br />
<br />
TAI LIEU THAM KHAO<br />
1. Tammy Noergaard. Embedded Systems Architecture. Newnes, 2005.<br />
2. TMS320 DSP Development Support Reference guide. User's guide,TI. 2004<br />
3. Advantech Technologies PCM-3370 User's Manual, 2"''Edition 2004<br />
4. Hypersignal Block Diagram User Manual Hyperception Inc.,2001<br />
5. M.G. Singh, A. Titli. System: Decomposition Optimisation and Control. Pergamon<br />
Press, 1989.<br />
6. Richard G. Lyons. Understanding Signal Processing. Addition Wesley Longman Inc.<br />
1998.<br />
7. Cac kit qua dl tai nhanh Nha nude KC03-09, VAST06-07, PTNTD vl he thdng<br />
nhiing DSP<br />
<br />
<br />
<br />
<br />
104<br />