0% found this document useful (0 votes)
61 views17 pages

Lab 1 Plt341

This document provides instructions for a laboratory module on modeling and identification in discrete systems, including using MATLAB to obtain digital transfer functions from analog transfer functions with different sampling methods, and simulating digital control systems using Simulink blocks. Students are given problems to model systems with sinusoidal and step inputs, and obtain and analyze responses to verify sampling rates.

Uploaded by

derbew
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views17 pages

Lab 1 Plt341

This document provides instructions for a laboratory module on modeling and identification in discrete systems, including using MATLAB to obtain digital transfer functions from analog transfer functions with different sampling methods, and simulating digital control systems using Simulink blocks. Students are given problems to model systems with sinusoidal and step inputs, and obtain and analyze responses to verify sampling rates.

Uploaded by

derbew
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

PLT341 DIGITAL CONTROL SYSTEMS Laboratory Module

LABORATORY MODULE

PLT 341 / 3
DIGITAL CONTROL SYSTEMS

EXPERIMENT 1
Modeling and Identification in Discrete System

LECTURER : Dr. Mohd Saifizi Bin Saidon

PLV : En. Sofi Bin Yahya

AST. ENGINEER : En. Mohd Norekhsan

Disigned by: Dr Mohd Saifizi Saidon and Edited by: Mr. Sofi Bin Yahya @TM
PLT341 DIGITAL CONTROL SYSTEMS Laboratory Module

Lab 1: Modelling & Identification in Discrete System

1.0 Introduction
Mathematical models are needed for the analysis and design of digital
control systems.The configuration includes a digital-to-analogconverter
(DAC), an analog subsystem, and an analog-to-digital converter
(ADC).The transfer function for the ADC, analog subsystem, and DAC
combination can be easily obtained using MATLAB.

2.0 Lab Practise

MATLAB Coding
MATLAB a powerful package with numerous useful commands. For the
student’s convenience, this manual list some MATLAB commands after
covering the relevant lab problem.
MATLAB typically handles coefficients as vectors with the coefficients
listed in descending order. The function ( ) with numerator 5( + 13) and
denominator + 0.1 + 0.4z is represented as the numerator polynomial

>>num= 5*[1,3]

and the denominator polynomial

>> den= [1, 0.1, 0.4, 0]

Multiplication of polynomials is equivalent to the convolution of their


vectors of
coefficients and is performed using the command

>>denp= conv(den1, den2)

where denp is the product of den1 and den2.


The partial fraction coefficients are obtained using the command

>>[r, p, k]= residue (num, den)

where p represents the poles, r their residues, and k the coefficients of the
polynomial resulting from dividing the numerator by the denominator. If
the highest power in the numerator is smaller than the highest power in
the denominator, k is zero. This is the usual case encountered in digital
control problems.
MATLAB allows the user to sample a function and z-transform it with the

2
PLT341 DIGITAL CONTROL SYSTEMS Laboratory Module

commands
>> g= tf(num,den)
>>gd=c2d(g, 0.1, ‘imp’)

Other useful MATLAB commands are available with the symbolic


manipulation toolbox.
>>ztrans z-transform
>>iztrans inverse z-transform

To use these commands, we must first define symbolic variables such as z,


g, and k with the command
>>syms z g k

The MATLAB command to obtain a digital transfer function from an


analog transfer function is
>> g= tf(num, den)
>>gd=c2d(g, o.1, ’method’)

where num is a vector containing the numerator coefficients of the


analog transfer function in descending order, and den is a similarly
defined vector of denominator coefficients. For example, the numerator
polynomial (2 + 4 + 3) is entered as

>>num= [2, 4, 3]

The term “method” specifies the method used to obtain the digital
transfer function. For a system with a zero-order hold and sampler (DAC
and ADC)
>>gd= c2d(g, 0.1, ‘zoh’)

For a first order hold, we use

>>gd= c2d(g, 0.1, ‘foh’)

Other options of Matlab commands are available but are not relevant to
be material presented in this lab manual.
For a system with a time delay, the discrete transfer function can be
obtained using the commands

>>gdelay= tf(num, den, ‘inputdelay’, Td) % Delay=Td


>>gdelay= c2d(gdelay, 0.1, ‘method’)

3
PLT341 DIGITAL CONTROL SYSTEMS Laboratory Module

MATLAB SIMULINK
Simulink is a MATLAB toolbox that provides a graphical language for
simulating dynamic systems. The vocabulary of the language is a set of
block operations that the user can combine to create a dynamic system.
The block operations include continuous and discrete-time, linear and
nonlinear, as well as user-defined blocks containing MATLAB functions.
Additional blocks called sources provide a wide variety of inputs. Sink
blocks provide a means of recording the system response, and the
response can then be sent to MATLAB for processing or plotting.
This section provides a brief introduction to Simulink and its simulation of
discrete-time systems that we hope will motivate the reader to experiment
with this powerful simulation tool. In our view, this is the only way to
become proficient in the use of Simulink. To start Simulink, start MATLAB
then type
>>Simulink

To model a discrete-time system, we select Discrete in the Simulink Library


Browser and drag a Discrete Transfer Function block to our model window
(see Figure 1). The numerator and denominator of the transfer function
are set by clicking on the block, and they are entered as MATLAB vectors,
as shown in Figure 2. The sampling period can also be selected in the
same window, and we select a value of 0.05 s. Starting with the Source-
Sink model, we can select the line joining the source to the sink and then
click on Delete to eliminate it. Then we can join the three blocks using the
Control button as before and save the new model.

Figure 1: Simulation diagram for a step input and scope.

4
PLT341 DIGITAL CONTROL SYSTEMS Laboratory Module

Figure 2: Simulation diagram for a step input, discrete transfer function,


and scope.

Figure 3: Parameters of the discrete transfer function.

Running the simulation gives the results in Figure 4. The simulation duration
is selected in the model window next to the run icon. The scale of the plot
is selected by right-clicking on the scope plot.

Now discuss simulating an analog system with digital control. The analog
transfer function is obtained by clicking on Continuous in the Simulink
Library Browser and then dragging the block to the model window.
Although it is not required to implement the zero-order hold, the zero-order

5
PLT341 DIGITAL CONTROL SYSTEMS Laboratory Module

hold block is available under Discrete, but MATLAB does not have a
sampler. The block does not change the simulation results. However, the
block allows the user to obtain a plot of the input to the analog system.

Figure 4: Step response of a discrete transfer function.

The input to any discrete block is sampled automatically at the sampling


rate of the discrete block, and the sampling rate can also be chosen for
sources and sinks. Figure 5 shows the simulation diagram for the digital
control system with two scopes. The parameters of the scope are selected
by clicking on the parameter icon, which is located next to the printer
(second from the left in Figure 4).

6
PLT341 DIGITAL CONTROL SYSTEMS Laboratory Module

Figure 5: Simulation diagram for a step input, zero-order hold, analog


transfer function, and two scopes.

Set the sampling period for the first scope to 0.05 s and select decimation
and a value of 1 for the second scope to obtain the analog output on the
second scope, as shown in Figure 6. The sampled and analog outputs are
shown in Figures 7 and Figure 8, respectively.

7
PLT341 DIGITAL CONTROL SYSTEMS Laboratory Module

Figure 6: Selecting the scope parameters.

Figure 7: Step response of analog system with digital control.

8
PLT341 DIGITAL CONTROL SYSTEMS Laboratory Module

Figure 8: Step response of analog system with zero-order hold, without


output sampling.

3.0 Lab Exercise

Problem 1:
Find the steady-state response of the systems resulting from the sinusoidal
input ( ) = 0.5 sin(0.4 ) using simulink.

(a) ( )=
.
(b) ( )=
. .

Problem 2:
For the analog system with a sampling period of 0.05 s

10( + 2)
( )=
( + 5)

9
PLT341 DIGITAL CONTROL SYSTEMS Laboratory Module

(a) Obtain the transfer function for the system with sampled input and
output.
(b) Obtain the transfer function for the system with DAC and ADC.
(c) Obtain the unit step response of the system with sampled output and
analog input.
(d) Obtain the poles of the systems in (a) and (b), and the output of (c),
and comment on the differences between them.

Problem 3:
For the unity feedback system shown in above, given the
analogsubsystem.

The system is digitally controlled with a sampling period of 0.02 s.


Thecontroller transfer function was selected as

0.35
( )=
−1

(a) Obtain the transfer function for the analog subsystem with DAC
and ADC.

(b) Obtain the step response of the open-loop analog system and the
closed-loop digital control system and comment on the effect of
the controller on the time response.

(c) Obtain the frequency response of the digital control system and
verify that 0.02 s is an acceptable choice of sampling period.
Explain briefly why the sampling period is chosen based on the
closed-loop rather than the open-loop dynamics.

10
PLT341 DIGITAL CONTROL SYSTEMS Laboratory Module

Problem 4:
For an internal combustion engine, the transfer function with injected fuel
flow rate as input and fuel flow rate into the cylinder as output is given by

+1
( )=
+1

Assume that for the operational conditions of interest, the time constant τ
is approximately 1.2 s, whereas the parameter can vary in the range 0.4
to 0.6. The digital cascade controller

0.02
( )=
−1

was selected to improve the time response of the system with unity
feedback. Simulate the digital control system with = 0.4, 0.5, 0.6, and
discuss the behaviour of the controller in each case.

11
PLT341 DIGITAL CONTROL SYSTEMS Laboratory Module

12
PLT341 DIGITAL CONTROL SYSTEMS Laboratory Assessment

EXPERIMENTAL RESULTS
LABORATORY ASSESSMENT AND RESULT ANALYSIS

Name:________________________________________ Matrix Num:______________

Group:__________ Date:________________ Program:_______________________

Lab 1: Modelling & Identification in Discrete System

Problem 1:

a) Give the steady-state-response.

______________________________

Show the plot output results to instructors for approval. Approval:___________

b) Give the steady-state-response.

______________________________

Show the plot output results to instructors for approval. Approval:___________

Problem 2:

a) Matlab command and Transfer function

b) Matlab command and Transfer Function with DAC and ADC

c) Matlab command analog step response

Show the plot output results to instructors for approval. Approval:___________

13
PLT341 DIGITAL CONTROL SYSTEMS Laboratory Assessment

d) Pole of the system


i. _______________
ii. _______________
iii. _______________
iv. Comment:__________________________________________________
__________________________________________________________
__________________________________________________________
__________________________________________________________
__________________________________________________________

Problem 3:

a) Transfer function for analog sub-system

Show the plot output results to instructors for approval. Approval:___________

b) Comment:________________________________________________________
________________________________________________________________
________________________________________________________________
________________________________________________________________
________________________________________________________________
________________________________________________________________

Show the plot output results to instructors for approval. Approval:___________

c) Explain
briefly:___________________________________________________________
________________________________________________________________
________________________________________________________________
________________________________________________________________
________________________________________________________________
________________________________________________________________
________________________________________________________________

Show the plot output results to instructors for approval. Approval:___________

Problem 4:

a) Write the coding of Matlab command.

14
PLT341 DIGITAL CONTROL SYSTEMS Laboratory Assessment

b) Draw the simulation diagram using SIMULINK.

c) Show the step response to instructor for approval the results is obtained.
Approve:____________

DISCUSSION (5 Marks)

15
PLT341 DIGITAL CONTROL SYSTEMS Laboratory Assessment

CONCLUSION (5 Marks)

16
[DIGITAL CONTROL SYSTEMS - SEMESTER 2 2017/2018 ACADEMIC SESSION : LABORATORY RUBRICS (TOTAL
PLT 341 LAB MARKS PLO2/PLO4/PL05)

Excellent Very Good Good Fair Poor


Contents Marks
5 4 3 2 1
Very good performance in Satisfactory performance in
Excellent performance in Unsatisfactory performance
Fundamental fundamental concepts of fundamental concepts of
fundamental concepts of in fundamental concepts of
concepts Digital Control Systems Digital Control Systems No efforts at all
Digital Control Systems Digital Control Systems
(Discrete System) (Discrete System)
(Discrete System) application (Discrete System) application
application application
Unable to analyze and
Able to analyze and design the Able to analyze and Able to analyze and design Able to analyze and design
design the
Programming programming and simulation design programming and the programming and the programming and
programming and
/ Simulation without error and high simulation without error simulation with minor error simulation with major error
simulation. Fails to
Constructing neatness. and low neatness. and low neatness. and low neatness.
meet therequirement.
Very lower-level
Very higher-order thinking Higher-order thinking Medium-level thinking ability Lower- level thinking ability
Problem thinking ability and fully
ability and independently in ability and with guidance and with minor guidance in and with major guidance in
Solving guidance in
troubleshooting. in troubleshooting. troubleshooting. troubleshooting.
troubleshooting.
Demonstrated proficiency Demonstrated reasonable Demonstrated some Did not demonstrate
being able to approve in understanding able to similarity with the result Did not demonstrate but able and not perform the
Demo thehighest degree of approve in thedegree of function. There is some to complete the robot necessary result.
confidence in the computed confidence in the question about the accuracy construction results. The computed results
results. computed results. of the computed results. contain obvious errors.
Able to complete the
Able to complete the results Unable to complete the
Able to complete the results results with some minor Able to complete the results
and with some errors and results and with major
Result without any error and testing and troubleshoot the and with major errors and
troubleshooting testing not errors and failed
successful. errors and testing testing.
successful. testing.
successfully.
Excellent explanation in Very good explanation in Satisfactory explanation in Unsatisfactory in discussion
discussion of fundamental discussion of fundamental discussion of fundamental of fundamental concepts of
concepts of modeling and concepts of modeling and concepts of modeling and modeling and identification in Not related it all
Discussion
identification in discrete identification in discrete identification in discrete discrete system application discussion.
system application in system application and system application and and some related in
experimental related with experimental. related in experimental. experimental.
Excellent explanation in Very good explanation in Satisfactory explanation in Unsatisfactory in conclusion
conclusion of fundamental conclusion of fundamental conclusion of fundamental of fundamental concepts of
concepts of modeling and concepts of modeling and concepts of modeling and modeling and identification in Not related it all
Conclusion
identification in discrete identification in discrete identification in discrete discrete system application conclusion.
system application in system application and system application and and some related in
experimental related with experimental. related in experimental. experimental.

PANEL SIGNATURE : ∕ 35

17

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy