纺织学报 ›› 2024, Vol. 45 ›› Issue (07): 72-77.doi: 10.13475/j.fzxb.20230307001

• 纺织工程 • 上一篇    下一篇

基于K-近邻算法改进粒子群-反向传播算法的织物质量预测技术

孙长敏1, 戴宁1(), 沈春娅2, 徐开心1, 陈炜3, 胡旭东1, 袁嫣红1, 陈祖红2   

  1. 1.浙江理工大学 浙江省现代纺织装备技术重点实验室, 浙江 杭州 310018
    2.浙江康立自控科技有限公司, 浙江 绍兴 312500
    3.浙江天衡信息技术有限公司, 浙江 绍兴 312500
  • 收稿日期:2023-03-30 修回日期:2024-03-12 出版日期:2024-07-15 发布日期:2024-07-15
  • 通讯作者: 戴宁(1991—),男,讲师,博士。主要研究方向为纺织装备智能控制技术。E-mail:990713260@qq.com
  • 作者简介:孙长敏(1998—),女,硕士生。主要研究方向为智能制造及信息化管理。
  • 基金资助:
    浙江省博士后科研项目(ZJ2021038);浙江省“尖兵”“领雁”研发攻关计划资助项目(2022C01065);浙江省“尖兵”“领雁”研发攻关计划资助项目(2022C01202);浙江理工大学科研启动基金项目(23242083-Y)

Fabric quality prediction technology based on K-nearest neighbor algorithm improved particle swarm optimization-back propagation algorithm

SUN Changmin1, DAI Ning1(), SHEN Chunya2, XU Kaixin1, CHEN Wei3, HU Xudong1, YUAN Yanhong1, CHEN Zuhong2   

  1. 1. Key Laboratory of Modern Textile Machinery & Technology of Zhejiang Province, Zhejiang Sci-Tech University, Hangzhou, Zhejiang 310018, China
    2. Zhejiang Kangli Automation Technology Co., Ltd., Shaoxing, Zhejiang 312500, China
    3. Zhejiang Tianheng Information Technology Co., Ltd., Shaoxing, Zhejiang 312500, China
  • Received:2023-03-30 Revised:2024-03-12 Published:2024-07-15 Online:2024-07-15

摘要:

为解决现有下机织物质量差异性较大且传统验布环节时间较长等问题,提出基于K-近邻(KNN)算法改进粒子群-反向传播(PSO-BP)算法的织物质量等级预测方法。首先分析织物质量预测模型,整理织物疵点类型与织物质量等级分类,并根据织物疵点特征将疵点划分为6类;其次选取14种影响织物质量的因子作为模型输入量;然后详细介绍依据KNN与PSO原理进行织物质量预测流程;最后以浙江兰溪某纺织厂近3个月16 186条织物生产数据为例,建立织物质量预测模型。结果显示:该技术对织物质量预测的准确率达到98.054%,且训练时长仅需4.8 s,在保证织物质量预测准确性的同时,极大缩短了检测时间,提高了织造车间生产效率。

关键词: 织布车间, 织物质量, K-近邻算法, 粒子群-反向传播神经网络算法, 织物质量预测

Abstract:

Objective The confirmation of fabric quality in the textile industry is usually to put the woven fabric into the inspection equipment for inspection. When the fabric defects are found in the inspection process, the repair will be carried out and so increases the production time, thereby reducing the workshop efficiency. In order to improve the efficiency of the workshop, by collecting the real-time data of the weaving workshop, the fabric quality prediction model is established to predict the fabric quality and reduce the fabric production time.

Method Aiming at the problem of large difference in fabric quality and long time of conventional fabric inspection, a fabric quality grade prediction method based on K-nearest neighbor algorithm(KNN)improved PSO-BP algorithm was proposed by combining KNN and particle swarm optimization (PSO) improved error back propagation (BP) neural network algorithm. Firstly, the fabric quality prediction model is analyzed, and the fabric defects and fabric quality grades are divided. Secondly, 14 factors affecting the fabric quality are selected as the model input, and then the KNN algorithm is adopted to classify the original sample set. Finally, the classified data is brought into the fabric quality prediction model. The fabric quality prediction model is to use the particle swarm optimization algorithm to obtain the position and speed of the optimal solution through iterative update, and take this as the initial weight and threshold into the neural network structure for training to obtain the model. By predicting the fabric quality grade, the fabric quality is improved.

Results 16,186 fabric production data collected over a 3-month period from a textile factory in Lanxi, Zhejiang Province were adopted to establish a fabric quality prediction model. Firstly, the original data set was adopted to compare and analyze PSO-BP and BP algorithms with different training target errors. According to results of KNN-PSO-BP netural network model, PSO-BP algorithm showed higher accuracy and higher training speed than BP algorithm, and PSO-BP neural network model demonstrated an accuracy of 96% with the training target error 0.000 1. The KNN algorithm was adopted to divide the original sample set into five categories. The mean square error, accuracy and training time of the neural network model were calculated when the training target error is 0.000 1. The accuracy of the KNN-PSO-BP neural network model was 98.054%.

Conclusion This research demonstrated that KNN-PSO-BP algorithm has higher accuracy than PSO-BP algorithm and BP algorithm. The training time of fabric quality grade prediction is only 4.8 s, and the accuracy rate is 98.054%. The algorithm greatly shortens the detection time while ensuring the accuracy of fabric quality prediction, improves the production efficiency of weaving, and provides a certain basis for subsequent research on the location and size of fabric defects.

Key words: weaving workshop, fabric quality, K-nearest neighbor algorithm, particle swarm optimization-back propagation neural network algorithm, fabric quality prediction

中图分类号: 

  • TS103.3

图1

织物质量预测流程图"

图2

分类算法运算流程"

表1

测试集到训练集的欧式距离di"

测试集编号 di
1135 0
68 38
3 78
10275 1 090
3556 1 258

表2

不同训练目标误差的计算结果"



算法
0.01 0.005 0.001 0.0001
均方
误差
准确率/
%
训练
时长/s
均方
误差
准确率/
%
训练
时长/s
均方
误差
准确率/
%
训练
时长/s
均方
误差
准确率/
%
训练
时长/s
PSO-BP 0.136 92 4.304 0.129 92 4.098 0.100 94 4.051 0.060 96 3.089
BP 0.293 88 3.848 0.285 90 3.673 0.218 90 3.716 0.310 83 4.375

图3

5类样本的预测结果"

表3

KNN-PSO-BP神经网络模型对5类样本的计算结果"

参数 训练目标误差为0.000 1
均方误差 准确率/% 训练时长/s
第1类 0.124 97.55 8.284
第2类 0.195 98.47 3.869
第3类 0.159 100.00 0.875
第4类 0.200 97.39 4.777
第5类 0.103 96.86 6.005
平均值 0.124 98.054 4.762
[1] 熊经纬, 杨建国, 徐兰. 基于PSO-BP神经网络的纱线质量预测[J]. 东华大学学报(自然科学版), 2015, 41(4): 498-502.
XIONG Jingwei, YANG Jianguo, XU Lan. Combining the particle swarm optimization with BP neural network for yarn quarlity forecasting[J]. Journal of Donghua University(Natural Science), 2015, 41 (4): 498-502.
[2] 王侃枫, 马佳陆. 基于遗传规划的纱线质量预测[J]. 纺织报告, 2020, 39(12): 21-23,26.
WANG Kanfeng, MA Jialu. Yarn quality prediction based on genetic programming[J]. Textile Reports, 2020, 39(12): 21-23,26.
[3] 查刘根, 谢春萍. 应用四层BP神经网络的棉纱成纱质量预测[J]. 纺织学报, 2019, 40(1): 52-54,61.
ZHA Liugen, XIE Chunping. Prediction of cotten yarn quality based on four-layer BP neural network[J]. Journal of Textile Research, 2019, 40(1): 52-54,61.
[4] 金守峰, 侯一泽, 焦航, 等. 基于改进AlexNet模型的抓毛织物质量检测方法[J]. 纺织学报, 2022, 43(6): 133-139.
JIN Shoufeng, HOU Yize, JIAO Hang, et al. An improved AlexNet model for fleece fabric quality inspection[J]. Journal of Textile Research, 2022, 43(6): 133-139.
[5] 郭波, 吕文涛, 余序宜, 等. 基于改进YOLOv5模型的织物疵点检测算法[J]. 浙江理工大学学报(自然科学版), 2022, 47(5): 755-763.
GUO Bo, LÜ Wentao, YU Xuyi, et al. Fabric defect detection algorithm based on improved YOLOv5 model[J]. Journal of Zhejiang Sci-Tech University(Natural Science), 2022, 47(5): 755-763.
[6] 王玉亮, 于伟东. 织造工艺过程质量预报及质量控制[J]. 毛纺科技, 2004(10): 13-16.
WANG Yuliang, YU Weidong. Quality forecast and control for weaving processing[J]. Wool Textile Journal, 2004(10): 13-16.
[7] 王玉亮, 于伟东. 毛精纺中织造质量的BP神经网络预报技术[J]. 东华大学学报(自然科学版), 2006(1): 84-88.
WANG Yuliang, YU Weidong. Forecasting technique of BP neural network in weaving processing of wool worsted[J]. Journal of Donghua University(Natural Science), 2006(1): 84-88.
[8] 张著英, 黄玉龙, 王翰虎. 一个高效的KNN分类算法[J]. 计算机科学, 2008(3): 170-172.
ZHANG Zhuying, HUANG Yulong, WANG Hanhu. A new KNN classfication approach[J]. Computer Science, 2008(3): 170-172.
[9] 王嵘冰, 徐红艳, 李波, 等. BP神经网络隐含层节点数确定方法研究[J]. 计算机技术与发展, 2018, 28(4): 5.
WANG Rongbing, XU Hongyan, LI Bo, et al. Research on method of determining hidden layer nodes in BP neural network[J]. Computer Technology and Development, 2018, 28(4): 5.
[10] 李爱国, 覃征, 鲍复民, 等. 粒子群优化算法[J]. 计算机工程与应用, 2002(21): 1-3.
LI Aiguo, QIN Zheng, BAO Fumin, et al. Partical swarm optimization algorithms[J]. Computer Engineering and Applications, 2002(21): 1-3.
[1] 付晗, 胡峰, 龚杰, 余联庆. 面向织物疵点检测的缺陷重构方法[J]. 纺织学报, 2023, 44(07): 103-109.
[2] 金守峰, 侯一泽, 焦航, 张鹏, 李宇涛. 基于改进AlexNet模型的抓毛织物质量检测方法[J]. 纺织学报, 2022, 43(06): 133-139.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!