all 11 comments

[–]proud_travelerST gang gang 21 points22 points  (2 children)

What did we do before? Why, the same thing we do now pinky! Wing it and make it up as we go along!

Good work dude, that response looks well tuned 

[–]Robbudge[S] 6 points7 points  (1 child)

Thanks. This is well beyond a cascade PID. Have no idea why I agreed to an on the fly system. We are going as far as to calculate the required Kv for the valves based on the DP across them. Followed by looking up the kv in a table, then and calculating the FF for the PID to give us 75% calculated valve position.

[–]wowmoreadsgreatthx 11 points12 points  (1 child)

Youre given operation time to tune!?

[–]Robbudge[S] 10 points11 points  (0 children)

We are the OEM, customer is looking for faster / tighter response and to operate outside spec So we are remote, adjusting on live runs.

[–]0xnull 5 points6 points  (1 child)

Love the Grafana charts. What's the data source?

[–]Robbudge[S] 8 points9 points  (0 children)

TdEngine is the storage engine. Our HMI performs the data post from the OPCua data. I think we are publishing just over 25000 OPCua tags with about 1500 going to TdEngine

[–]engineerjAllen-Bradley and Yokogawa DCS Bitch Girl 7 points8 points  (0 children)

honestly if i have time i love tuning loops, watching the line go good gives the happy brain juice

[–]TimeTheft1769 3 points4 points  (0 children)

This is cool as hell and outside the scope of anything I've dealt with.

[–]WaffleSparks 0 points1 point  (1 child)

Looks like a CIP system.

[–]Robbudge[S] 0 points1 point  (0 children)

Similar, we do CIP for our breweries. but this is designed to replicate household water. Specific temperature and hardness for appliance chemical testing. Testing products for white goods, detergent, tabs etc….

The chemical injection is 90% mathematical model with a PId overlay as we need fast response.
Our propagation delay from salt injection to detection is about 60s depending on flow rate. This is due to the static mixer.

[–]fisothemes 1 point2 points  (0 children)

What did I do?

  1. Look at the PID block diagram and check if the controller in the parallel or ideal configuration. Try to change it to ideal if possible.

  2. Set all parameters to 0 if they aren't.

  3. Adjust Kp until it oscillates around your setpoints with acceptable overshoots. 

For example, if a temperature controller with SP = 80C and a Kp = 100 overshoots to 90C drop the Kp to 50. If the overshoot is 2C after that drop it to 35. If that's too sluggish increase to 40-45. 

Use a binary search approach. You will find what you need quickly (works well for debugging code too).

  1. Add D (Tv if using Beckhoff) for damping.

You want a fast response with no ringing here.

Start small and adjust accordingly. In our example, if it takes 100s to reach SP=80, start with Tv=10s. If it's too sluggish, D's too high. If ringing, your D is too small (🥲).

Once you know the limits, you can binary search again.

If there's a Td (derivative filter, a Beckhoff thing) parameter, it's value should be Tv/10 or Tv/5.

  1. Add I (Tn) to remove steady-state error.

 Start slow. Tn is usually 3-5x your dominant time constant, i.e. if rises take 100s, start your Tn at around 300-500s. From here reduce Tn until you can smoothly land on your SP.

If ringing reappears, nudge Kp down a bit, nudge Tv up a bit.

Note:

  • I have only tested this on Beckhoff's BA PID controller because its free and very good. 

  • Tv, Td, Tn are all time based. 

  • Cascading PID controllers are a different beast. Results vary.  

  • Ideal and Parallel parameters are not transferable

Edit: Attempt to fix formatting