Professional Documents
Culture Documents
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
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.
Page 2
Q1.1(b) For a step input, find an expression for the output capacitor voltage.
Page 3
2.
Build the front panel (FP) and the block diagram (BD) as shown below, calling this VI act01-01.vi.
Page 4
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)? _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________
Page 5
Page 6
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.
and
. Fill up the
Page 7
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.
Page 8
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.
Page 9
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.
Page 10
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
Page 11
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
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
Create virtual instrument that will simulate the performance of rotational mechanical system
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
Page 12