CNC Machine Case Study
CNC Machine Case Study
CNC Machine-Tool
Positional Control
The physical configuration and block diagram representation of
a CNC machine-tool is shown in Figures 1 and 2. The
fundamental control problem here is that, by design, the lead-
screw (by the use of re-circulating ball-bearings).
1
Fig. 1 Computer numerically controlled machine tool.
The block diagram for the CNC machine tool control system is shown in
Figure 2.
2
(ii) The machine table movement will be measured by a linear
displacement transducer attached to the table. This has the
advantage of bringing the table ‘within the control-loop’ and
hence providing more accurate control.
2. Power amplifier
3
where Kfd is the field coil constant.
Also, torque developed Tm is proportional to the product of the
air gap flux and the armature current:
Since if is constant:
4
Figure 4 combines equations (I), (II) and (III) in block diagram
form.
(1)
5
The output shaft in this case is the lead screw, which is assumed
to have zero moment of inertia Io and viscous friction Co. The
free-body diagrams of the machine-table and lead-screw are
shown in the following figure.
(2)
or
(3)
Now the pitch p of the lead-screw is
(4)
Substituting equations (3) and (4) gives:
(5)
6
The equation of motion for the machine-table is:
(6)
Equating equations (5) and (6) gives:
(7)
Taking Laplace transforms:
(8)
Equating (1) and (8) gives:
(9)
Now:
Hence,
(10)
and,
(11)
Equation (11) can be substituted into (9):
(12)
7
or ,
(13)
giving the transfer function for the gearbox, lead-screw and
machine-table as:
(14)
where the term n2Im/P may be considered to be equivalent mass
of Im referred to the machine-table.
5. Tachogenerator
6. Position transducer
8
Block-diagram of the closed-loop system:
The system element dynamic equations can now be combined in
the block diagram shown in the following figure.
9
Block diagram of CNC machine–tool control system.
10
𝐾1 𝐾2 𝐾𝑎 𝐻1 𝑃𝑛
L3 = −
𝐿𝑎 (𝑃2 𝑚 + 𝑛2 𝐼𝑚 )𝑠 3 + 𝑅𝑎 (𝑃2 𝑚 + 𝑛2 𝐼𝑚 )𝑠 2
Then, the overall transfer function of CNC machine tool is:
𝑋𝑜 (𝑠)
=
𝑋𝑑 (𝑠)
𝐾1 𝐾2 𝐾𝑎 𝑃𝑛
𝐿𝑎 (𝑃2 𝑚+𝑛2 𝐼𝑚 )𝑠 3 +𝑅𝑎 (𝑃2 𝑚+𝑛2 𝐼𝑚 )𝑠 2 +(𝐾𝑎 𝐾𝑏 𝑃𝑛+𝐾2 𝐾𝑎 𝐻2 𝑛)𝑠+𝐾1 𝐾2 𝐾𝑎 𝐻1 𝑃𝑛
System Parameters:
Parameter Symbol Unit Value
Resistance of the armature coil Ra Ω 0.3
Inductance of the armature coil La 𝐻 0.01
Back emf constant of the motor shaft Kb 𝑉𝑠/𝑟𝑎𝑑 0.3
Inertia of the motor shaft Im 𝐾𝑔𝑚2 0.00005
Mass of the machine table m 𝐾𝑔 50
Pitch of the lead-screw P 𝑚 0.01
Speed ratio of the gear box N 10
Controller constant K1 𝑉/𝑉 3
Amplifier constant K2 𝑉/𝑉 4
Torque constant Ka 𝑁𝑚/𝐴 0.3
Constant of displacement transducer H1 𝑉/𝑚 1
Constant of velocity transducer H2 𝑉𝑠/𝑟𝑎𝑑 0.5
Solution
F = 𝐾1 𝐾2 𝐾𝑎 𝑃𝑛
A = 𝐿𝑎 (𝑃2 𝑚 + 𝑛2 𝐼𝑚 )
B = 𝑅𝑎 (𝑃2 𝑚 + 𝑛2 𝐼𝑚 )
C = 𝐾𝑎 𝐾𝑏 𝑃𝑛 + 𝐾2 𝐾𝑎 𝐻2 𝑛
D = 𝐾1 𝐾2 𝐾𝑎 𝐻1 𝑃𝑛
MATLAB Programs
11
1. Time Domain Solutions
%system parameters
ra=0.3; la=0.01; ka=0.3; m=50; n=10; p=0.01;
im=0.00005; kb=0.3; k1=3; k2=4; h1=1; h2=0.5;
%transfer function
F=k1*k2*ka*p*n;
A=la*(p*p*m+n*n*im);
B=ra*(p*p*m+n*n*im);
C=ka*kb*p*n+k2*ka*h2*n;
D=k1*k2*ka*h1*p*n;
%time solution
num=[0 0 0 F];
den=[A B C D];
%plot of time solution
step(num,den);
grid
Step Response
1
0.9
0.8
0.7
0.6
Amplitude
0.5
0.4
0.3
0.2
0.1
0
0 50 100 150
Time (seconds)
12
ra=0.3; la=0.01; ka=0.3; m=50; n=10; p=0.01;
im=0.00005; kb=0.3; k1=3; k2=4; h1=1; h2=0.005;
F=k1*k2*ka*p*n;
A=la*(p*p*m+n*n*im);
B=ra*(p*p*m+n*n*im);
C=ka*kb*p*n+k2*ka*h2*n;
D=k1*k2*ka*h1*p*n;
num=[0 0 0 F];
den=[A B C D];
step(num,den);
grid
Step Response
1
0.9
0.8
0.7
0.6
Amplitude
0.5
0.4
0.3
0.2
0.1
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
Time (seconds)
13
ra=0.3; la=0.01; ka=0.3; m=50; n=10; p=0.01;
im=0.00005; kb=0.3; k1=3; k2=4; h1=100; h2=0.5;
F=k1*k2*ka*p*n;
A=la*(p*p*m+n*n*im);
B=ra*(p*p*m+n*n*im);
C=ka*kb*p*n+k2*ka*h2*n;
D=k1*k2*ka*h1*p*n;
num=[0 0 0 F];
den=[A B C D];
step(num,den);
grid
Step Response
0.01
0.009
0.008
0.007
0.006
Amplitude
0.005
0.004
0.003
0.002
0.001
0
0 0.5 1 1.5
Time (seconds)
14
Neglecting the motor inductance: La=0
ra=0.3; la=0.0; ka=0.3; m=50; n=10 ; p=0.005;
im=0.000001; kb=0.3; k1=3; k2=4; h1=1; h2=0.001;
F=k1*k2*ka*p*n;
A=la*(p*p*m+n*n*im);
B=ra*(p*p*m+n*n*im);
C=ka*kb*p*n+k2*ka*h2*n;
D=k1*k2*ka*h1*p*n;
num=[0 0 0 F];
den=[A B C D];
step(num,den);
grid
Step Response
1
0.9
0.8
0.7
0.6
Amplitude
0.5
0.4
0.3
0.2
0.1
0
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35
Time (seconds)
15
2. Frequency Domain Solutions
16
Nyquist Diagram
1
2 dB 0 dB -2 dB -4 dB
4 dB
0.8
-6 dB
0.6 6 dB
0.4 10 dB -10 dB
0.2
Imaginary Axis
20 dB -20 dB
-0.2
-0.4
-0.6
-0.8
-1
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
Real Axis
17
Nyquist Diagram
1.5
2 dB 0 dB -2 dB
4 dB -4 dB
1
6 dB -6 dB
0.5
10 dB -10 dB
Imaginary Axis
20 dB -20 dB
0
-0.5
-1
-1.5
-1.5 -1 -0.5 0 0.5 1 1.5
Real Axis
Unstable System: K1 = 5
18
Nyquist Diagram
2
2 dB 0 dB -2 dB
1.5
4 dB -4 dB
1
6 dB -6 dB
0.5 10 dB -10 dB
Imaginary Axis
20 dB -20 dB
0
-0.5
-1
-1.5
-2
-2 -1.5 -1 -0.5 0 0.5 1
Real Axis
Bode Diagram
0
-20
Magnitude (dB)
-40
-60
-80
-100
0
Phase (deg)
-90
-180
-270
-1 0 1 2 3
10 10 10 10 10
Frequency (rad/s)
20
Bode Diagram
20
0
Magnitude (dB)
-20
-40
-60
-80
-100
0
Phase (deg)
-90
-180
-270
0 1 2 3
10 10 10 10
Frequency (rad/s)
Unstable System: K1 = 5
21
Bode Diagram
20
0
Magnitude (dB)
-20
-40
-60
-80
-100
0
Phase (deg)
-90
-180
-270
0 1 2 3
10 10 10 10
Frequency (rad/s)
Nichols Chart
40
0 dB
0.25 dB
0.5 dB
20 1 dB -1 dB
3 dB
6 dB -3 dB
0 -6 dB
-12 dB
Open-Loop Gain (dB)
-20 -20 dB
-40 -40 dB
-60 -60 dB
-80 -80 dB
-100 -100 dB
-120 dB
-120
-360 -315 -270 -225 -180 -135 -90 -45 0
Open-Loop Phase (deg)
23
grid
Nichols Chart
40
0 dB
0.25 dB
0.5 dB
20 1 dB -1 dB
3 dB
6 dB -3 dB
0 -6 dB
-12 dB
Open-Loop Gain (dB)
-20 -20 dB
-40 -40 dB
-60 -60 dB
-80 -80 dB
-100 -100 dB
-120 dB
-120
-360 -315 -270 -225 -180 -135 -90 -45 0 45 90 135 180
Open-Loop Phase (deg)
Unstable System: K1 = 5
24
Nichols Chart
40
0 dB
0.25 dB
0.5 dB
20 1 dB -1 dB
3 dB
6 dB -3 dB
0 -6 dB
-12 dB
Open-Loop Gain (dB)
-20 -20 dB
-40 -40 dB
-60 -60 dB
-80 -80 dB
-100 -100 dB
-120 dB
-120
-360 -315 -270 -225 -180 -135 -90 -45 0 45 90 135 180
Open-Loop Phase (deg)
25