0% found this document useful (0 votes)
11 views

Exp 4

Uploaded by

shahzaib.hasnain
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Exp 4

Uploaded by

shahzaib.hasnain
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

EE 361: Feedback Control Systems

Experiment # 4
Motor Position Control

Date: / / 2023 Section:

Lab Report 4 Requirements


These are the questions/exercises from the handout that have to be answered in the lab
report:

- [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-6: What are the calculated values of Km and τm ?

- [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?

- [1.7] Exercise-13: How can we remove 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.

Figure 1: Electric circuit of armature

Here we will treat the DC motor as a plant. The differential equation for motor speed
control is shown in Equation-1.

(Ls + R)I(s) = V − KsΘ(s). (1)


Here, L is the inductance and R is the resistance in the motor equivalence circuit. V
describes the supplied voltage and K is the motor constant. We get a relation by using
rotational analogs to Newton’s Laws of Motion (i.e. an object that is at rest remains at
rest [does not rotate]; an object that is rotating continues to rotate with constant angular
velocity, unless acted on by an external torque):

T − bsΘ(s) = Js2 Θ(s).

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(Js + b)Θ(s) = KI(s).


By eliminating I(s) from the above two relations, we can get the following transfer func-
tion, where the position is the output and the voltage is the input:

θ(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)

1.1 Motor Driving Circuit


We are using Op-Amps to design the PID controller, but the former do not have the power
to drive a 12V or 24V DC motor. For this purpose, we have to use a ”power amplifier”
to drive the DC Motor. Here we are using class AB amplifier to drive the motor. The
circuit of class AB amplifier is shown in Figure-2, and the equivalent block diagram is
shown in Figure-3. Note that the power amplifier only boosts the power (current) and
not the signal amplitude.

1.2 Open Loop System


To drive the system in an open loop configuration, connect the circuit as shown in Figure-
4.
We can drive the motor in both the clockwise and anticlockwise directions. However,
there is always a dead zone in the middle where motor does not start.

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?

Exercise-3: Is the motor position stable in the open loop configuration?

4
Figure 2: Motor Driving Circuit

Figure 3: Equivalent block diagram of Figure-2

Exercise-4: Can we control the motor position in the open loop configuration?

1.3 Closed Loop System without Controller


To operate the system in a closed loop configuration with unity gain, connect the circuit
as shown in Figure-6. The motor shaft is mechanically coupled to the free running
potentiometer, which in turn is acting as a position sensor. The equivalent block diagram
of Figure-6 is shown in Figure-7. At this time, there is no controller in the feedback path.
Once the circuit is set up, again operate the motor in both directions and check the dead
band present in the system.

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 System Identification


System identification is a very important and useful tool in feedback control systems.
There are many methods to identify the system characteristics, including the step re-
sponse method, PRBS (pseudo random binary signal) method, parametric methods, and

5
Figure 4: Open Loop Motor Driving Circuit

Figure 5: Equivalent block diagram of Figure-4

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:

Steady State Outout Voltage


Km = (5)
Applied Input Voltage

6
Figure 6: Closed Loop System without Controller

Figure 7: Equivalent Block Diagram of Figure-6

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-6: What are the calculated values of Km and τm ?

Exercise-7: What is the transfer function that has been identified by the step method?

1.5 PID Controller Basics


1
A proportional integral derivative controller (PID controller) is a generic control loop
feedback mechanism (controller) widely used in industrial control systems a PID is the
most commonly used feedback controller. A PID controller calculates an ”error” value as
the difference between a measured process variable and a desired setpoint. The controller
attempts to minimize the error by adjusting the process control inputs.
The PID controller calculation (algorithm) involves three separate parameters, and is ac-
1
www.wikipedia.org/wiki/P ID − controller

7
Figure 8: Closed Loop Circuit to Identify the Systems

Figure 9: Equivalent block diagram of Figure-8

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.

1.5.1 Proportional Term


The proportional term (sometimes called gain) makes a change to the output that is
proportional to the current error value. The proportional response can be adjusted by
multiplying the error by a constant Kp , called the proportional gain. A high proportional
gain results in a large change in the output for a given change in the error. If the
proportional gain is too high, the system can become unstable.

8
Figure 10: Step Response of the System for System Identification

1.5.2 Integral Term


The contribution from the integral term (sometimes called reset) is proportional to both
the magnitude of the error and the duration of the error. Summing the instantaneous
error over time (integrating the error) gives the accumulated offset that should have been
corrected previously. The accumulated error is then multiplied by the integral gain and
added to the controller output.
The integral term (when added to the proportional term) accelerates the movement of
the process towards setpoint and eliminates the residual steady-state error that occurs
with a proportional only controller.

1.5.3 Derivative Term


The rate of change of the process error is calculated by determining the slope of the
error over time (i.e., its first derivative with respect to time) and multiplying this rate of
change by the derivative gain Kd . The magnitude of the contribution of the derivative
term (sometimes called rate) to the overall control action is termed the derivative gain,
Kd .
The derivative term slows the rate of change of the controller output and this effect is
most noticeable close to the controller setpoint. Hence, derivative control is used to re-
duce the magnitude of the overshoot produced by the integral component and improve
the combined controller-process stability.

The combined/independent effects of these three terms are shown in Figure-11.

1.6 Closed Loop System with PID Controller


The closed loop system with the PID Controller is shown in Figure-12.
The circuit of the PID Controller is shown in Figure-13.
The appropriate values of the resistors and capacitors can be calculated. The component

9
Figure 11: Effects of Increasing Parameter Independently

Figure 12: Closed Loop system with PID Controller

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.

1.7 Implementation of different controllers


In this section, different types of PID Controllers (P, PI, PID) will be implemented and
their responses will be observed.
Exercise-8: Implement the Proportional Controller with the following gains and observe
the response:
Kp = 2
Kp = 5.7
Kp = 11
Give the simulation results of your identified motor transfer function with these con-
trollers. Make sure to also tabulate the resistor values used for each Kp value.

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?

Exercise-13: How can we remove this instability?

13

You might also like