LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RT PID toolkit does not match standard PID toolkit for arrays

Why is the PID toolkit from the RT installer different than the standard PID toolkit?  Attached is a VI that demonstrates that the RT PID toolkit acts differently for array inputs than scalar inputs.  You must have the RT PID toolkit installed; the PID toolkit from the "Toolkit Software" disk doesn't have this issue.  Run this VI, then click the "Auto" button.  Note that the single output response is correct, but the array output response gets "stuck" on the lower bound of the output.  Try multiplying the P tuning parameter by 10 (change it to -0.04) and note that now both PID loops respond - but they start at different initial values!  Now, add an element to the boolean shift register, and wire the "Auto" input of the PID VIs to the new second element - both PID loops now respond identically.  Install the PID toolkit from the "Toolkit Software" CD and these issues vanish.  What's going on here?  Which version of the PID toolkit should I use in my RT applications?  This is all LV 8.2 from the November 2006 Developer Suite CDs.
0 Kudos
Message 1 of 12
(5,010 Views)
Hello nathand,

I've taken a look at your code on two separate computers (one w/RT and one w/Toolkit CD) and I see the behavior you are seeing here on my end.  I don't know the cause of it yet, but I'm looking into it and will post back as soon as I know more.

Regards,
Luke H
0 Kudos
Message 2 of 12
(4,978 Views)

Hello nathand,

The issue has to do with the way the auto? (T) control is wired to the inputs of the PID Advanced vi’s.  By going through the shift register, the vi causes erratic behavior.  This is because there is already a shift register inside the PID Advanced vi that keeps track of the previous iteration.  I took out the shift register and the single value and the array PID vi’s behave the same.

For the difference between the RT and the Toolkit Software, I would recommend using the one that is working.  The vi’s are exactly the same underneath.  To ensure this, I actually changed the filenames of the vi’s from the RT installation computer and copied them over to the Toolkit CD computer.  I used Tools » Compare » Compare VIs, and the vi’s were exactly the same.  The clipping to one end of the range seems to be cause by only very small gains with a setpoint close to the process variable.

How does this issue affect your application?  Are you maintaining an existing application or developing a new one?

Regards,
Luke H

0 Kudos
Message 3 of 12
(4,958 Views)
Hi Luke, and thanks for your help.  I'm doubtful that the two versions are identical, even without the aid of "Compare VIs" - I've attached screenshots of the upper left corners of the two versions.  However I might be missing something buried in the deeper levels.



This affects my application in that I have a system that can run in several modes; in some of them the controller is turned on, in others it is turned off.  When I switch to a mode in which the controller is turned on, I want to initialize the output to a specific value that corresponds to that mode, and let the controller adjust from there.  This is why I'm using the shift register: to turn on the controller one loop cycle after setting the manual output value.  I'm open to other suggestions but this has worked fine for me for years with previous PID toolkit versions.  Similarly I've never had problems before with clipping at one end of the range, and I don't think it's caused by the difference in value between the setpoint and process variable, since it's affected by the lower bound of the output.

The Readme for the LabVIEW PID Toolkit 8.2 suggests that many changes were made in the 8.2 PID toolkit, including calling a compiled C library for the array version, although I haven't seen anything that suggests this is the case in either version of the PID toolkit from the 8.2 CDs.

Message Edited by nathand on 04-05-2007 08:43 AM

Download All
0 Kudos
Message 4 of 12
(4,942 Views)
nathand,

Wow, the vi on the left looks completely different than either one I have installed.  I have the PID toolkit installed on one machine already that was from the Toolkit CD, and then I had a fresh PC that I use for testing which I used to install the Real-Time Module with PID Toolkit on.  Both of these machines installed the vi on the right side of your screenshot.

Can we double check each other and verify that we have the Real-Time 8.2 Module installed and the PID Tookit 8.2 installed? You can check this by looking in MAX under the following tree structure My System » Software » LabVIEW 8.2 » PID Control Toolset or Real-Time.

Could you please post back and attach those actual vi's that you have screenshots of?  You will need to go to VI Properties » Execution and make the vi's non-reentrant in order to save another copy of them.  (Otherwise, they will just show up as clones)

Regards,
Luke H

0 Kudos
Message 5 of 12
(4,920 Views)
The VI on the left is from my November 2006 Developer Suite Toolkit CD, but when I install it says it's the LabVIEW PID Toolkit 6.0 (and MAX reports the version as 6.0).  The CD is labeled 501400D-06.  I'm hesitant to attach copies of the PID VIs since they are in a toolkit not available to all LabVIEW users, but I'll do so if you can assure me that NI will allow it.  I've attached a screenshot of my installed software according to MAX.



One additional note about the "clipping" behavior: run the VI (your modified version is fine).  Note that the output gets "stuck" at 1.  Change the minimum output to 0.  The PID output responds correctly - by increasing to its maximum value.  The older (toolkit) version does not have this issue - it works correctly regardless of the minimum output.  Is there some reason for this behavior, or is this a bug in the newer PID implementation?

Nathan

Message Edited by nathand on 04-05-2007 04:46 PM

0 Kudos
Message 6 of 12
(4,917 Views)
One more note, to answer your question about whether this is a new or existing application: it's an existing application that had been running fine on Windows.  I'm moving to an RT system and when I installed the RT toolkit, the RT PID toolkit installed as well, and then suddenly my PID loops no longer worked properly.
0 Kudos
Message 7 of 12
(4,811 Views)

Hello,

I have been doing some research into your questions posted here and will try to clear up some of the confusion.

First, the LabVIEW Real-Time installer includes the current version of the PID Toolkit which is 8.2 while the 2006 Toolkits CD you have still includes an older version of the PID Toolkit which is 6.0.  There were several updates to the toolkit itself to accommodate an improvement of 10x speed on the Advanced Control PID VI.  You can now achieve much higher loop rates than previously.  Unfortunately, since the algorithm was completley rewritten there were some issues that occurred.

The behavior you have seen is not intended.  I have filed a Corrective Action Request to update the VIs so that we can adjust the behavior.  With some modification we have been able to reconcile the differences between the single and array versions of the VI, but there are still a few things to check.  We hope to find a resolution soon so that we can resolve this for you.

Thank you for bringing this to our attention.  If there is anything else you have noticed, please post back so that we can investigate further.

Best Regards,
Angela

0 Kudos
Message 8 of 12
(4,753 Views)
Angela - thanks for your response.  Would you mind posting the CAR# here?  Also, is the recommended solution that I use the older version of the toolkit for now, or that I split the control into several instances of the non-array PID?  My loop runs at about 50hz.  I think I've described all the issues I found; if you have an improved version that you can send me I'll test it in my application.
0 Kudos
Message 9 of 12
(4,743 Views)

Hello,

The CAR ID is 489A4DI8.  We generally do not post toolkit VIs, but I do have a modified version of the VI.  Without the rest of the toolkit this VI is not much use, so I will post it here.  This should help you out, but definitely stay posted for an official update.  You can replace \...\LabVIEW 8.2\vi.lib\addons\control\pid\pid.llb\PID Advanced (DBL Array).vi with the attached VI.  Depending on the functionality you need (as I mentioned previously the new version of the Array PID has the capability of executing more quickly than in previous versions) I would continue to use the newer version of the toolkit if this updated VI works for you.  If not, you could continue to use the older toolkit.

I hope this helps, please post back if you have any other questions.

Regards,
Angela

0 Kudos
Message 10 of 12
(4,696 Views)