0% found this document useful (0 votes)
200 views20 pages

Hard Disk Drive Servo Control

This document describes the design of a digital controller for a hard disk drive servo system. It involves: 1. Designing a state-feedback controller using pole placement to achieve a closed-loop bandwidth of 1300 Hz and damping ratio of 0.83. 2. Discretizing the continuous controller using a sampling rate of 30 kHz. 3. Simulating the step response of the closed-loop digital control system and analyzing the results. 4. Calculating the number of bits required for the digital controller implementation.

Uploaded by

Mohammad Ikhsan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
200 views20 pages

Hard Disk Drive Servo Control

This document describes the design of a digital controller for a hard disk drive servo system. It involves: 1. Designing a state-feedback controller using pole placement to achieve a closed-loop bandwidth of 1300 Hz and damping ratio of 0.83. 2. Discretizing the continuous controller using a sampling rate of 30 kHz. 3. Simulating the step response of the closed-loop digital control system and analyzing the results. 4. Calculating the number of bits required for the digital controller implementation.

Uploaded by

Mohammad Ikhsan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

1

HardDiskDriveServoSystemControl

EE5103RComputerControlSystem
ProjectReport

by

MohammadIkhsan
A0117954X

November7,2013







2

TableofContents

1 Introduction 3
2 State-Feedback Controller using Pole Placement Technique 4
3 Digital Controller at Sampling Rate 30 KHz 9
4 Digital Controller at Sampling Rates 2, 8, and 15 KHz 11
5 Number of Bits Required for Digital Controller 15
6 Conclusion 17
7 Source Code and Simulink 18



3

Introduction


In this project, a controller for a hard disk drive servo system is designed and simulated. The
hard disk drive servo system has the following voice-coil-motor actuator:

0(s) =
o
s
2

2
s
2
+ 2

s +

2


where o = 11.6482 1u
7
,

= u.u1S,

= 2n 7Suu, y(s) is the actuator position to be


controlled and it is the only available measurement output, and u(s) is the control input to the
actuator. The goal of the project is to design a digital state-feedback controller to control the hard
disk drive described above. Specifically, the following tasks are to be completed for the project:

1. Design a dynamic state-feedback controller by using pole-placement technique in
continuous-time domain to have closed-loop damping ratio of 0.83 and the closed-loop
bandwidth (CL-BW) of 1300 Hz. The resonance mode may be ignored to design the
controller, but needs to be simulated afterwards. Show the step response of the closed-
loop system with resonance mode and closed-loop bode plot showing the CL-BW.
2. It is required to implement the dynamic state-feedback continuous-time controller using a
digital controller. Find the discrete equivalent of the controller using any appropriate
method and perform simulations of this digital control system for a step response using
MATLAB and Simulink. The sampling frequency used is 30 KHz.
3. Perform simulations for the controller in sampling frequencies 2 KHz, 8 KHz, and 15
KHz and analyze the results.
4. Compute the number of bits required to realize the controller in direct form in a digital
computer to keep the error in pole locations to be less than 0.00015.

The above tasks will be discussed in more detail throughout this report. Source code and the
Simulink model of the system is included in the last section.

4

StateFeedbackControllerusingPole
PlacementTechnique

Design of the state-feedback controller uses the plant model of the voice-coil-motor actuator
without the resonant mode. This simplified model is in the form of a double integrator system
and its transfer function is given below.

0(s) =
11.6482 1u
7
s
2


The transfer function above is first converted into state-space representation. Using the
MATLAB command ss, one state-space representation of the system is given below.

x = Ax + Bu,
y = Cx,

where A = j
u u
1 u
[, B = j
8192
u
[, and C = |
u 1422u
]. In the state-space representation above
x is the state variables of the plant, u is the input to the plant, and y is the output of the plant.

In order to design a state-feedback controller using pole placement technique, all states have to
be able to be observed or measured. In the state-space representation of the hard disk drive, this
is not the case. As seen in the second equation and from the explanation in the previous section,
only one state can be measured at the output of the plant, which is the position of the actuator.
Therefore, the other state of the system needs to be estimated using an observer. For this project,
a full state observer is utilized. When the full state observer is combined with the state feedback
controller in the form of u = -Kx, the system equation becomes:

x

= Ax +Bu + I(y - y),


y = Cx

Where L is the observer gain, K is the state-feedback controller gain, and x is the estimated states
of the plant by the observer.

The state-feedback controller gain, K, can be determined by assuming that the state variables x
are available. First, the desired characteristic polynomial, CP
m
, is determined from the
requirements of the system. From the problem description, the parameters that need to be
5

achieved is a closed-loop damping ratio of 0.83 and a closed-loop bandwidth of 1300 Hz. The
general form of the characteristic polynomial for this system is the second order polynomial
below.
CP
m
= s
2
+2

s +

2


From the information given, the damping ration is known. However, the natural frequency has to
be calculated from the closed-loop bandwidth. The relationship between the two variables and
the calculated natural frequency can be seen below.

b
=
n
_
1 - 2
2
+ (1 - 2
2
)
2
+ 1

n
=

b
_
1 -2
2
+(1 -2
2
)
2
+ 1

n
= 1S6S.7 Ez = 9824.8 roJscc

The desired closed-loop characteristic polynomial without the resonant mode is then:

CP
m
= s
2
+2(u.8S)(9824.8)s + (9824.8)
2

CP
m
= s
2
+16Su9s +96S27uuu

Using the pol e function in MATLAB, the desired pole of the system, based on the desired
characteristics above is given below.

s = -81S4.S _S.48]

As a rule of thumb, the observer pole position should be located at least 5 times faster than the
control pole position. In this case, we use the observer pole position that is 10 times faster than
the control pole position. Both the observer pole locations are set as the value below.

s = -2947S

Next, both the observer gain L and the state-feedback gain K can be calculated using
Ackermanns formula. For the state-feedback gain, the calculations are given below.

K = |
u 1
]w
c
-1
CP
m
(A)
K = |
u 1
]|
B AB
]
-1
(A
2
+ 16Su9A + 96S27uuuI
K = |
u 1
] j
u.1221 1u
-3
u
u u.1211 1u
-3
[ j
96S27uu u
16Su9 96S27uu
[
K = |
2 11784
]

6

Calculations for the same value can be done using the acker command in MATLAB. Using
this command, the result for the state-feedback gain is the same as the result above.

The manual calculation for the observer gain is given below.

I = CP
o
(A)w
o
-1
j
u
1
[
I = (A
2
+ S89SuA + 86877S62SI) j
C
CA
[
-1
j
u
1
[
I = j
86877S62S u
S89Su 86877S62S
[ j
u u.7uS2 1u
-4
u.7uS2 1u
-4
u
[ j
u
1
[
I = j
611uu
4
[

Using the acker command, the observer gain calculated by MATLAB is similar as above. With
the above observer and controller gains, the state-space representation of the controller is shown
below.

x = A
C
x + B
c
u,
y = C
c
x,

where A
c
= A - BK - IC, B
c
= I, and C
c
= -K. From the controller derived above. The bode
plot and the step response of the closed loop system both without and with the resonance mode
can be seen in the following figures.


Figure 2.1 Bode Plot of Closed Loop System Without Resonance Mode
7


Figure 2.2 Step Response of Closed Loop System Without Resonance Mode


Figure 2.3 Bode Plot of Closed Loop System With Resonance Mode

8


Figure 2.4 Step Response of Closed Loop System With Resonance Mode

From Figure 2.1, the bandwidth of the system can be seen when the gain reaches the cutoff
frequency of -3 dB. It can also be calculated using MATLABs bandwi dt h command and the
result is
b
= 12u7.4 Ez. This is far from the requirement of 1300 Hz. This number gets closer
to the desired 1300 Hz as the observer poles are increased. In this case, the observer poles are set
3 times farther than the control poles. When the observer poles are 5 times the control poles, the
bandwidth of the system increases to 1268.2 Hz. This is closer to the requirement. However, the
step response of the system in that instance is not stable as the oscilation grows unbounded at
one point in time. In fact, this occurs for all observer poles farther than 3.5 times the control
poles. Between 3 and 3.5, the system was stable. However, the farther the observer pole, the
higher the overshoot and the longer the settling time becomes when the resonance mode of the
hard disk drive actuator is included. Therefore, the observer pole is kept at 3 times larger than the
control poles. Figure 2.2 shows the step response of the system without the resonance mode. This
figure shows that the system is stable.

Figure 2.3 shows the bode plot of the system with resonance mode. There is a peak at 6780 Hz.
This is near where the peak is expected to be located, which is at the resonance frequency of
7300 Hz. The magnitude of the peak is -3.6 dB. This means that the system is stable during
resonance mode. This can also be seen in the step response of Figure 2.4. The resonance mode in
the system causes an oscillation in the step response which has frequency similar to the
resonance frequency. This oscillation causes higher overshoot and a longer settling time
compared to the step response of Figure 2.1. The rise time, however, is relatively the same and
the system is still able to reach zero steady state error.


9

DigitalControlleratSamplingRate30KHz


The state-feedback controller designed in the previous section is discretize using the c2d
command in MATLAB. The tustin approximation is chosen as the discretization method
because, unlike the forward and backward approximation, it preserves stability of the system.
The discrete transfer function of the controller is shown below.

C
d
=
-1.u9z
2
- u.14S4z + u.947
z
2
-u.SSS2z +u.1uu7


The above transfer function is simulated using the simulink model in Figure 3.1. In the model,
the controller is discrete and the plant is continuous. This is done to simulate the real world
application where the controller is implemented using a computer and the plant itself is a
continuous plant, the voice-coil-motor actuator of the hard drive. A zero-order-hold block is
placed before the plant to make the control input from the controller continuous.


Figure 3.1 Step Response of Closed Loop System with Digital Controller at 30 KHz Sampling

The result of the simulation shows that at sampling rate 30 KHz, the output of the system is still
similar to the output of the continuous time system. It improves the response by removing the
oscillation in the step response. From the bode plot, the discretization of the controller minimizes
the effect of the resonance mode of the system. This is seen by the smaller peak at the resonant
frequency.

10


Figure 3.2 Bode Plot of Closed Loop System with Digital Controller at 30 KHz Sampling


11

DigitalControlleratSamplingRates2,8,15KHz


The controller is discretized with sampling rates 2, 8, and 15 KHz using the Tustin
approximation method. For the sampling rate 15 KHz, the transfer function of the controller is
shown below.

C
d
=
-1.148z
2
- u.28S2z + u.8644
z
2
-u.4uS9z +u.1119


The step response and bode plot of the system at sampling rate 15 KHz can be seen in Figure 4.1
and 4.2 below. As seen in the figures below, at sampling rate 15 KHz, the step response starts
becoming oscillatory. However, it is still a stable system as it converges to one at steady state.


Figure 4.1 Step Response of Closed Loop System with Digital Controller at 15 KHz Sampling

12


Figure 4.2 Bode Plot of Closed Loop System with Digital Controller at 15 KHz Sampling

For the sampling rate 8 KHz, the transfer function of the controller is shown below.

C
d
=
-1.1u8z
2
- u.42S2z + u.S929
z
2
-u.9866z +u.2889


The step response and the bode plot of the system can be seen in Figure 4.3, 4.4, and 4.5.


Figure 4.3 Step Response of Closed Loop System with Digital Controller at 8 KHz Sampling


13


Figure 4.4 Step Response with Digital Controller at 8 KHz Sampling Extended View


Figure 4.5 Bode Plot of Closed Loop System with Digital Controller at 8 KHz Sampling

For the step response of the system with sampling frequency 8 KHz, an unstable oscillation
occurs. As seen in Figure 4.4, the oscillation gets a sudden increase in magnitude periodically.
This shows that they system cannot function well in low frequency as it will become unstable.
This is further backed by the step response of the system with the sampling frequency of 2 KHz.
The transfer function of the controller using the sampling frequency 2 KHz is shown below.

C
d
=
-u.6248z
2
- u.6417z + u.u169S
z
2
- 1.7uSz +u.7S17

14


Figure 4.6 Step Response of Closed Loop System with Digital Controller at 2 KHz Sampling

Figure 4.7 Bode Plot of Closed Loop System with Digital Controller at 2 KHz Sampling

At 2 KHz sampling frequency the step response is unstable and oscillates with a very large
magnitude. This oscillation is unbounded and leads to infinity when simulation was ran to a large
enough timeframe. Overall, the system cannot work in low frequency, specifically frequency
with bandwidth lower than twice the system bandwidth.



15

NumberofBitsRequiredforDigitalController

In order to get the number of bits required for the digital controller, the sensitivity of the pole in
relation to the coefficients of the controller needs to be calculated. This uses the coefficient-pole
sensitivity equation given by

op
k
= -
p
k
n-

k=]
(p
k
- p
]
)
oo



where op
k
represents the amount of change in pole location, oo

represents the amount of


change in controller coefficient, and p
k
represents the individual poles.

At the sampling frequency 30 KHz, the pole locations of the discrete controller is at

s = u.1666 _ u.27u1]
The requirements state that the pole location error be less than 0.00015. To get the number of
bits, the amount of change in each controller coefficient needs to be calculated. Using the
coefficient-pole sensitivity equation above, the amount of change in the controller coefficient
running at sampling rate 30 KHz is given below.
The amount of change of first coefficient based on first pole.
oo
1
= -
op
1
(p
1
-p
2
)
p
1

oo
1
= -
u.uuu1S(u.1666 + u.27u1] -(u.1666 - u.27u1]))
u.1666 + u.27u1]

oo
1
= -u.uuu21729 - u.uuu1S4u6]
The amount of change of first coefficient based on second pole.
oo
1
= -
op
2
(p
2
- p
1
)
p
2

oo
1
= -
u.uuu1S(u.1666 - u.27u1] -(u.1666 + u.27u1]))
u.1666 - u.27u1]

oo
1
= -u.uuu21729 + u.uuu1S4u6]
The amount of change of second coefficient based on first pole.
oo
2
= -
op
1
(p
1
- p
2
)
1

16

oo
1
= -
u.uuu1S(u.1666 + u.27u1] -(u.1666 - u.27u1]))
1

oo
1
= -u.uuuu81u17]
The amount of change of second coefficient based on first pole.
oo
2
= -
op
1
(p
1
- p
2
)
1

oo
1
= -
u.uuu1S(u.1666 - u.27u1] -(u.1666 + u.27u1]))
1

oo
1
= u.uuuu81u17]
From the results of the calculation above, the minimum amount of change in the coefficient is
oo
1
= u.uuuu81u17]. When represented in a digital syste, the amount of bits can be calculated
as follows.
2
-n
= u.uuuu81u17
n = 1S.S914
Therefore, at least 14 bits is needed to realize the discrete controller in a digital computer.




17

Conclusion

In this project, a hard disk drive servo system was analyzed and an appropriate controller was
designed using the voice-coil-motor actuator as the model for the system. The controller was
designed using the simplified model without resonance mode and then tested in both cases.

The continuous-time controller described above was discretized at 30 KHz to get the discrete-
time controller. This is needed because in practice, the controller will be implemented using a
digital computer. When simulated, the digital controllers performance was similar to those of
the continuous controller. It performed better by damping the effects of the resonance mode of
the system around the resonant frequency.

Various sampling rates were then tested on the controller. The controller was discretized at
frequencies 2, 8, and 15 KHz. The results show that when the frequency is lower than 2 times the
bandwidth of the system, large oscillation occurs and the system becomes unstable. This is seen
by the gradual increase in oscillation from 15 KHz to 2 KHz.

At 30 KHz, the number of minimal bits needed to implemennt the digital controller was
calculated. This was calculated using the coefficient-pole sensitivity equation taking into account
the requirement that the pole location error needs to be below 0.00015. The results of the
calculations show that the number of bits needed is 14 bits.


18

SourceCodeandSimulinkModel

%St at e- Feedback Cont r ol l er wi t h Ful l St at e Obser ver
G = t f ( [ 11. 6482e7] , [ 1 0 0] ) ; %Syst emdef i ned wi t h doubl e i nt eger
G_ss = ss( G) ; %Get t i ng st at e- space r epr esent at i on of syst em

%w = 1563. 7 Hz f or desi r ed CL bandwi dt h of 1300 Hz
w = 1563. 7;

%Dei sr ed CL CP
Am= t f ( [ ( 2*pi *w) ^2] , [ 1 2*0. 83*2*pi *w ( 2*pi *w) ^2] ) ;

%Desi r ed CL Pol es
Pg = pol e( Am) ;

%St at e- Feedback Cont r ol l er Gai n K
K = acker ( G_ss. a, G_ss. b, Pg) ;

%Ful l St at e Obser ver Pol es
Po = - abs( Pg) *3;

%Ful l St at e Obser ver Gai n L
L = acker ( G_ss. a' , G_ss. c' , Po) ' ;

%Def i ne St at e- Feedback Cont r ol l er wi t h Ful l St at e Obser ver
Ac = G_ss. a - G_ss. b*K - L*G_ss. c;
Bc = L;
Cc = - K;
Dc = 0;
C_ss = ss( Ac, Bc, Cc, Dc) ;

%Bui l d CL Syst emwi t h t he above cont r ol l er
C_ss_cl = f eedback( G_ss, C_ss, 1) ;

%Pr i nt Pol e and Bandwi dt h of t he CL syst em
P_check = pol e( C_ss_cl ) ;
B_check = bandwi dt h( C_ss_cl ) / ( 2*pi ) ;

%DC gai n 1
DC = 1/ dcgai n( C_ss_cl ) ;
C_ss_cl = DC*C_ss_cl ;

%Cr eat e Bode Pl ot and St ep Response of CL syst emwi t hout r esonance mode
f i gur e( 1) ;
bode( C_ss_cl ) ;
f i gur e( 2) ;
st ep( C_ss_cl ) ;
axi s( [ 0 10^- 3 0 1. 4] )
19


%Cr eat e second par t of syst emwi t h r esonance mode
G_r es = t f ( ( 2*pi *7300) ^2, [ 1 2*0. 013*2*pi *7300 ( 2*pi *7300) ^2] ) ;
G_r es_ss = ss( G_r es) ;
G_t ot = G*G_r es;
[ C_t ot al D_t ot al ] = t f dat a( G_t ot , ' v' ) ;

%Cr eat e f eedback l oop wi t h second par t of syst emi nser t ed
C_ss_cl _r es = f eedback( G_ss*G_r es_ss, C_ss, 1) ;
C_ss_cl _r es = DC*C_ss_cl _r es;

%Cr eat e Bode Pl ot and St ep Response of CL syst emwi t h r esonance mode
f i gur e( 3) ;
bode( C_ss_cl _r es) ;
f i gur e( 4) ;
st ep( C_ss_cl _r es) ;
%axi s( [ 0 1. 5*10^- 3 0 1. 4] )

%Di scr et i zat i on per i od
Ts = 1/ 30000;

%Di scr et i ze Cont r ol l er
C_t f = t f ( C_ss) ;
C_t f _d = c2d( C_t f , Ts, ' t ust i n' ) ;
[ C_numC_den] = t f dat a( C_t f _d, ' v' ) ;

%Pl ant sampl ed wi t h zoh
G_d = c2d( G, Ts, ' zoh' ) ;
G_r es_d = c2d( G_r es, Ts, ' zoh' ) ;

C_t f _cl _d = f eedback( G_d*G_r es_d, C_t f _d, 1) ;
C_t f _cl _d = DC*C_t f _cl _d;

%bui l d bode pl ot of di scr et e cont r ol l er
f i gur e( 5)
bode( C_t f _cl _d, C_ss_cl _r es) ;
l egend( ' Di scr et e Cont r ol l er ' , ' Cont i nuous Cont r ol l er ' ) ;

%Si mul at e si mul i nk model and bui l d pl ot
si m( ' a0117954x. mdl ' )
f i gur e( 6)
y = out put . si gnal s. val ues;
x = out put . t i me;
pl ot ( x, y)
axi s( [ 0 10^- 3 0 1. 4] )
xl abel ( ' Ti me ( sec) ' )
yl abel ( ' Ampl i t ude' )

%Pr i nt di gi t al cont r ol l er pol e f or bi t cal cul at i on
20

Pd = pol e( C_t f _d) ;

You might also like