Académique Documents
Professionnel Documents
Culture Documents
System
Muhammad Arshad
Lecturer EED NEDUET
Sessional Criteria :
• Assignments 10 marks
• Viva 10 marks
(a) Automobile
steering control
system.
(b) The driver uses
the difference
between the actual
and the desired
direction of travel
to generate a
controlled adjustment
of the steering wheel.
(c) Typical direction-
of-travel response.
OPEN-LOOP AND CLOSED-LOOP CONTROL SYSTEMS:
An open-loop control system is one in which the control action is
independent of the output.
( a ) automatic washing machine,
( b ) automatic toaster, ( c ) voltmeter ,(d) Traffic lights control
Disadvantages:
Construction: They are relatively more complex in construction and
hence it adds up to the cost making it costlier than open loop system.
Since it consists of feedback loop, it may create oscillatory response of the
system and it also reduces the overall gain of the system.
Stability: It is less stable than open loop system but this disadvantage can
be striked off since we can make the sensitivity of the system very small so
as to make the system as stable as possible.
Comparison of open loop and close loop
system
• 1. An open loop system has the ability 1. A closed loop system has got the ability
to perform accurately, if its calibration to perform accurately because of the
is good . If the calibration is not perfect feed back.
its performance will go down.
2. It is easier to build.
3. In general it is more stable as the
2. It is difficult to build.
feedback is absent. 3. Less Stable Comparatively.
4. If non- linearity’s a re present; the 4. Even under the presence of
system operation is not good. non-linearity’s th e system o p erates
5. Feed back is absent. better than open loop system.
Example:
5. Feed back is present.
(i) Traffic Control System.
Example:
(ii) Control of furnace for coal heating.
(i) Pressure Control System.
(iii) An Electric Washing Machine
(ii) Speed Control System.
(iii) Robot Control System.
(iv) Temperature Control System
Control System Design Cycle
1st Lecture’s
Outline
Introduction to MATLAB
Basic Concepts in
MATLAB
Starting with MATLAB ®
Learn about command window
Learn about workspace window
Learn about command history
Learn about toolbox
Information about any function or toolbox
is available via the command-line help
function (or from the Help Browser
launched from the Help menu):
>> help
Basic Concepts in
MATLAB
Write following commands on main
window
>>8 + 3i + 5
>>pi
>> sqrt(-4)
>> sin(0)
>> sin(90)
>> sin(90*pi/180)
>> 2^2
>> power(3,2)
Creating Arrays
• The basic data structure in MATLAB is the
two-dimensional array. Array variables can
be scalars, vectors, or matrices:
>> n = 1
>> a = [1 2 3 4]
>> A = [1 2 3 4; 5 6 7 8]
• In MATLAB, the case of a variable matters;
e.g., the arrays a and A are different
variables.
• To recall the last command executed, press
the up-arrow key (↑).
Creating Arrays
• An empty array is considered a 0 × 0
matrix:
a = []
• The following operators and functions can
be used to automatically create basic
Vectors with equally
structured arrays: spaced elements can be
a = 1:5 constructed using the
a = 1:2:5 colon notation(: )
a = 10:-2:1 x = starting value :
increment
a = ones(1,5) % five time one : maximum
valuevector
a = ones(5,1) %columen
Default increment of 1 is
a = zeros(1,5)
used if the increment is
Creating Arrays
• A random permutation of the integers 1 to
n can be generates using the randperm(n)
function:
>>randperm(5)
• To create a 3 × 3 identity matrix:
>>eye(3)
• The variable ans is used as a default name
for any expression that is not assigned to
a variable.
Selecting Arrays
Selecting Arrays
In MATLAB, index arrays inside of
parenthesis are used to select elements of
an array. The colon operator is used to
select an entire row• The vector [1 3] is an
or column.
>>A = [1 2 3 4;5 6 7 8] index array, where
>>A(1,2) each element
>>A(:,[1 3]) corresponds to a
column index number
>>A(:,end) of the original matrix
A.
• The keyword end can
be used to indicate
Changing and Deleting Array
Elements
Changing and Deleting Array
Elements
Changing and Deleting Array
Elements
sa
Changing and Deleting Array
Elements
>> A = [1 2 3 4;5 6 7 8]
Manipulating Arrays
Manipulating
Arrays
The following operators and functions can
be used to manipulate arrays:
Manipulating
Arrays
The following operators and functions can
be used to manipulate arrays:
Manipulating
Arrays
Concatenate to Arrays
A = [1 2 3 4;5 6 7 8]
B= [10 20 30 40;50 60 70 80]
>> [A B]
Manipulating
Arrays
A=[1 3 4; 5 7 8]
Add two new elements
[A ([10 20])']
Manipulating
Arrays
as
Algebra
Algebra
Type the following commands on the
screen:
Note that pi display
>>pi output result up to four
>>x=sqrt(2*pi+1) decimal digits
>>3^2-(5+4)/2+6*3 See BODMAS
Use of ans
>>ans^2+sqrt(ans)
>>u=cos(10)
>>v=sin(10)
>>u^2+v^2
>> 1/2+1/3
>> ezplot('x^3-x')
Algebra
• MATLAB has a command called simplify,
which you can sometimes use to express a
formula as simply as possible. For
example,
• Try commands on the trigonometric
expression
• sin(x)*cos(y) + cos(x)*sin(y)
>>simplify(sin(x)*cos(y) + cos(x)*sin(y))
Solving Equations
Solving Equations
• You can solve equations involving
variables with solve or fzero. For example,
to find the solutions of the quadratic
equation x2 - 2x - 4 = 0, type
>> solve(‘x^2 - 2*x - 4 = 0’)
ans =
[ 5^(1/2)+1]
[ 1-5^(1/2)]
• Note that the equation to be solved is
specified as a string; that is, it is
surrounded by single quotes.
• The answer consists of the exact
Graphics
Graphing with ezplot
• The simplest way to graph a function of
one variable is with ezplot, which expects
a string or a symbolic expression
representing the function to be plotted.
• For example, to graph x2 + x + 1 on the
interval -2 to 2 (using the string form of
ezplot), type
>> ezplot(‘x^2 + x + 1’, [-2 2])
• The plot will appear on the screen in a
new window labeled “Figure No. 1”.
Graphing with plot
The command plot works on vectors of
numerical data. The basic syntax is
plot(X, Y) where X and Y are vectors of the
same length. For example,
>> X = [1 2 3];
>> Y = [4 6 5];
>> plot(X, Y)