New generic PID component
02 Oct 2019 22:35 #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.
The following user(s) said Thank You: tommylight, pl7i92
Please Log in or Create an account to join the conversation.
03 Oct 2019 08:14 #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 or Create an account to join the conversation.
04 Oct 2019 02:42 - 04 Oct 2019 02:47 #147082
by scotta
Replied by scotta on topic New generic PID component
Attachments:
Last edit: 04 Oct 2019 02:47 by scotta.
Please Log in or Create an account to join the conversation.
04 Oct 2019 10:41 #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 or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
04 Oct 2019 13:47 #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 or Create an account to join the conversation.
04 Oct 2019 21:22 #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 or Create an account to join the conversation.
08 Oct 2019 05:54 #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
"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.
The following user(s) said Thank You: Mike_Eitel
Please Log in or Create an account to join the conversation.
Time to create page: 0.110 seconds