Vous êtes sur la page 1sur 142

1

The Pennsylvania State University



The Graduate School

Department of Mechanical Engineering





THE EFFECT OF VARIABLE TIME DELAY ON

STABILITY IN ORTHOGONAL CUTTING






A Thesis in

Mechanical Engineering

by

Thomas Bernard O'Reilly





Submitted in Partial Fulfillment
of the Requirements
for the Degree of


Master of Science


MAY 1998
2
3
Chapter 1


OVERVIEW
1.1. Background
Many industries depend upon machining processes to make a wide variety of
components. For economic reasons manufacturers want to produce parts as rapidly as
possible while being sure that the parts meet the design specifications for dimensional
tolerances and surface finish. Machining processes involve a machine tool such as a
milling machine or a lathe, which holds a cutting tool and a workpiece and moves these
two parts relative to one another. Machining processes all involve removing material
from the workpiece so the goal of producing parts as quickly as possible is met by
maximizing the material removal rate, which can be done by increasing the size of the
chip being removed or by increasing the speed of the machine. In addition to this goal,
companies want to be able to operate their machines with minimal downtime for repairs
or tool changes.
Several factors stand in the way of these objectives. One problem is static
deformation of the machine tool structure due to cutting forces. Static deformation can
lead to form errors and result in systematic errors in the sizes of parts produced. This
problem can be avoided by designing machine tools to be very stiff. Machine tool
4
manufacturers typically try to produce tools with a static stiffness close to 1,000,000
lbs/in. Actual loop stiffnesses (the stiffness of the machine tool measured from the
cutting tool to the part of the workpiece being machined) tend to be lower, but this type
of error is generally well understood and can be dealt with in a number of ways.
More difficult to deal with are dynamic displacements of either the machine tool
or the workpiece. In addition to static deflections caused by mean cutting forces there is
always the possibility that there will be some vibration in the system. Such vibrations
can begin many different ways, for example the spindle may not be balanced perfectly or
the slideways may not be perfectly straight. Imperfections in the workpiece, such as
voids or inclusions can also start vibrations.
The cause of the vibrations is not critical. What is important is that oscillations
between the tool and workpiece will cause the tool to leave a wavy surface behind on the
workpiece. In most machining processes the tool will cut through at least a portion of the
surface it just created. If that surface has any waviness on it the thickness of the chip
being removed by the cutting tool will vary. This variation in chip load will cause
variations in the cutting and thrust forces exerted on the tool by the workpiece, causing
the tool to oscillate again.
In some cases the magnitude of the oscillations will decay with each pass of the
tool due to damping in the process or structure. In other cases, the amplitude of the
oscillations can grow with successive passes of the cutting tool. This is a type of
instability known as regenerative chatter, and it can lead to excessive tool wear and very
poor surface quality. Oscillations due to this phenomenon can even become large enough
5
to cause the tool to leave the workpiece during a cut. Severe chatter marks are difficult
to remove from a workpiece once they have been created due to the regenerative effect.
In some cases it can be more economical to scrap the part and begin again.
As a result, prediction of what conditions cause regenerative chatter is an
important topic in the machine tool industry. With more and more automated machining
centers being put into use the detection of chatter has also become an important topic as
there is a need for machine tools to automatically detect and avoid chatter by altering
process parameters such as spindle speed or depth of cut.
The stability limit is affected by many factors, such as depth of cut, tool
geometry, feed rate and the stiffness and damping of the machine tool itself. Also a
factor in chatter are the properties of the material being machined. Hard materials like
steel, titanium or ceramics are more prone to chatter than softer materials such as
aluminum. As a result, chatter is a major impediment to high-speed machining of
difficult materials.
1.2. Problem Statement
Models of regenerative chatter make many simplifications to the mechanics of the
cutting process and the dynamics of the system response. Although these models provide
useful clues about the behavior of a machine tool system they may neglect important
details about the characteristics of the system.
6
For example, the vast majority of cutting models, like the one in Figure 1.1, only
consider the effect of tool motion perpendicular to the surface of the workpiece. This is a
good approach to build a basic model as it is this motion that will have the greatest
impact on the profile of the surface left behind and on the force exerted on the cutting
tool. From an analytical standpoint this is also a very attractive approximation as it
results in a system with a known, constant delay period. Such a system is much easier to
analyze than one with a variable delay period.
k
x
c
x
m
x
N, Spindle speed
in RPM
Cutting force vector
x

Chip flow

Figure 1.1: Single degree-of-freedom turning model.

However, in a real machine relative motion of the tool will likely have some
component parallel to the surface of the workpiece. In addition the spindle speed can be
deliberately varied during a cutting process to improve stability. In either of these cases

7
the delay period will not be a constant length of time. It will in fact be dependent on the
magnitude of the tool displacement parallel to the surface, the displacement of the tool
perpendicular to the surface the last time it passed over that spot on the workpiece and
any variations in spindle speed. Some research has been performed in the area of
variable speed machining, but most work in this area is still done on a trial and error
basis. Research has also been performed on the significance of tool motion parallel to the
surface, but these works have continued to assume a constant delay period. As a result
the full significance of varying delay lengths is not well understood.
1.3. Research Objective
The goal of this research is to explore some of the effects of the variable delay
period on the stability of a machine tool system in regenerative chatter. Two causes of
variable delay length will be examined: off-axis tool motion and variable speed
machining. This will include the lower limit of stability and post instability behavior.
The problem will be approached from an analytical direction first. A model of the
system will be developed that accounts for tool motion along the workpiece and the
impact of this motion on the delay period. This system will be analyzed to determine its
stability.
Next a numerical model of the system will be created that will account more
completely for the nonlinearities induced by variation in the delay period. The benefit of
such a model is that it can be used to study the behavior of the system after the onset of
8
chatter. It can also be used to simulate a particular machining process and compare the
result to experimentally collected results.
Finally a machine tool fixture will be created that will allow experimental tests to
be conducted for a system whose dynamics are similar to those in the models. The tests
will be conducted on a Moore 3 Diamond Turning Machine. This is a very precise and
accurate machine tool base with an air bearing spindle. This reduces or eliminates some
sources of experimental error, such as error motion from the spindles or slides. The
experimental results will then be compared to the analytical and numerical models of the
process.
1.4. Literature Review
Many different chatter models consider various factors affecting the machining
process. Many of them consider the simplest machining process: orthogonal cutting. An
example of this process would be a plunge cut on a lathe using a cut-off tool. While the
simple geometric relationships involved make the problem relatively easy to examine
analytically this type of process represents only a small portion of turning operations.
True orthogonal cutting is rare in practice as most processes use an oblique geometry in
which the tool is at an angle to the cutting velocity. Processes such as milling have more
complicated geometric relationships than a plunge cut and are harder to model.
However, many processes can be modified into a form that approximates orthogonal
cutting and it is therefore a worthwhile starting point for any examination of regenerative
chatter.
9
Tlusty [19] presents a variety of machine tool chatter models, one of which
models the tool-workpiece system as a spring-mass-damper system as seen in Figure 1.1.
In this model only motion of the tool in the x-direction is considered. This is because
motion in this direction most directly affects the thickness of the chip and the surface left
behind. For this model the cutting force is modeled as being linearly proportional to the
area of the chip being removed. The steady state portion of the cutting force is neglected
as it will simply result in a static offset. Only the variable part of the cutting force is
considered:
F Cb x x
V
= (
0
) (1.1)
In this equation b is the width of the chip perpendicular to the x-direction and the
direction of the cutting velocity, C is the cutting stiffness or specific cutting energy,
which is an empirically derived constant relating the area of the uncut chip to the cutting,
x is the present displacement of the tool from the static load position and x
0
is the
displacement of the tool on the previous rotation of the workpiece. The spring-mass-
damper system will have an equation of motion of the form:
sin F kx x c x m = + + & & & (1.2)
Note that as steady state portion of the cutting force is neglected the stability limit is not
dependent on the thickness of the chip, only its width. The dependence of the cutting
force on the state of the system at a previous time results in what is referred to as a
retarded dynamic or delay differential equation.
Delay terms can be best dealt with in the frequency domain and most authors
approach the problem in this manner. The system can be represented using a block
10
diagram as seen in Figure 1.2. In this figure G() represents the frequency response
function of the machine tool structure in the x-direction, F
m
represents the mean cutting
force, F
v
the variable component of the cutting force and exp(j ) is the delay term, with
j = sqrt(-1) and being the phase difference between the wave the tool is leaving on the
surface and the one it left behind on the previous pass.
Cb
F
m
F
v
x
G(

)
x
-F
H
m
-
+
exp(j

)


Figure1.2: Block diagram of cutting forces for regenerative chatter [after Tlusty, 1985].

The block diagram can be analyzed as a feedback control problem. In [19] the
Nyquist criterion is used to determine the point at which the magnitude of the oscillations
would neither grow nor decay. This occurs when the open loop transfer function has a
value of -1. In this case that is given by:
CbG e
j
( )( )

1 =

1 (1.3)
Solving Equation 1.3 for the width of the cut at the stability limit gives:
11
b
CG e
j lim
( )
=


1
1

(1.4)
If it is assumed that C is purely real then G(1-exp(-j)) must be real. The minimum value
of b
lim
is given by:
b
C G
lim
min
min
Re( )
=
1
2
(1.5)
It can be shown that for a simple spring-mass-damper system the minimum value of b
lim
is
given by:
b
k
C
x x x
lim
min
( )
=
+ 2 1
(1.6)
This value is the asymptotic value of b for stable cutting. This actual limit is higher at
certain spindle speeds. This fact can be seen in a stability chart such as Figure 1.3. This
chart was produced for a system with k
x
= 5500000 N/m, m
x
= 0.48 kg, and
x
= 2.16%.
Each of the valleys or lobes on the stability chart corresponds to a different number of
chatter undualtions on the machined surface. The first lobe, numbered 1 in Figure 1.3,
corresponds to a single oscillation of the tool during each revolution of the workpiece,
leaving a single wave on the surface. The next lobe to the left corresponds to two
oscillations per revolution and so on. Cutting at width of cut above the lobed line would
be expected to be unstable and cutting below should be stable.
12
Stability chart
0
2
4
6
8
10
12
0 20000 40000 60000 80000
Spindle speed, RPM
S
t
a
i
b
l
i
t
y

l
i
m
i
t
,

m
m
Stability limit, mm
Asymptotic limit
1
2
3

Figure 1.3: Stability chart.

It can be seen from such a diagram that there are certain speeds at which material
removal rates can be increased greatly. Unfortunately, for most machine tools these
speeds are above the maximum speed of the machine. Examining the stability chart
further it can be seen that the peaks in the stability chart occur when the spindle speed is
equal to the system natural frequency (about 538 Hz or 32000 RPM in this system,)
divided by an integer, and that the low point of each lobe corresponds to a phase shift of
approximately -90 degrees between waves. These results occur because the frequency at
which a system vibrates during regenerative chatter is close to the dominant natural
frequency of the system and a phase shift of -90 degrees is the most favorable condition
for regeneration.

The preceding model accounted for the behavior of a system with a single mode
of vibration perpendicular to the workpiece surface. Real systems have multiple modes
13
of vibration which may be oriented in any direction. Tlusty also presents a method for
dealing with such situations. To deal with the differing orientations of modes of
vibration a directed transfer function is used. These are the projection of the system
transfer function in the x-direction. To account for systems with multiple modes of
vibration the stability is based upon the total x-direction transfer function of the system
which is the sum of the oriented transfer functions of the modes.
Ota et. al. [10] also deals with a two degree of freedom system. In this case the
workpiece is modeled as having two perpendicular modes of vibration, while the tool is
considered to be rigid. Although the tool is modeled as having two degrees of freedom,
the computation of chip thickness neglects the effect that tool motion parallel to the
surface could have on the actual delay period. Experimental measurements of cutting
stiffness are shown as are the effects of speed, depth of cut and width of cut on the
cutting force. Numerical simulations are also compared to results from the cutting tests
and found to match reasonably well.
Some researchers have considered some of the nonlinearities present in
machining systems. Nonlinearities can include nonlinear stiffness or damping in the
machine tool structure. Another significant nonlinearity is the specific cutting energy.
According to Rhorer and Lucca [11] this is not constant, but a function of the chip
thickness, with C increasing as chip thickness decreases. Other machining processes
have other types of nonlinearities. For example, in a milling process each flute of the
cutter spends only part of its time in contact with the workpiece. To model this a step
function must be used.
14
Kato et. al. [6] deals with nonlinear behavior related to the cutting force
coefficient. The authors discuss to two types of chatter. The first is a nonregenerative
form of chatter referred to as primary chatter. The second form of chatter is regenerative
chatter which is referred to as secondary chatter. This work considers a fixed cutting tool
cutting a flexible workpiece. This is a reasonable model, as for most machine tools the
structure of the tool itself will be very stiff, but the workpieces may be fairly long and
slender.
Kato et. al. [7] continues the work begun in [6] by developing a cutting force
model that accounts for dynamic effects such as variation in cutting speed, rake angle and
cutting depth due to workpiece motion. Experimental results are presented which are
claimed to verify the presence of the lag in cutting force described in [6].
Kato, et. al. [8] concludes the research from [6] and [7] by incorporating the
previous results into an analytical model that accounts for the variation of cutting force
due to many factors. The workpiece is modeled as a two degree-of-freedom system and
the cutting force is affected by many factors including dynamic variations in the chip
thickness, cutting velocity and rake angle. The stability of the system is determined and
plotted and the analytical model is compared to experimental results.
Hanna and Tobias [3] examined the effect of nonlinear stiffness and nonlinear
specific cutting energy. In this work the stiffness of the machine tool was modeled as a
cubic function of displacement and the specific cutting energy was modeled as a cubic
function of chip thickness. It was found that the system would be conditionally stable.
That is to say, if the chatter amplitude exceeded a certain threshold the system would
15
become unstable, but if the system were to vibrate at a lower level the oscillations
would decay as seen in Figure 1.4. The system still showed an unconditionally stable
region, but some of the lobes seen in Figure 1.3 were only conditionally stable. This
further complicates the process of using the stability lobes to increase material removal
rates.
Unstable
Stable
b
lim
Disturbance
amplitude

Figure 1.4: Conditional stability, [after Hanna and Tobias, 1974].


Another type of nonlinearity is process damping. This is a phenomenon in which
the damping of the system will increase at low cutting speeds. It is due to plowing and
friction generated as the flank face of the cutting tool rubs against the surface of the
workpiece at low speeds. The sources of this rubbing are explained well in Elbestawi,
et.al. [2]. A model is presented that accounts for material that is plowed along by the tool
rather than being cut off. The end result of process damping is that at low cutting speeds
the stability limit for the cutting process will increase. This is demonstrated in Stepan
[16]. An additional damping term is added to the structural damping in the system that is
16
inversely proportional to the spindle speed. Thus damping grows quite large at slow
speeds.
Stepan also considers the impact of a more thorough model of the cutting force.
As material is removed from the workpiece surface the cut chip will slide up the rake
face of the cutting tool. The friction depends on the length and thickness of the chip
sliding up the rake face. Stepan also presents a more thorough model of the cutting force
that accounts for the distribution of forces along the rake face of the tool. This model
results in two delay terms being present in the system. The first is the long delay
which is the length of time for one rotation of the workpiece. The second is the short
delay which represents the time required for a chip to slide up the rake face of the tool.
Equation 1.7 gives the variable portion of the cutting force as:
F C w x u d x u d
x
h
= ( )( ( ) ( ))
0 0
(1.7)
In this equation C is the conventional cutting force coefficient, h is the length of the chip
in contact with the tool, is the position along the chip, w
x
() is a shape function for the
force distribution, and d
0
is the diameter of the workpiece. To incorporate this force
model with the rest of the system a change of variable must be performed so that the
governing equation of motion is in terms of arc length u rather than time, where
and V is the cutting speed. The result of including both the long and short delays
in the model is that the stability of the system may improve slightly at both low and high
speeds.
u Vt =
Some researchers also examine methods to improve the stability of a machining
process. In addition to making the machine itself stiffer or more highly damped the
17
stability limit for regenerative chatter can be increased by continuously varying the
cutting speed. The improvement in stability was explained in Inamura and Sata [5]. This
paper uses an analytical model which uses function space theory and series solutions to
study the behavior of the system. The variable rotation period improves stability by
causing variations in the phase of the present and previous positions of the cutting tool.
The authors also predict quite a large increase in the stability limit, in some cases up to a
factor of 10.
Takemura et. al. [18] presents experimental results from variable speed turning on
a lathe. The workpiece was mounted on a flexible arbor so that the main compliance of
the system was in the workpiece itself rather than the tool. The authors used different
wave forms for the speed variation including triangular, and rectangular. It was found
that if the spindle speed was varied vibration amplitudes could be greatly reduced for
conditions that were unstable during a constant speed cut. The authors suggest that
variable speed machining is a practical and useful method to increase stability as it
requires no special hardware on most machine tools and no sensors. They also state that
due to the open loop nature of such a method it will not cause instabilities of its own.
This last fact is contradicted by results in Sexton et. al. [14]. This work presents a
stability model that shows that under some conditions stability can be decreased by the
varying speed. These cases seem to mostly involve the upper peak of stability lobes in
constant speed machining which can be clipped off in variable speed machining. Sexton
also explained some of the problems with previous analytical studies of variable speed
cutting, including [5], which predicted stability gains far larger than were seen in
18
experiments. The weakness of the previous work was that it was assumed that chatter
only occurred at the natural frequency of the machine tool system and system excitations
at other frequencies were neglected. According to Sexton a stability gain of between
50% and 100% can reasonably be obtained. Sexton and Stone [13] present results of
computer simulations using an analog computer as well as experimental results.
Another problem with the use of variable speed machining is explored in Sexton
and Stone [12]. During variable speed machining large transient vibrations can occur due
to the changing spindle speed even in a stable cut. These vibrations are usually not as
severe as they would be in an unstable cut but they make it difficult to obtain good
surface finish. As a result variable speed machining is better suited to rough cutting
rather than finish cutting.
A more recent work on the subject, Tsao et. al. [20] models a system with
variable speed using the spindle angular position as the independent variable, instead of
time. The result of this is a time varying system with a constant delay length. This
makes it much easier to analyze than a system with fixed coefficients and a variable delay
length. The authors claim that the methods they develop are suitable to many other types
of machining stability problems.
The origin and nature of machining instabilities have been studied by a variety of
authors and a variety of means. Each model considers the importance of different factors
that can impact the stability of the cutting process. Despite the work that has been done
there are still many areas that have not been studied adequately and the potential exists to
19
significantly improve machine performance with a more complete understanding of the
subject.
1.5. Research Plan
The first phase of this project is the development of a model of orthogonal cutting
using a two degree-of-freedom model. This differs from most existing models in that the
tool is allowed to move along the workpiece in the direction of the cutting velocity, as
shown in Figure 1.5. This part of the project involves a search of relevant literature to
obtain background knowledge about interactions between cutting tools and workpieces,
and existing models of chatter for different types of machining processes, such as end
milling. A model of chatter in orthogonal cutting with two degrees-of-freedom is then
developed using a linear system model and a simple linear model of the cutting force.
The models stability is analyzed using the tau-decomposition method and MATLAB
programs were written to produce stability charts.
Next a numerical model of the process is developed. This model simulates the
cutting process using an RK45 time domain integration scheme. This program can also
create stability charts based upon the simulated results.
20
k
x
c
x
m
x
, m
y
N, Spindle speed
in RPM
Cutting force vector
k
y
c
y
y
x

Chip flow

Figure 1.5: Two degree-of-freedom system model.

The next phase of this project consists of the design and construction of a test
flexure to replicate the two degree-of-freedom model. This was used to perform cutting
tests with a Moore 3 Diamond Turning Machine. The flexure has about 10% of the
stiffness of the machine tool in the directions normal and tangential to the workpiece
surface. The motivation for designing the flexure with deliberately high compliance is so
that the critical loop dynamics will be well understood. By making the compliance high,
the majority of the motion of the cutter will be due to the simple and well known
dynamics of the flexure, rather than the less well known dynamics of the machine tool
itself. This also lowers the stability limit so that instabilities can be studied on the

21
diamond turning machines used for the experimental testing. The results of cutting
tests are compared to the numerical simulation to gauge its accuracy.
The numerical simulations is used to study variable speed machining.
Experimental results are compared to the simulation. The effect of different spindle
oscillation frequencies and amplitudes on the stability of a machining process are
examined using the simulation to predict the gain in stability under different conditions.
Results are also compared to experimental data from the literature.
22

Chapter 2


ANALYTICAL TWO DEGREE OF FREEDOM MODEL
2.1. Derivation of Equation of Motion

To arrive at a model that can be handled with analytical methods some
simplifications were made. First it is assumed that the cutting force is proportional to the
area of the chip, and that it acts at a constant angle to the workpiece surface. The
stiffness and damping of the machine tool are assumed to be linear. As a result the
steady deflection caused by the mean cutting force can be neglected. The resulting
equations of motion are:
x-direction:
F x k x c x m
x x x
= + + & & & (2.1)

where: = sin

y-direction:
m y c y k y F
y y y
&& & + + = (2.2)

where: = cos

23
Cutting force approximation:
)) ( ) ( ( = t x t x bC F (2.3)

Where b is the width of the cut, C is a material dependent cutting stiffness term, and is
the length of time since the tool last passed over this point on the workpiece. For the
single degree-of-freedom case this amount is fixed and is given by:
= 60 / N where N is the spindle speed in RPM.
2.1.1. Conversion of Equation of Motion to Arc Length Rather Than Time
For the two degree-of-freedom model the magnitude of the time delay is not
constant due to y-direction displacement. Because constant delay terms are much easier
to deal with, the equations of motions are converted to a form in terms of arc length, u,
defined as follows:
u Vt y = +
where V is the mean linear speed of the tool relative to the workpiece given by:
V dN = / 60 where d is the workpiece diameter
To convert the equations we need the following:
du
dt
V y V = + &
This should be a reasonable approximation since V is much greater than & y for typical
situations. For example, consider a tool with a y-direction natural frequency of 300 Hz, a
24
100 mm workpiece diameter and a spindle speed of 600 RPM. In this situation, V will
be given by Equation 2.4:
V dN = = / . * 60 01 600 m* RPM/ (60 sec / min) = 3.14 m/ sec (2.4)

Assuming an amplitude of 10 microns (which would be reasonable during chatter
oscillations) and that the tool moves in a sinusoidal manner & y will be given by Equation
2.5:
& . y f = 2 10 0 0189 microns = m/ sec (2.5)

The equations of motion are written as:
x-direction:
m
du
dt
x c
du
dt
x k x bC x u x u d
x x x
|
\

|
.
| + + =
2
' ' ' ( ( ) ( ))
(2.6)

y-direction:
m
du
dt
y c
du
dt
y k y bC x u x u d
y y y
|
\

|
.
| + + =
2
' ' ' ( ( ) ( ))
(2.7)

Terms such as x , indicate derivatives with respect to arc length rather than time. The
delay term is now the constant length d rather than a varying length of time.
y
25
2.1.2. Matrix Form and Characteristic Equation
The equations are then simplified somewhat by dividing the x-direction equation through
by m
x
(du/dt)
2
= m
x
V
2
, and the y-direction equation by m
y
(du/dt)
2
= m
y
V
2
, and defining
the following terms:
~
c
c
m V
x
x
x
=
~
k
k
m V
x
x
x
=
2

~
F
bC
m V
x
x
=

2

~
c
c
m V
y
y
y
=
~
k
k
m V
y
y
y
=
2

~
F
bC
m V
y
y
=

2

Using these new symbols the equation of motion becomes:
x-direction:

x c x k x F x u x u d
x x x
' '
~
'
~ ~
( ( ) ( )) + + =
(2.8)

y-direction:
y c y k y F x u x u d
y y y
' '
~
'
~ ~
( ( ) ( )) + + =
(2.9)

The equations of motion can be written in matrix form as:
1 0
0 1
0
0
0 0
0
0
0


`
)
+


`
)
+

(
(


`
)
+

(
(


`
)
=


`
)
x
y
c
c
x
y
k F
F k
x
y
F
F
x u d
y u d
x
y
x x
y y
x
y
' '
' '
~
~
'
'
~ ~
~ ~
~
~
( )
( )


(2.10)

Taking the Laplace Transform and determinant to find the characteristic equation yields:
( )
( ) ( )
( ) ( ) ( ) ( )
D c c k c c k F
c k c k F k k F c k F e
y x y x y x x
x y y x x y x x y y x
d



= + + + + +
+ + + + + +

4 3 2
2
~ ~
~
~ ~
~ ~
~
~
~
~ ~ ~ ~ ~
~
~ ~

(2.11)

26
2.1.3. -Decomposition Form
For the stability testing method used (presented in [4] and [9],) it is necessary to rewrite
the characteristic equation as follows:
Define the following terms:
a F
x 4
1 = /
~

( )
a c c
y x 3
= +
~ ~
/ F
x
~
( ) ( )
a k c c k F
y x y x x 2
= + + F
x
~
~ ~
~ ~
/
~

( ) ( )
a c k c k F F
x y y x x x 1
= +
~
~
~
~ ~
/
~
( ) ( )
a k k F
y x x 0
= F
x
~ ~ ~
/
~

Combining these terms with with (2.11) gives:
( )
( )
D F a a a a a c k e
x y y
d


/
~
~
~
= + + + + + + +

4
4
3
3
2
2
1 0
2

(2.12)

Setting D equal to 0, this becomes:
e
c k
a a a a
d
y y



=
+ +
+ + + +
(
a
~
~
)
2
4
4
3
3
2
2
1 0

(2.13)

Equation (2.13) is then separated into two parts:
w e
d
1
=

(2.14)

w
c k
a a a a
y y
2
2
4
4
3
3
2
2
1 0
=
+ +
+ + + +

a
~
~

(2.15)

Letting = i the roots of D will occur when |w
2
(i)| = 1, therefore:
( )
( ) ( )
1
2
4
4
2
2
0 1 3
3
=
+
+ +
~
~
k ic
a a a i a a
y y



(2.16)

(2.16) is squared resulting in the following:
( ) ( ) ( )
a a a a a k c
y y 4
4
2
2
0
2
1 3
3
2
2
2
2 2
+ + = +
~
~

(2.17)

27
Expanding this and collecting terms yields:
( ) ( )
( )
a a a a a a a a a
a a a k c a k
y y y
4
2 8
4 2 3
2 6
4 0 2
2
3 1
4
2 0 1
2 2 2
0
2 2
2 2 2
2 2 0

+ + + +
+ + + + =
~
~
~
1

(2.18)

The roots of this equation must now be found. Since (2.16) was squared to produce
(2.18), the number of roots found will be twice the number that are actually present in the
system. As a result, only the positive real roots of the equation need to be examined.
Each positive real root y
j
is substituted back into (2.15) to find w
2
(iy
j
). The angle of the
resulting number is computed as follows:
( ) ( )

j
j
j
w iy
w iy
=

tan
( ( ))
1
2
2

(2.19)

The angle is then used to generate a sequence of delay values, , where
( )

jk j j
k y = + 2 /
(2.20)

where k = 0,1,2,3...

One of these sequences is produced for each root. The sequences from all the roots are
combined and sorted in increasing order. This sequence represents intervals on the time
delay axis.
It is now necessary to determine whether the curve w
2
enters or leaves the unit
circle at each root y
j
. This is shown in Figure 2.1. This is done by evaluating the
magnitude of w
2
at values slightly larger and smaller than the roots. Every time the curve
enters the unit circle the number of positive real roots of the original characteristic
equation decreases by two. Every time the curve leaves the circle the number of roots
28
increases by two. The system is only stable in intervals where the number of these
roots is zero.
-1.25
-0.75
-0.25
0.25
0.75
1.25
-1.25 -0.75 -0.25 0.25 0.75 1.25
Real
I
m
a
g
i
n
a
r
y
w
1
w
2
y
j
y
j

Figure 2.1: Plot of w
1
, the unit circle and roots in the complex plane.

Each value in the sequence corresponds to a root of Equation 2.16 and therefore
to a crossing of the unit circle. To determine the stability of the system in each interval
of the sequence each crossing is examined in order. As each is checked the number of
positive real roots is tracked. Every time the value represents crossing into the circle
the number of roots increases by two. Each time the crossing represents the number of
roots decreases by two.
29
In this particular problem, the value of the delay is fixed and known so all that
remains is to check the stability of the interval in which the delay lies. This gives the
stability of a single point in the parameter space of the problem.
2.2. Stability Chart Generation
To generate more useful information a program was written to find the limiting
width of cut b for a given range of spindle speeds. This was used to produce Figure 2.2.
On this plot the straight horizontal line is based on the results of [19], which includes the
derivation of the stability limit for a single degree-of-freedom model. The lobed line was
produced by the two degree-of-freedom model described above.
Two degree-of-freedom stability chart
5000 10000 15000 20000
Spindle speed, RPM
0
1
2
3
4
5
6
0
S
t
a
b
i
l
i
t
y

l
i
m
i
t
,

m
m
Stability limit
Asymptotic limit

Figure 2.2: Two degree-of-freedom stability chart.
30
This method has been used to examine the stability of both one and two degree-
of-freedom systems. In every case it was found that the stability of the two degree-of-
freedom model matches the stability of the single degree-of-freedom system.
2.3. Analytical Model Conclusions
Based upon the results of the analytical model of chatter in a two degree of
freedom system the y-direction motion has no effect on the stability limit in orthogonal
cutting. However, this model has several limitations. Most important are some of the
simplifications needed to arrive at a manageable system model. It is possible that these
could affect the results.
In addition this technique was only able to predict the limit of chatter and say
nothing about post instability behavior. To examine this behavior after chatter a more
thorough model that can better deal with the nonlinear nature of the system is required.
Such a model would be very difficult to derive and work with analytically. As a result a
numerical model of the process was developed.
31
Chapter 3


NUMERICAL CUTTING MODEL
3.1. Characteristics of Numerical Model
To further explore the nature of the two degree-of-freedom cutting model a
numerical simulation of the process was developed. This simulation is able to overcome
some of the weaknesses of the analytical model, most importantly the requirement that
the system be reduced to a linear approximation of the true system. This also overcomes
the restriction that the delay length be constant. The simulation computes the chip
thickness at each time step based upon the present and previous positions of the cutting
tool. By computing chip thickness in this way the program eliminates the need to make
assumptions about the length of the delay period.
As a result, the simulation is able to predict the time domain response of the
system described by Equations 2.1, 2.2 and 2.3 without the need for the simplifications
and modifications introduced to obtain an analytical solution. This is the system pictured
in Figure 1.5.
The numerical integration scheme employed is an adaptive Runge-Kutta 45
method. Runge-Kutta methods compute the state of a system, in this case the velocity
and displacement of the cutting tool, at a series of discrete time steps. The state of the
32
system at any time step is based upon the state of the system at the previous time step,
as well as any forcing functions. In this system the forcing function is due to the
regenerative effect and as a result the state at each time step can depend upon the position
of the tool one or more workpiece rotations in the past.
The program computes the next state using both a fourth and fifth order
integration technique. By comparing the two results the program is able to estimate the
error in the fifth order integration. Upper and lower limits on the estimated error are set
in the program. If the error exceeds the maximum allowable error the time step is
reduced and the step is repeated. If the error is less than the minimum allowable error the
size of the time step is increased for the subsequent time step.
By using an adaptive scheme the program can automatically optimize the size of
each time step. As a result the program can determine the response for a system using
fewer time steps than a fixed step size simulation, speeding up its execution.
At each time step the position of the tool relative to the workpiece is stored in
memory. If the program is so configured it will write the time, position, velocity and
acceleration of the tool, chip thickness and the position of the tool relative to the
workpiece to a file for later use. The program can also be configured to only write to the
data file at certain intervals, for instance every ten time steps. This can greatly reduce the
size of the resulting file and increase simulation speed. Storage space for history data is
dynamically allocated as the program runs, making it possible to optimize the program to
run on computers with different amounts of memory by limiting the number of time steps
the program can perform.
33
For ease of use and to help reduce the occurrence of errors in the setup of the
program, a configuration file is read when the program is started. An example of such a
file is seen in the appendix. This file lets the user configure many parameters related to
the execution of the program without the need to recompile the source code each time a
change is made. Most importantly the configuration file contains parameters of the
system being simulated. These include the stiffness, effective mass and damping ratio of
the tool in each direction. Workpiece parameters can also be set in the file, including the
diameter, rotational speed and specific cutting energy. The feed rate in meters/revolution
is also set in the configuration file. For this particular process geometry this will equal
the average chip thickness.
Simulation parameters are configured in the file as well. These include the
maximum and minimum allowable error tolerance, the amount by which to increase and
decrease the time step by if the error tolerance is not met, and the maximum and
minimum time step size. The total length of the simulation and the maximum number of
time steps can also be set in the configuration file.
The program can operate in a number of different modes and the configuration
file can be used to set the desired mode. The first mode is time domain simulation. In
this mode the program simulates the behavior of the cutting tool for a desired length of
time under the conditions specified in the configuration file. The state of the system at
each time step is saved for later use. The program will run until either the desired end
time is reached or the program has performed the maximum number of time steps
specified in the configuration file.
34
A variety of options can be used when operating in this or any mode. In
addition to simulating conventional machining systems the system can simulate systems
with continuously varying spindle speeds. Such systems can include conventional lathes
in which the feed rate changes with the spindle speed resulting in constant chip
thicknesses, and machine tools such as diamond turning machines in which the feed rate
is typically independent of the spindle speed. In the second type of system the thickness
of the chip being removed will vary with the spindle speed.
To simplify the process of analyzing and comparing the results of several
simulations under different conditions a mode was created in which the program saves
not individual time step data but the peak level for each system state (position, velocity
and acceleration) during each revolution of the workpiece. The use of such chatter
envelopes results in much smaller data files that are easier to plot and examine. An
example of such a plot and its relationship to the full time history is shown in Figure 3.1.
In addition to performing time domain simulations of orthogonal cutting the
simulation can produce stability charts by examining the growth or decay of oscillations
in the simulated system at a variety of cutting speeds and widths of cut. The program
determines whether the oscillations grow or decay for a specified number of workpiece
rotations. If they are found to decay a set number of times the system is considered to be
stable. If they increase a certain number of times or if the cutting tool leaves the
workpiece, the system is considered to be unstable.
35
Comparison of envelope and time domain
-0.4
-0.3
-0.2
-0.1
0
0.1
0.2
0.3
0.4
0 0.5 1 1.5
Time, s
X
-
d
i
r
e
c
t
i
o
n

a
c
c
e
l
r
a
t
i
o
n
,

m
/
s
2
2
Full time domain
results
Vibration envelope

Figure 3.1: Comparison of envelope and full time domain results in an unstable cut.
To produce a full stability chart the program begins by examining the stability of
the system at two widths of cut specified in the setup file. If the upper limit of this range
is found to be unstable and the lower range is found to be stable the program then the
limit of stability limit is known to be located within that range. It then checks the
stability of the system at the middle of the range. If this is found to be stable the stability
limit lies between the upper end of the original range and the middle. This process of
bisecting the range is repeated until the stability limit has been bracketed within a
specified tolerance. This process is then repeated for each spindle speed in the range of
interest. Stability charts can be produced for both constant and variable speed machining
processes.
36
3.2. Results of Numerical Simulation
The simulation has been used to predict the behavior of a variety of machine tool
systems with a variety of parameters. These systems have included single degree of
freedom systems, systems with identical or similar characteristics in the two directions,
and systems with widely differing properties in the x and y directions. Some of the
cutting processes have been stable and some unstable.
3.2.1. Simulation of Stable Process
The simulation was used to predict the behavior of a process with the following
characteristics:
x-direction stiffness, MN/m 5.5
x-direction natural freq., Hz 538
x-direction damping ratio 2.16%
y-direction stiffness, MN/m 3.3
y-direction natural freq., Hz 332
y-direction damping ratio 1.3%
Workpiece specific cutting stiffness, GN/m
2
1.0
Workpiece diameter, m 0.050
Spindle speed, RPM 600
Depth of cut, m/revolution 0.00001
Width of cut, m 0.0005
Cutting force angle, , degrees 20

Table 3.1: Stable process simulation parameters.

Based upon the system properties given here it would be expected that the static
tool deflection in the x and y directions would be:
x-direction:
37

m
K
Cbt
x
7
6
9
0
10 * 11 . 3
10 * 5 . 5
) 20 sin( * 00001 . 0 * 0005 . 0 * 10 * 1 sin

=


(3.5)

y-direction:

m
K
Cbt
y
6
6
9
0
10 * 42 . 1
10 * 3 . 3
) 20 cos( * 00001 . 0 * 0005 . 0 * 10 * 1 sin

=


(3.6)

These predictions were confirmed by the results of the simulation plotted in Figures 3.2
and 3.3. It can be seen that as the tool entered the workpiece it deflected the expected
amount and the chip thickness quickly approached the specified depth of cut, as seen in
Figure 3.4. The oscillations in the tool displacement are too small to be seen compared to
the steady state offset, but the plot of x-direction acceleration in Figure 3.5 shows that
there are some oscillations present and that they quickly decay.
3.2.2. Simulation of Unstable Cutting Process
The damping ratios of the stable system described in the previous section were
reduced to 0.9% in the x-direction and 0.13% in the y-direction. The resulting cutting
process was unstable. In most unstable systems the amplitude of oscillations will grow
until the tool leaves the workpiece resulting in an interrupted cut as is the case with this
particular system.
This can be seen in the plots of the system response in Figures 3.6-3.11. Initially
the cutting tool is continuously in contact with the workpiece. At this point the
38
Stable cutting process
-0.35
-0.3
-0.25
-0.2
-0.15
-0.1
-0.05
0
0 0.5 1 1.5 2
Time, s
X
-
d
i
r
e
c
t
i
o
n

d
i
s
p
l
a
c
e
m
e
n
t
,

m
Workpiece rotation period

Figure 3.2: Stable cutting process x-displacement.


Stable cutting process
-1.6
-1.4
-1.2
-1
-0.8
-0.6
-0.4
-0.2
0
0 0.5 1 1.5 2
Time, s
Y
-
d
i
r
e
c
t
i
o
n

d
i
s
p
l
a
c
e
m
e
n
t
,

m
Workpiece rotation period

Figure 3.3: Stable cutting process y-displacement.
39
Stable cutting process
0
2
4
6
8
10
12
0 0.5 1 1.5 2
Time, s
C
h
i
p

t
h
i
c
k
n
e
s
s
,

m
Workpiece rotation period

Figure 3.4: Stable cutting process chip thickness.


Stable cutting process
-0.01
-0.008
-0.006
-0.004
-0.002
0
0.002
0.004
0.006
0.008
0 0.5 1 1.5
Time, s
X
d
i
r
e
c
t
i
o
n

a
c
c
e
l
e
r
a
t
i
o
n
,

m
/
s
2
2
Workpiece rotation period

Figure 3.5: Stable cutting process x-direction acceleration.
40
oscillation levels grow with each revolution of the workpiece. Figure 3.12 is the
spectrum of the chip thickness before the cut has become interrupted. Recall that the
cutting force is modeled as proportional to the chip thickness. Therefore the distribution
of the cutting force spectrum will be the same as the spectrum of the chip thickness. In
Figure 3.12 a single peak can be seen in the spectrum at a frequency slightly above the x-
direction frequency of the system. The shift in the frequency is due to the increase in
cutting force with increasing chip thickness. This effect results in an added stiffness term
in the system, raising the natural frequency slightly.
Roughly 2.5 seconds after the start of the cut the amplitude of the cutting tools
motion grows so large that the tool begins to leave the surface of the workpiece, and the
chip thickness periodically drops to zero. As the tool is periodically out of the workpiece
the surface left by the tool is not a continuous wave form, and the time delay period
between the current position of the tool and the surface it is cutting may span more than
one workpiece revolution. In addition there is no force at all on the tool when it is out of
the workpiece and at these times the tool vibrates freely. The result is that the
regenerative effect is disrupted, and the amplitude of the oscillations levels out.
The spectrum of the chip thickness after the tool has begun leaving the workpiece
is seen in Figure 3.13. It can be seen that once the tool begins to leave the workpiece the
spectrum no longer has a single large peak. Instead the spectral content is spread out
across a wider range of frequencies.
In addition the spectrum of the x and y-direction displacements after the cut has
become interrupted are shown in Figures 3.14 and 3.15. The x-direction spectrum
41
Unstable cutting simulation
-15
-10
-5
0
5
10
15
0 1 2 3 4 5 6
Time, s
X
-
d
i
r
e
c
t
i
o
n

d
i
s
p
l
a
c
e
m
e
n
t
,

m
Workpiece rotation period

Figure 3.6: Unstable cutting process x-direction displacement.


Unstable cutting simulation
-1.2
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0 0.5 1 1.5
Time, s
X
-
d
i
r
e
c
t
i
o
n

d
i
s
p
l
a
c
e
m
e
n
t
,

m
i
c
r
o
n
2
Workpiece rotation period

Figure 3.7: Unstable cutting process x-direction displacement, early growth.
42
Unstable cutting simulation
-3.5
-3
-2.5
-2
-1.5
-1
-0.5
0
0.5
0 1 2 3 4 5 6
Time, s
Y
-
d
i
r
e
c
t
i
o
n

d
i
s
p
l
a
c
e
m
e
n
t
,

m
Workpiece rotation period

Figure 3.8: Unstable cutting process y-direction displacement.


Unstable cutting simulation
-1.55
-1.5
-1.45
-1.4
-1.35
-1.3
-1.25
-1.2
0 0.5 1 1.5
Time, s
Y
-
d
i
r
e
c
t
i
o
n

d
i
s
p
l
a
c
e
m
e
n
t
,

m
i
c
r
o
n
2
Workpiece rotation period

Figure 3.9: Unstable cutting process y-direction displacement, early growth.
43
Unstable cutting simulation
0
5
10
15
20
25
30
0 1 2 3 4 5 6
Time, s
C
h
i
p

t
h
i
c
k
n
e
s
s
,

m
Workpiece rotation period

Figure 3.10: Unstable cutting process chip thickness.


Unstable cutting simulation
-3.5
-3
-2.5
-2
-1.5
-1
-0.5
0
0.5
-15 -10 -5 0 5 10 15
X-direction displacement, m
Y
-
d
i
r
e
c
t
i
o
n

d
i
s
p
l
a
c
e
m
e
n
t
,

m

Figure 3.11: Unstable cutting process tool path.
44
Unstable process, cut not yet interrupted
1.E-14
1.E-13
1.E-12
1.E-11
1.E-10
1.E-09
1.E-08
1.E-07
1.E-06
1.E-05
0 200 400 600 800 1000
Frequency, Hz
C
h
i
p

t
h
i
c
k
n
e
s
s

s
p
e
c
t
r
u
m
,

m

Figure 3.12: Unstable cutting process chip thickness spectrum.


Unstable cutting process, steady state
1.E-11
1.E-10
1.E-09
1.E-08
1.E-07
1.E-06
1.E-05
0 200 400 600 800 1000
Frequency, Hz
C
h
i
p

t
h
i
c
k
n
e
s
s

s
p
e
c
t
r
u
m
,

m

Figure 3.13: Interrupted cutting process chip thickness spectrum.
45
Unstable cutting process, steady state
1.E-14
1.E-13
1.E-12
1.E-11
1.E-10
1.E-09
1.E-08
1.E-07
1.E-06
1.E-05
0 200 400 600 800 1000
Frequency, Hz
X
-
d
i
r
e
c
t
i
o
n

m
o
t
i
o
n
,

m

Figure 3.14: Interrupted cutting process x-direction displacement spectrum.


Unstable cutting process, steady state
1.E-13
1.E-12
1.E-11
1.E-10
1.E-09
1.E-08
1.E-07
1.E-06
0 200 400 600 800 1000
Frequency, Hz
Y
-
d
i
r
e
c
t
i
o
n

d
i
s
p
l
a
c
e
m
e
n
t

s
p
e
c
t
r
u
m
,

m

Figure 3.15: Interrupted cutting process y-direction displacement spectrum.
46
Workpiece surface profile
Workpiece surf ace
Current tool pass
Previous tool pass
Two tool passes ago

Figure 3.16: Workpiece surface profile, unstable cutting process.

47
contains a single dominant peak near the natural frequency of the system. This is the
dominant frequency of the chip thickness and the cutting force and also close to the
natural frequency of the x-direction mode. The y-direction spectrum has two dominant
frequencies. The higher frequency matches the x-direction frequency and is due to the
cutting force. The second lower frequency is the y-direction frequency and is present due
to the periods of free vibration when the tool is out of the workpiece.
The profile of the workpiece at the end of the cut is shown in Figure 3.16. To
make it easier to see the shape, surface variations from the average diameter have been
exaggerated by a factor of 400. The workpiece in the figure is rotating clockwise. The
plot also shows portions of the cutting tool path relative to the workpiece on previous
workpiece rotations, demonstrating how the surface depends on tool positions during
multiple workpiece revolutions.
3.2.3. Simulation of Unstable Non-Interrupted Cutting Process
Oscillations in the unstable system discussed in the previous section grew until
the cutting tool began to leave the workpiece. For certain unstable systems it was found
that oscillation levels would reach a steady state without the cutting tool leaving the
workpiece surface. This is a result of motion in the y-direction.
This effect was seen primarily in systems with similar x and y direction modal
frequencies. A practical example of such a system would be a boring bar used to remove
material from the inside of a cylinder. The system in this particular example had the
properties in Table 3.2.
48
From the plots of the tool response in Figures 3.17-3.20 it can be seen that the
amplitude of the tool motion reaches a steady state level without the cutting tool ever
leaving the surface of the workpiece. The spectrum of the chip thickness early in the
simulation is shown in Figure 3.21. This spectrum is similar to the spectrum in Figure
3.12 in that it has a single dominant frequency. Figure 3.22 is the spectrum later in the
cut, once the vibration levels have stopped growing. It is similar to the spectrum from
the interrupted cut in Figure 3.13 in that the spectral content has been spread out across a
range of frequencies. In the case of interrupted cutting the regenerative effect was
disrupted by the tool leaving the cut. In this case the regenerative effect is disrupted by
the motion of the tool in the y-direction which causes variations in the delay period.
x-direction stiffness, MN/m 5.0
x-direction natural freq., Hz 503
x-direction damping ratio 1.7%
y-direction stiffness, MN/m 5.0
y-direction natural freq., Hz 503
y-direction damping ratio 1.7%
Workpiece specific cutting stiffness, GN/m
2
1.0
Workpiece diameter, m 0.035
Spindle speed, RPM 400
Depth of cut, m/revolution 0.0001
Width of cut, m 0.0007
Cutting force angle, , degrees 20

Table 3.2: Unstable noninterrupted process simulation parameters.

49
Unstable noninterrupted cutting process
-100
-80
-60
-40
-20
0
20
40
60
80
0 5 10 15 20
Time, s
X
-
d
i
r
e
c
t
i
o
n

d
i
s
p
l
a
c
e
m
e
n
t
,

m
Workpiece rotation period

Figure 3.17: Unstable noninterrupted cutting process x-displacement.


Unstable noninterrupted cutting process
-250
-200
-150
-100
-50
0
50
100
150
200
0 5 10 15 20
Time, s
Y
-
d
i
r
e
c
t
i
o
n

d
i
s
p
l
a
c
e
m
e
n
t
,

m
Workpiece rotation period

Figure 3.18: Unstable noninterrupted cutting process y-displacement.
50
Unstable noninterrupted cutting process
0
50
100
150
200
250
0 5 10 15 20
Time, s
C
h
i
p

t
h
i
c
k
n
e
s
s
,

m
Workpiece rotation period

Figure 3.19: Unstable noninterrupted cutting process chip thickness.


Unstable noninterrupted cutting process
-200
-150
-100
-50
0
50
100
150
200
-80 -60 -40 -20 0 20 40 60
X-direction displacement, m
Y
-
d
i
r
e
c
t
i
o
n

d
i
s
p
l
a
c
e
m
e
n
t
,

m

Figure 3.20: Unstable noninterrupted cutting process tool path.
Unstable noninterrupted cutting process
1.E-12
1.E-11
1.E-10
1.E-09
1.E-08
1.E-07
0 200 400 600 800 1000
Frequency, Hz
C
h
i
p

t
h
i
c
k
n
e
s
s

s
p
e
c
t
r
u
m
,

m

51
Figure 3.21: Unstable noninterrupted cutting process chip thickness spectrum prior to
steady state.


Unstable noninterrupted cutting process, steady state
1.E-11
1.E-10
1.E-09
1.E-08
1.E-07
1.E-06
1.E-05
1.E-04
0 200 400 600 800 1000
Frequency, Hz
C
h
i
p

t
h
i
c
k
n
e
s
s

s
p
e
c
t
r
u
m
,

m

Figure 3.22: Unstable noninterrupted cutting process chip thickness spectrum at steady
state.
52
Unstable noninterrupted cutting process, steady state
1.E-13
1.E-12
1.E-11
1.E-10
1.E-09
1.E-08
1.E-07
1.E-06
1.E-05
1.E-04
0 200 400 600 800 1000
Frequency, Hz
X
-
d
i
r
e
c
t
i
o
n

d
i
s
p
l
a
c
e
m
e
n
t

s
p
e
c
t
r
u
m
,

m

Figure 3.23: Unstable noninterrupted cutting process x-direction displacement spectrum
at steady state.


Unstable noninterrupted cutting process, steady state
1.E-12
1.E-11
1.E-10
1.E-09
1.E-08
1.E-07
1.E-06
1.E-05
1.E-04
0 200 400 600 800 1000
Frequency, Hz
Y
-
d
i
r
e
c
t
i
o
n

d
i
s
p
l
a
c
e
m
e
n
t

s
p
e
c
t
r
u
m
,

m

Figure 3.24: Unstable noninterrupted cutting process y-direction displacement spectrum
at steady state.
53
To further explore this effect a number of simulations were performed with
systems similar to the one above. For Figures 3.25-3.26 a series of systems were
simulated with a range of different y-direction modal frequencies. All other
characteristics of the system were kept the same. For this particular cutting tool system
the length of the wave left on the surface by the x-direction motion will be given by
Equation 3.3:
m 00146 . 0 m 035 . 0
503 min* sec/ 60
RPM 400
min sec/ 60
= =
Hz
d
f
N
x

(3.7)


The vibration levels in each case reach steady state when the y-direction displacement
amplitude reaches approximately 0.35 mm. This is roughly 25% of the length of waves
left on the surface by the x-direction oscillation. For the systems with the 491 Hz and
539 Hz modal frequencies oscillations quickly grow until the tool leaves the workpiece.
The envelope plots only extend until the tool leaves the workpiece for these systems.
A similar effect can be seen in Figure 3.27-3.28. The systems simulated for this
plot all have the same modal frequencies, damping ratios and x-direction stiffness.
However all these systems have different values of y-direction stiffness. The legend
indicates the y-direction stiffness as a percentage of the x-direction stiffness. It can be
seen that as the y-direction stiffness is increased the steady state amplitude of motion in
the x-direction increases until the cut becomes interrupted. Once again the amplitudes
level out when the y-direction displacement amplitude reaches roughly 0.35 mm. In this
case the cutting tool with 200 % stiffness left the workpiece.
54
Envelope plots, unstable noninterrupted cutting,
variable y-direction natural frequency
-150
-100
-50
0
50
100
150
0 5 10 15 20 25 30
Time, s
X
-
D
i
r
e
c
t
i
o
n

d
i
s
p
l
a
c
e
m
e
n
t
,

m
491 Hz
495 Hz
503 Hz
519 Hz
529 Hz
539 Hz

Figure 3.25: X-direction displacement envelope plots, variable y-direction modal
frequency, x-direction frequency: 503 Hz.


Envelope plots, unstable noninterrupted cutting,
variable y-direction natural frequency
-250
-200
-150
-100
-50
0
50
100
150
200
0 5 10 15 20 25 30
Time, s
Y
-
D
i
r
e
c
t
i
o
n

d
i
s
p
l
a
c
e
m
e
n
t
,

m
491 Hz
495 Hz
503 Hz
519 Hz
529 Hz
539 Hz

Figure 3.26: Y-direction displacement envelope plots, variable y-direction modal
frequency, x-direction frequency: 503 Hz.
55
Envelope plots, unstable noninterrupted cutting,
variable y-direction stiffness, constant frequency.
-150
-100
-50
0
50
100
150
0 5 10 15 20 25 30
Time, s
X
-
D
i
r
e
c
t
i
o
n

d
i
s
p
l
a
c
e
m
e
n
t
,

m
2%
20%
50%
100%
200%

Figure 3.27: X-direction displacement envelope plots, variable y-direction stiffness.


Envelope plots, unstable noninterrupted cutting,
variable y-direction stiffness, constant frequency.
-1000
-800
-600
-400
-200
0
200
0 5 10 15 20 25 30
Time, s
Y
-
D
i
r
e
c
t
i
o
n

d
i
s
p
l
a
c
e
m
e
n
t
,

m
2%
20%
50%
100%
200%

Figure 3.28: Y-direction displacement envelope plots, variable y-direction stiffness.
56
Envelope plots, unstable noninterrupted cutting,
variable y-direction damping ratios.
-150
-100
-50
0
50
100
150
0 5 10 15 20 25 30
Time, s
X
-
D
i
r
e
c
t
i
o
n

d
i
s
p
l
a
c
e
m
e
n
t
,

m
0.10%
0.70%
1.30%
1.70%
2.50%
4%
10%

Figure 3.29: X-direction displacement envelope plots, variable y-direction damping.


Envelope plots, unstable noninterrupted cutting,
variable y-direction damping ratios.
-250
-200
-150
-100
-50
0
50
100
150
200
250
0 5 10 15 20 25 30
Time, s
Y
-
D
i
r
e
c
t
i
o
n

d
i
s
p
l
a
c
e
m
e
n
t
,

m
0.10%
0.70%
1.30%
1.70%
2.50%
4%
10%

Figure 3.30: Y-direction displacement envelope plots, variable y-direction damping.
57
Another series of simulations were performed with a range of y-direction
damping ratios as shown in Figures 3.29-3.30. It can again be seen that amplitude of y-
direction motion at steady state is similar for a variety of simulated cutting systems. In
this case the tool left the workpiece for the 10% damping ratio case.
3.3. Stability Chart Generation
When used to produce a stability chart the numerical simulation confirms the
result of the analytical model that the y-direction motion does not affect the stability
limit. This is shown in Figure 3.31, which presents stability charts for both a single and a
two degree-of-freedom system. For both systems the x-direction system characteristics
Stability chart, numerical and analytical results
0
2
4
6
8
10
12
0 10000 20000 30000 40000 50000 60000 70000 80000
Spindle Speed, Rpm
S
t
a
b
i
l
i
t
y

L
i
m
i
t
,

m
m
Analytical
Numerical 2-DOF
Numerical 1-DOF

Figure 3.31: Numerically generated stability charts
58
are the same. It can also be seen that the numerical stability model compares well to
the analytical model of Chapter 2.
This result can be understood as the y-direction motion and x-direction motion are
both caused by the same forcing function. As a result there can be no y-direction motion
unless there is some variation in chip thickness and therefore cutting force due to x-
direction motion. By this time however chatter has already begun, so the motion cannot
halt the onset of chatter.
3.4. Conclusions from Numerical Model
Based upon the results obtained using the numerical simulation of orthogonal
cutting y-direction motion cannot prevent the onset of chatter, but it does have an effect
on the growth of chatter and on the characteristics of the system once chatter has begun.
In particular the motion can slow the growth of chatter and even limit the maximum
amplitude of chatter oscillations.
59
Chapter 4


EXPERIMENTAL WORK
4.1. Experimental Setup

A two degree-of-freedom flexure was designed and constructed to experimentally
verify this model. The stiffness of the flexure is much lower than the stiffness of the
machine tool base. Therefore the dynamic behavior of a tool mounted in the flexure is
due mainly to the compliance of the
flexure. In this way the behavior of the
cutting tool approximates the model used
to develop the stability predictions
above. The design of the flexure is
shown in Figure 4.1.

Figure 4.1: Final flexure design.
The flexure design uses notch
hinges that are explained in Smith and
Chetwynd [15]. This type of flexure
depends upon pairs of closely spaced
holes for its compliance. In contrast to
60
other types of flexures which might use beam or leaf elements, the characteristics of
notch flexures are dependent mainly on the spacing between the holes. As most
deformation occurs in the thin web of material between the holes manufacturing errors in
other parts of the flexure will not have a very large impact on the overall system
characteristics. As a result it is possible to make a notch style flexure using a drill press
and bandsaw. Other styles of flexures may need to be produced on a milling machine,
which is often a more time consuming and expensive process.
Another advantage of this type of flexure is its monolithic construction. As it was
constructed from a single piece of material there are no joints within the flexure that
could potentially introduce nonlinearity. This helps to produce cleaner data from sensors
such as accelerometers which can be very sensitive to rattling in joints.
The flexure was built and found to have a static stiffness of 5.5 MN/m in the x-
direction and 3.3 MN/m in the y-direction. To determine dynamic characteristics of the
flexure a modal analysis was performed using a Kistler 500 N impact hammer, a Kistler
triaxial accelerometer with a range of 50 g and a Hewlett-Packard 35670A Dynamic
Signal Analyzer. During the tests the accelerometer was kept fixed and the point of
excitation was moved. This was done to avoid potential problems caused by changing
the mass loading of the structure. The set of points used to perform the modal analysis
and their locations on the actual part can be seen on plot of the flexure and the
undeformed mesh seen in Figures 4.2a and 4.2b. The accelerometer was located at point
6 and oriented to the axis shown in Figure 4.2b. Only the x and y direction signals were
recorded.
61
9
10
7 8
5 6
3 4
1 2
Side view of flexure

1 2
3 4
5 6
7 8
9
10
Undeformed mesh

(a) (b)
Mode # 1:332 Hz
Mode # 2: 537 Hz

(c) (e)
Figure 4.2: Experimentally determined flexure mode shapes

Star Modal analysis software was used to analyze the resulting data. The first
mode of vibration corresponds to tool translation in the y-direction and has a natural
frequency of 332 Hz. This is pictured in Figure 4.2c. The second mode of vibration has
62
a natural frequency of 537 Hz and corresponds to tool translation in the x-direction as
seen in Figure 4.2d. The damping ratios for these modes were more difficult to
determine. Star Modal predicted fairly high damping ratios for the modes: 2.16% and
1.3% in the x and y direction respectively. Other methods such as a circle fit and the half
power point method predicted damping ratios from 0.5% to 1% or more. The use of the
synthesis function on the HP signal analyzer predicted damping ratios of 0.16% and
0.13% in the x and y directions.
To gauge the separation of the x and y direction modes the accelerometer was
placed on the flexure near the tool mounting location. The impact hammer was then used
to excite the flexure in both the x and y directions. From the results in Figures 4.3 and
4.4 it can be seen that the response of the x-direction mode to an x-direction excitation is
much greater than its response to a y-direction excitation. Figures 4.5 and 4.6 show a
similar result for the y-direction mode. As a result the response of each mode should be
largely independent of the other mode. There is a small peak at about 430 Hz in these
frequency response functions. The response of this mode is smaller than the other two
modes and this frequency was not observed in the data from cutting tests so this mode
does not appear to be significant. It is possible that this mode is a result of the clamping
system used during the modal testing.
63
Flexure response at tool mounting, x-direction,
excitation in x-direction
0.0001
0.001
0.01
0.1
1
10
0 200 400 600 800 1000
Frequency, Hz
A
c
c
e
l
e
r
a
t
i
o
n

b
a
s
e
d

F
R
F
,

g
/
N

Figure 4.3: Flexure frequency response function, response and excitation in x-direction.


Flexure response at tool mounting , response in x-
direction, excitation in y-direction
0.0001
0.001
0.01
0.1
1
0 200 400 600 800 1000
Frequency, Hz
A
c
c
e
l
e
r
a
t
i
o
n

b
a
s
e
d

F
R
F
,

g
/
N

Figure 4.4: Flexure frequency response function, response in y-direction, excitation in
x-direction.
64
Flexure response at tool mounting, response and
excitation in y-direction
0.001
0.01
0.1
1
10
0 200 400 600 800 1000
Frequency, Hz
A
c
c
e
l
e
r
a
t
i
o
n

b
a
s
e
d

F
R
F
,

g
/
N

Figure 4.5: Flexure frequency response function, response and excitation in y-direction.


Flexure response at tool mounting, response in x-
direction, excitation in y-direction
0.00001
0.0001
0.001
0.01
0.1
1
0 200 400 600 800 1000
Frequency, Hz
A
c
c
e
l
e
r
a
t
i
o
n

b
a
s
e
d

F
R
F
,

g
/
N

Figure 4.6: Flexure frequency response function, response in x-direction, excitation in
y-direction.
65
4.2. Experimental Results
A high speed steel tool mounted in this flexure was used to make a series of
orthogonal cuts using a Moore 3 jig borer base with an Excello dual-hemisphere air
bearing spindle. The workpiece used was an aluminum shaft 35 mm in diameter that had
been machined on a lathe to create a series of disks protruding from the surface
perpendicular to the axis of rotation as seen in Figure 4.7. The disks were of varying
widths so that a range of processes could be explored.

Figure 4.7: Example workpiece design.

To measure the response of the flexure a Kistler triaxial accelerometer was used
along with an ADE capacitance probe. An HP signal analyzer was used to perform time
captures during the cut. These data were later analyzed and plotted.

66
4.2.1. Stable Cutting Test Results
This cut involved a disk 0.5 mm wide at a spindle speed of 199.4 RPM. The feed
rate, which determines the chip thickness, was 3.47*10
-6
m/revolution. Should the
measured x-direction displacement ever exceed the feed per revolution in the negative x-
direction the tool will leave the workpiece. As seen in Figure 4.8 the system quickly
reaches a steady state with low vibration levels, and the tool remains in contact with the
workpiece at all times. Although the theory suggests that the vibration levels should drop
to zero this was not found to be the case. It is possible that the small vibrations are due to
spindle runout, slideway error, nonuniformities in the workpiece such as inclusions or
voids, variations in the thickness of the disk being cut, or imbalance in the rotating parts
of the system. Although the amplitude of the oscillations is very small, the frequency at
which they occur is high. As a result the accelerations associated with these
displacements is fairly high as seen in Figures 4.10 and 4.12.
The simulation was then configured to replicate this cutting process. The
damping ratios used were 0.9% in the x-direction and 0.4% in the y-direction. It can be
seen from Figure 4.9 that the displacement predicted by the simulation matches with the
experimental results. Since the simulation does not include the sources of random noise
present in experimental testing the vibrations levels do drop to zero. As a result, the
acceleration levels are also very small, much smaller than seen in the experimental
testing as seen in Figures 4.11 and 4.13.
67
Stable cut, experimental data
-0.3
-0.25
-0.2
-0.15
-0.1
-0.05
0
0.05
0 2 4 6 8 10 12 14
Time, s
X
-
d
i
r
e
c
t
i
o
n

d
i
s
p
l
a
c
e
m
e
n
t
,

m

Figure 4.8: X-direction displacement, experimental data, stable cut.


Stable cut, simulation
-0.3
-0.25
-0.2
-0.15
-0.1
-0.05
0
0.05
0 2 4 6 8 10 12 14
Time, s
X
-
d
i
r
e
c
t
i
o
n

d
i
s
p
l
a
c
e
m
e
n
t
,

m

Figure 4.9: X-direction displacement, simulation, stable cut.
68
Stable cut, experimental data
-20
-15
-10
-5
0
5
10
15
20
0 2 4 6 8 10 12 14
Time, s
X
-
d
i
r
e
c
t
i
o
n

a
c
c
e
l
e
r
a
t
i
o
n
,

m
/
s
2

Figure 4.10: X-direction acceleration, experimental data, stable cut.


Stable cut, simulation
-8.E-04
-6.E-04
-4.E-04
-2.E-04
0.E+00
2.E-04
4.E-04
6.E-04
0 2 4 6 8 10 12 14
Time, s
X
-
d
i
r
e
c
t
i
o
n

a
c
c
e
l
e
r
a
t
i
o
n
,

m
/
s
2

Figure 4.11: X-direction acceleration, simulation, stable cut.
69
Stable cut, experimental data
-8
-6
-4
-2
0
2
4
6
8
0 2 4 6 8 10 12 14
Time, s
Y
-
D
i
r
e
c
t
i
o
n

a
c
c
e
l
e
r
a
t
i
o
n
,

m
/
s
2

Figure 4.12: Y-direction acceleration, experimental data, stable cut.


Stable cut, simulation
-4.E-03
-3.E-03
-2.E-03
-1.E-03
0.E+00
1.E-03
2.E-03
3.E-03
0 2 4 6 8 10 12 14
Time, s
Y
-
d
i
r
e
c
t
i
o
n

a
c
c
e
l
e
r
a
t
i
o
n
,

m
/
s
2

Figure 4.13: Y-direction acceleration, simulation, stable cut.
70
4.2.2. Pulsed Unstable Cutting Test Results
The process parameters for this cut were similar to the parameters above with the
exceptions that the spindle speed is now 600 RPM and the feed rate is now 1.15*10
-6

m/revolution. This cutting process was found to be unstable. From the experimental
results of Figures 4.14, 4.16, and 4.18 it can be seen that the vibrations grow until the tool
begins to leave the workpiece. Furthermore the signal appears to pulse every three to
four seconds with vibration levels dropping to nearly zero before rising again. The x-
direction acceleration and displacement spectra from the experimental data in Figures
4.20 and 4.24 both have a single dominant frequency slightly above the flexure frequency
in the x-direction. The y-direction acceleration spectrum in Figure 4.22 has two peaks,
one near the x-direction natural frequency and one near the y-direction natural frequency.
It is believed that the lower of these two peaks is due to the free vibration period when
the tool is not engaged in the workpiece.
A simulation of this system produced a similar pulsing vibration signal, with the
vibration levels rising and falling approximately every five seconds as seen in Figures
4.15, 4.17 and 4.19. The plot of chip thickness in Figure 4.25 shows that during the
periods when the vibrations drop near zero the tool is out of the workpiece for a roughly
half a second. During the periods of large amplitude vibration the cutting tool vibrates so
much that it removes a considerable thickness of the workpiece. This reduces the chip
thickness and cutting force on following passes. As a result tool vibration levels drop
until the tool no longer cuts the workpiece at all. Since the cutting force is zero at this
71
point vibration levels drop further. The tool does not contact the workpiece again until
the feed moves the tool closer to the surface. This is seen in Figure 4.26 which plots the
surface profile, and the position and path of the cutting tool at the beginning of the first
such gap. Displacements and surface waviness have both been greatly exaggerated in
this plot.
Figure 4.21 shows the spectrum of the x-direction acceleration based upon the
simulation. This is similar to the spectrum from the experimental data. Similarly in
Figure 4.23 the acceleration spectrum in the y-direction is comparable to the
experimental spectrum of Figure 4.22.
The damping ratio used for this simulation was 0.175% in the x-direction and
0.13% in the y-direction. These values are very close to the values determined with the
signal analyzer. Although these values are lower than those used to simulate the stable
system in the previous example, it is possible that there was more damping in the system
in that case due to process damping which would be more likely to occur at low speed.
Very small changes in the parameters used in the simulation (such as modal
frequency, stiffness and damping) can produce dramatic changes in the rate and
amplitude of pulsing. For example, changing the x-direction modal frequency to 536.3
Hz and the damping to 0.22% doubles the rate of pulsing. It is likely that small errors in
the measurement of system parameters are responsible for the differences between
simulated and experimental results.
72
Pulsed vibration signal, experimental data
-40
-30
-20
-10
0
10
20
30
40
0 2 4 6 8 10 12 14
Time, s
X
-
d
i
r
e
c
t
i
o
n

d
i
s
p
l
a
c
e
m
e
n
t
,

m

Figure 4.14: X-direction displacement, experimental data, pulsed unstable cut.


Pulsed vibration signal, simulation
-40
-30
-20
-10
0
10
20
30
40
0 2 4 6 8 10 12 14
Time, s
X
-
d
i
r
e
c
t
i
o
n

d
i
s
p
l
a
e
c
m
e
n
t
,

m

Figure 4.15: X-direction displacement, simulation, pulsed unstable cut.
73
Pulsed vibration signal, experimental data
-400
-300
-200
-100
0
100
200
300
400
0 2 4 6 8 10 12 14
Time, s
X
-
d
i
r
e
c
t
i
o
n

a
c
c
e
l
e
r
a
t
i
o
n

l
e
v
e
l
,

m
/
s
2

Figure 4.16: X-direction acceleration, experimental data, pulsed unstable cut.


Pulsed vibration signal, simulation
-400
-300
-200
-100
0
100
200
300
400
0 2 4 6 8 10 12 14
Time, s
X
-
d
i
r
e
c
t
i
o
n

a
c
c
e
l
e
r
a
t
i
o
n
,

m
/
s
2

Figure 4.17: X-direction acceleration, simulation, pulsed unstable cut.
74
Pulsed vibration signal, experimental data
-8
-6
-4
-2
0
2
4
6
8
0 2 4 6 8 10 12 14
Time, s
Y
-
d
i
r
e
c
t
i
o
n

a
c
c
e
l
e
r
a
t
i
o
n
,

m
/
s
2

Figure 4.18: Y-direction acceleration, experimental data, pulsed unstable cut.


Pulsed vibration signal, simulation
-1.2
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0 2 4 6 8 10 12 14
Time, s
Y
-
d
i
r
e
c
t
i
o
n

d
i
s
p
l
a
c
e
m
e
n
t
,

m

Figure 4.19: Y-direction acceleration, simulation, pulsed unstable cut.
75
Pulsed vibration signal, experimental data
1.E-06
1.E-05
1.E-04
1.E-03
1.E-02
1.E-01
1.E+00
1.E+01
1.E+02
0 200 400 600 800 1000
Frequency, Hz
X
-
d
i
r
e
c
t
i
o
n

a
c
c
e
l
e
r
a
t
i
o
n

s
p
e
c
t
r
u
m
,

m
/
s
2

Figure 4.20: X-direction acceleration spectrum, experimental data, pulsed unstable cut.


Pulsed vibration signal, simulated data
1.E-06
1.E-05
1.E-04
1.E-03
1.E-02
1.E-01
1.E+00
1.E+01
1.E+02
0 200 400 600 800 1000
Frequency, Hz
X
-
d
i
r
e
c
t
i
o
n

a
c
c
e
l
e
r
a
t
i
o
n

s
p
e
c
t
r
u
m
,

m
/
s
2

Figure 4.21: X-direction acceleration spectrum, simulation, pulsed unstable cut.
76
Pulsed vibration signal, experimental data
1.E-05
1.E-04
1.E-03
1.E-02
1.E-01
1.E+00
1.E+01
0 200 400 600 800 1000
Frequency, Hz
Y
-
d
i
r
e
c
t
i
o
n

a
c
c
e
l
e
r
a
t
i
o
n

s
p
e
c
t
r
u
m
,

m
/
s
2

Figure 4.22: Y-direction acceleration spectrum, experimental data, pulsed unstable cut.


Pulsed vibration signal, simulated data
1.E-05
1.E-04
1.E-03
1.E-02
1.E-01
1.E+00
0 200 400 600 800 1000
Frequency, Hz
Y
-
d
i
r
e
c
t
i
o
n

a
c
c
e
l
e
r
a
t
i
o
n

s
p
e
c
t
r
u
m
,

m
/
s
2

Figure 4.23: Y-direction acceleration spectrum, simulation, pulsed unstable cut.
77
Pulsed vibration signal, experimental data
1.E-13
1.E-12
1.E-11
1.E-10
1.E-09
1.E-08
1.E-07
1.E-06
1.E-05
0 200 400 600 800 1000
Frequency, Hz
X
-
d
i
r
e
c
t
i
o
n

d
i
s
p
l
c
e
m
e
n
t

s
p
e
c
t
r
u
m
,

m

Figure 4.24: X-direction displacement spectrum, experimental data, pulsed unstable cut.


Pulsed vibration signal, simulation
0
2
4
6
8
10
12
0 2 4 6 8 10 12 14
Time, s
C
h
i
p

t
h
i
c
k
n
e
s
s
,

m

Figure 4.25: Chip thickness, simulation, pulsed unstable cut.
78
Workpiece surface profile
Workpiece surface
Tool path

Figure 4.26: Workpiece surface and tool path at end of vibration pulse.

79
4.2.3. Unstable Cutting Test Results
Although in the above cases the simulated and experimental results were found to
agree fairly well this was not always the case. A cutting test was performed with
parameters similar to those above with the exceptions that the spindle speed was 405
RPM and the feed rate was now 1.73*10
-6
m/revolution. The experimental data in
Figures 4.27, 4.29, 4.31 show that the oscillation levels grow quickly and remain at a
reasonably constant level throughout the test period.
This system was simulated using damping ratios of 0.25% in the x direction and
0.13% in the y direction and the results are plotted in Figures 4.28, 4.30, 4.32. Although
the maximum oscillation levels reached are similar to those seen in the experimental tests
the oscillations seem to grow more slowly and at the end the amplitude seems to pulse in
a manner similar to that seen in the previous example. It is possible that the discrepancy
is due to some unmodeled factor in the process, such as process damping, or nonlinear
specific cutting energy that becomes more significant at lower cutting speeds. It may
also be the case that the experimental test was not long enough for the system to reach
steady state, and that with a longer test time the system would behave more like the
simulation.
80
Unstable cutting process, experimental data
-25
-20
-15
-10
-5
0
5
10
15
20
25
0 2 4 6 8 10 12 14
Time, s
X
-
d
i
r
e
c
t
i
o
n

d
i
s
p
l
a
c
e
m
e
n
t
,

m

Figure 4.27: X-direction displacement, experimental data, unstable cut.


Unstable cut, simulation
-25
-20
-15
-10
-5
0
5
10
15
20
25
0 2 4 6 8 10 12 14
Time, s
X
-
d
i
r
e
c
t
i
o
n

d
i
s
p
l
a
c
e
m
e
n
t
,
m

Figure 4.28: X-direction displacement, simulation, unstable cut.
81
Unstable cutting process, experimental data
-400
-300
-200
-100
0
100
200
300
400
0 2 4 6 8 10 12 14
Time, s
X
-
d
i
r
e
c
t
i
o
n

a
c
c
e
l
e
r
a
t
i
o
n
,

m
/
s
2

Figure 4.29: X-direction acceleration, experimental data, unstable cut.


Unstable cut, simulation
-400
-300
-200
-100
0
100
200
300
400
0 2 4 6 8 10 12 14
Time, s
X
-
d
i
r
e
c
t
i
o
n

a
c
c
e
l
e
r
a
t
i
o
n
,

m
/
s
2

Figure 4.30: X-direction acceleration, simulation, unstable cut.
82
Unstable cutting process, experimental data
-7.5
-5.5
-3.5
-1.5
0.5
2.5
4.5
6.5
0 2 4 6 8 10 12 14
Time, s
Y
-
d
i
r
e
c
t
i
o
n

a
c
c
e
l
e
r
a
t
i
o
n
,

m
/
s
2

Figure 4.31: Y-direction acceleration, experimental data, unstable cut.


Unstable cut, simulation
-12
-10
-8
-6
-4
-2
0
2
4
6
8
0 2 4 6 8 10 12 14
Time, s
Y
-
d
i
r
e
c
t
i
o
n

a
c
c
e
l
e
r
a
t
i
o
n
,

m
/
s
2

Figure 4.32: Y-direction acceleration, simulation, unstable cut.
83
4.3. Conclusions of Experimental Work
The comparison of the experimental and numerical results provides confidence in
the accuracy of the numerical simulation. That it is able to capture some of the complex
behavior of the pulsing chatter signal implies that it is accurately modeling much of the
significant detail in the system.
Improvements in the accuracy of the simulation could be obtained by refining the
simulation mode. One possible refinement would be a more detailed model of the cutting
process itself including any variation of specific cutting energy with chip thickness or
cutting speed. Another area where more detailed modeling could be beneficial would be
to account for the effect of process damping in the system model.
84
Chapter 5


VARIABLE SPEED MACHINING
5.1. Background
In the preceding chapters it was shown that tool motion in the y-direction does not
affect the stability of a cutting process as the y-direction motion amplitude will only
become significant once the process has become unstable. However, stability can be
improved by intentionally introducing a similar effect into a system by continuously
varying spindle speed during a cut.
This has two effects. The first is to continuously alter the length of the time delay
period, disrupting the regenerative effect. The second is to change the speed at which
surface waviness left by previous passes moves past the tool. Since the cutting tool
oscillates at a fairly constant frequency during a cut, the wavelength of the marks left on
the surface will depend on the speed at which the surface moves past the cutting tool. If
the spindle speed is constant the wavelength will be constant and the frequency at which
the tool passes through those waves on subsequent passes will be the same as the
frequency at which they were created. If the spindle speed is not the same from one pass
to the next the cutting tool will pass through those waves at a different frequency than the
tool natural frequency further reducing their ability to excite the tool.
85
5.2. Approach
Most previous studies of variable speed cutting have involved machine tool
systems in which the same motor turns the spindle and moves the slide carrying the
cutting tool. As a result when the spindle speed is changed the feed rate will also change
and the thickness of the chip being removed from the workpiece will remain constant.
Modern machine tools, including diamond turning machines, use separate drive
systems to control the spindle and move the cutting tool. On most machines of this type
the controller can vary the feed rate along with the spindle speed to maintain constant
chip thickness. However, this feature is not always present or used. As a result the feed
and therefore the thickness of the chip being removed can vary with the spindle speed.
To determine the importance of this variation in chip thickness on stability the
simulation program introduced in Chapter 3 includes the capability to simulate and
determine the stability of variable speed machining systems, both those with constant and
variable feed rates. The stability determination procedure is slightly different from that
used for constant speed systems. Rather than looking for peak oscillation levels every
rotation of the workpiece, it determines the peak oscillation levels during one speed
oscillation cycle.
5.3. Variable Speed Machining Results
The unstable cutting process of Chapter 3.2.2 was simulated again. This time the
spindle speed was varied in a sinusoidal manner at a frequency of 0.25 Hz, with an
86
amplitude that was 20% of the mean spindle speed. In this case that means that the
spindle speed varied from 480 RPM to 720 RPM.
The first simulation performed varied the feed rate along with the spindle speed.
As a result the chip thickness was constant. From Figures 5.1-5.3 it can be seen that the
variation in spindle speed has stabilized the previously unstable cutting process.
The system was then simulated with a constant feed rate. As seen in Figures 5.4-
5.6, the high frequency oscillations present in the original constant speed example are
gone and the oscillation levels are relatively static. Because the spindle speed is
constantly varying while the feed rate remains constant the feed per workpiece revolution
is constantly changing as well. As a result the chip thickness varies with spindle speed,
causing variations in the cutting force. This results in some tool motion, but the
amplitude of these oscillations is very small compared to the constant speed system in
which the cut actually became interrupted.
As diamond turning machines are used to produce parts with extremely strict
surface finish requirements and tight tolerances even these small oscillation levels would
likely be unacceptable on finished parts. It is still possible that variable spindle speed
machining could be used to increase material removal rates during roughing cuts earlier
in the production process.
87
Variable speed machining, variable feed rate
-0.35
-0.3
-0.25
-0.2
-0.15
-0.1
-0.05
0
0 2 4 6 8
Time, s
x
-
d
i
r
e
c
t
i
o
n

d
i
s
p
l
a
c
e
m
e
n
t
,

10
m

Figure 5.1: X-direction displacement, variable spindle speed, variable feed rate (constant
feed/revolution.)


Variable speed machining, variable feed rate
-1.6
-1.4
-1.2
-1
-0.8
-0.6
-0.4
-0.2
0
0 2 4 6 8
Time, s
y
-
d
i
r
e
c
t
i
o
n

d
i
s
p
l
a
c
e
m
e
n
t
,

10
m

Figure 5.2: Y-direction displacement, variable spindle speed, variable feed rate (constant
feed/revolution.)
88
Variable speed machining, variable feed rate
0
2
4
6
8
10
12
0 2 4 6 8 1
Time, s
C
h
i
p

t
h
i
c
k
n
e
s
s
,

0
m

Figure 5.3: Chip thickness, variable spindle speed, variable feed rate (constant
feed/revolution.)


Variable speed machining, constant feed rate
-0.4
-0.35
-0.3
-0.25
-0.2
-0.15
-0.1
-0.05
0
0 2 4 6 8
Time, s
x
-
d
i
r
e
c
t
i
o
n

d
i
s
p
l
a
c
e
m
e
n
t
,

10
m

Figure 5.4: X-direction displacement, variable spindle speed, constant feed rate (variable
feed/revolution.)
89
Variable speed machining, constant feed rate
-1.8
-1.6
-1.4
-1.2
-1
-0.8
-0.6
-0.4
-0.2
0
0 2 4 6 8 1
Time, s
y
-
d
i
r
e
c
t
i
o
n

d
i
s
p
l
a
c
e
m
e
n
t
,

0
m

Figure 5.5: Y-direction displacement, variable spindle speed, constant feed rate (variable
feed/revolution.)


Variable speed machining, constant feed rate
0
2
4
6
8
10
12
14
0 2 4 6 8
Time, s
C
h
i
p

t
h
i
c
k
n
e
s
s
,

10
m

Figure 5.6: Chip thickness, variable spindle speed, constant feed rate (variable
feed/revolution.)
90
The simulation was used to generate stability charts for this system using both
constant and variable feed rates. From Figure 5.7 it can be seen that there is no
difference in the stability limit for constant and variable feed rate systems. The variation
of spindle speed increased the stability of the system over the constant speed case at
lower spindle speeds. At higher speeds however, the variable speed can alter favorable
phase relationships that result in the high peaks on the stability lobes, reducing the
stability at some speeds.

Comparison of constant and variable feed
0
0.0005
0.001
0.0015
0.002
0.0025
0.003
0.0035
0 1000 2000 3000 4000 5000 6000
Spindle speed, RPM
S
t
a
b
i
l
i
t
y

l
i
m
i
t
,

m
Variable f eed
Constant f eed
Constant speed

Figure 5.7: Comparison of constant and variable speed cutting stability.
The effect of variable speeds was further explored by running cases with different
speed variation frequencies and amplitudes. The properties of the single degree-of-
freedom system used are shown in Table 5.1.

91
X-direction stiffness, MN/m 3.0
X-direction natural freq., Hz 180
X-direction damping ratio 1.3%
Workpiece specific cutting stiffness, GN/m
2
1.0
Workpiece diameter, m 0.020
Depth of cut, m/revolution 0.0001
Cutting force angle, , degrees 20

Table 5.1: Stable process simulation parameters.

First the frequency of the spindle speed variation was held constant over a range
of amplitudes. Next the amplitude of the variation was kept constant over a range of
frequencies. From the results of Figures 5.8 and 5.9 it can be seen that the gain in
stability increases with the amplitude and frequency of spindle speed variation. For any
real machine tool system there will be practical limits on the rate and amount that the
spindle speed can be varied, placing some of these higher gains out of reach.
The variable speed stability charts are somewhat lumpy, particularly at higher
spindle speeds. This results from the stability testing method used. If the program were
set up to more closely examine the stability at each point this effect would be reduced.
Unfortunately, this would substantially increase program execution time.
The stability chart in Figure 5.10 was generated for comparison to experimental
results from Sexton [13], presented in Table 5.2.
92

Spindle speed, RPM Stability gain, %,
from Sexton [13]
172 35
234 46
322 36
421 42
561 75
749 18

Table 5.2: Experimental results from Sexton [13]


The system used in this has a 50 Hz natural frequency with a 6% damping ratio,
and spindle speed is varied at 0.25 Hz with and amplitude of 20% of the mean spindle
speed. Sexton determined the gain in stability at several spindle speeds. The simulation
was configured to reproduce this situation. The gain in stability over the constant speed
case is presented in Figure 5.11. It can be seen that the experimentally determined gains
in stability as reported by Sexton are close to the values predicted by the simulation at
most data points. The correspondence is worse at lower speeds which could be due to the
impact of process damping which is not included in the simulation. The results also
differ significantly at the 561 RPM data point. The reason for this is not known. It is
possible that the data is an outlier in the experimental data, or that there is a problem with
the stability analysis of the situation.
An experimental cutting test was performed using a single degree-of-freedom
flexure similar to the one presented in Chapter 4. The flexure had a 170 Hz natural
frequency, with a stiffness of 3.5 MN/m and a damping ratio of 0.66 %. The tool was
93
Variable Spindle Speed Stability Chart, 0.25 Hz
0
0.0002
0.0004
0.0006
0.0008
0.001
0.0012
0.0014
0.0016
0.0018
0.002
0 500 1000 1500 2000
Mean Spindle Speed, RPM
S
t
a
b
i
l
i
t
y

L
i
m
i
t
,

m
Constant Speed
5% Speed Variation
10% Speed Variation
15% Speed Variation
20% Speed Variation
25% Speed Variation
30% Speed Variation

Figure 5.8: Variable speed stability limit comparison, constant frequency.


Variable Spindle Speed Stability Chart, 20 % Speed
Variation
0
0.0002
0.0004
0.0006
0.0008
0.001
0.0012
0.0014
0.0016
0.0018
0 500 1000 1500 2000
Mean Spindle Speed, RPM
S
t
a
b
i
l
i
t
y

L
i
m
i
t
,

m
Constant Speed
0.05 Hz
0.10 Hz
0.20 Hz
0.30 Hz
0.40 Hz

Figure 5.9: Variable speed stability limit comparison, constant amplitude.
94
Numerically Predicted Stability Charts, Constant and
Variable Speed
0.0E+00
2.0E-04
4.0E-04
6.0E-04
8.0E-04
1.0E-03
1.2E-03
0 200 400 600 800
Spindle Speed, RPM
S
t
a
b
i
l
i
t
y

L
i
m
i
t
,

m
Constant Speed
Variable Speed

Figure 5.10: Variable speed stability limit.


Gain in Stability, Numerical vs Experimental Results
From Sexton
-40
-20
0
20
40
60
80
100
120
0 100 200 300 400 500 600 700 800
Spindle Speed, RPM
G
a
i
n

i
n

S
t
a
b
i
l
i
t
y
,

%
Stability Gain, %
Gain f rom Sexton

Figure 5.11: Variable speed stability gain, simulated and experimental from Sexton [13].
95
used to perform an orthogonal cut with a width of cut of 0.635 mm. As the start of the
cut the spindle speed was held constant at 500 RPM. The tool chattered violently, and
the chip removed from the workpiece was discontinuous.
Starting approximately 9 seconds later the spindle speed was varied between 390
and 600 RPM every seven seconds. From the plot of the results in Figure 5.12 it can be
seen that the oscillation amplitude dropped at this point. Although there were still
oscillations present they were not as severe as they had been. Figure 5.13 shows the
expected stability chart for constant and variable speed machining under these conditions.
From this it would be expected that the system would be stable with the variable spindle
speed. From this it is apparent that the system used is not adequately modeled by the
simulation, either because the simulation is flawed or because the test rig used does not
Experimental data, variable speed cutting
-150
-100
-50
0
50
100
150
0 5 10 15 20
Time, s
T
o
o
l

d
i
s
p
l
a
c
e
m
e
n
t
,

m
i
c
r
o
n
s

Figure 5.12: Tool displacement, variable spindle speed after 9 seconds.


96
Variable speed stability chart
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
0 200 400 600 800 1000
Spindle speed, RPM
S
t
a
b
i
l
i
t
y

l
i
m
i
t
,

m
m
Variable speed
Constant speed

Figure 5.13: Constant and variable spindle speed stability.

behave as expected. Unfortunately the machine tool available for these tests is not well
suited to further testing of variable spindle speed machining.
5.4. Variable Speed Machining Conclusions
Based upon the results of the simulation it is believed that variable speed
machining can be used successfully to increase the stability of machining processes both
on conventional machine tools like lathes and on tools like diamond turning machines.
The benefits of speed variation are greatest at lower spindle speeds, and the variation can
be detrimental at higher spindle speeds by reducing the peaks of the stability lobes.
97
Chapter 6


CONCLUSIONS
6.1. Conclusions

A new two degree-of-freedom model of orthogonal cutting including time delay
length variation was developed and studied in a variety of ways. The stability of a
cutting process was examined using both analytical and numerical means and the results
were found to match. The predictions of the numerical simulation were also compared to
experimental data collected using a flexure designed to behave like the system in the
model. The numerical simulation was found to predict the behavior seen experimentally.
It was shown by both analytical and numerical means that the inclusion of the
time delay variation has no significant effect on the critical width of cut for the onset of
chatter. It does however change the behavior of the system after the onset of chatter and
can limit the amplitude of chatter oscillations.
The use of variable spindle speed machining to increase stability in cutting
processes was explored using a numerical simulation of the process. It was found that
this technique could be used to effectively increase stability in certain situations. Results
98
obtained with the simulation were found to be consistent with experimental results
obtained from the literature.
6.2. Future Work
Future work on the two degree of freedom model would include extending it to
other machining systems such as milling. In such systems the tool is constantly
oscillating due to the nature of the process so the constant delay assumption could lead to
poor predictions of stability.
Experimental verification of the unstable noninterrupted cutting situation could be
obtained by performing cutting tests with a boring bar or other similar tool with two
closely matched natural frequencies.
It would also be useful to experimentally determine the stability limit for variable
spindle speed machining. Although this technique has been used in manufacturing
situations already, few experimental results have been published. Doing this would make
it possible to further gauge the accuracy of the simulation.
99
Appendix A


SIMULATION SOURCE CODE
A.1. mainsim.h
/* mainsim.h
This header file includes general orthogonal cutting information and
definitions. */

#define CHUNK_SIZE 256
#define STATES 4

#ifndef PI
# define PI 3.1415928
#endif

/* Defines the structure for tool information */
typedef struct
{
double mx, my, kx, ky, cx, cy, zetax, zetay;
} TOOL_INFO;

/* Defines the structure for workpiece information */
typedef struct
{
double N, d0, cutstiff;
} WORKPIECE_INFO;

/* Defines the structure for cutting parameters */
typedef struct
{
double DOC,b,theta,alpha,beta;
} CUT_PARAM;

/* Defines the structure to hold simulation parameters */
typedef struct
{
double hmax,hmin,h,epsmax,epsmin,tfinal,V,feed,d0pi,
cx1,cx2,cx3,cy1,cy2,cy3;
long int maxiter;
} SIM_PARAM;
100
A.2. mainsim.c
/* mainsim.c
Thomas O'Reilly June 4 1997
Main file for orthogonal cutting simulation */

#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>

#include "orthsim.h"
#include "cutlist.h"

/* Function prototypes */

void main(int argc, char *argv[])
{
/* Declare variables */
double deltat,omegax,omegay;
int revsteps, n, i, j;

/* Declares new_history function */
extern HISTORY *first_history();
/* Declares main simulation function */
extern void orthsim();

/* Declares pointer to derivative function */
extern void orthder();
extern void stab_check1();
extern void stab_check2();
extern void stab_check3();
extern void stab_check4();

void (*p_schk)();
void (*p_ypfun)();

FILE *fp;

HISTORY *p_hist;
STEPDATA spres;

clock_t elapsed;

SIM_PARAM sim;
TOOL_INFO tool;
WORKPIECE_INFO work;
CUT_PARAM cut;
STAB_CHART_PARAM stab_p;
double blim;

/* Initialize variables */
elapsed=clock();
printf("main\n");

p_ypfun=orthder; /* Function pointer for derivative function */

/* allocates space for and initializes pointer for first history structure */
p_hist=first_history();
init_step(&spres);

/* The following initializes stuff */
/* Loads default parameters */
101
def_param(&sim, &tool, &work, &cut, &stab_p);
/* Overrides defaults with contents of file simulate.cfg */
load_setup_file(&sim, &tool, &work, &cut, &stab_p);
/* Overrides deafults or file values with command line arugments
if they exist. */
if (argc>1)
cmd_line_arg(argc,argv,&sim, &tool, &work, &cut, &stab_p);
/* Initializes parameters based upon values loaded at this point */
init_param(&sim, &tool, &work, &cut, &stab_p);

/* Determines desired mode of program operation */
if (sim.mode==1)
/* Calls the simulation function.*/
orthsim(p_ypfun,&sim,p_hist,&spres,0,tool,work,cut);
else if (sim.mode==2)
{
/* Produce a stability chart for constant spindle speed, no tool motion */
p_schk=stab_check1;
sweep_speeds(p_ypfun,p_schk,sim,&spres,p_hist,tool,work,cut,stab_p);
}
else if (sim.mode==3)
/* Produce a stability chart based upon a maximum allowable level of
vibration. Use for systems with forced tool motion */
{
p_schk=stab_check2;
sweep_speeds(p_ypfun,p_schk,sim,&spres,p_hist,tool,work,cut,stab_p);
}
else if (sim.mode==4)
/* Produce a stability chart based upo
Use for variable spindle speed and constant feed rate */
{
p_schk=stab_check3;
sweep_speeds(p_ypfun,p_schk,sim,&spres,p_hist,tool,work,cut,stab_p);
}
else if (sim.mode==5)
/* Produce a stability chart with a minimum level of vibration
Use for variable spindle speed and constant feed per revolution */
{
p_schk=stab_check4;
sweep_speeds(p_ypfun,p_schk,sim,&spres,p_hist,tool,work,cut,stab_p);
}
else if (sim.mode==6)
/* Generates and saves the envelope of the chatter */
envsim(p_ypfun,sim,&spres,p_hist,tool,work,cut);

/* Compute and display the elapsed time the program ran */
elapsed=clock();
printf("Elapsed Time: %f\n",(float) elapsed/CLOCKS_PER_SEC);

/* Write the elapsed run time to a file */
/* fp=fopen("runtime.txt","w");
fprintf(fp,"Elapsed Time: %f\n",(float) elapsed/CLOCKS_PER_SEC);
fclose(fp);
*/
exit(0);
}
A.3. orthsim.h
/* orthsim.h
102
This header file includes general orthogonal cutting information and
definitions. */

/* Size of memory chunks */
#define CHUNK_SIZE 256
/* Number of state variables */
#define STATES 4
/* Number of state variable accelerations to track */
#define ACC_STATES 2

#ifndef PI
# define PI 3.1415928
#endif

/* Defines the structure for tool information */
typedef struct
{
double mx, my, kx, ky, cx, cy, zetax, zetay, omegax, omegay;
} TOOL_INFO;

/* Defines the structure for workpiece information */
typedef struct
{
double N, d0, cutstiff, rotperiod;
} WORKPIECE_INFO;

/* Defines the structure for cutting parameters */
typedef struct
{
double DOC,b,theta,alpha,beta,db_dt;
} CUT_PARAM;

/* Defines the structure to hold simulation parameters */
typedef struct
{
double hmax,hmin,h,epsmax,epsmin,tfinal,V,feed,d0pi,int_time,
cx1,cx2,cx3,cy1,cy2,cy3,hinc,hdec,hmaxrat,hminrat,b,db_dt,
rpmfreq,rpmamp,rpmcoeff,rpmomega,toolfreq,toolomega,toolamp,
xmeandisp,xrange,xmindisp,xmaxdisp,feedcoeff,xmin,txmin,xmax,txmax,
xvmin,txvmin,xvmax,txvmax,xamin,txamin,xamax,txamax,ymin,tymin,ymax,
tymax,yvmin,tyvmin,yvmax,tyvmax,yamin,tyamin,yamax,tyamax;
long int maxiter, totsteps;
int int_cut, int_step, mode, fileskip, constfeed;
} SIM_PARAM;

/* Defines structure to hold stability chart parameters */
typedef struct
{
double Nmin,Nmax,bmin,bmax,bminabs,bmaxabs,increment,tolerance,
maxxmotion,slots;
int Nsteps,maxchanges,initrot;
} STAB_CHART_PARAM;


/* Some Number used to control printing and file handling */
#define PRINT 1
#define NO_PRINT 0
#define APPEND 1
#define NO_APPEND 0
#define WRITEFILE 1
#define NO_WRITEFILE 0
#define ROTATIONS 30
103
A.4. orthsim.c
/* orthsim.c
Thomas O'Reilly June 4 1997
Main file for orthogonal cutting simulation */

#include <math.h>
#include <stdlib.h>
#include <stdio.h>

#include "orthsim.h"
#include "cutlist.h"
#include "integ.h"

/* Function Prototypes */
void orthsim(void (*p_ypfun)(),SIM_PARAM *p_sim,HISTORY *p_hist,
STEPDATA *p_spres,int nstart,TOOL_INFO tool,WORKPIECE_INFO work,
CUT_PARAM cut);

double orthpp(SIM_PARAM *p_sim, HISTORY *p_hpres,int n_pres,HISTORY **p_h1,
int *n1, STEPDATA *p_spres,double Llast);

void orthder(SIM_PARAM *p_sim, HISTORY *p_hpres,int n_pres,HISTORY **p_h1,
int *n1,double Svecdot[STATES],STEPDATA *p_spres,
double Llast);

/* This function simulates Orthogonal Cutting */
void orthsim(void (*p_ypfun)(),SIM_PARAM *p_sim,HISTORY *p_hist,
STEPDATA *p_spres,int nstart,TOOL_INFO tool,WORKPIECE_INFO work,
CUT_PARAM cut)
{
/* Variable type declaration */
int nfinal, result;
extern int rk45ad();
HISTORY p_hfinal;

char *stepdatafile="stepdata.txt";

RK45CONST *p_rkcon; /* Structure of rk45 constants */

/* Allocates space for rk45 constants */
p_rkcon=(RK45CONST *) malloc(sizeof(RK45CONST));

/* Initializes rk45 constants */
rk45init(p_rkcon);

result=rk45ad(p_ypfun,p_rkcon,p_sim,p_hist,nstart,&p_hfinal,
&nfinal,p_spres,PRINT,WRITEFILE,NO_APPEND,stepdatafile);

if (result==0)
{
printf("\nThe simulation reached the maximum number of time steps\n");
printf("but didn't run to the desired final time.\n");
result=p_sim->maxiter;
}
else
printf("\nThe simulation was successful.\n");

if (p_sim->int_cut!=0)
{
printf("The cut became interrupted at time step %d, Time = %f\n"
,p_sim->int_step,p_sim->int_time);
}
104

return;
}

/* This function determines the thickness of the chip for orthogonal
cutting simulations using linear interpolation. */
double orthpp(SIM_PARAM *p_sim, HISTORY *p_hpres,int npres,HISTORY **p_h1,
int *p_n1, STEPDATA *p_spres,double Llast)
/* The variables h_p1 and n_p1 refer to the first time step that bracketed the
cutter position on the previous time step. These variables are updated
in this function and the variables h_p2 and n_p2 are then set to refer to
the previous position immediately on the other side of the tool during this
time step */
{
int n2,ind_temp,temp_ind,repeat;
double n,Rdiff,toolmotion;
HISTORY *p_h2,*hist_temp;

toolmotion=0.0;
n=0.0;
if (p_sim->toolamp!=0.0)
toolmotion=p_sim->toolamp*sin(2.0*PI*p_sim->toolfreq*p_spres->T);

p_hpres->L[npres]=p_sim->V*p_spres->T+p_spres->Svec[2]
+p_sim->rpmcoeff*sin(p_sim->rpmomega*p_spres->T)
+toolmotion;

p_hpres->R[npres]=p_sim->feed*p_spres->T+p_spres->Svec[0]
+p_sim->feedcoeff*sin(p_sim->rpmomega*p_spres->T);

/* This simulates a smooth entrance into the workpiece. */
if (p_hpres->L[npres]<p_sim->d0pi)
{
p_hpres->prev_cut[npres]=NULL;
if (p_hpres->R[npres]>0.0)
return p_hpres->R[npres];
else
return 0.0;
}
else
do
{
repeat=0;
n=n+1.0;
if ((**p_h1).L[*p_n1]>p_hpres->L[npres]-p_sim->d0pi*n)
{
while ((**p_h1).L[*p_n1]>p_hpres->L[npres]-p_sim->d0pi*n)
{
*p_n1=*p_n1-1;
if (*p_n1<0)
{
*p_n1=CHUNK_SIZE-1;
*p_h1=(**p_h1).p_prev;
}
}
}
else
{
while ((**p_h1).L[*p_n1]<p_hpres->L[npres]-p_sim->d0pi*n)
{
*p_n1=*p_n1+1;
if (*p_n1>CHUNK_SIZE)
{
*p_n1=0;
105
*p_h1=(**p_h1).p_next;
}
}
*p_n1=*p_n1-1;
if (*p_n1<0)
{
*p_n1=CHUNK_SIZE-1;
*p_h1=(**p_h1).p_prev;
}
}
if (n==1)
{
hist_temp=*p_h1;
ind_temp=*p_n1;
}
if ((**p_h1).prev_cut[*p_n1]!=NULL)
{
temp_ind=*p_n1;
*p_n1=(**p_h1).prev_ind[*p_n1];
*p_h1=(**p_h1).prev_cut[temp_ind];
repeat=1;
}
} while (repeat);

n2=*p_n1+1;
p_h2=*p_h1;
if (n2>=CHUNK_SIZE)
{
n2=0;
p_h2=(**p_h1).p_next;
}

Rdiff=p_hpres->R[npres]-((**p_h1).R[*p_n1]+
(p_hpres->L[npres]-p_sim->d0pi*n-(**p_h1).L[*p_n1])/
(p_h2->L[n2]-(**p_h1).L[*p_n1])*(p_h2->R[n2]-(**p_h1).R[*p_n1]));

*p_h1=hist_temp;
*p_n1=ind_temp;

if (Rdiff<0.0)
{
Rdiff=0.0;
p_hpres->prev_cut[npres]=hist_temp;
p_hpres->prev_ind[npres]=ind_temp;
}
else
{
p_hpres->prev_cut[npres]=NULL;
}
return Rdiff;

}

/* This function determines the derivatives of the state variables for
orthogonal cutting simulations. */
void orthder(SIM_PARAM *p_sim, HISTORY *p_hpres,int npres,HISTORY **p_h1,
int *p_n1,double Svecdot[STATES],STEPDATA *p_spres,
double Llast)
{

p_spres->RDIFF=orthpp(p_sim,p_hpres,npres,p_h1,p_n1,p_spres,Llast);

/* Checks for interrupted cutting */
if (p_spres->RDIFF==0.0)
106
if ((p_hpres->R[npres]!=0.0)&&(p_sim->int_cut==0))
{
p_sim->int_cut=1;
p_sim->int_time=p_spres->T;
p_sim->int_step=p_sim->totsteps;
}

Svecdot[0]=p_spres->Svec[1];
Svecdot[1]=p_sim->cx1*p_spres->Svec[1]
+ p_sim->cx2*p_spres->Svec[0]
+ p_sim->cx3*(p_sim->b+p_sim->db_dt*p_spres->T)*p_spres->RDIFF;
Svecdot[2]=p_spres->Svec[3];
Svecdot[3]=p_sim->cy1*p_spres->Svec[3]
+ p_sim->cy2*p_spres->Svec[2]
+ p_sim->cy3*(p_sim->b+p_sim->db_dt*p_spres->T)*p_spres->RDIFF;
/* The next two lines keep track of accelerations */
p_spres->Svecdot[0]=Svecdot[1];
p_spres->Svecdot[1]=Svecdot[3];

return;
}
A.5. cutlist.h
/* cutlist.h
This header file contains definitions of linked list structures*/

/* This structure defines the list elements used to record cutter path data*/
typedef struct history
{
double R[CHUNK_SIZE],L[CHUNK_SIZE];
struct history *p_next,*p_prev,*prev_cut[CHUNK_SIZE];
int prev_ind[CHUNK_SIZE];
} HISTORY;

/* This defines the strucutre used to hold current position data. */
typedef struct stepdata
{
double Svec[STATES],Svecdot[STATES/2],T,RDIFF;
} STEPDATA;

/* This first structure is the definition for the surface list elements*/
typedef struct surface_patch
{
/* This defines the pointers to the previous and next list elements */
struct surface_patch *p_prev,*p_next;
/* This defines the pointers to the list containing the start and end
of the surface patch described by this element */
struct HISTORY *p_start,*p_end;
/* This defines the indicies of the elements containing the position data */
int start_el,end_el;
} SURFACE_PATCH;
107
A.6. cutlist.c
/* cutlist.c
This header file contains some of the functions for dealing with the
linked lists. */

#include <stdlib.h>
#include <stdio.h>

#include "orthsim.h"
#include "cutlist.h"

HISTORY *new_history(HISTORY *previous);

HISTORY *first_history(void);

void init_step(STEPDATA *p_spres);

HISTORY *new_history(HISTORY *previous)
/* This function creates a new turning history list element and attaches it
to the previous list element and attaches the previous list element to
the new element */
{
HISTORY *p;
int i,j;

/* Allocates the space and exits if the space is not created. */
p=(HISTORY *) malloc(sizeof(HISTORY));
if (p==NULL)
{
printf("No new history elements for you! Two megs.\n");
exit(1);
}

/* Set the p_next pointer to point to nothing */
p->p_next=NULL;
/* Set the p_prev pointer to point to the previous structure */
p->p_prev=previous;

p->prev_cut[0]=NULL;

/* The following block of code initializes all the elements in the
history structure to zero. Since all the elements are filled
before they are read this should be unnecessary */
/* for (i=0;i<CHUNK_SIZE;i++)
{
for (j=0;j<STATES;j++)
{
p->Svec[i][j]=0.0;
p->Svecdot[i][j]=0.0;
}
p->L[i]=0.0;
p->T[i]=0.0;
p->R[i]=0.0;
p->RDIFF[i]=0.0;
} */

/* If this is not the first time step set the p_next pointer of the previous
data structure to point to the newly produced structure */
if (previous!=NULL)
previous->p_next=p;

return p;
108
}

HISTORY *first_history(void)
/* This function creates the first history array and sets it up
for all zero initial conditions */
{
HISTORY *p;
int j;

p=new_history((HISTORY *) NULL); /* Allocates space for first
history structure */

p->L[0]=0.0;
p->R[0]=0.0;

return p;
}

void init_step(STEPDATA *p_spres)
/* Initializes the first time step when the program starts */
{
int j;

/* Set up initial conditions */
for (j=0;j<STATES;j++)
p_spres->Svec[j]=0.0;
for (j=0;j<ACC_STATES;j++)
p_spres->Svecdot[j]=0.0;
p_spres->T=0.0;
p_spres->RDIFF=0.0;
return;
}

SURFACE_PATCH *new_surface(SURFACE_PATCH *previous, SURFACE_PATCH *next)
/* This function creates a new surface patch element and inserts it into the
existing surface patch set. */
{
SURFACE_PATCH *p;

/* Allocates the space and exits if the space is not created. */
p=(SURFACE_PATCH *) malloc(sizeof(SURFACE_PATCH));
if (p==NULL)
{printf("No new surface patches for you! Two megs.\n");
exit(1);}

p->p_next=next;
p->p_prev=previous;

if (previous!=NULL)
previous->p_next=p;
if (next!=NULL)
next->p_prev=p;

return p;
}
A.7. input.h
/* input.h
This header file contains information related to reading simulation
109
parameters from a setup file and from the command line */

#define LINESIZE 100
#define NOFILE 0
#define READFILE 1
A.8. input.c
/* input.c
Thomas O'Reilly June 4 1997
functions to load parameters for orthogonal cutting simulation */

#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "orthsim.h"
#include "cutlist.h"
#include "input.h"

const char *SETUP_FILE="simulate.cfg";

/* Function prototypes */
void def_param(SIM_PARAM *p_sim, TOOL_INFO *p_tool, WORKPIECE_INFO *p_work,
CUT_PARAM *p_cut, STAB_CHART_PARAM *p_stab_p);

void set_param(char **pp_var, char **pp_val,SIM_PARAM *p_sim,
TOOL_INFO *p_tool,WORKPIECE_INFO *p_work,CUT_PARAM *p_cut,
STAB_CHART_PARAM *p_stab_p);

void init_param(SIM_PARAM *p_sim, TOOL_INFO *p_tool, WORKPIECE_INFO *p_work,
CUT_PARAM *p_cut, STAB_CHART_PARAM *p_stab_p);

int load_setup_file(SIM_PARAM *p_sim, TOOL_INFO *p_tool, WORKPIECE_INFO *p_work,
CUT_PARAM *p_cut, STAB_CHART_PARAM *p_stab_p);

int cmd_line_arg(int argc, char *argv[], SIM_PARAM *p_sim,
TOOL_INFO *p_tool, WORKPIECE_INFO *p_work,
CUT_PARAM *p_cut, STAB_CHART_PARAM *p_stab_p);

void make_token(char *string, char **pp_var, char **pp_val);

void make_setup_file(SIM_PARAM *p_sim, TOOL_INFO *p_tool,
WORKPIECE_INFO *p_work,CUT_PARAM *p_cut,
STAB_CHART_PARAM *p_stab_p);

/* Actual stuff starts here */
void def_param(SIM_PARAM *p_sim, TOOL_INFO *p_tool, WORKPIECE_INFO *p_work,
CUT_PARAM *p_cut, STAB_CHART_PARAM *p_stab_p)
/* Initializes variables using default parameters
This function recieves pointers to the simulation, tool, workpiece, and
cutting data structures to be initialized. */
{
p_tool->kx=5500000.0; /* Tool stiffness in x direction */
p_tool->ky=3300000.0; /* Tool stiffness in y direction */
p_tool->mx=0.48; /* Effective mass in x direction */
p_tool->my=0.70; /* Effective mass in y direction */
p_tool->zetax=0.0216; /* Damping ratio for x direction */
p_tool->zetay=0.013; /* Damping ratio for y direction */
110

p_work->cutstiff=1e9; /* Workpiece cutting stiffness */
p_work->d0=0.0394; /* Workpiece Diameter */
p_work->N=400.0; /* Rotational Speed, RPM */

p_cut->DOC=0.0001; /* Depth of cut, meters per revolution */
p_cut->b=0.001; /* Width of cut */
p_cut->db_dt=0.0; /* Change in width of cut per unit time */
p_cut->theta=PI/9.0; /* Angle of cutting force */

/* Defines some simulation parameters */
p_sim->int_cut=0; /* Checks for interrupted cutting */
p_sim->epsmin=0.0000001; /* lower bound on error before increasing
step size*/
p_sim->epsmax=0.000001; /* Maximum error per step */
p_sim->maxiter=100000; /* Maximum number of time steps */
p_sim->totsteps=0; /* Counts total number of steps elapsed */
p_sim->tfinal=1.0; /* End time */
p_sim->hinc=1.5; /* Ratio by which step size is increased if
error is too small */
p_sim->hdec=0.75; /* Ratio by which step size is decreaed if
error is too large */
p_sim->hmaxrat=100.0; /* Ratio of maximum step size to initial
step size */
p_sim->hminrat=100000.0; /* Ratio of mimimum step size to initial
step size */
p_sim->constfeed=0; /* Determines whether the feed rate is constant
or not*/

p_stab_p->bmax=0.01; /* Maximum initial width of cut */
p_stab_p->bmaxabs=0.02; /* Maximum final width of cut */
p_stab_p->bmin=0.0; /* Minimum initial width of cut */
p_stab_p->bminabs=0.0; /* Minimum final width of cut */
p_stab_p->slots=32.0; /* Increment to shift upper and lower limits by
*/
p_stab_p->tolerance=0.0000025; /* Tolerance on width of cut */
p_stab_p->Nmax=10000.0; /* Maximum spindle speed */
p_stab_p->Nmin=1000.0; /* Minimum spindle speed */
p_stab_p->Nsteps=1000; /* Number of increments in spindle speed */
p_stab_p->initrot=5; /* Initial rotations */
p_stab_p->maxchanges=5; /* Number of changes in amplkitude to watch
for */
p_stab_p->maxxmotion=1e-6; /* Maximum permissible x-direction motion
amplitude*/

p_sim->rpmfreq=0.0; /* Frequency of spindle speed variation */
p_sim->rpmamp=0.0; /* Amplitude of spindle speed variation */
p_sim->toolfreq=0.0; /* Frequency of forced tool y motion */
p_sim->toolamp=0.0; /* Aplitude of forced tool y motion */

p_sim->fileskip=5; /* Time step data will be saved every fileskip
steps */
p_sim->mode=1; /* Mode of operation :1=time domain
2=stability type 1
3=stability type 2
4=envelope */
return;
}

int load_setup_file(SIM_PARAM *p_sim, TOOL_INFO *p_tool, WORKPIECE_INFO *p_work,
CUT_PARAM *p_cut,STAB_CHART_PARAM *p_stab_p)
/* This function reads simulation parameters from a data file
This function recieves pointers to the simulation, tool, workpiece, and
cutting data structures to be initialized. */
111
{
FILE *fp;
/* string is the line read from the file, p_var is the varaible name string
pulled out of that line, p_val is the value string pulled from that
line. */
char string[LINESIZE],*p_var[LINESIZE],*p_val[LINESIZE];

/* Opens input file for reading. */
fp=fopen(SETUP_FILE,"r");

/* Checks to make sure the file was read correctly. If not prints out
a message and calls the function to create it. */
if (fp==NULL)
{
printf("Setup file %s not found. Creating it from defaults\n",SETUP_FILE);
printf("Simulation will run using default settings\n");
make_setup_file(p_sim, p_tool,p_work,p_cut,p_stab_p);
return NOFILE;
}

/* Reads and scans through the input file. */
while (fgets(string,LINESIZE-1,fp)!=NULL)
{
make_token(string,p_var,p_val);
set_param(p_var,p_val,p_sim, p_tool,p_work,p_cut,p_stab_p);
}

fclose(fp);
return READFILE;
}

int cmd_line_arg(int argc, char *argv[], SIM_PARAM *p_sim,
TOOL_INFO *p_tool, WORKPIECE_INFO *p_work,
CUT_PARAM *p_cut, STAB_CHART_PARAM *p_stab_p)
/* This function reads simulation parameters from the command line. argc,
and argv are the command line variables passed to main. This function
recieves pointers to the simulation, tool, workpiece, and cutting data
structures to be initialized. */
{
char *p_var[LINESIZE],*p_val[LINESIZE];

/* This loop analyzes each of the command line arguments */
while (--argc>0)
{
make_token(*++argv,p_var,p_val);
set_param(p_var,p_val,p_sim, p_tool,p_work,p_cut,p_stab_p);
}

return 1;
}

void make_token(char *string, char **pp_var, char **pp_val)
/* Splits the input variable 'string' into two parts, pp_var and pp_val
using an '=' symbol to separate them. */
{
/* This line pulls out the part of 'string' between the first non-space
character and the first appearance of an '=' sign. */
*pp_var=strtok(string, " =");
/* This line pulls out the part of 'string' between the '=' sign and the
next space. */
*pp_val=strtok(NULL," ");
}

void set_param(char **pp_var, char **pp_val,SIM_PARAM *p_sim,
112
TOOL_INFO *p_tool,WORKPIECE_INFO *p_work,CUT_PARAM *p_cut,
STAB_CHART_PARAM *p_stab_p)
/* Sets variables according to the variable name string referenced by pp_var,
and the value string referenced by pp_val.
This function recieves pointers to the simulation, tool, workpiece, and
cutting data structures to be initialized. */
{

if (!strcmp(*pp_var,"kx"))
p_tool->kx=atof(*pp_val); /* Tool stiffness in x direction */
if (!strcmp(*pp_var,"ky"))
p_tool->ky=atof(*pp_val); /* Tool stiffness in y direction */
if (!strcmp(*pp_var,"mx"))
p_tool->mx=atof(*pp_val); /* Effective mass in x direction */
if (!strcmp(*pp_var,"my"))
p_tool->my=atof(*pp_val); /* Effective mass in y direction */
if (!strcmp(*pp_var,"zetax"))
p_tool->zetax=atof(*pp_val); /* Damping ratio for x direction */
if (!strcmp(*pp_var,"zetay"))
p_tool->zetay=atof(*pp_val); /* Damping ratio for y direction */

if (!strcmp(*pp_var,"cutstiff"))
p_work->cutstiff=atof(*pp_val); /* Workpiece cutting stiffness */
if (!strcmp(*pp_var,"d0"))
p_work->d0=atof(*pp_val); /* Workpiece Diameter */
if (!strcmp(*pp_var,"N"))
p_work->N=atof(*pp_val); /* Rotational Speed, RPM */

if (!strcmp(*pp_var,"DOC"))
p_cut->DOC=atof(*pp_val); /* Depth of cut, meters per revolution */
if (!strcmp(*pp_var,"b"))
p_cut->b=atof(*pp_val); /* Width of cut */
if (!strcmp(*pp_var,"db_dt"))
p_cut->db_dt=atof(*pp_val); /* rate of change of Width of cut */

if (!strcmp(*pp_var,"theta"))
p_cut->theta=atof(*pp_val)*PI/180.0; /* Angle of cutting force */

/* Defines some simulation parameters */
if (!strcmp(*pp_var,"epsmin"))
p_sim->epsmin=atof(*pp_val); /* lower bound on error before increasing
step size*/
if (!strcmp(*pp_var,"epsmax"))
p_sim->epsmax=atof(*pp_val); /* Maximum error per step */
if (!strcmp(*pp_var,"maxiter"))
p_sim->maxiter=atoi(*pp_val); /* Maximum number of time steps */
if (!strcmp(*pp_var,"tfinal"))
p_sim->tfinal=atof(*pp_val); /* End time */
if (!strcmp(*pp_var,"hinc"))
p_sim->hinc=atof(*pp_val); /* Ratio by which step size is increased
if error is too small */
if (!strcmp(*pp_var,"hdec"))
p_sim->hdec=atof(*pp_val); /* Ratio by which step size is decreased
if error is too large */
if (!strcmp(*pp_var,"hmaxrat"))
p_sim->hmaxrat=atof(*pp_val); /* Ratio of maximum step size to initial
step size */
if (!strcmp(*pp_var,"hminrat"))
p_sim->hminrat=atof(*pp_val); /* Ratio of mimimum step size to initial
step size */

if (!strcmp(*pp_var,"rpmfreq")) /* Frequency of spindle speed variation */
p_sim->rpmfreq=atof(*pp_val);
if (!strcmp(*pp_var,"rpmamp")) /* Amplitude of spindle speed variation */
113
p_sim->rpmamp=atof(*pp_val);
if (!strcmp(*pp_var,"toolfreq")) /* Frequency of forced tool y motion */
p_sim->toolfreq=atof(*pp_val);
if (!strcmp(*pp_var,"toolamp")) /* Aplitude of forced tool y motion */
p_sim->toolamp=atof(*pp_val);
if (!strcmp(*pp_var,"mode")) /* Mode of operation */
p_sim->mode=atoi(*pp_val);
if (!strcmp(*pp_var,"fileskip"))
p_sim->fileskip=atoi(*pp_val); /* step saving interval */
if (!strcmp(*pp_var,"constfeed"))
p_sim->constfeed=atoi(*pp_val); /* Whether or not feed is constant */

if (!strcmp(*pp_var,"bmax"))
p_stab_p->bmax=atof(*pp_val); /* Maximum initial width of cut */
if (!strcmp(*pp_var,"bmaxabs"))
p_stab_p->bmaxabs=atof(*pp_val); /* Maximum final width of cut */
if (!strcmp(*pp_var,"bmin"))
p_stab_p->bmin=atof(*pp_val); /* Minimum initial width of cut */
if (!strcmp(*pp_var,"bminabs"))
p_stab_p->bminabs=atof(*pp_val); /* Minimum final width of cut */
if (!strcmp(*pp_var,"slots"))
p_stab_p->slots=atof(*pp_val); /* Increment to shift upper and lower
limits by */
if (!strcmp(*pp_var,"tolerance"))
p_stab_p->tolerance=atof(*pp_val); /* Tolerance on width of cut */
if (!strcmp(*pp_var,"Nmax"))
p_stab_p->Nmax=atof(*pp_val); /* Maximum spindle speed */
if (!strcmp(*pp_var,"Nmin"))
p_stab_p->Nmin=atof(*pp_val); /* Minimum spindle speed */
if (!strcmp(*pp_var,"Nsteps"))
p_stab_p->Nsteps=atoi(*pp_val); /* Number of increments in spindle
speed */
if (!strcmp(*pp_var,"initrot"))
p_stab_p->initrot=atoi(*pp_val); /* Initial rotations */
if (!strcmp(*pp_var,"maxchanges"))
p_stab_p->maxchanges=atoi(*pp_val); /* Number of changes in amplitude to
watch for */
if (!strcmp(*pp_var,"maxxmotion"))
p_stab_p->maxxmotion=atof(*pp_val); /* Maximum permissible x-direction
motion*/

return;
}

void init_param(SIM_PARAM *p_sim, TOOL_INFO *p_tool, WORKPIECE_INFO *p_work,
CUT_PARAM *p_cut, STAB_CHART_PARAM *p_stab_p)
/* Computes values based on the parameters defined.
This function recieves pointers to the simulation, tool, workpiece, and
cutting data structures to be initialized. */
{
double deltat; /* Used as an intermediate variable for finding
the time step */

/* Compute Damping Constant */
p_tool->cx=2.0*p_tool->zetax*sqrt(p_tool->mx*p_tool->kx);
p_tool->cy=2.0*p_tool->zetay*sqrt(p_tool->my*p_tool->ky);

p_work->rotperiod=60.0/p_work->N; /* Rotation period */

p_cut->alpha=sin(p_cut->theta); /* X-direction force component */
p_cut->beta=cos(p_cut->theta); /* Y-direction force component */

/* Compute constants used in derivative function. If the stiffness or mass
in any direction is zero it is assumed that that DOF is inactive. */
114
if ((p_tool->kx==0.0)||(p_tool->mx==0.0))
{
p_sim->cx1=0.0;
p_sim->cx2=0.0;
p_sim->cx3=0.0;
p_tool->omegax=0.0;
}
else
{
p_sim->cx1=-p_tool->cx/p_tool->mx;
p_sim->cx2=-p_tool->kx/p_tool->mx;
/* This is not actually cx3 but is multiplied by p_cut->b to get cx3 */
p_sim->cx3=-p_cut->alpha*p_work->cutstiff/p_tool->mx;
p_tool->omegax=sqrt(p_tool->kx/p_tool->mx);
}

if ((p_tool->ky==0.0)||(p_tool->my==0.0))
{
p_sim->cy1=0.0;
p_sim->cy2=0.0;
p_sim->cy3=0.0;
p_tool->omegay=0.0;
}
else
{
p_sim->cy1=-p_tool->cy/p_tool->my;
p_sim->cy2=-p_tool->ky/p_tool->my;
/* This is not actually cy3 but is multiplied by p_cut->b to get cy3 */
p_sim->cy3=-p_cut->beta*p_work->cutstiff/p_tool->my;
p_tool->omegay=sqrt(p_tool->my/p_tool->my);
}

/* The next few lines of code sets the initial time step to be 1/10 the
period of the highest natural freqency */
if ((p_tool->omegax==0.0)&&(p_tool->omegay==0.0))
deltat=p_sim->tfinal/((double) p_sim->maxiter);
else
{
if (p_tool->omegax>p_tool->omegay)
deltat=2.0*PI/p_tool->omegax/10.0;
else
deltat=2.0*PI/p_tool->omegay/10.0;
}
/* Defines some simulation parameters */
p_sim->h=deltat;
p_sim->hmax=deltat*p_sim->hmaxrat;
p_sim->hmin=deltat/p_sim->hminrat;

/* Copies some things into p_sim so that fewer variables are passed
around later */
/* Width of cut stuff */
p_sim->b=p_cut->b;
p_sim->db_dt=p_cut->db_dt;

/* workpiece diameter * pi. Used to find last DOC. */
p_sim->d0pi=p_work->d0*PI;

/* Linear Feed speed into workpiece */
p_sim->feed=p_cut->DOC*p_work->N/60.0;

/* Linear relative velocity of tool wrt workpiece */
p_sim->V=p_work->N/60.0*p_work->d0*PI;

/* Forced tool motion frequency in rad/sec */
115
p_sim->toolomega=p_sim->toolfreq*2.0*PI;

/* Variation of spindle speed coefficient for computing L */
if (p_sim->rpmfreq!=0.0)
{
p_sim->rpmomega=p_sim->rpmfreq*2.0*PI;
p_sim->rpmcoeff=p_sim->rpmamp*p_sim->V/p_sim->rpmomega;
if (p_sim->constfeed==1)
p_sim->feedcoeff=0.0;
else
p_sim->feedcoeff=p_sim->rpmamp*p_sim->feed/p_sim->rpmomega;
}
else
{
p_sim->rpmomega=0.0;
p_sim->rpmcoeff=0.0;
p_sim->feedcoeff=0.0;
}

/* Spindle speed increment for stability chart generation */
p_stab_p->increment=(p_stab_p->bmaxabs-p_stab_p->bminabs)/p_stab_p->slots;

if (p_tool->kx!=0.0)
p_sim->xmeandisp=-p_sim->b*p_work->cutstiff*p_cut->DOC/p_tool->kx
*sin(p_cut->theta);
else p_sim->xmeandisp=0.0;

p_sim->xmaxdisp=p_sim->xmeandisp/(1+p_sim->rpmamp);
p_sim->xmindisp=p_sim->xmeandisp/(1-p_sim->rpmamp);

return;
}

void make_setup_file(SIM_PARAM *p_sim, TOOL_INFO *p_tool,
WORKPIECE_INFO *p_work,CUT_PARAM *p_cut,
STAB_CHART_PARAM *p_stab_p)
/* Creates a configuration file if one is not found.
Initializes variables using default parameters */
{
FILE *fp;

fp=fopen(SETUP_FILE,"w");

fprintf(fp,"kx=%e /* Tool stiffness in x direction */\n",p_tool->kx);
fprintf(fp,"ky=%e /* Tool stiffness in y direction */\n",p_tool->ky);
fprintf(fp,"mx=%f /* Effective mass in x direction */\n",p_tool->mx);
fprintf(fp,"my=%f /* Effective mass in y direction */\n",p_tool->my);
fprintf(fp,"zetax=%e /* Damping ratio for x direction */\n",
p_tool->zetax);
fprintf(fp,"zetay=%e /* Damping ratio for y direction */\n",
p_tool->zetay);

fprintf(fp,"cutstiff=%e /* Workpiece cutting stiffness */\n",
p_work->cutstiff);
fprintf(fp,"d0=%f /* Workpiece Diameter */\n",p_work->d0);
fprintf(fp,"N=%f /* Rotational Speed, RPM */\n",p_work->N);

fprintf(fp,"DOC=%e /* Depth of cut, meters per revolution */\n",
p_cut->DOC);
fprintf(fp,"b=%e /* Width of cut */\n",p_cut->b);
fprintf(fp,"db_dt=%e /* Rate of change of width of cut */\n",p_cut->db_dt);
fprintf(fp,"theta=%f /* Angle of cutting force in degrees* /\n",
p_cut->theta*180/PI);

116
/* Defines some simulation parameters */
fprintf(fp,"epsmin=%e /* lower bound on error before increasing\n",
p_sim->epsmin);
fprintf(fp,"epsmax=%e /* Maximum error per step */\n",p_sim->epsmax);
fprintf(fp,"maxiter=%d /* Maximum number of time steps */\n",
p_sim->maxiter);
fprintf(fp,"tfinal=%f /* End time */\n",p_sim->tfinal);
fprintf(fp,"hinc=%f /* Ratio by which step size is increased if\n",
p_sim->hinc);
fprintf(fp,"hdec=%f /* Ratio by which step size is decreaed if\n",
p_sim->hdec);
fprintf(fp,"hmaxrat=%f /* Ratio of maximum step size to initial\n",
p_sim->hmaxrat);
fprintf(fp,"hminrat=%f /* Ratio of mimimum step size to initial\n",
p_sim->hminrat);

fprintf(fp,"rpmfreq=%f /* Frequency of spindle speed variation */\n",
p_sim->rpmfreq);
fprintf(fp,"rpmamp=%f /* Amplitude of spindle speed variation */\n",
p_sim->rpmamp);
fprintf(fp,"toolfreq=%f /* Frequency of forced tool y motion */\n",
p_sim->toolfreq);
fprintf(fp,"toolamp=%f /* Aplitude of forced tool y motion */ \n",
p_sim->toolamp);
fprintf(fp,"mode=%f /* Mode of operation */ \n",
p_sim->mode);
fprintf(fp,"fileskip=%f /* Step save interval */ \n",
p_sim->fileskip);
fprintf(fp,"constfeed=%f /* Whther feed rate is constant \n",
p_sim->constfeed);

fprintf(fp,"bmax=%f /* Maximum initial width of cut \n",
p_stab_p->bmax);
fprintf(fp,"bmaxabs=%f /* Maximum final width of cut \n",
p_stab_p->bmaxabs);
fprintf(fp,"bmin=%f; /* Minimum initial width of cut \n",
p_stab_p->bmin);
fprintf(fp,"bminabs=%f /* Minimum final width of cut \n",
p_stab_p->bminabs);
fprintf(fp,"slots=%f /* Increment to shift upper and lower limits by \n",
p_stab_p->slots);
fprintf(fp,"tolerance=%f /* Tolerance on width of cut \n",
p_stab_p->tolerance);
fprintf(fp,"Nmax=%f /* Maximum spindle speed \n",
p_stab_p->Nmax);
fprintf(fp,"Nmin=%f /* Minimum spindle speed \n",
p_stab_p->Nmin);
fprintf(fp,"Nsteps=%f /* Number of increments in spindle speed \n",
p_stab_p->Nsteps);
fprintf(fp,"initrot=%f /* Initial rotations */\n",
p_stab_p->initrot);
fprintf(fp,"maxchanges=%f /* Number of changes in amplitude to watch for
*/\n",
p_stab_p->maxchanges);
fprintf(fp,"maxxmotion=%f /* Maximum permissible x-direction motion*/\n",
p_stab_p->maxxmotion);
fclose(fp);

return;
}
117
A.9. integ.h
/* integ.h
This header file contains information for the RK45
integrator function */

/* The following structure is used to hold constants for the rk45 function */
typedef struct
{
double c20,c21,c30,c31,c32,c40,c41,c42,c43,c51,c52,c53,c54,
c60,c61,c62,c63,c64,c65,a1,a2,a3,a4,a5,b1,b2,b3,b4,b5,b6;
} RK45CONST;
A.10. integ.c
/* integ.c
This file contains RK45 related functions for time domain simulation of
IVP differential equations. */

#include <stdlib.h>
#include <stdio.h>
#include <math.h>

#include "orthsim.h"
#include "cutlist.h"
#include "integ.h"

/* Function prototypes */
void rk45init(RK45CONST *p_rkcon);

double rk45step(void *p_ypfun(),RK45CONST *p_rkcon,SIM_PARAM *p_sim,
int npres,int nnext,HISTORY *p_hpres,HISTORY *p_hnext,
HISTORY **pp_hlastcut,int *p_nlastcut,
STEPDATA *p_spres,STEPDATA *p_snext);

int rk45ad(void *p_ypfun(),RK45CONST *p_rkcon,SIM_PARAM *p_sim,
HISTORY *p_hpres,int npres,HISTORY **pp_hfinal,int *p_nfinal,
STEPDATA *p_spres, int printout,int writefile,int append,
char *datafile);

void rk45init(RK45CONST *p_rkcon)
/* This function initializes the RK45 coefficients */
{
p_rkcon->c20=0.25;
p_rkcon->c21=0.25;

p_rkcon->c30=0.375;
p_rkcon->c31=0.09375;
p_rkcon->c32=0.28125;

p_rkcon->c40=12.0/13.0;
p_rkcon->c41=1932.0/2197.0;
p_rkcon->c42=-7200.0/2197.0;
p_rkcon->c43=7296.0/2197.0;

p_rkcon->c51=439.0/216.0;
p_rkcon->c52=-8.0;
p_rkcon->c53=3680.0/513.0;
118
p_rkcon->c54=-845.0/4104.0;

p_rkcon->c60=0.5;
p_rkcon->c61=-8.0/27.0;
p_rkcon->c62=2.0;
p_rkcon->c63=-3544.0/2565.0;
p_rkcon->c64=1859.0/4104.0;
p_rkcon->c65=-0.275;

p_rkcon->a1=25.0/216.0;
p_rkcon->a2=0.0;
p_rkcon->a3=1408.0/2565.0;
p_rkcon->a4=2197.0/4104.0;
p_rkcon->a5=-0.2;

p_rkcon->b1=16.0/135.0;
p_rkcon->b2=0.0;
p_rkcon->b3=6656.0/12825.0;
p_rkcon->b4=28561.0/56430.0;
p_rkcon->b5=-0.18;
p_rkcon->b6=2.0/55.0;

return;
}

double rk45step(void *p_ypfun(),RK45CONST *p_rkcon,SIM_PARAM *p_sim,
int npres,int nnext,HISTORY *p_hpres,HISTORY *p_hnext,
HISTORY **pp_hlastcut,int *p_nlastcut,
STEPDATA *p_spres,STEPDATA *p_snext)
/* This function makes a single step using RK45 and returns an estimate of
the error involved in taking that step.
It recieves as arguments:
p_ypfun: pointer to derivative function
p_rkcon: constants for rk45 functions
p_sim: pointer to structure with simulation parameters
npres: the index within a history structure of the current time step
nnext: the index within a history structure of the next time step
p_hpres: pointer to current history structure
p_hnext: pointer to next history structure
pp_hlastcut: pointer to the history structure containing the surface
data that was involved in chip calculations
the previous time step
p_nlastcut: the most recent time step within pp_hlastcut that is older
than the true previous position on the previous time step
p_spres: Present time step data */
{
double F1[STATES],F2[STATES],F3[STATES],F4[STATES],F5[STATES],F6[STATES],
h4[STATES]; /* various intermediate derivative terms and 4th
order estimate of next position */
double eps; /* error estimate */
double htemp; /* Temporary variable to hold time step size */
double Llast; /* Value of L at the start of the time step */
int i; /* used for counting in loops */

eps=0.0;

/* Start of RK45 method code */
F1[0]=p_spres->Svec[1]*p_sim->h;
F1[1]=p_spres->Svecdot[0]*p_sim->h;
F1[2]=p_spres->Svec[3]*p_sim->h;
F1[3]=p_spres->Svecdot[1]*p_sim->h;

htemp=p_sim->h;
Llast=p_hpres->L[npres];
119

p_sim->h=htemp*p_rkcon->c20;
p_snext->T=p_spres->T+p_sim->h;
for (i=0;i<STATES;i++)
p_snext->Svec[i]=p_spres->Svec[i]+p_rkcon->c21*F1[i];
p_ypfun(p_sim,p_hnext,nnext,pp_hlastcut,p_nlastcut,F2,p_snext,Llast);
for (i=0;i<STATES;i++)
F2[i]=F2[i]*htemp;

p_sim->h=htemp*p_rkcon->c30;
p_snext->T=p_spres->T+p_sim->h;
for (i=0;i<STATES;i++)
p_snext->Svec[i]=p_spres->Svec[i]+p_rkcon->c31*F1[i]
+p_rkcon->c32*F2[i];
p_ypfun(p_sim,p_hnext,nnext,pp_hlastcut,p_nlastcut,F3,p_snext,Llast);
for (i=0;i<STATES;i++)
F3[i]=F3[i]*htemp;

p_sim->h=htemp*p_rkcon->c40;
p_snext->T=p_spres->T+p_sim->h;
for (i=0;i<STATES;i++)
p_snext->Svec[i]=p_spres->Svec[i]+p_rkcon->c41*F1[i]
+p_rkcon->c42*F2[i]+p_rkcon->c43*F3[i];
p_ypfun(p_sim,p_hnext,nnext,pp_hlastcut,p_nlastcut,F4,p_snext,Llast);
for (i=0;i<STATES;i++)
F4[i]=F4[i]*htemp;

p_sim->h=htemp;
p_snext->T=p_spres->T+p_sim->h;
for (i=0;i<STATES;i++)
p_snext->Svec[i]=p_spres->Svec[i]+p_rkcon->c51*F1[i]
+p_rkcon->c52*F2[i]+p_rkcon->c53*F3[i]
+p_rkcon->c54*F4[i];
p_ypfun(p_sim,p_hnext,nnext,pp_hlastcut,p_nlastcut,F5,p_snext,Llast);
for (i=0;i<STATES;i++)
F5[i]=F5[i]*htemp;

p_sim->h=htemp*p_rkcon->c60;
p_snext->T=p_spres->T+p_sim->h;
for (i=0;i<STATES;i++)
p_snext->Svec[i]=p_spres->Svec[i]+p_rkcon->c61*F1[i]
+p_rkcon->c62*F2[i]+p_rkcon->c63*F3[i]
+p_rkcon->c64*F4[i]+p_rkcon->c65*F5[i];
p_ypfun(p_sim,p_hnext,nnext,pp_hlastcut,p_nlastcut,F6,p_snext,Llast);
for (i=0;i<STATES;i++)
F6[i]=F6[i]*htemp;

p_sim->h=htemp;

for (i=0;i<STATES;i++)
{
h4[i]=p_spres->Svec[i]+p_rkcon->a1*F1[i]+p_rkcon->a3*F3[i]
+p_rkcon->a4*F4[i]+p_rkcon->a5*F5[i];
p_snext->Svec[i]=p_spres->Svec[i]+p_rkcon->b1*F1[i]
+p_rkcon->b3*F3[i]+p_rkcon->b4*F4[i]
+p_rkcon->b5*F5[i]+p_rkcon->b6*F6[i];
eps=eps+fabs(h4[i]-p_snext->Svec[i]);
}

p_snext->T=p_spres->T+p_sim->h;
p_ypfun(p_sim,p_hnext,nnext,pp_hlastcut,p_nlastcut,F1,p_snext,Llast);

return eps;
}
120

int rk45ad(void *p_ypfun(),RK45CONST *p_rkcon,SIM_PARAM *p_sim,
HISTORY *p_hpres,int npres,HISTORY **pp_hfinal,int *p_nfinal,
STEPDATA *p_spres, int printout,int writefile,int append,
char *datafile)
/* This is the function that uses an adaptive RK45 scheme to solve an IVP */
/* p_ypfun: pointer to derivative function
p_sim: pointer to structure containing simulation parameters
p_hpres: pointer to initial data structure for holding history info
npres: index of initial time step within p_hpres
pp_hfinal: points to the structure containing the last time step performed
p_nfinal: index of last step performed within pp_hfinal
printout: if != 0 will print the progress of the run during execution
writefile: if !=0 will open and write data to a file
append: if !=0 will append to datafile
datafile: contains name of output file */
{
int nnext,nlastcut,j; /* nnext: next time step index
nlastcut: index of tool previous position
on previous time step */
double htemp; /* Used to store the last regular step
before the final step */

HISTORY *p_hnext,*p_hlastcut; /* p_hnext: pointer to history structure
for next time step
p_hlastcut: pointer to structure for
nlastcut. */
STEPDATA snext,*p_snext; /* pointers to data for next time step */
STEPDATA *p_stemp,*p_sorig;

double eps; /* Error estimate */

extern HISTORY *new_history(HISTORY *); /* new history structure function */

FILE *fp;

if (writefile)
{
if (append==0)
{
fp=fopen(datafile, "w");
fprintf(fp,"%e, ",p_spres->T);
for (j=0;j<STATES;j++)
fprintf(fp,"%10.9e, ", p_spres->Svec[j]);
fprintf(fp,"%10.9e, ", p_spres->Svecdot[0]);
fprintf(fp,"%10.9e, ", p_spres->Svecdot[1]);
fprintf(fp,"%10.9e, ", p_spres->RDIFF);
fprintf(fp,"%10.9e, ",p_hpres->L[npres]);
fprintf(fp,"%10.9e\n",p_hpres->R[npres]);
}
else
fp=fopen(datafile, "a");

if (fp==NULL)
printf("Error opening output file %s\n",datafile);
}

/* Keeps track of the original step data structure */
p_sorig=p_spres;
p_snext=&snext;

eps=0.0;

/* Initializes the variables for the next time step */
121
p_hnext=p_hpres;
nnext=npres+1;

/* Produces a new history structure as needed */
if (nnext==CHUNK_SIZE)
{
if (p_hpres->p_next==NULL)
p_hnext=(HISTORY *) new_history(p_hpres);
else
p_hnext=p_hpres->p_next;
nnext=0;
}

/* Initializes variables for last cut data */
p_hlastcut=p_hpres;
nlastcut=npres;

/* Open data file for writing. Will overwrite any existing file with
the same name */

/* Loops until the final time or maximum iterations is reached */
while ((p_spres->T<p_sim->tfinal)&&(p_sim->totsteps<p_sim->maxiter))
{
/* Corrects step sizes */
if (p_sim->h>p_sim->hmax)
p_sim->h=p_sim->hmax;
if (p_sim->h<p_sim->hmin)
p_sim->h=p_sim->hmin;
if ((p_sim->h+p_spres->T)>p_sim->tfinal)
{
htemp=p_sim->h;
p_sim->h=p_sim->tfinal-p_spres->T;
}

/* Produces a new history structure as needed */
if (nnext==CHUNK_SIZE)
{
if (p_hpres->p_next==NULL)
{
p_hnext=(HISTORY *) new_history(p_hpres);
}
else
p_hnext=p_hpres->p_next;
nnext=0;
}
/* printf("Time = %e, Step = %d, Step size = %e, ",p_hpres-
>T[npres],totsteps,p_sim->h);*/
eps=rk45step(p_ypfun,p_rkcon,p_sim,npres,nnext,p_hpres,p_hnext,
&p_hlastcut,&nlastcut,p_spres,p_snext);

if (printout)
printf("%4.1f%%, Totstep= %d\r", p_spres->T/p_sim->tfinal*100,
p_sim->totsteps);

/* Updates everything to the next time step if the error is acceptable*/
if ((eps<=p_sim->epsmax)||(p_sim->h<=p_sim->hmin))
{
p_sim->totsteps=p_sim->totsteps+1;

/* Points to the next present history data step */
npres=nnext;
p_hpres=p_hnext;
nnext=nnext+1;

122
/* Swaps pointers to the step data */
p_stemp=p_spres;
p_spres=p_snext;
p_snext=p_stemp;

/* This write the output data when needed */
if (!(p_sim->totsteps%p_sim->fileskip)&&(writefile))
{
fprintf(fp,"%e, ",p_spres->T);
for (j=0;j<STATES;j++)
fprintf(fp,"%10.9e, ", p_spres->Svec[j]);
fprintf(fp,"%10.9e, ", p_spres->Svecdot[0]);
fprintf(fp,"%10.9e, ", p_spres->Svecdot[1]);
fprintf(fp,"%10.9e, ", p_spres->RDIFF);
fprintf(fp,"%10.9e, ",p_hpres->L[npres]);
fprintf(fp,"%10.9e\n",p_hpres->R[npres]);
}

if (p_spres->Svec[0]>(p_sim->xmax))
{
p_sim->xmax=p_spres->Svec[0];
p_sim->txmax=p_spres->T;
}
if (p_spres->Svec[0]<(p_sim->xmin))
{
p_sim->xmin=p_spres->Svec[0];
p_sim->txmin=p_spres->T;
}
if (p_spres->Svec[1]>(p_sim->xvmax))
{
p_sim->xvmax=p_spres->Svec[1];
p_sim->txvmax=p_spres->T;
}
if (p_spres->Svec[1]<(p_sim->xvmin))
{
p_sim->xvmin=p_spres->Svec[1];
p_sim->txvmin=p_spres->T;
}
if (p_spres->Svecdot[0]>(p_sim->xamax))
{
p_sim->xamax=p_spres->Svecdot[0];
p_sim->txamax=p_spres->T;
}
if (p_spres->Svecdot[0]<(p_sim->xamin))
{
p_sim->xamin=p_spres->Svecdot[0];
p_sim->txamin=p_spres->T;
}
if (p_spres->Svec[2]>(p_sim->ymax))
{
p_sim->ymax=p_spres->Svec[2];
p_sim->tymax=p_spres->T;
}
if (p_spres->Svec[2]<(p_sim->ymin))
{
p_sim->ymin=p_spres->Svec[2];
p_sim->tymin=p_spres->T;
}
if (p_spres->Svec[3]>(p_sim->yvmax))
{
p_sim->yvmax=p_spres->Svec[3];
p_sim->tyvmax=p_spres->T;
}
if (p_spres->Svec[3]<(p_sim->yvmin))
123
{
p_sim->yvmin=p_spres->Svec[3];
p_sim->tyvmin=p_spres->T;
}
if (p_spres->Svecdot[1]>(p_sim->yamax))
{
p_sim->yamax=p_spres->Svecdot[1];
p_sim->tyamax=p_spres->T;
}
if (p_spres->Svecdot[1]<(p_sim->yamin))
{
p_sim->yamin=p_spres->Svecdot[1];
p_sim->tyamin=p_spres->T;
}
}

/* Increases the step size if the error estimate is too small */
if (eps<p_sim->epsmin)
p_sim->h=p_sim->h*p_sim->hinc;

/* Decreases the step size if the step is not acceptable */
if (eps>p_sim->epsmax)
{
p_sim->h=p_sim->h*p_sim->hdec;
}

}

/* Sets the pointers to the final time step performed */
*pp_hfinal=p_hpres;
*p_nfinal=npres;

/* resets time step to the stored temporary value */
p_sim->h=htemp;


/* Resets the original present time step values to the actual last time step*/
if (p_spres!=p_sorig)
{
p_sorig->T=p_spres->T;
p_sorig->RDIFF=p_spres->RDIFF;
p_sorig->Svecdot[0]=p_spres->Svecdot[0];
p_sorig->Svecdot[1]=p_spres->Svecdot[1];
p_sorig->Svec[0]=p_spres->Svec[0];
p_sorig->Svec[1]=p_spres->Svec[1];
p_sorig->Svec[2]=p_spres->Svec[2];
p_sorig->Svec[3]=p_spres->Svec[3];
}

/* Close Data file */
if (writefile)
fclose(fp);

/* Checks if the simulation ran to the desired time */
if (p_spres->T<p_sim->tfinal)
return 0;
else
return p_sim->totsteps;
}
124
A.11. stabchk.h
/* stabchk.h
Thomas O'Reilly June 4 1997
Stability checking stuff */

#define STABLE -1 /* Value returned for stable system */
#define UNSTABLE 1 /* Value returned for unstable system */
#define STAB_ERROR 0 /* Value returned if error detected */
A.12. stabchk.c
/* stabchk.c
Thomas O'Reilly June 4 1997
Stability checking stuff */

#include <math.h>
#include <stdlib.h>
#include <stdio.h>

#include "orthsim.h"
#include "cutlist.h"
#include "stabchk.h"
#include "integ.h"

/* Function Prototypes */
int stab_check1(void (*p_ypfun)(),RK45CONST *p_rkcon,SIM_PARAM sim,
HISTORY *p_hist,STEPDATA *p_spres, WORKPIECE_INFO *p_work,
int printout,STAB_CHART_PARAM *p_stabp);

int stab_check2(void (*p_ypfun)(),RK45CONST *p_rkcon,SIM_PARAM sim,
HISTORY *p_hist,STEPDATA *p_spres, WORKPIECE_INFO *p_work,
int printout,STAB_CHART_PARAM *p_stabp);

int stab_check3(void (*p_ypfun)(),RK45CONST *p_rkcon,SIM_PARAM sim,
HISTORY *p_hist,STEPDATA *p_spres, WORKPIECE_INFO *p_work,
int printout,STAB_CHART_PARAM *p_stabp);

int stab_check4(void (*p_ypfun)(),RK45CONST *p_rkcon,SIM_PARAM sim,
HISTORY *p_hist,STEPDATA *p_spres, WORKPIECE_INFO *p_work,
int printout,STAB_CHART_PARAM *p_stabp);

double stab_limit(void (*p_ypfun)(),int (*p_schk)(),RK45CONST *p_rkcon,
SIM_PARAM sim,
HISTORY *p_hist,TOOL_INFO tool,WORKPIECE_INFO work,
CUT_PARAM cut,STAB_CHART_PARAM *stab_p,
STEPDATA *p_spres);

void sweep_speeds(void (*p_ypfun)(),int (*p_schk)(),SIM_PARAM sim,
STEPDATA *p_spres,
HISTORY *p_hist,TOOL_INFO tool,WORKPIECE_INFO work,
CUT_PARAM cut,STAB_CHART_PARAM stab_p);

/* Real stuff starts here */
void sweep_speeds(void (*p_ypfun)(),int (*p_schk)(),SIM_PARAM sim,
STEPDATA *p_spres,
HISTORY *p_hist,TOOL_INFO tool,WORKPIECE_INFO work,
CUT_PARAM cut,STAB_CHART_PARAM stab_p)
125
/* This function scans across a number of spindle speeds and examines the
stability of the system at each. */
{
double Ninc,blim;
int Nsteps;

FILE *fp;

int i;

RK45CONST *p_rkcon; /* Structure of rk45 constants */

/* Allocates space for rk45 constants */
p_rkcon=(RK45CONST *) malloc(sizeof(RK45CONST));

/* Initializes rk45 constants */
rk45init(p_rkcon);
/* Open Output file */
fp=fopen("stabch.txt","w");
if (fp==NULL)
printf("stabch.txt file not opened");

work.N=stab_p.Nmin;
Ninc=(double) (stab_p.Nmax-stab_p.Nmin)/stab_p.Nsteps;
init_param(&sim, &tool, &work, &cut,&stab_p);
printf("N=%f\n",work.N);

while (work.N<=stab_p.Nmax)
{
blim=stab_limit(p_ypfun,p_schk,p_rkcon,sim,p_hist,tool,work,cut,&stab_p,
p_spres);

fprintf(fp,"%e %e\n",work.N,blim);
printf("%4.1f %% done, N=%f, blim=%f\n",
(work.N-stab_p.Nmin)/(stab_p.Nmax-stab_p.Nmin)*100.0,work.N,blim);
work.N=work.N+Ninc;
init_param(&sim, &tool, &work, &cut,&stab_p);
}
fclose(fp);
}

double stab_limit(void (*p_ypfun)(),int (*p_schk)(),RK45CONST *p_rkcon,SIM_PARAM
sim,
HISTORY *p_hist,TOOL_INFO tool,WORKPIECE_INFO work,
CUT_PARAM cut,STAB_CHART_PARAM *p_stabp,
STEPDATA *p_spres)
/* This Function finds the maximum value of b for stable cutting for the
given system at a certain speed */
{
int maxunstab,minunstab,meanunstab;
double range,bmean;

cut.b=p_stabp->bmax;
sim.b=p_stabp->bmax;
init_param(&sim, &tool, &work, &cut,p_stabp);
maxunstab=p_schk(p_ypfun,p_rkcon,sim,p_hist,p_spres,&work,
NO_PRINT,p_stabp);

cut.b=p_stabp->bmin;
sim.b=p_stabp->bmin;
init_param(&sim, &tool, &work, &cut,p_stabp);
minunstab=p_schk(p_ypfun,p_rkcon,sim,p_hist,p_spres,&work,
NO_PRINT,p_stabp);

126
while (maxunstab==minunstab)
{

/* Check to make sure a limit is bracketed */
if ((p_stabp->bmax==p_stabp->bmaxabs)&&(p_stabp->bmin==p_stabp->bminabs))
{
printf("No limit bracketed. Thats my story and I'm sticking by it.\n");
return p_stabp->bmax;
}
/* If both upper and lower limits are stable, raise both */
else if (maxunstab==STABLE)
{
p_stabp->bmin=p_stabp->bmax;
p_stabp->bmax=p_stabp->bmax+p_stabp->increment;
cut.b=p_stabp->bmax;
sim.b=p_stabp->bmax;
if (cut.b>p_stabp->bmaxabs)
{
cut.b=p_stabp->bmaxabs;
sim.b=p_stabp->bmaxabs;
}
init_param(&sim, &tool, &work, &cut,p_stabp);

maxunstab=p_schk(p_ypfun,p_rkcon,sim,p_hist,p_spres,&work,
NO_PRINT,p_stabp);
}
/* If both upper and lower limits are unstable, lower both */
else if(minunstab==UNSTABLE)
{
p_stabp->bmax=p_stabp->bmin;
p_stabp->bmin=p_stabp->bmin-p_stabp->increment;
cut.b=p_stabp->bmin;
sim.b=p_stabp->bmin;
if (cut.b<p_stabp->bminabs)
{
cut.b=p_stabp->bminabs;
sim.b=p_stabp->bminabs;
}
init_param(&sim, &tool, &work, &cut,p_stabp);

minunstab=p_schk(p_ypfun,p_rkcon,sim,p_hist,p_spres,&work,
NO_PRINT,p_stabp);
}
/* If neither limit gave a good result change both until it works */
else if (minunstab==STAB_ERROR)
{
p_stabp->bmax=p_stabp->bmax+p_stabp->increment;
cut.b=p_stabp->bmax;
sim.b=p_stabp->bmax;
if (cut.b<p_stabp->bmaxabs)
{
cut.b=p_stabp->bmaxabs;
sim.b=p_stabp->bmaxabs;
}
init_param(&sim, &tool, &work, &cut,p_stabp);

maxunstab=p_schk(p_ypfun,p_rkcon,sim,p_hist,p_spres,&work,
NO_PRINT,p_stabp);

p_stabp->bmin=p_stabp->bmin-p_stabp->increment;
cut.b=p_stabp->bmin;
sim.b=p_stabp->bmin;
if (cut.b<p_stabp->bminabs)
{
127
cut.b=p_stabp->bminabs;
sim.b=p_stabp->bminabs;
}
init_param(&sim, &tool, &work, &cut,p_stabp);

minunstab=p_schk(p_ypfun,p_rkcon,sim,p_hist,p_spres,&work,
NO_PRINT,p_stabp);
}
}

while ((p_stabp->bmax-p_stabp->bmin)>p_stabp->tolerance)
{
bmean=(p_stabp->bmax+p_stabp->bmin)/2.0;
cut.b=bmean;
sim.b=bmean;
printf("%f\n",bmean);
init_param(&sim, &tool, &work, &cut,p_stabp);
meanunstab=p_schk(p_ypfun,p_rkcon,sim,p_hist,p_spres,&work,
NO_PRINT,p_stabp);

if (meanunstab==0)
return STAB_ERROR;
else if (meanunstab*minunstab==-1)
{
p_stabp->bmax=bmean;
maxunstab=meanunstab;
}
else
{
p_stabp->bmin=bmean;
minunstab=meanunstab;
}
}
return ((p_stabp->bmax+p_stabp->bmin)/2.0);
}

int stab_check1(void (*p_ypfun)(),RK45CONST *p_rkcon,SIM_PARAM sim,
HISTORY *p_hist,STEPDATA *p_spres,WORKPIECE_INFO *p_work,
int printout,STAB_CHART_PARAM *p_stabp)
/* This function checks the stability of a system by examining the growth
or decay of the motions of the system. This function is used for
constant speed systems. */
{
HISTORY *p_hfinal;
int nstart,nfinal,changes,result;
double xposdiff,xposdiff_last,period;
char *stepdatafile="stepdata.txt";

nstart=0;
changes=0; /* Number of consecutive same sign changes in amplitude */

/* Initialize the system by simulating INIT_ROTATIONS turns of
the workpiece */
sim.tfinal=p_stabp->initrot*p_work->rotperiod;
nstart=0;

init_step(p_spres);

result=rk45ad(p_ypfun,p_rkcon,&sim, p_hist,nstart, &p_hfinal,&nfinal,
p_spres,NO_PRINT,NO_WRITEFILE,NO_APPEND,stepdatafile);

/* Exits if cut is interrupted */
if (sim.int_cut!=0)
return UNSTABLE;
128

xposdiff_last=0.0;

/* Loops until rms vibration amplitude has either increased or decreased
MAX_CHANGES revolutions of the workpiece */
while ((abs(changes)<p_stabp->maxchanges)&&(sim.totsteps<sim.maxiter))
{
/* Initialize Stuff */
sim.xmax=-1000.0;
sim.xmin=1000.0;
sim.xvmax=-1000.0;
sim.xvmin=1000.0;
sim.xamax=-1000.0;
sim.xamin=1000.0;

/* Sets the final time so that the workpiece will spin only one time */
sim.tfinal=sim.tfinal+p_work->rotperiod;

/* Setup up the simulation to start where the last bit left off */
p_hist=p_hfinal;
nstart=nfinal;

/* Simulates the system for one revolution */
result=rk45ad(p_ypfun,p_rkcon,&sim,p_hist,nstart,&p_hfinal,&nfinal,
p_spres,NO_PRINT,NO_WRITEFILE,APPEND,stepdatafile);

/* Returns UNSTABLE if the cut was interrupted */
if (sim.int_cut!=0)
return UNSTABLE;

xposdiff=sim.xmax-sim.xmin;

/* Determines some sort of mean value of the amplitude of the motion */
if (printout)
printf("maxxpos= %e\n", sim.xmax);

/* Compares the amplitude of the motion to that seen on the previous
workpiece rotation */
if (xposdiff==0.0)
return STABLE;
if (xposdiff>xposdiff_last)
{
if (changes>=0.0)
changes++;
else
changes=1;
}
else
{
if (changes<=0.0)
changes--;
else
changes=-1;
}
xposdiff_last=xposdiff;
}

if (changes==p_stabp->maxchanges)
return UNSTABLE; /* Returns one for unstable system */
else if (changes==-p_stabp->maxchanges)
return STABLE; /* Returns -1 for stable system */
else
{
printf("An error has occurred in the stability checking routine\n");
129
printf("Please contact your local Crapsoft (tm) representative \n");
printf("for details on how we would be glad to solve this problem\n");
printf("for a nominal fee.\n");
return STAB_ERROR; /* Returns 0 for a function error */
}
}

int stab_check2(void (*p_ypfun)(),RK45CONST *p_rkcon,SIM_PARAM sim,
HISTORY *p_hist,STEPDATA *p_spres,WORKPIECE_INFO *p_work,
int printout,STAB_CHART_PARAM *p_stabp)
/* This function checks the stability of a system by examining the growth
or decay of the motions of the system. This function is useful for systems
in which the vibrations fall below a given threshold, but do not drop to
zero */
{
HISTORY *p_hfinal;
int nstart,nfinal,changes,result,growing,stop;
double xposdiff,xposdiff_last;
char *stepdatafile="stepdata.txt";

changes=0; /* Number of consecutive same sign changes in amplitude */
stop=0;
/* Initialize the system by simulating INIT_ROTATIONS turns of
the workpiece */
sim.tfinal=p_stabp->initrot*p_work->rotperiod;
nstart=0;

init_step(p_spres);

result=rk45ad(p_ypfun,p_rkcon,&sim, p_hist,nstart, &p_hfinal,&nfinal,
p_spres,NO_PRINT,NO_WRITEFILE,NO_APPEND,stepdatafile);

/* Exits if cut is interrupted */
if (sim.int_cut!=0)
return UNSTABLE;

xposdiff_last=0.0;
growing=0;

/* Loops until vibration amplitude has remained in the allowable band
MAX_CHANGES revolutions of the workpiece */
while (!(stop)&&(sim.totsteps<sim.maxiter))
{
/* Initialize Stuff */
sim.xmax=-1000.0;
sim.xmin=1000.0;
sim.xvmax=-1000.0;
sim.xvmin=1000.0;
sim.xamax=-1000.0;
sim.xamin=1000.0;

/* Setup up the simulation to start where the last bit left off */
p_hist=p_hfinal;
nstart=nfinal;

/* Sets the final time so that the workpiece will spin only one time */
sim.tfinal=sim.tfinal+p_work->rotperiod;

/* Simulates the system for one revolution */
result=rk45ad(p_ypfun,p_rkcon,&sim,p_hist,nstart,&p_hfinal,&nfinal,
p_spres,NO_PRINT,NO_WRITEFILE,APPEND,stepdatafile);

xposdiff=sim.xmax-sim.xmin;

130
/* Returns UNSTABLE if the cut was interrupted */
if (sim.int_cut!=0)
return UNSTABLE;

/* Determines some sort of mean value of the amplitude of the motion */
if (printout)
printf("xposdiff= %e\n", xposdiff);

/* Compares the amplitude of the motion to that seen on the previous
workpiece rotation */
if (xposdiff==0.0)
return STABLE;
if (xposdiff>p_stabp->maxxmotion)
{
if (changes>=0)
changes++;
else
changes=1;

if (changes==p_stabp->maxchanges)
stop=1;
}
else
{
if (changes<=0)
changes--;
else
changes=-1;

if (xposdiff>xposdiff_last)
growing=growing+1;
else
growing=0;

if (((-changes==p_stabp->maxchanges)&&(growing<p_stabp->maxchanges))||
(growing>p_stabp->maxchanges))
{
stop=1;
if (growing>p_stabp->maxchanges)
changes=p_stabp->maxchanges;
}
}
xposdiff_last=xposdiff;

}

if (changes==p_stabp->maxchanges)
return UNSTABLE; /* Returns one for unstable system */
else if (changes==-p_stabp->maxchanges)
return STABLE; /* Returns -1 for stable system */
else
{
printf("An error has occurred in the stability checking routine\n");
printf("Please contact your local Crapsoft (tm) representative \n");
printf("for details on how we would be glad to solve this problem\n");
printf("for a nominal fee.\n");
return STAB_ERROR; /* Returns 0 for a function error */
}
}

int stab_check3(void (*p_ypfun)(),RK45CONST *p_rkcon,SIM_PARAM sim,
HISTORY *p_hist,STEPDATA *p_spres,WORKPIECE_INFO *p_work,
int printout,STAB_CHART_PARAM *p_stabp)
/* This function checks the stability of a system by examining the growth
131
or decay of the motions of the system. This function is useful for
systems with variable spindle speed and constant feed rate */
{
HISTORY *p_hfinal;
int nstart,nfinal,result,i;
double period;
char *stepdatafile="stepdata.txt";

/* Sets up the simulation period in the event of variable speed machining */
period=1.0/sim.rpmfreq;

sim.tfinal=period;
nstart=0;

init_step(p_spres);

result=rk45ad(p_ypfun,p_rkcon,&sim, p_hist,nstart, &p_hfinal,&nfinal,
p_spres,NO_PRINT,NO_WRITEFILE,NO_APPEND,stepdatafile);

/* Exits if cut is interrupted */
if (sim.int_cut!=0)
return UNSTABLE;

/* Checks to see if amplitude stays within specified limits
for MAX_CHANGES revolutions of the workpiece */
for (i=1;i<p_stabp->maxchanges;i++)
{
/* Initialize Stuff */
sim.xmax=-1000.0;
sim.xmin=1000.0;
sim.xvmax=-1000.0;
sim.xvmin=1000.0;
sim.xamax=-1000.0;
sim.xamin=1000.0;

/* Setup up the simulation to start where the last bit left off */
p_hist=p_hfinal;
nstart=nfinal;

/* Sets the final time so that the workpiece will spin only one time */
sim.tfinal=sim.tfinal+period;

/* Simulates the system for one revolution */
result=rk45ad(p_ypfun,p_rkcon,&sim,p_hist,nstart,&p_hfinal,&nfinal,
p_spres,NO_PRINT,NO_WRITEFILE,APPEND,stepdatafile);

/* Returns UNSTABLE if the cut was interrupted */
if (sim.int_cut!=0)
return UNSTABLE;

/* Compares the amplitude of the motion to that seen on the previous
workpiece rotation */
if (sim.xmax==sim.xmin)
return STABLE;

if ((sim.xmax>sim.xmaxdisp)||(sim.xmin<sim.xmindisp))
{
return UNSTABLE;
}
if (sim.totsteps==sim.maxiter)
{
printf("An error has occurred in the stability checking routine\n");
printf("Please contact your local Crapsoft (tm) representative \n");
printf("for details on how we would be glad to solve this problem\n");
132
printf("for a nominal fee.\n");
return STAB_ERROR; /* Returns 0 for a function error */
}

}

return STABLE;
}

int stab_check4(void (*p_ypfun)(),RK45CONST *p_rkcon,SIM_PARAM sim,
HISTORY *p_hist,STEPDATA *p_spres,WORKPIECE_INFO *p_work,
int printout,STAB_CHART_PARAM *p_stabp)
/* This function checks the stability of a system by examining the growth
or decay of the motions of the system. This function is useful for
systems with variable spindle speed and constant feed rate */
{
HISTORY *p_hfinal;
int nstart,nfinal,result,i;
double period,xaccdiff,xaccdifflast;
char *stepdatafile="stepdata.txt";

/* Sets up the simulation period in the event of variable speed machining */
period=1.0/sim.rpmfreq;

sim.tfinal=period;
nstart=0;

init_step(p_spres);

result=rk45ad(p_ypfun,p_rkcon,&sim, p_hist,nstart, &p_hfinal,&nfinal,
p_spres,NO_PRINT,NO_WRITEFILE,NO_APPEND,stepdatafile);

xaccdifflast=sim.xamax-sim.xamin;

/* Exits if cut is interrupted */
if (sim.int_cut!=0)
return UNSTABLE;

/* Checks to see if amplitude decays
for MAX_CHANGES revolutions of the workpiece */
for (i=1;i<p_stabp->maxchanges;i++)
{
/* Initialize Stuff */
sim.xmax=-1000.0;
sim.xmin=1000.0;
sim.xvmax=-1000.0;
sim.xvmin=1000.0;
sim.xamax=-1000.0;
sim.xamin=1000.0;

/* Setup up the simulation to start where the last bit left off */
p_hist=p_hfinal;
nstart=nfinal;

/* Sets the final time so that the workpiece will spin only one time */
sim.tfinal=sim.tfinal+period;

/* Simulates the system for one revolution */
result=rk45ad(p_ypfun,p_rkcon,&sim,p_hist,nstart,&p_hfinal,&nfinal,
p_spres,NO_PRINT,NO_WRITEFILE,APPEND,stepdatafile);

/* Returns UNSTABLE if the cut was interrupted */
if (sim.int_cut!=0)
return UNSTABLE;
133

xaccdiff=sim.xamax-sim.xamin;

/* Compares the amplitude of the motion to that seen on the previous
workpiece rotation */
if (sim.xmax==sim.xmin)
return STABLE;

if (xaccdiff>xaccdifflast)
{
return UNSTABLE;
}
if (sim.totsteps==sim.maxiter)
{
printf("An error has occurred in the stability checking routine\n");
printf("Please contact your local Crapsoft (tm) representative \n");
printf("for details on how we would be glad to solve this problem\n");
printf("for a nominal fee.\n");
return STAB_ERROR; /* Returns 0 for a function error */
}
}

return STABLE;
}
A.13. envelope.c
/* envelope.c
Thomas O'Reilly October 1, 1997
Fuinctions to record maximum values */

#include <math.h>
#include <stdlib.h>
#include <stdio.h>

#include "orthsim.h"
#include "cutlist.h"
#include "stabchk.h"
#include "integ.h"

/* Function Prototypes */
int envelope(void (*p_ypfun)(),RK45CONST *p_rkcon,SIM_PARAM sim,
HISTORY *p_hist,STEPDATA *p_spres, WORKPIECE_INFO *p_work,
FILE *fp);

void envsim(void (*p_ypfun)(),SIM_PARAM sim,STEPDATA *p_spres,
HISTORY *p_hist,TOOL_INFO tool,WORKPIECE_INFO work,
CUT_PARAM cut);

/* Real stuff starts here */
void envsim(void (*p_ypfun)(),SIM_PARAM sim,STEPDATA *p_spres,
HISTORY *p_hist,TOOL_INFO tool,WORKPIECE_INFO work,
CUT_PARAM cut)
{
/* Variable type declaration */
int nfinal, result;
HISTORY p_hfinal;
FILE *fp;
RK45CONST *p_rkcon; /* Structure of rk45 constants */

134
/* Allocates space for rk45 constants */
p_rkcon=(RK45CONST *) malloc(sizeof(RK45CONST));

/* Initializes rk45 constants */
rk45init(p_rkcon);

fp=fopen("envelope.txt","w");

result=envelope(*p_ypfun,p_rkcon,sim,p_hist,p_spres,&work,fp);

fclose(fp);
if (result==-1)
{
printf("The simulation reached the maximum number of time steps\n");
printf("but didn't run to the desired number of rotations.\n");
result=sim.maxiter;
}
else if (result>0)
printf("The cut became interrupted during rotation %d\n",result);
else
printf("The simulation was successful.\n");

return;
}

int envelope(void (*p_ypfun)(),RK45CONST *p_rkcon,SIM_PARAM sim,
HISTORY *p_hist,STEPDATA *p_spres,WORKPIECE_INFO *p_work,
FILE *fp)
/* This function checks the stability of a system by examining the growth
or decay of the motions of the system */
{
HISTORY *p_hfinal;
int nstart,nfinal,result,i,rotations;
char *stepdatafile="envelope.txt";

rotations=floor(sim.tfinal/p_work->rotperiod);

nstart=0;
sim.tfinal=0.0;
init_step(p_spres);

fprintf(fp,"0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n");

/* Loops until rms vibration amplitude has either increased or decreased
MAX_CHANGES revolutions of the workpiece */
for (i=0;i<=rotations;i++)
{
sim.xmax=-1000.0;
sim.xmin=1000.0;
sim.xvmax=-1000.0;
sim.xvmin=1000.0;
sim.xamax=-1000.0;
sim.xamin=1000.0;
sim.ymax=-1000.0;
sim.ymin=1000.0;
sim.yvmax=-1000.0;
sim.yvmin=1000.0;
sim.yamax=-1000.0;
sim.yamin=1000.0;

/* Sets the final time so that the workpiece will spin only one time */
sim.tfinal=sim.tfinal+p_work->rotperiod;

135
/* Simulates the system for one revolution */
result=rk45ad(p_ypfun,p_rkcon,&sim,p_hist,nstart,&p_hfinal,&nfinal,
p_spres,NO_PRINT,NO_WRITEFILE,APPEND,"stepdata.txt");

/* Setup up the simulation to start where the last bit left off */
nstart=nfinal;
p_hist=p_hfinal;

fprintf(fp, "%e %e %e %e %e %e %e %e %e %e %e %e %e %e %e %e %e %e %e %e %e
%e %e %e\n",
sim.txmax,sim.xmax,sim.txmin,sim.xmin,
sim.txvmax,sim.xvmax,sim.txvmin,sim.xvmin,
sim.txamax,sim.xamax,sim.txamin,sim.xamin,
sim.tymax,sim.ymax,sim.tymin,sim.ymin,
sim.tyvmax,sim.yvmax,sim.tyvmin,sim.yvmin,
sim.tyamax,sim.yamax,sim.tyamin,sim.yamin);

printf("Totstep= %d \n", sim.totsteps);

/* Compares the amplitude of the motion to that seen on the previous
workpiece rotation */

if (!result)
{
return -1;
}
// if (sim.int_cut!=0)
// return i;

}
return 0;
}
136
Appendix B


SIMULATION CONFIGURATION
B.1. Configuration File
mode=1 /* Program mode
kx=5500000.0 /* Tool stiffness in x direction, N/m*/
ky=3300000.0 /* Tool stiffness in y direction, N/m*/
mx=0.48 /* Effective mass in x direction, kg*/
my=0.7 /* Effective mass in y direction, kg*/
zetax=0.009 /* Damping ratio for x direction, percent*/
zetay=0.0013 /* Damping ratio for y direction, percent*/
cutstiff=1e9 /* Workpiece cutting stiffness N/m^2 */
d0=0.050 /* Workpiece Diameter m */
N=600.0 /* Rotational Speed, RPM */
DOC=0.00001 /* Depth of cut, meters per revolution, m */
b=0.0005 /* Width of cut, m */
db_dt=0.0 /* Rate of change of width of cut , m/s*/
theta=20.0 /* Angle of cutting force , degrees */
epsmin=0.00000005 /* lower bound on error before increasing
epsmax=0.0000001 /* Maximum error per step */
maxiter=2000000 /* Maximum number of time steps */
fileskip=5 /* Print time step data every fileskip steps */
tfinal=6.0 /* End time, s */
hinc=1.25 /* Ratio by which step size is increased if
hdec=0.75 /* Ratio by which step size is decreased if
hmaxrat=0.5 /* Ratio of maximum step size to initial
hminrat=2.0 /* Ratio of minimum step size to initial
bmax=0.01 /* Maximum starting width of cut, m
bmaxabs=0.01 /* Maximum final width of cut, m
bmin=0.0 /* Minimum starting width of cut, m
bminabs=0.0 /* Minimum final width of cut, m
slots=32.0 /* increment to shift upper and lower limit by
tolerance=0.0000025 /* Tolerance on width of cut, m
Nmax=2000.0 /* Maximum spindle speed, RPM
Nmin=250.0 /* Minimum spindle speed, RPM
Nsteps=100 /* Number of increments in spindle speed
initrot=10 /* initial rotations for stability checking
maxchanges=5 /* Number of changes required for stability test
maxxmotion=1e-6 /* Maximum amplitude of x direction motion, m
rpmfreq=0.0 /* Frequency of spindle speed changes, Hz
rpmamp=0.0 /* Amplitude of spindle speed changes, % of mean speed
constfeed=1 /* Whether the feed rate is constant or varies
137
B.2. Configuration Procedure
The file in the previous section is a sample of the configuration file used to set
system and simulation parameters. This is a plain text file named simulate.cfg that
should be present in the directory from which the program is to be run. At the start of
program execution this file is read and the values it contains are used in place of the
default values set in the executable. If the file is not found, the program will write one
using those default values. This file can then be edited as needed.
Each line in the file defines a different parameter. Each line begins with a
variable name that defines the variable to be set. This is followed by and equals sign and
then the value. Each value is followed by at least one space, and then a comment
describing the variable. There must be no spaces prior to the value, and there must be a
space between the value and any comments. If a variable name is repeated the program
will use the second value in the file.
B.3. Configuration Variables
Although most of the values in the file are adequately explained by their comment
the following require more detailed explainations.

mode: Sets simulation modes:
Mode 1: Time domain simulation.
Mode 2: Constant speed stability chart.
Mode 4: Variable speed stability chart.
Mode 6: Time domain simulation producing an envelope file.

hinc/hdec: If the error estimate on a time step exceeds the allowable error that time step
is repeated with a smaller step size. The new step size is hdec times the old value. If the
error estimate is smaller than the allowable step size the step size for the next step will be
hinc time the previous value.

hmaxrat/hminrat: The simulation guesses an initial time step that is 1/10 the period of
the highest frequency mode. The maximum step size is then the initial value multiplied
by hmaxrat, the minimum is the initial divided by hminrat.

slots: When producing a stability chart the difference between bmax and bmin is divided
by slots. If at some point during the process the stability limit at a given speed is not
bracketed by the upper and lower limit in use at the time both limits are raised or lowered
by this quotient until one is bracketed.

138
rpmamp: For variable speed simulations the mean spindle speed, N, is multiplied by
this quantity to determine the amplitude of spindle speed oscillation.

constfeed: If this equals 1, the feed rate will be constant, if this equals zero, the feed rate
will vary with spindle speed.

Nsteps: When producing a stability chart, the number of spindle speeds between Nmin
and Nmax to find stability at.
139
Appendix C


SIMULATION OUTPUT FILE FORMATS
C.1. stepdata.txt
This file is produced or time domain simulations using mode 1. It is a plain text
file with 10 columns.

Column 1: Time, s
Column 2: x-direction displacement, m
Column 3: x-direction velocity, m/s
Column 4: y-direction displacement, m
Column 5: y-direction velocity, m/s
Column 6: x-direction acceleration, m/s
2

Column 7: y-direction acceleration, m/s
2
Column 8: Chip thickness, m
Column 9: Distance traveled by the cutting tool along the workpiece surface, m
Column 10: Distance traveled by the cutting tool into the workpiece surface, m

Column 9 and 10 are used primarily to debug the program.
C.2. stabch.txt
This file contains the results of any stability chart generation (mode 2 or 4.) It is a
plain text file with 2 columns.

Column 1: Spindle speed, RPM
Column 2: Stability limit, m
140
C.3. envelope.txt
This file contains the results of time domain simulation using mode 6. It is a plain
text file with 24 columns. These columns contain the upper and lower chatter envelopes
for position, velocity and acceleration in the x and y directions and the time at which they
occurred.

Column 1: Time vector for column 2
Column 2: Upper envelope, x-direction displacement, m
Column 3: Time vector for column 4
Column 4: Lower envelope, x-direction displacement, m
Column 5: Time vector for column 6
Column 6: Upper envelope, x-direction velocity, m/s
Column 7: Time vector for column 8
Column 8: Lower envelope, x-direction velocity, m/s
Column 9: Time vector for column 10
Column 10: Upper envelope, x-direction acceleration, m/s
2

Column 11: Time vector for column 12
Column 12: Lower envelope, x-direction acceleration, m/s
2

Column 13: Time vector for column 14
Column 14: Upper envelope, y-direction displacement, m
Column 15: Time vector for column 16
Column 16: Lower envelope, y-direction displacement, m
Column 17: Time vector for column 18
Column 18: Upper envelope, y-direction velocity, m/s
Column 19: Time vector for column 20
Column 20: Lower envelope, y-direction velocity, m/s
Column 21: Time vector for column 22
Column 22: Upper envelope, y-direction acceleration, m/s
2

Column 23: Time vector for column 24
Column 24: Lower envelope, y-direction acceleration, m/s
2


141
REFERENCES
1. de Canniere, J. H. van Brussel and J. van Bogaert. Contribution to the
Mathematical Analysis of Variable Speed Machining. Applied Mathematical
Modeling, Vol. 5, No. 3, June 1981, pp158-164.
2. Elbestawi, M.A., F. Ismail, R. Du and B.C. Ullagaddi. Modeling Machining
Dynamics Including Damping in the Tool-Workpiece Interface, Journal of
Engineering for Industry, vol. 116, Nov 1994, pp. 435-439.
3. Hanna, N. H. and S. A. Tobias. A theory of Nonlinear Regenerative Chatter.
Journal of Engineering for Industry, ASME Transactions, February 1974, pp 247-
255.
4. Hsu, C. S. Application of the Tau-Decomposition Method to Dynamical Systems
Subjected to Retarded Follower Forces. Journal of Applied Mechanics, June
1970, pp 259-266.
5. Inamura, T. and T. Sata. Stability Analysis of Cutting under Varying Spindle
Speed. CIRP Annals, vol. 23, 1974, pp. 119-120.
6. Kato, S, E., E. Marui, M. Hashimoto and T. Yamada. Characteristics of Chatter
Vibration of Lathe Tools. Memoirs of the Faculty of Engineering, Nagoya
University, v. 38, n. 2, 1986, pp. 208-215.
7. Kato, S, E., E. Marui, M. Hashimoto and T. Yamada. Characteristics of
Dynamics Cutting Force and Mechanism of Chatter Vibration. Memoirs of the
Faculty of Engineering, Nagoya University, v. 38, n. 2, 1986, pp. 216-222.
8. Kato, S, E., E. Marui, M. Hashimoto and T. Yamada. Analytical Considerations
of Chatter Vibration of Lathe Tools. Memoirs of the Faculty of Engineering,
Nagoya University, v. 38, n. 2, 1986, pp. 223-232.
9. Lee, M. S., and C. S. Hsu. On the -Decomposition Method of Stability Analysis
for Retarded Dynamical Systems, SIAM Journal on Control, Vol. 7, 1969, pp
242-259.
10. Ota, Hiroshi, Eiji Kondo and Toshikatsu Yamada. Regenerative Chatter
Vibrations of Turning Workpieces. JSME International Journal, Ser. III, Vol. 32,
No. 1, 1989, pp 142-149.
142
11. Rhorer, Richard L. and Don A. Lucca. Applocations of Cutting Mechanics
Principles to Ultraprecision Machining and Grinding, Vol. 1: Session Notes.
Tutorial notes, 1997 APSE Annual Meeting, Norfolk, VA, October 1997.
12. Sexton, J. S. and B. J. Stone. Investigation of the Transient Effects During
Variable Speed Cutting. Journal of Mechanical Engineering Science, Vol. 22,
No. 3, June 1980, pp 107-118.
13. Sexton, J. S. and B. J. Stone. Stability of Machining with Continuously Varying
Spindle Speed. Annals of CIRP, Vol. 28, No. 1, 1978, pp 321-326.
14. Sexton, J. S. R. D. Milne and B. J. Stone. Stability Analysis of Single Point
Machining with Varying Spindle Speed. Applied Mathematical Modeling, Vol.
1, No. 6, Sept. 1977, pp310-318.
15. Smith, S. T. and D. G. Chetwynd. Foundations of Ultraprecision Mechanism
Design. Gordon and Breach Science Publishers, 1992.
16. Stepan, G. Retarded dynamical systems: stability and characteristic functions,
Longman Scientific & Technical , Essex, UK, 1989.
17. Stone, B. J. Effect of Time Varying Parameters on the Build-Up of Chatter in
Turning. Annals of CIRP, Vol. 34, No. 1, 1985, pp 371-374.
18. Takemura, T. and T. Kitamura, T. Hoshi. Active Suppression of Chatter by
Programmed Variation of Spindle Speed. CIRP Annals, v 23, 1974, pp. 121-122.
19. Tlusty, J. Machine Dynamics (1985). In King, Robert I. (ed), Handbook of High
Speed Machining Technology. (pp. 48-143). New York, Chapman and Hall.
20. Tsao, Tsu-Chin, Mark W. McCarthy and Shiv G. Kapoor. A New Approach to
Stability Analysis of Variable Speed Machining Systems. International Journal of
Machine Tools and Manufacturing. vol. 33, no. 6, pp. 791-808, 1993.
21. Yantek, David. Chatter and Process Damping in Diamond Turning. M. S.
Thesis, The Pennsylvania State University, December 1996.

Vous aimerez peut-être aussi