KEMBAR78
Control Theory II LAB 1 | PDF | Teaching Methods & Materials
0% found this document useful (0 votes)
39 views14 pages

Control Theory II LAB 1

The document provides an overview of the syllabus for a Control Theory II lab. It covers basic MATLAB commands, transfer functions, system characteristics and responses, system interconnections, state space systems, root locus analysis, stability analysis using Nyquist plots, and analysis and design of PID controllers.
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)
39 views14 pages

Control Theory II LAB 1

The document provides an overview of the syllabus for a Control Theory II lab. It covers basic MATLAB commands, transfer functions, system characteristics and responses, system interconnections, state space systems, root locus analysis, stability analysis using Nyquist plots, and analysis and design of PID controllers.
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/ 14

CONTROL THEORY II LAB-Syllabus Overview

Teacher: Bahaaldeen Mohammed


Syllabus contents:
1. Basic MATLAB Commands: 4. System Interconnections:

1.1 Introduction 4.1 Subsystem Connection Types

1.2 Input Data 4.2 Examples

1.3 Math Operations and Functions 4.3 Exercises


5. State Space Systems:
1.4 Graphs and Figures
5.1 State space representation
1.5 Examples
5.2 Examples
1.6 Exercises
5.3 Exercises
2. Transfer Function: 6. Root Locus Analysis:
2.1 Transfer function 6.1 Root Locus method
2.2 Examples 6.2 Examples
2.3 Exercises 6.3 Exercises

3. System Characteristics and Responses: 7. Stability Analysis using Nyquist Plot:


7.1 Nyquist Criterion
3.1 System Characteristics
7.2 Examples
3.2 Responses
7.3 Exercises
3.3 Examples
8.Analysis and Design of PID Controllers:
3.4 Exercises
8.1 P,PD,PI controllers

8.2 Examples

8.3 Exercises
LAB-1: Basic MATLAB Commands
1.1 Introduction
1.2 Input Data
1.3 Math Operations and Functions
Teacher: Bahaaldeen Mohammed 1.4 Graphs and Figures
1.5 Examples
1.6 Exercises
1.1 Introduction
 Matlab is a powerful tool for computation, numerical analysis, and system
design.
 It has a user-friendly environment, a robust computational kernel, and
graphical visualization capabilities.
 Matlab is essential for control system design, optimization, and
implementation.
 Additional toolboxes, such as Simulink, Control Systems Toolbox, Fuzzy Logic
Toolbox, etc., extend Matlab's capabilities.
 This Lab will cover basic Matlab commands for variable manipulation and
plotting.
1.2 Input Data
 Matlab primarily uses matrices as its basic data structure, encompassing
scalar variables and vectors.
 Variable definition follows the format: variable name = value or variable
name = value; (semicolon determines display).
 The % symbol is used to add comments in the code.
 Matrices can be defined using brackets [] with semicolons ; used for new
lines in the matrix.
 Matrices must have the same number of elements in each row; otherwise,
an error is displayed.
 To select specific elements of a matrix, parentheses () are used, specifying
rows and columns.
Continue…
 Use : to select all columns or rows in a matrix.
 For creating arrays of equally spaced numbers, the command is t =
a:step:b or t = linspace(a, b, n) for n equally spaced numbers between a
and b.
 Example: M = [1 5 10, 6 7 8], t1 = 0:2:5, t2 = linspace(0,5,4).
 Example: M(1,2) selects a single element, M(:,2) selects all rows of the 2nd
column, M(1,[2 3]) selects the 1st row and 2nd and 3rd columns.
 The clear command deletes a specific variable or clears all variables in the
workspace.
 The clc command clears the command window without deleting variables.
1.3 Math Operations and Functions
 Functions in Matlab are called by providing input arguments and return output
values.
 The typical function syntax is: [output1, output2, ...] = function_name(input1,
input2, ...).
 Examples of simple Matlab functions include cos(x), sin(x), tan(x), log(x), exp(x),
and sqrt(x), which take numerical input and return a single output.
 More complex functions like ss(a, b, c, d) are used for creating state-space
systems and require four input arguments.
 To call multi-input multi-output functions, use parentheses for input arguments
and brackets for multiple variable assignments.
 Use the command "help function_name" to access information on a function's
syntax, input and output arguments, and general functionality.
 Matlab uses traditional mathematical operators like +, -, *, ^, and /, but it treats
these operators using linear algebra rules.
 To perform element-wise operations, use .* (element-wise multiplication), .^
(element-wise exponentiation), and ./ (element-wise division).
 For example, to square each element in a vector, use the command "t.^2" to
avoid violating linear algebra rules.
Continue…
 Some other useful matrix functions are the following:
1.4 Graphs and Figures
 Matlab provides powerful plotting tools for visualizing data, both continuous
and discrete.
 To plot a function, three basic steps are required: define the range of
values, define the function, and use a plotting command.
 The choice of plotting command depends on the type of data you want to
visualize.
 The most basic are covered in the following table:
Continue…
1.5 Examples
 Example 1.5.1. Plot the function x(t) = cos(t) for 0 < t < 4π.
Solution

t=0:pi/180:4*pi;
x=cos(t);
plot(t,x,'g--')
xlabel('time')
ylabel('cosine')
title('Example')
grid
legend('cosine')
1.5 Examples
 Example 1.5.2. Create a 2 by 2 figure with the functions cos(t), sin(t), et and log(t) for 0 ≤ t < 4π.
Solution

t=0:0.1:4*pi;
subplot(2,2,1)
plot(t,cos(t))
title('cosine')
Grid
%%-----------------
subplot(2,2,2)
plot(t,sin(t))
title('sine')
Grid
%%-----------------
subplot(2,2,3)
plot(t,exp(t))
title('exponential')
Grid
%-------------------
subplot(2,2,4)
plot(t,log(t))
title('log')
grid
1.6 Exercise

Plot the function for λ = 1; 2; 3; 4 and


0 ≤ t < 10 on the same graph.
Thank You!
Q&A

You might also like