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

Module 04

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

Module 04

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

Module-04: Speed control of DC Motor

Sluice gates are important structures used in various water management and control sys-
tems for a variety of purposes such as Water Flow Control, Flood Control, Irrigation, Water
Reservoir Management, Navigation and Transportation, Hydropower Generation etc. In order
to operate the gates, motors are used. The speed at which the gates are to be opened or closed
are important in many applications. In this module, we want to control the speed at which the
sluice gate will operate. We will use a DC motor with encoder to replicate a motor used in sluice
gate. Note that the speed of rotation of motors is directly related to the input voltage. The
higher the input voltage, the higher will be the rotational speed of the motor. Of course, the
input voltage should not be more than the recommended operating voltage of the motor. Thus,
in order to control the speed of a DC motor, we will need to provide a variable voltage to the DC
motor. Usually, a pulse width modulation technique is used to generate a variable DC voltage
from constant DC voltage source. For more on this check: https://microcontrollerslab.com/dc-
motor-l293d-motor-driver-ic-arduino-tutorial/

Objectives:

1. Use a motor with encoder to measure the speed of the motor.

2. Use a LCD module to display the rpm measured.

3. Assuming that the maximum rpm of the motor is r at maximum rated voltage, we provide
the desired speed for motor using a DIP switch. As indicated in the table below, 4 different
reference speeds can be given using the DIP switch:

State Reference speed


0 90% of r
1 80% of r
2 70% of r
3 60% of r

Display the desired rpm on the LCD, as well. The format to display the rpm is as follows:

Des: ...... and Cur: ......

The maximum rated voltage of the motor will be provided by the TA.

4. Design a PID controller to attain the desired rpm. While tuning the controller gains first
start with only proportional controller, i.e, keep KI = 0 and Kd = 0. Increase Kp and
check the output using serial port plotter of the IDE. Based on your requirement, whether
you want steady state or transient performance improvement change KI and Kd value.

1
Pre-lab work:
1. Read about controlling speed of a DC motor using PWM and L293D module.
(see https://microcontrollerslab.com/dc-motor-l293d-motor-driver-ic-arduino-tutorial/).

2. Read about interfacing LCD to Arduino Uno.


(see https://www.arduino.cc/en/Tutorial/LibraryExamples/HelloWorld)

3. Read about serial port monitoring and plotting.


(see https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-serial-plotter)
Report Guidelines: The report to be submitted must have the following:
1. Objectives of the module.

2. Circuit diagram with proper labelling.

3. Block diagram of the system designed.

4. Flowchart of the algorithm.

5. Observations, if any.

ˆ Snap shots of the serial monitor needs to be submitted with your observations. You
have to show how is the performance of the system effected for different values of
Kp , KI , and Kd .
– With KI = Kd = 0 and increasing Kp .
– With Kp = Kd = 0 and increasing KI .
– With Kp = KI = 0 and increasing Kd .
– Finally, with the tuned Kp , KI and Kd value.
ˆ Plot of the output from the encoder with and without the filter.

6. Answers to the questions below.


Answer the following:
1. Draw the block diagram of the closed-loop system you implemented in this module. What
is the set point for your system?

2. Why did you choose a closed-loop system for speed control? Could an open-loop system,
which involves simply providing the required PWM input to the motor to achieve the
desired RPM, be sufficient?

3. What is the value of r for the motor provided, and what is its maximum rated voltage?

4. How did you tune the controller gains? Did you use the Ziegler-Nichols Method? Provide
a justification for your approach.

5. What is the expected root locus for the system?

6. What happens when you increase the value of Kp while keeping KI and Kd at zero?
Relate your observations to the root locus diagram you created earlier.

7. What type of filter did you use to clean the recorded data (e.g., high pass, low pass)?
Based on the encoder output plot, explain how the filter helped improve data quality.

2
OBSERVATION SHEET
This sheet needs to be attached to the report (print on both sides)

1. Demonstrate the interfacing of the motor and the LCD to the Arduino UNO. You should
be able to display the desired and current rpm on the LCD in the format provided.

TA Signature with Date:

2. Show the TA how the data from the encoder is cleaned using a filter. Provide screenshots
of the data before and after applying the filter to demonstrate the effect.

TA Signature with Date:

3. Demonstrate to the TA how did you find the value of r.

TA Signature with Date:

4. Demonstrate the effect of increasing Kp keeping KI and Kd zero. Show the TA that you
have taken screenshots of the plot for various values of Kp .

TA Signature with Date:

3
5. Demonstrate the effect of increasing KI keeping Kp and Kd zero. Show the TA that you
have taken screenshots of the plot for various values of KI .

TA Signature with Date:

6. Demonstrate the effect of increasing Kd keeping Kp and KI zero. Show the TA that you
have taken screenshots of the plot for various values of Kd .

TA Signature with Date:

7. Demonstrate the tuned system to the TA, ensuring that the desired RPM matches the
actual speed after tuning. Note that once the controller is tuned, you cannot adjust the
controller gains. The TA will verify all four desired speeds and ensure that the system
reaches at least 95% of each desired speed. Additionally, the observation sheet should
include the settling band for the tuned system.

TA Signature with Date:

You might also like