Professional Documents
Culture Documents
Name:__________________________________
Date Performed: _________________________
Rating:__________________________
Date Submitted: __________________
Page 1
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(b) For a step input, find an expression for the output capacitor voltage.
Page 2
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
a
num = [ a
and a row vector den equal to
den = [ b
a ]
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)
Page 3
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.
Page 4
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
Page 6
( )=
( )=
( )/ ( ) and
( )=
( )/ ( ). Fill up the
( )/ ( )
( )/ ( )
( ) and
()
Page 7
2.
( ) and
()
Repeat steps 2, 3 and 4 of Activity 1.1 to simulate the mechanical system given.
( ),
( ) in MATLAB
( ) and
( ) in LabVIEW
Plot of
Page 8
Plot of
( ) and
( )
Page 9
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.)
Page 10
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
OUTCOMES
A program for
electrical system was
created but does not
work or results vary
significantly from
reality
An investigation was
made but contains
insufficient data or
limited trials.
A sufficient amount of The data gathered was The data gathered was
data were gathered but analyzed but does not analyzed very well and
was not synthesized
support the
valid conclusions were
properly.
conclusions made.
drawn.
Points
Page 11
A program for
translational
mechanical system
was created but does
not work or results
vary significantly from
reality
An investigation was
made but contains
insufficient data or
limited trials.
A sufficient amount of The data gathered was The data gathered was
data were gathered but analyzed but does not analyzed very well and
was not synthesized
support the
valid conclusions were
properly.
conclusions made.
drawn.
A program for
rotational mechanical
system was created
but does not work or
results vary
significantly from
reality
An investigation was
made but contains
insufficient data or
limited trials.
A sufficient amount of The data gathered was The data gathered was
data were gathered but analyzed but does not analyzed very well and
was not synthesized
support the
valid conclusions were
properly.
conclusions made.
drawn.
Points
A program for a
The program returns
The program works but
position control system
The program works,
results that are
the results are doubtful
was created but does
the results are credible expected and with little
or are inconsistent
not work or results
but the interface is
or no variation from
when trials are
vary significantly from
difficult to use
reality and with user
repeatedly done
reality
friendly interface
An investigation was
made but contains
insufficient data or
limited trials.
A sufficient amount of The data gathered was The data gathered was
data were gathered but analyzed but does not analyzed very well and
was not synthesized
support the
valid conclusions were
properly.
conclusions made.
drawn.
Total Score
Mean Score = (Total Score /8)
Percentage Score = (Total Score / 32) x 100%
Page 12
Points
Points
Laboratory Rating
A
Total
Page 13