How to Implement PID Control on STM32F4 to Maintain 1500 RPM for an ECU?
Hey guys, working on a project in which I have used STM32F4 to control an old ECU (which intended to be maintained at 1500 RPM) I'm planning to use PID control to maintain the fuel actuator so that it will maintain 1500 RPM, can anyone guide me in this??
@MCU, MPU & Firmware
Solution:Jump to solution
Yes I have, in a few context as well. You are likely controlling your actuator with something like a pwm and you have some sort of sensor telling you how many RPM you are doing maybe some encoder setup. Once you habe those you can implment your PID control loop in your main loop or the thread that's doing this.
9 Replies
this should be fun you basically need to implement a control system with some feedback. In it
Yes, have you done something similar to this??
Solution
Yes I have, in a few context as well. You are likely controlling your actuator with something like a pwm and you have some sort of sensor telling you how many RPM you are doing maybe some encoder setup. Once you habe those you can implment your PID control loop in your main loop or the thread that's doing this.
Do you need more of a hand in this?
@Mr_UJ 🔋 FYI your thread continues here
Thanks
Yes, what i have done till now:
1- interfaced Hall effect RPM sensor to measure rpm.
2- interfaced actuator position potentiometer
I want to know is this approach to use PID to control engine RPM is feasible or any other technique can be more useful in this
The main issue with PID is to tune the gains as the engine model is unknown
If you have the measured_rpm then you can now build out your PID algorithm. Have you implmented that before?
Yes, but only with simulation on Matlab
How the tuning part is done on actual system? that will make system fairly stable in presence of disturbance.
By software, meaning by you
You would just need to implement the PID control loop and run it at an interval that works for you?