A Method for Yarns Calculation in Sock production

. In socks production, enterprises always confuse how to estimate the quantity of the yarns rapidly and correctly for different kinds of socks. It results in the socks' costs cannot be calculated in time. This paper aims at the calculation method of yarn used in the socks based on their pattern files and development of the corresponding software so that the quantity of yarns consumption can be calculated timely before the sock production. The composition of sock was introduced and the pattern file for sock production was analysed firstly. Then a concept of Thousand Stitches Weight(TSW) was proposed and the TSWs were determined for some yarns with different knitting structures. On this basis, a process was proposed for the calculation of yarn expending in a sock with different knitting structures before production. Finally, a software was developed to get the results fast and easily. The example shows that the calculation method proposed in this paper is reliable and valuable for hosiery enterprises.


Introduction
In the textile industry, it is increasingly important to estimate the material consumption and production cost for an order quickly. The fabric consumption is affected by the fabric model, such as the width. Even for the same fabric, the fabric consumption can vary in different width [1]. It is helpful for enterprises to improve the efficiency of order fulfilment and reduce unnecessary waste. Therefore, many scholars have conducted in-depth studies, especially in the cloth.
Ng, Hui et al. aimed to estimate the loss of fabric by developing a mathematical model. They created a mathematical formula by using the parameters used in the cutting plan and the factors which affect the fabric spreading in manufacturing [2]. Bulgun et al. studied the production parameters on the basis of product cost in knitted clothing factories and developed a software to calculate the product cost per unit [3]. Yesilpinar [10]. Peng, Jiajia et al. proposed a technique calculation process in garment and built an evaluation system to show the merits of production cost and yarn consumption [11]. Kalkanci, M et al. developed a software to calculate the unit usage of a garment quickly through selecting bathrobe models as a material [12]. Most of the studies focused on the unit consumption of the fabric, garments.
While in sock production, the studies of yarns consumption are not so detailed than that in the cloth. Usually, the consumptions for different yarns in one sock are determined by weighting. The sock must be knitted firstly and then disassembled. Obviously, it is timeconsuming and yarn-wasting. This paper provides a rapid calculating method for different yarns in one sock based on its pattern file. The concerned data and the weight relation of the various kinds of yarns in different knitting structures are determined by analysing the relationship between yarn and knitting structure. It is helpful to establish a material database for calculation. The expression method of pattern file for sock design is studied, and the algorithm flow of sock yarns calculation is put forward. The example shows the high accuracy of the method and easy operation.

Composition of sock
The sock is generally composed of five parts from top to bottom. They are rib top, the heel to top, heel, the heel to toe and toe, as shown in figure 1. While the hosiery machine works, the rib top is the first part to be knitted, followed by the heel to top, heel, the heel to toe and toe respectively. The heel to toe part is knitted in a whole circle meaning that all stitches take part in the knitting, as well as the heel to top part and rib-top part. While the heel and toe parts are knitted in a non-integral circle and the number of stitches in each circle decreases gradually. Generally, there is no pattern in the heel and toe parts. You must input parameters to set knitting process on the control panel of the hosiery machine. Therefore, the pattern file doesn't include the part of heel, toe and rib top maybe. The part of rib top can be set in the hosiery machine too if it has no pattern. Conversely, if it has any pattern, it is represented in the pattern file.

Common knitting structures
The common knitting structures of sock include plain stitch, rib stitch, and mesh stitch. In addition, there's pile stitch. The stretched style of pile stitch is similar to the stretched style of plain stitch. And the length of loop in the pile stitch is longer than plain stitch. Obviously, the quantity of material needed in the pile stitch is more on the condition that the material and the number of loop in two stitches are the same. The rib stitch and mesh stitch has different proportions which lead to different material consumption. Common proportions of rib stitch are 1:1, 1:2, 1:3, 1:4, 2:1, 3:1,4:1. And common proportions of mesh stitch are 1:1, 2:2. The proportion of 1:2, 1:3, 1:4 rib stitch is similar to the proportion of 2:1, 3:1, 4:1 rib stitch.

The relationship between the pattern file and knitting structure
The pattern file is a CAM code for hosiery knitting machine which is a bitmap file in .bmp format. It is consisted of graphs instead of the G-code. The hosiery machine reads and identifies the RGB (Red, Green, Blue) values of each pixel in the CAM code to control the movements of the hosiery machine directly. It includes four graphs. They are ground yarn graph, plaiting graph, pile graph and the "em" graph which represents the elastic material, as shown in figure 2. It shows a CAM code which is one of the forms mostly used in hosiery industry. The ground yarn graph is usually only one kind of colour. It shows that the yarn participates in all stitches during knitting. The structure and colour information of each stitch in socks except the heel and toe are reflected by other three graphs. The materials involved in knitting are divided into surface yarn, ground yarn and "em". The ground yarn participates in the knitting of each stitch, and the "em" participates in the knitting of rib stitch of different proportions. The organizational structure of every stitch consists of the information in four graphs. The pixel of the first line and first column in the ground yarn graph and the information of the surface yarn, "em", and pile of the same position in other corresponding graphs constitute the total information of this position collectively.
If the d D is the diameter of the stocking machine and

Common used yarns
Common yarns used in the sock-knitting usually are composed of one or more kinds of materials such as cotton, nylon, polyester, spandex, etc. The thickness of them are expressed in different ways. The common specifications of cotton yarn are 10S, 20S, 21S, 32S, 40S and 60S. The larger the number, the thinner the yarn. While for nylon and polyester, the thickness of them are expressed with ND(D) such as 15D, 30D, 50D, 70D, 100D and 150D. But the larger the number of D, the thicker of the yarn. The ground yarn is usually the wrap yarn which is composed of the polyester and spandex or the nylon and spandex. It is shown in the form of 2070, 2075, 3070, 3075, 4070, etc. The first two numbers represent the core of the wrap yarn while the last two numbers indicate the wrapping of the yarn. And the ratio of the outboard wire to core is generally 78:22 in weight.

Thousand Stitches Weight of Yarns for different knitting structures
In this study, an electronic gram-weighing scale of 0.00 precision level is adopted to measure the weights of cylindrical fabric pieces knitted by different yarns with different structure. One piece is knitted only by one or two (in the situation with rib) kind of yarn with only one kind of structure. Then the Thousand Stitches Weight(TSW) for this yarn with this structure cab be defined by G is the weight of the knitted piece, Q is the number of cycles and N d is the stitches in one cycle (related to hosiery machine). As an example, the average TSWs of plain and pile stitch fabric are shown in the table 1. While exploring the relationship between the ground yarn and knitting structure, the surface yarn should be the same. According to the ratio of the outboard wire to core is generally 78:22 in ground yarn weight as well as the ratios of diameters, densities for different yarns, etc., we can easily obtain the weights of ground yarn and the surface yarn for different knitting structure. Furthermore, if we know the diameter, density of different kind of yarns, the TSWs of all yarns can be obtained and saved in the database for the calculation material consumption.

The calculation progress
The principle to calculate the weight of yarns consumption is firstly calculating the number of stitches. And then choosing yarns from the established database to get the information about the TSW of material to calculate results. The progress calculating the weight of sock is shown in figure 3. It includes five parts.  Choosing ground yarn and comparing with the standard quantity such as the TSW of 3070 wrap yarn, then the TSW of the ground yarn increased or decreased L G will be obtained.


Reading the number of the pixel of different colors from plating graph and comparing with the pile graph to calculate the length of floating threads by reading the location of differentcolored pixels.  Reading the "em" graph to achieve the number of the pixel.  Inputting concerned parameters to calculate the number of stitches for heel and toe parts.  Choosing material to get the TSWs of yarns to calculate the final weight of sock.

Examples
A software is developed to realize the calculation progress. It is easy to obtain results by choosing files and inputting parameters. While analysing the error of the calculation progress, the sock should be knitted to weigh and compared with the calculation result. The knitted sock is shown in the figure 4. The result of error analysis is shown in the table 2. The error of sock with floating threads is bigger than sock without floating threads. Because the floating threads can't be cut completely which verifying the reliability of the algorithm flow of sock yarns calculation proposed in section 4.

Conclusion
The number of the loop knitted decides the weight of yarns used. It is reflected by the number of pixel in the pattern file. The composition of sock was introduced and the pattern file for sock production was analysed firstly in the paper. Through detailed analysis of the relationship between yarns and different knitting structures, a concept of Thousand Stitches Weight(TSW) was proposed. On this basis, the principle of the calculation method proposed is calculating the number of stitches and matching yarns from database. The software developed can get the results fast and easily. The example showed that the method calculating yarns consumption of sock is reliable and convenient for hosiery enterprises. It helps them calculate costs and prepare materials in time.