Sei sulla pagina 1di 14

Laboratory Exercise No.

11
Dynamic Systems Simulation Using LabVIEW

1. Objective:
The activity aims to simulate a dynamic system with transfer function having G(s)=2 e -s /(10s + 1)(5s + 1)
using the simulation functions of LabVIEW.
2. Intended Learning Outcomes (ILOs):
The students shall be able to:
2.1 Build a model of the open-loop system for the second order plus time delay process and
determine the unit set-point and unit disturbance responses.
2.2 Build a closed-loop model for the same process and simulate the unit disturbance
response and the unit-set-point response for two different PID controller tuning methods.
3. Discussion:
<Come up with a discussion of unit set-point and unit set-point response>
<Come up with a discussion of unit disturbance and unit disturbance response>
<Come up with a discussion of open-loop system and closed-loop system>
<Come up with a discussion of PID controller tuning and its methods>
4. Resources:
LabVIEW
5. Procedure:
A. Open-Loop System Simulation
Note: Create a directory (folder) named Maranan_YourSurname_LabExer9 and place inside it
all virtual instruments that you will create through this laboratory exercise. Download the PID
controller.vi from ftp and place inside this folder to be used in Procedure B.3.
1. Open LabVIEW and start with a new/blank VI. Name the virtual instrument as
YourSurname_openLoop. To view the palette functions that will be used in creating LabVIEW
programs, right-click inside the block diagram. Select the Control Design & Simulation palette
in order to view the library of simulation functions.
2. Click-and-drag a simulation loop on the block diagram.

3. From the Continuous sub-palette under Simulation palette of Control Design and Simulation
module of LabVIEW, drag and drop the block of Transfer Function and the block of Transport
Delay. The Transfer Function block represents the process and rename this block as Process
Transfer Function (or simply Process TF). Connect the output of the Process TF block to the
input of Transport Delay block .

1
4. To specify the transfer function 2/(50s 2 + 15s + 1), double-click the Process TF block and
specify the Numerator as 2 and Denominator as 1 15 50. The specification of the numerical
coefficients are treated as the numerical coefficients of ascending powers of s. Resizing the
block’s icon is a must to see clearly the transfer function.
5. To specify the value of 1 for the Transport Delay, double-click the Transport Delay block and
assign the value of 1. The Transport Delay can represent measurement delay or other types.
6. Drag and drop another block of Transfer Function and another block of Transport Delay and
place them slightly above the blocks created in Procedure 2. Rename the Transfer Function as
Disturbance Transfer Function (or simply Disturbance TF) and specify the Numerator as 2 and
Denominator as 1 15 50. In this exercise the transfer function of the process (Gp)and the
transfer function of the disturbance (Gd) are the same. For the Transport Delay1, specify the
value of 1.
7. Located in the Signal Arithmetic palette, place a copy of Summation block to the right of the
Transport Delay block. Right click the Summation block and select visible items >Label and
choose Summation. Connect the output of each Transport Delay block to the input of the
Summation block. From the dialog box, the number of inputs and their polarity can be
modified.
8. From the Graph Utilities palette place a SimTime Waveform. Connect the output of the
summation block to the input of the SimTime Waveform block.
9. From step Signal Generation palette place a Step Signal block, to the left of Disturbance TF.
Connect the output of the Step Signal block to the input of Disturbance block. Rename the
Step Signal block as D. To open its dialog block, double click it and set the initial value to zero,
final value to zero and step time to zero. This means that for this time, this block is disabled.
10. Place a Step Signal block to the far left of process TF and rename it as U. Connect the output
of U to the input of Process TF. Set time to zero, Initial value to zero and Final value to 1. This
is the model of open-loop system. It should look similar to the model below.

11. Double-click on the left terminal of the Simulation loop, set the Final Time to 50 and Maximum
step size to 1. The maximum step size determines the largest step LabVIEW uses in
numerically integrating the ODE.
12. Run the simulation by clicking the arrow on either the front panel or the block diagram. Use
CTRL-E to switch between FP and BD. Double click on the title to change the name of the plot
as Unit Step-Response (Open-Loop). You can also right-click on the plot to view axis settings,
auto-scaling, and other parameters. Show the output in Table A.1. Save this file as

2
YourSurname_le9_pA12
13. To simulate the open-loop disturbance response, disable U by setting Final value to 0. Enable
D by setting Final value to 1. This creates a unit disturbance step. Begin the simulation.
Rename the graph title as Unit Disturbance Response (Open-Loop). Save this file as
YourSurname_le9_pA13. Show the output in Table A.2.
A. Close-Loop System Simulation
1. Delete the connection between the U block and Process TF block and rename the U block as
Ysp. This block will be used to produce a step change in the set-point.
2. Place a Summation block to the right of Ysp. Change the lower input from + to – by opening its
dialog box. Connect the output of the Ysp to the input of Summation block. Click the bottom
input of this Summation block and drag the arrow to the output of the other Summation block.
The model should look like this.

3. Place a PID Controller by clicking Select a vi (select PID controller.vi which you saved inside
the folder created in Procedure A.1) and drag it to the right newest Summation block. Connect
the output of the of the newest Summation block to the input of the PID controller and the
output of the PID controller to the input of the Process TF. Double-click on the PID controller
and enter the ITAE (disturbance) controller setting given in Table 12.3 SEM as well as gains for
closed-loop :

Note that the PID controller settings are Kc, τI  and  τD  where P = Kc, I = Kc τI / , and D =
Kc*τD , so numerical values of P,I and D should reflect these definitions. This model
represents the closed-loop system. An important feature of LabVIEW is interactivity. This
capability makes the PID controller gains interactive from the front panel, rather than having to
edit them on the block diagram. Double-click on the PID Controller and change Parameter
Source from Configuration Dialog Box to Terminal.
4. Select CTRL-H and hover the PID controller to see where the gain terminals are. They come in
from the top. Right click on each terminal and select Create>Control to automatically wire a
control to the terminal. The inputs to the PID controller should look like this:

3
By default, LabVIEW creates a standard Numeric control, but this can easily be changed. Go
to the front panel, right-click on the control, select Replace>Horizontal Pointer Slide. Then
right-click on the new control and Visible Items > Digital Display. This way, gains may be
entered either from the slide or typed in the numeric control. Do this for each PID gain. The
front panel should look like this:

5. Click on block D and set the Final value to 0 so that no step in the disturbance will occur.
Create a step in the set-point by clicking on Ysp and setting this final value to 1. Run the
simulation. The resulting graph will be for the unit set-point response and label it as unit set-
point response for ITAE (disturbance) settings. Show the output in Table B.1. Save the file as
YourSurname_le9_pB5.
6. Double-click on Ysp and set final value to 0. Double-click on D and set final value 1. Run the
simulation. Label this as Unit Disturbance Response for ITAE (disturbance) settings. Show the
output in Table B.2. Save the file as YourSurname_le9_pB6.

Course: ECE 006


4
Group No.:
Group Members:
SANTOS, VINCE NIKKO M.

6. Data and Results:


A. Procedure A
Table A.1 Open-Loop System and its Unit Step Response

5
Table A.2 Open-Loop System and its Unit Disturbance Response

6
7
B. Procedure B
Table B.1 Unit set-point response for ITAE (disturbance) settings

8
9
Table B.2 Unit disturbance response for ITAE (disturbance) settings

10
11
C.

7.Conclusion:
I therefore conclude that I was able to to simulate a dynamic system with transfer function having G(s)=2 e -
s /(10s + 1)(5s + 1) using the simulation functions of LabVIEW. I was also able to Build a model of the open-

loop system for the second order plus time delay process and determine the unit set-point and unit
disturbance responses, and build a closed-loop model for the same process and simulate the unit
disturbance response and the unit-set-point response for two different PID controller tuning methods.

8. Further Readings:
Seborg Dale E., Edgar, Thomas F., and Mellichamp Duncan A. (2004). Process Dynamics and
Control. Singapore: Wiley.
Knopf, F. C. (2012). Modeling, analysis and optimization of process and energy systems.Hoboken,
New Jersey: John Wiley and Sons.
Velten, K. (2009). Mathematical modeling and simulation: introduction for scientists and engineers.
Singapore: Wiley-VCH.

12
9. Assessment (Rubric for Laboratory Performance):
TECHNOLOGICAL INSTITUTE OF THE PHILIPPINES
RUBRIC FOR MODERN TOOL USAGE
(Engineering Programs)
Student Outcome (e): Use the techniques, skills, and modern engineering tools necessary for engineering
practice in complex engineering activities.
Program: Chemical Engineering Course: CHE 506 Section: _______ ____Sem SY ________
Performance Unsatisfactor Developing Satisfactory Very Satisfactory Score
Indicators y 2 3 4
1
1. Appl Fails to identify Identifies Identifies modern Recognizes the
y any modern modern techniques and is benefits and
appropriate techniques to techniques but able to apply constraints of
techniques, perform fails to apply these in modern
skills, and discipline- these in performing engineering tools
modern specific performing discipline-specific and shows
tools to engineering discipline- engineering task. intention to apply
perform a task. specific them for
discipline- engineering engineering
specific task. practice.
engineering
task.
2. De Fails to apply Attempts to Shows ability to Shows ability to
monstrate any modern apply modern apply fundamental apply the most
skills in tools to solve tools but has procedures in appropriate and
applying engineering difficulties to using modern effective modern
different problems. solve tools when solving tools to solve
techniques engineering engineering engineering
and modern problems. problems. problems.
tools to
solve
engineering
problems.
3. Rec Does not Recognizes Recognizes the Recognizes the
ognize the recognize the some benefits benefits and need for benefits
benefits and benefits and and constraints of and constraints of
constraints constraints of constraints of modern modern
of modern modern modern engineering tools engineering tools

13
engineering engineering engineering and shows and makes good
tools. tools. tools. intention to apply use of them for
them for engineering
engineering practice.
practice.
Total Score
Mean Score = (Total Score / 3)
Percentage Rating = (Total Score / 12) x 100%

Evaluated by: Engr. Crispulo G. Maranan June 31,


2017
Printed Name and Signature of Faculty Member Date

14

Potrebbero piacerti anche