cancel
Showing results for 
Search instead for 
Did you mean: 

Hi, I need to implement a PID controller on my Nucleo board STM32G474RE, is there any developed library for this particular controller or resources available that help me to implement the PID controller?

WKhan.2
Associate II

The following document explains the DSP library for STM32F10x which contains the functions for the PID controller, is it compatible with STM32G474RE? If not, would you please guide me about its implementation on a microcontroller?

https://community.st.com/s/question/0D50X00009XkhcESAR/pid-controller-stm32f10x-dsp-library-um0585

1 ACCEPTED SOLUTION

Accepted Solutions
Nikita91
Lead II

A good introduction with clear and well-commented code:

http://brettbeauregard.com/blog/2011/04/improving-the-beginners-pid-introduction/

It is not always necessary to use float or double. It often happened to me to use integers or "fixed point"

View solution in original post

4 REPLIES 4

The G4 has the same CM4F floating point unit, the CMSIS directories for the DSP code/example should be in CubeG4 repositiory.

Not sure there's PID examples, but it's not exactly rocket science.

I'm not even sure the integer example is particularly helpful.

Arduino has some PID libraries, if you need examples, and perhaps range checking, but I think at this point reading a College Level theory book might be more helpful.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Nikita91
Lead II

A good introduction with clear and well-commented code:

http://brettbeauregard.com/blog/2011/04/improving-the-beginners-pid-introduction/

It is not always necessary to use float or double. It often happened to me to use integers or "fixed point"

Thank you for your response. If you don't mind me asking where can I find CubeG4 repository or CMSIS directories with DSP code?

I searched within my project's folder structure and within that, I could not find it.

0693W00000QNgzzQAD.png

Thanks for sharing the link, the code is well-documented and explains each step. I appreciate it.