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

• The Lookup Tables Functions locate a value from an existing data set. • The Discrete Linear Systems Functions represent discrete linear systems of difference equations on the simulation diagram. • The Optimal Design VIs determine the optimal parameters for a system model given a cost function and set of constraints. 1 – System Modeling and Simulation Page 2 . • The Graph Utilities Functions display the outputs of the simulation on a chart or graph. • The Nonlinear Systems Functions simulate nonlinear effects that are present in real-world systems. The Control Design and Simulation module of LabVIEW will be widely used in this and the succeeding activities. See the Simulation VIs and Functions topic on the LabVIEW help for the complete list. a computer workstation with LabVIEW 8. • The Signal Arithmetic Functions perform basic arithmetic operations on signals in a simulation system. IV.6 and control design and simulation module installed is needed. See the Control Design VIs and Functions topic on the LabVIEW help for the complete list. mechanical and position control systems. Activity No. 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 simulation VIs will be used to simulate the performance of electrical.Feedback and Control Systems • … and many more. RESOURCES NEEDED To perform this activity. For this activity. • The Continuous Linear Systems Functions represent continuous linear systems of differential equations on the simulation. • … and many more.

Q1. Q1. 1 – System Modeling and Simulation Page 3 .1(a) For this circuit.Feedback and Control Systems V. Let L = 1 H. LEARNING ACTIVITIES Activity 1. write the solutions onto separate sheets of paper. Consider the simple series RLC circuit shown below.1 – Modeling and simulation of a series RLC electrical network. find the transfer function = / . Activity No.1(b) For a step input. 1. For the questions to follow. C = 1 F and R = 1 Ω. find an expression for the output capacitor voltage. This circuit will be modeled in s-domain and will be simulated using LabVIEW.

1(c) Using this expression. Build the front panel (FP) and the block diagram (BD) as shown below. 2. plot the output capacitor voltage and roughly sketch the plot below. 1 – System Modeling and Simulation Page 4 . calling this VI act01-01.vi.Feedback and Control Systems Q1. Activity No.

a Waveform Chart will automatically be placed. In the FP. Configure the Legend on the top right part of the chart and name them as Input and Output as shown. In the Display Format tab. place a Simulation Loop. a Transfer Function. Right click on the chart and choose X Scale >> Properties. Right-click on one of the boundaries of the loop and choose Configure Simulation Parameters. a Build Array and the SimTime Waveform functions inside the simulation loop.Feedback and Control Systems • • • In the BD. Does the plot using the Simulation VIs the same as the one obtained in Q1. Change the Simulation Time’s Final Time to 20. then click OK. Place a Step Signal.2(a) Comment on the output capacitor voltage. Configure the transfer function block to contain the transfer function obtained from Q1. 1 – System Modeling and Simulation Page 5 .1(c)? _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ Activity No.1(a). Change the scale of the x-axis of the waveform chart to 0-20. choose Type as Floating-point. Q1.

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

1. Fill up the / = / Activity No. 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.Feedback and Control Systems Activity 1. Q2.2 – Modeling and simulation of mechanical systems. 1 – System Modeling and Simulation Page 7 .1(a) Find the transfer functions spaces provided below. = = / and = / .

Call this new VI as act01-02. and to a step force input Plot of and 2. x t and the step input in a single waveform chart.vi so that it can plot simultaneously x t .1(b) Compute for the output displacement of the system and plot them on the space provided.Feedback and Control Systems Q2. 1 – System Modeling and Simulation Page 8 .vi. Modify act01-01. Activity No.

Plot of and .vi to simulate the rotational mechanical system below. the damper and the spring to the displacement of the system. Try to change some parameters of the system and discuss the effect of the mass.2(b) Comment on the waveforms of the displacement as a step input is applied to the system. plotting the responses and with respect to an input step torque.Feedback and Control Systems Q2. _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ Q2.2(a) Roughly sketch the plot of the space provided. Activity No. 1 – System Modeling and Simulation Page 9 . and the step input as seen in the waveform chart on Q2.2(c) Use the VI act01-02.

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

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

Feedback and Control Systems IX. 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. 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. 1 – System Modeling and Simulation Page 12 . ASSESSMENT RUBRIC INTENDED LEARNING OUTCOMES 0 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 2 3 4 5 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.