You are on page 1of 14

CENTRE FOR DIPLOMA STUDIES

CONTROL SYSTEM
DEPARTMENT OF ELECTRICAL ENGINEERING

LABORATORY INSTRUCTION SHEETS

COURSE CODE AND


DAE32103 – CONTROL SYSTEM
COURSE NAME

YEAR 2 DAE

TITLE OF
Feedback Control System
EXPERIMENT

EXPERIMENT NO. 2
Control System (DAE32103) ii
Lab 2

Table of Contents

1.0 Outcomes A

2.0 Guidelines A

3.0 Procedures B

Overview of Lab 2 B

4.0 Lab Activity E

Lab Activity 1 E

Lab Activity 2 E

Lab Activity 3 F

Grading Rubric for Practical Skill A

Questions 2

Lab Activity 2

Lab Activity 1 2

Lab Activity 2 4

Lab Activity 3 4

Demonstration 4

Observations 5

Lab Activity 2 5

Lab Activity 3 6
Control System (DAE32103) A
Lab 2: Feedback Control Systems

1.0 Outcomes

After completing this module, students should be able to:


1. Understand that the Simulink is a graphical tool that allows us to simulate feedback control
systems.
2. Familiarize the components of Simulink in designing circuit and obtaining result analysis

2.0 Guidelines

1. Grouping: Lab group is predetermined and consists with at most two team members.
2. Questions: Must be answered individually in AUTHOR.
3. Lab Activities: All lab activities must be completed during lab session.
4. Demonstration: Student must demonstrate the successful lab activities to the respective
instructor during lab session. Verification will be given upon completion of all lab activities.
5. Report Organization: Report must be HANDWRITTEN and organized according to given
report template. All details, schematic diagram, graphs and related materials must be included
in the report.
6. Report Submission: Report must be received by respective technical staff (at AUTHOR)
before consecutive lab session. 2 weeks is given to complete the report. Scan your
handwritten report into PDF format.
Control System (DAE32103) B
Lab 2: Feedback Control Systems

3.0 Procedures

Overview of Lab 2

1. COMPONENTS

For most of the systems we will encounter, we only need to be concerned with a small fraction
of Simulink's component library. In particular, the components you should be familiar with are:

a. Continuous library;
Integrator - integrates a signal
State-Space - used to add a system block in state-space form
Transfer Fcn - used to add a system block in transfer function form
b. Math Operations library
Gain - a constant gain
Sum - used to add two or more signals
Trigonometric Function - used to place non-linear trigonometric elements
c. Signal Routing library
Mux - used to multiplex signals together in order to plot several on one graph
d. Sinks library
Scope - used for viewing system output
To workspace - used to transfer a signal to MATLAB
e. Sources library
Ramp - generates a ramp signal
Sine Wave - generates a sinusoid
Step - generates a unit step signal

Gain - To modify a 'Gain' component, double-click on the component. The 'Gain' parameter can
be either a number or, more useful, can be an expression. For instance, the 'Gain' parameter
can be set as '9.8/2.5' instead of having to calculate and then enter '0.45'.

Sum - The 'Sum' component is equivalent to a summing junction in a block diagram. To add
more input nodes or change the sign of an input node, double-click on the 'Sum' component
and modify the text in the 'List of Signs' parameter. To make the sum have a '+' and a '-' node,
change the 'List of Signs' parameter to '|+-'. To add a third summing input node, change the text
to '| + ++'.
Control System (DAE32103) C
Lab 2: Feedback Control Systems

To Workspace - The 'To Workspace' component sends data to the MATLAB workspace where
you can plot it or process it as you wish. To set this up, double-click on the component and
change the 'Save format' parameter to 'Array'. Also, set the 'Variable name' parameter to
something descriptive, such as 'yout'. Simulink also automatically exports the time in the
MATLAB variable 'tout'. This allows you to plot the output in MATLAB using the standard 'plot'
command, and also allows you to nicely label the plots.

Transfer Fcn - To modify a 'Transfer Fcn' component, double-click on the block. The
'Numerator' and 'Denominator' parameters are the coefficients of the polynomials of the
numerator and denominator of the transfer function. The coefficients are in order of decreasing
power. For instance, if 'Numerator' is set to '[1 2 3]', then the numerator of the transfer function
is s2 + 2s + 3.

2. MATLAB Basics

To run the MATLAB Control System Toolbox demo by typing “demo('toolbox','control')" at the
MATLAB prompt. Aside from the basic MATLAB plotting commands, you should become
familiar with the following commands:

tf - This command is used to enter transfer functions. For example, to enter the transfer function
𝑠+2
(𝑠) =
𝑠2 +5
, you would type H=tf([1 2],[1 0 5]). The first parameter is a row vector of

the numerator coefficients. Similarly, the second parameter is a row vector of the denominator
coefficients.

conv - This command is used to convolve two polynomials. It is particularly useful for
determining the expanded coefficients for factored polynomials. For example, this command
𝑠+2
can be used to enter the transfer function 𝐻(𝑠) = (𝑠+1)(𝑠−3) by typing H=tf([1 2],conv([1

1],[1 -3])) series or * - This command is used to combine two transfer functions that are
in series. For example, if H(s) and G(s) are in series, they could be combined with the command
T=G*H or T=series(G,H).

feedback - This command is used to combine two transfer functions that are in feedback. For
example, if G(s) is in the forward path and H(s) is in the feedback path, they could be combined
with the command T=feedback(G,H).
Control System (DAE32103) D
Lab 2: Feedback Control Systems

step - This command is used to plot the step response of a system. For example, step(T)
would plot the step response of the system T(s).

bode - This command is used to plot the frequency response. For example, bode(T) would
plot the frequency response of the system T(s).

rlocus - This command is used to plot the root locus. For example, bode(G*H) would plot the
frequency response of the system G(s)H(s). Keep in mind that this command is used on the
loop gain of the system as opposed to the closed-loop transfer function. For example, consider
the standard negative feedback system with forward path G and feedback path H. The loop
𝐺(𝑠)
gain would be G(s)H(s) whereas the closed-loop transfer function would be
1+𝐺(𝑠)𝐻(𝑠)
Control System (DAE32103) E
Lab 2: Feedback Control Systems

4.0 Lab Activity

Lab Activity 1

1. Convert the following frequency domain expression into time domain using MATLAB
command:
(𝑠 + 2)
𝑖. 𝐻(𝑠) =
(𝑠 2 − 3𝑠)
𝑠
𝑖𝑖. 𝐺(𝑠) =
(𝑠 + 4)(𝑠 + 8)

2. Convert the following time domain expression into frequency domain using MATLAB
command:
𝑖. 𝑦(𝑡) = 1 − 2𝑒 −2𝑡 + 𝑒 −8𝑡
5 10 40 −3𝑡
𝑖𝑖. 𝑓(𝑡) = − 5𝑒 −2𝑡 + 𝑒 −3𝑡 + 𝑒
9 3 9

Lab Activity 2

1. Create a new Simulink model.


2. Design a system as in Figure 1.

Figure 1

3. In Step input, set step time to 0.


4. Change the gain variable “K" to 1 (in workspace) in the constant gain controller.
5. Run the simulation by clicking on the triangle-shaped "play" icon in the toolbar.
6. Use Matlab commands to plot the step response. Record the result.
7. Change the gain variable “K" to 2 (in workspace) and re-run the simulation.
8. Use Matlab commands to plot the step response. Record the result.
9. Change the gain variable “K" to 10 (in workspace) and re-run the simulation.
10. Use Matlab commands to plot the step response. Record the result.
Control System (DAE32103) F
Lab 2: Feedback Control Systems

11. Keep the gain K=10, and replace the step input with a ramp input. Re-run the simulation.
12. Use Matlab commands to plot the step response. Record the result.
13. The steady-state error is defined as the difference between the input and output signals when
t→∝. For step response in instruction 11, zoom in on the graph at t = 10 seconds and record
the input and output values.
14. Represent your system in root locus. Record the result.

Lab Activity 3

1. Use MATLAB command to find T(s) = C(s)/R(s), the closed-loop transfer function of Figure 2.
Make use of the commands tf, conv, and feedback.
2. Record the step response, frequency response (bode plot) and root locus for this system.

Figure 2
DAE32103: CONTROL SYSTEM

About Students:
Name Matric No. Section:
1. 1. Instructor’s Name:
2. 2.

About Experiment:
Title Venue
Makmal Instrumentasi &
Lab 2: Feedback Control Systems Kawalan (MIK)
Date

FOR INSTRUCTORS ONLY


Domain Item Subtotal Total
C Questions /20 /20
Lab Activity /40
P Demonstration (Instructor’s Verification) /20 /80
Observations /20
TOTAL

Grading Rubric for Practical Skill


Criteria 5 4 3 2 1
Lab activity Varies, depending on questions assigned

Observations Varies, depending on observations assigned


• Uses tools with some
• Uses tools with a high • Uses tools with limited
competence.
degree of competence. competence.
• Moderate explanation of the
Demonstration • Detailed & accurate • Very brief explanation of the
result with minor
explanation of the result. result which shows lack of
(video) misunderstanding.
• Completed all tasks understanding.
• Most tasks completed
successfully within the • Many pending tasks left at the
successfully within the given
given time. end of the session.
time.

TOTAL MARK Instructor’s Comment Submission Stamp

/100
Control System (DAE32103) 2
Lab 2: Feedback Control Systems

Questions

Questions assigned individually in AUTHOR. Please answer individually within the specified
duration.

Lab Activity

Lab Activity 1

1. Write the command(s) that represent equation in step 1(i).

(3 marks)

2. Observe and express your output into time domain equation.

(1 marks)

3. Write the command(s) that represent equation in step 1(ii).

(3 marks)

4. Observe and express your output into time domain equation.

(1 marks)
Control System (DAE32103) 3
Lab 2: Feedback Control Systems

5. Write the command(s) that represent equation in step 2(i).

(3 marks)

6. Observe and express your output into frequency domain equation.

(1 marks)

7. Write the command(s) that represent equation in step 2(ii).

(3 marks)

8. Observe and express your output into frequency domain equation.

(1 marks)
Control System (DAE32103) 4
Lab 2: Feedback Control Systems

Lab Activity 2

9. Write the command(s) to plot root locus which represent the system in Figure 1.

10. Attach the graphs for step response and root locus.
(10 marks)

Lab Activity 3

11. Write the command(s) to represent closed-loop transfer function of Figure 2, as well as the
step response, frequency response, and root locus for the system.

12. Attach the graphs for step response, frequency response and root locus.
(14 marks)

Demonstration

Verify your completed lab activity to your respective instructor.

(20 marks)

Verified by:
Control System (DAE32103) 5
Lab 2: Feedback Control Systems

Observations

Lab Activity 2

1. Referring to the step response results for step input, discuss which gain (K) value shows stable
system and which gain (K) value shows unstable system.
(5 Marks)

2. Based on the root locus plot, determine the poles of the system for K=1, K=2 and K=10. Discuss
the significance of root locus plot and how it can be interpreted to determine the stability of the
system shown in Figure 1.
(8 Marks)
Control System (DAE32103) 6
Lab 2: Feedback Control Systems

3. Determine the steady-state error of this system due to a ramp input.


(2 Marks)

Lab Activity 3

4. Discuss the stability of the system in Figure 2 based on the step response, frequency response
and root locus plot.
(5 marks)

You might also like