Design of a Precision Automatic Aiming System Based on K230 Visual Feedback and FOC Vector Control
DOI:
https://doi.org/10.63313/FE.9016Keywords:
Automatic Targeting System, Vision, FOC Vector Control, STM32Abstract
To address the stringent requirements for dynamic response and positioning accuracy in simple automatic targeting systems, this paper presents a precision automatic targeting system based on an STM32F4 microcontroller and a K230 peripheral vision processor, overcoming limitations inherent in traditional servo control such as significant mechanical backlash, motor vibration at low speeds, and insufficient response bandwidth. The visual perception module, centered around the K230, employs a lightweight recognition algorithm utilizing geometric features and adaptive thresholds to achieve high-frame-rate target tracking exceeding 50 frames per second. The motion control module implements FOC control via the STM32F4, employing a cascaded control architecture and optimized PD strategy to eliminate motor torque pulsation at low speeds and suppress mechanical overshoot; the outer loop provides real-time angular correction through UART feedback. Tests demonstrate excellent system stability with a static targeting error of ≤1.5 cm, rapid dynamic tracking response, and smooth operation, fully meeting the demands for high precision and fast dynamic performance.
References
[1] Arif A H, Muslim M A, Yudaingtyas E. Sensorless Field-Oriented Control (FOC) using Sliding Mode Observer for BLDC Motor [J]. Kinetik: Game Technology, Information System, Computer Network, Computing, Electronics, and Control, 2024, 9(2): 139-148. DOI: 10.22219/kinetik.v9i2.1937.
[2] Cao Yanfei, Lu Haitian, Li Xinmin, et al. Current control strategy for brushless DC motors based on an inductors-free boost topology [J]. Journal of Electrical Engineering Technology, 2021,36(6):1249–1258.
[3] Xia Changliang, Liu Junhua, Yu Wei, et al. Sliding-mode variable structure control of permanent magnet brushless DC motors based on extended-state observers [J]. China Journal of Electrical Engineering, 2006,26(20):139-143.
[4] Texas Instruments. Field Orientated Control of 3-Phase AC-Motors [EB/OL]. https://www.ti.com/lit/an/bpra073/bpra073.pdf.
[5] Hiwonder. CanMV K230 AI Development Board [EB/OL]. 2025. https://www.hiwonder.com/products/canmv-k230.
[6] Chaumette F, Hutchinson S. Visual servo control. I. Basic approaches [J]. IEEE Robotics & Automation Magazine, 2006, 13(4): 82-90. DOI: 10.1109/MRA.2006.250573.
[7] Hutchinson S, Hager G D, Corke P I. A tutorial on visual servo control [J]. IEEE Transactions on Robotics and Automation, 1996, 12(5): 651-670. DOI: 10.1109/70.538972.
[8] STMicroelectronics. STM32F407xx Reference Manual [EB/OL]. https://www.st.com/resource/en/reference_manual/rm0090-stm32f405415-stm32f407417-stm32f427437-and-stm32f429439-advanced-armbased-32bit-mcus-stmicroelectronics.pdf.
[9] Skuric A, Bank H S, Unger R, et al. SimpleFOC: A Field Oriented Control (FOC) Library for Controlling Brushless Direct Current (BLDC) and Stepper Motors [J]. Journal of Open Source Software, 2022, 7(74): 4232. DOI: 10.21105/joss.04232.
[10] The Curious Scientist. Discover Precision in Motion - The AS5600 Magnetic Position Encoder [EB/OL]. 2025. https://ebits.dk/blogs/ebits-blogs/discover-precision-in-motion-the-as5600-magnetic-position-encoder.
[11] Otsu N.[11] Otsu N. A threshold selection method from gray-level histograms [J]. IEEE Transactions on Systems, Man, and Cybernetics, 1979, 9(1): 62-66. DOI: 10.1109/TSMC.1979.4310076.
[12] Sahoo P K, Soltani S, Wong A K. A survey of thresholding techniques [J]. Computer Vision, Graphics, and Image Processing, 1988, 41(2): 233-260. DOI: 10.1016/0734-189X(88)90022-9.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 by author(s) and Erytis Publishing Limited

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.













