Control Project Report
Control Project Report
Objective:
Apparatus :
1. Breadboard
2. Wire
3. Resistor ( 10K, 1K )
4. Capacitor( 100uF, 1uF )
5. Arduino UNO
6. Operational Amplifier ( LM358 )
7. MATLAB ( 2014 or Later version)
8. Simulink Arduino support package.
Description of tools:
1. Arduino UNO
The Arduino Uno is an open-source electronics platform based on the easy-to-use hardware and
software. It consists of a microcontroller board (the "brain") and an integrated development
environment (IDE) (the "software"). Arduino boards are able to read inputs - light on a sensor, a
finger on a button, or a Twitter message - and turn it into an output - activating a motor, turning
on an LED, or publishing something online.
3. Resistor
A resistor is an electronic component designed to limit or control the flow of electric current in a
circuit. It is typically a passive component, which means it doesn't amplify or store energy like
active components (e.g., transistors or capacitors). Resistors are characterized by their resistance
value, measured in ohms (Ω). They are often used to regulate voltage levels, divide voltage, limit
current, protect components, and perform various other tasks in electronic circuits.
Fig-4: Resistor.
4. Capacitor
A capacitor is an electronic component that stores electrical energy in an electric field. It consists
of two conductive plates separated by an insulating material, known as a dielectric. Capacitors are
used in electronic circuits to store and release energy, filter signals, and perform various other
functions in electrical and electronic systems. They are characterized by their capacitance, which
is a measure of their ability to store electric charge. The unit of capacitance is the farad (F).
Fig-5: Capacitor
Page 2
Towhidul Islam ET-201068
5. LM358 IC
LM358 is a widely used integrated circuit (IC) that belongs to the operational amplifier (op-amp)
family. It is a dual op-amp IC, meaning it contains two separate operational amplifiers within a
single package. The LM358 is known for its versatility, low cost, and wide supply voltage range,
making it popular for use in various electronic circuits, such as voltage followers, amplifiers,
filters, and signal conditioning applications. It is commonly used in audio amplifiers, sensor
interfaces, and signal conditioning circuits.
Fig-6: LM358 IC
The Simulink Arduino Support Package allows users to program and deploy algorithms to
Arduino boards using Simulink, a graphical programming environment for modeling, simulating,
and analyzing multidomain dynamical systems. This support package provides blocks for
configuring and accessing Arduino board I/O and communication interfaces, allowing users to
develop and deploy control systems, signal processing, and other algorithms on Arduino
hardware. It offers a convenient way for engineers and hobbyists to prototype and test algorithms
on Arduino boards using Simulink's intuitive interface.
Page 3
Towhidul Islam ET-201068
Description of task:
An RC circuit is a combination of a resistor (R) and a capacitor (C) connected in series or parallel.
The "R" represents the resistance, while the "C" represents the capacitor. This circuit is used in
electronic systems for various purposes, including signal filtering, time delay, and energy storage.
The capacitor stores and releases electrical charge, influencing the circuit's response to changes in
voltage over time.
Page 4
Towhidul Islam ET-201068
1
So, the transfer function of the RC circuit is . This is a 1st order system.
𝑆+1
Hardware setup:
There is a resistor and capacitor connected in series. Value of Resistor is 10K and Capacitor is
100 micro farad. Negative terminal of capacitor is connected to the GND pin of Arduino. As a
supply I have used step input from the Arduino digital pin ( 8 ). So one terminal of the resistor is
connected to pin 8 of Arduino UNO. Output is measured by analog pin of Arduino across
capacitor.
Page 5
Towhidul Islam ET-201068
Simulink Setup:
Here, Arduino pin 8 is a digital pin. Which will generate a step input of magnitude 1. Then I have
connected a scope to visualize the input. Here, input is a tool used to create the step input as a 2-
D array in the MATLAB workspace. Arduino pin 0 (A0) is an analog pin of Arduino. I have used
this pin to read the voltage across the capacitor which is analog data.
Output:
Page 6
Towhidul Islam ET-201068
Determining Transfer function from Fig-9:
Page 7
Towhidul Islam ET-201068
Transfer function I have calculated from the Fig-9 is exactly same as the transfer function of RC
circuit I have developed before.
Page 8
Towhidul Islam ET-201068
Hardware setup:
First we have developed a RC circuit before as Task-1. Then For develop PI controller we need
Operational amplifier which model is LM358. Then we have to connect a resistor in PIN-2 of LM
358 and a resistor and capacitor in series between pin 2 and 6 which will make a PI controller.
Then RC circuit we develop earlier have to connect in Pin -6. Then our full circuit will be complete.
Then We connect a 9v battery to the pin 4 and pin 8 of the LM358 IC. After completing the circuit
by using the same Simulink setup we have measured the performance.
Page 9
Towhidul Islam ET-201068
Output:
Discussion: In this project we have measured the transient response of a 1st order system
practically. We observed its different parameter. Our system/plant was a series RC circuit. In task-
1, by theoretical calculation, we have determined its transfer function. Then by using Simulink
environment in the MATLAB and Arduino uno board, we have measured the step response of the
circuit. Using Arduino board in the MATLAB environment was a totally new experience for us.
Then by using the response curve we have determined the transfer function again which matched
with the transfer function we have calculated before.
Then to improve the circuit performance we have developed a PI controller. To develop PI
controller we have used LM358 operational amplifier. This was task-2.
During the whole process, learning from the Control System theory course helped us a lot. I hope
that all the experience we have gathered from this project will help us in the future.
Page 10