One of the key challenges in the processing of flexible media such as plastic films is to obtain rolls without any aspect defect: if one considers that a "defect" (i.e. wrinkling or buckling) is due to the fact that the stress generated within the roll is greater than some "plasticity threshold", then it is crucial to predict the internal stress. Several process parameters must be carefully mastered, among which the winding tension is very important. Offline optimization of the tension can a priori guarantee the production of perfect rolls, with respect to the internal stress. Nevertheless, the industrial control systems never generate perfect follow-up of the tension reference value, because the tension which is actually imposed (i.e. measured) exhibits oscillations due to the imperfections of the winding system, including geometrical irregularities of the rolls. The fluctuations about the tension nominal value induce variations in the stress within the roll as compared to the value which would result from an ideal control. As a consequence, it is judicious to change the tension reference value during the winding process, according to some criterion defined from the stress computed within the roll, and then to apply this new "up-dated" reference to the forthcoming web layers. This new way of online tension control requires new concepts such as "robust multivariable control", because distributed control may not work as well.The first step consists in computing the internal stress generated within a roll of a wound web (for instance plastic film). For that purpose, a modified non-linear model is developed in the spirit of Hakiel's. The web's winding process can be considered as a continuous accretion process, in the sense that the stress components at a given point are continuously modified by the upper superimposed layers. In addition, the residual air films which separate the web layers are taken into account in an indirect way through the radial Young's modulus of the roll which is a non-linear (polynomial) function of the compressive stress component. Several illustrative examples are presented and commented. Then, having prescribed an optimization criterion for the winding tension, an optimization algorithm based on the simplex principle is described. Finally, a new concept of online tension control, based on prediction-correction is proposed. Dividing the roll radius into several segments, the tension reference is computed and corrected for each range of roll radius values, by using the predictive model for the stress within the roll. The adjusted tension is reactualized step by step, following the optimization principle as described above and it will be considered as the new tension reference value for the coming layers. A comparison between offline and online tension controls clearly shows the improvement given by the new optimization technique (online)