Comments (2)
Thanks for your thoughts on this. It will be a bit before I have a physical representation of the environment, so I'm sure you understand I'm trying to get close enough to use as a starting point right now.
I just identified a need to use two loops for this application, the main control loop (area being controlled), and a loop controlling the max temperature output of the heating system in order to avoid damage. This should be fun!
from quickpid.
I haven't done any testing on a slow acting control system yet, but its good first of all to get the time parameters identified and set correctly. A good thing to estimate firstly is the time constant of your system. Let's say for example that it's 5-minutes (300 seconds). It's suggested elsewhere that the sample time (PID compute period) should be at least 5-10x less than the time constant, so keeping with the example, this could be set to 30 seconds. With sensor readings coming in at 1 reading per 10 seconds, you would get 3 new readings (that are averaged in your circular buffer) for each sample period. I think the sensor rate should be more than 2x the PID compute period so this seems OK.
I took a quick look at the DS18B20 datasheet and it says the resolution can be set to 12-bit, which means you can get about 0.08°F resolution. For 12-bit mode, the max conversion time is 0.75 seconds.
I think using the running average temperature is OK, but you might find better response by using the raw temperature data. I wouldn't set the PID rate so fast that you get less than 2.5 temperature readings per PID compute period. As per the example, you could use 30 seconds: SetSampleTimeUs(30000000)
from quickpid.
Related Issues (20)
- "No Classmember" Error HOT 2
- Negative inputs don't work with QuickPID HOT 3
- outputSum value stuck when using SetTunings HOT 1
- Derivative smoothing HOT 4
- Micros HOT 1
- millis() overflow problem. HOT 2
- Suggestion: custom getClock() function to allow removing reliance on micros() HOT 2
- Ideal and Series mode of pid + Pb HOT 2
- Use of constrain(..., -outMax, outMax) -> shouldn't this be constraint(..., outMin, outMax) ? HOT 1
- Change setpoint? HOT 2
- Add a default constructor HOT 2
- Compute fails for some reason. HOT 2
- Auto tune relay example?
- Why using 0.1sec as the base of the ratio calculation? HOT 2
- Using GetMode is awkward / myPID.setMode(myPID.getMode()) fails
- QuickPID::Initialize() is not public
- Compiler error on ESP32 HOT 1
- timer mode
- Intellisense has issues with class member definitions HOT 2
- Improvement idea: bool WouldCompute()
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quickpid.