Is the sample solution just hardcoded or is there some maths behind it to make it work from any location/initial speed?
PID Control Challenges
11–20 of 123 posts
Re: PID Control Challenges
#12Re: PID Control Challenges
#13Re: PID Control Challenges
#14Possibly useful: A header-only proportional-integral-derivative (PID) controller. https://github.com/RhysU/helm
It's a nice theoretical implementation but few practical examples would be found using floating-point math, running as they are on systems that don't support it.
Re: PID Control Challenges
#15Earlier quoted context omitted.
It's a nice theoretical implementation but few practical examples would be found using floating-point math, running as they are on systems that don't support it.
Is this still true? It seems like most IoT stuff has chips that easily eclipse the capabilities of my Amiga1000 and are 32bitbwith hardware floats. Looking around, I'm having trouble finding something that isn't a 32bitHF in my house. Possibly my Keurig machine? Even using digital instead of an RLC implementation in a coffee machine seems like a waste, but I'm old.
Re: PID Control Challenges
#16Earlier quoted context omitted.
Is this still true? It seems like most IoT stuff has chips that easily eclipse the capabilities of my Amiga1000 and are 32bitbwith hardware floats. Looking around, I'm having trouble finding something that isn't a 32bitHF in my house. Possibly my Keurig machine? Even using digital instead of an RLC implementation in a coffee machine seems like a waste, but I'm old.
Most PID applications are not IoT. Many use a cortex M0 which doesn't have hardware float support, or non Arm, even 8bit. When you are selling millions it pays to use the cheapest part you can get away with.
Re: PID Control Challenges
#17Earlier quoted context omitted.
It's a nice theoretical implementation but few practical examples would be found using floating-point math, running as they are on systems that don't support it.
Is this still true? It seems like most IoT stuff has chips that easily eclipse the capabilities of my Amiga1000 and are 32bitbwith hardware floats. Looking around, I'm having trouble finding something that isn't a 32bitHF in my house. Possibly my Keurig machine? Even using digital instead of an RLC implementation in a coffee machine seems like a waste, but I'm old.
There's still a few reasons not to use it, though. Saving and restoring the float registers adds interrupt handling overhead. If you can fit into 16 bit integers, you can also use the 2 way SIMD instructions and get at least double the throughput.
Finally, floats themselves have a lot of footguns. You have to be very careful about propagating NaNs etc into control loops. It's also really easy (in C) to accidentally promote to double.
Re: PID Control Challenges
#18Possibly useful: A header-only proportional-integral-derivative (PID) controller. https://github.com/RhysU/helm
It's a nice theoretical implementation but few practical examples would be found using floating-point math, running as they are on systems that don't support it.
Re: PID Control Challenges
#19Earlier quoted context omitted.
Is this still true? It seems like most IoT stuff has chips that easily eclipse the capabilities of my Amiga1000 and are 32bitbwith hardware floats. Looking around, I'm having trouble finding something that isn't a 32bitHF in my house. Possibly my Keurig machine? Even using digital instead of an RLC implementation in a coffee machine seems like a waste, but I'm old.
Most PID applications are not IoT. Many use a cortex M0 which doesn't have hardware float support, or non Arm, even 8bit. When you are selling millions it pays to use the cheapest part you can get away with.