LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID algorithm in the "PID and Fuzzy Logic Toolkit" and "Real Time Module"

Solved!
Go to solution

Dear all,

 

I am recently using LabVIEW 2011 and Real Time Module 2011. My application requires PID control.

 

Now I encounter a problem. From the user manual for "PID and Fuzzy Logic Toolkit",in chapter 2 "PID Algorithm" it indicates noninteractive algorithm (also called the Ideal, Standard or ISA algorithm) be used in all PID VIs in the toolkit.From the sourcecode it seems so. However, in chapter 3 "Using the PID Software" the tables for calculating PID parameters are based on Ziegler-Nichols method, which was developed for interactive algorithm (also called the Series, Classical Real algorithm). If D action was included in the control scheme, the parameters can be different for the two algorithms. In fact Cohen-Coon and Lambda PID tuning rules can be used for the algorithm employed by the toolkit with no conversion.

 

Further, there is a PID function block shipped with Real Time Module, and I am not sure which PID algorithm it is using. May someone help me?

 

Thank you in advance.

 

Su

0 Kudos
Message 1 of 13
(5,387 Views)

Hello, You are 100% correct about the underlying structure of the PID algorithm implemented being important to know, as different tuning methods assume different structures (and your comments about Cohen Coon and Lambda tuning applying to the ideal structure, whereas Z-N tuning applies to another structure are correct). But it is usually easy to convert from one structure to another to give equivalent response. I think some published Z-N tables have the conversion to the ideal form included - so it is important to check what it applies to.\

 

If the information about the PID in RT module isn't given might be easiest to just run a few tests to find out (e.g. set Kp = 0 but with Ti = some non-zero value, have a non-zero error and see if the PID block output changes).

 

Hope this helps,

Consultant Control Engineer
www-isc-ltd.com
0 Kudos
Message 2 of 13
(5,377 Views)

AndyClegg,

 

Thank you for your timely help. But, (maybe I misunderstand your mean), setting Kp = 0 and Ti = non-zero value may only exclude parallel algorithm, still the interactive and noninteractive ones behave the same. Can you please clarify a little further to me?

 

The following pictures are grasped fromhttp://blog.opticontrols.com/archives/124. .

 

Best regards,

 

Su

 

inter.PNGinter.PNGparl.PNG 

0 Kudos
Message 3 of 13
(5,359 Views)

It is rare to see that structure you have labelled the "Interactive Algorithm" used in practice - so normally you are just trying to distinguish between ideal/parallel. Different people/companies use different names for the structures, so I always to use the block diagram or equation to distinguish.

 

Looking at the help on the RT PID block it doesn't say which it is - so somebody from NI who can see more detail has to really reply - though the block icon seems to imply that it is parallel. In fact there are a number of nice looking useful features on that block that really need a bit more explanation about what they do - for example the beta term - before somebody can deploy them confident in how the block will work.

 

What I suggest below will show if it is parallel or not. The difference between the other two is clearly only important if you are using derivative. It would be usual for it to be the one called "Interactive" but if you do need to distinguish by testing then you could either:

1. Do a frequency response test on block - and look at bode plot and compare that to bode plot of each of the equations in Laplace form.

2. Look at output from block on a sample by sample basis - and compare that to sample by sample output from ecah of the equations but put into discrete time form.

 

I too am now curious to know this, hopefully one of NI control people will be able to give a definitive answer.

 

Consultant Control Engineer
www-isc-ltd.com
Message 4 of 13
(5,355 Views)
Solution
Accepted by topic author coalflame

In the "PID and Fuzzy Logic Toolkit" we use the academic structure to implement all algorithms. The tuning techniques that we show on the manual express the original work and we try to keep the same as you would look at the literature. However, internally in our implementation of autotuning we convert to the structure used by our algorithms to keep compatibility with our own implementation.

 

If you use an external source, you can use the PID Structure Conversion.vi to change to academic, parallel or series parameters into the one used by our algorithm.

 

The PID shipped with the real time module is a 'copy' of our algorithm and they have the same parameters and behavior. The only advantage to use this Function Block is that you have access to the parameters through variables.

 

Hopefully this helps...

Barp - Control, Simulation, RTT and HIL - National Instruments
Message 5 of 13
(5,349 Views)

Barp - thanks for confirmation of that.

 

Just to clarify the terms used for each structure:

  • what I call the "Ideal" (and is shown above labelled as "Non-interactive"), NI refer to as the "Academic" structure. I do find this naming a bit strange, as this is certainly the one which is more widespread in applied control - as it is simpler to tune by manual tweaking. And when I got taught about PID it was the parallel form. Oh well.
  • what I and NI call "Series", is shown above labelled as "Interactive"
  • we all call the parallel one, "Parallel"

 

If you work with industrial controllers, using their pre-built PID blocks, you will find different manufacturers call their PID structures different names, so I always check the equations or block diagrams to distinguish.

Consultant Control Engineer
www-isc-ltd.com
0 Kudos
Message 6 of 13
(5,343 Views)

AndyClegg,

 

Thank you for very detail clarification. Most features of the function block as described are identical to that of the PID Advanced VI. In the manual, the block seems to be highlighted with "for...high speed control applications that require an efficient algorithm". Maybe the only issue is the algorithm used. It should be among the most frequently used ones, otherwise, the user cannot know how to make conversion on the parameters table.

 

Best wishes,

 

Su

 

 

0 Kudos
Message 7 of 13
(5,341 Views)

Barp,

 

I didn't notice your post. Thank you so much for clarification. So, if we use PID VI. or PID Advanced VI. with Ziegler-Nichols' rules we should also use PID Structure Conversion.VI., and if we use Cohen-Coon method we can directly use the VIs, right?

 

Best wishes,

 

Su

0 Kudos
Message 8 of 13
(5,323 Views)

AndyCleg,

 

Maybe the term "interactive" and "noninteractive" come from the coupling between the I and D action?

 

You are quite right to check the equations or block diagrams in order to distinguish:)

 

Best wishes,

 

Su

0 Kudos
Message 9 of 13
(5,322 Views)

Su,

 

If you use the PID Autotuning.vi (or any other 'autotuning' vi that comes with the toolkit in LabVIEW 2011), then we internally convert the coefficients for you. If you try to develop your table yourself, then you need to use the PID Structure Conversion.vi.

 

Also, notice that the time parameters of the PID coeffcients are in Minutes and not Seconds. The PID Structure Conversion has a parameters to define what kind of time units was used.

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 10 of 13
(5,304 Views)