Monday, 18 May 2026

Process Control in Mixing- Part 2



Understanding Cotton Mix Variability: Between-Mix, Within-Mix and the Probability Logic Behind Bale Laydown Size

Cotton mixing is not only about achieving the right average fibre value. A mill may prepare a laydown whose average micronaire appears correct, yet the yarn may still behave inconsistently if the bales inside the laydown are too variable. Similarly, one laydown may be acceptable, but the next laydown may be different enough to create yarn and fabric quality variation.

This is why scientific cotton mixing has to control both the average and the variation. The real objective is not merely to prepare a mix with the right mean value. The real objective is to prepare repeated laydowns that are consistent with one another and also reasonably balanced internally.

1. The Central Idea of Cotton Mix Variability

When a spinning mill prepares cotton laydowns repeatedly, the mixes are never perfectly identical. One laydown may have slightly higher micronaire, another may have slightly lower micronaire. One may have more variation among bales, while another may be more uniform.

The total variability in a cotton mix may be understood as the sum of two major components:

\[ \text{Total Mix Variability} = \text{Between-Mix Variability} + \text{Within-Mix Variability} \]

In simple language, between-mix variability tells us whether one laydown differs from another laydown. Within-mix variability tells us whether the bales inside the same laydown differ from one another.

Type of Variability Meaning Practical Question
Between-mix variability Difference between one laydown and another laydown Are successive laydowns similar to each other?
Within-mix variability Difference among bales inside the same laydown Are the bales inside one laydown reasonably balanced?

Cotton mix variability map showing between mix and within mix variation
Visual 1: Cotton mix variability map showing total variability as a combination of between-mix and within-mix variability.

2. What Is Between-Mix Variability?

Between-mix variability refers to the difference between one laydown and another laydown. Suppose a mill prepares several laydowns, and their average micronaire values are very close to one another. In that case, the between-mix variability is low.

For example, if five laydowns have average micronaire values of:

\[ 3.95,\ 3.97,\ 3.94,\ 3.96,\ 3.95 \]

the laydowns are quite consistent. But if five laydowns have average micronaire values of:

\[ 3.70,\ 4.15,\ 3.82,\ 4.25,\ 3.60 \]

then between-mix variability is high. This means yarn produced from one laydown may behave differently from yarn produced from another laydown.

3. What Is Within-Mix Variability?

Within-mix variability refers to the difference among bales inside the same laydown. Suppose a laydown has 20 bales. If the micronaire values of those bales are close to one another, the laydown is internally uniform.

For example, a low-variability laydown may have micronaire values such as:

\[ 3.90,\ 3.95,\ 4.00,\ 4.05,\ 3.98 \]

A high-variability laydown may include both low and high values, such as:

\[ 3.20,\ 3.40,\ 4.60,\ 4.80,\ 4.10 \]

Within-mix variability itself may be divided into two parts:

\[ \text{Within-Mix Variability} = \text{Between-Bale Variability} + \text{Within-Bale Variability} \]

Source of Variation Meaning
Between-bale variability One bale differs from another bale in the same laydown.
Within-bale variability Different samples taken from the same bale differ from one another.

In practical mill work, the major focus is usually on between-bale variability because bale test reports commonly provide average bale values. Detailed within-bale variability is not always available for routine selection decisions.

4. Why Mix Variability Matters in Fabric Quality

High between-mix variability can create visible fabric problems. One important example is fabric barré, where periodic stripes or bands appear in woven or knitted fabric. In knitted fabric, such variation may appear along the course direction. In woven fabric, it may appear in the weft direction.

If one cotton mix produces yarn with slightly different fibre behaviour from the next cotton mix, the fabric may show visible variation even when the nominal yarn count is the same. This is why controlling cotton mix variability is not only a spinning concern but also a fabric quality concern.

However, fibre mix variation is not the only possible cause of barré. Fabric barré can also arise from yarn twist variation, yarn tension differences, uneven stitch length, machine setting issues, raw material differences, weaving faults, knitting faults, or improper process control. Cotton mixing can reduce one important risk, but it cannot compensate for every process problem.

5. Factors Affecting Cotton Mix Variability

Several factors influence cotton mix variability. These factors interact with each other, and the mill has to balance statistical control with practical warehouse operations.

Factor How It Affects Variability
Type of bale picking Random picking and category picking control variation differently.
Bale arrangement Even a good selection plan fails if selected bales cannot be retrieved easily.
Population variability A highly variable bale population produces more variable laydowns.
Category breakpoint location Breakpoints decide how bales are divided into low, medium and high groups.
Number of categories More categories reduce category variance but increase warehouse complexity.
Number of bales in the mix More bales per laydown usually reduce between-laydown variation.

6. Effect of Bale Picking Method

Two common bale picking approaches are random picking and category picking. In random picking, every bale has an equal chance of being selected. This method is simple, but it may not reproduce the population profile accurately when the population is highly variable or when the laydown size is small.

In category picking, the bale population is divided into categories. Bales are then selected from each category in a planned manner. Category picking generally provides better control because it ensures that different ranges of fibre values are represented in each laydown.

Picking Method Advantage Risk or Limitation
Random picking Simple and easy to understand May create unstable laydown averages if population variation is high
Category picking Better representation of different fibre-value ranges Needs proper categorization and warehouse arrangement

7. Effect of Bale Picking Order

Even when the same categories are used, the order in which bales are picked can influence the pattern of variability over time. This is a subtle but important point in cotton mixing.

Case A: Picking from Extreme Categories First

In this method, the mill begins by selecting from extreme low and extreme high categories. The average may still remain close to the population mean because low and high values balance each other, but within-laydown variability may be high in the beginning.

As picking gradually moves towards the middle categories, within-laydown variability may decrease. This method may be suitable only when the mill is deliberately willing to manage higher variability at the beginning.

Case B: Picking from Centre Categories First

In this method, the mill starts with bales near the centre of the distribution. At the beginning, the laydowns may look very uniform because most selected bales are close to the average.

However, as the central bales are consumed, the mill may later be forced to use more extreme bales. This means within-laydown variability may start low but increase over time.

Case C: Picking from All Categories Together

When the mill wants stable quality over a long period, it is generally better to pick from all categories in each laydown. This avoids consuming only the centre first or only the extremes first.

This approach helps maintain both average values and variability levels more consistently across successive laydowns.

Three cotton bale picking order strategies showing extreme first centre first and all categories together
Visual 2: Three bale picking order strategies: extreme categories first, centre categories first, and all categories together.

8. Effect of Warehouse Bale Arrangement

A bale selection plan must be practical. A mathematically good plan is of little use if the selected bales cannot be physically retrieved from the warehouse. This is where bale arrangement becomes important.

For random picking, bales should be arranged so that any selected bale can be accessed without major disruption. If the required bale is at the bottom of a high stack, retrieval becomes difficult, time-consuming, and operationally inefficient.

For category picking, bales must be arranged into separate category cells. This improves control but increases warehouse complexity. If too many fibre properties and too many category levels are used, the number of storage cells can become very large.

For example, if a mill uses two fibre properties, micronaire and fibre length, and divides each into three categories, the number of category combinations is:

\[ 3^2 = 9 \]

If the mill uses three fibre properties, such as micronaire, fibre length and fibre strength, with three categories each, the number of combinations becomes:

\[ 3^3 = 27 \]

Therefore, a good system should use enough categories for quality control but not so many that warehouse handling becomes impractical.

9. Population Variability: The Biggest Driver

The original variability of the bale population is one of the most important drivers of mix variability. If the warehouse population itself is highly variable, no picking method can completely eliminate the problem.

Consider two cotton populations with the same average micronaire:

Population Mean Micronaire Standard Deviation Interpretation
Population A 4.0 0.10 Narrow and uniform population
Population B 4.0 0.80 Wide and highly variable population

Both populations have the same mean value, but they are not equally good for consistent mixing. Population A will naturally produce more stable laydowns than Population B. Population B requires much stronger control through categorization, bale picking rules, and larger laydown size.

The practical lesson is simple: the best way to reduce mix variability is to begin with a less variable cotton population. Picking methods can improve consistency, but they cannot fully overcome a badly scattered population.

10. Category Breakpoints and Their Effect

When cotton bales are divided into categories, the mill must decide where one category ends and the next begins. These division points are called category breakpoints.

For example, if micronaire is divided into three categories, the mill may define low, medium and high micronaire. But the important question is: where should the cut-off between low and medium be placed, and where should the cut-off between medium and high be placed?

Two common ways to think about breakpoints are:

\[ \pm 1\sigma \]

and

\[ \pm 0.41\sigma \]

If breakpoints are placed at \(\pm 1\sigma\), a large share of bales fall into the middle category. In a normal distribution, roughly 68% of values lie within one standard deviation of the mean.

If breakpoints are placed closer to the centre, such as around \(\pm 0.41\sigma\), the three categories become more evenly populated. This can improve representation across categories, especially when the population is highly variable.

Breakpoint Choice Likely Effect
\(\pm 1\sigma\) Most bales fall in the middle category; extreme bales are more separated.
\(\pm 0.41\sigma\) Bales are more evenly distributed across low, medium and high categories.

11. Effect of Number of Categories

In general, increasing the number of categories reduces within-category variation. If cotton is divided into only three categories, each category is relatively broad. If it is divided into five or ten categories, each category becomes narrower and more uniform.

However, more categories also mean more operational complexity. The warehouse needs more cells, bale tracking becomes more demanding, and retrieval becomes more difficult.

Number of Categories Quality Control Impact Operational Impact
Few categories Less precise control Easier warehouse handling
More categories Better control of category variance More complex storage and retrieval

Therefore, the mill must balance statistical benefit with practical feasibility. The goal is not to create the maximum possible categories, but to create enough meaningful categories to control the most important fibre properties.

12. Effect of Number of Bales per Laydown

The number of bales in a laydown also affects variability. In general, the larger the number of bales per laydown, the smaller the variation in the laydown average.

This is intuitive. If a laydown contains only a few bales, one extreme bale can strongly influence the average. If a laydown contains many bales, the effect of individual extreme bales gets averaged out.

This is why a small laydown may fluctuate more from the population average, while a larger laydown is more stable. The statistical idea behind this is connected to the standard error of the mean:

\[ S_{\bar{X}} = \frac{\sigma}{\sqrt{n}} \]

where \(S_{\bar{X}}\) is the standard deviation of the laydown average, \(\sigma\) is the population standard deviation, and \(n\) is the number of bales in the laydown.

13. Understanding the Probability Condition

To decide the minimum number of bales per laydown, the mill can use a probability condition:

\[ P(|\mu - \bar{X}| > d) \leq \alpha \]

This may look complicated, but the idea is very simple. The mill wants the probability of the laydown average moving too far away from the population average to remain small.

Symbol Meaning
\(\mu\) Population mean, or warehouse average
\(\bar{X}\) Average of the selected laydown
\(d\) Maximum acceptable difference between population average and laydown average
\(\alpha\) Acceptable risk level

In plain English, the condition says that the probability of the laydown average differing from the population average by more than the acceptable limit should be less than or equal to the allowed risk.

14. A Simple Micronaire Example

Suppose a mill has a large warehouse of cotton bales. The average micronaire of the whole bale population is:

\[ \mu = 4.0 \]

The population standard deviation is:

\[ \sigma = 0.8 \]

The mill says that it wants the average micronaire of each laydown to remain within 0.20 of the warehouse average. Therefore:

\[ d = 0.20 \]

The acceptable range for the laydown average becomes:

\[ 4.0 - 0.20 \quad \text{to} \quad 4.0 + 0.20 \]

\[ 3.80 \quad \text{to} \quad 4.20 \]

So the mill is saying that it is comfortable if the laydown average micronaire remains between 3.80 and 4.20.

Now suppose the mill wants this to happen with 95% confidence. That means it accepts only 5% risk of the laydown average falling outside the acceptable range:

\[ \alpha = 0.05 \]

The condition becomes:

\[ P(|4.0 - \bar{X}| > 0.20) \leq 0.05 \]

In simple words, the probability that the laydown average is below 3.80 or above 4.20 should be 5% or less.

Probability condition for cotton laydown average showing acceptable micronaire range
Visual 3: Probability condition showing the acceptable laydown average range around the population mean.

15. Calculating Minimum Number of Bales

For random picking from a large population, the standard deviation of the laydown average may be approximated as:

\[ S_{\bar{X}} = \frac{\sigma}{\sqrt{n}} \]

For 95% confidence, we commonly use:

\[ z = 1.96 \]

The condition becomes:

\[ z \times S_{\bar{X}} \leq d \]

Substituting the values:

\[ 1.96 \times \frac{0.8}{\sqrt{n}} \leq 0.20 \]

\[ \frac{1.568}{\sqrt{n}} \leq 0.20 \]

\[ \sqrt{n} \geq \frac{1.568}{0.20} \]

\[ \sqrt{n} \geq 7.84 \]

\[ n \geq 7.84^2 \]

\[ n \geq 61.47 \]

Therefore, the mill should use at least:

\[ n = 62 \text{ bales} \]

This means that if the mill uses about 62 bales per laydown, the laydown average micronaire will usually remain within:

\[ 4.0 \pm 0.20 \]

or between:

\[ 3.80 \text{ and } 4.20 \]

with approximately 95% confidence.

16. Comparing Different Laydown Sizes

The following table shows how the number of bales affects the stability of the laydown average. Here, the population standard deviation is assumed to be 0.8 and the population mean is assumed to be 4.0.

Number of Bales \(n\) Standard Error \(\frac{0.8}{\sqrt{n}}\) Approximate 95% Range Around 4.0
10 0.253 \(4.0 \pm 0.496\), or 3.504 to 4.496
20 0.179 \(4.0 \pm 0.351\), or 3.649 to 4.351
40 0.126 \(4.0 \pm 0.248\), or 3.752 to 4.248
62 0.102 \(4.0 \pm 0.200\), or 3.800 to 4.200
100 0.080 \(4.0 \pm 0.157\), or 3.843 to 4.157

As the number of bales increases, the laydown average becomes more stable. Fewer bales create a higher risk that the laydown average will move away from the population average.

17. Composite Sample Size for Multiple Fibre Properties

In real cotton mixing, the mill does not control only micronaire. It may also want to control fibre length, fibre strength, short fibre content, trash, neps and other parameters.

When multiple fibre properties are involved, the mill can standardize the acceptable difference for each property by dividing the desired maximum difference by the population standard deviation.

\[ \text{Standardized Difference} = \frac{\text{Desired Maximum Difference}}{\text{Population Standard Deviation}} \]

Suppose the mill is controlling micronaire, fibre length and fibre strength:

Fibre Property Population Standard Deviation Desired Maximum Difference Standardized Difference
Micronaire 0.8 0.1 \(\frac{0.1}{0.8} = 0.125\)
Fibre length 0.08 0.02 \(\frac{0.02}{0.08} = 0.25\)
Fibre strength 2.0 0.5 \(\frac{0.5}{2.0} = 0.25\)

The smallest standardized difference is 0.125, which belongs to micronaire. This means micronaire is the most demanding property in this example. Therefore, the minimum laydown size should be decided using this most restrictive requirement.

In practical terms, when several fibre properties must be controlled together, the mill should not calculate the required number of bales only from the easiest property. It should use the property that demands the highest precision relative to its own variability.

18. Practical Takeaway for Spinning Mills

The practical lesson is that cotton mixing is not simply a purchase decision. It is a statistical and operational decision. The mill must manage averages, variation, warehouse arrangement, picking method and production feasibility together.

A good cotton mixing system should aim for the right mean, low within-mix variation and low between-mix variation. It should also ensure that the planned bales can actually be retrieved and used without creating operational delays.

The core equation can be remembered as:

\[ \text{Good Cotton Mixing} = \text{Right Mean} + \text{Controlled Variation} + \text{Practical Execution} \]

20. Conclusion

Cotton mix variability must be understood at two levels. The first is between-mix variability, which asks whether one laydown is similar to the next. The second is within-mix variability, which asks whether the bales inside a laydown are reasonably balanced.

A mill can reduce variation by choosing the right bale picking method, arranging bales properly in the warehouse, controlling population variability, setting suitable category breakpoints, using a sensible number of categories and selecting enough bales per laydown.

The probability condition helps convert this idea into a practical rule. It asks the mill to select enough bales so that the laydown average is unlikely to move beyond the acceptable difference from the population average.

In the end, good cotton mixing is not only about achieving the correct average. It is about achieving repeatable consistency. That consistency is what protects yarn quality, fabric appearance, process performance and total manufacturing cost.

21. General Disclaimer

This article is intended for educational and explanatory purposes. The numerical examples used here are hypothetical and simplified to explain cotton mix variability, laydown consistency, category picking and probability-based bale selection. In actual spinning mills, cotton selection should be based on reliable fibre testing data, mill-specific process conditions, machinery constraints, yarn quality requirements, inventory policy, cost considerations and expert technical judgment.

Buy my books at Amazon.com

Sunday, 17 May 2026

Part 2: Building a Python Model for Cotton Yarn Quality Optimisation Using SVR, Genetic Algorithm and Desirability Function



Part 2: Building a Python Model for Cotton Yarn Quality Optimisation Using SVR, Genetic Algorithm and Desirability Function

In the previous article, we discussed how cotton yarn quality can be optimised through the careful selection of raw material parameters. The main idea was simple but powerful: yarn quality does not depend on one fibre property alone. It depends on a combination of fibre strength, elongation, length, uniformity, fineness and short fibre content.

In this second part, we will convert that idea into a simple Python demonstration. The purpose is not to reproduce the exact experimental model of the research paper, but to understand how such a model can be built. We will assume suitable spinning data, train a prediction model, and then use an optimisation algorithm to search for the best cotton fibre profile.

\[ \text{Cotton Fibre Parameters} \rightarrow \text{SVR Prediction Model} \rightarrow \text{Genetic Algorithm Search} \rightarrow \text{Optimum Yarn Quality} \]

This kind of approach is useful because textile mills often face a practical question: “Given several cotton lots, which combination of fibre properties will give the best yarn quality?” Traditionally, this decision depends on experience, HVI values, past spinning behaviour and the spinner’s judgement. A model-based approach does not replace experience, but it can support that experience with data.

What We Are Trying to Model

In this demonstration, we take six cotton fibre properties as input variables. These variables represent the raw material side of the spinning problem and are commonly used to judge whether a cotton lot is suitable for a particular yarn requirement.

Fibre Parameter Meaning
FS Fibre strength
FE Fibre elongation
UHML Upper half mean length
UI Uniformity index
FF Fibre fineness
SFC Short fibre content

These fibre properties are then used to predict four yarn quality parameters. The important point is that these yarn properties do not all move in the same direction. For yarn strength and elongation, higher values are preferred. For unevenness and hairiness, lower values are preferred.

Yarn Quality Parameter Desired Direction
Yarn strength Higher is better
Yarn elongation Higher is better
Unevenness U% Lower is better
Hairiness index Lower is better

This is important because yarn quality is not a single number. A yarn with high strength but high hairiness may not be acceptable. Similarly, a yarn with good elongation but poor evenness may create fabric defects. Therefore, the model must balance several responses together.

\[ \text{Good Yarn Quality} = \text{High Strength} + \text{High Elongation} + \text{Low Unevenness} + \text{Low Hairiness} \]

Why We Are Using Assumed Data

For this blog, we assume suitable data because actual spinning mill data may not be available to every reader. The assumed data follows textile logic. For example, higher fibre strength should generally improve yarn strength. Higher short fibre content should generally increase unevenness and hairiness. Better uniformity should generally improve yarn regularity.

However, it is important to remember that this is only a learning model. A real mill should train the model using its own data. Cotton variety, bale mixing, machine condition, humidity, carding efficiency, drafting settings and twist level can all influence the final yarn result.

Important positioning: This is an educational Python demonstration inspired by spinning optimisation logic. It should not be treated as a universal formula for cotton yarn prediction.

Step 1: Importing the Required Libraries

We first import the Python libraries needed for the model. We use numpy and pandas for data handling, scikit-learn for Support Vector Regression, and scipy for optimisation.

import numpy as np
import pandas as pd

from sklearn.model_selection import train_test_split
from sklearn.svm import SVR
from sklearn.multioutput import MultiOutputRegressor
from sklearn.preprocessing import StandardScaler
from sklearn.pipeline import Pipeline
from sklearn.metrics import mean_absolute_percentage_error

from scipy.optimize import differential_evolution

Here, SVR is the prediction model. Since we want to predict more than one yarn property, we use MultiOutputRegressor. This allows the SVR model to predict yarn strength, elongation, unevenness and hairiness together.

Step 2: Creating Assumed Cotton Fibre Data

Now we create a synthetic dataset. Each row represents one cotton fibre sample or cotton lot. The values are generated within reasonable practical ranges, so that the demonstration remains close to spinning logic.

np.random.seed(42)

n_samples = 80

data = pd.DataFrame({
    "FS": np.random.uniform(25, 36, n_samples),       # Fibre strength, cN/tex
    "FE": np.random.uniform(5.0, 8.5, n_samples),     # Fibre elongation, %
    "UHML": np.random.uniform(0.85, 1.25, n_samples), # Upper half mean length, inch
    "UI": np.random.uniform(76, 88, n_samples),       # Uniformity index
    "FF": np.random.uniform(3.2, 5.2, n_samples),     # Fibre fineness, µg/in
    "SFC": np.random.uniform(4, 15, n_samples)        # Short fibre content, %
})

The six variables are:

\[ FS,\ FE,\ UHML,\ UI,\ FF,\ SFC \]

These represent the raw material side of the problem. In real mill practice, such values may come from HVI testing or other fibre testing systems.

Step 3: Creating Assumed Yarn Quality Relationships

Next, we create synthetic yarn quality values. These are not random numbers alone. They are based on textile logic. For example, yarn strength is assumed to improve with fibre strength, fibre length and uniformity, but reduce with short fibre content.

Similarly, unevenness and hairiness are assumed to increase when short fibre content is high. In actual mill data, these relationships may be more complex, but this simplified structure is useful for understanding the modelling workflow.

noise = np.random.normal(0, 0.3, n_samples)

data["Yarn_Strength"] = (
    0.35 * data["FS"]
    + 2.2 * data["UHML"]
    + 0.06 * data["UI"]
    - 0.18 * data["SFC"]
    + noise
)

data["Yarn_Elongation"] = (
    0.45 * data["FE"]
    + 0.03 * data["UI"]
    - 0.04 * data["SFC"]
    + np.random.normal(0, 0.15, n_samples)
)

data["Unevenness_U"] = (
    18
    - 0.08 * data["UI"]
    + 0.28 * data["SFC"]
    + 0.35 * data["FF"]
    - 0.9 * data["UHML"]
    + np.random.normal(0, 0.25, n_samples)
)

data["Hairiness"] = (
    3.5
    + 0.18 * data["SFC"]
    + 0.35 * data["FF"]
    - 0.7 * data["UHML"]
    + np.random.normal(0, 0.15, n_samples)
)

This step is important because a machine learning model needs input-output examples. In a real mill, these output values would come from yarn testing instruments, such as strength testers, evenness testers and hairiness measuring systems.

\[ \text{Fibre Properties} \rightarrow \text{Yarn Properties} \]

Step 4: Defining Inputs and Outputs

Now we separate the input variables and output variables. The variable X contains cotton fibre properties, while the variable y contains yarn quality properties.

X = data[["FS", "FE", "UHML", "UI", "FF", "SFC"]]

y = data[[
    "Yarn_Strength",
    "Yarn_Elongation",
    "Unevenness_U",
    "Hairiness"
]]

This is the basic supervised learning structure. In textile language, we are asking the model to learn how cotton fibre data is connected with yarn quality.

\[ X \rightarrow y \]
\[ \text{Cotton Fibre Data} \rightarrow \text{Yarn Quality} \]

Step 5: Splitting the Data

The data is divided into training and testing sets. The model learns from the training data and is evaluated on the testing data. This helps us understand whether the model can make reasonable predictions on new data.

X_train, X_test, y_train, y_test = train_test_split(
    X, y,
    test_size=0.2,
    random_state=42
)

We use 80% of the data for training and 20% for testing. This is a common approach in machine learning. The purpose of testing is to check whether the model can make reasonable predictions on data it has not seen during training.

Step 6: Training the SVR Model

Support Vector Regression is used as the prediction engine. Since fibre-to-yarn relationships may be non-linear, we use an RBF kernel. The model is placed inside a pipeline along with a scaler.

svr_model = Pipeline([
    ("scaler", StandardScaler()),
    ("svr", MultiOutputRegressor(
        SVR(kernel="rbf", C=100, gamma="scale", epsilon=0.1)
    ))
])

svr_model.fit(X_train, y_train)

The StandardScaler is used because SVR is sensitive to scale. Fibre strength, fibre elongation, UHML, uniformity index and short fibre content are measured on different scales. Scaling helps the model treat the variables more fairly.

\[ FS, FE, UHML, UI, FF, SFC \rightarrow \text{Strength, Elongation, Unevenness, Hairiness} \]

In practical words, once the model is trained, we can give it a new cotton fibre profile and ask: what yarn quality is likely to result from this cotton?

Step 7: Checking Prediction Error

After training the model, we evaluate its prediction error on test data. This step is important because optimisation is only useful when the prediction model itself is reasonably reliable.

y_pred = svr_model.predict(X_test)

mape = mean_absolute_percentage_error(
    y_test,
    y_pred,
    multioutput="raw_values"
)

performance = pd.DataFrame({
    "Yarn Property": y.columns,
    "MAPE": mape
})

print(performance)

MAPE means Mean Absolute Percentage Error. Lower MAPE indicates better prediction accuracy. The exact values will change because the data is synthetic, but the purpose here is to show how prediction performance can be evaluated.

Yarn Property Expected Interpretation
Yarn strength Lower error means the model is predicting strength more reliably.
Yarn elongation Lower error means the model is capturing stretch behaviour better.
Unevenness U% Moderate error may occur because unevenness depends on many process factors.
Hairiness Error depends on how well fibre fineness, length and short fibre content explain hairiness.

Step 8: Creating Desirability Functions

Prediction alone is not enough. We also need to decide what is desirable. For yarn strength and elongation, higher values are better. For unevenness and hairiness, lower values are better. So we create two types of desirability functions.

def desirability_higher(value, low, high):
    """
    Higher value is better.
    Returns desirability between 0 and 1.
    """
    if value <= low:
        return 0
    elif value >= high:
        return 1
    else:
        return (value - low) / (high - low)


def desirability_lower(value, low, high):
    """
    Lower value is better.
    Returns desirability between 0 and 1.
    """
    if value <= low:
        return 1
    elif value >= high:
        return 0
    else:
        return (high - value) / (high - low)

The meaning is simple. A desirability value of 0 means undesirable, while a desirability value of 1 means ideal. For example, if yarn strength is too low, its desirability becomes 0. If it reaches the desired upper level, its desirability becomes 1.

\[ 0 = \text{Undesirable}, \qquad 1 = \text{Ideal} \]

For unevenness and hairiness, the logic is reversed. Lower values are better, so the desirability is highest when these values are low.

Step 9: Combining Multiple Desirability Scores

Now we combine the four yarn quality scores into one overall desirability value. This allows us to judge yarn quality as a balanced combination of several responses, rather than as one isolated property.

def overall_desirability(predicted_values):
    """
    predicted_values order:
    [Yarn_Strength, Yarn_Elongation, Unevenness_U, Hairiness]
    """

    strength, elongation, unevenness, hairiness = predicted_values

    d_strength = desirability_higher(
        strength,
        low=14.0,
        high=17.0
    )

    d_elongation = desirability_higher(
        elongation,
        low=4.5,
        high=6.5
    )

    d_unevenness = desirability_lower(
        unevenness,
        low=10.5,
        high=13.5
    )

    d_hairiness = desirability_lower(
        hairiness,
        low=4.0,
        high=6.5
    )

    desirabilities = np.array([
        d_strength,
        d_elongation,
        d_unevenness,
        d_hairiness
    ])

    if np.any(desirabilities == 0):
        return 0

    return np.prod(desirabilities) ** (1 / len(desirabilities))

The model uses the geometric mean of the individual desirability values. This is useful because it prevents one very good property from hiding a very poor property. If any one desirability becomes zero, the overall desirability becomes zero.

\[ D = (d_1 \times d_2 \times d_3 \times d_4)^{1/4} \]

This reflects real spinning logic. A yarn cannot be considered excellent if it has very good strength but extremely poor evenness or hairiness.

Step 10: Defining the Optimisation Objective

The Genetic Algorithm needs an objective function. Since the algorithm used here minimises the objective, we return negative desirability. Minimising negative desirability is the same as maximising desirability.

def objective_function(fibre_params):
    """
    GA minimizes the objective.
    Since we want maximum desirability,
    we minimize negative desirability.
    """

    fibre_params = np.array(fibre_params).reshape(1, -1)

    predicted_yarn_quality = svr_model.predict(fibre_params)[0]

    desirability_score = overall_desirability(predicted_yarn_quality)

    return -desirability_score

The objective function follows a simple logic. First, it receives a possible set of cotton fibre parameters. Then it predicts yarn quality using the SVR model. Finally, it converts that predicted yarn quality into a desirability score.

\[ \text{Fibre Parameters} \rightarrow \text{Predicted Yarn Quality} \rightarrow \text{Desirability Score} \]

Step 11: Setting Practical Bounds

The optimisation must stay within practical cotton fibre limits. We define lower and upper bounds for each fibre property. This prevents the algorithm from suggesting unrealistic values.

bounds = [
    (25, 36),      # FS: Fibre strength
    (5.0, 8.5),   # FE: Fibre elongation
    (0.85, 1.25), # UHML
    (76, 88),     # UI
    (3.2, 5.2),   # FF
    (4, 15)       # SFC
]

For example, the algorithm should not suggest an impossible fibre strength or an impractical short fibre content. In mill practice, these bounds should be based on actual cotton availability and the type of yarn being produced.

Step 12: Running the Genetic Algorithm

Now we run the optimisation. Here, differential_evolution works like a Genetic Algorithm. It starts with several possible fibre combinations, evaluates them, keeps better solutions, modifies them and continues searching.

result = differential_evolution(
    objective_function,
    bounds=bounds,
    strategy="best1bin",
    maxiter=100,
    popsize=20,
    mutation=(0.5, 1),
    recombination=0.7,
    seed=42
)

The idea is to try a fibre combination, predict the yarn quality, score the desirability, and then improve the combination. After several generations, the algorithm finds a fibre-property combination that gives high overall desirability.

\[ \text{Try Fibre Combination} \rightarrow \text{Predict Yarn Quality} \rightarrow \text{Score Desirability} \rightarrow \text{Improve Combination} \]

Step 13: Getting the Best Fibre Parameters

Once the optimisation is complete, we extract the best fibre values and the predicted yarn quality. These values represent the best fibre-property combination found within the defined practical limits.

best_fibre_params = result.x
best_desirability = -result.fun

best_prediction = svr_model.predict(
    np.array(best_fibre_params).reshape(1, -1)
)[0]

We can then display the optimum fibre parameters in a simple table. In actual mill application, this table can help compare available cotton lots with the fibre profile suggested by the model.

optimum_fibre = pd.DataFrame({
    "Fibre Parameter": ["FS", "FE", "UHML", "UI", "FF", "SFC"],
    "Optimised Value": best_fibre_params
})

print(optimum_fibre)
Fibre Parameter Model Meaning
FS Optimum fibre strength suggested by the model.
FE Optimum fibre elongation suggested by the model.
UHML Optimum upper half mean length suggested by the model.
UI Optimum uniformity index suggested by the model.
FF Optimum fibre fineness suggested by the model.
SFC Optimum short fibre content suggested by the model.

Step 14: Predicting Yarn Quality at the Optimum Point

Finally, we display the yarn quality predicted for the optimum fibre profile. This is the most practically useful output because it shows the expected yarn result.

optimum_yarn = pd.DataFrame({
    "Yarn Property": [
        "Yarn Strength",
        "Yarn Elongation",
        "Unevenness U%",
        "Hairiness Index"
    ],
    "Predicted Value": best_prediction
})

print(optimum_yarn)

print(f"Overall desirability score: {best_desirability:.4f}")

The output tells us what yarn quality the model expects from the optimum cotton fibre profile. This is the real value of the model. It does not only say that a cotton is good. It says that a particular cotton fibre profile is expected to give a certain level of yarn strength, elongation, unevenness and hairiness.

Complete Python Code

The complete code is given below. It can be copied into Jupyter Notebook, Google Colab, or any Python environment where the required libraries are installed.

# ------------------------------------------------------------
# Cotton Yarn Quality Optimisation Model
# SVR + Genetic Algorithm + Desirability Function
# ------------------------------------------------------------

import numpy as np
import pandas as pd

from sklearn.model_selection import train_test_split
from sklearn.svm import SVR
from sklearn.multioutput import MultiOutputRegressor
from sklearn.preprocessing import StandardScaler
from sklearn.pipeline import Pipeline
from sklearn.metrics import mean_absolute_percentage_error

from scipy.optimize import differential_evolution


# ------------------------------------------------------------
# 1. Assume suitable spinning data
# ------------------------------------------------------------

np.random.seed(42)

n_samples = 80

data = pd.DataFrame({
    "FS": np.random.uniform(25, 36, n_samples),       # Fibre strength, cN/tex
    "FE": np.random.uniform(5.0, 8.5, n_samples),     # Fibre elongation, %
    "UHML": np.random.uniform(0.85, 1.25, n_samples), # Upper half mean length, inch
    "UI": np.random.uniform(76, 88, n_samples),       # Uniformity index
    "FF": np.random.uniform(3.2, 5.2, n_samples),     # Fibre fineness, µg/in
    "SFC": np.random.uniform(4, 15, n_samples)        # Short fibre content, %
})

# ------------------------------------------------------------
# 2. Create assumed yarn-quality relationships
# ------------------------------------------------------------

noise = np.random.normal(0, 0.3, n_samples)

data["Yarn_Strength"] = (
    0.35 * data["FS"]
    + 2.2 * data["UHML"]
    + 0.06 * data["UI"]
    - 0.18 * data["SFC"]
    + noise
)

data["Yarn_Elongation"] = (
    0.45 * data["FE"]
    + 0.03 * data["UI"]
    - 0.04 * data["SFC"]
    + np.random.normal(0, 0.15, n_samples)
)

data["Unevenness_U"] = (
    18
    - 0.08 * data["UI"]
    + 0.28 * data["SFC"]
    + 0.35 * data["FF"]
    - 0.9 * data["UHML"]
    + np.random.normal(0, 0.25, n_samples)
)

data["Hairiness"] = (
    3.5
    + 0.18 * data["SFC"]
    + 0.35 * data["FF"]
    - 0.7 * data["UHML"]
    + np.random.normal(0, 0.15, n_samples)
)

# ------------------------------------------------------------
# 3. Define input and output variables
# ------------------------------------------------------------

X = data[["FS", "FE", "UHML", "UI", "FF", "SFC"]]

y = data[[
    "Yarn_Strength",
    "Yarn_Elongation",
    "Unevenness_U",
    "Hairiness"
]]

# ------------------------------------------------------------
# 4. Train-test split
# ------------------------------------------------------------

X_train, X_test, y_train, y_test = train_test_split(
    X, y,
    test_size=0.2,
    random_state=42
)

# ------------------------------------------------------------
# 5. Build SVR model
# ------------------------------------------------------------

svr_model = Pipeline([
    ("scaler", StandardScaler()),
    ("svr", MultiOutputRegressor(
        SVR(kernel="rbf", C=100, gamma="scale", epsilon=0.1)
    ))
])

svr_model.fit(X_train, y_train)

# ------------------------------------------------------------
# 6. Evaluate prediction performance
# ------------------------------------------------------------

y_pred = svr_model.predict(X_test)

mape = mean_absolute_percentage_error(
    y_test,
    y_pred,
    multioutput="raw_values"
)

performance = pd.DataFrame({
    "Yarn Property": y.columns,
    "MAPE": mape
})

print("\nPrediction error:")
print(performance)

# ------------------------------------------------------------
# 7. Desirability functions
# ------------------------------------------------------------

def desirability_higher(value, low, high):
    """
    Higher value is better.
    Returns desirability between 0 and 1.
    """
    if value <= low:
        return 0
    elif value >= high:
        return 1
    else:
        return (value - low) / (high - low)


def desirability_lower(value, low, high):
    """
    Lower value is better.
    Returns desirability between 0 and 1.
    """
    if value <= low:
        return 1
    elif value >= high:
        return 0
    else:
        return (high - value) / (high - low)


def overall_desirability(predicted_values):
    """
    predicted_values order:
    [Yarn_Strength, Yarn_Elongation, Unevenness_U, Hairiness]
    """

    strength, elongation, unevenness, hairiness = predicted_values

    d_strength = desirability_higher(
        strength,
        low=14.0,
        high=17.0
    )

    d_elongation = desirability_higher(
        elongation,
        low=4.5,
        high=6.5
    )

    d_unevenness = desirability_lower(
        unevenness,
        low=10.5,
        high=13.5
    )

    d_hairiness = desirability_lower(
        hairiness,
        low=4.0,
        high=6.5
    )

    desirabilities = np.array([
        d_strength,
        d_elongation,
        d_unevenness,
        d_hairiness
    ])

    if np.any(desirabilities == 0):
        return 0

    return np.prod(desirabilities) ** (1 / len(desirabilities))

# ------------------------------------------------------------
# 8. Objective function for optimisation
# ------------------------------------------------------------

def objective_function(fibre_params):
    """
    Optimiser minimizes the objective.
    Since we want maximum desirability,
    we minimize negative desirability.
    """

    fibre_params = np.array(fibre_params).reshape(1, -1)

    predicted_yarn_quality = svr_model.predict(fibre_params)[0]

    desirability_score = overall_desirability(predicted_yarn_quality)

    return -desirability_score

# ------------------------------------------------------------
# 9. Define practical bounds for cotton fibre properties
# ------------------------------------------------------------

bounds = [
    (25, 36),      # FS: Fibre strength
    (5.0, 8.5),   # FE: Fibre elongation
    (0.85, 1.25), # UHML
    (76, 88),     # UI
    (3.2, 5.2),   # FF
    (4, 15)       # SFC
]

# ------------------------------------------------------------
# 10. Run Genetic Algorithm style optimisation
# ------------------------------------------------------------

result = differential_evolution(
    objective_function,
    bounds=bounds,
    strategy="best1bin",
    maxiter=100,
    popsize=20,
    mutation=(0.5, 1),
    recombination=0.7,
    seed=42
)

best_fibre_params = result.x
best_desirability = -result.fun

best_prediction = svr_model.predict(
    np.array(best_fibre_params).reshape(1, -1)
)[0]

# ------------------------------------------------------------
# 11. Display optimum fibre parameters
# ------------------------------------------------------------

optimum_fibre = pd.DataFrame({
    "Fibre Parameter": ["FS", "FE", "UHML", "UI", "FF", "SFC"],
    "Optimised Value": best_fibre_params
})

print("\nOptimised cotton fibre parameters:")
print(optimum_fibre)

# ------------------------------------------------------------
# 12. Display predicted yarn quality at optimum fibre values
# ------------------------------------------------------------

optimum_yarn = pd.DataFrame({
    "Yarn Property": [
        "Yarn Strength",
        "Yarn Elongation",
        "Unevenness U%",
        "Hairiness Index"
    ],
    "Predicted Value": best_prediction
})

print("\nPredicted yarn quality at optimum fibre parameters:")
print(optimum_yarn)

print(f"\nOverall desirability score: {best_desirability:.4f}")

How to Interpret the Model Output

The first output is the prediction error. This tells us how well the SVR model predicts yarn properties from fibre properties. In a real project, this step is extremely important because a poor prediction model will lead to poor optimisation.

The second output is the optimum fibre parameter table. This tells us what fibre profile the algorithm selected as the best combination within the given limits. The third output is the predicted yarn quality at that optimum fibre profile, which is the most practically useful output.

Finally, the desirability score tells us how close the solution is to the ideal balanced yarn quality. A score close to 1 means the solution is highly desirable. A score close to 0 means the solution is poor.

Why This Model Is Useful for Textile Mills

This type of model can support raw material decisions in spinning mills. A mill may have several cotton lots available, each with different fibre properties. Instead of relying only on experience, the mill can use data to estimate the likely yarn quality from different fibre profiles.

The model can help answer practical questions. Which cotton fibre profile gives better yarn strength without increasing hairiness? How much short fibre content can be tolerated for a target yarn quality? What balance of fibre strength, length and uniformity gives the best overall yarn performance? Which raw material parameters should be prioritised for a particular yarn count?

This is useful because the cost of raw material is one of the most important cost components in spinning. If a mill can select cotton more scientifically, it can improve quality, reduce trial-and-error and possibly avoid overpaying for fibre properties that are not essential for a particular yarn.

Important Limitations

This model uses assumed data. Therefore, the numerical results should not be used directly for production decisions. The relationships created in the code are textile-logical, but they are not based on actual mill trials.

In a real spinning mill, the model should be trained using actual fibre and yarn test data. The data should include cotton fibre properties, yarn count, spinning system, machine settings, humidity conditions and final yarn test results.

The model shown here is also specific to the selected variables. In actual production, other factors such as trash content, micronaire, maturity, neps, carding quality, draft settings, spindle speed and twist multiplier may also influence yarn quality.

Therefore, this model should be treated as a framework, not as a finished industrial solution.

Final Conclusion

This Python demonstration shows how raw material selection in spinning can be converted into a data-driven optimisation problem. The SVR model predicts yarn quality from cotton fibre properties. The Genetic Algorithm searches for the best fibre-property combination. The desirability function balances several yarn quality requirements into one score.

The most important idea is that yarn quality should not be optimised through one parameter alone. A good yarn must be strong, extensible, even and less hairy. Therefore, the best cotton is not always the strongest or longest cotton. It is the cotton with the right balance of properties for the required yarn.

In that sense, this model gives a practical bridge between textile science and data science:

\[ \text{Spinning Knowledge} + \text{Machine Learning} + \text{Optimisation} = \text{Better Raw Material Decisions} \]

For students, this model is a good way to understand how artificial intelligence can be applied in spinning. For mills, the same logic can become a decision-support tool when trained with real production data.

General Disclaimer

This article is for educational and general textile knowledge purposes only. The Python model uses assumed data and simplified textile relationships for demonstration. Actual yarn quality depends on cotton variety, bale mixing, fibre testing accuracy, blow room settings, carding efficiency, draw frame performance, roving quality, ring frame settings, twist, humidity, machine condition and testing methods. Mills should use their own validated production data before applying such models for commercial raw material selection.

Buy my books at Amazon.com

Optimising Cotton Yarn Quality Through Raw Material Parameters



Optimising Cotton Yarn Quality Through Raw Material Parameters

In spinning, yarn quality begins much before the fibre reaches the ring frame. It begins with the choice of cotton itself. A spinner may control machine settings, humidity, drafting, twist, and winding conditions, but if the raw material is unsuitable, the final yarn quality will always remain limited.

The paper titled “Selection of raw material parameters for multi-response optimization of cotton yarn qualities” by Subhasis Das and Anindya Ghosh deals with this very practical spinning problem. Instead of asking only how a given cotton will perform, the paper asks a more useful industrial question: if a mill wants a certain yarn quality, what should be the ideal combination of cotton fibre properties?

Cotton Fibre Properties to Yarn Quality Prediction Model

Cotton fibre parameters influence yarn strength, elongation, unevenness and hairiness.

The Practical Problem

Cotton is a natural fibre, and its properties vary from lot to lot. Fibre strength, fibre length, short fibre content, fineness, elongation, and length uniformity all influence yarn behaviour. A cotton lot may have good strength but high short fibre content. Another may have better uniformity but lower elongation. Therefore, raw material selection is not a simple matter of choosing the “best” cotton in one parameter.

The real spinning challenge is to choose a balanced fibre profile that gives good yarn strength, acceptable elongation, lower unevenness, and lower hairiness. This is why the paper treats yarn quality as a multi-response optimisation problem rather than a single-property prediction problem.

Practical point: The best cotton for spinning is not necessarily the cotton with the highest strength or longest fibre. It is the cotton with the best combination of fibre properties for the required yarn quality.

Which Fibre Properties Were Considered?

The study used six cotton fibre parameters as input variables. These parameters are commonly important in spinning because they directly influence yarn strength, regularity, elongation, and surface appearance.

Fibre Parameter Meaning in Spinning
Fibre strength, FS Indicates how strong individual fibres are before breaking.
Fibre elongation, FE Shows how much the fibre can stretch before rupture.
Upper half mean length, UHML Represents the average length of the longer half of the fibres.
Uniformity index, UI Shows how uniform the fibre length distribution is.
Fibre fineness, FF Indicates fibre fineness, measured in micrograms per inch.
Short fibre content, SFC Represents the percentage of short fibres in the cotton lot.

Which Yarn Properties Were Optimised?

The paper does not optimise only yarn strength. This is important because a yarn can be strong but still poor in appearance or processing performance if it is uneven or hairy. The authors therefore considered four yarn quality responses together.

Yarn Property Desired Direction Why It Matters
Yarn strength Higher is better Improves performance during weaving, knitting, and end use.
Yarn elongation Higher is better Helps the yarn withstand tension and strain before breaking.
Yarn unevenness, U% Lower is better Improves fabric appearance and reduces thick-thin variation.
Hairiness index Lower is better Improves yarn surface quality and reduces pilling or processing issues.
\[ \text{Good Yarn Quality} = \text{High Strength} + \text{High Elongation} + \text{Low Unevenness} + \text{Low Hairiness} \]

Balanced Yarn Quality Optimisation for Strength Elongation Unevenness and Hairiness
Yarn optimisation is a balance between strength, elongation, evenness and low hairiness.

Why Raw Material Optimisation Is Difficult

In textile spinning, one fibre property may improve one yarn parameter but not another. For example, stronger fibres usually help yarn strength, but yarn unevenness and hairiness also depend on fibre length distribution, short fibre content, fibre fineness, and processing behaviour. A spinner therefore cannot optimise yarn quality by looking at one fibre property in isolation.

The practical task is not simply:

\[ \text{Choose the strongest cotton} \]

The real task is:

\[ \text{Choose the best combination of cotton fibre properties for balanced yarn quality} \]

The Three Methods Used in the Paper

The paper uses three methods, each serving a different purpose. One method predicts yarn quality, another searches for the best fibre combination, and the third converts multiple yarn quality targets into one combined score.

Method Role in the Study Simple Interpretation
Support Vector Regression, SVR Prediction engine Predicts yarn quality from cotton fibre properties.
Genetic Algorithm, GA Search engine Searches for the best combination of raw material parameters.
Desirability Function Scoring system Combines several yarn quality targets into one overall desirability score.


SVR Genetic Algorithm and Desirability Function Workflow for Yarn Optimisation
The model uses SVR for prediction, GA for searching, and desirability function for balancing multiple yarn targets.

Support Vector Regression: The Prediction Engine

Support Vector Regression, or SVR, is used to learn the relationship between cotton fibre properties and yarn properties. This relationship is not always linear. A small change in short fibre content or uniformity may influence yarn unevenness differently depending on the other fibre properties present in the mix.

\[ \text{Fibre Properties} \rightarrow \text{SVR Model} \rightarrow \text{Predicted Yarn Quality} \]

Genetic Algorithm: The Search Engine

The Genetic Algorithm, or GA, searches through many possible combinations of cotton fibre properties. It is inspired by the idea of natural selection. Better combinations are retained, modified, and recombined until the search moves towards an optimum solution.

For a spinning mill, this can be understood in a simple way. The algorithm tries many cotton combinations, predicts the yarn quality for each combination, keeps the better ones, modifies them, and gradually approaches a more desirable raw material profile.

Desirability Function: The Balancing System

A desirability function converts each yarn quality parameter into a score between 0 and 1. A score of 0 means completely undesirable, while a score of 1 means ideal. For yarn strength and elongation, higher values are more desirable. For unevenness and hairiness, lower values are more desirable.

\[ 0 = \text{Undesirable}, \qquad 1 = \text{Ideal} \]

Data Used in the Study

The study used data from 40 cotton fibre types and their corresponding 20s Ne carded cotton yarns produced by ring spinning. Out of these, 32 datasets were used for training the SVR model, and 8 datasets were used for testing the model.

This detail is important because the findings should be understood in the context of 20s Ne carded cotton yarn. The same model should not be blindly applied to combed yarn, compact yarn, rotor yarn, finer counts, coarser counts, or different spinning conditions without recalibration.

How Accurate Was the Prediction?

The SVR model showed reasonably good prediction accuracy. The reported testing error values were low enough to suggest that the model can be useful for industrial decision-making.

Yarn Property Testing Mean Error
Strength 3.15%
Elongation 4.37%
Unevenness 6.37%
Hairiness 4.33%

Optimum Cotton Fibre Properties Suggested by the Model

The model suggested an optimum fibre property combination for achieving the desired yarn quality. These values represent the cotton fibre profile that the model found most suitable within the dataset and target conditions of the study.

Fibre Property Optimised Value
Fibre strength, FS 31.51 cN/tex
Fibre elongation, FE 6.83%
Upper half mean length, UHML 1.00 inch
Uniformity index, UI 82.84
Fibre fineness, FF 4.02 µg/in
Short fibre content, SFC 5.63%

Target Yarn Quality and Model-Obtained Quality

The model attempted to reach target values for strength, elongation, unevenness, and hairiness. The obtained values were close to the targets, showing that the optimisation approach was effective.

Yarn Property Target Value Model-Obtained Value
Strength 16.50 cN/tex 16.17 cN/tex
Elongation 6.00% 5.90%
Unevenness, U% 11.00 11.51
Hairiness index 4.80 4.83
\[ \text{Overall Desirability} = 0.9291 \]

Practical Interpretation for Spinning Mills

This paper is essentially about scientific raw material selection. In many mills, cotton selection depends on a mixture of test results, experience, availability, price, and the spinner’s judgement. That experience is valuable, but it can be strengthened by predictive modelling.

\[ \text{Cotton Fibre Data} \rightarrow \text{Predicted Yarn Quality} \rightarrow \text{Better Raw Material Selection} \]

The real value is that the model does not chase one yarn property alone. It balances multiple yarn requirements together. This is closer to actual spinning practice, where the yarn must not only be strong, but also reasonably even, less hairy, and sufficiently extensible.

Why This Matters

For a spinning mill, this type of model can help in selecting cotton lots before mixing, deciding which fibre parameters matter most for a target yarn count, reducing trial-and-error in bale selection, improving consistency in yarn quality, and linking raw material purchase decisions with final yarn performance.

It also supports a more data-driven approach to spinning. Instead of treating raw material purchase and yarn quality control as separate activities, the model connects them. This is important because yarn quality problems often begin at the raw material stage, even though they may become visible only later during spinning, weaving, knitting, or fabric inspection.

Important Limitation

The model was developed for 20s Ne carded cotton yarn produced through ring spinning, using a dataset of 40 fibre types. Therefore, it should not be treated as a universal formula for all yarns. For combed yarn, compact yarn, rotor yarn, finer counts, coarser counts, different machines, or different process settings, the model would need fresh data and recalibration.

Simple Conclusion

The paper shows that good yarn quality begins with the right fibre-property combination. The strongest cotton or the longest cotton may not always produce the most balanced yarn. What matters is the combined effect of fibre strength, elongation, length, uniformity, fineness, and short fibre content.

The main contribution of the paper is a hybrid optimisation model that combines SVR for prediction, GA for searching the best fibre combination, and desirability function for balancing multiple yarn quality targets. This makes raw material selection more scientific, measurable, and useful for modern spinning mills.

General Disclaimer

This article is for educational and general textile knowledge purposes only. The actual yarn quality obtained in a spinning mill depends on cotton variety, bale management, mixing strategy, blow room settings, carding efficiency, draw frame performance, roving quality, ring frame conditions, twist level, humidity, machine maintenance, and testing methods. Mills should conduct their own trials and data validation before applying any predictive model to commercial production.

Direct Dyeing vs Reactive Dyeing: A Technical, Economic and Ecological Comparison



Direct Dyeing vs Reactive Dyeing: A Technical, Economic and Ecological Comparison

In cotton dyeing, reactive dyes have almost become the default choice, especially when good wash fastness and bright shades are required. However, a recent paper in the Indian Journal of Fibre & Textile Research "Comparison of direct and reactive dyeing in terms of technical, economic and ecological perspectives” by Riza Atav, F. Nilay Kuğu, Dilşad Kara, and İlkay Gökçe,raises a very practical question: for light and medium cotton shades, do we always need reactive dyes, or can direct dyes sometimes give acceptable performance with lower cost and lower environmental impact?

This question is important because dyeing is not only a colouration process. It is also a cost centre, a water-consuming process, and a source of chemical load in textile effluent. A dyeing method should therefore be judged not only by shade and fastness, but also by its consumption of salt, alkali, water, energy, auxiliaries, and wastewater treatment capacity.

The Core Difference Between Direct and Reactive Dyes

Reactive dyes are generally preferred for cotton because they form stronger chemical bonds with cellulose. This gives them better wet fastness, especially in darker shades and products that undergo frequent washing. However, reactive dyeing usually requires salt, alkali, soaping, neutralisation, and repeated rinsing. The paper notes that reactive dyeing commonly requires high salt levels, around \(50 - 100 \, \text{g/L}\), because reactive dyes have relatively low affinity for cotton before fixation.

Direct dyes behave differently. They do not form covalent bonds with cotton. Instead, they attach mainly through secondary forces and hydrogen bonding. Because of this, their wet fastness is usually weaker than reactive dyes, particularly in dark shades. But direct dyes may need less salt, little or no alkali, and fewer washing-off steps. This makes them interesting for light and medium shades where extreme wet fastness may not be necessary.

Practical point: The question is not whether direct dyes are universally better than reactive dyes. The real question is whether reactive dyes are always necessary, especially for light cotton shades where direct dyes may perform adequately.

What the Study Tested

The study dyed 100% cotton single jersey fabric with yellow, red, and blue direct dyes at four different depths:

\[ 0.5\%, \quad 1\%, \quad 2\%, \quad 3\% \]

The researchers then evaluated colour yield and fastness. In the next stage, they selected the fabric dyed with 1% direct dye as the reference shade and tried to match the same colour using reactive dyes. This allowed them to compare both dye classes under similar shade conditions.

The comparison was made from three perspectives: technical, economic, and ecological. This makes the study especially useful for industry because a dyeing decision in a mill is rarely based on colour alone. It must also consider cost, time, effluent, and product requirement.

1. Technical Comparison: Shade and Fastness

The study found that colours obtained with direct and reactive dyes were visually quite similar. The authors clarify that the aim was not to produce an exact laboratory shade match, but to compare technically comparable colours obtained by both dye classes.

For 1% light shades, direct-dyed samples performed well. The paper indicates that for such light colours, direct dyes can be used without creating major fastness problems. In some cases, perspiration fastness may even be better with direct dyes.

However, the conclusion is cautious. Direct dyes cannot universally replace reactive dyes. For dark shades, strict fastness requirements, repeated laundering, or very vivid shades, reactive dyes remain the safer and more reliable option.

Shade or Requirement More Suitable Dyeing Choice
Light cotton shades Direct dyes may be suitable
Medium cotton shades Direct dyes may be considered after testing
Dark shades Reactive dyes are safer
High wet-fastness requirement Reactive dyes are safer
Very bright or vivid colours Reactive dyes may be better

2. Economic Comparison: Direct Dyeing Was Cheaper

One of the strongest findings of the paper is the cost difference. For similar colours, direct dyeing had a much lower total cost per kilogram of fabric compared with reactive dyeing.

Colour Direct Dyeing Cost Reactive Dyeing Cost
Yellow $1.8 per kg fabric $3.2 per kg fabric
Red $1.8 per kg fabric $3.1 per kg fabric
Blue $1.8 per kg fabric $6.2 per kg fabric

Reactive dyeing was more expensive because it required larger quantities of auxiliaries such as salt, soda ash, washing agent, and acetic acid. It also required more rinsing steps. According to the paper, direct dyeing needed only 2 rinsing steps, while reactive dyeing required at least 5 rinsing steps.

This means that the savings are not limited to dye and chemical cost. Direct dyeing can also reduce water consumption, electricity consumption, steam usage, machine occupancy time, and effluent treatment load. The paper reports that total dyeing costs were approximately 40–70% lower for direct dyeing compared with reactive dyeing.

The cost comparison can be understood in a simple way:

\[ \text{Dyeing Cost} = \text{Dye Cost} + \text{Auxiliary Cost} + \text{Water} + \text{Energy} + \text{Processing Time} \]

When reactive dyeing requires more salt, alkali, washing, neutralisation, and rinsing, all these components increase. Therefore, even if the dye price itself is not the only issue, the total process cost becomes higher.

3. Ecological Comparison: Lower Wastewater Load in Direct Dyeing

The ecological comparison is equally important. For red dyeing wastewater, the study reported much higher COD and BOD values for reactive dyeing than for direct dyeing.

Wastewater Parameter Direct Dyeing Reactive Dyeing
COD 481 mg O2/L 1469 mg O2/L
BOD 175 mg/L 530 mg/L
pH 8.91 10.46

COD, or Chemical Oxygen Demand, indicates the amount of oxygen required to chemically oxidise organic matter in wastewater. BOD, or Biological Oxygen Demand, indicates the oxygen required by microorganisms to biologically degrade organic matter. Higher COD and BOD values generally mean a higher pollution load and a greater burden on effluent treatment systems.

Reactive dyeing produced higher COD and BOD because the same colour required a higher percentage of reactive dye, around 2–2.5%, while only 1% direct dye was needed for the reference shade. In addition, reactive dyeing also involved more chemicals and auxiliaries, contributing to greater wastewater load.

The pH difference is also significant. Reactive dyeing wastewater was more alkaline because reactive dyeing requires alkali for fixation. A pH value above about 9.5 can be unsuitable for many aquatic organisms and usually requires neutralisation before discharge or biological treatment.

Ecological message: A dyeing process with fewer chemicals, fewer rinses, lower COD, lower BOD, and lower alkalinity is easier to manage from an effluent treatment point of view.

The Main Conclusion of the Paper

The main conclusion is balanced and practical. The paper does not claim that direct dyes are better than reactive dyes in all situations. Instead, it suggests that direct dyes can be a technically acceptable, cheaper, and more ecological alternative for light cotton shades.

For darker shades, high fastness requirements, and brilliant colours, reactive dyes are still more suitable. But for light shades where the required performance level can be achieved with direct dyes, it may not be necessary to use a more chemical-intensive reactive dyeing route.

The decision can be expressed as:

\[ \text{Best Dyeing Choice} = \text{Required Performance} + \text{Minimum Environmental and Economic Burden} \]

This is a very important sustainability principle. The most sustainable process is not always the most technologically powerful process. It is the process that delivers the required performance with the least unnecessary consumption of resources.

Why This Matters for Textile Mills

In many mills, reactive dyeing is used almost automatically for cotton. This paper encourages mills to think shade-wise and requirement-wise. Instead of assuming that every cotton shade needs reactive dyeing, the mill can ask whether direct dyeing will meet the actual product requirement.

For example, a pale yellow, light red, or soft blue cotton knit may not need the same dyeing route as a dark navy, black, maroon, or high-fastness export shade. If direct dyeing gives acceptable fastness for the intended use, it can reduce cost and environmental burden.

This approach is especially useful for product categories where shades are light, wash requirements are moderate, and cost sensitivity is high. It can also help mills reduce salt load, alkali usage, water consumption, and effluent treatment pressure.

Practical Takeaway

The paper gives a simple but powerful message: do not choose the strongest dyeing system by default. Choose the dyeing system that is sufficient for the product requirement. Reactive dyes should be used where their superior bonding and fastness are necessary. Direct dyes should be considered where they can meet the performance requirement with lower cost and lower ecological load.

In other words:

\[ \text{Use reactive dyes where performance demands it. Use direct dyes where performance allows it.} \]

This is not a compromise in quality. It is intelligent process selection. For sustainable textile processing, the future may not lie only in new chemicals and new machines, but also in smarter decisions about when to use existing technologies.

General Disclaimer

This article is for educational and general textile knowledge purposes only. Dyeing performance depends on fibre quality, fabric construction, dye class, dye brand, shade depth, recipe, machine type, water quality, after-treatment, testing method, and end-use requirements. Mills should conduct their own laboratory and bulk trials before replacing one dyeing method with another in commercial production.

Buy my books at Amazon.com

Total Pageviews