**3.1 Neural network**

Neural network is a universal approximator, which is capable of approximating any measurable function to any desired degree of accuracy. Hence, we could use neural network to learn the dynamics of plants. Here, we use the classical definition of neural network in Ref. [10]. Neural network consists of networks of artificial neurons in which the data flows through and their weights are changed to reduce the error in the learning process. A one-layer neural network is typically presented by a network diagram as in **Figure 6**. Derived features *Zm* are created from linear combinations of the inputs; then the output *Y* is modeled as a function of linear combinations of the *Zm*:

$$Z\_m = \sigma(a\_{0m} + a\_m^T X), \quad m = \mathbf{1}, \dots, M$$

$$T\_k = \beta\_{0k} + \beta\_k^T Z, \quad k = \mathbf{1}, \dots, K \tag{33}$$

$$f\_k(X) = \mathbf{g}\_k(T), \quad k = \mathbf{1}, \dots, K$$

The activation function *σ*ð Þ*v* is usually chosen to be the sigmoid:

$$\sigma(v) = \frac{1}{1 + e^{-v}}\tag{34}$$

*β* and *α* are additional bias feeding into every unit in the hidden and output

For output function *g*k(*T*), we usually choose the identity function *g*k(*T*) = T. The units in the middle of the network are called hidden units as the values *Zm* are not observed directly. Generally, there can be more than one hidden layer. ANN encompasses various types of learning algorithms, the most popular of

In feedforward neural network, the data flow is one directional, which is from the input layer through hidden layers to the output layer without loop and feedback. In recurrent neural network, some of the outputs are fed back to the input layer. One of the applications of recurrent neural network is time series prediction, which

After a certain neural network is built, it needs to get training, which is to find a set of weights to minimize the error between the real outputs and predicted outputs. Backpropagation is a method used in neural networks to calculate a gradient that is need in the calculation of the desired weights based on mean squared error loss function [12]. This method has two steps: first data are fed into the network from input layer, and the activations for each layer of neurons are cascaded forward; then based on the loss, we calculate the gradient from the output layer to the input layer

In control system, in order to implement an effective algorithmic controller, we must have a thorough understanding of the plant that is to be controlled, which is very difficult in practice. A neural network controller performs a specific form of adaptive control, as it has nonlinear network and adaptable parameters. The learning process gradually tunes the weights so that the errors between the desired outputs and actual plant outputs are minimized. Here we introduce two learning structures to minimize the error signal, which are both simple and easy to under-

**Figure 7** shows the general learning method for training the neural network controller that does minimize the overall error. The training sequence is as follows. A plant input *u* is applied to the plant to get a corresponding *y*. The network is trained to reproduce *u* at its output from *y*. Then the trained neural network controller should be able to reproduce an appropriate input *u* based on the desired output *d*. This will certainly work if the desired output *d* is sufficiently close to one of the training data *y*. Thus, the success of this method highly relies on the ability of the neural network to learn to respond correctly to inputs that are not applied in the

which include feedforward neural network and recurrent neural network.

layers, which captures the intercepts of *α*0*<sup>m</sup>* and *β*0*<sup>k</sup>* in model.

then can be applied in predictive control [11].

*Web Tension and Speed Control in Roll-to-Roll Systems DOI: http://dx.doi.org/10.5772/intechopen.88797*

and update the weights.

**3.2 Neural network control**

stand and implement [13].

**Figure 7.**

**219**

*Generalized learning structure.*

**Figure 6.** *Schematic of a single-layer feedforward neural network.*

*Web Tension and Speed Control in Roll-to-Roll Systems DOI: http://dx.doi.org/10.5772/intechopen.88797*

2.Controller design: The controller design could be done in the same way as in model-based control, such as neural generalized predictive control (GPC). Meanwhile, training method can also be applied for training the controller, like

In this section, we will introduce an application of one data-based control algorithm, i.e., neural network control, in web tension and speed control of roll-to-roll system.

Neural network is a universal approximator, which is capable of approximating any measurable function to any desired degree of accuracy. Hence, we could use neural network to learn the dynamics of plants. Here, we use the classical definition of neural network in Ref. [10]. Neural network consists of networks of artificial neurons in which the data flows through and their weights are changed to reduce the error in the learning process. A one-layer neural network is typically presented by a network diagram as in **Figure 6**. Derived features *Zm* are created from linear combinations of the inputs; then the output *Y* is modeled as a function of linear

*mX , m* <sup>¼</sup> <sup>1</sup>*,* …*, M*

*f <sup>k</sup>*ð Þ¼ *X gk*ð Þ *T , k* ¼ 1*,* …*, K*

1

*<sup>k</sup> Z, k* ¼ 1*,* …*, K*

<sup>1</sup> <sup>þ</sup> *<sup>e</sup>*�*<sup>v</sup>* (34)

(33)

*Zm* <sup>¼</sup> *σ α*0*<sup>m</sup>* <sup>þ</sup> *<sup>α</sup><sup>T</sup>*

*Tk* <sup>¼</sup> *<sup>β</sup>*0*<sup>k</sup>* <sup>þ</sup> *<sup>β</sup><sup>T</sup>*

The activation function *σ*ð Þ*v* is usually chosen to be the sigmoid:

*σ*ð Þ¼ *v*

neural network control.

*Control Theory in Engineering*

**3.1 Neural network**

combinations of the *Zm*:

**Figure 6.**

**218**

*Schematic of a single-layer feedforward neural network.*

*β* and *α* are additional bias feeding into every unit in the hidden and output layers, which captures the intercepts of *α*0*<sup>m</sup>* and *β*0*<sup>k</sup>* in model.

For output function *g*k(*T*), we usually choose the identity function *g*k(*T*) = T. The units in the middle of the network are called hidden units as the values *Zm*

are not observed directly. Generally, there can be more than one hidden layer. ANN encompasses various types of learning algorithms, the most popular of which include feedforward neural network and recurrent neural network.

In feedforward neural network, the data flow is one directional, which is from the input layer through hidden layers to the output layer without loop and feedback.

In recurrent neural network, some of the outputs are fed back to the input layer. One of the applications of recurrent neural network is time series prediction, which then can be applied in predictive control [11].

After a certain neural network is built, it needs to get training, which is to find a set of weights to minimize the error between the real outputs and predicted outputs. Backpropagation is a method used in neural networks to calculate a gradient that is need in the calculation of the desired weights based on mean squared error loss function [12]. This method has two steps: first data are fed into the network from input layer, and the activations for each layer of neurons are cascaded forward; then based on the loss, we calculate the gradient from the output layer to the input layer and update the weights.

#### **3.2 Neural network control**

In control system, in order to implement an effective algorithmic controller, we must have a thorough understanding of the plant that is to be controlled, which is very difficult in practice. A neural network controller performs a specific form of adaptive control, as it has nonlinear network and adaptable parameters. The learning process gradually tunes the weights so that the errors between the desired outputs and actual plant outputs are minimized. Here we introduce two learning structures to minimize the error signal, which are both simple and easy to understand and implement [13].

**Figure 7** shows the general learning method for training the neural network controller that does minimize the overall error. The training sequence is as follows. A plant input *u* is applied to the plant to get a corresponding *y*. The network is trained to reproduce *u* at its output from *y*. Then the trained neural network controller should be able to reproduce an appropriate input *u* based on the desired output *d*. This will certainly work if the desired output *d* is sufficiently close to one of the training data *y*. Thus, the success of this method highly relies on the ability of the neural network to learn to respond correctly to inputs that are not applied in the

**Figure 7.** *Generalized learning structure.*

#### *Control Theory in Engineering*

training phase. Notice that we can't select the training data in regions of interest as we don't know which plant inputs correspond to the desired outputs *d*. Thus, we typically try to uniformly populate the input space of the plant with training data so that the neural network can interpolate the intermediate region. In this case, the general learning method may have to learn a larger operational range than is necessary which is time consuming.

**Figure 8** shows the specialized learning method for training the neural network controller to operate properly in regions of interest only. The desired output *d* is used as the input to the network. The neural network is training to find the input *u* that derives the system output *y* to the desired *d*. The training is accomplished by using the error between the desired *d* and actual plant output to adjust the weights using gradient decent procedure; during each iteration the weights are adjusted to reduce the error. Notice that this procedure needs knowledge of the Jacobian of the plant. This method can be learned in the region of specialization and can be trained online. However, the general method must be trained offline. Feedforward neural networks are nondynamical systems and, therefore, input-output stable. Consequently, offline training presents no stability problem for the control system. Intuitively, we expect no stability problem in offline training, if we add penalty to the weights in loss function and the learning rate is slower enough.

#### **3.3 Neural network control application in web tension and speed control**

array (FPGA) in CompactRIO is used to receive the encoder signals and tension

A single-layer feedforward neural network with time-delayed structure is generated to learn the plant using generalized learning method. The structure is shown in **Figure 10**. The inputs to this network consist of external inputs, *u*(*t*) and *y*(*t* 1), and their corresponding delay nodes, *u*(*t* 1), …, *u*(*t du*) and *y*(*t* 2), …, *y*(*t dy*). The parameters *du* and *dy* represent the number of delay nodes. The advantage of this time-delayed structure is to help the neural network to learn the dynamics of the plant with time-variant parameters. As mentioned above, the disadvantage of generalized learning method is that we need to train the model in a large region. To overcome it, we demonstrate a simple method to find the possible region of interest. We first applied an untuned PID controller to the system. The input to the PID controller is the desired tension or speed. Then we recorded the outputs of the PID controller, which are the real inputs to the plant and the real outputs of the plant. These data are fed into the neural network. Here, we set the time delay *du* and *dy* to 8 and the size of hidden layers here is 10; the activation function is *tansig* for the hidden

The building and training of the neural network are both done in MATLAB. In

Ref. [14], the trained neural network is called in LabVIEW through MATLAB

signals with up to 40 MHz sampling rate.

*Web Tension and Speed Control in Roll-to-Roll Systems DOI: http://dx.doi.org/10.5772/intechopen.88797*

*Experimental setup of web handling system.*

**Figure 9.**

**Figure 10.**

**221**

layer and *purelin* for output layer.

*The structure of neural network for controller.*

**Figure 9** presents the prototype of our roll-to-roll system. Here, we only use the web handling part to test the neural network controller. The web handling part consists of one unwind roll, one rewind roll, one idler roll, and one tensionmeasuring roll. The web unwinds at unwinder and passes through the idler roll and tension-measuring roll and rewinds at rewind roll. A ring encoder and a readhead (RENISHAW MF100F and LM10) are mounted on the idler roll, which the diameter is 3 inches, to measure the linear web moving speed with a resolution of 1,310,720 CPR. The tension-measuring roll (FMS RMG1922) is used to measure the tension of the web with 1 kHz sampling rate and 0.25 N resolution. The unwind roll and rewind roll are driven by two servo motors (YASKAWA SIGMA-7). The rewind roll is used to control the web speed according to the measured speed from the encoder. The unwind roll is used to control the tension based on the feedback signals from the tension-measuring roll. The diameter of unwind roll and unwind roll are both 3.25 inches after installing the core. The web we used here is MYLAR type A film with 5 mil thickness and 4 inches width.

The data acquisition, A/D conversion, data processing, and control algorithm are all carried out using NI CompactRIO (NI CompactRIO 9049). The motor control is done by LabVIEW SoftMotion Module. The integrated field-programmable gate

**Figure 8.** *Specialized learning structure.*

*Web Tension and Speed Control in Roll-to-Roll Systems DOI: http://dx.doi.org/10.5772/intechopen.88797*

training phase. Notice that we can't select the training data in regions of interest as we don't know which plant inputs correspond to the desired outputs *d*. Thus, we typically try to uniformly populate the input space of the plant with training data so that the neural network can interpolate the intermediate region. In this case, the general learning method may have to learn a larger operational range than is neces-

**Figure 8** shows the specialized learning method for training the neural network controller to operate properly in regions of interest only. The desired output *d* is used as the input to the network. The neural network is training to find the input *u* that derives the system output *y* to the desired *d*. The training is accomplished by using the error between the desired *d* and actual plant output to adjust the weights using gradient decent procedure; during each iteration the weights are adjusted to reduce the error. Notice that this procedure needs knowledge of the Jacobian of the plant. This method can be learned in the region of specialization and can be trained online. However, the general method must be trained offline. Feedforward neural networks are nondynamical systems and, therefore, input-output stable. Consequently, offline training presents no stability problem for the control system. Intuitively, we expect no stability problem in offline training, if we add penalty to the

weights in loss function and the learning rate is slower enough.

type A film with 5 mil thickness and 4 inches width.

**Figure 8.**

**220**

*Specialized learning structure.*

**3.3 Neural network control application in web tension and speed control**

web handling part to test the neural network controller. The web handling part consists of one unwind roll, one rewind roll, one idler roll, and one tension-

measuring roll. The web unwinds at unwinder and passes through the idler roll and tension-measuring roll and rewinds at rewind roll. A ring encoder and a readhead (RENISHAW MF100F and LM10) are mounted on the idler roll, which the diameter is 3 inches, to measure the linear web moving speed with a resolution of

1,310,720 CPR. The tension-measuring roll (FMS RMG1922) is used to measure the tension of the web with 1 kHz sampling rate and 0.25 N resolution. The unwind roll and rewind roll are driven by two servo motors (YASKAWA SIGMA-7). The rewind roll is used to control the web speed according to the measured speed from the encoder. The unwind roll is used to control the tension based on the feedback signals from the tension-measuring roll. The diameter of unwind roll and unwind roll are both 3.25 inches after installing the core. The web we used here is MYLAR

The data acquisition, A/D conversion, data processing, and control algorithm are all carried out using NI CompactRIO (NI CompactRIO 9049). The motor control is done by LabVIEW SoftMotion Module. The integrated field-programmable gate

**Figure 9** presents the prototype of our roll-to-roll system. Here, we only use the

sary which is time consuming.

*Control Theory in Engineering*

#### **Figure 9.** *Experimental setup of web handling system.*

array (FPGA) in CompactRIO is used to receive the encoder signals and tension signals with up to 40 MHz sampling rate.

A single-layer feedforward neural network with time-delayed structure is generated to learn the plant using generalized learning method. The structure is shown in **Figure 10**. The inputs to this network consist of external inputs, *u*(*t*) and *y*(*t* 1), and their corresponding delay nodes, *u*(*t* 1), …, *u*(*t du*) and *y*(*t* 2), …, *y*(*t dy*). The parameters *du* and *dy* represent the number of delay nodes. The advantage of this time-delayed structure is to help the neural network to learn the dynamics of the plant with time-variant parameters. As mentioned above, the disadvantage of generalized learning method is that we need to train the model in a large region. To overcome it, we demonstrate a simple method to find the possible region of interest. We first applied an untuned PID controller to the system. The input to the PID controller is the desired tension or speed. Then we recorded the outputs of the PID controller, which are the real inputs to the plant and the real outputs of the plant. These data are fed into the neural network. Here, we set the time delay *du* and *dy* to 8 and the size of hidden layers here is 10; the activation function is *tansig* for the hidden layer and *purelin* for output layer.

The building and training of the neural network are both done in MATLAB. In Ref. [14], the trained neural network is called in LabVIEW through MATLAB

**Figure 10.** *The structure of neural network for controller.*

physical laws behind the dynamics of plant are clear; however, certain parameters of the model are difficult to identify, and some control algorithms are hard to realize in real life. For data-based control, the design of the controllers is simple and easy to implement, but we don't know what happens inside the controller. Consequently, it is worth to explore different control algorithms for a certain roll-to-roll system and

We also thank Mehdi Riza, Neel Prakashchandra, Mehta Jonathan Lombardi,

and Patrick Caviston for their help in the setup of the roll-to-roll machine.

The authors declared that they have no conflicts of interest to this work.

Department of Mechanical and Industrial Engineering, University of

© 2020 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/ by/3.0), which permits unrestricted use, distribution, and reproduction in any medium,

then choose the one with the best performance.

*Web Tension and Speed Control in Roll-to-Roll Systems DOI: http://dx.doi.org/10.5772/intechopen.88797*

**Acknowledgements**

**Conflict of interest**

**Author details**

**223**

Jingyang Yan and Xian Du\*

Massachusetts, Amherst, MA, USA

provided the original work is properly cited.

\*Address all correspondence to: xiandu@umass.edu

**Figure 11.**

*Results of neural network control of web tension and speed. The left figure shows the tension performance and the right figure shows the speed performance.*

scripts. However, we find that this implementation would consume a rather long time, which is about 100 ms in our application. Since this delay is caused by the communication between MATLAB program in personal computer and LabVIEW program in NI CompactRIO, if we put the neural network into the CompactRIO directly, the delay could be eliminated entirely. Therefore, we complied the MATLAB code into a shared objects file (.so) which can be integrated to CompactRIO directly. The resulted time to call the neural network is reduced to 20 μm, which is fast enough for real-time application.

**Figure 11** shows the results of using neural network to control web speed and tension. The reference speed and tension are set to 3 inch/second and 20 N, respectively. We have recorded the web tension and speed during the whole process. The maximum deviation (ΔT/T) of measured tension is 7 and 4% for speed (ΔV/V). The standard deviation is 0.2% for tension and 0.1% for speed. The tension requirement in roll-to-roll fabrication is error within 10%. Thus, the neural network controller meets the requirements. Moreover, using neural network to control web speed and tension saves lots of work and time in identifying the mathematical motel of roll-to-roll system. We should mention that, during the starting phase, the variation of speed and tension is both larger than the other phases. The possible reason is that the training data from PID controller doesn't cover the region of interest in this phase, so that the interpolation of neural network is not accurate. Our future work will include investigating this issue.

## **4. Conclusion**

Roll-to-roll fabrication is known as a cost-effective method in producing electronic devices on flexible substrates. However, improper tension and speed may cause manufacturing defects of the substrate, including web wrinkling, edge cracks, and web misalignment, which lead to damages and wastes of the products. Hence, the study and control of web handling systems are carried out for decades. In this chapter, we introduce the two set of control algorithms in web handing field, model-based control and data-based control. In model-based control, a mathematical model of web tension and speed is derived. Based on the model, a robust H controller is applied. In data-based model, neural network control is discussed in detail. Two major learning methods are compared. A real application of neural network control in web handling is realized in roll-to-roll system. Both control algorithms have advantages and disadvantages. For model-based control, the

*Web Tension and Speed Control in Roll-to-Roll Systems DOI: http://dx.doi.org/10.5772/intechopen.88797*

physical laws behind the dynamics of plant are clear; however, certain parameters of the model are difficult to identify, and some control algorithms are hard to realize in real life. For data-based control, the design of the controllers is simple and easy to implement, but we don't know what happens inside the controller. Consequently, it is worth to explore different control algorithms for a certain roll-to-roll system and then choose the one with the best performance.
