# Colour Mixing Modelling and Simulation: Optimization of Colour Recipe for Carded Fibres

Authors: Rocco Furferi; Monica Carfagni
Journal: Modelling and Simulation in Engineering
 (2010)

---

## Abstract

Colour matching between carded and finished fibres is an important
challenge for textile industry. The straightforward approach for
mixing together some differently coloured fibres in order to
obtain a blend of a desired colour is to perform a trial and error
approach starting from a given colour recipe and optimizing it
with several attempts. Unfortunately, dyeing process so as the
carding procedure may result in a carded fibre whose colour is
different from the desired one. As a consequence textile companies
have to modify the original recipe in order to reduce the gap
between the colour of the final product and the desired one. The
present work describes a model able to simulate the colour mixing
of fibres in order to assess the best recipe. The model consists
in two modules: a “prediction module” predicts the colour of a
blend obtained by mixing together several fibres; an “optimization
module” is used to optimize the final recipe. The devised system
has been tested for optimizing the recipe of a set of 200 blends.
The mean error in predicting the blend colour is about 15% with a
variance of 0.165. The time for optimizing the recipe is reduced
by 92%.


---

## Body

## 1. Background

The production of a carded fibre is often performed by mixing together a series of differently coloured fibres according to a formula known as “recipe”. A recipe is a list of percentages of raw materials that have to be mixed together so as to obtain a carded fibre with a desired colour. The raw material is mixed by using a machine called “carder.” By means of this machine, the textile companies produce a carded fibre (also called “blend”) whose colour has to be compared with the one provided by a customer. The main problem is that different dye processes may lead to different reproduction of the colour. Accordingly, the use of a recipe for mixing the raw material does not guarantee that the colour of the blend is strictly “close” to the desired colour. This means that the colorimetric distance between a reference and the blend, measured by means of the CMC distance [1, 2] under different standard illuminants [3], may result too greatly. As widely known, the CMC tolerancing system has been developed by the Colour Measurement Committee of the Society of Dyers and Colourists in Great Britain and may be defined as a modification of CIELAB [4] which provides better agreement between visual assessment and instrumentally measured colour difference.  The colour distance supplied by the CMC tolerancing system, called CMC distance DECMC, is expressed by the following equation: (1)DECMC=(∆LlSL)2+(∆CcSC)2+(∆HSH)2,
where(i)
∆L, ∆C, and ∆H are, respectively, the differences in terms of L*, C*, and H° [5, 6] between the two samples(ii)
lSL, cSC, and SH are the semi-axis of an ellipsoid representing the volume of acceptable colour.In textile field, usually,l=2 and c=1. Formulas for evaluating SL, SC and SH are provided in [7].When the CMC distance exceeds a threshold value, usually set equal to 0.8 [8], the colourists have to change the original formula order to reduce the colorimetric distance between the obtained blend and the desired one. This phase is performed by means of a trial and error technique; in detail, the textile technicians perform a carding of the fibres according to their own recipe in order to obtain a blend. The blend is then measured by means of a spectrophotometer that provides the value of light reflectance in the visible wavelength range (400–700 nm), with a step of 10 nm. The resulting spectrum is obtained using a scattered light measurement in SCE  (Specular Component Excluded) mode. The scan is made with a neutral white background using an 8 deg angle between the light source and the fabric. Usually a zero calibration is used to compensate for the effects of stray light due to the changing flare characteristics of the optical system. The spectrophotometer output usually consists of a 31 elements vector representing the reflectance values versus the wavelength for an examined carded fabric. From the reflectance value, it is straightforward to assess the L*, C*, and H° values according to widely known formulas [7]. Finally, using (1) the CMC colour difference between the obtained blend and the desired one is evaluated. If such colour distance is less than 0.8 the used recipe the colourists consider the adopted recipe as a good one. Otherwise, the colourists have to test different recipes in an empirical way; this requires to perform a new carding and a subsequent colour measurement, within an iterative process (Figure 1). The carding process lasts about 40 minutes; so if the first attempt in producing a blend is unsatisfactory, at least another forty minutes are necessary to get a new blend (with a total time of at least 80 minutes).Figure 1
Trial and error technique. The production of a carded blend is performed in about 40 minutes. Typically 4-5 attempts are necessary to reach the optimal value for the recipe with a total time of about 200 min.At the state-of-the-art, a number of approaches have been described for partially solving this crucial problem. Generally they are based on the Kubelka-Munk theory [9, 10] that is widely used for describing the colour properties of a fabric. These approaches have been adopted for predicting the spectral reflectance for a mixture of components (colorants) that have been characterized by absorption K and scattering S coefficients. Several studies, related to the tristimulus-matching algorithm based on the Stearns-Noechel model [11] (and its implementations [12–14]), allow a consistent prediction of the formula for matching a given colour standard by blending predyed fibres with CMC colour differences less than 0.8. A colour-matching system based on Friele’s theory has been developed in [15]. Artificial Neural Networks (ANNs) have been also used for mapping between colorant concentrations and spectral reflectance [16, 17].The main aim of the present work is to describe a model for the automatic optimization of a recipe used for obtaining a desired (provided by a customer) blend. The model, given the spectral reflectances of the desired blend and a first attempt recipe, allows the automatic detection of the best possible recipe in order to minimize the colour distance between the obtained blend and the desired one.The assessment of a suitable recipe for obtaining a desired blend is, on the basis of the research provided by the literature, promising for a limited number of fibres while in most cases a particular colour may be obtained mixing together more than 10 differently coloured fibres. As a consequence, the (excellent) results obtained by the theoretical approaches proposed in literature may result not suitable in the industrial practice. In order to overcome these limitations so as to find the optimal recipe of a blend composed by any number of fibres, important information is used in the present work: the first attempt recipe. Since the companies that produce blends starting from differently coloured fibres always uses a first attempt recipe based on their own expertise, this important information can be used prior to the determination of the best possible one. In detail such a recipe, as described in the next section, is used for determining a transfer function between the spectral responses of the fibres composing the blend and the spectrophotometric response of the blend obtained by mixing such fibres. The knowledge of this transfer function allows the prediction of the spectral responses of any blend obtained by mixing the fibres with any recipe. On the basis of the prediction of the spectrophotometric response of the blend, it is possible to optimize the recipe in order to minimize the CMC colour distance between the desired blend and the one obtained using such an optimal recipe. Therefore, the devised model consists of two main modules as depicted in Figure2. The first module, called “prediction module,” is composed by an ANN-based software able to predict the spectrophotometric response of any blend obtained by mixing any number of fibres, once known a first attempt recipe. The second module, called “optimization module”, consists of a software tool able to identify the best recipe in order to minimize the CMC colour distance between the reference and the predicted blend.Figure 2
New process for optimizing the recipe. The devised model is composed by two modules: prediction and optimization.The model receives the following data, as input:(i)
the spectrophotometric response of all the fibres composing a particular blend,(ii)
the spectrophotometric response of the desired blend (the so called “reference”),(iii)
a first attempt recipe.The output of the model is the best possible recipe for obtaining a blend whose CMC colour distance is minimized.The use of the model allows a drastic change in the process as described in Figure2. The textile technicians have to process the fibres with the carder only once so as to obtain a first blend. This operation lasts about 40 minutes. The spectrophotometric response of the blend and of the raw materials composing it is then automatically processed by the devised software that provides the best possible recipe. The main advantage that the present approach encloses is that the whole process is performed by means of a software tool that carries out a reliable result in less than 30 s. As a consequence the recipe optimization is performed in just over 40 minutes with a huge saving of time. In other words, the proposed method allows a strong reduction of the time to produce a carded fibre of a desired colour and promises a reliable recipe optimization.The development of the automatic optimization model is based on the following tasks:(i)
development of the prediction module, able to predict the spectral response of a blend on the basis of the reflectance factors of the fibres composing it and of the first attempt recipe(ii)
development of the optimization module, able to find the best possible recipe for obtaining a blend whose colour, expressed into the CMC tolerancing system, is the closest possible to the desired one.


## 2. Development of the Prediction Module

Letpi(λ) be the spectral reflectance factors of the ith of the n components composing a carded fibre:  i=1,2,…,n. Let, then,αi be the percentage of each component (wool, cotton, linen, or other fibres) composing the carded fibre. As widely known in literature a weighted average spectrum R(λ,αi) can be defined as follows [2]:
(2)R(λ,αi)=∑i=1nαipi(λ).
In (2), λ indicates the wavelength, varying in the range (400–700 nm). The size of vectors pi(λ) and R(λ,αi) is 1 × 31.The vectorRecipe=[α1,α2,…,αn] is called “recipe.”Now, letRs(λ) be the spectral reflectance factors of the carded fibre obtained by mixing the components pi(λ) according to a given recipe.The general relationship betweenR(λ,αi) and Rs(λ) is, in general, a nonlinear function ℱ  such as:
(3)Rs(λ)=F(R(λ,αi)).
Accordingly, once the transfer function ℱ known, it is possible to evaluate the spectral reflectance factors of a carded cloth Rs(λ) given the parameters αi and the vectors pi(λ).The “prediction module” aims to determine for any recipe the spectrophotometric response of a blend. In other words, such a module has to determine the transfer functionℱ for any recipe.The main problem is that the functionℱ may be assessed only by means of an extensive experimental campaign (Figure 3).Figure 3
How it is possible to state the real spectrum of a blend when the input consists in a weighted average spectrum? The response is in the transfer functionℱ. The evaluation of this function is the main objective of the “prediction module”.In several works, the Stearns and Noechel approach [7] was used for determining the value of the transfer function ℱ according to the following formula:(4)F(λ)=(1-λ)[M(λ-0.01)+0.01].
As mentioned in the background section, it is important to emphasize that the proposed method is considerably different from the Stearns and Noechel approach, that is one of the most interesting and valid methods applied for predicting a transformed reflectance spectrum. The Stearns-Noechel-based approach estimates the spectrophotometric response of a blend obtained by mixing differently coloured once known an empiric constant M. More in detail Stearns and Noechel proposed an empirical additive formula for function ℱ:
(5)F(λ)=(1-λ)[M(λ-0.01)+0.01],
where M is an empirical constant found to be 0.15 for fine wool blends. Some authors proposed some different values for constant M depending upon the materials composing the blend [10]. This constant has been determined by means of several experimental tests. However this equation gives reliable results only for blends composed by maximum 5-6 differently coloured fibres. The approach described in the present work allows the estimation of the transformed spectra without the use of an empiric constant M. More in detail the functionℱ(λ) is determined by using an ANN. The approach is suitable for blends composed by more than 15 components. Obviously the devised model has also a limitation with respect to the literature approaches. While the Stearns-Noechel based theory is a general assessment for predicting the obtainable spectrophotometric response of a blend (basing upon the knowledge of constant M) the proposed approach is a local assessment for predicting the spectrum of a blend obtained by any small variation of a recipe once a first attempt recipe is known.Instead of calculating the functionℱ(λ), the functional link between input and output is obtained by means of an ANN software. First, a database capable of representing several dyes used for creating a blend has been created. More in detail 300 differently coloured blends have been collected. These data are available thanks to an extensive experimental campaign conducted in 2009 by the colourists working in the company New Mill S.p.A. of Prato, Italy. Each blend is composed by a certain number of raw materials each one characterized by a different spectrophotometric response pi(λ). The chosen blends are selected from the company catalogue. Each blend colour is, often, characterized by a spectrophotometric response Rs(λ). For the jth (j=1,…,300) blend, it is possible to evaluate the weighted average spectrum Rj(λ,αi) according to (2).  Then, these collected weighted average spectra are used as training set for an ANN. In detail the training data are represented by a matrix M  which elements are the 300 vectors Rj(λ,αi).Therefore, the matrixM is made of 600 columns (number of tests performed) and 31 rows (values of reflectance in the range 400–700 nm with a step of 10 nm)(6)M=[R1(λ,αi),R2(λ,αi),…,R300(λ,αi)].
The target data consists in a Matrix T composed by the spectrophotometric response of the carded fibres Rs(λ) obtained by mixing the raw materials according to the original recipe. 						(7)T=[Rs1(λ,αi),Rs2(λ,αi),…,Rs300(λ,αi)].
The ANN has been devised by using the Matlab Neural Network Toolbox and is characterized by the following parameters (Figure 4):(i)
three layers: input, hidden, and output layer,(ii)
hidden layer made of logistic neurons followed by an output layer of linear neurons,(iii)
thirty-one input, h hidden, and 31 output units. The number of input units depends upon the number of components composing the recipe. The number of hidden units was varied from 15 to 30 with a step of 3 units, monitoring the performance of response using the training data. Depending upon the number of raw materials composing the fibres the number of hidden unit that allows the optimal response varies in the range 18–21.Figure 4
ANN structure and training. Gradient Descent Back propagation with adaptive learning rate has been used for training the ANN. The performance function (MSE) the regression, and the number of iterations are depicted.The ANN is trained using a back-propagation algorithm with momentum [18]. The algorithm requires two parameters: the learning rate and momentum term. The momentum term was fixed at 0.74, and the learning rate was fixed at 0.1. The network was trained 5 times starting each time with a randomly chosen set of weights. As widely known, during the training, the weights and the biases of the network are iteratively adjusted to minimise the network error function. The network error used in this work is the mean square error (MSE) correspondent to the training set elements. This error is monitored during the training process and will normally decrease during the training. However, when the network becomes excessively specialised in reproducing the training data, the early stopping error will typically begin to rise. When the early stopping error increases for a specified number of iterations, the training is stopped, and the weights and biases at the minimum early stopping error are returned.Once trained the ANN accepts any vectorR(λ,αi)as input and computes instantly the correspondent Neural Network output vector Rout. This means that the ANN is able to perform a nonlinear spectral transformation with the aim of predicting the spectrophotometric response of a carded fibre obtained by mixing a series of raw materials. The ANN has been tested with more than 600 test, performed into New Mill Lab. In Table 1, the results of 40 tests are listed. For the entire set of 600 tests the main value of CMC colour distance between the predicted spectral factors and the real one is 0.53 with a variance of 0.06. In order to understand the provided approach, an example is provided below. Suppose you have to predict the spectrophotometer response of a blend obtained by mixing together 10 fibres (according to a recipe) whose spectrophotometric response is the one showed in Figure 5(a).Table 1
Some of the results of the prediction performed by means of the devised ANN. The mean value for CMC colour difference is equal to 0.49 with a variance equal to 0.04.
TestCMC Difference between predicted spectral factors and real onesTestCMC Difference between predicted spectral factors and real ones10.23210.4120.28220.6830.67230.5440.48240.8250.34250.9160.22260.2270.58270.8280.24280.5090.52290.36100.67300.43110.60310.59120.28320.76130.21330.48140.78340.43150.34350.25160.32360.33170.70370.65180.69380.19190.50390.52200.65400.41Mean0.49Variance0.04(a) Spectrophotometric response of the 10 fibres composing the blend used for explaining the developed approach. The weighted average spectrum is also provided. (b) comparison between the two vectorsRout and Rreal.
(a)(b)The ANN receives, in input, the 31 values of the spectrophotometric response and gives, in output, a predicted spectrophotometric responseRout. This response is a prediction Rreal of the real colour (in terms of spectrophotometric response) of a blend. The prediction may be considered reliable if the CMC colour distance between Rout and Rreal is less than 0.8. In Figure 5b, the comparison between the two vectors Rout and Rreal is provided. In the example, the CMC distance is equal to 0.32.


## 3. Development of the Optimization Module

As described above, the ANN based module (prediction) is able to forecast, in a reliable way, the spectrophotometric response of a blend obtained by modifying a recipe, given the reflectance factors of its components and a first attempt blend. This predicted spectral response, performed by means of an ANN instantly (200 ms), may be compared (using CMC colour distance) with the spectrophotometric response of the customer provided one. Accordingly, the colourist may perform a trial and error search of the best recipe that allows the minimum value of CMC distance.The main idea of the optimization module is to find the values of the recipe that, on the basis of the output provided by the optimization module, allows reaching the minimum value for the CMC distance between the spectral factors predicted by the ANN and the reference ones. The optimization process is structured as follows.Given:(i)
the spectrophotometric responsespi(λ) of the fibres composing a blend,(ii)
the spectrophotometric responseRreference of the reference blend,(iii)
the original recipe vectorRecipe=[α1,α2,…,αn].Find the value ofαi that minimize the objective function given by the Euclidean difference between Rout and Rreference where Rout is the prediction obtained with prediction module(8)min⁡⁡(‖Rout-Rreference‖).
Subject to the following constraints (optimization problem bounds):(9)max⁡⁡(Δαi)=±10%,∑i=1nαi=1.
This optimization problem can be solved using one of the optimization algorithm [19] developed into the Optimization Toolbox implemented into Matlab environment. In this work, a genetic algorithm (GA) has been used for minimizing the objective function. The GA [20] is composed by a randomly generated population of 50 double vectors with a Proportional Fitness scaling function and using a “Roulette” selection. The number of generations chosen as stopping criteria has been set equal to 500. The result of the GA optimization is obvious to fine the parameters αi that minimize the objective function, that is, to find the best recipe for matching the reference spectral response with the predicted one.


## 4. Graphical User Interface

In order to help the colourists in finding the optimal recipe a Graphical User Interface (GUI) has been developed into Matlab environment.  The GUI, showed in Figure6, allows the user to set the original recipe and to evaluate with a single button press to obtain a prediction of the blend colour or the optimal recipe. In the example provided in Figure 6, the optimal recipe allows to reduce the CMC distance from the value 0.282 to the value 0.197. Moreover, the algorithm has been implemented for several standard illuminants such as D65, A, TL84, and F2. The C-L, L-H, and C-H ellipses are also plotted in the GUI.Figure 6
developed GUI.


## 5. Results and Conclusions

In the present work, a model for optimizing the recipe, used for creating a coloured blend is proposed. It consists in the combination of two modules; the first is able to simulate the colour mixing so as to give a reliable prediction of the spectral factors of the blend, and the second is able to optimize the recipe in order to minimize the CMC distance between a reference and the new blend. The system is currently running into the New Mill Lab and allows the technicians to state the best recipe in about 40 minutes. In order to state the performance of the system, an efficiency parameterτ has been defined. This parameter is given by the following relationship:
(10)τ=φ⋅(1-ϑ),ifDE(automatic)<0.8,τ=0,ifDE(automatic)≥0.8,
where(i)
ϑ=(DE(automatic)-DE(trial))/DE(automatic),(ii)
DE(automatic) is the CMC distance between the reference spectral factors Rreference and the spectral response of the blend realized with the optimized recipe Rreal,(iii)
DE(trial) is the CMC distance between the reference spectral factors Rreference and the spectral response of the blend realized with the trial and error technique Rtrial,(iiii)
φ is the ratio between the time (in minutes) spent to find the optimal recipe with the trial and error method and the time spent to find the optimal recipe by means of the automatic optimizing model.The efficiency parameter tends to 0 if the difference between the colour prediction allowed by the proposed method and the “classical” assessment is high. The parameter may assume values greater than one when the automatic prediction is better (or similar) to the one obtained in the classical method but the time spent for finding the optimal recipe is lower. The greater is the efficiency parameterτ, the better is the optimization of the recipe. Time is considered by the technicians an important challenge for producing the blends; accordingly the efficiency parameter encloses the term φ in its formulation. The validation of the devised model has been carried out by simulating a set of 90 blends. In Table 2 some of the results of the software performance are listed. The mean error in prediction the colour distance,that is, the mean value of ϑ is equal to 0.14 (that corresponds to a percentage of 14%) with a variance of 0.16. The time for optimizing the recipe is reduced, averagely, by 90%.  The mean value of the efficiency parameter τ is about 1.67.Table 2
Software performance for some cases.
DE (automatic)DE (trial)Time (automatic) (min)Time (trial) (min)ϑ (%)Reduction of process time (%)Efficiencyτ0.460.38429617%128.6%1.890.570.614487−7%97.7%2.120.760.654111014%168.3%2.290.620.644448−3%9.1%1.130.770.424212145%188.1%1.570.340.25414226%2.4%0.750.630.674390−6%109.3%2.230.620.5742858%102.4%1.860.490.39446020%36.4%1.090.830.54418035%95.1%00.560.584698−4%113.0%2.210.630.644444−2%0.0%1.020.290.2740847%110.0%1.960.780.694211212%166.7%2.360.620.59401175%192.5%2.780.470.484240−2%−4.8%0.970.610.634386−3%100.0%2.070.520.49411106%168.3%2.530.790.814280−3%90.5%1.950.210.2142400%−4.8%0.950.310.18444242%−4.5%0.550.450.42411007%143.9%2.280.340.29428015%90.5%1.620.460.38458517%88.9%1.560.570.614298−7%133.3%2.50.760.654311514%167.4%2.290.620.6441118−3%187.8%2.970.770.42394845%23.1%0.670.340.25384026%5.3%0.770.630.674142−6%2.4%1.09Mean value14%90.2%1.67Standard Dev.0.160.670.74The mean value ofϑ for all the 200 blends is equal to 14.6 with a variance of 0.165. The time for optimizing the recipe is reduced, averagely, by 92%, and the mean value of the efficiency parameter τ is about 1.64. This validation demonstrates that the proposed approach is suitable for a reliable, fast, and practical recipe optimization for carded fibres. For these reasons, the developed system is actually running into the laboratory of an important textile company located in Prato (Italy).



---

*Source: 487678-2010-12-22.xml*