LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

PID Toolbox reinitialization/reset issues

I have a scenario where I have a closed control loop using the PID tool box. There are times when I need to idle the control effort and continue on later. The control loop works perfect first shot every time. After I idle and try to run again it goes into a heavy oscillation. I've tried PID reset, using my own delta T to account for down time and even PidDiscard followed by PidCreate to no avail. It seems to me that prior data is stored off in memory but never actually cleared in either call. Any suggestions or ideas? 

0 Kudos
Message 1 of 3
(2,909 Views)

Hi Sneaker,

 

Are you monitoring what your system is doing while you are idling?  I could be wrong, but it sounds like you may have your PID control tuned properly for initial use, but you may not be accounting for changes that have occurred after your idle stage?

 

As far as the prior data, I think it would help to see your code.  Have you actually looked to see what the data looks like before you start the first shot, during idle, and after you try again? 

 

Regards,

 

George B.

Applications Engineer

National Instruments

0 Kudos
Message 2 of 3
(2,865 Views)

I shouldn't need to worry about what happens during idle if I reinitialize with the current values when I run the control loops again. I honestly got to the point where I couldn't figure out how to use NI's implementation to my advantage so I went and wrote my own PID module based on the same algorithm NI used per their documentation. Maybe it was a fundamental misunderstanding of NI documentation on my part or perhaps it's a bug in the PID Toolkit. Not sure. Wouldn't be the first time I've found something buggy. Took me a few hours to get my own PID module working beautifully vs the days lost using the PID Toolkit.

0 Kudos
Message 3 of 3
(2,845 Views)