Académique Documents
Professionnel Documents
Culture Documents
Page
1. OBJECTIVE
To obtain experience with the design and behaviour of a DC servo position control system and to
develop an understanding of control principles as well as real-time control implementation
software and hardware.
2. APPARATUS
DC motor, cradle, linear bearings, Gearbox and drive pinion
PC equipped with National Instrument data card and LabView software for data
acquisition and implementation of controller
Resistance based linear position sensor
Fixed rack
The system to be controlled consists of a DC servo motor mounted on a cradle and linear
bearings that is able to move along a horizontal bar. The motor connects to the pinion through a
gearbox with a gear ratio of 3.71 which can adjust the position of the motor on a fixed rack. A
LabView script controls the motor either manually by controlling the input voltage to the motor
or via a controller (Three term PID or a Lead Compensator).
Page
3. MODELING
The system can be modeled as shown in Figure 2:
In general, the torque generated by a DC motor is proportional to the armature current and the
strength of the magnetic field. In this example it is assumed that the magnetic field is constant
and, therefore, the motor torque is proportional to only the armature current i by a constant factor
Kt as shown in the equation below. This is referred to as an armature-controlled motor.
The back emf, e, is proportional to the angular velocity of the shaft by a constant factor Kg.
In SI units, the electrical power loss via armature resistance R is considered negligible and hence
the motor torque and back emf constants become equal, ie. Kt = Kg.
The equations of motion can be derived at the pinion end using Newtons 2nd law for the
mechanical system and Kirchoffs Law for the DC motor as follows:
(1)
(2)
Here,
is the angular displacement at the pinion and therefore Jtotal corresponds to the total
equivalent rotational inertia of the system at the pinion end. The motor torque at the pinion is
represented by Tp which due to the Gear ratio N ( >1) at the gear box becomes NTm or N times
the motor torque Tm. The damping coefficient b of the system and the armature inductance
are neglected for simplicity. If the interaction force between the pinion teeth and the rack is
denoted by F, a simple free body analysis of the system yields:
Page
(3)
where m is the total mass of the carriage and the translational displacement
.
(4)
In order to calculate the total inertia Jtotal at the pinion, we need to find the equivalent inertia of
the motor
at the pinion end. Considering that the kinetic energy of the motor is the same at
the motor position and at the pinion end and since
,
(5)
Since X
, transfer function between the output X(s) and the input Va(s) is obtained
by multiplying both sides of Equation (11) by r.
Page
The system parameters for the current system are shown in Table 1 and are employed for
constructing the transfer function in MATLAB for the purposes of performing a simulation
study.
0.00001933941
0.0065 m
3.71
0.022
5.3
0.731 kg
Table 1: System parameters
Block diagram representation of the feedback control system for the position servo is shown in
Figure 3.
The system can be simulated using Simulink utilizing the feedback loop presented in Figure 3.
Further, a controller can be implemented by adding a PID controller block and the reference
input can be incorporated by adding a step reference position block as shown in Figure 4. The
Page
function tf2 calculated within MATLAB by a factor of 100 to convert the linear displacement
from meters to centimeters. The reference position in the experiment is to be measured in
centimeters.
(12)
Here the controller is defined by a constant , called the proportional gain. Increasing this gain
results in shorter rise time (faster response) and increased overshoot.
4.2. Derivative Control
Derivative feedback has the form
.
(13)
Page
(14)
The idea is that control action is taken even if the error is very small provided that the average of
the error has the same sign over a long period. In addition, this form of controller also provides
better disturbance rejection.
4.4. Proportional-Integral-Derivative (PID) Controller
All three of the above controllers can be combined to give PID control. This allows control over
the steady-state and transient errors of the system. All three gain constants may be adjusted to
obtain an acceptable degree of error reduction along with acceptable stability and damping.
In Laplace form, the controller transfer function is given by:
(15)
Here each of the constants can be adjusted (tuned) to obtain an acceptable performance.
4.5. Phase Lead Compensator
Lead compensator can be considered as a modified form of the PD controller and primarily
provides noise attenuation at high frequencies. In order understand the design a lead
compensator, consider a transfer function for the open loop system as:
(16)
. A lead compensator
Page
minutes. For this case, 0.00023 minutes and 0.00001 minutes are chosen for T1 and T2,
respectively.
Page
Page
6. Double click on the Lead-Lag Filter block and set the time constants T1 to 0.0137 and
T2 to 0.00084746 and click OK.
7. Double click on Step block to apply a step input to the system and modify the set point
by setting Final Value to 10 and click OK.
8. Run the simulation and double click on Scope to see the system response
Save a screenshot of the plot which is needed for Prelab submission.
Comment on the effects of adding a lead compensator on system behavior i.e. overshoot, rise
time and settling time.
Submit the plots and the discussion as Prelab document 4.
6. EXPERIMENTAL PROCEDURE
6.1. Start-up
1. Load the LabView script PositionServoPID.vi
2. Ensure that the system is initially UNLOADED.
3. Turn on the power box.
4. Run the LabView script
5. Set position to 30 cm
6. Set the control mode to auto
7. Set all controller gains to zero.
6.2. Manual Control
1. Set control mode to manual
2. Use the DAC1OUT slider to control the motor voltage to change the motor position.
Comment on which dynamic parameter of the system (position, velocity or acceleration) seems
to correspond to voltage.
6.3. Closed Loop Control
1. Reinitialize the motor position.
2. Set Kc=0.3.
3. Plot the system response for a reference input of +10 cm displacement to move the
position from 30 cm to 40 cm.
Hint: In order to extract data from Labview, you can adjust the x (time) axis of the
Waveform Chart block as desired to get the best perspective, click on the Plot ON
button when ready to start plotting, collect data, click on the Plot ON button again to
stop plotting, then right click on the chart and use the export to clipboard function and
Page
10
paste the data in a text file. Please note that the sampling frequency of the DAQ is set
at 100Hz.
4. Repeat the process with Kc=0.1, 0.6 and 0.9.
Plot the three responses on one chart and include it in your report.
Comment on the effects of proportional gain on system behavior, steady state error, settling
time and rise time. Based on observations, comment on the effects of increasing Kc further
and whether higher Kc always better. Based on the derived transfer function for the system,
comment on the order of the system and the expected and actual steady state error to a step
input for the derived model.
5. Set Kc=0.1 and repeat step 3; then, add the integral controller by setting Ti=0.01 and
repeat step 3.
Plot the responses from P and PI controllers on one chart and include it in your report.
Comment on the effects of adding an integral controller to the system on system behavior,
steady state error, settling time and rise time.
6. Ti corresponds to integral time which is proportional to the inverse of integral gain.
This means that lowering Ti increases Ki. It should be noted that Ti in LabView is in
minutes. Repeat step 3 with Ti set to 0.05 and 0.005.
Comment on the effects of smaller values of Ti (larger Ki)
6.4. Disturbance Rejection
1. Reinitialize the motor position.
2. Set Kc=0.1 and other gains to zero.
3. Apply a disturbance to the system by clicking on the Apply Disturbance button. This
button applies 2 volts to the motor for a period of 0.1 seconds. Plot the system output.
4. Add the integral controller by setting Ti=0.005 and repeat step 3.
Plot the responses from P and PI controllers on one chart and include it in your report.
Comment on system stiffness, steady state error, responsiveness and other disturbance
rejection characteristics of the system such as settling time and amplitude using each
controller and also, which controller is preferred for this purpose.
Page
11
Page
12
Question: Which type of P, PI or PID controller is the behavior similar to? What happens if
the lead and lag values are changed? How is the delay in system behavior explained? What
are the benefits of a lead compensator?
7. Discussion of Reports and Formal Report
ONLY one formal group report is required. Make sure that names ALL group members are written on
the cover page with signatures to indicate the participation of each member.
Report must include answers to the posed questions in all of the experimental sections together with
discussion of results. In addition to the use of generated plots, populate the response details in Table 2 and
use this information as a basis for your discussion on system response behavior. You must submit all
plots used in your discussion.
Gain
Kc
P
Tracking
Ti
tr
Mp
Disturbance Rejection
ts
s.s.e
2nd OS
Magnitude
0.1
Control
0.3
0.6
0.9
For Dist
Rejection
0.1
0.1
0.01
0.1
0.05
0.1
0.005
Rejection
0.1
0.005
Loaded
0.6
PI
Control
For Dist
Lead
Comp.
2
Table 2: Experimental Response Summary
ts
s.s.e