Journals / Türk Mühendislik Araştırma ve Eğitimi Dergisi / 2026 / Cilt: 5 Sayı: 1

Deep Q-Network Approach in Linear Inverted Pendulum Control: Simulation Performance and Real-Time Application Constraints

Doğrusal Ters Sarkaç Kontrolünde Derin Q-Ağı Yaklaşımı: Simülasyon Başarımı ve Gerçek Zamanlı Uygulama Kısıtları

Erman Köybaşı(BALIKESİR ÜNİVERSİTESİ, MÜHENDİSLİK FAKÜLTESİ, ELEKTRİK-ELEKTRONİK MÜHENDİSLİĞİ BÖLÜMÜ)0000-0001-7647-0023
Sabri Bıçakçı(BALIKESİR ÜNİVERSİTESİ, MÜHENDİSLİK FAKÜLTESİ, ELEKTRİK-ELEKTRONİK MÜHENDİSLİĞİ BÖLÜMÜ)0000-0002-2334-8515
Pages
8–16
Publication Date
2026-05-24
DOI
—
🏛️Bibliographic metadata and full text access for this article are provided via DergiPark.
DergiPark Record ↗
✨

AI Summary & Key Takeaways

AI Insight
⚡ TL;DR(Too Long; Didn't Read)

The findings highlight the critical importance of computational efficiency and incorporating hardware constraints into the training process for the applicability of DRL algorithms in embedded systems.

📌 3 Key Takeaways

🎯
Objective & Hypothesis:Linear inverted pendulum (LIP) systems, due to their inherent instabilities and fast nonlinear dynamics, are considered a fundamental benchmarking problem in evaluating the performance of control algorithms.
📊
Key Findings & Data:While the controller provided excellent results in a simulation environment assuming a 20 ms sampling time, on real hardware, it only completed the control loop in 80 ms due to the computational cost and data transmission delays of the Deep Neural Network.
💡
Conclusion & Impact:The findings highlight the critical importance of computational efficiency and incorporating hardware constraints into the training process for the applicability of DRL algorithms in embedded systems.
🔬Design:Modeling & Simulation
📍Scope:Comprehensive Sample
⚙️Variables:Derin pekiştirmeli öğrenme · ters sarkaç · DQN

Abstract

Linear inverted pendulum (LIP) systems, due to their inherent instabilities and fast nonlinear dynamics, are considered a fundamental benchmarking problem in evaluating the performance of control algorithms. In this study, a controller design was implemented using the Deep Q-Network (DQN) algorithm, a model-independent Deep Reinforcement Learning (DRL) method that does not require linearization of the system's dynamic model. The agent, trained in the MATLAB/Simulink environment with a discretized action space suitable for hardware constraints and a quadratic reward function aimed at energy efficiency, lifted the pendulum from its vertical position and successfully stabilized it in the vertical equilibrium position in simulation tests. The novel aspect of the study is the experimental analysis of the "Sim-to-Real Gap" problem encountered during the integration of the simulated agent into the physical experimental setup. While the controller provided excellent results in a simulation environment assuming a 20 ms sampling time, on real hardware, it only completed the control loop in 80 ms due to the computational cost and data transmission delays of the Deep Neural Network. This delay caused the fast-dynamic pendulum system to become unstable and lose its balance. The findings highlight the critical importance of computational efficiency and incorporating hardware constraints into the training process for the applicability of DRL algorithms in embedded systems.

Özet

Doğrusal ters sarkaç (LIP) sistemleri, doğal kararsızlıkları ve doğrusal olmayan hızlı dinamikleri nedeniyle kontrol algoritmalarının performansının değerlendirilmesinde temel bir kıyaslama problemi olarak kabul edilir. Bu çalışmada, sistemin dinamik modelini lineerize etmeye gerek duymayan, modelden bağımsız bir Derin Pekiştirmeli Öğrenme (Deep Reinforcement Learning - DRL) yöntemi olan Derin Q-Ağı (DQN) algoritması kullanılarak bir kontrolcü tasarımı gerçekleştirilmiştir. MATLAB/Simulink ortamında, donanım kısıtlarına uygun ayrıklaştırılmış bir eylem uzayı ve enerji verimliliğini hedefleyen karesel bir ödül fonksiyonu ile eğitilen ajan, simülasyon testlerinde sarkacı düşey konumundan kaldırmış ve dikey denge konumunda başarıyla stabilize etmiştir. Çalışmanın özgün yanı, simülasyonda doğrulanan ajanın fiziksel deney düzeneğine entegrasyonu sırasında karşılaşılan "Simülasyondan Gerçeğe Geçiş" (Sim-to-Real Gap) probleminin deneysel olarak analiz edilmesidir. Simülasyon ortamında 20 ms örnekleme zamanı varsayımıyla mükemmel sonuç veren kontrolcü, gerçek donanım üzerinde Derin Sinir Ağı'nın hesaplama maliyeti ve veri iletim gecikmeleri nedeniyle kontrol döngüsünü ancak 80 ms sürede tamamlayabilmiştir. Bu gecikme, hızlı dinamiklere sahip sarkaç sisteminin kararsızlığa sürüklenmesine ve denge kaybına yol açmıştır. Elde edilen bulgular, DRL algoritmalarının gömülü sistemlerde uygulanabilirliği için hesaplama verimliliğinin ve donanım kısıtlarının eğitim sürecine dahil edilmesinin kritik önemini ortaya koymaktadır.

🔖

Cite This Article

Köybaşı, E., Bıçakçı, S. (2026). Deep Q-Network Approach in Linear Inverted Pendulum Control: Simulation Performance and Real-Time Application Constraints. Türk Mühendislik Araştırma ve Eğitimi Dergisi, Cilt: 5 Sayı: 1, 8–16. https://ajindex.com/articles/1646977

📄 Full Text PDF Viewer

📄

PDF görüntüleyici hazırlanıyor...

References (12)

  1. R. Özalp, N. K. Varol, B. Taşci, and A. Uçar, “A Review of Deep Reinforcement Learning Algorithms and Comparative Results on Inverted Pendulum System,” in Machine Learning Paradigms: Advances in Deep Learning-based Technological Applications, 1st ed., Springer, 2020, 237–256.
  2. X. Bajrami, A. Pajaziti, R. Likaj, A. Shala, R. Berisha, and M. Bruqi, “Control theory application for swing up and stabilisation of rotating inverted pendulum,” Symmetry, 13(8), p. 1491, 2021.
  3. T. N. Ho and V.-D.-H. Nguyen, “Model-free swing-up and balance control of a rotary inverted pendulum using the TD3 algorithm: Simulation and experiments,” Eng. Technol. Appl. Sci. Res., 15(1), 19316–19323, 2025.
  4. D. Ju, J. Lee, and Y. S. Lee, “Sim-to-real reinforcement learning for a rotary double-inverted pendulum based on a mathematical model,” Mathematics, 13(12), 1996, 2025.
  5. T. Glück, A. Eder, and A. Kugi, “Swing-up control of a triple pendulum on a cart with experimental validation,” Automatica, 49(3), 801–808, 2013.
  6. R. Liu, F. Nageotte, P. Zanne, M. De Mathelin, and B. Dresp-Langley, “Deep reinforcement learning for the control of robotic manipulation: A focussed mini-review,” Robotics, 10(1), 22, Jan. 2021.
  7. J. Terven, “Deep reinforcement learning: A chronological overview and methods,” AI, 6(3), 46, Feb. 2025.
  8. V. Mnih, K. Kavukcuoglu, D. Silver, A. Graves, I. Antonoglou, D. Wierstra, and M. Riedmiller, “Playing Atari with deep reinforcement learning,” arXiv preprint arXiv:1312.5602, 2013.
  9. S. Israilov, L. Fu, J. Sánchez-Rodríguez, F. Fusco, G. Allibert, C. Raufaste, and M. Argentina, “Reinforcement learning approach to control an inverted pendulum: A general framework for educational purposes,” PLoS One, 18(2), e0280071, 2023.
  10. R. S. Sutton ve A. Barto, "Reinforcement learning: an introduction, Second edition. içinde Adaptive computation and machine learning", Cambridge, Massachusetts London, England: The MIT Press, 2020.
  11. C. J. Watkins and P. Dayan, “Q-learning,” Mach. Learn., 8(3), 279–292, 1992.
  12. H. Ju, R. Juan, R. Gomez, K. Nakamura, and G. Li, “Transferring policy of deep reinforcement learning from simulation to reality for robotics,” Nat. Mach. Intell., 4(12), 1077–1087, 2022.