目的 为解决药品包装检测中人工检测效率低、传统机器视觉检测抗干扰能力弱、参数自适应调节不足等问题,设计一种基于改进模糊PID的药品瓶身缺陷与液位联合检测系统。方法 首先分析药品包装检测的核心需求与当前技术瓶颈,确定检测系统由图像采集、传动控制、智能决策、执行剔除4部分组成,针对检测过程中传送带速度变化、环境光线干扰、瓶型规格改变等动态因素进行优化处理;在保证检测精度的前提下,采用含有自适应权重因子的改进模糊PID控制器,自动调节相机曝光时间、图像采集频率及伺服电机速度,使模糊规则权重随时间和环境条件动态变化,以实现最优检测效果。结果 实验结果表明,与传统PID控制、普通模糊PID控制相比,相同工况下改进模糊PID控制系统的误检率降低了61.3%、漏检率降低了60.4%、响应时间缩短了46.7%,且能准确识别瓶身划痕、裂纹、污渍等缺陷及液位偏差问题。结论 该联合检测系统具备良好的抗干扰性与自适应性,检测精度及效率满足药品包装工业化生产需求,可为药品包装质量控制提供新的技术方案。
Abstract
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.
关键词
药品包装检测 /
机器视觉 /
改进模糊PID /
缺陷检测 /
液位检测
Key words
drug packaging detection /
machine vision /
improved fuzzy PID /
defect detection /
liquid level detection
{{custom_sec.title}}
{{custom_sec.title}}
{{custom_sec.content}}
参考文献
[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.
基金
重庆市教育委员会2025年度市教委科学技术研究计划项目(KJQN202505408)