# How to design a PID controller for this application?

• NCEE
In summary, the conversation discusses taking over a project that was supposed to be fully documented but the documentation is missing. The project involves using a microcontroller as a PID controller to control speed by subtracting the desired speed from the actual speed. One colleague suggests using PID algorithms to determine the appropriate pulse width modulation factor for controlling the speed.
NCEE
I just took over a project for a person that left the company. The project was supposed to be fully documented, but the documentation seems to have come up missing.
The application involves using a microcontroller as a PID controller.
I will have a desired speed, and the actual speed.
I will get an error signal by subtracting the actual speed from the desired speed.
One of my colleagues says that the PID controller will just integrate, differentiate, and multiply the error signal and I should get what I want.
I want to get a pulse width modulation factor so I will know how long I should run the device to lower my speed until the next sample.

It might be a good idea to read up on PID algorithms. You might just answer your own question.

http://en.wikipedia.org/wiki/PID_controller" should give you about all you need.

Regards

Last edited by a moderator:

## 1. What is a PID controller and how does it work?

A PID (Proportional-Integral-Derivative) controller is a feedback control system that adjusts an output variable based on the difference between a desired setpoint and the actual output. It calculates an error value and uses three different types of control (proportional, integral, and derivative) to correct the error and bring the output closer to the setpoint.

## 2. How do I choose the right values for the PID parameters?

The values for the three PID parameters (Kp, Ki, and Kd) depend on the specific application and system being controlled. Generally, Kp is used to adjust the response time, Ki is used to eliminate steady-state error, and Kd is used to improve stability. These values can be determined through experimentation or by using tuning methods such as Ziegler-Nichols or Cohen-Coon.

## 3. Can I use a single PID controller for multiple inputs or outputs?

Yes, a single PID controller can be used for multiple inputs or outputs as long as they are related and affect each other. However, each input or output may require its own set of PID parameters for optimal control.

## 4. How do I implement a PID controller in my design?

There are various ways to implement a PID controller, depending on the complexity of the system and the available resources. One common method is to use a microcontroller or PLC to run the control algorithm and adjust the output accordingly. Alternatively, some systems may use analog circuitry or discrete components to implement the PID control.

## 5. What are the advantages of using a PID controller?

PID controllers are widely used in industrial and scientific applications due to their simplicity, effectiveness, and versatility. They can handle a wide range of systems and perform well even in the presence of disturbances or changes in the system. PID controllers are also relatively easy to tune and can provide fast and accurate control of the output variable.

• Electrical Engineering
Replies
23
Views
1K
• Electrical Engineering
Replies
12
Views
2K
• Electrical Engineering
Replies
3
Views
886
• Electrical Engineering
Replies
10
Views
3K
• Electrical Engineering
Replies
16
Views
4K
• Electrical Engineering
Replies
17
Views
2K
• MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
788
• Electrical Engineering
Replies
1
Views
1K
• DIY Projects
Replies
5
Views
4K
• Mechanical Engineering
Replies
6
Views
1K