Introduction to Scilab
application to feedback control
Yassine Ariba
Brno University of Technology - April 2014
- Y. Ariba - Icam, Toulouse.
Brno University of Technology - April 2014 1 / 115
Introduction to Scilab application to feedback control Yassine - - PowerPoint PPT Presentation
Introduction to Scilab application to feedback control Yassine Ariba Brno University of Technology - April 2014 Y. Ariba - Icam, Toulouse. Brno University of Technology - April 2014 1 / 115 Sommaire 1 Introduction 2 Basics 3 Matrices 4
Brno University of Technology - April 2014 1 / 115
1 Introduction 2 Basics 3 Matrices 4 Plotting 5 Programming 6 For MATLAB users 7 Xcos 8 Application to feedback control 9 Classical control design
Brno University of Technology - April 2014 2 / 115
Introduction
1 Introduction 2 Basics 3 Matrices 4 Plotting 5 Programming 6 For MATLAB users 7 Xcos 8 Application to feedback control 9 Classical control design
Brno University of Technology - April 2014 3 / 115
Introduction What is Scilab ?
www.scilab.org
Brno University of Technology - April 2014 4 / 115
Introduction What is Scilab ?
More informations : www.scilab.org
Brno University of Technology - April 2014 5 / 115
Introduction License
R
1.
Brno University of Technology - April 2014 6 / 115
Introduction Getting started
Brno University of Technology - April 2014 7 / 115
Introduction Getting started
Brno University of Technology - April 2014 8 / 115
Introduction Getting started
Brno University of Technology - April 2014 8 / 115
Introduction Getting started
x = 1.75
Brno University of Technology - April 2014 9 / 115
Introduction Getting started
Brno University of Technology - April 2014 10 / 115
Basics
1 Introduction 2 Basics 3 Matrices 4 Plotting 5 Programming 6 For MATLAB users 7 Xcos 8 Application to feedback control 9 Classical control design
Brno University of Technology - April 2014 11 / 115
Basics Elementary operations
ans = 0.4
ans = 8.
ans =
ans =
ans = 1.
ans = 148.41316
ans = 1.4142136
Brno University of Technology - April 2014 12 / 115
Basics Elementary operations
ans =
ans = 4.
Brno University of Technology - April 2014 13 / 115
Basics Elementary operations
ans = F
ans = T
ans = T
Brno University of Technology - April 2014 14 / 115
Basics Variables
c = 7.5
!--error 4 Undefined variable : d
Brno University of Technology - April 2014 15 / 115
Basics Variables
ans = 1.
ans =
Brno University of Technology - April 2014 16 / 115
Matrices
1 Introduction 2 Basics 3 Matrices 4 Plotting 5 Programming 6 For MATLAB users 7 Xcos 8 Application to feedback control 9 Classical control design
Brno University of Technology - April 2014 17 / 115
Matrices Defining and handling vectors
u = 0. 1. 2. 3.
v = 0. 0.2 0.4 0.6 0.8 1.
ans = 1. 0.980 0.921 0.825 0.696 0.540
Brno University of Technology - April 2014 18 / 115
Matrices Defining and handling vectors
u = 1. 2. 3.
ans = 6.
ans = 0.5
Brno University of Technology - April 2014 19 / 115
Matrices Defining and handling matrices
A = 1. 2. 3. 4. 5. 6. 7. 8. 9.
Brno University of Technology - April 2014 20 / 115
Matrices Defining and handling matrices
ans = 6.
ans = 4. 5. 6.
ans = 1. 3. 4. 6. 7. 9.
A = 1. 2. 3. 4. 5. 0. 7. 8. 9.
Brno University of Technology - April 2014 21 / 115
Matrices Defining and handling matrices
ans = 2.
ans = 1. 0.
0.5
ans = 1. 2. 3. 0. 5. 6. 0. 0. 9.
Brno University of Technology - April 2014 22 / 115
Matrices Matrix operations
ans = 2. 1. 6. 2.
ans = 1. 0. 0. 1.
ans = 7. 8. 19. 17. 31. 26.
!--error 8 Inconsistent addition.
Brno University of Technology - April 2014 23 / 115
Matrices Matrix operations
ans = 0. 1.
1.225D -16
ans = 1. 1.2214 1.4918 1.8221 2.2255 2.7182
Brno University of Technology - April 2014 24 / 115
Matrices Matrix operations
ans = 20.
11.
ans = 0. 8. 5.
ans = 0. 16. 1. 4.
ans = 1. 1.0178 1.0655 1.1388 1.2364 1.3591
Brno University of Technology - April 2014 25 / 115
Plotting
1 Introduction 2 Basics 3 Matrices 4 Plotting 5 Programming 6 For MATLAB users 7 Xcos 8 Application to feedback control 9 Classical control design
Brno University of Technology - April 2014 26 / 115
Plotting 2D graphics
Brno University of Technology - April 2014 27 / 115
Plotting 2D graphics
Brno University of Technology - April 2014 27 / 115
Plotting 2D graphics
Brno University of Technology - April 2014 28 / 115
Plotting 2D graphics
Brno University of Technology - April 2014 28 / 115
Plotting 3D graphics
Brno University of Technology - April 2014 29 / 115
Plotting 3D graphics
Brno University of Technology - April 2014 29 / 115
Plotting 3D graphics
Z = cos(X).* sin(Y);
Brno University of Technology - April 2014 30 / 115
Plotting 3D graphics
Z = cos(X).* sin(Y);
Brno University of Technology - April 2014 30 / 115
Plotting Overview
Brno University of Technology - April 2014 31 / 115
Plotting Overview
Brno University of Technology - April 2014 32 / 115
Plotting Overview
Brno University of Technology - April 2014 32 / 115
Programming
1 Introduction 2 Basics 3 Matrices 4 Plotting 5 Programming 6 For MATLAB users 7 Xcos 8 Application to feedback control 9 Classical control design
Brno University of Technology - April 2014 33 / 115
Programming Scripts
Brno University of Technology - April 2014 34 / 115
Programming Scripts
Brno University of Technology - April 2014 34 / 115
Programming Scripts
// radius
r = 2; // calculation
area A = 4* %pi*r^2; // calculation
volume V = 4* %pi*r^3/3; disp(A,’Area:’); disp(V,’Volume:’);
Area: 50.265482 Volume: 33.510322
Brno University of Technology - April 2014 35 / 115
Programming Scripts
Brno University of Technology - April 2014 36 / 115
Programming Scripts
x1 =
x = linspace(x1 ,x2 ,n); y = exp (-2*x).* sin (3*x); plot(x,y); disp(’seeplotonthefigure ’);
see plot on the figure
Brno University of Technology - April 2014 37 / 115
Programming Scripts
Brno University of Technology - April 2014 38 / 115
Programming Looping and branching
if (x >=0) then disp("xispositive"); else disp("xisnegative"); end
Brno University of Technology - April 2014 39 / 115
Programming Looping and branching
select i case 1 disp("One"); case 2 disp("Two"); case 3 disp("Three"); else disp("Other"); end
Brno University of Technology - April 2014 40 / 115
Programming Looping and branching
n = 10; for k = 1:n y(k) = exp(k); end
Brno University of Technology - April 2014 41 / 115
Programming Looping and branching
x = 16; while ( x > 1 ) x = x/2; end
Brno University of Technology - April 2014 42 / 115
Programming Looping and branching
tic S = 0; for k = 1:1000 S = S + k; end t = toc (); disp(t); tic N = [1:1000]; S = sum(N); t = toc (); disp(t);
0.029 0.002
Brno University of Technology - April 2014 43 / 115
Programming Functions
y = 0.9738476
N = 11.
Brno University of Technology - April 2014 44 / 115
Programming Functions
Brno University of Technology - April 2014 45 / 115
Programming Functions
function [x1 ,x2] = roots_equ2d (a,b,c) // roots of ax^2 + bx + c = 0 delta = b^2 - 4*a*c x1 = (-b - sqrt(delta ))/(2*a) x2 = (-b + sqrt(delta ))/(2*a) endfunction
r2 =
r1 =
Brno University of Technology - April 2014 46 / 115
Programming Functions
function y = f(x) y = (x+1).* exp (-2*x); endfunction
y = 0.0016773
y = 0.0235828
Brno University of Technology - April 2014 47 / 115
Programming Functions
function z=mytest(x) z = x + a; a = a +1; endfunction
ans = 5.
a = 2.
Brno University of Technology - April 2014 48 / 115
For MATLAB users
1 Introduction 2 Basics 3 Matrices 4 Plotting 5 Programming 6 For MATLAB users 7 Xcos 8 Application to feedback control 9 Classical control design
Brno University of Technology - April 2014 49 / 115
For MATLAB users
http://help.scilab.org/docs/5.4.1/en_US/section_36184e52ee88ad558380be4e92d3de21.html
http://help.scilab.org/docs/5.4.1/en_US/About_M2SCI_tools.html
Eike Rietsch, An Introduction to Scilab from a Matlab User’s Point of View, May 2010 http://www.scilab.org/en/resources/documentation/community
Brno University of Technology - April 2014 50 / 115
For MATLAB users
In MATLAB search with keywords lookfor comments % predefined constants i, pi, inf, true special characters in name of variables continuation of a statement ... flow control switch case otherwise last element of a vector x(end) In Scilab search with keywords apropos comments // predefined constants %i, %pi, %inf, %t special characters in name of variables , #, !, ?, $ continuation of a statement .. flow control select case else last element of a vector x($)
Brno University of Technology - April 2014 51 / 115
For MATLAB users
In MATLAB length, the larger of the number of rows and columns after a first plot, a second one clears the current figure division by a vector >> x = 1/[1 2 3] Error using / Matrix dimensions must agree.
>> [1 2 3] == 1 ans = 1 0 0 >> [1 2 3] == [1 2] Error using == Matrix dimensions must agree. >> [1 2] == [’1’,’2’] ans = 0 0 In Scilab length, the product of the number of rows and columns after a first plot, a second one holds the previous division by a vector
x = 0.0714286 0.1428571 0.2142857 x is solution of [1 2 3]*x = 1
ans = T F F
ans = F
ans = F
Brno University of Technology - April 2014 52 / 115
For MATLAB users
In MATLAB for a matrix A=[1 2 4;4 8 2;6 0 9] >> max(A) ans = 7 8 9 >> sum(A) ans = 12 10 18 disp must have a single argument >> a=3; >> disp([’the result is ’,int2str(a),’ ...bye!’]) the result is 3 ...bye! In Scilab for a matrix A=[1 2 4;4 8 2;6 0 9]
ans = 9.
ans = 36. disp may have several arguments
string(a),’hello!’) hello! the result is 3 3. note that : prettyprint generates the Latex code to represent a Scilab
Brno University of Technology - April 2014 53 / 115
For MATLAB users
In MATLAB
In Scilab
Brno University of Technology - April 2014 54 / 115
For MATLAB users
// a simple script: myscript a = 1 b = a+3; disp(’resultis’+string(b))
Brno University of Technology - April 2014 55 / 115
For MATLAB users
a = 1. result is 4
result is 4
script: myscript
a = 1.
result is 4
Brno University of Technology - April 2014 56 / 115
For MATLAB users
In MATLAB
In Scilab
Brno University of Technology - April 2014 57 / 115
Xcos
1 Introduction 2 Basics 3 Matrices 4 Plotting 5 Programming 6 For MATLAB users 7 Xcos 8 Application to feedback control 9 Classical control design
Brno University of Technology - April 2014 58 / 115
Xcos
R
counterpart of Scilab.
Brno University of Technology - April 2014 59 / 115
Xcos
R
counterpart of Scilab.
Brno University of Technology - April 2014 59 / 115
Xcos
Brno University of Technology - April 2014 60 / 115
Xcos
block sub-palette sinus Sources/GENSIN f gain
scope Sinks/CSCOPE clock Sources/CLOCK c
Brno University of Technology - April 2014 60 / 115
Xcos
Brno University of Technology - April 2014 61 / 115
Xcos
Brno University of Technology - April 2014 62 / 115
Xcos
Brno University of Technology - April 2014 62 / 115
Xcos
block sub-palette sum
gain
integral
scope Sinks/CSCOPE x-y scope Sinks/CSCOPXY clock Sources/CLOCK c
Brno University of Technology - April 2014 63 / 115
Xcos
Brno University of Technology - April 2014 64 / 115
Xcos
Brno University of Technology - April 2014 65 / 115
Xcos
Brno University of Technology - April 2014 65 / 115
Xcos
Brno University of Technology - April 2014 66 / 115
Xcos
Brno University of Technology - April 2014 66 / 115
Application to feedback control
1 Introduction 2 Basics 3 Matrices 4 Plotting 5 Programming 6 For MATLAB users 7 Xcos 8 Application to feedback control 9 Classical control design
Brno University of Technology - April 2014 67 / 115
Application to feedback control A brief review
Brno University of Technology - April 2014 68 / 115
Application to feedback control A brief review
Brno University of Technology - April 2014 69 / 115
Application to feedback control A brief review
Brno University of Technology - April 2014 69 / 115
Application to feedback control A brief review
Brno University of Technology - April 2014 70 / 115
Application to feedback control A brief review
0.5 1 1.5 2 2.5 3 0.5 1 1.5 2 2.5 Step Response Time (sec) Amplitude
Brno University of Technology - April 2014 70 / 115
Application to feedback control A brief review
10
−1
10 10
1
−40 −20 20 Gain (dB) 10
−1
10 10
1
−180 −135 −90 −45 Phase (degre)
pulsation ω
Brno University of Technology - April 2014 71 / 115
Application to feedback control A brief review
Brno University of Technology - April 2014 72 / 115
Application to feedback control A brief review
Brno University of Technology - April 2014 72 / 115
Application to feedback control A brief review
2 2 4 6 8 10 12 0.5 1 1.5 2 2.5 Step Response Time (sec) Amplitude k=1 k=2 k=5 k=0.5
Brno University of Technology - April 2014 73 / 115
Application to feedback control A brief review
s→0 s ˆ
s )
Brno University of Technology - April 2014 74 / 115
Application to feedback control A brief review
s→0 s ˆ
s )
n
n
3 ζωn = 6s.
Brno University of Technology - April 2014 74 / 115
Application to feedback control System analysis in Scilab
G = 1
s + s
ans =
Brno University of Technology - April 2014 75 / 115
Application to feedback control System analysis in Scilab
Brno University of Technology - April 2014 76 / 115
Application to feedback control System analysis in Scilab
+
+
Brno University of Technology - April 2014 77 / 115
Application to feedback control System analysis in Scilab
// series connection ans = 4
2s + s
// parallel connection ans = 8 + 5s
2s + s
// feedback connection ans = s
4 + 2s + s
Brno University of Technology - April 2014 78 / 115
Application to feedback control System analysis in Scilab
F = 2
2 + s + s
ans = 1. 2. 1. 0. 2. 0.
zeta = 0.3535534 0.3535534 wn = 1.4142136 1.4142136
Brno University of Technology - April 2014 79 / 115
Application to feedback control Bode plot
Brno University of Technology - April 2014 80 / 115
Application to feedback control Bode plot
Brno University of Technology - April 2014 80 / 115
Application to feedback control Bode plot
1 1.5 2 2.5 3 3.5 4 4.5 5 −1 −0.5 0.5 1 temps (s) e(t) v(t)
Brno University of Technology - April 2014 81 / 115
Application to feedback control Bode plot
Brno University of Technology - April 2014 82 / 115
Application to feedback control Bode plot
Brno University of Technology - April 2014 82 / 115
Application to feedback control Bode plot
1 jωC 1 jωC + R =
Brno University of Technology - April 2014 82 / 115
Application to feedback control Bode plot
−30 −25 −20 −15 −10 −5 5
Magnitude (dB)
10
−1
10 10
1
10
2
−90 −45
Phase (deg) Bode Diagram Frequency (rad/sec)
Brno University of Technology - April 2014 83 / 115
Application to feedback control Bode plot
−30 −25 −20 −15 −10 −5 5
Magnitude (dB)
10
−1
10 10
1
10
2
−90 −45
Phase (deg) Bode Diagram Frequency (rad/sec)
ω = 8
Brno University of Technology - April 2014 83 / 115
Application to feedback control Bode plot
10 15 20 25 30 35 40 45 −1 −0.5 0.5 1
temps (s)
e(t) (ω=0.8) v(t)
Brno University of Technology - April 2014 84 / 115
Application to feedback control Bode plot
10 15 20 25 30 35 40 45 −1 −0.5 0.5 1
temps (s)
e(t) (ω=0.8) v(t) 2 3 4 5 6 7 8 9 10 −1 −0.5 0.5 1
temps (s)
e(t) (ω=4) v(t)
Brno University of Technology - April 2014 84 / 115
Application to feedback control Bode plot
10 15 20 25 30 35 40 45 −1 −0.5 0.5 1
temps (s)
e(t) (ω=0.8) v(t) 2 3 4 5 6 7 8 9 10 −1 −0.5 0.5 1
temps (s)
e(t) (ω=4) v(t) 3 3.5 4 4.5 5 5.5 6 6.5 7 −1 −0.5 0.5 1
temps (s)
e(t) (ω=8) v(t)
Brno University of Technology - April 2014 84 / 115
Application to feedback control Bode plot
10 15 20 25 30 35 40 45 −1 −0.5 0.5 1
temps (s)
e(t) (ω=0.8) v(t) 2 3 4 5 6 7 8 9 10 −1 −0.5 0.5 1
temps (s)
e(t) (ω=4) v(t) 3 3.5 4 4.5 5 5.5 6 6.5 7 −1 −0.5 0.5 1
temps (s)
e(t) (ω=8) v(t) 10 10.1 10.2 10.3 10.4 10.5 10.6 10.7 10.8 −1 −0.5 0.5 1 e(t) (ω=40) v(t)
Brno University of Technology - April 2014 84 / 115
Application to feedback control Bode plot
−25 −20 −15 −10 −5 5
Magnitude (dB)
10
−1
10 10
1
10
2
−90 −45
Phase (deg) Bode Diagram Frequency (rad/sec)
Brno University of Technology - April 2014 85 / 115
Application to feedback control Bode plot
Frequency analysis consists in studying the response of a LTI system with sine inputs
Y(s) U(s)
u(t) = u0 sin(ωt) u(t) = u0 sin(ωt) y(t) = y0 sin(ωt+φ) y(t) = y0 sin(ωt+φ)
Brno University of Technology - April 2014 86 / 115
Application to feedback control Bode plot
Frequency analysis consists in studying the response of a LTI system with sine inputs
Y(s) U(s)
u(t) = u0 sin(ωt) u(t) = u0 sin(ωt) y(t) = y0 sin(ωt+φ) y(t) = y0 sin(ωt+φ)
2 4 6 8 10 12 14 16 18 20 −1 −0.5 0.5 1 1.5
T T ∆ t
The output signal is also a sine with the same frequency, but with a different magnitude and a different phase angle.
Brno University of Technology - April 2014 86 / 115
Application to feedback control Bode plot
Brno University of Technology - April 2014 87 / 115
Application to feedback control Bode plot
Brno University of Technology - April 2014 87 / 115
Application to feedback control Bode plot
Brno University of Technology - April 2014 88 / 115
Application to feedback control Bode plot
we express F(jω) = 1/2 jω + 1 for ω = 0.05 rad/s : |F(j0.05)| = 0.5 and arg F(j0.05) = −2.86◦. for ω = 1.5 rad/s : |F(j1.5)| = 0.277 and arg F(j1.5) = −56.3◦. for ω = 10 rad/s : |F(j10)| = 0.05 and arg F(j10) = −84.3◦.
Brno University of Technology - April 2014 88 / 115
Application to feedback control Bode plot
50 100 150 200 250 300 350 400 450 500 −1 −0.5 0.5 1
u1(t) y1(t)
2 4 6 8 10 12 14 16 −1 −0.5 0.5 1
u2(t) y2(t)
0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 −1 −0.5 0.5 1
u3(t) y3(t)
Brno University of Technology - April 2014 89 / 115
Application to feedback control Bode plot
Bode diagram : it plots the gain and the phase shift w.r.t. the frequency ω the gain is expressed as decibels : gain dB = 20 log y0
u0
property : the Bode diagram of F(s)G(s) is the sum of the one of F(s) and the one of G(s). in Scilab, the instruction bode(F) plots the Bode diagram of F(s).
Brno University of Technology - April 2014 90 / 115
Application to feedback control Bode plot
Bode diagram : it plots the gain and the phase shift w.r.t. the frequency ω the gain is expressed as decibels : gain dB = 20 log y0
u0
property : the Bode diagram of F(s)G(s) is the sum of the one of F(s) and the one of G(s). in Scilab, the instruction bode(F) plots the Bode diagram of F(s).
Brno University of Technology - April 2014 90 / 115
Application to feedback control Simulation with Xcos
Brno University of Technology - April 2014 91 / 115
Application to feedback control Simulation with Xcos
block sub-palette step Sources/STEP FUNCTION sum
gain
transfert function
scope Sinks/CSCOPE clock Sources/CLOCK c
Brno University of Technology - April 2014 91 / 115
Classical control design
1 Introduction 2 Basics 3 Matrices 4 Plotting 5 Programming 6 For MATLAB users 7 Xcos 8 Application to feedback control 9 Classical control design
Brno University of Technology - April 2014 92 / 115
Classical control design
Brno University of Technology - April 2014 93 / 115
Classical control design Loopshaping
Brno University of Technology - April 2014 94 / 115
Classical control design Loopshaping
Brno University of Technology - April 2014 95 / 115
Classical control design Loopshaping
Brno University of Technology - April 2014 96 / 115
Classical control design Loopshaping
Brno University of Technology - April 2014 97 / 115
Classical control design Loopshaping
Brno University of Technology - April 2014 98 / 115
Classical control design Loopshaping
Brno University of Technology - April 2014 98 / 115
Classical control design Loopshaping
Brno University of Technology - April 2014 99 / 115
Classical control design Phase lag controller
Brno University of Technology - April 2014 100 / 115
Classical control design Phase lag controller
Brno University of Technology - April 2014 100 / 115
Classical control design Phase lag controller
Brno University of Technology - April 2014 101 / 115
Classical control design Phase lag controller
3k = 0.1
Brno University of Technology - April 2014 101 / 115
Classical control design Phase lag controller
−80 −60 −40 −20 20
Magnitude (dB)
10
−2
10
−1
10 10
1
10
2
−180 −135 −90 −45
Phase (deg) Bode Diagram Frequency (rad/s)
Brno University of Technology - April 2014 102 / 115
Classical control design Phase lag controller
10
−2
10
−1
10 10
1
10
2
−180 −135 −90 −45
Phase (deg) Bode Diagram Frequency (rad/s)
−80 −60 −40 −20 20
Magnitude (dB)
Brno University of Technology - April 2014 102 / 115
Classical control design Phase lag controller
Brno University of Technology - April 2014 103 / 115
Classical control design Phase lag controller
Brno University of Technology - April 2014 103 / 115
Classical control design Phase lag controller 10
−2
10
−1
10 10
1
10
2
−180 −135 −90 −45
Phase (deg) Bode Diagram Frequency (rad/s)
−80 −60 −40 −20 20
Magnitude (dB)
Brno University of Technology - April 2014 104 / 115
Classical control design Phase lag controller −80 −60 −40 −20 20
Magnitude (dB)
10
−3
10
−2
10
−1
10 10
1
10
2
−180 −135 −90 −45
Phase (deg) Bode Diagram Frequency (rad/s)
G(s) kG(s) kC(s)G(s)
Brno University of Technology - April 2014 104 / 115
Classical control design Phase lag controller
Brno University of Technology - April 2014 105 / 115
Classical control design Phase lag controller
1 2 3 4 5 6 0.2 0.4 0.6 0.8 1 1.2 1.4
Step Response Time (seconds) Amplitude
Brno University of Technology - April 2014 105 / 115
Classical control design Phase lead controller
Brno University of Technology - April 2014 106 / 115
Classical control design Phase lead controller
Brno University of Technology - April 2014 106 / 115
Classical control design Phase lead controller
Brno University of Technology - April 2014 107 / 115
Classical control design Phase lead controller
Brno University of Technology - April 2014 108 / 115
Classical control design Phase lead controller
5 10 15 20 25 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
Step Response Time (seconds) Amplitude
−40 −20 20 40 60
Magnitude (dB)
10
−2
10
−1
10 10
1
−180 −135 −90
Phase (deg) Bode Diagram Frequency (rad/s)
Brno University of Technology - April 2014 108 / 115
Classical control design Phase lead controller
Brno University of Technology - April 2014 109 / 115
Classical control design Phase lead controller
Brno University of Technology - April 2014 109 / 115
Classical control design Phase lead controller
5 10 15 20 25 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
Step Response Time (seconds) Amplitude
−40 −20 20 40 60
Magnitude (dB)
10
−2
10
−1
10 10
1
−180 −135 −90
Phase (deg) Bode Diagram Frequency (rad/s)
Brno University of Technology - April 2014 110 / 115
Classical control design Phase lead controller
5 10 15 20 25 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
Step Response Time (seconds) Amplitude
−100 −50 50 100
Magnitude (dB)
10
−2
10
−1
10 10
1
10
2
−180 −135 −90
Phase (deg) Bode Diagram Frequency (rad/s)
Brno University of Technology - April 2014 110 / 115
Classical control design PID controller
s + kds
1 τis)(1 + τds)
Brno University of Technology - April 2014 111 / 115
Classical control design PID controller
Brno University of Technology - April 2014 112 / 115
Classical control design PID controller
Brno University of Technology - April 2014 113 / 115
Classical control design PID controller
Brno University of Technology - April 2014 114 / 115
Classical control design PID controller
Brno University of Technology - April 2014 115 / 115