Sunteți pe pagina 1din 13

Feedback and Control Systems

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

Feedback and Control Systems

SYSTEM MODELING AND SIMULATION


Activity No. 1

I. ACTIVITY OBJECTIVES
This activity aims to
1. introduce the modeling and simulation tools of MATLAB and LabVIEW to the students;
2. equip the students with the skills and knowledge in using MATLAB and LabVIEW to model and
simulate systems; and
3. equip the students with the skill to measure the major performance indicators of a control system,
namely: time response parameters, error performance and stability.

II. INTENDED LEARNING OUTCOMES


At the end of this activity, the student shall be able to
1. create MATLAB and LabVIEW programs that will simulate electrical, mechanical and position
control systems; and
2. determine the effects of component values to the systems time response parameters, error and
stability of dynamic systems.

III. BACKGROUND INFORMATION


One of the steps involved in the design of a control system is to model the system itself from its schematic.
The systems model is very important since it will provide information on the systems various parameters,
such as time response, error and stability information. These parameters will then help the designer to
come up with a control system that would make the system perform at its desired state. Thus, modeling
and simulation is an important step in the design of control systems.

Systems can be modeled as transfer functions using the Laplace transform of the differential equation
representing the system, or as state-space models which expresses the system in terms of state and
output vectors. Solutions of both models can be highly simplified by the use of computer aided tools, such
as MATLAB and LabVIEW. In this activity, MATLAB and LabVIEW are to be used to model and simulate
dynamic systems after obtaining their transfer functions.

MATLAB has the control system toolbox which can be used to create transfer function s-domain models of
dynamic systems and plot and obtain information on the systems step response. In the same manner,
LabVIEW has the control design and simulation module which can be used to simulate dynamic systems.
This activity will demonstrate how these tools can be used to model and simulate dynamic systems.

Activity No. 1 System Modeling and Simulation Page 1


Feedback and Control Systems

IV. RESOURCES NEEDED


To perform this activity, a computer workstation with MATLAB R2012a or higher and LabVIEW 8.6 or
higher installed is required. For MATLAB, the control systems toolbox is required and for LabVIEW, the
control design and simulation module.

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 2


Feedback and Control Systems

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

2. MATLAB. The transfer function can be created in MATLAB by creating a row vector matrix containing
the coefficients of the numerator and the denominator of the transfer function. For the transfer function
of the form
N(s) a s + a s ++a s+a
G(s) = =
D(s) b s +b s + +b s+b

where n > m, create a row vector num equal to


num = [ a a a a ]

and a row vector den equal to


den = [ b b b b ]

in the workspace. Then create the object sys which contains the transfer function whose numerator
and denominator coefficients in num and den by using the command tf() in the following format

>> sys = tf(num,den)

In defining numerator and denominator coefficients, the command poly() is also useful. Type in
the command help poly() for more information on this function and how can it be used.

3. To plot the step response of the system whose transfer function is sys use the command
step()in the following format:

>> step(sys)

Activity No. 1 System Modeling and Simulation Page 3


Feedback and Control Systems

Q1.3(a) Roughly sketch the plot of the transfer function of the above circuit. Use this graph to
determine the time response and error of the system.

4. LabVIEW. Build the front panel (FP) and the block diagram (BD) as shown below, calling this VI
act01-01.vi.
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.

Activity No. 1 System Modeling and Simulation Page 4


Feedback and Control Systems

Q1.4(a) Use the VI to plot the step response of the circuit above. Roughly sketch the plot below and
label the necessary time response and error information in the plot. The plots obtained in the
previous steps must be the same.

Q1.4(b) Based on the plots obtained, is the system stable? Why or why not?
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
Q1.4(c) Change some of the parameters of the RLC circuit and obtain a new transfer function.
Simulate this new transfer function. Use both MATLAB and LabVIEW. Conduct several trials (at
least ten trials) and plot the step response of the system in each trial. Comment on the effect of the
values of the resistor, inductor and capacitor on the output capacitor voltage.
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________

Activity No. 1 System Modeling and Simulation Page 5


Feedback and Control Systems

_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
Q1.4(d) Discuss the different timing options in the Configure Simulation Parameters of the
simulation loop.
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
Q1.4(e) Create a virtual instrument using the control design and simulation module and MathScript
node of LabVIEW to simulate the electrical network below. Provide a screenshot of the block
diagram and the front panel of the VI on a separate sheet of paper. Plot the step response on the
space provided below.

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 ( )= ( )/ ( ) and ( )= ( )/ ( ). Fill up the


spaces provided below.
( )= ( )/ ( )

( )= ( )/ ( )

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

()

Activity No. 1 System Modeling and Simulation Page 7


Feedback and Control Systems

Plot of ( ) and ()

2. Repeat steps 2, 3 and 4 of Activity 1.1 to simulate the mechanical system given.

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

Plot of ( ) and ( ) in LabVIEW

Activity No. 1 System Modeling and Simulation Page 8


Feedback and Control Systems

Q2.2(b) Interpret the waveforms. How does the position of the masses vary as a step force is
applied to the system at ( )? (Hint: what happens when you apply a step force to the system
above?)
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
Q2.2(c) Determine what happens when the surface at which the masses moves on has friction
which is = / for both masses. Plot the new response on a separate sheet of paper and
interpret the results.
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
Q2.2(d) Simulate the rotational mechanical system below, plotting the responses ( ) and ( )
with respect to an input step torque.

Plot of ( ) and ( )

Activity No. 1 System Modeling and Simulation Page 9


Feedback and Control Systems

Q2.2(e) Interpret the waveforms. How does the angular position of the inertia vary as a step torque
is applied to the system at ( )?
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________

VI. CONCLUSIONS
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________

VII. ASSESSMENT TASKS - MACHINE PROBLEMS


1. Create a MATLAB program or a LabVIEW virtual instrument that will interactively simulate electrical
and mechanical system. System configuration is your choice, just provide the schematic. The interface
must contain controls to adjust the parameters of the components of the system. Build one program or
VI for each of the system (electrical, translational mechanical and rotational mechanical). Graphics can
be integrated into the program. Using these programs or VIs, investigate the effect of the component
values to the time response, error performance and stability of the system.

2. A position control system can be represented by a block diagram shown below, where K is a constant
gain and G(s) is the transfer function of the plant, which takes the form
K
G(s) =
s(s + a)

where K and a are constants. (Note that G(s) has the same form as the transfer function of a
servomotor.)

Activity No. 1 System Modeling and Simulation Page 10


Feedback and Control Systems

Create a MATLAB program or a LabVIEW virtual instrument to implement and simulate the position
control system as shown. Using this simulator, investigate the effect of the constants K, K and a to
the time response, error and stability of the system.

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

IX. ASSESSMENT RUBRIC

A. Assessment rubric for the activitys intended learning outcomes (70%)

INTENDED LEARNING
1 2 3 4 Points
OUTCOMES

A program for The program returns


The program works but
Create a program that will electrical system was The program works, results that are
the results are doubtful
simulate the performance created but does not the results are credible expected and with little
or are inconsistent
of electrical system work or results vary but the interface is or no variation from
when trials are
(MP 1) significantly from difficult to use reality and with user
repeatedly done
reality friendly interface.

Determine the effect of


An investigation was A sufficient amount of The data gathered was The data gathered was
component values of
made but contains data were gathered but analyzed but does not analyzed very well and
electrical system to the
insufficient data or was not synthesized support the valid conclusions were
performance of the system
limited trials. properly. conclusions made. drawn.
(MP 1)

Activity No. 1 System Modeling and Simulation Page 11


Feedback and Control Systems

INTENDED LEARNING
1 2 3 4 Points
OUTCOMES

A program for
The program returns
Create a program that will translational The program works but
The program works, results that are
simulate the performance mechanical system the results are doubtful
the results are credible expected and with little
of translational mechanical was created but does or are inconsistent
but the interface is or no variation from
system not work or results when trials are
difficult to use reality and with user
(MP 1) vary significantly from repeatedly done
friendly interface
reality

Determine the effect of


component values of An investigation was A sufficient amount of The data gathered was The data gathered was
translational mechanical made but contains data were gathered but analyzed but does not analyzed very well and
system to the performance insufficient data or was not synthesized support the valid conclusions were
of the system limited trials. properly. conclusions made. drawn.
(MP 1)

A program for
The program returns
Create a program that will rotational mechanical The program works but
The program works, results that are
simulate the performance system was created the results are doubtful
the results are credible expected and with little
of rotational mechanical but does not work or or are inconsistent
but the interface is or no variation from
system results vary when trials are
difficult to use reality and with user
(MP 1) significantly from repeatedly done
friendly interface
reality

Determine the effect of


component values of An investigation was A sufficient amount of The data gathered was The data gathered was
rotational mechanical made but contains data were gathered but analyzed but does not analyzed very well and
system to the performance insufficient data or was not synthesized support the valid conclusions were
of the system limited trials. properly. conclusions made. drawn.
(MP 1)

A program for a The program returns


Create a program that will The program works but
position control system The program works, results that are
simulate the performance the results are doubtful
was created but does the results are credible expected and with little
of a position control or are inconsistent
not work or results but the interface is or no variation from
system when trials are
vary significantly from difficult to use reality and with user
(MP 2) repeatedly done
reality friendly interface

Determine the effect of


component values of An investigation was A sufficient amount of The data gathered was The data gathered was
position control system to made but contains data were gathered but analyzed but does not analyzed very well and
the performance of the insufficient data or was not synthesized support the valid conclusions were
system limited trials. properly. conclusions made. drawn.
(MP 2)

Total Score

Mean Score = (Total Score /8)

Percentage Score = (Total Score / 32) x 100%

Activity No. 1 System Modeling and Simulation Page 12


Feedback and Control Systems

INTENDED LEARNING
1 2 3 4 Points
OUTCOMES

A = 70% of the Percentage Score

B. Assessment rubric for the conduct of laboratory experiments (30%)

Performance Indicators 1 2 3 Points

Members follow good


Members do not follow Members follow good
and safe laboratory
Conduct experiments in accordance with good and safe laboratory and safe laboratory
practice most of the time
good and safe laboratory practice. practice in the conduct of practice at all times in the
in the conduct of
experiments. conduct of experiments.
experiments.
Members are able to
Members are able to
Members are unable to operate the equipment
Operate equipment and instruments with operate equipment and
operate the equipment and instruments with
ease instrument with
and instruments. ease and with minimum
supervision.
supervision.
The group has complete
Analyze data, validate experimental values data, validates
The group has complete
against theoretical values to determine The group has experimental values
data but has no analysis
possible experimental errors, and provide incomplete data. against theoretical
and valid conclusion.
valid conclusions. values, and provides
valid conclusion.
Total Score

Mean Score = (Total Score /3)

Percentage Score = (Total Score / 9) x 100%

B = 30% of the Percentage Score

Laboratory Rating

A B Total

Activity No. 1 System Modeling and Simulation Page 13

S-ar putea să vă placă și