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

stepFunction_CircuitDiagram_physicalSystem

The document details a PID-controlled ball levitation system that utilizes ultrasonic sensors and an Arduino microcontroller to maintain the ball's position by adjusting fan airflow. It explains the working principles of the system, including the role of potentiometers for tuning PID parameters, and the circuit design for controlling the fan speed. Additionally, it discusses the effects of varying PID values on system response, illustrating under-damped, critically damped, and over-damped behaviors through simulations.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

stepFunction_CircuitDiagram_physicalSystem

The document details a PID-controlled ball levitation system that utilizes ultrasonic sensors and an Arduino microcontroller to maintain the ball's position by adjusting fan airflow. It explains the working principles of the system, including the role of potentiometers for tuning PID parameters, and the circuit design for controlling the fan speed. Additionally, it discusses the effects of varying PID values on system response, illustrating under-damped, critically damped, and over-damped behaviors through simulations.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

The simulation demonstrates the

performance of a feedback control


system designed to regulate the
ball's position through power
adjustments to the fan. The *black
line*, representing the control
input (power), and the *orange
line*, showing the ball's position,
reveal how the system reacts to
achieve and maintain the desired
height. Initially, the power is
minimal, and the ball remains at a
low position. Around sample 160, there is a sharp increase in power, signaling the controller's
response to lift the ball. The ball's position follows shortly after with a noticeable delay,
reflecting the system's response time as the airflow builds up to overcome gravity. Once the ball
reaches the target height at around sample 170, the position stabilizes with small fluctuations,
indicating the controller's effort to maintain equilibrium. Toward the end of the simulation, the
power is reduced, causing the ball to drop, showing a clear correlation between the control signal
and the ball's position. Overall, the system demonstrates effective feedback control, with the
controller successfully interpreting the ball's position.
tarp

The ball levitation Physical system demonstrates the


concept of stable levitation using controlled airflow
regulated by a PID controller. The purpose of the system is
to maintain a ball at a desired height within a vertical
column by adjusting the fan's airflow intensity. Ultrasonic
sensors measure the ball's real-time position and send the
data to an Arduino microcontroller. The Arduino processes
this information and, using a PID (Proportional-Integral-
Derivative) controller, dynamically adjusts the fan speed to
stabilize the ball at the target height. Potentiometers are
used to tune the PID controller parameters, enabling fine
adjustments for proportional, integral, and derivative gains
to optimize system performance. This setup illustrates the principles of feedback control, sensor
integration, and real-time system tuning.

paper
The image represents a PID-controlled ball levitation system designed to stabilize the vertical
position of a ball within a glass cylinder by controlling airflow. The setup includes the following
key components:

1. Ultrasonic Sensors
o Two ultrasonic sensors are used to measure the position of the ball inside the glass
cylinder. These sensors provide real-time feedback on the ball's height, which is
crucial for maintaining its levitation.
2. Arduino UNO
o The Arduino UNO microcontroller serves as the system's brain, processing inputs
from the sensors and adjusting the fan's speed to stabilize the ball at a target
height. It likely runs a PID control algorithm.
3. Potentiometers:
o Three potentiometers are shown, which may be used to manually adjust control
parameters such as Proportional (P), Integral (I), and Derivative (D) gains of the
PID system.
4. System (Fan and Glass Cylinder):
o The fan, located at the bottom of the glass cylinder, produces airflow that levitates
the ball. The Arduino controls the fan's speed by varying the voltage, ensuring
that the ball hovers at a desired position.
o The glass cylinder serves as the confined space where the ball levitates, ensuring
airflow is directed upward.

Working Principle

The system works as follows:

1. The ultrasonic sensors detect the ball's height and send position data to the Arduino.
2. The Arduino calculates the error between the desired position and the actual position of
the ball.
3. Using a PID control algorithm, the system adjusts the fan's speed to correct the ball's
position:
o Proportional (P): Corrects the position based on the immediate error.
o Integral (I): Eliminates cumulative errors over time.
o Derivative (D): Dampens oscillations by predicting the error trend.
4. The fan's speed increases or decreases to balance the ball's position at the target height.

The setup demonstrates the effectiveness of a PID controller in real-time control applications,
ensuring stability and precision while compensating for environmental interferences and
hardware limitations.
The Arduino UNO serves as the system's controller, reading
data from two ultrasonic sensors that measure the ball's
position in real time. Three potentiometers are used to
manually adjust the PID control parameters: Proportional (P),
Integral (I), and Derivative (D). An NPN transistor regulates
the speed of a DC fan using a PWM signal from the Arduino,
providing airflow to levitate the ball. A diode protects the
circuit from voltage spikes, while a 0.1µF capacitor stabilizes
the power supply. A push button is included for control, and
an LED with a 470Ω resistor indicates system status.

The system works by using sensor feedback to calculate


position error, which is processed by the Arduino using PID
logic. The fan speed is adjusted based on the PID output,
maintaining the ball at the desired height. The potentiometers allow fine-tuning, and the circuit
ensures protection and stability through the diode and capacitor. This design integrates sensors,
actuators, and control logic for a precise and stable PID-controlled ball levitation system.

The circuit connects components to the Arduino UNO to implement a PID-controlled ball
levitation system. Two ultrasonic sensors detect the ball's position, with TRIG and ECHO pins
connected to Digital Pins 9(hand position), 4(ball position) and 10 (hand position), 7(ball
position), respectively, providing real-time feedback. Three potentiometers adjust the PID
parameters (P, I, D), with their wiper pins connected to A0, A1, and A2. A push button on
Digital Pin 5 allows user interaction.

The Arduino outputs a PWM signal from Digital Pin 3 to control fan speed through an NPN
transistor, with a 470Ω resistor at its base. The fan connects to a 24V power supply and GND
through the transistor, while a back diode protects against voltage spikes, and a 0.1µF capacitor
stabilizes the power supply. A status LED on Digital Pin 2 provides visual feedback via a 470Ω
resistor.
PID TUNING USING MATLAB SIMULINK VS SIMULATION OF PHYSICAL
SYSTEM

Obtaining over damped, critically damped, and under damped by varying kp, ki and kd.

Under-damped refers to a system’s response of the system that overshoots its target value before
settling, with oscillations gradually decreasing over time. An underdamped system typically occurs when
the damping ratio (ζ) is less than 1. This results in a response that takes longer to stabilize and may
oscillate several times before reaching the desired setpoint.

Setting the Proportional value kp=2, while ki=4 in Integral and the Derivative kd =1 in our system, it
arrives on the under-damped response (see fig 3.2).

This figure represent the simulation of Physical System


Over-damped Response occurs in systems with high damping, where the system returns to
equilibrium without oscillating, but slowly. This happens when the damping ratio (ζ) is greater
than 1. The system does not oscillate but takes longer to settle compared to a critically damped
system.

In obtaining the over-damped response the Proportional, Integral and Differential, must be set
to
kp=1.2 , ki=0.6∧kd =0.4
.

This figure represent the simulation of Physical


System
Critically damped response occurs when a system returns to steady-state as quickly as possible
without oscillating. This happens when the damping ratio (ζ) is exactly 1. In this case, the
system's response decays exponentially, reaching steady-state in the shortest time without
overshooting.
In order to achieve the over-damped response,

the Proportional, Integral, and Derivative


values need to be set to

kp=3 , ki=0.8∧kd=1.5

This figure represent the simulation of Physical System


2
wn
G(s)=
¿¿

Ts=3.589

4 4 4
Ts= ; Wn= ; Wn= =1. 1145
Wn Ts 3.589

2 2
w n =1.1145 =1 .2421

1.2421
G(s)=
¿¿

1 .2421
G(s)= 2
s +2 .229 s+1 . 2421

You might also like