Discussion:
Plant Simulator
(too old to reply)
mksa
2007-03-13 17:10:14 UTC
Permalink
In the PID toolsetthe example
General Auto PID Simulator.vi there is a file called Plant
Simulator.viI 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
Barp
2007-03-14 13:10:06 UTC
Permalink
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


plant.JPG:
Loading Image...
mksa
2007-03-22 18:10:11 UTC
Permalink
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.
Barp
2007-03-23 13:40:10 UTC
Permalink
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...:smileysad:
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... :smileyhappy:
Hope this can help!
Barp
2007-04-02 12:40:07 UTC
Permalink
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!
mksa
2007-04-03 06:10:08 UTC
Permalink
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

<a href="Loading Image..." target="_blank"><img src="http://www.engin.umich.edu/group/ctm/examples/motor/Mfo9.GIF"> </a>

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.

Continue reading on narkive:
Loading...