- Posts: 959
- Thank you received: 0
New generic PID component
7 years 4 weeks ago #146908
by scotta
New generic PID component was created by scotta
As part of the development of my 3D printing setup I have ported the very popular Arduino PID v1.2.1, by Bret Beauregard, controller code into a HAL component.
Why? It is a simple controller with one feature that it very useful for integrating processes, like 3D printer extruders. Proportional on Measurement. This allows for Zero overshoot to be achieved.
The component is available on my GitHub page at PIDcontroller.c
I hope others find this useful as well.
Why? It is a simple controller with one feature that it very useful for integrating processes, like 3D printer extruders. Proportional on Measurement. This allows for Zero overshoot to be achieved.
The component is available on my GitHub page at PIDcontroller.c
I hope others find this useful as well.
Please Log in to join the conversation.
7 years 4 weeks ago #146958
by pl7i92
Replied by pl7i92 on topic New generic PID component
thank you
can you give a quick workaround how to impplement and get it to work on stepper output
mabe a pinout discription
can you give a quick workaround how to impplement and get it to work on stepper output
mabe a pinout discription
Please Log in to join the conversation.
7 years 3 weeks ago #147082
by scotta
Replied by scotta on topic New generic PID component
I'll put together some documentation when I have a chance. Below is an example of using Proportion on Measurement in the loop. 100% controller output giving max heating rate then with a nice glide into the set point with no overshoot needed to cancel out the integral term.
Scott
Attachment not found
Scott
Please Log in to join the conversation.
7 years 3 weeks ago #147108
by pl7i92
Replied by pl7i92 on topic New generic PID component
so it is used for a 3D printing mashine in your case
Please Log in to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
Less
More
- Posts: 4739
- Thank you received: 2
7 years 3 weeks ago #147114
by Todd Zuercher
Replied by Todd Zuercher on topic New generic PID component
Just curious why this was needed? Why couldn't the regular PID component that comes with Linuxcnc be used? In other words what does your new PID do that the old one can't, or why is it better for your situation?
Please Log in to join the conversation.
7 years 3 weeks ago #147140
by scotta
Replied by scotta on topic New generic PID component
The standard PID component has only the option to use Proportional on Error in the PID calculation. To avoid heating overshoot on a 3D printer extruder, Proportional on Measurement can achieve this.
From brettbeauregard.com/blog/2017/06/introdu...onal-on-measurement/
"There are processes out there that are known as “Integrating Processes.” These are processes for which the output from the pid controls the rate of change of the input. In industry these comprise a small percentage of all processes, but in the hobby world these guys are everywhere: Sous-vide, linear slide, and 3D printer extruder temperature are all examples of this type of process. "
And it works!
Scott
From brettbeauregard.com/blog/2017/06/introdu...onal-on-measurement/
"There are processes out there that are known as “Integrating Processes.” These are processes for which the output from the pid controls the rate of change of the input. In industry these comprise a small percentage of all processes, but in the hobby world these guys are everywhere: Sous-vide, linear slide, and 3D printer extruder temperature are all examples of this type of process. "
And it works!
Scott
Please Log in to join the conversation.
7 years 3 weeks ago #147428
by andypugh
I suspect he has a very narrow view of "industry"
A couple of years ago I had the task of controlling oil pressure using a variable displacement pump where my control input was current to a proportional solenoid valve which fed the same oil into a chamber which varied the stroke of the pump. This was still contollavbe by standard PID, albeit that the P I and D terms were variable factors based on current oil pressure, pump speed and oil temperature.
I am not trying to argue that this approach is valueless, I would have to think about it a lot harder than I feel equipped to do right now. But to imagine that the hobby world is bigger than the industrial world seems naive.
Replied by andypugh on topic New generic PID component
scotta wrote: "There are processes out there that are known as “Integrating Processes.” These are processes for which the output from the pid controls the rate of change of the input. In industry these comprise a small percentage of all processes, but in the hobby world these guys are everywhere:
I suspect he has a very narrow view of "industry"
A couple of years ago I had the task of controlling oil pressure using a variable displacement pump where my control input was current to a proportional solenoid valve which fed the same oil into a chamber which varied the stroke of the pump. This was still contollavbe by standard PID, albeit that the P I and D terms were variable factors based on current oil pressure, pump speed and oil temperature.
I am not trying to argue that this approach is valueless, I would have to think about it a lot harder than I feel equipped to do right now. But to imagine that the hobby world is bigger than the industrial world seems naive.
Please Log in to join the conversation.
Time to create page: 0.134 seconds
