(defn pid-transducer [set-point k-p k-i k-d] (fn [xf] (let [pid (volatile! (make-pid set-point k-d k-i k-d))] (fn ([] (xf)) ([result] (xf result)) ([result input] (vswap! pid (fn [p] (calculate-pid p input))) (xf result (:output @pid))))))) If guessing that the first 'k-d' on the third line should be a 'k-p'. I'm glad this bug didn't mess up your eggs!
Boiling Sous-Vide Eggs Using Clojure's Transducers
11–20 of 28 posts
Re: Boiling Sous-Vide Eggs Using Clojure's Transducers
#12 (def pid-output (chan (pid-transducer 65 0.1 0.02 0.01)))
Unless something has changed with core async I believe you need to provide a buffer if you are going to use a transducer.From the current doc: "If a transducer is supplied a buffer must be specified."
Re: Boiling Sous-Vide Eggs Using Clojure's Transducers
#13wrt (def pid-output (chan (pid-transducer 65 0.1 0.02 0.01))) Unless something has changed with core async I believe you need to provide a buffer if you are going to use a transducer. From the current doc: "If a transducer is supplied a buffer must be specified."
Re: Boiling Sous-Vide Eggs Using Clojure's Transducers
#14This is a really cool toy example of one of my favorite algorithms. For an algorithm that predates the transistor, I'm constantly blown away at its modern use cases. For example, dynamic pricing, used everywhere from airline tickets to parking meters, is nothing more than a variant of the pid algorithm. It is also used quite a bit in capacity allocation in a wide variety of industries. Instead of using NP Complete sc…
I was surprised to learn that it only dates back to the 1890's (according to Wikipedia). Seems to me like the Greeks or Romans would have figured it out already.
Re: Boiling Sous-Vide Eggs Using Clojure's Transducers
#15This is a really cool toy example of one of my favorite algorithms. For an algorithm that predates the transistor, I'm constantly blown away at its modern use cases. For example, dynamic pricing, used everywhere from airline tickets to parking meters, is nothing more than a variant of the pid algorithm. It is also used quite a bit in capacity allocation in a wide variety of industries. Instead of using NP Complete sc…
PID is everywhere although for many real control systems the implementation isn't very sophisticated. I was surprised to learn that it only dates back to the 1890's (according to Wikipedia). Seems to me like the Greeks or Romans would have figured it out already.
Re: Boiling Sous-Vide Eggs Using Clojure's Transducers
#16This is a really cool toy example of one of my favorite algorithms. For an algorithm that predates the transistor, I'm constantly blown away at its modern use cases. For example, dynamic pricing, used everywhere from airline tickets to parking meters, is nothing more than a variant of the pid algorithm. It is also used quite a bit in capacity allocation in a wide variety of industries. Instead of using NP Complete sc…
PID is everywhere although for many real control systems the implementation isn't very sophisticated. I was surprised to learn that it only dates back to the 1890's (according to Wikipedia). Seems to me like the Greeks or Romans would have figured it out already.
One of the beauties of the algorithm is how well it scales to complexity. It can be implemented in something as simple as a mechanical or hydrolic controller or DSP, but can also be used in heavily modified forms that take advantage of advances in Machine Learning, OR/Optimization, etc.
Re: Boiling Sous-Vide Eggs Using Clojure's Transducers
#17From the picture it looks to me like egg is undercooked i.e. the white is still runny and kind of mucousy, ideally you want a solid tender white and a totally separate uncooked yolk. A slightly higher temperature (67 deg C) would ensure the white properly solidifies whilst still being cool enough to avoid cooking the yolk. 45 minutes is unnecessarily long a long as he egg remains under 70 degrees not much will be hap…
According to Dave Arnold and his chart 62 will be the perfect temperature for set white and runny yolk (he has a nice chart) http://www.splendidtable.org/story/theres-more-than-one-way-... he has a video demonstrating temperatures https://www.youtube.com/watch?v=GpvbNG1Dzhk Guess it boiles down to personal preference
Re: Boiling Sous-Vide Eggs Using Clojure's Transducers
#18[1] https://learn.adafruit.com/sous-vide-powered-by-arduino-the-... [2] http://seattlefoodgeek.com/2010/09/deep-fried-sous-vide-egg-...
Re: Boiling Sous-Vide Eggs Using Clojure's Transducers
#19Re: Boiling Sous-Vide Eggs Using Clojure's Transducers
#20(defn pid-transducer [set-point k-p k-i k-d] (fn [xf] (let [pid (volatile! (make-pid set-point k-d k-i k-d))] (fn ([] (xf)) ([result] (xf result)) ([result input] (vswap! pid (fn [p] (calculate-pid p input))) (xf result (:output @pid))))))) If guessing that the first 'k-d' on the third line should be a 'k-p'. I'm glad this bug didn't mess up your eggs!