Yapay sinir ağı destekli bir endüstriyel görüntü işleme uygulaması
An industrial image processing application with artificial neural network
- Tez No: 634567
- Danışmanlar: PROF. DR. SALMAN KURTULAN
- Tez Türü: Yüksek Lisans
- Konular: Mühendislik Bilimleri, Engineering Sciences
- Anahtar Kelimeler: Belirtilmemiş.
- Yıl: 2020
- Dil: Türkçe
- Üniversite: İstanbul Teknik Üniversitesi
- Enstitü: Fen Bilimleri Enstitüsü
- Ana Bilim Dalı: Kontrol ve Otomasyon Mühendisliği Ana Bilim Dalı
- Bilim Dalı: Kontrol ve Otomasyon Mühendisliği Bilim Dalı
- Sayfa Sayısı: 117
Özet
Endüstri 4.0 kavramının hayatımıza iyice girmesi ve endüstri tarafından benimsenmesi sonucunda, görüntü işleme uygulamaları endüstride çokça tercih edilmeye başlamıştır; ancak görüntü işleme uygulaması yapmak masraflı olabileceği gibi çok kompleks de olabilir. Özellikle de görüntü işleme algoritmalarını yazmak için yüksek seviye yazılım dili bilmek gerekebilir. Bu tez çalışmasında yapılacak olan görüntü işleme uygulaması tamamen PLC kullanılarak yapılacaktır ve uygulamanın amacı ise el yazısı ile yazılmış olan rakamları tanıyıp, sınıflandıran ve bu sınıflandırma sonucunu bir arayüz ile kullanıcıya bildiren bir uygulama yapmaktır. Görüntü işleme yazılımı PLC kodu olarak yazılacaktır. Yazılmış olan karakterleri tanıması için de Python yazılım dili ile modellenen ve eğitilen evrişimsel yapay sinir ağı kullanılacaktır. Tez çalışmasının giriş bölümünde tezde kullanılmış olan yazılım ve donanımlar ile ilgili genel bilgiler verilmiş ve yapılacak olan uygulamanın detayları tartışılmıştır. Çalışmanın ikinci bölümünde bu tez çalışması sırasında kullanılacak olan fiziksel ekipmanlar yani donanımlar hakkında genel bilgiler verilmiştir. Bu genel bilgilerden sonra da marka ve modelleri belirtilmiştir. Bu donanımlardan bir tanesi ve en önemlisi kullanılmış olan endüstriyel bilgisayardır. Seçilmiş olan cihaz gerçek zamanlı çalışma yapmaya uygundur ve görüntü işleme uygulamaları genellikle işlemciyi yorabilecek veya zorlayabilecek uygulamalar olduğundan, güçlü bir endüstriyel bilgisayar seçilmiştir. Seçilecek olan bilgisayarda bulunması gereken en önemli özelliklerden biri de Gigabit Ethernet bağlantı noktasına sahip olmasıdır çünkü kullanılacak olan endüstriyel kamera GigE Vision standardını desteklemekte ve Gigabit Ethernet üzerinden haberleşmektedir. Uygulamada kullanılmış olan saha giriş çıkış ekipmanlarından bir tanesi de aydınlatma kontrolcüsüdür ve bilgisayar görüşü uygulamalarındaki en önemli faktörlerden biri olan aydınlatmayı hızlı bir şekilde kontrol etmek için EtherCAT uyumlu aydınlatma kontrolcüsü seçilmiştir. Endüstriyel bilgisayar üzerinde EtherCAT portu mevcuttur. Bu sayede de aydınlatma ekipmanlarının kontrolü hızlı ve güvenli bir şekilde yapılabilmektedir. Son olarak bilgisayar Windows 10 işletim sistemine sahiptir ve tüm mühendislik yazılımları içinde çalışmaktadır. Çalışmanın üçüncü bölümünde ise tez çalışmasında kullanılmış olan teknolojiler ve yazılımlar üzerinde durulmuştur ve bunlar ile ilgili genel bilgiler verilmiştir. İlk olarak, endüstriyel bilgisayarlarda gerçek zamanlı çalışmaya olanak sağlayan TwinCAT yazılımı üzerinde durulmuştur. Bu yazılım Windows işletim sitemi ile birlikte kullanılmaktadır ve elimizdeki Windows tabanlı bilgisayarı, bir PLC gibi kullanmamıza olanak sağlamaktadır. Normal şartlarda işlemcinin bir kısmını işletim sistemine ayırmaktadır; ancak işlemciye ait çekirdeklerin bir veya daha fazlasını izole ederek, tüm işlemci gücünü yapılacak olan endüstriyel uygulamaya ayırmak mümkündür. Bu bölümde izole çekirdek ayarlarının nasıl yapılacağı üzerinde durulmuş ve gerçek zamanlı çalışma konsepti açıklanmıştır. Çevrim süresinin bir kere veya üst üste aşıldığı durumlar grafikler yardımıyla izah edilmiştir. Sonrasında EtherCAT haberleşme protokolü hakkında genel bilgiler verilmiş ve çalışma prensibi anlatılmıştır. Dağınık saat senkronizasyonu, desteklediği topolojiler, teşhis yetenekleri gibi protokolü öne çıkaran özellikler anlatılmıştır. Bir sonraki adımda ise TwinCAT Vision modülü ele alınmıştır. Bu modül yardımıyla, endüstriyel alanda bilgisayar görüşü kullanmak ve görüntü işleme algoritmalarını uygulamak mümkündür. Modülün içeriği hakkında bilgiler verilmiş ve GigE Vision standardı açıklanmıştır. İlerleyen bölümde de üçüncü parti yazılımlar ile TwinCAT arasında haberleşmeye olanak sağlayan ADS protokolünden bahsedilmiştir ve bu protokolü oluşturan unsurlar üzerinde durulmuştur. Uygulama esnasında operatörün kullanması amacıyla TwinCAT HMI kullanılarak bir arayüz geliştirilmiştir ve bu bölümde de TwinCAT HMI'a hakkında genel bilgiler verilmiş ve kullanım senaryoları üzerinde durulmuştur. Son olarak da yapay sinir ağlarını modellemek ve eğitmek amacıyla kullanılmış olan Python yazılım dili ve bu dil içinde kullanılan Tensorflow ve PyAds kütüphaneleri ile ilgili bilgiler verilmiştir. Çalışmanın dördüncü bölümünde yapay sinir ağı ile ilgili genel bilgiler verilmiş. Biyolojik nöronlar ele alınarak matematiksel nöronun gelişim sürecinden bahsedilmiştir ve denklemlerle açıklanmıştır. Daha sonraki kısımlarda ise bu yapay sinir ağını oluşturan temel ögelerden bahsedilmiştir. Yapay sinir ağlarının eğitilmesi için kullanılan yöntemler anlatılmış, çeşitli mimariler verilmiştir. Hata azaltma yöntemlerinden biri olan gradyan iniş konseptinden bahsedilmiş ve geri yayılıma değinilmiştir. Çalışmanın beşinci bölümünde projenin işleyişi ile ilgili bilgiler verilmiştir. Öncelikle TwinCAT ortamında yapılanlar anlatılmış, daha sonrasında ise Python kullanılarak modellenmiş ve eğitilmiş yapay sinir ağları ile ilgili bazı karşılaştırmalar, sonuçlar sunulmuştur. Yapay sinir ağlarında çokça karşılaşılan ezberleme sorunu grafiksel olarak gösterilmiş ve bazı çözüm önerileri sunulmuştur. Bu çözümlerden bir tanesi kullanılarak gösterdiği etki grafiksel olarak gösterilmiştir. Tüm bu işlemler basit bir yapay sinir ağı modelinde yapılmış; ancak esas uygulamada evrişimsel yapay sinir ağı modeli kullanılmıştır. Bu model kendisine verilen veriyi %99 oranında doğru sınıflandırma oranına sahiptir ve objektif fonksiyonu değeri 0,03 olarak hesaplanmıştır, sıfıra yakın olmasın istenilen durumdur. Son olarak da TwinCAT HMI'da tasarlanmış olan ve kameradan veya çevrimdışı dosya kaynağından alınan görüntüleri izleyebildiğimiz, bu görüntülerin PLC içinde uygulanan görüntü işleme algoritmalar sonrasındaki halini de görebildiğimiz ve Python ile haberleşme tetiklerini verip, yapay sinir ağından gelen cevapları görüntüleyebileceğimiz arayüz tanıtılmıştır. Çalışmanın son bölümünde ise elde edilen sonuçlar paylaşılmıştır ve performansı hakkında yorumlar yapılmıştır. Çalışmada kullanılan donanım ve yazılımlardan bahsedilmiştir.
Özet (Çeviri)
With the development of computer technologies, human beings perform almost all their operations on these innovative technologies and enable new methods to be found. That is why the idea that the machine, which was introduced in the 1980s, can think like a human being, has been put forward, and in the 1990s, artificial neural networks technology has accelerated and a great improvement has been observed. The foundations of the first computational model on which artificial neural networks were laid in an article published by McCulloch and Pitts, who began their research in the early 1940s. In this article, they tried to model an artificial neural network using electrical circuits. Later, in 1954, a model that responded to and adapted to the warnings was created in a network by Farley and Clark. 1960 was the first year of the emergence of the neural computer. The first shortcomings of simple models were noticed in 1963, but the successful results were delayed until the use of theoretical structures in thermodynamics in the development of nonlinear networks in the 1970s and 1980s. 1985 was the year when artificial neural networks were well known and intensive research began. In today's world, artificial neural networks are being utilized in great number of fields, and one of them is image processing applications. Especially, convolutional neural networks are preferred in an image classification application. As the concept of Industry 4.0 has been introduced into our lives and adopted by the industry, image processing applications have started to be preferred in the industry; However, applying image processing can be very costly or very complex. In particular, it may be necessary to know a high-level software language to write image processing algorithms. The image processing application to be done in this thesis study will be made entirely using PLC and the purpose of the application is to make an application that recognizes and classifies the numbers written in handwriting and informs the user about this classification result through an interface. Image processing software will be written as PLC code. Convolutional artificial neural network modeled and trained in the Python software language can be used to recognize the characters written. In this particular thesis, the main goal is to create an application that is capable of recognizing handwritten digits in real-time by using industrial components. In order to achieve real-time computing, powerful industrial computer with Gigabit Ethernet adapter is selected. Also, high quality industrial camera, which can be used with ease thank to GigE Vision standard, is preferred to get the most out of high-speed Gigabit Ethernet interface and easy installation. The quality of the image received from the camera is a high; therefore, image processing algorithms applied on the images become computationally intensive. It is quite significant to select powerful industrial computer to avoid any unnecessary cycle time exceeds in PLCs. Exceeding cycle time in consecutive sessions is a big problem, and might lead to dangerous situations. Also, it breaks first rule of thumb of real-time computing. In the introduction part of the thesis study, general information about the software and hardware used in the thesis is given and the details of the application to be made are discussed. In the second part of the study, general information about the physical equipment that will be used during this thesis is given. After this general information, brands and models are specified. One of this equipment, and the most important one, is the industrial computer used. The selected device is suitable for real-time operation and a powerful industrial computer has been chosen because image processing applications are often applications that can tire or strain the processor. One of the most important features to be found on the computer to be selected is that it has a Gigabit Ethernet port because the industrial camera to be used supports the GigE Vision standard and communicates over Gigabit Ethernet. One of the field IO devices used in the application is the lighting controller and EtherCAT compatible lighting controller has been chosen to quickly control the lighting, which is one of the most significant factors in computer vision applications. EtherCAT port is available on the industrial computer. In this way, the control of the lighting equipment can be done quickly and safely. Finally, the industrial computer has Windows 10 as an operating system and all engineering software were installed inside of it. That's why it is possible to write and download a PLC project by just using the industrial computer. Also, Python algorithms will be running along with the PLC code. In the third part of the study, the technologies and software used in the thesis study are emphasized and general information about them is given. Firstly, TwinCAT software was focused on. This software allows real-time operation on industrial computers. It is used in conjunction with the Windows operating system and allows us to use the Windows based computer we have, just like a PLC. Under normal conditions, it allocates some of the processor's processing power to the operating system; however, it is possible to isolate all processor power for TwinCAT by isolating one or more of the cores of the processor into the industrial application to be made. This section focuses on how to adjust the isolated core settings and explain the real-time working concept. The situations where the cycle time is exceeded once or in a row are explained with the help of graphics. Afterwards, general information about EtherCAT communication protocol is given and working principle is explained. Protocol highlights such as distributed clock synchronization, topologies it supports, and diagnostic capabilities are described. The next step is the TwinCAT Vision module. With the help of this module, it is possible to use computer vision and apply image processing algorithms in an industrial field. Information about the content of the module is given and GigE Vision standard is explained. The ADS protocol, which enables communication between third party software and TwinCAT, is mentioned in the following section and the components of this protocol are emphasized. An interface has been developed using the TwinCAT HMI for the operator to use during the application, and in this section, general information about the TwinCAT HMI is given and usage scenarios are emphasized. Finally, Python software language used to model and train artificial neural networks and information about Tensorflow and PyAds libraries used in this language are given. In the fourth part of the study, general information about artificial neural network is given. Biological neurons are discussed and the development process of the mathematical neuron is explained and explained by equations. In the next sections, basic elements that make up this artificial neural network are mentioned. The importance of the selection of these basic elements were discussed by presenting several plots, which show the impact of these elements. The methods used for training artificial neural networks are explained and various architectures are given. Gradient reduction concept, which is one of the error reduction methods, is mentioned and back propagation is mentioned. In the fifth part of the study, information about the steps used in the project is given. Firstly, what was done in the TwinCAT environment was explained, and then some comparisons and results about modeled and trained artificial neural networks using Python are presented. The problem of memorization, which is common in artificial neural networks, is shown graphically and some solution suggestions are presented. Using one of these solutions, its effect is shown graphically. All these operations are done in a simple artificial neural network model; however, the convolutional artificial neural network model was used in the project. This model has the probability of classifying the given data 99% correctly and the objective function value has been calculated as 0.03, it is the desired to have loss value as close to zero. Finally, the interface designed in the TwinCAT HMI were introduced, where it is possible to view the images taken from the camera or offline file source. Also, it is possible to give the communication triggers to Python and it displays the answers from coming from the artificial neural network. In the last part of the study, the results obtained were shared and comments were made about their performance. Hardware and software used in the study are mentioned.
Benzer Tezler
- PLC destekli kestirimci bakımın Kardemir sinter fabrikasında uygulanması
An application of PLC based predictive maintenance to sinter plant in Kardemir
MUSTAFA YILMAZ
Yüksek Lisans
Türkçe
2012
Bilgisayar Mühendisliği Bilimleri-Bilgisayar ve KontrolKarabük ÜniversitesiBilgisayar Mühendisliği Ana Bilim Dalı
YRD. DOÇ. DR. İLHAMİ MUHARREM ORAK
- Derin öğrenme teknikleriyle robotlarda hedef takibi
Trajectory tracking of robots with deep learning methods
ÖZGÜR ALTINIŞIK
Yüksek Lisans
Türkçe
2018
Mekatronik MühendisliğiYıldız Teknik ÜniversitesiMekatronik Mühendisliği Ana Bilim Dalı
DOÇ. DR. AYDIN YEŞİLDİREK
- Physics guided neural network based state-of-charge estimator for lithium-ion batteries
Lithium-ion piller için fizik destekli sinir ağı tabanlı şarj durumu tahmincisi
FEDI SALHI
Yüksek Lisans
İngilizce
2022
Mekatronik MühendisliğiYıldız Teknik ÜniversitesiMekatronik Mühendisliği Ana Bilim Dalı
PROF. DR. ERHAN AKDOĞAN
- Robot destekli entegre üretim hattı tasarımı, gerçekleştirilmesi ve hata oluşumlarının yapay sinir ağı ile analizi
Robot aided integrated production line design, realization and artificial neural network analysis of error occurrences
İLKER YÜKSEK
Yüksek Lisans
Türkçe
2019
Mekatronik MühendisliğiErciyes ÜniversitesiMekatronik Mühendisliği Ana Bilim Dalı
PROF. DR. ŞAHİN YILDIRIM
- Gesture recognition for humanoid robot assisted interactive sign language tutoring
İnsansı robot destekli etkileşimli işaret dili eğitimi için işaret tanıma
BEKİR SITKI ERTUĞRUL
Yüksek Lisans
İngilizce
2014
Bilgisayar Mühendisliği Bilimleri-Bilgisayar ve Kontrolİstanbul Teknik ÜniversitesiBilgisayar Mühendisliği Ana Bilim Dalı
YRD. DOÇ. DR. HATİCE KÖSE