Implementing digital PID control

In summary, the desired rpm is 3000 higher than the measured rpm, so the controller needs to increase the voltage by 3000 to reach the desired 5000 rpm.
  • #1
beserk
13
0
I want to control the rpm of a brushless motor with ESC(Electronic speed controller) using PID control.
Suppose my motor is rotating at 2000 rpm detecting using hall sensor setup.Now I want it to run at 5000 rpm.The speed will be controlled by PWM signals generated by PWM module( 16-bit i.e. 65536 divisions in 0%-100% duty cycle, which we specify) in hardware which is fed to ESC.
How am I going use the PID parameters Kp, Ki and Kd to drive the motor to desired rpm?
desired rpm = 5000
measured rpm = 2000
error = desired - measured = + 3000
C(t) = Kp*e + Ki*∫e.dt + Kd*de/dt in digital form

Suppose somehow I find out PID constants, then how do I modify new PWM based on C(t) and error signal ?

Is New PWM = Old PWM*C(t)*error or New PWM = Old PWM+C(t)*error ?
 
Engineering news on Phys.org
  • #2
A decent review of control is Reviews of Modern Physics vol 77, p783.
 
  • #3
Thanks for replying. i have a simpler query now : Suppose I use a proportional control to drive a motor. Measured rpm = 2000, Required rpm = 5000, Error = +3000. Control signal = K * Error. Now how should I apply this control signal to increase in voltage so as to attain the required rpm ?
 
  • #4
For a motor I think PID is little over kill. A giving input should correspond to a giving rpm for the motor. Look up the value of the input that corresponds to the output that you want. That will give you a rough agreement. You might need some type of PID for ultra fine control or if the load isn't constant.
 
  • #5
http://www.engin.umich.edu/group/ctm/PID/PID.html#characteristics
 
  • #6
For a motor I think PID is little over kill. A giving input should correspond to a giving rpm for the motor. Look up the value of the input that corresponds to the output that you want. That will give you a rough agreement. You might need some type of PID for ultra fine control or if the load isn't constant.
Actually, it really depends on the situation which he unfortunately did not tell us what he is doing. In robotics PID loops generally are not overkill or at least a partial PID loop is because the load is always changing.
 
  • #7
Ivan Seeking said:
http://www.engin.umich.edu/group/ctm/PID/PID.html#characteristics
Great find Ivan! A fitting tutorial on PID control of a mechanical system..
 

Related to Implementing digital PID control

1. What is digital PID control?

Digital PID (Proportional-Integral-Derivative) control is a type of feedback control system that utilizes a digital computer to calculate and adjust the control signal based on the error between the desired setpoint and the actual output of a system. It is commonly used in industrial and automation applications to regulate parameters such as temperature, pressure, velocity, and position.

2. How does digital PID control work?

Digital PID control works by continuously measuring the difference between the desired setpoint and the actual output of a system, also known as the error. The controller then calculates a control signal using three components: proportional, integral, and derivative, which are determined by tuning the controller. The control signal is then sent to the actuator, which adjusts the system to reduce the error. This process is repeated continuously, allowing the controller to maintain the system at the desired setpoint.

3. What are the advantages of using digital PID control?

Some advantages of digital PID control include its ability to quickly respond to changes in the system, its adaptability to various types of systems, and its ease of implementation thanks to the availability of digital computers and microcontrollers. Additionally, digital PID control can provide more accurate and precise control compared to analog control and can be easily modified and adjusted for different applications.

4. What are the key components of a digital PID control system?

The three main components of a digital PID control system are the controller, the actuator, and the sensor. The controller is responsible for calculating the control signal based on the error, while the actuator is responsible for adjusting the system to reduce the error. The sensor measures the output of the system and sends it back to the controller for comparison with the desired setpoint. Additional components such as filters and tuning parameters may also be included to improve the performance of the system.

5. How can I tune a digital PID control system?

Tuning a digital PID control system involves adjusting the controller's three components (proportional, integral, and derivative) to achieve the desired response from the system. This can be done manually by trial and error or by using various tuning methods such as the Ziegler-Nichols method or the Cohen-Coon method. Additionally, there are software tools available that can help with tuning a digital PID control system. The tuning process may need to be repeated multiple times to achieve the desired performance.

Similar threads

Replies
9
Views
2K
  • Electrical Engineering
Replies
3
Views
830
Replies
13
Views
5K
  • General Engineering
Replies
5
Views
2K
  • General Engineering
Replies
2
Views
5K
  • Electrical Engineering
Replies
2
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
3K
  • Advanced Physics Homework Help
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • Mechanical Engineering
Replies
4
Views
14K
Back
Top