LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plant Simulator

In the PID toolset
the example General Auto PID Simulator.vi there is a file called Plant Simulator.vi
I could not get or construct the transfer function of the plant from the data given to this file.
The input Variables to this file as follow:

iteration, Manipulated variable (output, %), Initial PV, dt (s), Process Gain, Process Load, Lag (min), Valve Deadband, Process Deadtime, Controller Noise (%), Measurement Noise (%).

The output Variable is

Process Variable (%).

The File use PID Lead-Lag File to give the output variable.

For example if I want the plant transfer function P(s)= (Kp * e^(t*s)) / (Tp*s)

where Kp is process gain, t deadtime, Tp is the Time constant.

Kp=2 , t= -3, Tp= 10.

what input should I give to Plant Simulator.vi to implement my process?

any help

thanks


Message Edited by mksa on 03-13-2007 12:04 PM

0 Kudos
Message 1 of 9
(6,878 Views)

mksa,

Before you carry on using this VI, I strongly advice you to verify if you have the LabVIEW Simulation Module available in your University or Company. If you have that, you can enter this information directly using more meaningful functions as Integration, Gain and Time Delay.

If you can't really have this Module, you will have to develop your own code for this operation. The Plant Simulation don't have an Integrator and you equation has one. So, you can't use this function to simulate this operation.

If you have the previous version of the PID Control Toolset 8.2, you can use the Advanced Control VIs to simulate the integrator with gain in series with Deadband. If you have version 8.2, this is not present at the pallette, but you can find it in <labview dir>\vi.lib\addons\control\advanced\. However, as you can see in the pictures attached, Simulation Module really help to express you equation instead of Advanced Control VIs.

On a final note, I notice that you called Tp as Time Constant. If that is really the case, you equation should be "P(s)= (Kp * e^(t*s)) / (Tp*s +1)", and, in this case, you COULD simulate with the plant. Let me know if that is the case and I can tell you what parameters to enter.

Barp - Control and Simulation Group - LabVIEW R&D - National Instruments

Barp - Control, Simulation, RTT and HIL - National Instruments
Message 2 of 9
(6,853 Views)

if Tp is note the Time Constant what would it will be called? and I want to simulate the same equation which in this article.

Rongfu Luo, Joe Qin, Dapang Chen. "A New Approach to Closed Loop Autotuning for PID Controllers"; Proceedings of the American Control Conference; Philadelphia, Pennsylvania; June 1998.

which as i post.

0 Kudos
Message 3 of 9
(6,813 Views)
mksa,
 
This article has two equations. The first that has a gain, deadtime and a pure integrator (equation 4) and it is expressed by: Gp(s)=e^-tau.s/Tp.s, and the second, which the paper claims to be an approximation, Gp(s)=Kp*e^tau'.s/(Ts+1).
Now, by definition, Time Constant is the time that a system takes respond to 63.2% of the steady-state value for a stepwise change. In the first equation, the integrator will always accumulate and the system will never get to steady-state, which means that Tp does not define the time constant, but the "speed of integration".I would qualify this more like a gain than a time constant. However, the paper calls that Time Constant, which I think can be confusing...Smiley Sad
On the other hand, if you analyze the second equation (first order plus dead time), the T now is the time constant by definition.
 
Now, if you try to reproduce the paper with the first equation, you can not use the Plant Simulation and you have to use the Simulation Module or the Advanced Control VIs to define your own plant. If you use the second equation, you can implement the following way:
1) convert time constant from seconds to minutes,
2) make process load, valve deadband and measurement noise zero
3) enter Process Deadtime as tau/sampling time (dT). For example, for tau=3 and if you have sampling time 0.5, you can make the "Process Deadtime" 6. Notice that the maximum value allowed for Process Deadtime is 8 (!). For deadtime of 2.75 or 2.95, you have to find a sampling time that permit division to be integer, otherwise you will have problems to simulate.
 
In short, it is going to be very difficult to simulate this plant with "Plant Simulator". Simulation just makes things so much easy... Smiley Happy
Hope this can help!
Barp - Control, Simulation, RTT and HIL - National Instruments
Message 4 of 9
(6,791 Views)
May you give me a copy of your simulation file or the names of the files used in the attached picture.

Thanks.
0 Kudos
Message 5 of 9
(6,737 Views)

The VIs names are:

For Advanced Control VIs (available on the PID Control Toolset version before 8.2): "Integrator.vi" and "transport delay.vi"

For the Simulation Module: Transfer Function and Transport Delay. They are Simulation Nodes.

Hope this help!

Barp - Control, Simulation, RTT and HIL - National Instruments
Message 6 of 9
(6,713 Views)
How to get the the Simulation Module and how to use these files to simulate process with PID controller

0 Kudos
Message 7 of 9
(6,705 Views)

I want to simulate a DC Motor model, so I thought of doing a cascade files Plant Simulator

the transfer function for speed DC Motor is


I thought that it might be possible to implement the equation

K/(Js+b) in Plant Simulator but i don't know how to multiply s by J in Plant Simulator file.

Then multiply the previous result with the result of 1/(Ls+R) Plant Simulator file

then add the previous result to K/K2

Dose any one think this method will work out the DC Motor simulation.


0 Kudos
Message 8 of 9
(6,692 Views)

mksa,

The Simulation Module is an addon module to LabVIEW that allow to do all the operations that you'd like to do. You can easily mix LabVIEW Code with Simulation nodes and create the block diagram necessary for simulation. 

To obtain this Module, there is an additional purchase nessary. If you are an student, there is a very good chance that your university have this module available for your use. If not, the student version of LabVIEW have the Simulation Module available. Try to contact the sales representative from your area to know what the best way to obtain the Module:

http://sine.ni.com/apps/utf8/nicc.call_me

Hope this help!

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 9 of 9
(6,676 Views)