Exp 4
Exp 4
Experiment # 4
Motor Position Control
- [1.2] Exercise-1: Note the minimum voltages required to operate the motor in
either direction.
- [1.2] Exercise-2: If the minimum voltages in each direction are not equal, how
will it affect our control loop and its precision?
- [1.2] Exercise-3: Is the motor position stable in the open loop configuration?
- [1.2] Exercise-4: Can we control the motor position in the open loop configura-
tion?
- [1.3] Exercise-5: Is the system stable in the closed loop configuration with unity
gain? Note down the main aspects of the response like settling time and steady
state error.
- [1.4] Exercise-7: What is the transfer function that has been identified by the
step method?
- [1.7] Exercise-8: Give the simulation results of your identified motor transfer
function with the P controllers. Make sure to also tabulate the resistor values used
for each Kp value.
- [1.7] Exercise-9: Give the simulation results of your identified motor transfer func-
tion with the PI controllers. Make sure to also tabulate the resistor and capacitor
values used for each Kp value.
- [1.7] Exercise-10: Give the simulation results of your identified motor transfer
function with the PID controllers. Make sure to also tabulate the resistor and
capacitor values used for each Kp value.
1
- [1.7] Exercise-11: Is there any instability in the response when you connect the
controllers (P, PI, PID) and operate them at maximum voltages (±12V )?
- [1.7] Exercise-12: If there is instability, then what are the main causes of this
instability?
2
Instructions
Follow the instructions stated below:
1. All the exercises in this lab handout are to be evaluated by instructors. After
getting a result, ask the instructor to evaluate them.
2. Please save all your graphs by taking screen shots in a word file with the exercise
numbers mentioned.
3. After the lab, you (all members of a group) have to upload the above mentioned
word file into the drop box on LMS with the name of that file as LabX-Y-N.pdf (X
is the experiment number, Y is the day e.g. Friday (Mor) or Friday (Eve), and N
is the name of student).
4. Take care of the lab equipment handed over to you during the lab.
1 Introduction
A common actuator in control systems is the DC motor. It directly provides rotary
motion and can provide linear motion when coupled with wheels/drums and cables. The
electric circuit of the armature and the free body diagram of the rotor are shown in
Figure-1. The main objective of this lab is to familiarize students with analog control
design using discrete components like Op-Amps.
Here we will treat the DC motor as a plant. The differential equation for motor speed
control is shown in Equation-1.
3
T , the torque applied, is proportional to the armature current and can be replaced by
Kt I(s), where Kt is the armature constant. J is the moment of inertia. We can take the
armature constant to be equal to the motor constant, so the above relation becomes:
θ(s) K
= (2)
V (s) s((Js + b)(Ls + R) + K 2 )
Since we know the system is overdamped, the motor transfer function can also be written
as:
θ(s) Km
= (3)
V (s) s((τm s + 1)(τe s + 1))
where τm is the mechanical time constant and τe is the electrical time constant. If
τm 10τe , i.e., the mechanical time constant is at least an order of magnitude (ten
times) faster, then the response is dominated by the slow mechanical pole, and the sys-
tem can be well approximated by a single pole transfer function:
θ(s) Km
= (4)
V (s) s(τm s + 1)
Exercise-1: Note the minimum voltages required to operate the motor in either direc-
tion.
Exercise-2: If the minimum voltages in each direction are not equal, how will it af-
fect our control loop and its precision?
4
Figure 2: Motor Driving Circuit
Exercise-4: Can we control the motor position in the open loop configuration?
Exercise-5: Is the system stable in the closed loop configuration with unity gain? Note
down the main aspects of the response like settling time and steady state error.
5
Figure 4: Open Loop Motor Driving Circuit
non-parametric methods.
We will use the step response method in this lab. This method is quite simple and gives
a crude estimation of the system. For this, connect the circuit as shown in Figure-8. The
equivalent block diagram is shown in Figure-9.
While the switch is open, measure the voltage at the output of the potentiometer that is
connected to the motor by mechanical coupling, and bring this voltage to zero by manu-
ally rotating the motor shaft.
To measure the two parameters given in Equation-4, apply the step input to the system
by closing the switch. This will give an exponential rise as the output of the potentiome-
ter, as shown in Figure-10.
To calculate the motor constant (Km ), measure the steady state output voltage. The
input voltage that we have applied is 12V. So we can calculate Km by using the following
formula:
6
Figure 6: Closed Loop System without Controller
To obtain the value of τm , calculate the time from the step input starting point to the
time in which the system achieves 63.3 percentage of its maximum value. This is the
mechanical time constant (τm ) of the motor. Repeat this experiment 5 to 6 times and
take the average of Km and τm to minimize the errors in the readings.
Exercise-7: What is the transfer function that has been identified by the step method?
7
Figure 8: Closed Loop Circuit to Identify the Systems
cordingly sometimes called three-term control: the proportional, the integral and deriva-
tive values, denoted P, I, and D. Heuristically, these values can be interpreted in terms
of time: P depends on the present error, I on the accumulation of past errors, and D is
a prediction of future errors, based on current rate of change.
Some applications may require using only one or two modes to provide the appropriate
system control. This is achieved by setting the gain of undesired control outputs to zero.
A PID controller will be called a PI, PD, P or I controller in the absence of the respective
control actions. PI controllers are fairly common, since derivative action is sensitive to
measurement noise, whereas the absence of an integral value may prevent the system
from reaching its target value due to the control action.
8
Figure 10: Step Response of the System for System Identification
9
Figure 11: Effects of Increasing Parameter Independently
10
Figure 13: Circuit of PID Controller
11
values for the integral term can be calculated using the following formula:
1
Ki =
Ri Ci (6)
Ci = 1/(Ki × Ri )
You can select the appropriate value of the resistor to get one of the available values of
the capacitor.
To calculate the components values for the derivative term, use the formula given below:
Kd = Rd × Cd
Kd (7)
Cd =
Rd
The calculation of the proportional term is pretty easy: its circuit is the same as that of
a non-inverting amplifier.
Exercise-9: Implement the PI Controller with the following gains and observe the re-
sponse:
Kp = 2, Ki = 0.5
Kp = 5.7, Ki = 0.2
Kp = 11, Ki = 0.1
Give the simulation results of your identified motor transfer function with these con-
trollers. Make sure to also tabulate the resistor and capacitor values used for each Ki
value.
Exercise-10: Implement the PID Controller with the following gains and observe the
response:
Kp = 2, Ki = 0.5, Kd = 1
Kp = 5.7, Ki = 0.2, Kd = 2
Kp = 11, Ki = 0.1, Kd = 1
Give the simulation results of your identified motor transfer function with these con-
trollers. Make sure to also tabulate the resistor and capacitor values used for each Kd
value.
12
Exercise-11: Is there any instability in the response when you connect the controllers
(P, PI, PID) and operate them at maximum voltages (±12V )?
Exercise-12: If there is instability, then what are the main causes of this instability?
13