0
\$\begingroup\$

I'm sorry, I know there is heaps of information online about tuning PIDs. But I really love EE.SE and was after potentially some more "specific" advice.

I have a super-basic heating control system. Circuit is as shown:

schematic

simulate this circuit – Schematic created using CircuitLab

Really basic as I said. 10k thermistor voltage divider for feedback, from a heating element controlled by a microcontroller through an P-Channel MOSFET. The P-Channel is actually PWM'd, with some low-pass filtering through it, to essentially act as a "power supply". This PWM is my controlled value or "output" from my PID loop, which is determined from error, integral, derivative, etc. Don't worry too much about the circuit, as this is all on PCB and has been verified for the last few weeks. The micro is a standard ARM Cortex-M4 chip running at 180MHz, so I can sample pretty much as fast as I like if need-be (i.e. this isn't some Arduino breadboard project on my desk).

I'm using PID to regulate the temperature. I've managed to get the sweet-spot between maximum rise-time, and minimal overshoot. Only problem now is steady state "minor" oscillations.

enter image description here

As you can see, once it "settles" there is still 1-2 degree of ripple for a good 20 seconds. Initially, I thought this was just a natural part of the system (sampling times, thermal noise, thermodynamics etc.) but the fact that after 20 seconds it smooths out sooo much better makes me think that I can improve the first 10 seconds, too (maybe).

So, I was coming here to seek any advice on this specific PID problem? Even if the advice is "suck it up, 1-2% of error is what you have to deal with".

\$\endgroup\$
3
\$\begingroup\$

I'm fairly certain that you have reached the limits of sampling resolution on your ADC attached to the thermistor: -

enter image description here

I changed the background colour on a sample of your picture to make it easier to view.

Try sampling 4 times faster and averaging to improve resolution by one bit to prove the point. Maybe add a circuit that utilizes more ADC resolution around the thermistor values you require.

\$\endgroup\$
  • \$\begingroup\$ @DSWG - did you resolve this problem? \$\endgroup\$ – Andy aka Jul 31 '18 at 12:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.