Forum

PID_Compact output ...
 
Notifications
Clear all

[Solved] PID_Compact output twitches between 40 and 60 percent as soon as I add derivative

5 Posts
3 Users
0 Reactions
3 Views
(@bram99)
New Member
Joined: 1 year ago
Posts: 0
Topic starter   [#88]

Still on my internship, small pressure rig, my first closed loop, so sorry if this is basic. CPU 1214C, TIA V17, PID_Compact in OB30 at 100 ms, proportional valve on the analog output, 0 to 10 bar transmitter on the analog input.

With gain 1.2 and integral time 4 s the pressure holds at 3.0 bar within about 0.05. My supervisor said add some derivative to make it react faster. Any derivative time at all, even 0.2 s, and the output twitches between roughly 40 and 60 percent and the valve buzzes. The pressure still holds, but the valve won't last like this.

I wound the derivative down to 0.05 s and it still twitches, so then I tried OB30 at 50 ms in case the controller was too slow, which made it worse.

Is it something about the PID equation form? Or should derivative maybe just stay at zero on a loop that already holds to 0.05 bar?


Advertisement

   
Quote
(@marekw)
New Member
Joined: 2 years ago
Posts: 0
 

Trend the PV on its own for a minute at 100 ms, nothing else changing. How much does it move when the process is sitting still? And the transmitter, 4 to 20 or 0 to 10 V, how long is the cable and what runs next to it?



   
ReplyQuote
(@bram99)
New Member
Joined: 1 year ago
Posts: 0
Topic starter  

0 to 10 V, about 4 metres of cable, and its run along the pump cable. The PV trend at rest moves about 0.03 bar up and down every sample. I thought maybe that was normal. Screenshot of the trace attached.

What does PV stand for, process value?



   
ReplyQuote
(@jcasey)
New Member
Joined: 1 year ago
Posts: 0
 

> moves about 0.03 bar up and down every sample

Process value, yes. And that's your twitch. D looks at the rate of change of the PV. 0.03 bar in 100 ms is 0.3 bar per second, which to the D term looks like the pressure running away, every single sample. P and I hardly see 0.03 bar. D multiplies it.

Three things. Filter the PV, the block has an input filter or you put one in front of it. Keep D at zero on pressure and flow, it rarely earns its place there, temperature is where it helps. And most blocks have something that softens D, PID_Compact has a derivative delay coefficient and the Logix one has derivative smoothing, read the block help before you trust me on either. Longer version here: https://plctr.com/implementing-pid-control-in-plc-systems/



   
ReplyQuote
(@bram99)
New Member
Joined: 1 year ago
Posts: 0
Topic starter  

Set the derivative time back to 0 and the twitch stopped at once. Then I moved the transmitter cable away from the pump cable and the PV noise went from 0.03 to about 0.01 bar. Told my supervisor D isn't for pressure and he agreed, he'd had it from a temperature loop on another rig.

So the D term was multiplying the noise sitting on the PV, and the noise was coming off the pump cable. D at zero and the cable moved and it's quiet. I had it backwards in my head, I thought derivative made the loop faster. It reacts to change, and noise is change.

Still not sure what the derivative delay coefficient actually does, I'll go and read the help. Thanks jcasey and marekw.



   
ReplyQuote
Share: