To solve the problems of low manual detection efficiency, weak anti-interference ability of traditional machine vision detection, and insufficient parameter adaptive adjustment in drug packaging detection, the work aims to design a combined detection system for drug bottle defects and liquid level based on improved fuzzy PID. Firstly, the core requirements and current technological bottlenecks of drug packaging detection were analyzed. It was determined that the detection system consisted of image acquisition, transmission control, intelligent decision-making, and execution rejection. Dynamic factors such as changes in conveyor belt speed, environmental light interference, and changes in bottle specifications during the detection process were optimized and processed. On the premise of ensuring detection accuracy, an improved fuzzy PID controller with adaptive weight factors was adopted to automatically adjust the camera exposure time, image acquisition frequency, and servo motor speed, so that the fuzzy rule weights dynamically changed with time and environmental conditions to achieve optimal detection results. The experimental results showed that compared with traditional PID control and ordinary fuzzy PID control, the improved fuzzy PID control system reduced the false detection rate by 61.3%, the missed detection rate by 60.4%, and the response time by 46.7% under the same working conditions. It could also accurately identify defects such as scratches, cracks, stains, and liquid level deviations on the bottle body. The combined detection system has good anti-interference and adaptability, with detection accuracy and efficiency meeting the industrial production needs of drug packaging, providing a new technical solution for drug packaging quality control.
Key words
drug packaging detection /
machine vision /
improved fuzzy PID /
defect detection /
liquid level detection
{{custom_sec.title}}
{{custom_sec.title}}
{{custom_sec.content}}
References
[1] 张欣欣, 赵永波. 药品包装材料对药品质量和安全性的影响探究[C]// 四川省国际医学交流促进会. 2025年基层感染质量管理提升学术研讨会论文集(四), 2025: 222-225.
ZHANG X X, ZHAO Y B.Investigation on the Impact of Pharmaceutical Packaging Materials on Drug Quality and Safety[C]// Sichuan International Medical Exchange Promotion Association. Proceedings of the 2025 Academic Symposium on Enhancing Quality Management of Infection Control at the Grassroots Level (Part IV), 2025: 222-225.
[2] 李颖, 尹光, 赵霞. 药品包装用玻璃容器耐热性和耐冷冻性及热稳定性评价调研分析[J]. 医药导报, 2024, 43(12): 2009-2013.
LI Y, YIN G, ZHAO X.Investigation and Analysis on the Evaluation of Heat Resistance, Freezing Resistance, and Thermal Stability of Glass Containers for Pharmaceutical Packaging[J]. Herald of Medicine, 2024, 43(12): 2009-2013.
[3] 范立霞. 药品包装质量管理要点分析[J]. 印刷技术, 2020(4): 19-21.
FAN L X.Analysis on the Key Points of Drug Packaging Quality Management[J]. Printing Technology, 2020(4): 19-21.
[4] 樊辉, 陶俊龙, 崔吉. 基于机器视觉的药品缺陷检测工站设计与优化[J]. 科技创新与应用, 2024, 14(32): 131-134.
FAN H, TAO J L, CUI J.Design and Optimization of Drug Defect Detection Station Based on Machine Vision[J]. Technology Innovation and Application, 2024, 14(32): 131-134.
[5] 董璇. 机器视觉在药品包装缺陷检测中的应用研究[J]. 中国新技术新产品, 2022(14): 36-38.
DONG X.Research on the Application of Machine Vision in Drug Packaging Defect Detection[J]. New Technology & New Products of China, 2022(14): 36-38.
[6] VIJAYAKUMAR A, VAIRAVASUNDARAM S, KOILRAJ J A S, et al. Real-Time Visual Intelligence for Defect Detection in Pharmaceutical Packaging[J]. Scientific Reports, 2024, 14: 18811.
[7] 刘帆帆. 基于深度学习药品包装缺陷检测技术的研究与实现[D]. 北京: 北京工业大学, 2023.
LIU F F.Research and Implementation of Drug Packaging Defect Detection Technology Based on Deep Learning[D]. Beijing: Beijing University of Technology, 2023.
[8] 陈自洋. 基于机器视觉的丙烯聚合过程液位检测系统设计[D]. 合肥: 合肥学院, 2023.
CHEN Z Y.Design of Liquid Level Detection System for Propylene Polymerization Process Based on Machine Vision[D]. Hefei: Hefei University, 2023.
[9] 王翔, 郑根泉. 便携式液位控制药液灌装机的设计与制作[J]. 医疗卫生装备, 2017, 38(1): 37-40.
WANG X, ZHENG G Q.Design and Production of Portable Level Control Liquid Filling Machine[J]. Chinese Medical Equipment Journal, 2017, 38(1): 37-40.
[10] HEO D H, SHIN G I, LEE B H.A Simplified Fuzzy PID Control for Nonlinear Characteristics of Heated Glass[J]. Journal of Electrical Engineering & Technology, 2025, 20(4): 2357-2364.
[11] LEE S, PARK D.Robust Embedded PID Control Software Execution Based on Automatic Malfunction Profile Feedback[J]. Electronics, 2024, 13(8): 537-541.
[12] BANDONG S, NAZARUDDIN Y Y, WIDYOTRIATMO A, et al.Automating RTGC with PID Control: Utilizing Camera-Based Image Processing and Object Detection[J]. IFAC-PapersOnLine, 2024, 58(7): 299-304.
[13] 张豪南. 基于多策略优化的神经网络PID控制算法研究[D]. 盐城: 盐城工学院, 2025.
ZHANG H N.Research on Neural Network PID Control Algorithm Based on Multi-Strategy Optimization[D]. Yancheng: Yancheng Institute of Technology, 2025.
[14] MIAO L C, SHU Z B.Electro-Hydraulic Servo Position Control of Bending Machine Based on Single Neuron PID[J]. Journal of Physics: Conference Series, 2024, 2816(1): 012031.
[15] 尹衍楚. 基于机器视觉的液位检测方法研究[D]. 大连: 大连海事大学, 2023.
YIN Y C.Research on Liquid Level Detection Method Based on Machine Vision[D]. Dalian: Dalian Maritime University, 2023.
[16] 曹承昊, 钱炫言, 伍哲. 基于嵌入式视觉识别的透明液体液位实时检测方法研究[J]. 机械工程师, 2022(7): 50-53.
CAO C H, QIAN X Y, WU Z.Research on Real-Time Detection Method of Transparent Liquid Level Based on Embedded Visual Recognition[J]. Mechanical Engineer, 2022(7): 50-53.