CN113536687A - Construction method of color and dye concentration prediction model of monochrome cotton fabric based on PSO-LSSVM - Google Patents
Construction method of color and dye concentration prediction model of monochrome cotton fabric based on PSO-LSSVM Download PDFInfo
- Publication number
- CN113536687A CN113536687A CN202110844257.5A CN202110844257A CN113536687A CN 113536687 A CN113536687 A CN 113536687A CN 202110844257 A CN202110844257 A CN 202110844257A CN 113536687 A CN113536687 A CN 113536687A
- Authority
- CN
- China
- Prior art keywords
- color
- lssvm
- pso
- prediction model
- dyeing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
- G06F30/27—Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
- G06F16/211—Schema design and management
- G06F16/212—Schema design and management with details for data modelling support
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Evolutionary Computation (AREA)
- Data Mining & Analysis (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- Geometry (AREA)
- Spectrometry And Color Measurement (AREA)
Abstract
本发明提供一种基于PSO‑LSSVM的单色棉织物颜色和染料浓度预测模型构建方法,包括以下步骤:获取单色织物合格染色数据,将其分为训练集和测试集;设定初始LSSVM参数并建立LSSVM初始模型对所述训练集进行预测;利用PSO算法对预测结果进行参数优化处理赋值给LSSVM初始模型,得到PSO‑LSSVM预测基础模型;将测试集作为测试样本,利用PSO‑LSSVM预测基础模型进行测试训练,得到最终PSO‑LSSVM预测模型;分别以染料浓度为和颜色特征参数L*、a*和b*值为输入输出的最终PSO‑LSSVM预测模型为颜色预测模型和染料浓度预测模型。本发明建立的颜色预测模型和染料浓度预测模型,特征参数值维持在理想范围内,专用性好,在预测未知单色染色织物配方时,染料浓度的预测误差小,配方准确。
The invention provides a method for constructing a color and dye concentration prediction model for monochrome cotton fabrics based on PSO-LSSVM, comprising the following steps: obtaining qualified dyeing data of monochrome fabrics, dividing them into training sets and test sets; setting initial LSSVM parameters And establish the LSSVM initial model to predict the training set; use the PSO algorithm to perform parameter optimization processing on the prediction results and assign them to the LSSVM initial model to obtain the PSO-LSSVM prediction basic model; The test set is used as a test sample, and the PSO-LSSVM prediction base is used. The model is tested and trained to obtain the final PSO-LSSVM prediction model; the final PSO-LSSVM prediction model with the dye concentration as and the color feature parameters L*, a* and b* as the input and output values are the color prediction model and the dye concentration prediction model. . The color prediction model and the dye concentration prediction model established by the invention maintain the characteristic parameter values within the ideal range, and have good specificity.
Description
技术领域technical field
本发明属于染色测配色领域,尤其涉及到一种基于PSO-LSSVM的单色棉织物颜色和染 料浓度预测模型构建方法。The invention belongs to the field of dyeing and color matching, and particularly relates to a method for constructing a PSO-LSSVM-based monochromatic cotton fabric color and dye concentration prediction model.
背景技术Background technique
轧烘轧蒸过程是棉织物常用的染色过程,在实际制备供客户确认的小样中,目前仍然主 要是采用人工配色的方法,凭借配色人员的经验调配色彩打样,周期长,且在批量染色时常 常会碰到许多不可预测的干扰和变化,可重现性低,降低了生产效率。随着计算机技术、数 学、物理等学科的飞速发展,配色的理论、方法和技术也在不断地变化和发展,计算机配色 系统也应运而生。目前,主要有三种计算机配色方法,即色号归档检索、全光谱配色和三刺 激值配色,其中适用于计算机数值计算的是全光谱配色和三次刺激值配色。The process of pad-drying and pad-steaming is a common dyeing process for cotton fabrics. In the actual preparation of samples for customer confirmation, the method of manual color matching is still mainly used. The color proofing is prepared with the experience of color matching personnel. The cycle is long, and when batch dyeing Many unpredictable disturbances and variations are often encountered, resulting in low reproducibility and reduced productivity. With the rapid development of computer technology, mathematics, physics and other disciplines, the theory, method and technology of color matching are constantly changing and developing, and the computer color matching system also emerges as the times require. At present, there are mainly three computer color matching methods, namely, color number file retrieval, full spectrum color matching and tristimulus value color matching. Among them, the full spectrum color matching and triple stimulus value color matching are suitable for computer numerical calculation.
机器学习方法已经在很多领导取得了成功应用,而计算机配色技术是新一代配色技术, 它成功结合了计算机和印染行业中的配色技术,大大提高了配色效率。在现有配色方法中, 三刺激值配色是最为普遍的一种方法,目前基本上均是基于最小二乘法的多项式回归和BP神 经网络,建立染料浓度与颜色三刺激值间的配色模型,由计算机进行测配色。Machine learning methods have been successfully applied in many leaders, and computer color matching technology is a new generation of color matching technology. It successfully combines computer and color matching technology in the printing and dyeing industry, greatly improving the efficiency of color matching. Among the existing color matching methods, tristimulus color matching is the most common method. At present, it is basically based on the least squares method of polynomial regression and BP neural network to establish a color matching model between dye concentration and color tristimulus values. Computer color matching.
在机器学习方法中,基于统计学习理论中的VC维(Vapnik-ChervonenkisDimension)和 结构风险最小化原则的支持向量机(SVM)也是一种十分重要的方法,可以较好地解决小样 本、非线性、高维数和局部极小值这些问题,目前已经成功应用在模式识别、人工智能、医 学、经济等多个领域。但是SVM在处理有限的训练样本时表现出很高的性能,然而,当训练 数据量较大时,计算过程变得十分困难,这使得它耗时且不适合实时应用。最小二乘支持向 量机(LSSVM)可克服标准支持向量机的不足,将SVM的二次规划问题的求解转化为求解 线性方程组。因此LSSVM在解决大数据、因素多的复杂问题时能够大幅度降低计算的复杂程 度,从而比SVM的求解速度更快,精度更高,并根据核函数的选取具有非线性建模能力强、 泛化能力强、训练时间短等优点。尽管LSSVM已经应用于纺织染色中得到应用,但基于 LSSVM进行配色模型的研究几乎没有。In the machine learning method, the support vector machine (SVM) based on the VC dimension (Vapnik-ChervonenkisDimension) and the principle of structural risk minimization in statistical learning theory is also a very important method, which can better solve the problem of small samples, nonlinear , high dimensionality and local minima have been successfully applied in many fields such as pattern recognition, artificial intelligence, medicine, and economics. But SVM shows high performance when dealing with limited training samples, however, when the amount of training data is large, the computational process becomes very difficult, which makes it time-consuming and unsuitable for real-time applications. Least Squares Support Vector Machine (LSSVM) can overcome the insufficiency of standard support vector machine, and transform the solution of the quadratic programming problem of SVM into the solution of linear equations. Therefore, LSSVM can greatly reduce the computational complexity when solving complex problems with big data and many factors, so it is faster and more accurate than SVM. It has the advantages of strong chemical ability and short training time. Although LSSVM has been applied to textile dyeing, there are few researches on color matching model based on LSSVM.
发明内容SUMMARY OF THE INVENTION
本发明的一个目的是提供一种基于PSO-LSSVM的单色棉织物颜色和染料浓度预测模型 构建方法,并提供至少后面将说明的优点。An object of the present invention is to provide a PSO-LSSVM-based method for building a color and dye concentration prediction model for single-color cotton fabrics, and to provide at least the advantages that will be described later.
为活性染料上染棉织物的计算机测配色提出一种崭新而又准确的方法,本发明一种基于 PSO-LSSVM和单个活性染料数据库预测染料浓度的方法,该方法是基于PSO-LSSVM算法 和单个活性染料数据库建立的颜色预测模型和染料浓度预测模型,两类模型的特征参数值均 能维持在理想的范围内,构筑的模型和单个活性染料数据库染料专用性好,在预测未知单色 染色织物配方时,染料浓度的预测误差小,配方准确,为计算机测配色提出了一种新的方法。A new and accurate method is proposed for computer color matching of cotton fabrics dyed with reactive dyes. The present invention is a method for predicting dye concentration based on PSO-LSSVM and a single reactive dye database. The method is based on the PSO-LSSVM algorithm and a single reactive dye database. The color prediction model and the dye concentration prediction model established by the reactive dye database, the characteristic parameter values of the two types of models can be maintained within the ideal range, and the constructed model and the single reactive dye database have good dye specificity, and can be used in predicting unknown single-color dyed fabrics. When formulating, the prediction error of dye concentration is small, and the formula is accurate. A new method is proposed for computer color matching.
本发明的技术方案如下:The technical scheme of the present invention is as follows:
基于PSO-LSSVM的单色棉织物颜色和染料浓度预测模型构建方法,其包括以下步骤:A method for building a color and dye concentration prediction model for single-color cotton fabrics based on PSO-LSSVM, which includes the following steps:
获取单色织物合格染色数据,其包括织物染料浓度和颜色特征参数L*、a*和b*值,将所 述织物合格染色数据分为训练集和测试集;Obtaining qualified dyeing data for single-color fabrics, including fabric dye concentration and color characteristic parameters L*, a* and b* values, and dividing the fabric qualified dyeing data into a training set and a test set;
设定初始LSSVM参数并建立LSSVM初始模型,利用所述LSSVM初始模型对所述训练集进行预测;Set initial LSSVM parameters and establish an initial LSSVM model, and utilize the initial LSSVM model to predict the training set;
利用PSO算法对上述预测结果进行参数优化处理,得到全局最优值gbestd,即最优化参 数组赋值给LSSVM初始模型,得到PSO-LSSVM预测基础模型;The PSO algorithm is used to optimize the parameters of the above prediction results, and the global optimal value gbest d is obtained, that is, the optimal parameter group Assign it to the LSSVM initial model to obtain the PSO-LSSVM prediction basic model;
将所述测试集作为测试样本,利用PSO-LSSVM预测基础模型队进行测试训练,得到最 终PSO-LSSVM预测模型;With described test set as test sample, utilize PSO-LSSVM prediction basic model team to carry out test training, obtain final PSO-LSSVM prediction model;
以染料浓度为输入、颜色特征参数L*、a*和b*值为输出的最终PSO-LSSVM预测模型为 颜色预测模型;以染色织物颜色特征参数L*、a*和b*值为输入染料浓度为输出的最终PSO-LSSVM预测模型为染料浓度预测模型。The final PSO-LSSVM prediction model with dye concentration as input and color feature parameters L*, a* and b* values as output is the color prediction model; color feature parameters L*, a* and b* values of dyed fabrics are input dyes The final PSO-LSSVM prediction model whose concentration is the output is the dye concentration prediction model.
优选的是,所述的基于PSO-LSSVM的单色棉织物颜色和染料浓度预测模型构建方法中, 获取单色织物合格染色数据包括:Preferably, in the described PSO-LSSVM-based method for constructing a color and dye concentration prediction model for monochromatic cotton fabrics, obtaining qualified dyeing data for monochromatic fabrics includes:
预先设定活性染料上染棉织物时的染色条件和染色浓度,进行轧烘轧蒸染色试验制得染 制色样;Preset the dyeing conditions and dyeing concentration when dyeing cotton fabrics with reactive dyes, and carry out the pad-bake pad-steam dyeing test to obtain the dyed color samples;
用分光测色仪测试染色制样的颜色特征参数,剔除异常染色数据,重染,记录合格染色 条件下染料浓度和颜色特征参数L*、a*和b*值;Use a spectrophotometer to test the color characteristic parameters of dyeing samples, remove abnormal dyeing data, re-dye, and record the dye concentration and color characteristic parameters L*, a* and b* values under qualified dyeing conditions;
其中,in,
染色条件为,氯化钠浓度为150-200g/L,碳酸钠15-25g/L,氢氧化钠4-8g/L,浸轧后织 物带液率60-75%,在110-125℃热风下预烘100-200s,在100-102℃饱和蒸汽下汽蒸120-250s;The dyeing conditions are as follows: the concentration of sodium chloride is 150-200g/L, sodium carbonate is 15-25g/L, sodium hydroxide is 4-8g/L, and the liquid rate of the fabric after padding is 60-75%. Pre-bake for 100-200s, steam for 120-250s under saturated steam at 100-102℃;
染料浓度为0.01-20g/L且总计不超过20g/L,按浓度不同分为15-30组染色组;The dye concentration is 0.01-20g/L and the total does not exceed 20g/L, and it is divided into 15-30 dyeing groups according to different concentrations;
各染色制样的染色条件相同;The dyeing conditions of each dyeing sample are the same;
剔除异常染色数据包括对所述染制色样使用台式分光测色仪进行测色,记录空白织物和 各染料质量浓度梯度色样的光谱反射率曲线和K/S值曲线,对出现如曲线交叉和吸收峰错位 等不规则曲线进行重新打样修正。Removing abnormal dyeing data includes using a desktop spectrophotometer to measure the dyed color sample, and recording the spectral reflectance curve and K/S value curve of the blank fabric and each dye mass concentration gradient color sample. Re-proofing and correction of irregular curves such as dislocation of absorption peaks.
优选的是,所述的基于PSO-LSSVM的单色棉织物颜色和染料浓度预测模型构建方法中, 所述PSO算法包括:Preferably, in the described PSO-LSSVM-based method for constructing a color and dye concentration prediction model for monochrome cotton fabrics, the PSO algorithm includes:
针对所需建立的染色效果预测模型设置具体参数:群体规模m、粒子的维度n、最大位置 Xmax、最大速度Vmax、惯性权重w、学习因子c1和c2、最大迭代次数Kmax以及优化问题的适应 度函数fitness();Set specific parameters for the dyeing effect prediction model to be established: population size m, particle dimension n, maximum position X max , maximum velocity V max , inertia weight w, learning factors c 1 and c 2 , maximum number of iterations K max and The fitness function fitness() of the optimization problem;
设置种群的初始信息,包括位置xi和速度vi;Set the initial information of the population, including position xi and velocity vi ;
根据目标函数计算各粒子适应度值,并评价每个粒子的适应度;Calculate the fitness value of each particle according to the objective function, and evaluate the fitness of each particle;
选择当前个体最优位置,对每个粒子当前的适应度值与其历史最佳位置的适应 度值fitness(pbestid)对比,若当前位置适应度值较高,则用当前位置更新历史最佳位置 Select the optimal position of the current individual and the current fitness value of each particle Compared with the fitness value fitness(pbest id ) of its historical best position, if the fitness value of the current position is higher, the current position is used to update the historical best position
选择当前群体最优位置,对每个粒子当前的适应度值与群体最佳位置的适应度 值fitness(gbestd)对比,若当前位置适应度值较高,则用当前位置更新群体最佳位置判断是否满足终止条件,满足则搜索停止,输出结果;不满足则继续下一步;Select the optimal position of the current group, and the current fitness value of each particle Compared with the fitness value fitness(gbest d ) of the best position of the group, if the fitness value of the current position is higher, the best position of the group is updated with the current position Determine whether the termination condition is satisfied, if it is satisfied, the search will stop and the result will be output; if it is not satisfied, continue to the next step;
判断是否满足迭代结束条件,根据优化问题设置迭代结束条件,如不满足结束条件,则 返回第二步骤重新计算;Determine whether the iteration end condition is met, and set the iteration end condition according to the optimization problem. If the end condition is not met, return to the second step to recalculate;
若满足输出条件,则输出全局最佳位置gbestd,并停止搜索。If the output condition is satisfied, output the global best position gbest d and stop searching.
优选的是,所述的基于PSO-LSSVM的单色棉织物颜色和染料浓度预测模型构建方法中, 将所述测试集作为测试样本,利用PSO-LSSVM预测基础模型队进行测试训练,得到最终PSO-LSSVM预测模型包括:Preferably, in the described PSO-LSSVM-based method for constructing a color and dye concentration prediction model for monochrome cotton fabrics, the test set is used as a test sample, and the PSO-LSSVM is used to predict the basic model team for test training to obtain the final PSO -LSSVM prediction model includes:
根据模型特征参数值RMSE、Ep、MAE和R2综合判断模型的质量;According to the model characteristic parameter values RMSE, E p , MAE and R 2 , the quality of the model is comprehensively judged;
如果建立的预测模型没有达到预定值,则返回再次进行颜色预测模型和染料浓度预测模 型的构建;If the established prediction model does not reach the predetermined value, return to the construction of the color prediction model and the dye concentration prediction model again;
其中,RMSE计算值要小于0.40,MAE计算值小于0.35,Ep计算值大于90%,R2计算值大于99%。Among them, the calculated value of RMSE should be less than 0.40, the calculated value of MAE should be less than 0.35, the calculated value of Ep should be greater than 90%, and the calculated value of R 2 should be greater than 99%.
优选的是,所述的基于PSO-LSSVM的单色棉织物颜色和染料浓度预测模型构建方法中, MAE、RMSE、Ep和R2定义为:Preferably, in the described PSO- LSSVM -based method for constructing a color and dye concentration prediction model for monochrome cotton fabrics, MAE, RMSE, Ep and R are defined as:
其中,n是样本数,y是实验值,是预测值,是样本平均值。where n is the number of samples, y is the experimental value, is the predicted value, is the sample mean.
上述涉及LSSVM的算法原理和具体步骤为:给定一组训练数据集{(xi,yi),i=1,2,N}, 其中,N是训练样本数量;xi∈Rd是输入矩阵,d是矩阵的维度;yi∈R是输出矩阵。然后通过 一个非线性映射φ(x),将训练数据集从原始空间映射到高维特征空间,LSSVM的决策函数 如下所示:The above algorithm principles and specific steps involving LSSVM are: given a set of training data sets {(xi, yi), i=1, 2, N}, where N is the number of training samples; xi∈Rd is the input matrix, d is the dimension of the matrix; yi ∈ R is the output matrix. Then, through a nonlinear mapping φ(x), the training dataset is mapped from the original space to the high-dimensional feature space. The decision function of LSSVM is as follows:
式中:w是权重向量,常数b是偏置项。LSSVM的优化问题如下:where w is the weight vector, and the constant b is the bias term. The optimization problem of LSSVM is as follows:
式中:γ是正则化参数,ξ是误差变量,相比于SVM算法,其约束条件有所不同,变为如下形式:In the formula: γ is the regularization parameter, ξ is the error variable. Compared with the SVM algorithm, its constraints are different, and it becomes the following form:
将支持向量机的不等式约束改为等式约束,构造拉格朗日函数L进行求解:Change the inequality constraints of the support vector machine to equality constraints, and construct the Lagrangian function L to solve:
式中:αi为拉格朗日乘子。根据Karush-Kuhn-Tucker(KKT)条件,得到如下等式约束条 件:where αi is the Lagrange multiplier. According to the Karush-Kuhn-Tucker (KKT) condition, the following equation constraints are obtained:
接着,消去w和ξ得到如下线性方程组:Next, eliminate w and ξ to get the following linear system of equations:
式中:I是单位矩阵;α是支持向量;其他如下:In the formula: I is the identity matrix; α is the support vector; others are as follows:
用Ω表示核矩阵内积,核函数技巧如下:Use Ω to represent the inner product of the kernel matrix, and the kernel function technique is as follows:
最终得到LSSVM的决策函数即回归模型如下:Finally, the decision function of LSSVM, that is, the regression model, is obtained as follows:
式中:α和b求解获得。在实际建模过程中,α和b是在MATLAB平台中通过应用LSSVM工具箱编程运算得到,支持向量α是一个N行1列的矩阵。In the formula: α and b are obtained by solving. In the actual modeling process, α and b are obtained by applying the LSSVM toolbox programming operation in the MATLAB platform, and the support vector α is a matrix with N rows and 1 column.
本发明具有以下有益效果:The present invention has the following beneficial effects:
基于PSO-LSSVM算法建立的颜色预测模型和染料浓度预测模型,两种模型的特征参数 值容易都能维持在理想的范围内,专用性好;Based on the color prediction model and dye concentration prediction model established by the PSO-LSSVM algorithm, the characteristic parameter values of the two models can be easily maintained within the ideal range, and the specificity is good;
染料浓度的预测误差小,双拼染色配方预测准确;The prediction error of dye concentration is small, and the prediction of double spell dyeing formula is accurate;
获取合格染色数据要求的试验组少,建立数据库简单,极具应用前景。There are few test groups required to obtain qualified dyeing data, and the establishment of a database is simple and has great application prospects.
本发明的其它优点、目标和特征将部分通过下面的说明体现,部分还将通过对本发明的 研究和实践而为本领域的技术人员所理解。Other advantages, objects, and features of the present invention will appear in part from the description that follows, and in part will be appreciated by those skilled in the art from the study and practice of the invention.
附图说明Description of drawings
图1为本发明提供的基于PSO-LSSVM的单色棉织物颜色和染料浓度预测模型构建方法 的流程图;Fig. 1 is the flow chart of the method for building a monochrome cotton fabric color and dye concentration prediction model based on PSO-LSSVM provided by the invention;
图2为本发明提供的基于PSO-LSSVM的单色棉织物颜色和染料浓度预测模型构建方法 的一个实施例中的POS算法流程图。Fig. 2 is the POS algorithm flow chart in one embodiment of the method for constructing the color and dye concentration prediction model of monochrome cotton fabric based on PSO-LSSVM provided by the present invention.
具体实施方式Detailed ways
下面结合附图对本发明做进一步的详细说明,以令本领域技术人员参照说明书文字能够 据以实施。The present invention will be further described in detail below in conjunction with the accompanying drawings, so that those skilled in the art can refer to the description and implement accordingly.
应当理解,本文所使用的诸如“具有”、“包含”以及“包括”术语并不配出一个或多个其它元 件或其组合的存在或添加。It should be understood that terms such as "having", "comprising" and "including" as used herein do not assign the presence or addition of one or more other elements or combinations thereof.
如图1所示,本发明提供一种基于PSO-LSSVM的单色棉织物颜色和染料浓度预测模型 构建方法,包括以下步骤:As shown in Figure 1, the present invention provides a kind of monochromatic cotton fabric color and dye concentration prediction model construction method based on PSO-LSSVM, comprises the following steps:
S1:设计活性染料上染棉织物时的染色条件和一系列染料浓度,进行轧烘轧蒸染色试验;S1: Design the dyeing conditions and a series of dye concentrations when dyeing cotton fabrics with reactive dyes, and conduct a pad-bake pad-steam dyeing test;
S2:测试各组染色条件的棉织物的颜色特征参数CIE Lab,剔除异常数据,记录合格染色 条件下染料浓度和颜色特征参数L*、a*和b*值,建立单个活性染料数据库;S2: Test the color characteristic parameters CIE Lab of cotton fabrics of each group of dyeing conditions, remove abnormal data, record the dye concentration and color characteristic parameters L*, a* and b* values under qualified dyeing conditions, and establish a single reactive dye database;
S3:从上述S2建立的单个活性染料数据库中随机选取4/5数据作为训练组,分别建立以 染料浓度为输入、染色织物颜色特征参数L*、a*和b*值为输出的颜色预测模型,和以染色织 物颜色特征参数L*、a*和b*值为输入染料浓度为输出的染料浓度预测模型;S3: randomly select 4/5 data from the single reactive dye database established in the above S2 as a training group, and establish a color prediction model with the dye concentration as the input and the color characteristic parameters L*, a* and b* of the dyed fabric as the output respectively. , and a dye concentration prediction model that takes the color characteristic parameters L*, a* and b* of dyed fabrics as the input dye concentration as the output;
S4:用剩下的数据作为测试组,根据模型特征参数值RMSE、Ep、MAE和R2综合判断模型的质量。如果模型没定规定的质量要求,则返回S3;S4: Use the remaining data as the test group, and comprehensively judge the quality of the model according to the model characteristic parameter values RMSE, Ep , MAE and R2. If the model has no specified quality requirements, return to S3;
S5:用分光测色仪测定未知单色染色棉织物,将测得的颜色特征参数L*、a*和b*值输入 配方预测模型得到染料浓度;S5: Measure the unknown single-color dyed cotton fabric with a spectrophotometer, and input the measured color characteristic parameters L*, a* and b* values into the formula prediction model to obtain the dye concentration;
S6:再将染料浓度输入颜色预测模型得到颜色特征参数L*、a*和b*值,根据实验色样与 预测的颜色特征参数计算色差ΔEab*;S6: then input the dye concentration into the color prediction model to obtain the color characteristic parameters L*, a* and b* values, and calculate the color difference ΔE ab * according to the experimental color sample and the predicted color characteristic parameters;
S7:比较各个单个活性染料数据库及其相应预测模型下计算的色差ΔEab*,最小色差值 的染料浓度即为最佳预测染料浓度。S7: Compare each single reactive dye database and the calculated color difference ΔE ab * under the corresponding prediction model, and the dye concentration with the smallest color difference value is the best predicted dye concentration.
上述步骤S1中染色条件为,氯化钠浓度为150-200g/L,碳酸钠15-25g/L,氢氧化钠4-8 g/L,浸轧后织物带液率60-75%,在110-125℃热风下预烘100-200s,在100-102℃饱和蒸汽 下汽蒸120-250s;上述步骤S1中染料浓度为0.01-20g/L,按一定浓度梯度设计,共计15-30 组;In the above-mentioned step S1, the dyeing conditions are as follows: the concentration of sodium chloride is 150-200g/L, the sodium carbonate is 15-25g/L, the sodium hydroxide is 4-8 g/L, and the liquid rate of the fabric after padding is 60-75%. Pre-bake under hot air at 110-125°C for 100-200s, and steam under saturated steam at 100-102°C for 120-250s; the dye concentration in the above step S1 is 0.01-20g/L, designed according to a certain concentration gradient, a total of 15-30 groups ;
上述单个活性染料数据库中各组数据为同一染色条件下获得的;In the above-mentioned single reactive dye database, each group of data is obtained under the same dyeing condition;
上述步骤S2中剔除异常数据方法为:对上述步骤S1中染制色样使用台式分光测色仪进 行测色,记录空白织物和各染料质量浓度梯度色样的光谱反射率曲线和K/S值曲线,对出现 如曲线交叉和吸收峰错位等不规则曲线进行重新打样修正。The method for removing abnormal data in the above step S2 is: use a desktop spectrophotometer to measure the color of the dyed color sample in the above step S1, and record the spectral reflectance curve and K/S value of the blank fabric and each dye mass concentration gradient color sample curve, and re-proofing and correcting irregular curves such as curve crossing and absorption peak dislocation.
上述步骤S3中建立的颜色预测模型和染料浓度预测模型时,参数设置为:粒子数popsize=20,最大迭代次数maxgen=200,学习因子c1=c2=1.4,惯性权重 w∈[0.8,1.2],正则化参数γ∈[0.1,1000],核函数宽度σ2∈[0.1,100],正则化参数γ 迭代速度vγ∈[-500,500],核函数宽度σ2迭代速度采用径向基核函数 (kernel=′RBF_kernel′),并以均方误差作为适应度函数(fitness()=MSE),设定精度 ep=10-3,满足设定精度或最大迭代次数则输出参数组,建立PSO-LSSVM预测模型。For the color prediction model and the dye concentration prediction model established in the above step S3, the parameters are set as: the number of particles popsize=20, the maximum number of iterations maxgen=200, the learning factor c 1 =c 2 =1.4, the inertia weight w∈[0.8, 1.2], regularization parameter γ∈[0.1, 1000], kernel function width σ 2 ∈ [0.1, 100], regularization parameter γ iteration speed v γ ∈ [-500, 500], kernel function width σ 2 iteration speed The radial basis kernel function (kernel='RBF_kernel') is used, and the mean square error is used as the fitness function (fitness()=MSE), and the set precision is ep=10 -3 . If the set precision or the maximum number of iterations is satisfied, the output will be Parameter group, establish PSO-LSSVM prediction model.
上述步骤S4中模型特征参数值RMSE计算值小于0.40,MAE计算值小于0.35,Ep计算值大于90%,R2计算值大于99%,MAE、RMSE、Ep和R2定义为:In the above step S4, the calculated value of the model feature parameter RMSE is less than 0.40, the calculated value of MAE is less than 0.35, the calculated value of Ep is greater than 90%, and the calculated value of R 2 is greater than 99%. MAE, RMSE, Ep and R 2 are defined as:
其中,n是样本数,y是实验值,是预测值,是样本平均值。where n is the number of samples, y is the experimental value, is the predicted value, is the sample mean.
上述步骤S7中ΔEab*计算公式如下:The calculation formula of ΔE ab * in the above step S7 is as follows:
式中:ΔEab*为实验色样与预测的颜色之间的总色差;ΔL*、Δa*和Δb*值为CIELAB 色空间,其计算公式如下:In the formula: ΔE ab * is the total color difference between the experimental color sample and the predicted color; ΔL*, Δa* and Δb* are the CIELAB color space, and the calculation formula is as follows:
L*=116f(Y/Yn)-16L * =116f(Y/ Yn )-16
a*=500[f(X/Xn)-f(Y/Yn)]a * =500[f(X/ Xn )-f(Y/ Yn )]
b*=200[f(Y/Yn)-f(Z/Zn)]b * =200[ f (Y/ Yn )-f(Z/Zn)]
其中,X/Xn、Y/Yn、Z/Zn需满足同时大于(6/29)3或同时小于等于(6/29)3。Wherein, X/X n , Y/Y n , and Z/Zn need to be greater than ( 6/29 ) 3 or less than or equal to (6/29) 3 at the same time.
上式中X、Y、Z为颜色样品的三刺激值;Xn、Yn、Zn为CIE标准照明体照射到完全漫反射体表面再反射到观测者眼中的三刺激值。In the above formula, X, Y, and Z are the tristimulus values of the color sample; Xn , Yn , and Zn are the tristimulus values of the CIE standard illuminator irradiated on the surface of the completely diffuse reflector and then reflected to the observer's eyes.
基于PSO-LSSVM建立颜色预测模型和染料浓度预测模型,建模过程如下:Based on PSO-LSSVM, a color prediction model and a dye concentration prediction model are established. The modeling process is as follows:
(1)对染色效果参数和染色影响因素参数进行判断是否需要归一化处理,形成样本矩阵, 划分训练集和测试集;(1) Judging whether the dyeing effect parameters and dyeing influencing factor parameters need to be normalized, forming a sample matrix, and dividing the training set and the test set;
(2)设定RBF核函数参数组(γ,σ2)的范围,通常γ∈[0.1,1000],σ2∈[0.1,100]。设 置PSO相关参数,利用PSO算法对种群进行初始化;(2) Set the range of the RBF kernel function parameter group (γ, σ 2 ), usually γ∈[0.1, 1000], σ2∈[0.1, 100]. Set the PSO related parameters, and use the PSO algorithm to initialize the population;
(3)确定适应度函数,以训练集计算粒子适应度值并进行比较,选择个体最优值pbestid和 全局最优gbestd,更新各粒子的位置和速度;(3) Determine the fitness function, calculate and compare the particle fitness value with the training set, select the individual optimal value pbest id and the global optimal gbest d , and update the position and speed of each particle;
(4)迭代寻优至满足结束条件(适应度值最小或最大迭代次数);(4) Iterative optimization to meet the end condition (minimum fitness value or maximum number of iterations);
(5)输出全局最优值gbestd,即最优化参数组赋值给LSSVM,导入训练集, 调用trainlssvm函数对所得参数进行训练,得到训练好的PSO-LSSVM模型;(5) Output the global optimal value gbest d , that is, the optimal parameter group Assign the value to LSSVM, import the training set, call the trainlssvm function to train the obtained parameters, and obtain the trained PSO-LSSVM model;
(6)调用simlssvm函数对训练好的模型进行仿真,将测试集的输入矩阵代入预测模型, 仿真运算得到测试集的输出矩阵的预测值,采用评价指标与实验值进行比较,若仿真效果达 到预期则进行下一步,反之继续使用PSO算法对参数组进行寻优。(6) Call the simlssvm function to simulate the trained model, substitute the input matrix of the test set into the prediction model, obtain the predicted value of the output matrix of the test set through the simulation operation, and use the evaluation index to compare with the experimental value, if the simulation effect reaches the expectation Then go to the next step, otherwise continue to use the PSO algorithm to optimize the parameter group.
如图2所示,上述PSO算法具体包括如下几个步骤:As shown in Figure 2, the above PSO algorithm specifically includes the following steps:
(1)首先需要针对所需建立的预测模型设置具体参数:群体规模m、粒子的维度n、最 大位置Xmax、最大速度Vmax、惯性权重w、学习因子c1和c2、最大迭代次数Kmax以及优化问题的适应度函数fitness(),然后设置种群的初始信息,包括位置xi和速度vi;(1) First, specific parameters need to be set for the prediction model to be established: group size m, particle dimension n, maximum position X max , maximum velocity V max , inertia weight w, learning factors c 1 and c 2 , maximum number of iterations K max and the fitness function fitness() of the optimization problem, and then set the initial information of the population, including the position x i and the speed v i ;
(2)根据目标函数计算各粒子适应度值,并评价每个粒子的适应度;(2) Calculate the fitness value of each particle according to the objective function, and evaluate the fitness of each particle;
(3)选择当前个体最优位置,对每个粒子当前的适应度值与其历史最佳位置 的适应度值fitness(pbestid)对比,若当前位置适应度值较高,则用当前位置更新历史最佳位置 (3) Select the optimal position of the current individual, and the current fitness value of each particle Compared with the fitness value fitness(pbest id ) of its historical best position, if the fitness value of the current position is higher, the historical best position is updated with the current position
(4)选择当前群体最优位置,对每个粒子当前的适应度值与群体最佳位置的 适应度值fitness(gbestd)对比,若当前位置适应度值较高,则用当前位置更新群体最佳位置判断是否满足终止条件,满足则搜索停止,输出结果;不满足则继续下一步;(4) Select the optimal position of the current group, and the current fitness value of each particle Compared with the fitness value fitness(gbest d ) of the best position of the group, if the fitness value of the current position is higher, the best position of the group is updated with the current position Determine whether the termination condition is satisfied, if it is satisfied, the search will stop and the result will be output; if it is not satisfied, continue to the next step;
(5)判断是否满足迭代结束条件,根据优化问题设置迭代结束条件,如不满足结束条件, 则返回第二步骤重新计算;(5) Judging whether the iteration end condition is met, and setting the iteration end condition according to the optimization problem, if the end condition is not met, return to the second step for recalculation;
(6)若满足输出条件,则输出全局最佳位置gbestd,并停止搜索。(6) If the output condition is satisfied, output the global best position gbest d and stop searching.
上述涉及LSSVM的算法原理和具体步骤为:给定一组训练数据集{(xi,yi),i=1,2,N}, 其中,N是训练样本数量;xi∈Rd是输入矩阵,d是矩阵的维度;yi∈R是输出矩阵。然后通过 一个非线性映射φ(x),将训练数据集从原始空间映射到高维特征空间,LSSVM的决策函数 如下所示:The above algorithm principles and specific steps involving LSSVM are: given a set of training data sets {(xi, yi), i=1, 2, N}, where N is the number of training samples; xi∈Rd is the input matrix, d is the dimension of the matrix; yi ∈ R is the output matrix. Then, through a nonlinear mapping φ(x), the training dataset is mapped from the original space to the high-dimensional feature space. The decision function of LSSVM is as follows:
式中:w是权重向量,常数b是偏置项。LSSVM的优化问题如下:where w is the weight vector, and the constant b is the bias term. The optimization problem of LSSVM is as follows:
式中:γ是正则化参数,ξ是误差变量,相比于SVM算法,其约束条件有所不同,变为如下形式:In the formula: γ is the regularization parameter, ξ is the error variable. Compared with the SVM algorithm, its constraints are different, and it becomes the following form:
将支持向量机的不等式约束改为等式约束,构造拉格朗日函数L进行求解:Change the inequality constraints of the support vector machine to equality constraints, and construct the Lagrangian function L to solve:
式中:αi为拉格朗日乘子。根据Karush-Kuhn-Tucker(KKT)条件,得到如下等式约束条 件:where αi is the Lagrange multiplier. According to the Karush-Kuhn-Tucker (KKT) condition, the following equation constraints are obtained:
接着,由式(3.5)消去w和ξ得到如下线性方程组:Then, by eliminating w and ξ from equation (3.5), the following linear equations are obtained:
式中:I是单位矩阵;α是支持向量;其他如下:In the formula: I is the identity matrix; α is the support vector; others are as follows:
用Ω表示核矩阵内积,核函数技巧如下:Use Ω to represent the inner product of the kernel matrix, and the kernel function technique is as follows:
最终得到LSSVM的决策函数即回归模型如下:Finally, the decision function of LSSVM, that is, the regression model, is obtained as follows:
式中:α和b由式(3.6)求解得。在实际建模过程中,α和b是在MATLAB平台中通过 应用LSSVM工具箱编程运算得到,支持向量α是一个N行1列的矩阵。In the formula: α and b are obtained by solving the formula (3.6). In the actual modeling process, α and b are obtained by applying the LSSVM toolbox programming operation in the MATLAB platform, and the support vector α is a matrix with N rows and 1 column.
用丽华实红进行染色,采用轧-烘-轧-蒸染色工艺流程:浸轧染液(二浸二轧,带液率60%)→预烘120s(120℃热风)→浸轧固色液(二浸二轧,带液率70%,氯化钠180g/L, 碳酸钠25g/L,氢氧化钠6g/L)→汽蒸150s(100~102℃,饱和蒸汽)→冷水洗→热水洗 →皂洗(标准皂片3g/L,浴比为1:50,90℃处理10min)→热水洗→冷水洗→烘干。Dyeing with Lihua Red, using pad-bake-pad-steam dyeing process: pad dyeing solution (two dips and two pads, with liquid rate 60%) → pre-baking 120s (120 ℃ hot air) → padding fixing solution (two dips and two rollings, with liquid rate 70%, sodium chloride 180g/L, sodium carbonate 25g/L, sodium hydroxide 6g/L) → steaming for 150s (100~102℃, saturated steam) → cold water washing → hot Water washing→soap washing (standard soap flakes 3g/L, bath ratio 1:50, 90℃ for 10min)→hot water washing→cold water washing→drying.
单色数据库共设置25个染料质量浓度梯度(0.01,0.05,0.10,0.50,1.00,1.25,1.5, 1.75,2.00,2.50,3.00,3.50,4.00,4.50,5.00,5.50,6.00,7.00,8.00,10.00,12.00,14.00, 17.00,19.00,20.00),浓度单位为g/L。A total of 25 dye mass concentration gradients (0.01, 0.05, 0.10, 0.50, 1.00, 1.25, 1.5, 1.75, 2.00, 2.50, 3.00, 3.50, 4.00, 4.50, 5.00, 5.50, 6.00, 7.00, 8.00, 10.00, 12.00, 14.00, 17.00, 19.00, 20.00), the concentration unit is g/L.
对染制色样使用台式分光测色仪X-Rite Color I5进行测色,记录空白织物和各染料质量浓 度梯度色样的光谱反射率曲线和K/S值曲线,对出现如曲线交叉和吸收峰错位等不规则曲线 进行重新打样修正。将所有符合色样的信息存储起来,建立专用单色数据库,供建立颜色预 测模型和配色模型使用。Use the desktop spectrophotometer X-Rite Color I5 to measure the dyed color samples, record the spectral reflectance curve and K/S value curve of the blank fabric and each dye mass concentration gradient color sample. Irregular curves such as peak dislocation shall be re-proofed and corrected. Store all the information that conforms to the color sample, and establish a dedicated monochrome database for the establishment of color prediction models and color matching models.
使用台式分光测色仪X-Rite Color I5在测量孔径Φ6mm,D65标准光源,10°视角下测 试色样的L*值、a*值和b*值。将一块色样折叠成两层,在每个面选取一个测量点,共四个测 量点,用四个测量点数据的平均值代表此块色样的颜色。Use the desktop spectrophotometer X-Rite Color I5 to measure the L* value, a* value and b* value of the color sample under the measuring aperture Φ6mm, D65 standard light source, and 10° viewing angle. Fold a color swatch into two layers, select a measurement point on each surface, a total of four measurement points, and use the average value of the data of the four measurement points to represent the color of the color swatch.
基于PSO-LSSVM建立颜色预测模型和染料浓度预测模型,建模过程如下:Based on PSO-LSSVM, a color prediction model and a dye concentration prediction model are established. The modeling process is as follows:
(1)对染色效果参数和染色影响因素参数进行判断是否需要归一化处理,形成样本矩阵, 划分训练集和测试集;(1) Judging whether the dyeing effect parameters and dyeing influencing factor parameters need to be normalized, forming a sample matrix, and dividing the training set and the test set;
(2)设定RBF核函数参数组(γ,σ2)的范围,通常γ∈[0.1,1000],σ2∈[0.1,100]。设 置PSO相关参数,利用PSO算法对种群进行初始化;(2) Set the range of the RBF kernel function parameter group (γ, σ 2 ), usually γ∈[0.1, 1000], σ 2 ∈ [0.1, 100]. Set the PSO related parameters, and use the PSO algorithm to initialize the population;
(3)确定适应度函数,以训练集计算粒子适应度值并进行比较,选择个体最优值pbestid和 全局最优gbestd,更新各粒子的位置和速度;(3) Determine the fitness function, calculate and compare the particle fitness value with the training set, select the individual optimal value pbest id and the global optimal gbest d , and update the position and speed of each particle;
(4)迭代寻优至满足结束条件(适应度值最小或最大迭代次数);(4) Iterative optimization to meet the end condition (minimum fitness value or maximum number of iterations);
(5)输出全局最优值gbestd,即最优化参数组赋值给LSSVM,导入训练集, 调用trainlssvm函数对所得参数进行训练,得到训练好的PSO-LSSVM染色效果预测模型;(5) Output the global optimal value gbest d , that is, the optimal parameter group Assign the value to LSSVM, import the training set, call the trainlssvm function to train the obtained parameters, and obtain the trained PSO-LSSVM staining effect prediction model;
(6)调用simlssvm函数对训练好的模型进行仿真,将测试集的输入矩阵代入预测模型, 仿真运算得到测试集的输出矩阵的预测值,采用评价指标与实验值进行比较,若仿真效果达 到预期则进行下一步,反之继续使用PSO算法对参数组进行寻优。(6) Call the simlssvm function to simulate the trained model, substitute the input matrix of the test set into the prediction model, obtain the predicted value of the output matrix of the test set through the simulation operation, and use the evaluation index to compare with the experimental value, if the simulation effect reaches the expectation Then go to the next step, otherwise continue to use the PSO algorithm to optimize the parameter group.
在建立上述颜色预测模型和颜色预测模型过程中,需要做以下几个说明:In the process of establishing the above-mentioned color prediction model and color prediction model, the following instructions need to be made:
(1)输入变量和输出变量(1) Input variable and output variable
对于颜色预测模型,输入变量为染料质量浓度,输出变量为CIELAB均匀色彩空间中的 L*值、a*值和b*值,由于输出变量有三个,因此一种染料有三个不同的PSO-LSSVM模型, 即有三组参数组。For the color prediction model, the input variable is the dye mass concentration and the output variable is the L* value, a* value and b* value in the CIELAB uniform color space, since there are three output variables, there are three different PSO-LSSVMs for one dye model, that is, there are three sets of parameter groups.
三组参数组共用一个训练集和测试集;The three parameter groups share a training set and a test set;
对于颜色预测模型,输入变量为CIELAB均匀色彩空间中的L*值、a*值和b*值,输出变 量为染料质量浓度;For the color prediction model, the input variables are the L* value, a* value and b* value in the CIELAB uniform color space, and the output variable is the dye mass concentration;
(2)参数设置(2) Parameter setting
PSO参数经过多次仿真验证后,模型的具体设置为:粒子数popsize=20,最大迭代次数 maxgen=200,学习因子c1=c2=1.4,惯性权重w∈[0.8,1.2],正则化参数 γ∈[0.1,1000],核函数宽度σ2∈[0.1,100],正则化参数γ迭代速度vγ∈[-500,500], 核函数宽度σ2迭代速度采用径向基核函数(kernel=′RBF_kernel′),并 以均方误差作为适应度函数(fitness()=MSE),设定精度ep=10-3,满足设定精度或最大 迭代次数则输出参数组,建立PSO-LSSVM预测模型。After the PSO parameters have been verified by multiple simulations, the specific settings of the model are: particle number popsize=20, maximum iteration number maxgen=200, learning factor c 1 =c 2 =1.4, inertia weight w∈[0.8, 1.2], regularization parameter γ∈[0.1, 1000], kernel function width σ 2 ∈ [0.1, 100], regularization parameter γ iteration speed v γ ∈ [-500, 500], kernel function width σ 2 iteration speed The radial basis kernel function (kernel='RBF_kernel') is used, and the mean square error is used as the fitness function (fitness()=MSE), and the set precision is ep=10 -3 . If the set precision or the maximum number of iterations is satisfied, the output will be Parameter group, establish PSO-LSSVM prediction model.
(3)样本划分(3) Sample division
一个单色数据库共25个色样,选择其中20组作为训练集,剩余5组作为测试集。颜色 预测模型和配色模型采用相同的训练集和测试集,只是输入矩阵和输出矩阵不同。从中任选 20组数据作为PSO-LSSVM训练数据,剩余5组数据作为PSO-LSSVM测试数据;基于MATLAB R2016b软件平台,结合LSSVM工具箱(1.8版本),调整代码,导入染色实验数据 进行染色模型的建立。将20组数据对PSO-LSSVM训练数据颜色预测模型内含3个子模型, 依次为PSO-LSSVM-L、PSO-LSSVM-a和PSO-LSSVM-b,分别得到三组模型参数组(γ,σ2); 将剩余5组数据对PSO-LSSVM模型进行测试,得到颜色预测模型的4个评价指标MAE、 RMSE、Ep和R2。A single-color database has a total of 25 color samples, of which 20 groups are selected as training sets, and the remaining 5 groups are used as test sets. The color prediction model and the color matching model use the same training set and test set, but the input matrix and output matrix are different. Select 20 sets of data as PSO-LSSVM training data, and the remaining 5 sets of data as PSO-LSSVM test data; based on MATLAB R2016b software platform, combined with LSSVM toolbox (version 1.8), adjust the code, import the dyeing experimental data for dyeing model Establish. The 20 sets of data are paired with the PSO-LSSVM training data color prediction model, which contains 3 sub-models, which are PSO-LSSVM-L, PSO-LSSVM-a and PSO-LSSVM-b, respectively. Three sets of model parameters (γ, σ2 ); The PSO-LSSVM model is tested with the remaining 5 sets of data, and the 4 evaluation indexes MAE, RMSE, E p and R 2 of the color prediction model are obtained.
在染料配色预测模型的构建中,训练集和测试集与颜色预测模型相同,只是输入矩阵和 输出矩阵不同,以染色试样的颜色参数CIELAB的L*值、a*值和b*值作为输入矩阵,染料浓 度作为输出矩阵。选取同样的20组数据作为PSO-LSSVM训练数据,剩余5组数据作为PSO-LSSVM测试数据,建模过程与颜色预测模型相同。In the construction of the dye color matching prediction model, the training set and test set are the same as the color prediction model, but the input matrix and output matrix are different, and the L* value, a* value and b* value of the color parameter CIELAB of the dyed sample are used as input. Matrix with dye concentrations as output matrix. The same 20 sets of data are selected as the PSO-LSSVM training data, and the remaining 5 sets of data are used as the PSO-LSSVM test data. The modeling process is the same as the color prediction model.
颜色预测模型实验效果验证:Validation of the experimental effect of the color prediction model:
为进一步证明颜色预测模型的可靠性,计算色差值ΔEab*,以此来进一步检验染色预测 模型的精确程度。每一组测试集的颜色参数的L*值、a*值和b*值的预测值称为一组预测样本。 表1为颜色预测模型的5组测试样本和预测样本之间的色差值和颜色。In order to further prove the reliability of the color prediction model, the color difference value ΔE ab * was calculated to further test the accuracy of the dyeing prediction model. The predicted values of the L*, a*, and b* values of the color parameters of each set of test sets are called a set of predicted samples. Table 1 shows the color difference values and colors between the five groups of test samples and predicted samples of the color prediction model.
表1丽华实红测试样本和预测样本的颜色参数Table 1 Color parameters of Lihua real red test samples and predicted samples
对于纺织布品而言,当色差0≤ΔEab*≤0.5时,几乎感觉不到色差,当色差 0.5<ΔEab*≤1.5时,色差感觉很小。5组测试数据的色差ΔEab*在[0.33,0.94]范围内,色 差都小于1。由表1可知,色差最大的一组中,造成误差的最大因素为红色度a*,误差仅为 0.85,视觉几乎感受不到实验值和预测值之间的色差。色差结果表明颜色预测模型的预测结果非常理想,与测色仪测得的颜色参数基本相同。For textile fabrics, when the color difference is 0≤ΔE ab *≤0.5, the color difference is hardly felt, and when the color difference is 0.5<ΔE ab *≤1.5, the color difference is very small. The color difference ΔE ab * of the 5 sets of test data is in the range of [0.33, 0.94], and the color difference is all less than 1. It can be seen from Table 1 that in the group with the largest color difference, the biggest factor causing the error is the redness a*, the error is only 0.85, and the color difference between the experimental value and the predicted value can hardly be felt visually. The color difference results show that the prediction results of the color prediction model are very ideal, which are basically the same as the color parameters measured by the colorimeter.
染料配色预测模型实验效果验证:Validation of experimental results of dye color matching prediction model:
同一染料验证:将预测得到的丽华实红质量浓度采用相同染色工艺进行染色,相同的颜 色参数测试方法获得染制色样颜色参数CIELAB的L*值、a*值和b*值,如表2所示。Verification of the same dye: The predicted mass concentration of Lihua Red is dyed with the same dyeing process, and the same color parameter test method is used to obtain the L* value, a* value and b* value of the color parameter CIELAB of the dyed color sample, as shown in Table 2 shown.
表2丽华实红测试样本和预测样本的颜色参数Table 2 Color parameters of Lihua real red test samples and predicted samples
由表2可知,基于染料配色预测模型预测得到的丽华实红质量浓度染制色样的颜色参数 和测试样本的颜色参数均非常接近,5组测试数据的色差ΔEab*在[0.46,1.22]范围内,均小 于1.5,色差感觉很小。It can be seen from Table 2 that the color parameters of the Lihua real red mass concentration dyed color samples predicted based on the dye color matching prediction model are very close to the color parameters of the test samples, and the color difference ΔE ab * of the five sets of test data is in [0.46, 1.22] Within the range, all are less than 1.5, and the color difference feels very small.
不同染料验证:选用色相相近的染料进行试验(此处为雷马素红RGB),染色后得到试验 色样,测得颜色参数,代入染料配色预测模型得到的预测浓度,使用丽华实红在预测浓度下 采用轧烘轧蒸工艺进行染制,测得颜色参数,与原色样进行色差比较,检验模型的专用性, 如表3所示。Verification of different dyes: Use dyes with similar hues for testing (here, Remazol Red RGB), obtain test color samples after dyeing, measure color parameters, and substitute them into the predicted concentration obtained by the dye color matching prediction model. The pad-baking pad-steaming process was used for dyeing, the color parameters were measured, and the color difference was compared with the primary color sample to test the specificity of the model, as shown in Table 3.
表3 PSO-LSSVM7专用性验证Table 3 PSO-LSSVM 7 specificity verification
由表3可知,丽华实红根据染料配色预测模型预测结果,进行染制所得色样的颜色参数 与原色样的颜色参数相差很大,色差ΔEab*均大于6.0,根据NBS(美国国家标准局的缩写) 色差标准可知,色样之间均为大色差,配色结果是不可接受的,更不用说配色色差满足小于 1.5的要求。说明染料配色预测模型有很高的专用性,不适用于其它染料配色,即使是采用相 似色相的同类染料,也会产生很大的误差。It can be seen from Table 3 that according to the prediction results of the dye color matching prediction model, the color parameters of the color samples obtained by dyeing and the color parameters of the primary color samples are very different, and the color difference ΔE ab * is greater than 6.0. The abbreviation of ) The color difference standard shows that there is a large color difference between the color samples, and the color matching result is unacceptable, not to mention that the color matching color difference meets the requirement of less than 1.5. It shows that the dye color matching prediction model has high specificity and is not suitable for other dye color matching. Even if the same type of dyes with similar hues are used, a large error will occur.
由上可知:本发明是基于PSO-LSSVM算法和单个活性染料数据库建立的颜色预测模型 和染料浓度预测模型,模型预测质量高,稳定性好,泛化能力强,构筑的模型和单个活性染 料数据库染料专用性好,在预测未知单色染色织物配方时,染料浓度的预测误差小,配方准 确,是计算机测配色的一种全新、高效、准确的方法。As can be seen from the above: the present invention is a color prediction model and a dye concentration prediction model established based on the PSO-LSSVM algorithm and a single reactive dye database, the model prediction quality is high, the stability is good, and the generalization ability is strong. The constructed model and the single reactive dye database The specificity of dyes is good. When predicting the formula of unknown single-color dyed fabrics, the prediction error of dye concentration is small, and the formula is accurate. It is a new, efficient and accurate method for computer color matching.
尽管本发明的实施方案已公开如上,但其并不仅仅限于说明书和实施方式中所列运用, 它完全可以被适用于各种适合本发明的领域,对于熟悉本领域的人员而言,可容易地实现另 外的修改,因此在不背离权利要求及等同范围所限定的一般概念下,本发明并不限于特定的 细节。Although the embodiment of the present invention has been disclosed as above, it is not limited to the application listed in the description and the embodiment, and it can be applied to various fields suitable for the present invention. For those skilled in the art, it can be easily Therefore, the invention is not limited to the specific details without departing from the general concept defined by the appended claims and the scope of equivalents.
Claims (5)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110844257.5A CN113536687A (en) | 2021-07-26 | 2021-07-26 | Construction method of color and dye concentration prediction model of monochrome cotton fabric based on PSO-LSSVM |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110844257.5A CN113536687A (en) | 2021-07-26 | 2021-07-26 | Construction method of color and dye concentration prediction model of monochrome cotton fabric based on PSO-LSSVM |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113536687A true CN113536687A (en) | 2021-10-22 |
Family
ID=78089069
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110844257.5A Pending CN113536687A (en) | 2021-07-26 | 2021-07-26 | Construction method of color and dye concentration prediction model of monochrome cotton fabric based on PSO-LSSVM |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113536687A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115221736A (en) * | 2022-09-20 | 2022-10-21 | 青岛宏大纺织机械有限责任公司 | A method for constructing a prediction model of yarn splicing strength |
CN116643497A (en) * | 2023-05-29 | 2023-08-25 | 浙江荣鑫纤维股份有限公司 | Dyeing control system and method for cheese |
CN117933771A (en) * | 2023-09-27 | 2024-04-26 | 广东腾珑科技有限公司 | Iterative method for forming, controlling and feeding back textile dyeing formula |
ES2976010A1 (en) * | 2022-11-03 | 2024-07-19 | Taiwan Textile Res Inst | Tissue characteristic prediction method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6100999A (en) * | 1997-01-14 | 2000-08-08 | Fuji Xerox Co., Ltd. | Method for predicting color transfer characteristics |
CN110378393A (en) * | 2019-06-26 | 2019-10-25 | 江苏理工学院 | A kind of mixing printing product acetes chinensis method based on PSO-GSA-SVM |
CN111310348A (en) * | 2020-02-25 | 2020-06-19 | 江西理工大学 | A material constitutive model prediction method based on PSO-LSSVM |
-
2021
- 2021-07-26 CN CN202110844257.5A patent/CN113536687A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6100999A (en) * | 1997-01-14 | 2000-08-08 | Fuji Xerox Co., Ltd. | Method for predicting color transfer characteristics |
CN110378393A (en) * | 2019-06-26 | 2019-10-25 | 江苏理工学院 | A kind of mixing printing product acetes chinensis method based on PSO-GSA-SVM |
CN111310348A (en) * | 2020-02-25 | 2020-06-19 | 江西理工大学 | A material constitutive model prediction method based on PSO-LSSVM |
Non-Patent Citations (2)
Title |
---|
CHENGBING YU,ZIWEI XI , YILIN LU , KAIXIN TAO , ZHONG YI: "LSSVM-based color prediction for cotton fabrics with reactive pad-dry-pad-steam dyeing", 《CHEMOMETRICS AND INTELLIGENT LABORATORY SYSTEMS》 * |
CHENGBING YU等: "K/S value prediction of cotton fabric using PSO-LSSVM", 《TEXTILE RESEARCH JOURNAL》 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115221736A (en) * | 2022-09-20 | 2022-10-21 | 青岛宏大纺织机械有限责任公司 | A method for constructing a prediction model of yarn splicing strength |
CN115221736B (en) * | 2022-09-20 | 2022-12-09 | 青岛宏大纺织机械有限责任公司 | Method for constructing prediction model of yarn splicing strength |
ES2976010A1 (en) * | 2022-11-03 | 2024-07-19 | Taiwan Textile Res Inst | Tissue characteristic prediction method |
CN116643497A (en) * | 2023-05-29 | 2023-08-25 | 浙江荣鑫纤维股份有限公司 | Dyeing control system and method for cheese |
CN116643497B (en) * | 2023-05-29 | 2024-05-10 | 汕头市鼎泰丰实业有限公司 | Dyeing control system and method for cheese |
CN117933771A (en) * | 2023-09-27 | 2024-04-26 | 广东腾珑科技有限公司 | Iterative method for forming, controlling and feeding back textile dyeing formula |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113536687A (en) | Construction method of color and dye concentration prediction model of monochrome cotton fabric based on PSO-LSSVM | |
CN108876039B (en) | A Power Quality Prediction Method for Distribution Networks with Distributed Power Sources Based on Support Vector Machines | |
WO2024174300A1 (en) | Process quality time sequence prediction method based on graph neural network | |
CN115855809B (en) | Automatic textile color fastness rating method based on spectrum reconstruction | |
CN108345965A (en) | A kind of Paint Color Matching method and system based on big data study | |
Fokianos et al. | On comparing several spectral densities | |
CN101833593A (en) | A computerized color-matching method for mixed-color wool fabrics based on full-spectrum color matching | |
Yu et al. | Evaluation of a novel computer dye recipe prediction method based on the PSO-LSSVM models and single reactive dye database | |
CN112001404A (en) | Image generation model and method for self-adaptive global and local double-layer optimization | |
CN108875792A (en) | A kind of coating based on machine learning repairs color method and system | |
CN113469285B (en) | Dye double-spelling formula prediction method based on PSO-LSSVM | |
Chen et al. | An hybrid model CMR-color of automatic color matching prediction for textiles dyeing and printing | |
CN117171641A (en) | Gas concentration prediction method based on improved DBSCAN algorithm and multi-scale LSTM neural network | |
US20250237638A1 (en) | Method and system for determining color match for surface coatings | |
CN107290297B (en) | A kind of infrared spectroscopy quantitative analysis method and system based on self-paced learning | |
JP6889473B2 (en) | Calculation method of blending amount of coloring material | |
CN114878509A (en) | A Standard-Free Transfer Method for Tobacco Near Infrared Quantitative Analysis Model | |
CN111861002A (en) | Building cooling and heating load prediction method based on data-driven Gaussian learning technology | |
CN109946245B (en) | Computer color matching method of dye | |
CN113192034B (en) | Mixed dye solution concentration detection method based on counter-propagation neural network | |
Batbooti et al. | A novel imputation based predictive algorithm for reducing common cause variation from small and mixed datasets with missing values | |
CN117456293A (en) | Fabric dyeing formula prediction method and system based on printing and dyeing big data | |
CN111125629B (en) | Domain-adaptive PLS regression model modeling method | |
CN117994584A (en) | Extreme learning machine image classification method based on OLQR algorithm training | |
CN110515930A (en) | Thermal property database and construction method of critical water, carbon dioxide and hydrogen mixture |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20211022 |
|
RJ01 | Rejection of invention patent application after publication |