Bir motor kontrol sisteminin model tabanlı donanım ve yazılım ortak tasarımı
Model-based hardware and software mutual design of a motor control system
- Tez No: 777013
- Danışmanlar: PROF. DR. SIDDIKA BERNA ÖRS YALÇIN, DOÇ. DR. HASAN TİRYAKİ
- Tez Türü: Yüksek Lisans
- Konular: Elektrik ve Elektronik Mühendisliği, Electrical and Electronics Engineering
- Anahtar Kelimeler: Belirtilmemiş.
- Yıl: 2023
- Dil: Türkçe
- Üniversite: İstanbul Teknik Üniversitesi
- Enstitü: Lisansüstü Eğitim Enstitüsü
- Ana Bilim Dalı: Elektronik ve Haberleşme Mühendisliği Ana Bilim Dalı
- Bilim Dalı: Elektronik Mühendisliği Bilim Dalı
- Sayfa Sayısı: 162
Özet
Günümüz teknolojisinde elektrikli motor ve motor sürücüler önemi büyük teknolojik cihazlardır. Elektrik enerjisini mekanik enerjiye aktaran bu cihazlar, endüstri ve bir çok otomasyon sisteminde kullanılmaktadır. Yaygınlaşan elektrikli araç teknolojisinde de farklı tipte birçok elektrik motoru ve motor sürücüsü kullanıma denk gelinebilir. Elektrikli motorlar ihtiyaç tipine ve kullanım alanına göre farklı tip ve farklı modellerde oluşturulabilir. Elektrik motorları yapıları ve çalışma ihtiyaçlarına göre 2 ana başlık altında ayrılmıştır. Bunlar doğru akım motorları ve asenkron elektrik motorlarıdır. Doğru akım motorları da kendi içlerinde 2 ana başlık altında incelenebilir. Doğru akım motor tiplerinden biri fırçasız doğru akım motoru iken, bir diğeri ise fırçalı doğru akım motorlarıdır. Her iki motor tipi için de farklı kontrol yöntemleri mevcuttur. Bu tez çalışmasında bir fırçasız doğru akım motoru için, motorun kontrolünü sağlayacak olan bir motor sürücüsünün donanım ve yazılım tasarımı çalışmaları yapılmıştır. Motor sürücü, elektrikli motoru istenen hız veya akım değerinde çalıştırmak için kullanılan bir cihazdır. Fırçasız doğru akım motorları yapıları gereği motor sürücüye ihtiyaç duymaktadır. Motor sürücünün model tabanlı tasarımı için ilk olarak motorun modelinin oluşturulması gerekir. Motora ait modelleme çalışmaları gerçekleştirilirken motor parametrelerinin doğru elde edilmesi önemli bir husustur. Motora ait modelleme parametreleri doğru elde edilmez ise tasarım hatalı oluşacaktır. Bu motor kontrol çalışmasında, motor kullanıcı tarafından sağlanan hız girdisi ile kontrol edilmiştir. Kontrol edilecek olan elektrikli motorun matematiksel modeli oluşturulmuş ve çeşitli kontrol algoritmaları ile test çalışmaları yapılmıştır. Test çalışmaları ile birlikte motor kontrolü için donanım yapıları oluşturulmuş ve model tabanlı tasarım yapılmıştır. Model tabanlı tasarım otomatik olarak yazılıma aktarılmış ve yazılım el ile kodlama yapılmadan tamamıyla model tabanlı olarak otomatik gerçekleştirilmiştir. Otomatik kod oluşturma için literatür de bulunan çalışmalar incelenmiş ve birçok farklı yöntem ile otomatik kod çalışması yapıldığı görülmüştür. Model tabanlı tasarım için MATLAB/Simulink ortamı kullanılmıştır. MATLAB/Simulink ortamında model tabanlı kod üretimi yapılabilen bir çok eklenti mevcuttur. Farklı işlemci, Digital Signal Processor (DSP) veya Field Programmable Gate Array (FPGA) tipleri için otomatik kod oluşturma çalışmaları mevcuttur. Bu çalışmada işlemci için tasarım yapılacağından işlemciler için otomatik kod üretimi yapılan çalışmalar incelenmiştir. İşlemciler için geliştirilen birçok farklı kod üretim yöntemi mevcuttur. Yapılan bu çalışma da STMicrocontroller ailesine ait bir işlemci kullanılacağından STMicrocontroller ailesi için kod üretimi yapan yapılar üzerinde durulmuştur. STMicrocontroller ailesine ait olan STM32 işlemciler için otomatik kod oluşturma imkanı tanıyan Waijung Blockset ve STM32-MAT Target blok setleri bu tez çalışmasında detaylıca anlatılmıştır. Her iki otomatik kod oluşturma çalışmasının da Simulink ortamında nasıl kullanılacağı ve kurulumunun nasıl yapılacağından bahsedilmiştir. Motor sürücü tasarımı MATLAB/Simulink ortamında gerçekleştirilmiştir. Tasarım için ihtiyaç duyulan bloklar parça parça oluşturulmuş ve MATLAB/Simulink ortamında simüle edilmiştir. Tasarım oluşturulurken, kullanılacak olan motor tipi kadar motorun ihtiyaç duyacağı yükün ve karşılamasını beklediğimiz gerekliliklerin ne olduğunu bilmek de önemlidir. Bu nedenle, motorun kullanılacağı alan olan araç içerisinde motorun nasıl bir yükü karşılaması gerektiği hesaplanmıştır. Araca ait sürtünme katsayısı, eğim, ön yüzey alanı ve ortama ait hava direncine kadar bir çok parametre ile karşılanması gereken yük elde edilmiştir. Motor modeli Simulink ortamında oluşturulmuş ve simulasyon çıktıları izlenerek yazılım modellemesi yapılmıştır. Yazılım modellemesi oluşturulurken kullanılacak olan işlemci tipine uygun tasarım yapılmıştır. İşlemci tipine özgü tasarım ile model direkt olarak yazılıma aktarılabilmiştir. Kullanılan işlemci modeli STMicrocontroller ailesine ait olan bir işlemcidir. Bu nedenle oluşturulan tasarım, Waijung Blockset veya STM32-MAT Target yapıları kullanılarak işlemciye aktarılmalıdır. Bu çalışmada otomatik koda dönüştürme işlemi için STM32-MAT Target yönteminin kullanılmasına karar verilmiştir. İşlemci STM32-MAT Target ile koda dönüştürüleceği için, işlemciye ait konfigürasyon çalışmaları STM32CubeMX arayüzü ile gerçekleştirilmişir. STMCubeMX arayüzü ile konfigürasyonun oluşturulması için gerekli olan işlemci seçimi ve seçilen işlemciye ait ADC, TIMER, Haberleşme hatları ve diğer çevre birimlerin nasıl konfigüre edileceği detaylıca anlatılmıştır. Otomatik kod oluşturmak için kullanılan Waijung Blockset ve STM32-MAT Target bloklarının kurulumları nasıl yapıldığı detaylıca gösterilmiştir. Her iki yöntem içinde birer örnek sunulmuş böylelikle koda dönüştürme ve uygulama örneklendirilmiştir. Motor sürücü tasarımı oluşturulurken istenen hız değerine uygun çıktılar verecek şekilde bir kontrol sinyali üretilmesi gerekmektedir. Motor sürücüler farklı bir çok yöntem ile kontrol edilebilmektedir. Motor kontrolü için, Bulanık PID kontrolcüler, Model Predictive Control (MPC) ve geleneksel PID kontrolcüler gibi seçeneklere literatürde rastlamak mümkündür. En yaygın kontrolcü tipi ise Proportional-Integral-Derivative (PID) kontrolcüdür. Motor Yazılım modellemesi yapılırken, motorun PID kontrolcü ile kontrol edilmesine karar verilmiştir. Geleneksel PID yöntemleri, uygulamanın gerçekleştirildiği motor modeli için istenen çıkış değerlerini tam olarak sağlayamamaktadır. Ek olarak geleneksel PID kontrolcülerin oluşturduğu katsayılar kontrol edilmek istenen fırçasız doğru akım motoru için uygulanabilir olmalıdır. Bu çalışmada geleneksel PID ile kontrol sistemi üretilmeye çalışılmıştır. Kontrol katsayıları belirlenirken Ziegler-Nichols açık çevrim cevabı ve Ziegler-Nichols kapalı çevrim cevabı kullanılmıştır. Ziegler-Nichols yöntemleri ile kontrolcü katsayıları elde edilmiştir. Elde edilen bu katsayılar ile kontrol işareti üretilmiştir. Üretilen kontrol işaretinin, güç için kullanılan sistemin gerilim değerini aştığı ve gerilim hattı üzerinde sürekli osilasyona sebep olduğu görülmüştür. Sistemin batarya enerjisi ile besleneceği düşünüldüğünde bu durum sistemin uygulanabilirliğini kaybetmesine neden olur. Geleneksel PID yerine farklı çalışmalar incelenmiş ve PID içerisinde kullanılan kontrol katsayıları Linear-Quadratic-Regulation (LQR) yöntemi ile elde edilmiştir. LQR yöntemi ile sistem girdisinin hassasiyeti ayarlanabilmektedir. Böylelikle uygulanabilir gerilim seviyesinde kontrol işareti üretmek mümkün olur. LQR yöntemi ile elde edilen PID kontrolcüsünün katsayıları motoru istenen hız değerine ulaştıran en doğru kontrol işaretini üretmiştir. Üretilen kontrol işareti sistem osilasyonunu yok denecek kadar düşürmüştür. Ziegler-Nichols yöntemleri ile elde edilen katsayılar ve LQR yöntemi ile elde edilen katsayılar karşılaştırılmıştır. Yapılan karşılaştırma sonucunda motor sürücü kontrol işareti LQR yöntemi ile hesaplanan PID katsayıları aracılığıyla oluşturulmuştur. Motor sürücü donanım yapısı 4 farklı kart ile gerçekleştirilmiştir. Böylelikle sürücü yapısının modüler olması hedeflenmiştir. Olası aşırı yüklenme vb. durumlarda zarar gören elektronik kartı değiştirmek mümkündür. Motor sürücü yapısı için oluşturulan elektronik kartların üç tanesi motor sürücü sisteminde bir tanesi ise motor içerisinde olacak şekilde tasarlanmıştır. Motor sürücü içerisinde bulunan üç kart, Regüle kartı, Kontrol kartı ve Güç kartıdır. Bu kartlar aracılığıyla motor sürücüye ait PCB tasarımları işlevlerine göre ayrılmıştır. Kontrol kartı motor sürücüsünün beyni olarak işlev yapmaktadır. Tüm kontrol algoritması bu kartta bulunan işlemci ile gerçekleştirilir. Kart tasarımı yapılırken ihiyaç duyulacak bütün çevre birimler kart tasarımına eklenmiştir. Bu çevre birimler haberleşme, filtreleme ve sinyal işleme gibi çevre birimlerdir. Kart içerisindeki tüm çevre birimlerin şematik tasarımları paylaşılmıştır. Şematikler oluşturulurken nelere dikkat edildiği ve nasıl oluşturulduğu detaylı bir şekilde anlatılmıştır. Şematik sonrası oluşturulan PCB çizimleri gösterilmiştir. Çevre birimlerin PCB üzerinde konumlandırılırken dikkat edilen parametreleri açıklanmıştır. Kullanılan çevre birimlerin neden kullanıldığı bahsedilmiştir. Kontrol kartı çevre birimler ile çevre birimleri besleyen güç hattını da içerisinde barındırmaktadır. Tüm çevre birimler farklı enerji seviyesinde besleme ihtiyacı duyabilir. Kontrol kartı tüm bu enerji ihtiyaçlarını karşılamak üzere karta harici olarak gelecek olan bir besleme gerilimine ihtiyaç duyar. Kontrol kartının ihtiyaç duyduğu besleme 12V seviyesindedir. İşlemci ve çevre birimler için ihtiyaç duyulan gerilim seviyeleri kontrol kartı içerisinde dönüştürülür. Böylelikle, Tüm çevre birimlerin beslemesi gerçekleştirilir. Regüle kartı ile hem kontrol kartının hem de güç kartının ihtiyaç duyduğu 12V besleme gerilimi motor beslemesinden elde edilir. Regüle kartı enerji girişini sistem dışından, batarya üzerinden elde edecektir. Gelen enerji girişi manyetik bozulmalara maruz kalabileceğinden, regüle kartı tasarımı bu öngörüler doğrultusunda filtreleme ile gerçekleştirilmiştir. Güç kartı, Kontrol kartından gelen komutları gerçekleştiren, içerisinde MOSFET'lerin ve kapı sürücülerin bulunduğu donanımsal birimdir. Kontrol kartı ile oluşturulan tetikleme darbeleri güç kartına aktarılır. Kontrol kartından gelen sinyal ile Güç kartında bulunan kapı sürücülerin faz tetiklemeleri gerçekleştirilir. Güç kartı içerisinde 18 adet MOSFET bulunmaktadır. Üç fazdan oluşan motor için motor sürücüde minimum 6 adet anahtarlama elemanı kullanılması gerekir. Güç kartı yapısında 18 adet MOSFET kullanımı ile oluşacak akım yoğunluğu 3 farklı anahtarlama elemanı üzerinden aktarılmıştır. Her bir fazın hem yüksek değerlikli anahtarlama elemanı hem de düşük değerlikli anahtarlama elemanı için 3 adet MOSFET kullanılmıştır. Güç kartı içerisinde motora ait enerji akışının gerçekleştirildiği iletim hattını barındırmaz. Enerji akışının gerçekleşmesi baralar aracılığıyla sağlanmıştır. Güç kartı baralara montajlı MOSFET'lerin tetiklemesini sağlamaktadır. Bu üç motor sürücü kartı dışında bir PCB'de motor içerisinde motorun pozisyon bilgilerinin alındığı Hall Sensör kartıdır. Hall sensör kartı ile alınan bilgiler işlemciye kablo aracılığıyla aktarılır. işlemci içerisinde işlenen pozisyon bilgileri gerekli komütasyon adımlarını üretir. Böylelikle motorun dönüşü için gerekli sinyaller elde edilmiş olur. Tez çalışması ile hedeflenen tasarım bu doğrultuda gerçekleştirilmiştir.
Özet (Çeviri)
In today's technology, electric motors and motor drives are technological devices of great importance. These devices, which transfer electrical energy to mechanical energy, are used in industry and many automation systems. In the widespread electric vehicle technology, many different types of electric motors and motor drivers can be used. Electric motors can be created in different types and models according to the type of need and usage area. Electric motors are divided into 2 main headings according to their structures and working needs. These are direct current motors and asynchronous electric motors. Direct current motors can also be examined under two main headings. One of the direct current motor types is brushless direct current motor, while the other is brushed direct current motors. Different control methods are available for both motor types. In this thesis, hardware and software design studies of a motor driver that will control the motor for a brushless direct current motor have been carried out. Motor driver is a device used to operate the electric motor at the desired speed or current value. Brushless direct current motors need a motor driver due to their structure. For the model-based design of the motor driver, the model of the motor must first be created. It is important to obtain the correct engine parameters while performing engine modeling studies. If the modeling parameters of the engine are not obtained correctly, the design will be faulty. In this motor control run, the motor is controlled by the speed input provided by the user. The mathematical model of the electric motor to be controlled was created and test studies were carried out with various control algorithms. Along with the test studies, hardware structures for motor control were created and model-based design was made. Model-based design was automatically transferred to the software and the software was fully model-based automatically without manual coding. For automatic code generation, the studies in the literature were examined and it was seen that automatic code work was done with many different methods. MATLAB/Simulink environment was used for model-based design. There are many plugins that can generate model-based code in the MATLAB/Simulink environment. Automatic code generation studies are available for different processor, Digital Signal Processor (DSP) or Field Programmable Gate Array (FPGA) types. In this study, since the design will be made for the processor, the studies on automatic code generation for the processors are examined. There are many different code generation methods developed for processors. In this study, since a processor belonging to the STMicrocontroller family will be used, the structures that produce code for the STMicrocontroller family are emphasized. Waijung Blockset and STM32-MAT Target block sets, which allow automatic code generation for STM32 processors belonging to the STMicrocontroller family, are explained in detail in this thesis. It is mentioned how to use and install both automatic code generation studies in Simulink environment. Motor driver design was carried out in MATLAB/Simulink environment. The blocks needed for the design were created piece by piece and simulated in the MATLAB/Simulink environment. While creating the design, it is important to know what the load the engine will need and the requirements we expect it to meet, as well as the type of engine to be used. For this reason, it has been calculated what kind of load the engine should meet in the vehicle, which is the area where the engine will be used. The load that needs to be met has been obtained with many parameters such as the friction coefficient of the vehicle, slope, front surface area and air resistance of the environment. The engine model was created in Simulink environment and software modeling was done by following the simulation outputs. While creating the software model, a design was made in accordance with the processor type to be used. With the processor type-specific design, the model can be transferred directly to the software. The processor model used is a processor belonging to the STMicrocontroller family. Therefore, the created design should be transferred to the processor using Waijung Blockset or STM32-MAT Target structures. In this study, it was decided to use the STM32-MAT Target method for automatic transcoding. Since the processor will be converted to code with STM32-MAT Target, the configuration work of the processor has been carried out with the STM32CubeMX interface. The processor selection required to create the configuration with the STMCubeMX interface and how to configure the ADC, TIMER, Communication lines and other peripherals of the selected processor are explained in detail. How to install Waijung Blockset and STM32-MAT Target blocks, which are used for automatic code generation, is shown in detail. An example of each of the two methods is presented, thus exemplifying the decoding and implementation.While creating the motor driver design, a control signal should be produced in a way that will give outputs in accordance with the desired speed value. Motor drives can be controlled by many different methods. For motor control, it is possible to come across options such as Fuzzy PID controllers, Model Predictive Control (MPC) and conventional PID controllers in the literature. The most common type of controller is the Proportional-Integral-Derivative (PID) controller. While modeling the motor software, it was decided to control the motor with a PID controller. Conventional PID methods cannot fully provide the desired output values for the engine model in which the application is performed. In addition, the coefficients created by conventional PID controllers should be applicable for the brushless DC motor to be controlled. In this study, it has been tried to produce a control system with conventional PID. While determining the control coefficients, Ziegler-Nichols open loop response and Ziegler-Nichols closed loop response were used. Controller coefficients were obtained with Ziegler-Nichols methods. The control signal was produced with these coefficients. It has been observed that the generated control signal exceeds the voltage value of the system used for power and causes continuous oscillation on the voltage line. Considering that the system will be fed with battery energy, this causes the system to lose its applicability. Instead of conventional PID, different studies were examined and control coefficients used in PID were obtained by Linear-Quadratic-Regulation (LQR) method. The sensitivity of the system input can be adjusted with the LQR method. Thus, it is possible to generate a control signal at the applicable voltage level. The coefficients of the PID controller obtained by the LQR method produced the most accurate control signal that brought the motor to the desired speed value. The generated control signal has reduced the system oscillation almost to nothing. The coefficients obtained by the Ziegler-Nichols methods and the coefficients obtained by the LQR method were compared. As a result of the comparison, the motor driver control signal was created through the PID coefficients calculated with the LQR method. Motor driver hardware structure is realized with 4 different boards. Thus, it is aimed to make the driver structure modular. Possible overload etc. In such cases, it is possible to replace the damaged electronic board. Three of the electronic boards created for the motor driver structure are designed to be in the motor driver system and one in the motor. Three boards in the motor driver are Regulation board, Control board and Power board. By means of these boards, the PCB designs of the motor driver are separated according to their functions. The control board functions as the brain of the motor driver. The entire control algorithm is performed by the processor on this board. All the peripherals that will be needed while designing the board have been added to the board design. These peripherals are peripherals such as communication, filtering and signal processing. The schematic designs of all peripherals in the board are shared. It is explained in detail what is taken into consideration while creating schematics and how they are created. PCB drawings created after the schematic are shown. The parameters that are considered when positioning the peripherals on the PCB are explained. It is mentioned why the used peripherals are used. The control board also contains the peripherals and the power line that feeds the peripherals. All peripherals may need to be powered at different energy levels. The control board needs an external supply voltage to meet all these energy needs. The supply needed by the control board is at 12V. The voltage levels needed for the processor and peripherals are converted within the control board. Thus, all peripherals are fed. With the regulation board, the 12V supply voltage required by both the control board and the power board is obtained from the motor supply. The regulation board will obtain the energy input from outside the system, through the battery. Since the incoming energy input may be subject to magnetic disturbances, the regulation board design was carried out with filtering in line with these predictions. The power board is the hardware unit that carries out the commands from the control board, and contains the MOSFETs and gate drivers. Trigger pulses generated by the control board are transferred to the power board. With the signal coming from the control board, phase triggers of the gate drivers on the power board are performed. There are 18 MOSFETs in the power board. For a motor consisting of three phases, a minimum of 6 switching elements must be used in the motor driver. The current density to be created by the use of 18 MOSFETs in the power board structure is transferred through 3 different switching elements. Three MOSFETs are used for both high-value switching elements and low-value switching elements of each phase. The power board does not contain the transmission line where the energy flow of the motor is carried out. The realization of the energy flow is provided through the coil bars. The power board provides triggering of MOSFETs mounted on coil bars. Apart from these three motor driver boards, it is the Hall Sensor board where the position information of the motor inside the motor is taken on a PCB. The information received with the Hall sensor board is transferred to the processor via cable. Position information processed in the processor generates the necessary commutation steps. Thus, the necessary signals for the rotation of the motor are obtained. The design targeted by the thesis study was carried out in this direction.
Benzer Tezler
- Simulation and circuit design of an inverter driver with sensorless field oriented control for a PMSM used in compressor
PMSM kullanılan kompresör için ve algılayıcısız alan yönlendirmeli kontrol kullanılan evrici sürücünün benzetim ve devre tasarımı
TOLGA ODABAŞI
Yüksek Lisans
İngilizce
2022
Elektrik ve Elektronik Mühendisliğiİstanbul Teknik ÜniversitesiElektrik Mühendisliği Ana Bilim Dalı
PROF. DR. LALE ERGENE
- A social navigation approach for mobile assistant robots
Asistan mobil robotlar için sosyal bir navigasyon yaklaşımı
HASAN KIVRAK
Doktora
İngilizce
2021
Bilgisayar Mühendisliği Bilimleri-Bilgisayar ve Kontrolİstanbul Teknik ÜniversitesiBilgisayar Mühendisliği Ana Bilim Dalı
DOÇ. DR. HATİCE KÖSE
- A refined methodology tor model-based FPGA hardware design: An example of quadrotor dynamical model implementation
Model tabanlı FPGA donanımı tasarımında iyileştirilmiş bir yöntem sistemi: Bir dört rotorlu için dinamik model gerçekleme örneği
SEZER MEMİŞ
Yüksek Lisans
İngilizce
2023
Elektrik ve Elektronik Mühendisliğiİstanbul Teknik ÜniversitesiSavunma Teknolojileri Ana Bilim Dalı
DR. ÖĞR. ÜYESİ RAMAZAN YENİÇERİ
- OMNET++ simulation model for integrated modular avionics
Entegre modüler aviyonikler için OMNET++ simulasyon modeli
MÜMİN GÖKER GAYRETLİ
Yüksek Lisans
İngilizce
2023
Bilgisayar Mühendisliği Bilimleri-Bilgisayar ve Kontrolİstanbul Teknik ÜniversitesiSavunma Teknolojileri Ana Bilim Dalı
DR. ÖĞR. ÜYESİ RAMAZAN YENİÇERİ
- Fuzzy logic based position control system design for nano quadcopter
Nano quadkopter için bulanık mantık tabanlı pozisyon kontrol sistemi tasarımı
FETHİ CANDAN
Yüksek Lisans
İngilizce
2018
Bilgisayar Mühendisliği Bilimleri-Bilgisayar ve Kontrolİstanbul Teknik ÜniversitesiKontrol ve Otomasyon Mühendisliği Ana Bilim Dalı
DOÇ. DR. TUFAN KUMBASAR