Antenna position control system
Marc Alomar December 17th, 2013
Abstract In this report we study several control systems for a dc-motor. In the rst section, we analyze the model equations and represent them with a Simulink block diagram. With this tool we can obtain the state-space representation and the transfer function of the system, as well as the response under dierent inputs and perturbations. In the second section we implement a feedback control system. This controller, based on the measurements of velocity and position, allows us to specify a reference position that will be followed by the output. We study how the gain values aect the response of the system under perturbations, with an especial emphasis on the trade-os that must be considered in any controller design. In the last section, we consider a dierent controller design based on the modal approach. The modal approach allows us to specify the poles of the closed-loop system, and to design the controller matrix in consequence. Finally, we examine how an integrator can reject low-frequency perturbations.
Open Loop Analysis
u cm cm
di = Re i + Le dt + ke = k i = JT d dt
The DC motor equations are
where u is the motor voltage, the motor angular speed and Cm the torque. The constants used in this problem are N Jm k e Re Le Jc kg = 300 = 0.001 m2 kg = k = 0.2 V/rads or Nm/A = 2 = 2 mH = 90 m2 kg = 31.4 103 V/rads
The total inertia JT is the sum of the motor inertia Jm and the load inertia Jc , including a reduction factor 1/N 2 , i.e. JT = Jm + Jc /N 2 . When we apply a Laplace transform using zero initial conditions, we obtain an algebraic system, = Re I (s) + Le sI (s) + ke (s) U (s) Cm (s) = k I (s) Cm (s) = JT s (s) Now, we want to express this system as a block diagram. The input variable is the motor voltage, U (s), and the outputs are the measured angular velocity, m , and the measured angular position, m . Notice that the relation , where N = 300 is the reduction ratio. The measurement between the angular velocity and the position is = N 1
is given in volts, m = kg , where kg is the dc-gain of the velocity sensor. The current I (s) can be expressed in terms of the input U (s) and the output (s), I (s) = 1 (U (s) ke (s)) Re + Le s
The torque is obtained with a gain block, Cm (s) = K I (s), and the angular velocity is obtained with an integrator block, m (s) = Cm (s)/JT s. Finally, the angular position (s) is obtained with another integrator, (s) = (s)/N s. The block diagram has been drawn in Simulink (gure 1). Now, we can use the Control System Toolbox to analyze the system. We have rst obtained the state-space representation using the command linmod, x 1 0 5 0 x1 0 0 0 p x 2 = 100 0 0 1 x2 + 0 u + 1 0 n x 3 0 1 10 x3 1 0 0 x 0.0033 0 0 1 0 0 1 p x2 = + u+ m 0 15.7 0 0 0 0 n x3 We nd that the system is of third order, with state variables x1 , x2 and x3 . Notice that we dont know what is the physical meaning of the variables chosen by Matlab. However, since we have specied the input U and both ouputs, and m , that information is not necessary. In our model we have explicitly expressed the perturbation inputs, p and n. In the following sections we will explore the eect of this perturbations on the response of the system. The transfer function between the input voltage U and the output angle m is obtained using the command ss2tf(A, B, C, D), H= 166.7 m = 3 U s + 103 s2 + 104 s
The poles are the eigenvalues of matrix A. Command eig(A) gives the three poles 1 = 0, 2 = 10.1 and 3 = 989.9. It is interesting to study the time response of the open-loop system. Before making any simulation, we should know approximately the time scale of the system and the expected behavior of the outputs. An appropriate combination of the parameters gives the time constant , = Re JT 0.1 s ke k
In a dc-motor, when we apply a voltage V the motor reaches a certain angular velocity after a transitory period. Then, the angle should be an increasing function of time. Figure 2 shows the simulation for a step voltage input. Constant velocity is reached in about = 0.1 s, and the position measurement shows the expected response. Figure 3 shows the Bode diagram for the position measurement. As we can see, the system is always stable, since the gain is under 0 dB at any frequency. The gure shows that the system behaves like a low-pass lter: frequencies higher than 10 Hz are highly attenuated. With respect to the phase plot, we see that the system starts with a -90 phase shift, and ends with -270. If we take a look at the transfer function H we can understand this result. The denominator, s(s2 + 103 s + 104 ), contains an integrator which gives the initial phase shift of -90. Then, each pole adds a -90 shift, up to -270. The Nichols diagram shows the same information, and we can draw the same conclusions from it.
Closed loop analysis
Our rst control design will use the speed and position measurements. The goal is that, for a given reference angle (in our analysis, ref = 10), the output should follow this value after a short transitory regime. A feedback loop allows the system to compare the input value to the output measurement. This error, = ref m , is going to be proportional to the actuator voltage. By this way, once that the output is equal to the reference value the error will be zero, and the actuator will stop, reaching a steady state. Figure 4 shows the closed loop block diagram. Notice that all the details of our system are hidden behind a box with inputs U, P (torque perturbation) and N (measurement noise), and outputs A and W (the sensor gains are included in the box). This representation is convenient in the upcoming analysis, since we are only interested in the details of the control system. The control system consists of two gain blocks, Kp and Kv , which amplify the dierence between the reference value and the measurements. The response of the system has been analyzed using a step angle of ref = 10 at t = 0 s. Figure 5 shows the response for Kv = 10 and dierent values of Kp . We can see that the response is overdamped, and that the rise-time is reduced when Kp increases. In simple words, the system is faster when we increase the gain Kp . On the other hand, the actuator voltage increases with Kp . As we can see, the limit of Vmax = 300 V is not satised when Kp = 500. The response to perturbations has been studied using a step torque perturbation of magnitude 3 Nm at t = 5 s, and harmonic sensor noise at t = 10 s of amplitude 0.05 V and frequency 20 rad/s. The behavior with respect to Kp is quite dierent in both cases. The torque perturbation is attenuated when we increase Kp , but the noise signal is amplied. That means that we will have to reach a compromise in the design of our control blocks. The poles of the closed-loop system are shown in gure 6. All the poles are real and negative, then the system is stable. The dominant pole is the one that is closest to the imaginary axis, and it leads to a rst order dynamics, as we could see in gure 5. As Kp increases, the two rightmost poles get closer, and the third pole moves further to the left. As we will see in the following section, those two poles will eventually merge and turn complex, leading to a second order system dynamics.
Modal approach
In the previous section, we examined the behavior of our controller regarding the values of Kv and Kp , but we didnt know a priori the response of our system. A more eective method would be to set the poles of the closed loop system, and then to nd the constants K that lead to these poles. This method is known as the modal approach. We will skip most of the mathematical details, since they can be found in the lecture notes. The number of poles that we can set is equal to the number of measurements on our system. In our case we can set two poles, since we can only measure the position and the angular velocity. We wont have any control over the third pole, and therefore we will have to check its location. The strategy that we will follow is to set two complex conjugate poles, in order to have a 2nd order response. If the third pole is closer to the imaginary axis, it will predominate, and all our eorts will be useless. First, we have to solve the homogeneous system [A i I B ] vi i =0
This system has a coecient matrix of dimensions 3x4. The column vector vi is the eigenvector of ACL , and it has three components (i.e. dim(A) = 3). The fourth unknown, i , is the product i = K C vi . We will solve this system for each pair of eigenvalues, 1 and 2 . Once we know the unknowns v1 , v2 , 1 and 2 we can nd the gain vector K , which has two components,1
1 The
notation [...] means that we concatenate the vectors inside brackets.
K = [1 2 ] (C [v1 v2 ])
With the K matrix we can build the block-diagram (gure 7). The subsystem outputs are fed into a multiplexer, and then multiplied by the gain matrix K (notice that it is a matrix product, and the gain block output is a singled value signal). Before the summing point, it is necessary to add a feedforward gain H. Since the control block is now in the feedback loop, the reference position is not compared directly to the output position, but to the product K u. Therefore, we have to add the gain block H that corrects the steady-state error. The value of H is found by calculating the transfer function between the output of the gain block H and the output A of the subsystem. We take the dc-value (i.e. s = 0), and calculate the inverse. This constant will be H . We wanted the system to have a second order response, with damping ratio = 0.7. In order to select the poles, we used the fact that the relation between the poles and the damping ratio is given by tan = Im()/Re(), with = cos . For = 0.7, the relation implies Im() = 1.2 Re(). We rst looked at poles in the interval Re() [40, 4]. Figure 8 shows the closed-loop poles. As we can see, the system is always stable: in all cases the third pole is far away of the imaginary axis, and it has a negligible eect on the dynamics. However, most of these choices didnt satifsy the requirement of U 300 V. We found that the best choice that satises this constraint is = 11.8 14.2i, giving a controller matrix K = (1664 8.5) and H = 1664. The response is shown in gure 9: the system shows a slight overshoot, but a very fast response, with a maximum voltage Vmax = 290 V at t = 0 s. However, the system is still vulnerable to perturbations. If we want to compensate the torque perturbation, we can add an integrator to our controller. The design is shown in gure 10: now, the dierence between the reference and the output position is integrated and fed into the controller. The integrator increases the order of the system. Now we have a fourth order system, so we can set three poles. The procedure to nd the K matrix is analogous, the only dierence is that we have to change the open-loop design to nd A, B and C (gure 11). Good results were found for 1,2 = 10 10.2i and 3 = 1100. The fourth pole was located at 4 = 133, far enough from 1,2 to maintain the desired second order response. Figure 12 shows the response with this controller. As we can see, the perturbation at t = 5 s is rejected. However, the response at t = 0 s is slower.
A
3 N 2 P 1 U
Figures
1 Le.s+Re TF 1
I Ke G1 Ke G2
Cm
1 Jt.s TF 2
1 N.s Integrator + Gear
A 1 DC Gain 1 Kg DC Gain 2 1 A
2 W
Figure 1: Open-loop block diagram.
Step Response 1.6 0.16
Step Response
1.4
0.14
1.2
0.12
1 Amplitude Amplitude
0.1
0.8
0.08
0.6
0.06
0.4
0.04
0.2
0.02
0.1
0.2
0.3
0.4 0.5 0.6 Time (seconds)
0.7
0.8
0.9
0.1
0.2
0.3
0.4 0.5 0.6 Time (seconds)
0.7
0.8
0.9
Figure 2: Step response of the open loop system. Velocity measurement (l.), position measurement (r.).
Bode Diagram 0 50 Magnitude (dB) 100 150 200 250 90 50 0
Nichols Chart
OpenLoop Gain (dB)
0 1 2 3 4 5
100
150
135 Phase (deg)
180
200
225
270 1 10
10
10
10 Frequency (rad/s)
10
10
10
250 270
225
180 OpenLoop Phase (deg)
135
90
Figure 3: Bode diagram of the open-loop system (l.). Nichols diagram (r.).
A ref pi/180 Step Deg/Rad 1
V ref Kp P Cont Kv V cont
P U A
180/pi Rad/Deg Scope
P sensor
Pert
W N
Noise
Delay
Subsystem
Figure 4: Closed-loop block diagram. The subsystem block is equivalent to gure 1.
Angle 12 10 Degrees 8 6 4 2 0 0 5 time (s) Actuator 1000 800 Voltage (V) 600 400 200 0 200 0 5 time (s) 10 15 Kp = 100 Kp = 300 Kp = 500 10 15
Figure 5: Closed loop response for Kv = 10 and various Kp . Notice that we have successively superposed a torque perturbation at t = 5 s and measurement noise at t = 10 s.
0.8
0.6
0.4
0.2 Imaginary Part
0.2
0.4
0.6
0.8
1 900
800
700
600
500 Real Part
400
300
200
100
Figure 6: Closed-loop poles, for dierent values of Kp (same parameters than in gure 5).
A ref pi/180 Step Deg/Rad 1
V ref H Gain1
P U A
180/pi Rad/Deg Scope
P sensor
Step1
W N
Noise
Delay
Subsystem
K*u Gain
Figure 7: Block diagram of the modal control system.
1 0.8 0.6 0.4 0.2 Im(z) 0 0.2 0.4 0.6 0.8 1 1000
50 40 30 20 10 0 10 20 30 40 50 60
980
960 940 Re(z)
920
900
40
20
Figure 8: Poles evolution of the modal control system. The right hand side poles were xed by the designer, the left-hand pole was calculated afterwards.
Voltage 300 200 100 0 100 200
Volts
5 Time (s) Angle
10
15
15
Degrees
10
5 Time (s)
10
15
Figure 9: Response of the system with modal control.
A ref pi/180 Step Deg/Rad 1
V ref
U A
180/pi Scope Rad/Deg
P sensor
P
Step1
W N
Noise
Delay
Subsystem
K*u Gain Int 1 s
Figure 10: Block diagram of the modal control system with an integrator.
10
Ground
1 In1
U A
Ground1
W N
Ground2 Subsystem 1 Out1 2 Out2 3 Out3 Int 1 s
Figure 11: Open-loop model for the diagram of gure 10.
Voltage 200 150 100 50 Volts 0 50 100 150 200
5 Time (s)
10
15
Angle 14 12 10 8 Degrees 6 4 2 0 2
5 Time (s)
10
15
Figure 12: Response of the modal integrator control system.
11