We're Control Freaks

Let’s talk algorithms. Yep, this is going to be a bit long and compilated.

The FLORATek system uses a closed-loop proportional smart control algorithm to keep your water treated. If you can figure out exactly what that means just by the name, good work! If not, that’s what we’ll discuss in today’s post.

An algorithm is a process that takes input variables, crunches numbers, and determines an output. It’s easy to figure out the input and output part because they are plainly visible- the input variables are the pH and EC that are displayed on the screen, and the output is the pump moving nutrients and pH solution into your reservoir. The complicated number-crunching part that goes on in between inputs and outputs is invisible, instantaneous, and vitally important.

As an example, let’s discuss how the FLORATek calculates a single pH correction dose.

The foundation of any good control system is having accurate and reliable monitoring of the variables you want to change (engineers call this “garbage in=garbage out). There’s loads of budget-friendly pH probes and monitors on the market, but any experienced grower knows that you get what you pay for with these. A good pH probe (like the one included with the FLORATek) is not only accurate, but also can provide reliable readings over an extended period of time. All pH probes drift to some degree because they contain a liquid reference solution inside of them. As the chemistry of this reference solution changes, the reading changes. That’s why it’s important to recalibrate your probes regularly (most people find that monthly recalibrations work well). pH readings also have to be temperature compensated, as the pH probe will measure pH differently depending on temperature.

Once you’re able to measure pH accurately, your control still needs more information before it is able to determine an output. On the FLORATek this information is provided partially through the setup menus, particularly the system capacity and your desired pH setpoint. But here’s where the FLORATek sets itself apart: it also factors in previous pH doses added, your current EC base, as well as the logarithmic pH scale.

Let’s use an example to make it easier to illustrate these 3 concepts. For each, we’ll assume your setpoint is 6.0, current pH is 7.0, and you are using pH down.

  1. Your FLORATek looks at data collected during previous doses when determining how to calculate future doses. Lets say your control tried to move your pH from 7.0 to 6.2, but the pH only moved to 6.5. The FLORATek notes this discrepancy and knows to be slightly more aggressive in its calculation next time. The inverse is also true- if the controller changes the pH more than expected with a dose, it knows to be more conservative with the next dose.

  2. Your FLORATek considers your EC base when calculating doses. When you input an EC base to essentially “zero out” your EC reading, your EC base can provide some hints as to how alkaline your water is. In our testing, we discovered that there is a loose relationship between measured alkalinity and your EC base. This is due to the chemical makeup of tap water contributing to higher alkalinity, compared the low EC base we’d see with RO water or distilled water. Because alkalinity is a measure of how your water will resist pH changes, higher EC bases (which suggest higher alkalinity) suggest that the control will need to be more aggressive in pH dose calculations.

  3. The FLORATek control considers the logarithmic nature of pH. Simply put, water that has a pH of 5.0 is 10 times more acidic than water with a pH of 6.0, which is 10 times more acidic than water with a pH of 7.0. In practical terms, the amount of pH down needed to move from a pH of 6.5 to 5.5 is much larger than moving from 7.5 to 6.5, even though in both cases the pH changed by 1.0.

So what is a proportional control algorithm? Well, in order to prevent overshoots, the FLORATek control intentionally does not try to reach the setpoint in a single dose. Even with good probes and data, there are still unknown variables that can affect how the water reacts when pH solution is added. Therefore, we only try to dose to complete 70-90% of the desired change with every dose cycle. This ensures that the setpoint is reached efficiently while also lowering the chances of an overshoot as much as possible.

The final important distinction that sets the FLORATek apart is a setting we call “Blend Time”. Any time you add something to a body of water, whatever it is you add does NOT instantly and evenly disperse to the entire volume of water. The two main variables that affect this are your system capacity and the rate with which your water is circulating throughout your system. These two variables combine to give us your systems turnover rate. Turnover rate is the amount of time it takes to circulate your entire volume of water once. For example, a 100-gallon system circulating at 100GPH and a 10-gallon system circulating at 10GPH have the exact same turnover rate, and therefore with have similar blend times. Because nutrients and pH solutions do not fully disperse within a single turnover, we recommend our users multiply their turnover rate by 3 to get a good starting blend time. Setting a good blend time, combined with the proportional nature of the algorithm, further lowers the chances of an overshoot.

So why do we do all of this? Why is preventing overshoots such a big deal?

The nature of most hydroponics controls means that your water’s pH and EC can only be moved in a single direction. With pH, most users use pH down solution with their FLORATek. If the algorithm messes up a dose and exceeds the setpoint, the user must intervene to add pH up solution. Similarly, EC is raised by adding nutrients. If we overshoot the EC setpoint, the user must intervene by diluting the water. Our customers are spending a good chunk of money specifically so that they DON’T have to manually intervene. (And yes, we’re currently designing a product with bidirectional pH control).

In the end, when you choose to buy a FLORATek, you’re not only getting top-of-the-line hardware. You’re also getting one of the most advanced dosing algorithms on the planet.

Back to blog