You are on page 1of 12

Feedback and Control Systems

Name:__________________________________ Date Performed: _________________________ Rating:__________________________ Date Submitted: __________________

Feedback and Control Systems SYSTEM MODELING AND SIMULATION Activity No. 1 I. ACTIVITY OBJECTIVES This activity aims to 1. introduce the control design and simulation module of LabVIEW to the students; and 2. equip the students with the skills and knowledge to use LabVIEW in modeling and simulating systems.

II. INTENDED LEARNING OUTCOME At the end of this activity, the student shall be able to create virtual instruments that will simulate the performance of electrical, mechanical and position control system. III. BACKGROUND INFORMATION The Control Design and Simulation module of LabVIEW contains analysis and design functions that can obtain the dynamic characteristics of systems. This module consists of two parts: the control design functions and the simulation functions.

The control design VIs and functions can be used to construct, analyze and deploy dynamic system models in LabVIEW. It consists of the following subpalettes: The Analytical PID Design VI is used for designing proportional-integral-derivative (PID) controllers. The Dynamic Characteristics VIs calculate properties related to the dynamics of a given system such as DC gain, stability, norm, root locus, and pole-zero analysis. The Frequency Response VIs analyze a system model in frequency domain. The Implementation VIs and functions simulate the dynamic response of a discrete-time system model. The Model Construction VIs create linear system models. The Model Conversion VIs convert a system model from one representation to another.
Page 1

Activity No. 1 System Modeling and Simulation

Feedback and Control Systems


and many more. See the Control Design VIs and Functions topic on the LabVIEW help for the complete list. The simulation VIs and functions can be used to create simulation applications in LabVIEW. It consists of the following objects and subpalettes: The Simulation Loop executes the simulation diagram until the simulation loop reaches the simulation final time or until the Halt Simulation function stops the execution programmatically. The Continuous Linear Systems Functions represent continuous linear systems of differential equations on the simulation. The Discrete Linear Systems Functions represent discrete linear systems of difference equations on the simulation diagram. The Graph Utilities Functions display the outputs of the simulation on a chart or graph. The Lookup Tables Functions locate a value from an existing data set. The Nonlinear Systems Functions simulate nonlinear effects that are present in real-world systems. The Optimal Design VIs determine the optimal parameters for a system model given a cost function and set of constraints. The Signal Arithmetic Functions perform basic arithmetic operations on signals in a simulation system. and many more. See the Simulation VIs and Functions topic on the LabVIEW help for the complete list.

The Control Design and Simulation module of LabVIEW will be widely used in this and the succeeding activities. For this activity, the simulation VIs will be used to simulate the performance of electrical, mechanical and position control systems. IV. RESOURCES NEEDED To perform this activity, a computer workstation with LabVIEW 8.6 and control design and simulation module installed is needed.

Activity No. 1 System Modeling and Simulation

Page 2

Feedback and Control Systems


V. LEARNING ACTIVITIES Activity 1.1 Modeling and simulation of a series RLC electrical network. 1. Consider the simple series RLC circuit shown below. This circuit will be modeled in s-domain and will be simulated using LabVIEW. Let L = 1 H, C = 1 F and R = 1 . For the questions to follow, write the solutions onto separate sheets of paper.

Q1.1(a) For this circuit, find the transfer function

Q1.1(b) For a step input, find an expression for the output capacitor voltage.

Activity No. 1 System Modeling and Simulation

Page 3

Feedback and Control Systems


Q1.1(c) Using this expression, plot the output capacitor voltage and roughly sketch the plot below.

2.

Build the front panel (FP) and the block diagram (BD) as shown below, calling this VI act01-01.vi.

Activity No. 1 System Modeling and Simulation

Page 4

Feedback and Control Systems

In the BD, place a Simulation Loop. Right-click on one of the boundaries of the loop and choose Configure Simulation Parameters. Change the Simulation Times Final Time to 20. Place a Step Signal, a Transfer Function, a Build Array and the SimTime Waveform functions inside the simulation loop. Configure the transfer function block to contain the transfer function obtained from Q1.1(a). In the FP, a Waveform Chart will automatically be placed. Configure the Legend on the top right part of the chart and name them as Input and Output as shown. Right click on the chart and choose X Scale >> Properties. In the Display Format tab, choose Type as Floating-point, then click OK. Change the scale of the x-axis of the waveform chart to 0-20.

Q1.2(a) Comment on the output capacitor voltage. Does the plot using the Simulation VIs the same as the one obtained in Q1.1(c)? _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________

Activity No. 1 System Modeling and Simulation

Page 5

Feedback and Control Systems


Q1.2(b) Change some of the parameters of the RLC circuit and obtain a new transfer function. Simulate this new transfer function. Comment on the effect of the values of the resistor, inductor and capacitor on the output capacitor voltage. _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ Q1.2(c) Discuss the different timing options in the Configure Simulation Parameters of the simulation loop. _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ Q1.2(d) Use the act01-01.vi VI to plot the response of the electrical network shown below. Roughly sketch the plot on the space provided.

Activity No. 1 System Modeling and Simulation

Page 6

Feedback and Control Systems

Activity 1.2 Modeling and simulation of mechanical systems. 1. In this part of the activity, the response of the mechanical system such as the one shown below to a step input will be simulated.

Q2.1(a) Find the transfer functions spaces provided below. =

and

. Fill up the

Activity No. 1 System Modeling and Simulation

Page 7

Feedback and Control Systems


Q2.1(b) Compute for the output displacement of the system and plot them on the space provided. and to a step force input

Plot of

and

2.

Modify act01-01.vi so that it can plot simultaneously x t , x t and the step input in a single waveform chart. Call this new VI as act01-02.vi.

Activity No. 1 System Modeling and Simulation

Page 8

Feedback and Control Systems


Q2.2(a) Roughly sketch the plot of the space provided. Plot of and , and the step input as seen in the waveform chart on

Q2.2(b) Comment on the waveforms of the displacement as a step input is applied to the system. Try to change some parameters of the system and discuss the effect of the mass, the damper and the spring to the displacement of the system. _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ Q2.2(c) Use the VI act01-02.vi to simulate the rotational mechanical system below, plotting the responses and with respect to an input step torque.

Activity No. 1 System Modeling and Simulation

Page 9

Feedback and Control Systems


Plot of and

VI. CONCLUSIONS _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ VII. ASSESSMENT TASKS - MACHINE PROBLEMS 1. Create a virtual instrument that will interactively simulate electrical and mechanical system. System configuration is your choice, just provide the schematic on the front panel. The front panel must contain controls that can adjust the components (resistor, inductor and capacitor for electrical systems; mass (inertia), damper and spring for translational (rotational) mechanical system. Call the VI for the electrical system simulator as macpro01-01.vi, macpro01-02.vi for the translational mechanical system, and macpro01-03.vi for the rotational mechanical system. Graphics can be integrated in the VI to make it more attractive. 2. Create a virtual instrument that will simulate a position control system. The input control must be an angular displacement from a knob, and the output is an angular displacement from another knob. The plot of the input and output responses must also be displayed in a waveform chart. A possible VI may look something like the one shown below. Call this VI as macpro01-04.vi.

Activity No. 1 System Modeling and Simulation

Page 10

Feedback and Control Systems

VIII. REFERENCES N. Nise. (2011). Control Systems Engineering 6th Edition. United States of America: John Wiley & Sons. R. Dorf & R. Bishop. (2011). Modern Control Systems 12th Edition. New Jersey: Prentice Hall. National Instruments (2010).LabVIEW 2010 Control Design and Simulation Module Help. NI Developer Zone. Retrieved May 31, 2011. From http://zone.ni.com/reference/en-XX/help/371894E-01/ National Instruments (n.d.). What isLabVIEW Control Design and Simulation Module. NI Developer Zone. Retrieved May 31, 2011. From http://zone.ni.com/devzone/cda/tut/p/id/11281

Activity No. 1 System Modeling and Simulation

Page 11

Feedback and Control Systems


IX. ASSESSMENT RUBRIC
INTENDED LEARNING OUTCOMES

1 A VI for electrical system was created but does not work or results vary significantly from reality A VI for translational mechanical system was created but does not work or results vary significantly from reality A VI for rotational mechanical system was created but does not work or results vary significantly from reality

Points

Create virtual instrument that will simulate the performance of electrical system

No VI for electrical system was created

The VI works but the results The VI works, are doubtful or the results are are credible but the inconsistent interface is when trials are difficult to use repeatedly done The VI works but the results The VI works, are doubtful or the results are are credible but the inconsistent interface is when trials are difficult to use repeatedly done The VI works but the results The VI works, are doubtful or the results are are credible but the inconsistent interface is when trials are difficult to use repeatedly done

The VI returns The VI results that are simulates the expected and electrical with little or no system variation from perfectly and reality and with contains added user friendly features interface The VI returns The VI results that are simulates the expected and translational with little or no mechanical variation from system reality and with perfectly and user friendly contains added interface features The VI returns The VI results that are simulates the expected and rotational with little or no mechanical variation from system reality and with perfectly and user friendly contains added interface features The VI returns The VI results that are simulates the expected and position control with little or no system variation from perfectly and reality and with contains added user friendly features interface TOTAL

Create virtual instrument that will simulate the performance of translational mechanical system

No VI for translational mechanical system was created

Create virtual instrument that will simulate the performance of rotational mechanical system

No VI for rotational mechanical system was created

Create virtual instrument that will simulate the performance of a position control system

A VI for a The VI works position control but the results The VI works, No VI for system was are doubtful or the results are position control created but are credible but the system was does not work inconsistent interface is created or results vary when trials are difficult to use significantly repeatedly from reality done

OVERALL PERFORMANCE

Activity No. 1 System Modeling and Simulation

Page 12

You might also like