Simulation of random events for adaptive control systems calibration

The paper deals with a mathematical model that simulates the random occurrence of events during cutting processes by milling. The evolution of certain parameters that typify the cutting processes depends on predictable and non-predictable variables. In this context, either the material hardness that varies in different sides of billet, or cutting depth, can act as non-predictable variables. In order to design a response in terms of cutting parameters to non-predictable variations of inputs, a simulation of such phenomena is very useful. A mathematical model that generates random events, both in terms of non-uniform frequency and intensity is here described. A virtual instrument built in LabVIEW generates (pseudo) random events based on a combination of random numbers, as the evolution of the simulated process to be much like a real one. Furthermore the user of virtual instrument can generate himself events at certain moments and of certain intensity. This can be a useful tool to study the algorithms of designing the response which should re-balance the process within adaptive control systems.


Introduction
Generally, the cutting processes are supposed to be deterministic ones, that is the input is predictable, and the output depends on input according to a certain function (e.g. the cutting torque is a function of feed-rate). In fact, not only the feed-rate influences the cutting torque, but other ones as well. Some of it, unfortunately, have a non-predictable evolution. Occurrence of random events, as variation of input parameters that are supposed to be constant, have a bad influence on cutting output, and they have to be balanced by acting on controllable inputs. A sample in these terms could be the variation of the hardness of the raw material, which may vary along the billet. Increasing the hardness causes an increasing cutting torque, which could be balanced by a decrease of feed-rate. Many other input may vary randomly, and their cumulated influence on the output should be attenuated.
Some steps before the experimental research is carried on, should be the theoretical one, and simulation. To design the correct reaction to a random event occurred during cutting process, a simulated evolution of input is needed to save resources.
In the scientific literature, some researches related to deterministic processes and random events are described. So, in [1] is presented a method so solve the industrial problems caused by random events in manufacturing systems. A study case has shown that random events may cause an increasing of production time of up to 20%. Applying the method to schedule production the authors cited propose, can lower the risk to increase production time to 0.5%. In [2] are described by means of simulation the possible effects of small probabilities (10 -6 ).
Random signals and their influence in opposition with deterministic signals in the electrical domain, in terms of collecting, transmitting and processing information are described in [3]. In [4] is stated that computer simulation is considered to be an experimental research that saves resources and can give even better output than the experimentation in the real system itself, if the computer model is appropriate. That encouraged the work to build a simulation model of the random events occurred during the cutting processes.

The concept
The random events are characterized by two main features: the intensity and the period of time they produce again. Both of them are non-predictable, and their combined evolution can describe the way a process supposed to be touched by random events progresses.
It is important to note that only when both the two mentioned parameters are irregular they can describe close to reality the random events that affect a process. Not any order of combinations of two random numbers can be considered a proper description of reality (a lifelike simulation). So, one can observe that several ways to randomize the events could be taken into account, as described in the next paragraphs. In this context, an event is that which causes a variation of the cutting torque measured during a cutting process.
To create models of events occurrence some virtual instruments (VIs) built in LabVIEW have been used. The engine of generating random events is the LabVIEW function Random that returns random values in the range of 0..1. Of course, these values are processed in an appropriate way to get the significance of intensity of event, or the period of time after it occurs. The type of processing can be selected by user of the VI, according to his needs and strategy of research.
The core of the algorithm to translate a random value returned by LabVIEW Random function in the interval [0..1] to a certain interval [min..Max], conserving the apportionment is formula (1).

Completely randomized events
In this case, pairs of random numbers are repeatedly generated, and each pair is considered to be an event. Of course, such an evolution is not lifelike, because either the events succeed too fast (Fig. 2a), or, if events occur at random periods of time, their intensity is almost always the same and the difference of intensity too big (Fig. 2b). To bring simulation closer to reality, some "control" should be applied to the progress of events. a b Fig. 2. Completely randomized events

Selected randomized events
Because of in a regular repeatedly generation of random number pairs is not proper to model a real succession of events (variation of cutting torque), a selection of such pairs should be performed. To do that, some restrictions must operate. In this way, not any pair of random numbers (N1, N2) will be considered an event (as shown in Fig. 2a), but only those that meet a selection criterion. For instance, the criterion can be either N1 or N2 should be smaller than a threshold value. Say that N2 controls the frequency of the events, that is the lower the threshold for N2 is, the smaller the probability to occur the event (Fig. 3  a -threshold=0.3, b -threshold=0.1). The value of the threshold is an input of the VI, so the user can keep under control the events generation, without corruption of it's random feature. a b Fig. 3 The evolution of the cutting torque shown in Fig 3 a, and b still does not fit to reality, because rarely the skipping of the cutting torque is so dramatic. In real conditions the variation of the torque is not so fast, that is the segments that represent cutting torque skipping in chart should be smaller. To bring simulation closer to reality, that is the skipping of the torque variation should have different values on one hand, and the bigger are the variations, the more rarely they occur, further processing of the randomly generated numbers must be performed. Now the randomly generated numbers do not represent the value of the cutting torque itself, but the variation of it, and it can be either positive or negative. The value of the variation is generated in an interval [-V .. V], and it is added to the previous value of the cutting torque. In Fig. 4 a, and b one can see simulations of cutting torque variations that are generated in these conditions. They display some consecutive increasing or decreasing which have different values, and the big skipping of cutting torque are rare, while the small ones occur oftener. a b Fig. 4. Selected randomized events. The big skipping are rare

Pseudo-randomized events
In practice there are situations when the measure monitored has a certain/expected way to evolve that might be affected by events (unexpected, random variations). To simulate such progress of a certain measure a more complex processing of the random numbers is needed. The events should be generated as deviations from the expected value of the cutting torque at a moment. That means a random number will be generated in a vicinity of the expected value. The vicinity may be smaller or larger, according to the user's needs. In fact, the random values are generated within a band around the theoretic values of the measure (in our discussion the cutting torque).
In Fig 5 a, and b, a random progress overlapped on a sine-shaped evolution is presented, for two widths of the band. a b Fig. 5 If further refine the algorithm of generating pseudo-randomized events, new shapes can be obtained. When the process is supposed to be stable, and deviations from the expected values are very rare, but significant, insulated events can be simulated, as shown in Fig. 6 a, and b. Note, that in these cases, on the general sine-shaped evolution, a vibrating noise have been overlapped, as well. a b Fig. 6. Pseudo-randomized events. Insulated events

Discussion on results of simulation
Combining in different ways two or more randomly generated numbers, a large variety of random events or sequence of random events can be generated. Many options are available for the user of this software tool, so he can describe in different ways the evolution of a process affected by random events. Several inputs, as the minimal and/or maximal time between two consecutive events, the minimal and/or maximal magnitude of event, the shape of predicted general evolution, and others, allow user to simulate events that occur at randomized periods of time, having random intensity, following a certain predicted shape, but altered by significant, insulated events, and many other. All of these keep the random occurrence of the events