SlideShare a Scribd company logo
1 of 39
Download to read offline
1/78
Matlab and Simulink
Matlab and Simulink
for Control
for Control
Automatica I (Laboratorio)
Automatica I (Laboratorio)
2/78
Matlab and Simulink
Matlab and Simulink
CACSD
CACSD
3/78
Matlab and Simulink for Control
Matlab and Simulink for Control
• Matlab introduction
• Simulink introduction
• Control Issues Recall
• Matlab design Example
• Simulink design Example
Part I
Introduction
4 / 78
Introduction What is Matlab and Simulink?
What is Matlab
 High-Performance language for technical computing
 Integrates computation, visualisation and programming
 Matlab = MATrix LABoratory
 Features family of add-on, application-specific toolboxes
5 / 78
Introduction What is Matlab and Simulink?
What are Matlab components?
 Development Environment
 The Matlab Mathematical Function Library
 The Matlab language
 Graphics
 The Matlab Application Program Interface
6 / 78
Introduction What is Matlab and Simulink?
What is Simulink?
 Software Package for modelling, simulating and analysing dynamic
systems
 Supports linear  Non-linear systems
 Supports continuous or discrete time systems
 Supports multirate systems
 Allows you to model real-life situations
 Allows for a top-down and bottom-up approach
7 / 78
Introduction What is Matlab and Simulink?
How Simulink Works?
1. Create a block diagram (model)
2. Simulate the system represented by a block diagram
8 / 78
Introduction MatlabSimulink – Getting Started
Matlab Environment
9 / 78
Introduction MatlabSimulink – Getting Started
The Matlab Language
Dürer’s Matrix
1 A=[16 3 2 13; 5 10 11 8; 9 6 7 12;4 15 14 1 ] ;
2 sum(A) %ans = 34 34 34 34
3 sum(A’ ) %ans = 34 34 34 34
4 sum( diag (A)) %ans = 34
Operators
1 100: −7:50 % 100 93 86 79 72 65 58 51
2 sum(A( 1 : 4 , 4 ) ) % ans = 34
10 / 78
Introduction MatlabSimulink – Getting Started
The Matlab API
 You can use C or FORTRAN
 Pipes on UNIX, COM on Windows
 You can call Matlab routines from C/FORTRAN programs and vice
versa
 You can call Java from Matlab
11 / 78
Introduction MatlabSimulink – Getting Started
Simulink Environment
12 / 78
Introduction MatlabSimulink – Getting Started
Starting Simulink
Just type in Matlab
1 s i m u l i n k
13 / 78
Part II
Matlab – Background
14 / 78
Matlab – Background Transfer Functions and Laplace Transforms
Laplace Transform
Definition
The Laplace Transform is an integral transform perhaps second only to the
Fourier transform in its utility in solving physical problems. The Laplace
transform is defined by:
L [f (t)] (s) ≡
 ∞
0
f (t)e−st
dt
Source: [1, Abramowitz and Stegun 1972]
15 / 78
Matlab – Background Transfer Functions and Laplace Transforms
Laplace Transform
Several Laplace Transforms and properties
f L [f (t)] (s) range
1 1
s s  0
t 1
s2 s  0
tn n!
sn+1 n ∈ Z  0
eat 1
s−a s  a
Lt

f (n)
(t)

(s) = sn
Lt [f (t)] −
−sn−1
f (0) − sn−2
f 
(0) − . . . − f (n−1)
(0) (1)
This property can be used to transform differential equations into algebraic
ones. This is called Heaviside calculus
16 / 78
Matlab – Background Transfer Functions and Laplace Transforms
Heaviside Calculus Example
Let us apply the Laplace transform to the following equation:
f 
(t) + a1f 
(t) + a0f (t) = 0
which should give us:

s2
Lt [f (t)] (s) − sf (0) − f 
(0)

+
+a1 {sLt [f (t)] (s) − f (0)} +
+a0Lt [f (t)] (s) = 0
which can be rearranged to:
Lt [f (t)] (s) =
sf (0) + f (0) + a1f (0)
s2 + a1s + a0
17 / 78
Matlab – Background Transfer Functions and Laplace Transforms
Transfer Functions
 For Matlab modelling we need Transfer Functions
 To find the Transfer Function of a given system we need to take the
Laplace transform of the system modelling equations (2)  (3)
System modelling equations
F = mv̇ + bv (2)
y = v (3)
Laplace Transform:
F(s) = msV (s) + bV (s)
Y (s) = V (s)
18 / 78
Matlab – Background Transfer Functions and Laplace Transforms
Transfer Functions – cntd.
 Assuming that our output is velocity we can substitute it from
equation (5)
Transfer Function
Laplace Transform:
F(s) = msV (s) + bV (s) (4)
Y (s) = V (s) (5)
Transfer Function:
Y (s)
F(s)
=
1
ms + b
(6)
19 / 78
Matlab – Background Matlab Functions
Matlab Functions – Transfer Function I
What is tf?
Specifies a SISO transfer function for model h(s) = n(s)/d(s)
1 h = t f (num, den )
What are num  den?
row vectors listing the coefficients of the polynomials n(s) and d(s)
ordered in descending powers of s
Source: Matlab Help
20 / 78
Matlab – Background Matlab Functions
Matlab Functions – Transfer Function II
tf Example
T(s) = 2s−3
s+1 ≡ h=tf([2 -3], [1 1])
T(s) = 2s+1
4s2+s+1
≡ h=tf([2 1], [4 1 1])
21 / 78
Matlab – Background Matlab Functions
Matlab Functions – Feedback I
Matlab code
1 sys = feedback ( forward , backward ) ;
Source: [2, Angermann et al. 2004]
22 / 78
Matlab – Background Matlab Functions
Matlab Functions – Feedback II
 obtains a closed-loop transfer function directly from the open-loop
transfer function
 no need to compute by hand
Example
Forward =
1
sTi
(7)
Backward = V (8)
T(s) =
C(s)
R(s)
=
1
sTi
1 + V 1
sTi
≡
≡ feedback(tf(1,[Ti 0]), tf(V, 1)) (9)
23 / 78
Matlab – Background Matlab Functions
Matlab Functions – Step Response
system=t f ( [ 2 1 ] , [ 4 1 1 ] ) ;
t = 0 : 0 . 1 : 5 0 ;
step (100∗ system )
a x i s ( [ 0 30 60 180])
24 / 78
Matlab – Background Steady-State Error
Steady-State Error – Definition
Figure 1: Unity Feedback System
Steady-State Error
The difference between the input and output of a system in the limit as
time goes to infinity
25 / 78
Matlab – Background Steady-State Error
Steady-State Error
Steady-State Error
e(∞) = lim
s→0
sR(s)
1 + G(s)
(10)
e(∞) = lim
s→0
sR(s) |1 − T(s)| (11)
26 / 78
Matlab – Background Proportional, Integral and Derivative Controllers
Feedback controller – How does it work I?
Figure 2: System controller
 e – represents the tracking error
 e – difference between desired input (R) an actual output (Y)
 e – is sent to controller which computes:
 derivative of e
 integral of e
 u – controller output is equal to...
27 / 78
Matlab – Background Proportional, Integral and Derivative Controllers
Feedback controller – How does it work II?
 u – controller output is equal to:
 Kp (proportional gain) times the magnitude of the error +
 Ki (integral gain) times the integral of the error +
 Kd (derivative gain) times the derivative of the error
Controller’s Output
u = Kpe + Ki

edt + Kd
de
dt
Controller’s Transfer Function
Kp +
Ki
s
+ Kd s =
Kd s2 + Kps + Ki
s
28 / 78
Matlab – Background Proportional, Integral and Derivative Controllers
Characteristics of PID Controllers
 Proportional Controller Kp
 reduces the rise time
 reduces but never eliminates steady-state error
 Integral Controller Ki
 eliminates steady-state error
 worsens transient response
 Derivative Controller Kd
 increases the stability of the system
 reduces overshoot
 improves transient response
29 / 78
Matlab – Background Proportional, Integral and Derivative Controllers
Example Problem
Figure 3: Mass spring and damper problem
Modelling Equation
mẍ + bẋ + kx = F (12)
30 / 78
Matlab – Background Proportional, Integral and Derivative Controllers
Example Problem
Laplace  Transfer Functions
mẍ + bẋ + kx = F
ms2
X(s) + bsX(s) + kX(s) = F(s) (13)
X(s)
F(s)
=
1
ms2 + bs + k
(14)
31 / 78
Matlab – Background Proportional, Integral and Derivative Controllers
Matlab System Response
Assumptions
Let: m = 1[kg], b = 10[Ns/m], k = 20[N/m]
Matlab code
1 %{ Set up v a r i a b l e s%}
2 m=1; b=10; k=20;
3 %{ C a l c u l a t e response%}
4 num=1;
5 den=[m, b , k ] ;
6 plant=t f (num, den ) ;
7 step ( plant )
32 / 78
Matlab – Background Proportional, Integral and Derivative Controllers
Matlab System Response
Figure 4: Amplitude ⇔ Displacement
33 / 78
Matlab – Background Proportional, Integral and Derivative Controllers
Problems
 The steady-state error is equal to 0.95 – equation (11)
 The rise time is about 1 second
 The settling time is about 1.5 seconds
 The PID controller should influence (reduce) all those parameters
34 / 78
Matlab – Background Proportional, Integral and Derivative Controllers
Controllers’ Characteristics
Type Rise time Overshoot Settling time S-S Error
Kp decrease increase small change decrease
Ki decrease increase increase eliminate
Kd small change decrease decrease small change
These correlations may not be exactly accurate, because Kp, Ki , and Kd
are dependent on each other. In fact, changing one of these variables can
change the effect of the other two.
35 / 78
Matlab – Background Proportional, Integral and Derivative Controllers
Proportional Controller
P Transfer Function
X(s)
F(s)
=
Kp
s2 + bs + (k + Kp)
Matlab code
1 %{ Set up p r o p o r t i o n a l gain%}
2 Kp=300;
3 %{ C a l c u l a t e c o n t r o l l e r%}
4 s y s c t l=feedback (Kp∗ plant , 1 ) ;
5 %{ Plot r e s u l t s%}
6 t =0:0.01:2;
7 step ( s y s c t l , t )
36 / 78
Matlab – Background Proportional, Integral and Derivative Controllers
Proportional Controller – Plot
Figure 5: Improved rise time  steady-state error
37 / 78
Matlab – Background Proportional, Integral and Derivative Controllers
Proportional Derivative Controller
PD Transfer Function
X(s)
F(s)
=
Kd s + Kp
s2 + (b + Kd )s + (k + Kp)
Matlab code
1 %{ Set up p r o p o r t i o n a l and d e r i v a t i v e gain%}
2 Kp=300; Kd=10;
3 %{ C a l c u l a t e c o n t r o l l e r%}
4 contr=t f ( [ Kd , Kp ] , 1 ) ;
5 s y s c t l=feedback ( contr ∗ plant , 1 ) ;
6 %{ Plot r e s u l t s%}
7 t =0:0.01:2;
8 step ( s y s c t l , t )
38 / 78
Matlab – Background Proportional, Integral and Derivative Controllers
Proportional Derivative Controller – Plot
Figure 6: Reduced over-shoot and settling time
39 / 78
Matlab – Background Proportional, Integral and Derivative Controllers
Proportional Integral Controller
PI Transfer Function
X(s)
F(s)
=
Kps + Ki
s3 + bs2 + (k + Kp)s + Ki
Matlab code
1 %{ Set up p r o p o r t i o n a l and i n t e g r a l gain%}
2 Kp=30; Ki =70;
3 %{ C a l c u l a t e c o n t r o l l e r%}
4 contr=t f ( [ Kp , Ki ] , [ 1 , 0 ] ) ;
5 s y s c t l=feedback ( contr ∗ plant , 1 ) ;
6 %{ Plot r e s u l t s%}
7 t =0:0.01:2;
8 step ( s y s c t l , t )
40 / 78
Matlab – Background Proportional, Integral and Derivative Controllers
Proportional Integral Controller – Plot
Figure 7: Eliminated steady-state error, decreased over-shoot
41 / 78
Matlab – Background Proportional, Integral and Derivative Controllers
Proportional Integral Derivative Controller
PID Transfer Function
X(s)
F(s)
=
Kd s2 + Kps + Ki
s3 + (b + Kd )s2 + (k + Kp)s + Ki
Matlab code
1 %{ Set up p r o p o r t i o n a l and i n t e g r a l gain%}
2 Kp=350; Ki =300; Kd=50;
3 %{ C a l c u l a t e c o n t r o l l e r%}
4 contr=t f ( [ Kd , Kp , Ki ] , [ 1 , 0 ] ) ;
5 s y s c t l=feedback ( contr ∗ plant , 1 ) ;
6 %{ Plot r e s u l t s%}
7 t =0:0.01:2;
8 step ( s y s c t l , t )
42 / 78
Matlab – Background Proportional, Integral and Derivative Controllers
Proportional Integral Derivative Controller – Plot
Figure 8: Eliminated steady-state error, decreased over-shoot
43 / 78
Part III
Matlab – Cruise Control System
44 / 78
Matlab – Cruise Control System Design Criteria
How does Cruise Control for Poor work?
Figure 9: Forces taking part in car’s movement
Based on Carnegie Mellon University Library Control Tutorials for Matlab and Simulink
45 / 78
Matlab – Cruise Control System Design Criteria
Building the Model
Using Newton’s law we derive
F = mv̇ + bv (15)
y = v (16)
Where: m = 1200[kg], b = 50[Ns
m ], F = 500[N]
46 / 78
Matlab – Cruise Control System Design Criteria
Design Criteria
 For the given data Vmax = 10[m/s] = 36[km/h]
 The car should accelerate to Vmax within 6[s]
 10% tolerance on the initial velocity
 2% of a steady-state error
47 / 78
Matlab – Cruise Control System Matlab Representation
Transfer Function
System Equations:
F = mv̇ + bv
y = v
Laplace Transform:
F(s) = msV (s) + bV (s) (17)
Y (s) = V (s) (18)
Transfer Function:
Y (s)
F(s)
=
1
ms + b
(19)
48 / 78
Matlab – Cruise Control System Matlab Representation
Matlab Representation
 Now in Matlab we need to type
Matlab code
1 m=1200;
2 b=50;
3 num=[1];
4 den=[m, b ] ;
5 c r u i s e=t f (num, den ) ;
6 step = (500∗ c r u i s e ) ;
49 / 78
Matlab – Cruise Control System Matlab Representation
Results
Figure 10: Car velocity diagram – mind the design criteria
50 / 78
Matlab – Cruise Control System Matlab Representation
Design criteria revisited
 Our model needs over 100[s] to reach the steady-state
 The design criteria mentioned 5 seconds
51 / 78
Matlab – Cruise Control System PID Controller
Feedback controller
 To adjust the car speed within the limits of specification
 We need the feedback controller
Figure 11: System controller
52 / 78
Matlab – Cruise Control System PID Controller
Decreasing the rise time
Proportional Controller
Y (s)
R(s)
=
Kp
ms + (b + Kp)
(20)
Matlab code
1 Kp=100; m=1200; b=50;
2 num=[1]; den=[m, b ] ;
3 c r u i s e=t f (num, den ) ;
4 s y s c t l=feedback (Kp∗ c r u i s e , 1 ) ;
5 t =0:0.1:20;
6 step (10∗ s y s c l , t )
7 axis ( [ 0 20 0 10])
53 / 78
Matlab – Cruise Control System PID Controller
Under- and Overcontrol
Figure 12: Kp = 100 Figure 13: Kp = 10000
54 / 78
Matlab – Cruise Control System PID Controller
Making Rise Time Reasonable
Proportional Integral Controller
Y (s)
R(s)
=
Kps + Ki
ms2 + (b + Kp)s + Ki
(21)
Matlab code
1 Kp=800; Ki =40; m=1200; b=50;
2 num=[1]; den=[m, b ] ;
3 c r u i s e=t f (num, den ) ;
4 contr=t f ( [ Kp Ki ] , [ 1 0 ] )
5 s y s c t l=feedback ( contr ∗ c r u i s e , 1 ) ;
6 t =0:0.1:20;
7 step (10∗ s y s c l , t )
8 axis ( [ 0 20 0 10])
55 / 78
Matlab – Cruise Control System PID Controller
Results
Figure 14: Car velocity diagram meeting the design criteria
56 / 78
Part IV
Simulink – Cruise Control System
57 / 78
Simulink – Cruise Control System Building the Model
How does Cruise Control for Poor work?
Figure 15: Forces taking part in car’s movement
Based on Carnegie Mellon University Library Control Tutorials for Matlab and Simulink
58 / 78
Simulink – Cruise Control System Building the Model
Physical Description
 Summing up all the forces acting on the mass
Forces acting on the mass
F = m
dv
dt
+ bv (22)
Where: m=1200[kg], b=50[Nsec
m ], F=500[N]
59 / 78
Simulink – Cruise Control System Building the Model
Physical Description – cntd.
 Integrating the acceleration to obtain the velocity
Integral of acceleration
a =
dv
dt
≡

dv
dt
= v (23)
60 / 78
Simulink – Cruise Control System Building the Model
Building the Model in Simulink
Figure 16: Integrator block from Continuous block library
61 / 78
Simulink – Cruise Control System Building the Model
Building the Model in Simulink
 Obtaining acceleration
Acceleration
a =
dv
dt
=
F − bv
m
(24)
62 / 78
Simulink – Cruise Control System Building the Model
Building the Model in Simulink
Figure 17: Gain block from Math operators block library
63 / 78
Simulink – Cruise Control System Building the Model
Elements used in Simulink Model
 Friction (Gain block)
 Subtract (from Math Operators)
 Input (Step block from Sources)
 Output (Scope from Sinks)
64 / 78
Simulink – Cruise Control System Building the Model
Complete Model
65 / 78
Simulink – Cruise Control System Building the Model
Mapping Physical Equation to Simulink Model
66 / 78
Simulink – Cruise Control System Simulating the Model
Setting up the Variables
 Now it is time to use our input values in Simulink...
 F=500[N]
 In Step block set: Step time = 0 and Final value = 500
 ...and adjust simulation parameters...
 Simulation → Configuration Parameters...
 Stop time = 120
...and set up variables in Matlab
1 m=1200;
2 b=50;
67 / 78
Simulink – Cruise Control System Simulating the Model
Running Simulation
 Choose Simulation→Start
 Double-click on the Scope block...
68 / 78
Simulink – Cruise Control System Simulating the Model
Extracting Model into Matlab
 Replace the Step and Scope Blocks with In and Out Connection
Blocks
69 / 78
Simulink – Cruise Control System Simulating the Model
Verifying Extracted Model
 We can convert extracted model
 into set of linear equations
 into transfer function
Matlab code
1 [A, B, C, D]= linmod ( ’ cc2mtlb ’ ) ;
2 [ num, den]= s s 2 t f (A, B, C, D) ;
3 step (500∗ t f (num, den ) ) ;
70 / 78
Simulink – Cruise Control System Simulating the Model
Matlab vs Simulink
Figure 18: Matlab Figure 19: Simulink
71 / 78
Simulink – Cruise Control System Implementing the PI Control
The open-loop system
 In Matlab section we have designed a PI Controller
 Kp = 800
 Ki = 40
 We will do the same in Simulik
 First we need to contain our previous system in a Sybsystem block
 Choose a Subsystem block from the PortsSubsystems Library
 Copy in the model we used with Matlab
72 / 78
Simulink – Cruise Control System Implementing the PI Control
Subsystem
Figure 20: Subsystem Block and its Contents
73 / 78
Simulink – Cruise Control System Implementing the PI Control
PI Controller I
Figure 21: Step: final value=10, time=0
74 / 78
Simulink – Cruise Control System Implementing the PI Control
PI Controller II
Figure 22: We use Transfer Fcn block from Continuous-Time Linear Systems
Library
75 / 78
Simulink – Cruise Control System Implementing the PI Control
Results
 Runnig simulation with time set to 15[s]
76 / 78
References
References
Course basic references
Course basic references
77/78
Textbooks
Textbooks
• Digital Control of Dynamic Systems (3rd Edition)
by Gene F. Franklin, J. David Powell, Michael L.
Workman Publisher: Prentice Hall; 3 edition
(December 29, 1997) ISBN: 0201820544
• Lecture slides
• Computer Lab Exercises
78/78

More Related Content

What's hot

Chap5 - ADSP 21K Manual
Chap5 - ADSP 21K ManualChap5 - ADSP 21K Manual
Chap5 - ADSP 21K ManualSethCopeland
 
control system Lab 01-introduction to transfer functions
control system Lab 01-introduction to transfer functionscontrol system Lab 01-introduction to transfer functions
control system Lab 01-introduction to transfer functionsnalan karunanayake
 
Cost optimal algorithm
Cost optimal algorithmCost optimal algorithm
Cost optimal algorithmHeman Pathak
 
Ece 415 control systems, fall 2021 computer project 1
Ece 415 control systems, fall 2021 computer project  1 Ece 415 control systems, fall 2021 computer project  1
Ece 415 control systems, fall 2021 computer project 1 ronak56
 
Parallel Algorithms: Sort & Merge, Image Processing, Fault Tolerance
Parallel Algorithms: Sort & Merge, Image Processing, Fault ToleranceParallel Algorithms: Sort & Merge, Image Processing, Fault Tolerance
Parallel Algorithms: Sort & Merge, Image Processing, Fault ToleranceUniversity of Technology - Iraq
 
Parallel algorithms
Parallel algorithmsParallel algorithms
Parallel algorithmsguest084d20
 
Parallel algorithms
Parallel algorithmsParallel algorithms
Parallel algorithmsDanish Javed
 
Modern Control - Lec 06 - PID Tuning
Modern Control - Lec 06 - PID TuningModern Control - Lec 06 - PID Tuning
Modern Control - Lec 06 - PID TuningAmr E. Mohamed
 
Performance Portability Through Descriptive Parallelism
Performance Portability Through Descriptive ParallelismPerformance Portability Through Descriptive Parallelism
Performance Portability Through Descriptive ParallelismJeff Larkin
 
Mining quasi bicliques using giraph
Mining quasi bicliques using giraphMining quasi bicliques using giraph
Mining quasi bicliques using giraphHsiao-Fei Liu
 
WVKULAK13_submission_14
WVKULAK13_submission_14WVKULAK13_submission_14
WVKULAK13_submission_14Max De Koninck
 
Chapter 4: Parallel Programming Languages
Chapter 4: Parallel Programming LanguagesChapter 4: Parallel Programming Languages
Chapter 4: Parallel Programming LanguagesHeman Pathak
 
How to Develop Your Own Simulators for Discrete-Event Systems
How to Develop Your Own Simulators for Discrete-Event SystemsHow to Develop Your Own Simulators for Discrete-Event Systems
How to Develop Your Own Simulators for Discrete-Event SystemsDonghun Kang
 
Unit i basic concepts of algorithms
Unit i basic concepts of algorithmsUnit i basic concepts of algorithms
Unit i basic concepts of algorithmssangeetha s
 
Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)swapnac12
 

What's hot (20)

Chap5 - ADSP 21K Manual
Chap5 - ADSP 21K ManualChap5 - ADSP 21K Manual
Chap5 - ADSP 21K Manual
 
control system Lab 01-introduction to transfer functions
control system Lab 01-introduction to transfer functionscontrol system Lab 01-introduction to transfer functions
control system Lab 01-introduction to transfer functions
 
Cost optimal algorithm
Cost optimal algorithmCost optimal algorithm
Cost optimal algorithm
 
Ece 415 control systems, fall 2021 computer project 1
Ece 415 control systems, fall 2021 computer project  1 Ece 415 control systems, fall 2021 computer project  1
Ece 415 control systems, fall 2021 computer project 1
 
Parallel Algorithms: Sort & Merge, Image Processing, Fault Tolerance
Parallel Algorithms: Sort & Merge, Image Processing, Fault ToleranceParallel Algorithms: Sort & Merge, Image Processing, Fault Tolerance
Parallel Algorithms: Sort & Merge, Image Processing, Fault Tolerance
 
Matrix multiplication
Matrix multiplicationMatrix multiplication
Matrix multiplication
 
Parallel algorithms
Parallel algorithmsParallel algorithms
Parallel algorithms
 
Parallel algorithms
Parallel algorithmsParallel algorithms
Parallel algorithms
 
Modern Control - Lec 06 - PID Tuning
Modern Control - Lec 06 - PID TuningModern Control - Lec 06 - PID Tuning
Modern Control - Lec 06 - PID Tuning
 
Performance Portability Through Descriptive Parallelism
Performance Portability Through Descriptive ParallelismPerformance Portability Through Descriptive Parallelism
Performance Portability Through Descriptive Parallelism
 
Quiz
QuizQuiz
Quiz
 
Parallel algorithm in linear algebra
Parallel algorithm in linear algebraParallel algorithm in linear algebra
Parallel algorithm in linear algebra
 
Mining quasi bicliques using giraph
Mining quasi bicliques using giraphMining quasi bicliques using giraph
Mining quasi bicliques using giraph
 
Ch7
Ch7Ch7
Ch7
 
Parallel quicksort cz. 1
Parallel quicksort cz. 1Parallel quicksort cz. 1
Parallel quicksort cz. 1
 
WVKULAK13_submission_14
WVKULAK13_submission_14WVKULAK13_submission_14
WVKULAK13_submission_14
 
Chapter 4: Parallel Programming Languages
Chapter 4: Parallel Programming LanguagesChapter 4: Parallel Programming Languages
Chapter 4: Parallel Programming Languages
 
How to Develop Your Own Simulators for Discrete-Event Systems
How to Develop Your Own Simulators for Discrete-Event SystemsHow to Develop Your Own Simulators for Discrete-Event Systems
How to Develop Your Own Simulators for Discrete-Event Systems
 
Unit i basic concepts of algorithms
Unit i basic concepts of algorithmsUnit i basic concepts of algorithms
Unit i basic concepts of algorithms
 
Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)
 

Similar to matlab_simulink_for_control082p.pdf

Control tutorials for matlab and simulink introduction pid controller desig...
Control tutorials for matlab and simulink   introduction pid controller desig...Control tutorials for matlab and simulink   introduction pid controller desig...
Control tutorials for matlab and simulink introduction pid controller desig...ssuser27c61e
 
1.1Introduction to matlab.pptx
1.1Introduction to matlab.pptx1.1Introduction to matlab.pptx
1.1Introduction to matlab.pptxBeheraA
 
5_2019_01_12!09_25_57_AM.ppt
5_2019_01_12!09_25_57_AM.ppt5_2019_01_12!09_25_57_AM.ppt
5_2019_01_12!09_25_57_AM.pptaboma2hawi
 
Summer training matlab
Summer training matlab Summer training matlab
Summer training matlab Arshit Rai
 
Summer training matlab
Summer training matlab Summer training matlab
Summer training matlab Arshit Rai
 
Matlab for beginners, Introduction, signal processing
Matlab for beginners, Introduction, signal processingMatlab for beginners, Introduction, signal processing
Matlab for beginners, Introduction, signal processingDr. Manjunatha. P
 
Raymond.Brunkow-Project-EEL-3657-Sp15
Raymond.Brunkow-Project-EEL-3657-Sp15Raymond.Brunkow-Project-EEL-3657-Sp15
Raymond.Brunkow-Project-EEL-3657-Sp15Raymond Brunkow
 
Control system concepts by using matlab
Control system concepts by using matlabControl system concepts by using matlab
Control system concepts by using matlabCharltonInao1
 
Analysis and Design of PID controller with control parameters in MATLAB and S...
Analysis and Design of PID controller with control parameters in MATLAB and S...Analysis and Design of PID controller with control parameters in MATLAB and S...
Analysis and Design of PID controller with control parameters in MATLAB and S...MIbrar4
 
MODELLING, ANALYSIS AND SIMULATION OF DYNAMIC SYSTEMS USING CONTROL TECHNIQUE...
MODELLING, ANALYSIS AND SIMULATION OF DYNAMIC SYSTEMS USING CONTROL TECHNIQUE...MODELLING, ANALYSIS AND SIMULATION OF DYNAMIC SYSTEMS USING CONTROL TECHNIQUE...
MODELLING, ANALYSIS AND SIMULATION OF DYNAMIC SYSTEMS USING CONTROL TECHNIQUE...shivamverma394
 
control system lab 02 - PID tuning
control system lab 02 - PID tuning control system lab 02 - PID tuning
control system lab 02 - PID tuning nalan karunanayake
 
Analysis and Design of Conventional Controller for Speed Control of DC Motor ...
Analysis and Design of Conventional Controller for Speed Control of DC Motor ...Analysis and Design of Conventional Controller for Speed Control of DC Motor ...
Analysis and Design of Conventional Controller for Speed Control of DC Motor ...IJERA Editor
 
Executability Analysis of Graph Transformation Rules (VL/HCC 2011)
Executability Analysis of Graph Transformation Rules (VL/HCC 2011)Executability Analysis of Graph Transformation Rules (VL/HCC 2011)
Executability Analysis of Graph Transformation Rules (VL/HCC 2011)Elena Planas
 
Time response of first order systems and second order systems
Time response of first order systems and second order systemsTime response of first order systems and second order systems
Time response of first order systems and second order systemsNANDHAKUMARA10
 
Optimal and pid controller for controlling camera’s position in unmanned aeri...
Optimal and pid controller for controlling camera’s position in unmanned aeri...Optimal and pid controller for controlling camera’s position in unmanned aeri...
Optimal and pid controller for controlling camera’s position in unmanned aeri...Zac Darcy
 
Implementasi Pemodelan Sistem Ke TeeChart 2
Implementasi Pemodelan Sistem Ke TeeChart  2Implementasi Pemodelan Sistem Ke TeeChart  2
Implementasi Pemodelan Sistem Ke TeeChart 2Lusiana Diyan
 
Chapter 08
Chapter 08Chapter 08
Chapter 08Tha Mike
 
Introduction to Matlab.pdf
Introduction to Matlab.pdfIntroduction to Matlab.pdf
Introduction to Matlab.pdfssuser43b38e
 

Similar to matlab_simulink_for_control082p.pdf (20)

Control tutorials for matlab and simulink introduction pid controller desig...
Control tutorials for matlab and simulink   introduction pid controller desig...Control tutorials for matlab and simulink   introduction pid controller desig...
Control tutorials for matlab and simulink introduction pid controller desig...
 
1.1Introduction to matlab.pptx
1.1Introduction to matlab.pptx1.1Introduction to matlab.pptx
1.1Introduction to matlab.pptx
 
5_2019_01_12!09_25_57_AM.ppt
5_2019_01_12!09_25_57_AM.ppt5_2019_01_12!09_25_57_AM.ppt
5_2019_01_12!09_25_57_AM.ppt
 
Summer training matlab
Summer training matlab Summer training matlab
Summer training matlab
 
Summer training matlab
Summer training matlab Summer training matlab
Summer training matlab
 
Ps1
Ps1Ps1
Ps1
 
ACS 22LIE12 lab Manul.docx
ACS 22LIE12 lab Manul.docxACS 22LIE12 lab Manul.docx
ACS 22LIE12 lab Manul.docx
 
Matlab for beginners, Introduction, signal processing
Matlab for beginners, Introduction, signal processingMatlab for beginners, Introduction, signal processing
Matlab for beginners, Introduction, signal processing
 
Raymond.Brunkow-Project-EEL-3657-Sp15
Raymond.Brunkow-Project-EEL-3657-Sp15Raymond.Brunkow-Project-EEL-3657-Sp15
Raymond.Brunkow-Project-EEL-3657-Sp15
 
Control system concepts by using matlab
Control system concepts by using matlabControl system concepts by using matlab
Control system concepts by using matlab
 
Analysis and Design of PID controller with control parameters in MATLAB and S...
Analysis and Design of PID controller with control parameters in MATLAB and S...Analysis and Design of PID controller with control parameters in MATLAB and S...
Analysis and Design of PID controller with control parameters in MATLAB and S...
 
MODELLING, ANALYSIS AND SIMULATION OF DYNAMIC SYSTEMS USING CONTROL TECHNIQUE...
MODELLING, ANALYSIS AND SIMULATION OF DYNAMIC SYSTEMS USING CONTROL TECHNIQUE...MODELLING, ANALYSIS AND SIMULATION OF DYNAMIC SYSTEMS USING CONTROL TECHNIQUE...
MODELLING, ANALYSIS AND SIMULATION OF DYNAMIC SYSTEMS USING CONTROL TECHNIQUE...
 
control system lab 02 - PID tuning
control system lab 02 - PID tuning control system lab 02 - PID tuning
control system lab 02 - PID tuning
 
Analysis and Design of Conventional Controller for Speed Control of DC Motor ...
Analysis and Design of Conventional Controller for Speed Control of DC Motor ...Analysis and Design of Conventional Controller for Speed Control of DC Motor ...
Analysis and Design of Conventional Controller for Speed Control of DC Motor ...
 
Executability Analysis of Graph Transformation Rules (VL/HCC 2011)
Executability Analysis of Graph Transformation Rules (VL/HCC 2011)Executability Analysis of Graph Transformation Rules (VL/HCC 2011)
Executability Analysis of Graph Transformation Rules (VL/HCC 2011)
 
Time response of first order systems and second order systems
Time response of first order systems and second order systemsTime response of first order systems and second order systems
Time response of first order systems and second order systems
 
Optimal and pid controller for controlling camera’s position in unmanned aeri...
Optimal and pid controller for controlling camera’s position in unmanned aeri...Optimal and pid controller for controlling camera’s position in unmanned aeri...
Optimal and pid controller for controlling camera’s position in unmanned aeri...
 
Implementasi Pemodelan Sistem Ke TeeChart 2
Implementasi Pemodelan Sistem Ke TeeChart  2Implementasi Pemodelan Sistem Ke TeeChart  2
Implementasi Pemodelan Sistem Ke TeeChart 2
 
Chapter 08
Chapter 08Chapter 08
Chapter 08
 
Introduction to Matlab.pdf
Introduction to Matlab.pdfIntroduction to Matlab.pdf
Introduction to Matlab.pdf
 

Recently uploaded

Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service NashikLow Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Beautiful Sapna Call Girls CP 9711199012 ☎ Call /Whatsapps
Beautiful Sapna Call Girls CP 9711199012 ☎ Call /WhatsappsBeautiful Sapna Call Girls CP 9711199012 ☎ Call /Whatsapps
Beautiful Sapna Call Girls CP 9711199012 ☎ Call /Whatsappssapnasaifi408
 
Call Girls in Dwarka Sub City 💯Call Us 🔝8264348440🔝
Call Girls in Dwarka Sub City 💯Call Us 🔝8264348440🔝Call Girls in Dwarka Sub City 💯Call Us 🔝8264348440🔝
Call Girls in Dwarka Sub City 💯Call Us 🔝8264348440🔝soniya singh
 
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...Pooja Nehwal
 
VVIP Pune Call Girls Warje (7001035870) Pune Escorts Nearby with Complete Sat...
VVIP Pune Call Girls Warje (7001035870) Pune Escorts Nearby with Complete Sat...VVIP Pune Call Girls Warje (7001035870) Pune Escorts Nearby with Complete Sat...
VVIP Pune Call Girls Warje (7001035870) Pune Escorts Nearby with Complete Sat...Call Girls in Nagpur High Profile
 
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai GapedCall Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gapedkojalkojal131
 
9004554577, Get Adorable Call Girls service. Book call girls & escort service...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...9004554577, Get Adorable Call Girls service. Book call girls & escort service...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...Pooja Nehwal
 
Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...
Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...
Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...srsj9000
 
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Call Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查
如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查
如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查awo24iot
 
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Dubai Call Girls O528786472 Call Girls In Dubai Wisteria
Dubai Call Girls O528786472 Call Girls In Dubai WisteriaDubai Call Girls O528786472 Call Girls In Dubai Wisteria
Dubai Call Girls O528786472 Call Girls In Dubai WisteriaUnited Arab Emirates
 
Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...
Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...
Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...nagunakhan
 
Vip Noida Escorts 9873940964 Greater Noida Escorts Service
Vip Noida Escorts 9873940964 Greater Noida Escorts ServiceVip Noida Escorts 9873940964 Greater Noida Escorts Service
Vip Noida Escorts 9873940964 Greater Noida Escorts Serviceankitnayak356677
 
Gaya Call Girls #9907093804 Contact Number Escorts Service Gaya
Gaya Call Girls #9907093804 Contact Number Escorts Service GayaGaya Call Girls #9907093804 Contact Number Escorts Service Gaya
Gaya Call Girls #9907093804 Contact Number Escorts Service Gayasrsj9000
 
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Russian Call Girls Kolkata Chhaya 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls Kolkata Chhaya 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls Kolkata Chhaya 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls Kolkata Chhaya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Russian Call Girls In South Delhi Delhi 9711199012 💋✔💕😘 Independent Escorts D...
Russian Call Girls In South Delhi Delhi 9711199012 💋✔💕😘 Independent Escorts D...Russian Call Girls In South Delhi Delhi 9711199012 💋✔💕😘 Independent Escorts D...
Russian Call Girls In South Delhi Delhi 9711199012 💋✔💕😘 Independent Escorts D...nagunakhan
 

Recently uploaded (20)

Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service NashikLow Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
 
young call girls in Sainik Farm 🔝 9953056974 🔝 Delhi escort Service
young call girls in Sainik Farm 🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Sainik Farm 🔝 9953056974 🔝 Delhi escort Service
young call girls in Sainik Farm 🔝 9953056974 🔝 Delhi escort Service
 
Beautiful Sapna Call Girls CP 9711199012 ☎ Call /Whatsapps
Beautiful Sapna Call Girls CP 9711199012 ☎ Call /WhatsappsBeautiful Sapna Call Girls CP 9711199012 ☎ Call /Whatsapps
Beautiful Sapna Call Girls CP 9711199012 ☎ Call /Whatsapps
 
Call Girls in Dwarka Sub City 💯Call Us 🔝8264348440🔝
Call Girls in Dwarka Sub City 💯Call Us 🔝8264348440🔝Call Girls in Dwarka Sub City 💯Call Us 🔝8264348440🔝
Call Girls in Dwarka Sub City 💯Call Us 🔝8264348440🔝
 
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
 
VVIP Pune Call Girls Warje (7001035870) Pune Escorts Nearby with Complete Sat...
VVIP Pune Call Girls Warje (7001035870) Pune Escorts Nearby with Complete Sat...VVIP Pune Call Girls Warje (7001035870) Pune Escorts Nearby with Complete Sat...
VVIP Pune Call Girls Warje (7001035870) Pune Escorts Nearby with Complete Sat...
 
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai GapedCall Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
 
9004554577, Get Adorable Call Girls service. Book call girls & escort service...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...9004554577, Get Adorable Call Girls service. Book call girls & escort service...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...
 
Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...
Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...
Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...
 
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
 
Call Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur Escorts
 
如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查
如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查
如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查
 
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(PARI) Alandi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Dubai Call Girls O528786472 Call Girls In Dubai Wisteria
Dubai Call Girls O528786472 Call Girls In Dubai WisteriaDubai Call Girls O528786472 Call Girls In Dubai Wisteria
Dubai Call Girls O528786472 Call Girls In Dubai Wisteria
 
Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...
Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...
Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...
 
Vip Noida Escorts 9873940964 Greater Noida Escorts Service
Vip Noida Escorts 9873940964 Greater Noida Escorts ServiceVip Noida Escorts 9873940964 Greater Noida Escorts Service
Vip Noida Escorts 9873940964 Greater Noida Escorts Service
 
Gaya Call Girls #9907093804 Contact Number Escorts Service Gaya
Gaya Call Girls #9907093804 Contact Number Escorts Service GayaGaya Call Girls #9907093804 Contact Number Escorts Service Gaya
Gaya Call Girls #9907093804 Contact Number Escorts Service Gaya
 
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service
 
Russian Call Girls Kolkata Chhaya 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls Kolkata Chhaya 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls Kolkata Chhaya 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls Kolkata Chhaya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Russian Call Girls In South Delhi Delhi 9711199012 💋✔💕😘 Independent Escorts D...
Russian Call Girls In South Delhi Delhi 9711199012 💋✔💕😘 Independent Escorts D...Russian Call Girls In South Delhi Delhi 9711199012 💋✔💕😘 Independent Escorts D...
Russian Call Girls In South Delhi Delhi 9711199012 💋✔💕😘 Independent Escorts D...
 

matlab_simulink_for_control082p.pdf

  • 1. 1/78 Matlab and Simulink Matlab and Simulink for Control for Control Automatica I (Laboratorio) Automatica I (Laboratorio) 2/78 Matlab and Simulink Matlab and Simulink CACSD CACSD
  • 2. 3/78 Matlab and Simulink for Control Matlab and Simulink for Control • Matlab introduction • Simulink introduction • Control Issues Recall • Matlab design Example • Simulink design Example Part I Introduction 4 / 78
  • 3. Introduction What is Matlab and Simulink? What is Matlab High-Performance language for technical computing Integrates computation, visualisation and programming Matlab = MATrix LABoratory Features family of add-on, application-specific toolboxes 5 / 78 Introduction What is Matlab and Simulink? What are Matlab components? Development Environment The Matlab Mathematical Function Library The Matlab language Graphics The Matlab Application Program Interface 6 / 78
  • 4. Introduction What is Matlab and Simulink? What is Simulink? Software Package for modelling, simulating and analysing dynamic systems Supports linear Non-linear systems Supports continuous or discrete time systems Supports multirate systems Allows you to model real-life situations Allows for a top-down and bottom-up approach 7 / 78 Introduction What is Matlab and Simulink? How Simulink Works? 1. Create a block diagram (model) 2. Simulate the system represented by a block diagram 8 / 78
  • 5. Introduction MatlabSimulink – Getting Started Matlab Environment 9 / 78 Introduction MatlabSimulink – Getting Started The Matlab Language Dürer’s Matrix 1 A=[16 3 2 13; 5 10 11 8; 9 6 7 12;4 15 14 1 ] ; 2 sum(A) %ans = 34 34 34 34 3 sum(A’ ) %ans = 34 34 34 34 4 sum( diag (A)) %ans = 34 Operators 1 100: −7:50 % 100 93 86 79 72 65 58 51 2 sum(A( 1 : 4 , 4 ) ) % ans = 34 10 / 78
  • 6. Introduction MatlabSimulink – Getting Started The Matlab API You can use C or FORTRAN Pipes on UNIX, COM on Windows You can call Matlab routines from C/FORTRAN programs and vice versa You can call Java from Matlab 11 / 78 Introduction MatlabSimulink – Getting Started Simulink Environment 12 / 78
  • 7. Introduction MatlabSimulink – Getting Started Starting Simulink Just type in Matlab 1 s i m u l i n k 13 / 78 Part II Matlab – Background 14 / 78
  • 8. Matlab – Background Transfer Functions and Laplace Transforms Laplace Transform Definition The Laplace Transform is an integral transform perhaps second only to the Fourier transform in its utility in solving physical problems. The Laplace transform is defined by: L [f (t)] (s) ≡ ∞ 0 f (t)e−st dt Source: [1, Abramowitz and Stegun 1972] 15 / 78 Matlab – Background Transfer Functions and Laplace Transforms Laplace Transform Several Laplace Transforms and properties f L [f (t)] (s) range 1 1 s s 0 t 1 s2 s 0 tn n! sn+1 n ∈ Z 0 eat 1 s−a s a Lt f (n) (t) (s) = sn Lt [f (t)] − −sn−1 f (0) − sn−2 f (0) − . . . − f (n−1) (0) (1) This property can be used to transform differential equations into algebraic ones. This is called Heaviside calculus 16 / 78
  • 9. Matlab – Background Transfer Functions and Laplace Transforms Heaviside Calculus Example Let us apply the Laplace transform to the following equation: f (t) + a1f (t) + a0f (t) = 0 which should give us: s2 Lt [f (t)] (s) − sf (0) − f (0) + +a1 {sLt [f (t)] (s) − f (0)} + +a0Lt [f (t)] (s) = 0 which can be rearranged to: Lt [f (t)] (s) = sf (0) + f (0) + a1f (0) s2 + a1s + a0 17 / 78 Matlab – Background Transfer Functions and Laplace Transforms Transfer Functions For Matlab modelling we need Transfer Functions To find the Transfer Function of a given system we need to take the Laplace transform of the system modelling equations (2) (3) System modelling equations F = mv̇ + bv (2) y = v (3) Laplace Transform: F(s) = msV (s) + bV (s) Y (s) = V (s) 18 / 78
  • 10. Matlab – Background Transfer Functions and Laplace Transforms Transfer Functions – cntd. Assuming that our output is velocity we can substitute it from equation (5) Transfer Function Laplace Transform: F(s) = msV (s) + bV (s) (4) Y (s) = V (s) (5) Transfer Function: Y (s) F(s) = 1 ms + b (6) 19 / 78 Matlab – Background Matlab Functions Matlab Functions – Transfer Function I What is tf? Specifies a SISO transfer function for model h(s) = n(s)/d(s) 1 h = t f (num, den ) What are num den? row vectors listing the coefficients of the polynomials n(s) and d(s) ordered in descending powers of s Source: Matlab Help 20 / 78
  • 11. Matlab – Background Matlab Functions Matlab Functions – Transfer Function II tf Example T(s) = 2s−3 s+1 ≡ h=tf([2 -3], [1 1]) T(s) = 2s+1 4s2+s+1 ≡ h=tf([2 1], [4 1 1]) 21 / 78 Matlab – Background Matlab Functions Matlab Functions – Feedback I Matlab code 1 sys = feedback ( forward , backward ) ; Source: [2, Angermann et al. 2004] 22 / 78
  • 12. Matlab – Background Matlab Functions Matlab Functions – Feedback II obtains a closed-loop transfer function directly from the open-loop transfer function no need to compute by hand Example Forward = 1 sTi (7) Backward = V (8) T(s) = C(s) R(s) = 1 sTi 1 + V 1 sTi ≡ ≡ feedback(tf(1,[Ti 0]), tf(V, 1)) (9) 23 / 78 Matlab – Background Matlab Functions Matlab Functions – Step Response system=t f ( [ 2 1 ] , [ 4 1 1 ] ) ; t = 0 : 0 . 1 : 5 0 ; step (100∗ system ) a x i s ( [ 0 30 60 180]) 24 / 78
  • 13. Matlab – Background Steady-State Error Steady-State Error – Definition Figure 1: Unity Feedback System Steady-State Error The difference between the input and output of a system in the limit as time goes to infinity 25 / 78 Matlab – Background Steady-State Error Steady-State Error Steady-State Error e(∞) = lim s→0 sR(s) 1 + G(s) (10) e(∞) = lim s→0 sR(s) |1 − T(s)| (11) 26 / 78
  • 14. Matlab – Background Proportional, Integral and Derivative Controllers Feedback controller – How does it work I? Figure 2: System controller e – represents the tracking error e – difference between desired input (R) an actual output (Y) e – is sent to controller which computes: derivative of e integral of e u – controller output is equal to... 27 / 78 Matlab – Background Proportional, Integral and Derivative Controllers Feedback controller – How does it work II? u – controller output is equal to: Kp (proportional gain) times the magnitude of the error + Ki (integral gain) times the integral of the error + Kd (derivative gain) times the derivative of the error Controller’s Output u = Kpe + Ki edt + Kd de dt Controller’s Transfer Function Kp + Ki s + Kd s = Kd s2 + Kps + Ki s 28 / 78
  • 15. Matlab – Background Proportional, Integral and Derivative Controllers Characteristics of PID Controllers Proportional Controller Kp reduces the rise time reduces but never eliminates steady-state error Integral Controller Ki eliminates steady-state error worsens transient response Derivative Controller Kd increases the stability of the system reduces overshoot improves transient response 29 / 78 Matlab – Background Proportional, Integral and Derivative Controllers Example Problem Figure 3: Mass spring and damper problem Modelling Equation mẍ + bẋ + kx = F (12) 30 / 78
  • 16. Matlab – Background Proportional, Integral and Derivative Controllers Example Problem Laplace Transfer Functions mẍ + bẋ + kx = F ms2 X(s) + bsX(s) + kX(s) = F(s) (13) X(s) F(s) = 1 ms2 + bs + k (14) 31 / 78 Matlab – Background Proportional, Integral and Derivative Controllers Matlab System Response Assumptions Let: m = 1[kg], b = 10[Ns/m], k = 20[N/m] Matlab code 1 %{ Set up v a r i a b l e s%} 2 m=1; b=10; k=20; 3 %{ C a l c u l a t e response%} 4 num=1; 5 den=[m, b , k ] ; 6 plant=t f (num, den ) ; 7 step ( plant ) 32 / 78
  • 17. Matlab – Background Proportional, Integral and Derivative Controllers Matlab System Response Figure 4: Amplitude ⇔ Displacement 33 / 78 Matlab – Background Proportional, Integral and Derivative Controllers Problems The steady-state error is equal to 0.95 – equation (11) The rise time is about 1 second The settling time is about 1.5 seconds The PID controller should influence (reduce) all those parameters 34 / 78
  • 18. Matlab – Background Proportional, Integral and Derivative Controllers Controllers’ Characteristics Type Rise time Overshoot Settling time S-S Error Kp decrease increase small change decrease Ki decrease increase increase eliminate Kd small change decrease decrease small change These correlations may not be exactly accurate, because Kp, Ki , and Kd are dependent on each other. In fact, changing one of these variables can change the effect of the other two. 35 / 78 Matlab – Background Proportional, Integral and Derivative Controllers Proportional Controller P Transfer Function X(s) F(s) = Kp s2 + bs + (k + Kp) Matlab code 1 %{ Set up p r o p o r t i o n a l gain%} 2 Kp=300; 3 %{ C a l c u l a t e c o n t r o l l e r%} 4 s y s c t l=feedback (Kp∗ plant , 1 ) ; 5 %{ Plot r e s u l t s%} 6 t =0:0.01:2; 7 step ( s y s c t l , t ) 36 / 78
  • 19. Matlab – Background Proportional, Integral and Derivative Controllers Proportional Controller – Plot Figure 5: Improved rise time steady-state error 37 / 78 Matlab – Background Proportional, Integral and Derivative Controllers Proportional Derivative Controller PD Transfer Function X(s) F(s) = Kd s + Kp s2 + (b + Kd )s + (k + Kp) Matlab code 1 %{ Set up p r o p o r t i o n a l and d e r i v a t i v e gain%} 2 Kp=300; Kd=10; 3 %{ C a l c u l a t e c o n t r o l l e r%} 4 contr=t f ( [ Kd , Kp ] , 1 ) ; 5 s y s c t l=feedback ( contr ∗ plant , 1 ) ; 6 %{ Plot r e s u l t s%} 7 t =0:0.01:2; 8 step ( s y s c t l , t ) 38 / 78
  • 20. Matlab – Background Proportional, Integral and Derivative Controllers Proportional Derivative Controller – Plot Figure 6: Reduced over-shoot and settling time 39 / 78 Matlab – Background Proportional, Integral and Derivative Controllers Proportional Integral Controller PI Transfer Function X(s) F(s) = Kps + Ki s3 + bs2 + (k + Kp)s + Ki Matlab code 1 %{ Set up p r o p o r t i o n a l and i n t e g r a l gain%} 2 Kp=30; Ki =70; 3 %{ C a l c u l a t e c o n t r o l l e r%} 4 contr=t f ( [ Kp , Ki ] , [ 1 , 0 ] ) ; 5 s y s c t l=feedback ( contr ∗ plant , 1 ) ; 6 %{ Plot r e s u l t s%} 7 t =0:0.01:2; 8 step ( s y s c t l , t ) 40 / 78
  • 21. Matlab – Background Proportional, Integral and Derivative Controllers Proportional Integral Controller – Plot Figure 7: Eliminated steady-state error, decreased over-shoot 41 / 78 Matlab – Background Proportional, Integral and Derivative Controllers Proportional Integral Derivative Controller PID Transfer Function X(s) F(s) = Kd s2 + Kps + Ki s3 + (b + Kd )s2 + (k + Kp)s + Ki Matlab code 1 %{ Set up p r o p o r t i o n a l and i n t e g r a l gain%} 2 Kp=350; Ki =300; Kd=50; 3 %{ C a l c u l a t e c o n t r o l l e r%} 4 contr=t f ( [ Kd , Kp , Ki ] , [ 1 , 0 ] ) ; 5 s y s c t l=feedback ( contr ∗ plant , 1 ) ; 6 %{ Plot r e s u l t s%} 7 t =0:0.01:2; 8 step ( s y s c t l , t ) 42 / 78
  • 22. Matlab – Background Proportional, Integral and Derivative Controllers Proportional Integral Derivative Controller – Plot Figure 8: Eliminated steady-state error, decreased over-shoot 43 / 78 Part III Matlab – Cruise Control System 44 / 78
  • 23. Matlab – Cruise Control System Design Criteria How does Cruise Control for Poor work? Figure 9: Forces taking part in car’s movement Based on Carnegie Mellon University Library Control Tutorials for Matlab and Simulink 45 / 78 Matlab – Cruise Control System Design Criteria Building the Model Using Newton’s law we derive F = mv̇ + bv (15) y = v (16) Where: m = 1200[kg], b = 50[Ns m ], F = 500[N] 46 / 78
  • 24. Matlab – Cruise Control System Design Criteria Design Criteria For the given data Vmax = 10[m/s] = 36[km/h] The car should accelerate to Vmax within 6[s] 10% tolerance on the initial velocity 2% of a steady-state error 47 / 78 Matlab – Cruise Control System Matlab Representation Transfer Function System Equations: F = mv̇ + bv y = v Laplace Transform: F(s) = msV (s) + bV (s) (17) Y (s) = V (s) (18) Transfer Function: Y (s) F(s) = 1 ms + b (19) 48 / 78
  • 25. Matlab – Cruise Control System Matlab Representation Matlab Representation Now in Matlab we need to type Matlab code 1 m=1200; 2 b=50; 3 num=[1]; 4 den=[m, b ] ; 5 c r u i s e=t f (num, den ) ; 6 step = (500∗ c r u i s e ) ; 49 / 78 Matlab – Cruise Control System Matlab Representation Results Figure 10: Car velocity diagram – mind the design criteria 50 / 78
  • 26. Matlab – Cruise Control System Matlab Representation Design criteria revisited Our model needs over 100[s] to reach the steady-state The design criteria mentioned 5 seconds 51 / 78 Matlab – Cruise Control System PID Controller Feedback controller To adjust the car speed within the limits of specification We need the feedback controller Figure 11: System controller 52 / 78
  • 27. Matlab – Cruise Control System PID Controller Decreasing the rise time Proportional Controller Y (s) R(s) = Kp ms + (b + Kp) (20) Matlab code 1 Kp=100; m=1200; b=50; 2 num=[1]; den=[m, b ] ; 3 c r u i s e=t f (num, den ) ; 4 s y s c t l=feedback (Kp∗ c r u i s e , 1 ) ; 5 t =0:0.1:20; 6 step (10∗ s y s c l , t ) 7 axis ( [ 0 20 0 10]) 53 / 78 Matlab – Cruise Control System PID Controller Under- and Overcontrol Figure 12: Kp = 100 Figure 13: Kp = 10000 54 / 78
  • 28. Matlab – Cruise Control System PID Controller Making Rise Time Reasonable Proportional Integral Controller Y (s) R(s) = Kps + Ki ms2 + (b + Kp)s + Ki (21) Matlab code 1 Kp=800; Ki =40; m=1200; b=50; 2 num=[1]; den=[m, b ] ; 3 c r u i s e=t f (num, den ) ; 4 contr=t f ( [ Kp Ki ] , [ 1 0 ] ) 5 s y s c t l=feedback ( contr ∗ c r u i s e , 1 ) ; 6 t =0:0.1:20; 7 step (10∗ s y s c l , t ) 8 axis ( [ 0 20 0 10]) 55 / 78 Matlab – Cruise Control System PID Controller Results Figure 14: Car velocity diagram meeting the design criteria 56 / 78
  • 29. Part IV Simulink – Cruise Control System 57 / 78 Simulink – Cruise Control System Building the Model How does Cruise Control for Poor work? Figure 15: Forces taking part in car’s movement Based on Carnegie Mellon University Library Control Tutorials for Matlab and Simulink 58 / 78
  • 30. Simulink – Cruise Control System Building the Model Physical Description Summing up all the forces acting on the mass Forces acting on the mass F = m dv dt + bv (22) Where: m=1200[kg], b=50[Nsec m ], F=500[N] 59 / 78 Simulink – Cruise Control System Building the Model Physical Description – cntd. Integrating the acceleration to obtain the velocity Integral of acceleration a = dv dt ≡ dv dt = v (23) 60 / 78
  • 31. Simulink – Cruise Control System Building the Model Building the Model in Simulink Figure 16: Integrator block from Continuous block library 61 / 78 Simulink – Cruise Control System Building the Model Building the Model in Simulink Obtaining acceleration Acceleration a = dv dt = F − bv m (24) 62 / 78
  • 32. Simulink – Cruise Control System Building the Model Building the Model in Simulink Figure 17: Gain block from Math operators block library 63 / 78 Simulink – Cruise Control System Building the Model Elements used in Simulink Model Friction (Gain block) Subtract (from Math Operators) Input (Step block from Sources) Output (Scope from Sinks) 64 / 78
  • 33. Simulink – Cruise Control System Building the Model Complete Model 65 / 78 Simulink – Cruise Control System Building the Model Mapping Physical Equation to Simulink Model 66 / 78
  • 34. Simulink – Cruise Control System Simulating the Model Setting up the Variables Now it is time to use our input values in Simulink... F=500[N] In Step block set: Step time = 0 and Final value = 500 ...and adjust simulation parameters... Simulation → Configuration Parameters... Stop time = 120 ...and set up variables in Matlab 1 m=1200; 2 b=50; 67 / 78 Simulink – Cruise Control System Simulating the Model Running Simulation Choose Simulation→Start Double-click on the Scope block... 68 / 78
  • 35. Simulink – Cruise Control System Simulating the Model Extracting Model into Matlab Replace the Step and Scope Blocks with In and Out Connection Blocks 69 / 78 Simulink – Cruise Control System Simulating the Model Verifying Extracted Model We can convert extracted model into set of linear equations into transfer function Matlab code 1 [A, B, C, D]= linmod ( ’ cc2mtlb ’ ) ; 2 [ num, den]= s s 2 t f (A, B, C, D) ; 3 step (500∗ t f (num, den ) ) ; 70 / 78
  • 36. Simulink – Cruise Control System Simulating the Model Matlab vs Simulink Figure 18: Matlab Figure 19: Simulink 71 / 78 Simulink – Cruise Control System Implementing the PI Control The open-loop system In Matlab section we have designed a PI Controller Kp = 800 Ki = 40 We will do the same in Simulik First we need to contain our previous system in a Sybsystem block Choose a Subsystem block from the PortsSubsystems Library Copy in the model we used with Matlab 72 / 78
  • 37. Simulink – Cruise Control System Implementing the PI Control Subsystem Figure 20: Subsystem Block and its Contents 73 / 78 Simulink – Cruise Control System Implementing the PI Control PI Controller I Figure 21: Step: final value=10, time=0 74 / 78
  • 38. Simulink – Cruise Control System Implementing the PI Control PI Controller II Figure 22: We use Transfer Fcn block from Continuous-Time Linear Systems Library 75 / 78 Simulink – Cruise Control System Implementing the PI Control Results Runnig simulation with time set to 15[s] 76 / 78
  • 39. References References Course basic references Course basic references 77/78 Textbooks Textbooks • Digital Control of Dynamic Systems (3rd Edition) by Gene F. Franklin, J. David Powell, Michael L. Workman Publisher: Prentice Hall; 3 edition (December 29, 1997) ISBN: 0201820544 • Lecture slides • Computer Lab Exercises 78/78