Creating new algorithm like PID

  • Thread starter Thread starter Alpharup
  • Start date Start date
  • Tags Tags
    Algorithm Pid
Click For Summary

Discussion Overview

The discussion revolves around the creation of a new control algorithm intended to be more efficient and accurate than the Proportional Integral-Derivative (PID) control theory, particularly for microcontroller applications. Participants explore the prerequisites, mathematical foundations, and challenges associated with developing such an algorithm, as well as the broader context of control theory and its applications.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant expresses a desire to create a new algorithm that surpasses PID in accuracy and efficiency, seeking guidance on prerequisites and learning materials.
  • Several participants suggest that developing a new general-purpose control algorithm may require extensive knowledge and research, potentially comparable to a thesis-level project.
  • Concerns are raised about the feasibility of creating a more efficient algorithm than PID, with some arguing that if it were possible, it would have already been accomplished numerous times.
  • Participants discuss the importance of a strong foundation in Control Theory, Digital Signal Processing (DSP), and programming for microcontrollers as essential for this endeavor.
  • There is a suggestion that a specialized algorithm may be more achievable for specific applications rather than a general-purpose solution.
  • Some participants highlight the challenges of implementing PID controllers, noting that even basic setups can be complex and time-consuming.
  • Discussion includes the notion that not all PID loops are stable and that the integrator can lead to instability, indicating a need for deeper understanding of feedback control and stability criteria.
  • One participant mentions that many control techniques assume systems are linear and time-invariant, which may not apply to all scenarios.
  • Another participant emphasizes the extensive research already conducted in the field, suggesting that the development of new algorithms is a significant challenge.
  • Topics in DSP, such as Shannon's Theorem, are mentioned as relevant areas of study for those interested in control algorithms.

Areas of Agreement / Disagreement

Participants generally express skepticism about the feasibility of creating a new general-purpose control algorithm that is more efficient than PID, suggesting that significant research and expertise are required. There are multiple competing views regarding the potential for specialized algorithms versus general-purpose solutions, and the discussion remains unresolved regarding the practicality of the proposed endeavor.

Contextual Notes

Participants note the importance of understanding various control theories, stability criteria, and the limitations of existing algorithms. There is an acknowledgment of the complexity involved in control systems and the potential pitfalls in developing new algorithms.

Who May Find This Useful

This discussion may be of interest to engineering students, particularly those studying control systems, digital signal processing, and microcontroller programming, as well as professionals exploring advancements in control algorithms.

Alpharup
Messages
226
Reaction score
17
I have come across this Proportional Integral- Derivative( PID) control theory. I feel that it is highly beneficial and accurate. I want to create a new algorithm which is more accurate, faster, efficient than PID. Also it should be easily programmable in microcontroller. So what are the prerequisites/ learning materials for a beginner like me.
Also, I have heard that we have to mathematically prove that a control algorithm converges to a defined value when applied repeatedly. Could you please provide details about the rigorous math needed.
 
Technology news on Phys.org
Sounds like a thesis at least.
 
John Harris said:
Sounds like a thesis at least.
No it is not a thesis but I want to create a more efficient algorithm for microcontroller applications.
 
sharan swarup said:
No it is not a thesis but I want to create a more efficient algorithm for microcontroller applications.
I'm saying to be able to do that, it would be worth a thesis for a masters probably even a doctorates. You're not going to magically create a better way of doing it unless you know a lot of math and understand many proofs, even then I'm sure it would take a whole lot of research.
 
  • Like
Likes   Reactions: Alpharup
sharan swarup said:
I have come across this Proportional Integral- Derivative( PID) control theory. I feel that it is highly beneficial and accurate. I want to create a new algorithm which is more accurate, faster, efficient than PID. Also it should be easily programmable in microcontroller. So what are the prerequisites/ learning materials for a beginner like me.
Also, I have heard that we have to mathematically prove that a control algorithm converges to a defined value when applied repeatedly. Could you please provide details about the rigorous math needed.

sharan swarup said:
No it is not a thesis but I want to create a more efficient algorithm for microcontroller applications.

What is your level of education so far? You will need at least a background in Control Theory, and a strong background in programming microcontrollers of different kinds. A strong background in Digital Signal Processing (DSP) would also be important to have.
 
  • Like
Likes   Reactions: Alpharup
I am doing bachelor's in engineering. What are the topics to be learned in DSP?( I have a little background)
 
Don't you think that if it was achievable for someone at your education level to create a new general purpose control algorithm more efficient than PID that it would have been done a thousand times already?

Why do you need a more efficient control algorithm? If you have a specific application in mind you might be able to create a specialized algorithm that could outperform a basic PID controller for that specific application.
 
  • Like
Likes   Reactions: Alpharup
ulianjay said:
Don't you think that if it was achievable for someone at your education level to create a new general purpose control algorithm more efficient than PID that it would have been done a thousand times already?
Yes, it may take time but will be rewarding. What will be more rewarding if we could control the process efficiently with our own algorithm?

If you have a specific application in mind you might be able to create a specialized algorithm that could outperform a basic PID controller for that specific application.

I want to create a new algorithm which can be used for all applications. If PID control can be proved to converge / be stable, why can't we play with some other function involving error variable and play with it ?

Also what are the conditions which should be proved?
 
sharan swarup said:
I want to create a more efficient algorithm for microcontroller applications.

If by efficient you mean quick, there isn't a more efficient algorithm than PID. If efficiency is measured in terms of more accurately regulating the output, There are many other types of feedback control mechanisms that do that better. However, PID is about the simplest you can get with any decent amount of control (PID for me includes PD and PI). Even though microcontrollers can do many more operations per second than they could 10 years ago, you'll still have to use some simplifying assumptions to make it run in real-time. Thus, you're traveling in the direction of PID.

sharan swarup said:
What will be more rewarding if we could control the process efficiently with our own algorithm?

The only thing more rewarding than writing the algorithm is actually implementing it in a real project. It seems you haven't tried seriously building a controller that even has used PID, because even a simple smooth-running inverted pendulum like the Segway is pretty hard.

sharan swarup said:
I want to create a new algorithm which can be used for all applications

Good luck. There are many control techniques that assume a great many things. For example, not all systems can be said to be LTI (linear time-invariant), which a few techniques assume. Many aren't even linear. There are many control theorists (with PhDs even) that want to come up with that "perfect algorithm", but it's harder than you think.

sharan swarup said:
If PID control can be proved to converge / be stable, why can't we play with some other function involving error variable and play with it ?

All PID loops are NOT stable. In fact, it's very easy for the integrator to cause the system to be unstable. Seems you need to do a bit more reading about feedback control and stability criteria.
 
  • Like
Likes   Reactions: Alpharup and berkeman
  • #10
As a rule of thumb - (Ignoring the correctness aspect (proofs), which is very bad) algorithms account for a large part of the efficiency of code. You can add small tweaks to localize data for example. This may improve efficiency by a few percent. However. The more tweaks you add the more likely you will likely lose correctness, lose control of program state, or just plain crash. But you will very definitely lose code readability.

Based on the way you have asked your questions I would suggest you need way more experience with control theory and software engineering. Not trying to deter you, I am trying to prevent you from wasting your time in an exercise that we can believe will frustrate you. A lot. Today. You need more background. Later, then go for it.!
 
Last edited:
  • Like
Likes   Reactions: Alpharup
  • #11
sharan swarup said:
I want to create a new algorithm which can be used for all applications. If PID control can be proved to converge / be stable, why can't we play with some other function involving error variable and play with it ?
You underestimate the effort that has been put in research.
This has been done. With hundreds, probably thousands of different approaches, with researchers that had years to decades of experience in the field. And the result of all this research is PID (and several other methods).
 
  • Like
Likes   Reactions: Alpharup and timthereaper
  • #12
Even getting a PID controller set up can be very annoying.
An undergrad project I worked on was getting a wind tunnel to work at a constant velocity, we read about PID loops and how to choose the parameters.
Even then we wasted an awful lot of time trying to get a reasonably stable velocity.

Perhaps a good way to start is building a small experiment to become acquainted with the pitfalls of setting up and the disadvantages of a PID loop.
 
  • Like
Likes   Reactions: Alpharup and timthereaper
  • #13
sharan swarup said:
I am doing bachelor's in engineering. What are the topics to be learned in DSP?( I have a little background)
Shannons Theorem.
 
  • Like
Likes   Reactions: Alpharup
  • #14
If you have an interest in PID, then control laws are for you. Aero engineering will have classes in it. Browse a few books on the subject. PID is just the tip of the iceberg. There are multiple input / multiple output systems, nonlinear systems, systems with randomness, classical systems using Laplace transformations, and modern systems using eigenstructures, different types of stability and convergence, -- just to name a few areas of study.
 
  • Like
Likes   Reactions: berkeman and Alpharup

Similar threads

Replies
9
Views
3K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
4K
Replies
29
Views
5K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K