mvrk33 / AgroBot

5 stars 1 forks source link

Wheel control #3

Open mvrk33 opened 5 months ago

mvrk33 commented 5 months ago
vishaldirectr commented 5 months ago

Study the controlling of wheel

CONSTANT SPEED

Controlling wheels for constant speed requires a closed-loop feedback system that continuously monitors the actual speed and adjusts the motor power to maintain the desired speed.

1. Sensors(encoders) 2. control unit 3. motor driver 4. motor 5. algorithm(PID) \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ **1. Sensors:** Encoder: Mounted on the motor shaft, the encoder measures the rotational speed of the wheel. It can be an optical encoder, magnetic encoder, or hall-effect sensor. Control Unit: **2.Control unit:** Microcontroller: Receives the encoder data and compares it to the desired speed. Based on the difference, the microcontroller calculates the necessary motor power adjustment. Popular choices include Arduino, Raspberry Pi, and PIC microcontrollers. **3. Motor Driver:** H-bridge: Receives the control signal from the microcontroller and drives the motor accordingly. It controls both the direction and the power of the motor. **4. Motor:** DC motor: Converts electrical energy into mechanical energy to rotate the wheel. Different types of DC motors like geared motors, brushed DC motors, and brushless DC motors can be used depending on the required speed, torque, and efficiency. **5. Algorithm:** Proportional-Integral-Derivative (PID) control: This is a common algorithm used for maintaining constant speed. It takes into account the error between the actual and desired speed, the rate of change of the error, and the accumulated error over time to adjust the motor power effectively. ### **WHEEL ENCODER TEST CODE** [New Text Document (2).txt](https://github.com/mvrk33/AgroBot/files/14157515/New.Text.Document.2.txt) ### **PID MATLAB VIDEOS** > [https://www.youtube.com/playlist?list=PLn8PRpmsu08pQBgjxYFXSsODEF3Jqmm-y]((https://www.youtube.com/playlist?list=PLn8PRpmsu08pQBgjxYFXSsODEF3Jqmm-y))
kiranmuppana commented 5 months ago

information on pid controller

PID system refers to a control system that uses a Proportional-Integral-Derivative controller to regulate a process or system. PID controllers are widely used in engineering, automation, and control systems to maintain desired conditions, such as temperature, speed, position, or other variables.

Here's a brief explanation of the three components of a PID controller:

Proportional (P):

The proportional term is responsible for the immediate response to the current error (the difference between the desired and actual values). The larger the error, the larger the proportional term output. This term alone can lead to oscillations around the setpoint. Integral (I):

The integral term considers the accumulation of past errors over time. It helps eliminate any steady-state error that might persist with only the proportional term. The integral term is essential for systems that may have a non-zero offset from the setpoint. Derivative (D):

The derivative term anticipates future trends based on the rate of change of the error. It helps to dampen the response and prevent overshooting or oscillations. The derivative term is particularly useful in situations where rapid changes occur. The combination of these three terms in a PID controller provides a balanced approach to control a system. The overall output of the PID controller is the sum of these three components:

TEST CODE OF PID CONTROLLER WHILE LOAD IS VARYING IT PRODUCES CONSTANT SPEED PROJECT1.txt