Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
Fractional Order Controls A Beginner’s Point of View
Zhuo Li [email protected] 5/15/2012
Outlines • Key Techniques • Backgrounds • Distributed Order • Approximation and Discretization • Tools in Matlab • IOPID, FOPI, FO[PI], DOPI and DO[PI] • My ECE5320 MAD Report • My Views on the 3 Tuning Equations • Proposed Approach • Some Results
2
Weird Things to Me!
• For me, these are the barriers between a beginner and TD, FO, DO.
• 𝑒𝑒−𝑠𝑠𝑠𝑠How can the “s” climb up to e? (9/2011)
• 𝐷𝐷0.5
𝐷𝐷𝑡𝑡0.5 = 𝑠𝑠0.5 = (𝑗𝑗𝜔𝜔)0.5First time in my life heard about FOC. (10/2011)
• ∫ 1𝑠𝑠𝛼𝛼𝑑𝑑𝛼𝛼 = 𝑠𝑠−𝑎𝑎−𝑠𝑠−𝑏𝑏
ln (𝑠𝑠)𝑏𝑏𝑎𝑎 What is this? (5/2012)
• ln (𝑗𝑗𝜔𝜔)Complex logarithm. Never heard! (5/2012)
3
Time Delay
4
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
10 dB
-20 dB
-10 dB
-6 dB
-4 dB-2 dB
20 dB
10 dB
6 dB
4 dB2 dB
Nyquist Diagram
Real Axis
Imag
inar
y Ax
is
NyquistCurve of 𝐺𝐺 𝑠𝑠 = 𝑒𝑒−𝑠𝑠
-1
-0.5
0
0.5
1
Mag
nitu
de (d
B)
10-1
100
101
102
-5760-5040-4320-3600-2880-2160-1440-720
0
Phas
e (d
eg)
Bode Diagram
Frequency (rad/s)
Bode Plot of 𝐺𝐺 𝑠𝑠 = 𝑒𝑒−𝑠𝑠
Key techniques
• Recall Euler's formula 𝑒𝑒𝑗𝑗𝜔𝜔 = cos 𝜔𝜔 + 𝑗𝑗𝑠𝑠𝑗𝑗𝑗𝑗(𝜔𝜔)
• 𝑒𝑒𝑠𝑠 = 𝑒𝑒𝑗𝑗𝜔𝜔 Now, we can deal with it.
• 𝑗𝑗 = cos 𝜋𝜋2
+ 𝑗𝑗𝑠𝑠𝑗𝑗𝑗𝑗 𝜋𝜋2
= 𝑒𝑒𝜋𝜋2𝑗𝑗
• (𝑗𝑗)𝛼𝛼≜ 𝑒𝑒𝜋𝜋2𝑗𝑗𝛼𝛼 = cos 𝜋𝜋
2𝛼𝛼 + 𝑗𝑗𝑠𝑠𝑗𝑗𝑗𝑗 𝜋𝜋
2𝛼𝛼 (5/2012)
• ln 𝑗𝑗𝜔𝜔 = ln 𝜔𝜔 + ln (𝑒𝑒𝜋𝜋2𝑗𝑗)(5/2012)
5
Control Engineer’s View
• With these basic techniques, we can further deal with the analysis in frequency domain.
• IOPID • FO𝑃𝑃𝑃𝑃𝛼𝛼, FO[𝑃𝑃𝑃𝑃]𝛼𝛼 • DO𝑃𝑃𝑃𝑃𝛼𝛼, DO[𝑃𝑃𝑃𝑃]𝛼𝛼
6 Board writing by Dr. Y.Q. Chen
Background
7 Slide from: Dr. Yangquan Chen and Dr. Igor Podlubny.
Fact
• FOC depicts most physical phenomenon more precisely.
• Superior to Integer order in a lot of cases
8
Three Common Definitions
• Riemann-Liouville derivative
• Grünwald-Letnikov derivative
• Caputo fractional derivative
9
Two Important Functions
Source, “Engineering Education and Research Using MATLAB”, INTECK, editor Ali H. Assi, Chapter10, Ivo Petráš, 2011.
In Matlab, y=gamma(x)
[e]=mlf(alf,bet,c,fi) f=gml_fun(a,b,c,x,eps0)
10
Gamma function
Mittag-Leffler function
Approximating FO using IO
• Discretization z-transform
11 [♠] Y.Q. Chen, Ivo Petr´aˇs and D.Y. Xue, “Fractional Order Control - A Tutorial”, ACC, 2009.
[♠]
Discrete Approximation - PSE • Generating function
𝜔𝜔 𝑧𝑧−1 = 21 − 𝑧𝑧−1
1 + 𝑧𝑧−1
The forward method is not suitable for cause problems
Grünwald-Letnikov method
12
Discrete Approximation - CFE
13 User and programmer manual, Ninteger v. 2.3 Fractional control toolbox for MatLab. Universidade Técnica De Lisboa Instituto Superior Técnico, 2005
Discrete Approximation – irid
• Impulse-response invariant discretization (IRID) method
• The approximated discrete time model matches the impulse response of the DO model precisely at every sampling point.
14
• FIR, IIR • e.g.
Realization
15 [*] Y.Q. Chen, Ivo Petr´aˇs and D.Y. Xue, “Fractional Order Control - A Tutorial”, ACC, 2009.
Figure from [*]
• Definition of Distributed Order FO Integrator/differentiator [*]
• Analytical Solution [**]
Distributed Order
16
[*] H. Sheng, Y.Q. Chen, T.S. Qiu, “Fractional Processes and Fractional-order Signal processing”, Springer, 2012. [**] F.Y. Zhou, Y. Zhao, Y. Li, Y.Q. Chen, “An Implementation of Distributed Order PI Controller and Its Applications to the Wheeled Service Robot”, ACC13 Submission.
�𝟏𝟏𝒔𝒔𝜶𝜶 𝒅𝒅𝜶𝜶 =
𝒔𝒔−𝒂𝒂 − 𝒔𝒔−𝒃𝒃
𝒍𝒍𝒍𝒍 (𝒔𝒔)
𝒃𝒃
𝒂𝒂
𝓛𝓛−𝟏𝟏 �𝟏𝟏𝒔𝒔𝜶𝜶 𝒅𝒅𝜶𝜶
𝒃𝒃
𝒂𝒂=
𝟏𝟏𝟐𝟐𝟐𝟐𝟐𝟐� 𝒆𝒆𝒔𝒔𝒔𝒔
𝝈𝝈+𝟐𝟐𝒊
𝝈𝝈−𝟐𝟐𝒊
𝒔𝒔−𝒂𝒂 − 𝒔𝒔−𝒃𝒃
𝒍𝒍𝒍𝒍 (𝒔𝒔) 𝒅𝒅𝒔𝒔
Available Tools in Matlab
17
Toolbox Names Authors
Ninteger Toolbox Duarte Valério
Crone Toolbox CRONE Team
@fotf Toolbox Dr. Dingyu Xue
Irid_doi(), gml_fun, FOCP, nilt (non-integer order inverse Laplace) ora_foc(), etc.
Dr. Yangquan Chen, Hu Sheng, and Christophe Tricaud, et al.
mlf(), etc. Dr. Igor Podlubny
dfod1(), dfod1(), dfod1(), DFOC, etc. Dr. Ivo Petras
fderiv() F. M. Bayat
etc. etc.
Demos
18
%% ninteger Toolbox G_nid = nid(1, 0.5, [1e-3 1e4], 10, 'crone') figure(5) step(G_nid) figure(6) bodeFr(G_nid)
10-6
10-4
10-2
100
102
104
106
-50
0
50Bode diagram
frequency / rad s-1ga
in /
dB
10-6
10-4
10-2
100
102
104
106
0
20
40
60
phas
e / ?
0 0.05 0.1 0.150
20
40
60
80
100
120Step Response
Time (seconds)
Ampl
itude
Half order differentiator 𝑠𝑠0.5
10dB/dec
Demos
19
%% ora_foc() by Christophe Tricaud sys=ora_foc(-0.5,3,0.01,100) figure(3) step(sys) figure(4) bode(sys)
-30
-20
-10
0
10
20
30
Mag
nitu
de (d
B)
10-4
10-2
100
102
104
-60
-30
0Ph
ase
(deg
)
Bode Diagram
Frequency (rad/s)
0 500 1000 1500 2000 2500 3000 3500 4000 4500 50000
5
10
15
20
25
30
35Step Response
Time (seconds)
Ampl
itude
Half order itegrator 1𝑠𝑠0.5
-10dB/dec
Demos
20
%% dfod1() by Dr. Ivo Petras sys=dfod1(50, 0.001, 1/3, 0.5) figure(1) bode(sys) sys_c=d2c(sys) figure(2) step(sys_c)
10
15
20
25
30
35
40
Mag
nitu
de (d
B)
100
101
102
103
104
0
30
60Ph
ase
(deg
)
Bode Diagram
Frequency (rad/s)
0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.040
5
10
15
20
25
30
35
40Step Response
Time (seconds)
Ampl
itude
Half order differentiator 𝑠𝑠0.5
Demos
21
%% dfod1(), Ivo's demo T=0.1; a=1/3; z=tf('z',T,'variable','z^-1'); Hz=((1+a)/T)*((1-z^-1)/(1+a*z^-1)); Gz_DCM=0.08/(Hz*(0.05*Hz+1)); % DC modtor plant Cz=0.625*dfod1(5,T,a,0.5)+12.5*dfod1(5,T,a,-0.5); % controller Gz_close=(Gz_DCM*Cz)/(1+(Gz_DCM*Cz)); figure(6); step(Gz_close,15);grid; Gz_open=(Gz_DCM*Cz); figure(7); bode(Gz_open); [Gm,Pm] = margin(Gz_open);
-50
0
50
Mag
nitu
de (d
B)
10-2
10-1
100
101
102
-180
-135
-90
-45
0
45
Phas
e (d
eg)
Bode Diagram
Frequency (rad/s)
0 5 10 150
0.2
0.4
0.6
0.8
1
1.2
1.4Step Response
Time (seconds)
Ampl
itude
Demos
22
%% mlf(), time domain solution using Mittag-leffler, Dr.Igor Podlubny clear all; close all; a=2; b=1; alpha=1.5; t=0:0.001:20; % for time step 0.001 and computational time 20 sec y=(1/a)*t.^(alpha).*mlf(alpha,alpha+1,((-b/a)*t.^(alpha))); figure(5) plot(t,y); xlabel('Time [sec]'); ylabel('y(t)');grid; 0 2 4 6 8 10 12 14 16 18 20
0
0.2
0.4
0.6
0.8
1
1.2
1.4
Time [sec]
y(t)
Demos
23
%% fotf() Dr.Dingyu Xue b = [-2 4]; a = [2 3.8 2.6 2.5 1.5]; nb = [0.63 0]; na =[3.5 2.4 1.8 1.3 0]; t = 0:0.5:28; G = fotf(a,na,b,nb) yi = step(G,t); figure(6); hold on; plot(t,yi,'g'); 0 5 10 15 20 25 30
0
0.5
1
1.5
2
2.5
3
3.5
Demos
24
%% FO derivative sine wave, using fderiv() by Bayat h=0.01; t=0:h:2*pi; y=sin(t); order=0:0.1:1; for i=1:length(order) yd(i,:)=fderiv(order(i),y,h); end [X, Y]=meshgrid(t,order); mesh(X,Y,yd) xlabel('t'); ylabel('\alpha'); zlabel('y')
02
46
8
0
0.5
1-1
-0.5
0
0.5
1
tα
y
Demos
25
%% irid_doi(), By Dr.Y Li, Dr.YQ Chen Impulse response invariant discretization of distributed order integrator doi=irid_doi(0.01,0.75,1,5,5);
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10
0.5
1
Time
Impu
lse
resp
onse
impulse response of ∫abs-αdα
approximated impulse response
10-1
100
101
102
103
104
-100
-50
0
50
Frequency (Hz)M
agni
tude
(dB
)
mag. Bode of ∫abs-αdα
approximated mag. Bode
10-1
100
101
102
103
104
-100
0
100
Frequency (Hz)
Pha
se (d
egre
es)
phase Bode of ∫abs-αdα
approximated phase Bode
�1𝑠𝑠𝛼𝛼
𝑏𝑏
𝑎𝑎𝑑𝑑𝛼𝛼,
a, b ∈ 0.5, 1 , 𝑎𝑎 < 𝑏𝑏
Three-parameter-tunable Controllers
• IOPID
• FOPI
• FO[PI]
• DOPI
• DO[PI]
26
C s = Kp +𝐾𝐾𝑖𝑖𝑠𝑠 + Kds
C s = Kp(1 +𝐾𝐾𝑖𝑖𝑠𝑠𝛼𝛼)
C s = (Kp +𝐾𝐾𝑖𝑖𝑠𝑠 )𝛼𝛼
C s = � Kp(1 +1𝑇𝑇𝑖𝑖𝑠𝑠
)𝛼𝛼𝑏𝑏
0𝑑𝑑𝛼𝛼
C s = Kp + K𝑖𝑖 �1𝑠𝑠𝛼𝛼
𝑏𝑏
0𝑑𝑑𝛼𝛼 = Kp + K𝑖𝑖
1 − 𝑠𝑠−𝑏𝑏
ln (𝑠𝑠)
Tuning Rules
• Idea: given ϕm, ω𝑐𝑐 , obtain flat phase at ω𝑐𝑐
• ∠G jω = ∠C jωc + ∠P jωc = −π + ϕm
• G jω = C jω𝑐𝑐 P jω𝑐𝑐 = 0𝑑𝑑𝑑𝑑
• 𝑑𝑑∠G jω𝑑𝑑ω
�ω=ω𝑐𝑐
= 0
27
Procedure
• Separate the real and imaginary part of P j𝜔𝜔 andC j𝜔𝜔 , (for each controller C j𝜔𝜔 ) – using the techniques on slide 4
• Calculate the gain and phase • Solve the 3 equations numerically
– Get Kp, Ki, 𝛼𝛼
• Digital simulation and implementation – Using the tools on slide 16.
28
My ECE5320 MAD Report
29
My ECE5320 MAD Report
30
My ECE5320 MAD Report
31
My ECE5320 MAD Report
32
My ECE5320 MAD Report
33
My ECE5320 MAD Report
34
0 0.5 1 1.5 2 2.5 3 3.5
x 105
25
30
35
40
45
50
55
60
65
70
75
0 0.5 1 1.5 2 2.5
x 105
25
30
35
40
45
50
55
60
65
70
PID
FOPI
FO[PI]
My views on the 3 Eq. • Allowing users to specify the Gain cross-over frequency 𝜔𝜔𝑐𝑐 gives the user
too much freedom. Barely using anyone of the above five controllers cannot always satisfy this strong design constraint. More specifically, in most cases, for sure there is an 𝜔𝜔𝑐𝑐, and there is an 𝜔𝜔𝑑𝑑 at which the phase plot is flat.
𝑑𝑑∠𝐺𝐺(𝑗𝑗𝜔𝜔)𝑑𝑑𝜔𝜔
= 0. By adjusting the 3 tunable parameters, these two frequencies can be aligned, meaning that they match each other. However, they cannot be aligned at arbitrary frequency. As we can see from the Bode plot of the plant, the time delay pulls down the phase plot too quickly at high frequency, which gives us less time to regulate the plant. At the meanwhile, all of the 5 controllers provide limit phase compensation at high frequency, which is powerless to bring the phase back from −∞. This can be seen clearly from the Bode plot of the controllers. Hence, if the desired 𝜔𝜔𝑐𝑐 is assigned "too late", obtaining a "flat phase" at 𝜔𝜔𝑐𝑐 becomes impossible.
35
My views on the 3 Eq.
36
• The above statement has shown that freely defining 𝜔𝜔𝑐𝑐 by user is already a “luxurious service”. In spite of this, allowing users to specify the phase margin 𝜙𝜙𝑚𝑚 is another strong requirement. The point where 𝜔𝜔𝑐𝑐 and 𝜔𝜔𝑑𝑑 are aligned is not guaranteed to provide the desired phase margin. The Bode plot of a given plant is fixed. The shape of the phase plot of a given controller is also determined. As an example, let's see fig 1 and fig 2. For 𝜆𝜆 ∈ 0~1 , the FOPI is able to provide −90° phase compensation at the most. If the 𝜙𝜙𝑚𝑚 is assigned to be 50° at 𝜔𝜔 <0.01 𝑟𝑟𝑎𝑎𝑑𝑑/𝑠𝑠, then, it is obvious the demand cannot be meet, unless using 𝜆𝜆 > 1.
My views on the 3 Eq.
37
• Either one of the above 2 design specifications may make the 3 tuning equations unsolvable. Combining them together, the 3 tuning equations is possible to become contradictory.
• For some combinations of plant and controller, there may not exist a "flat phase".
Proposed Approach
38
• instead of specifying 𝜔𝜔𝑐𝑐, 𝜙𝜙𝑚𝑚, and exactly solving the 3 equations, we can try to align 𝜔𝜔𝑑𝑑 with 𝜔𝜔𝑐𝑐 first, then manually examine the phase margin.
10-3
10-2
10-1
100
101
102
-50
0
50
100
150Loop transfer function with FOPIλ
10-3
10-2
10-1
100
101
102
-300
-200
-100
0
Some Results
39
10-3
10-2
10-1
100
101
102
-20
0
20
40
X: 26.13Y: 0.04891
FO model of the HFE plant
10-3
10-2
10-1
100
101
102
-300
-200
-100
0
ωcFig1. The FO plant 𝑷𝑷 𝒔𝒔 = 𝑲𝑲
𝑻𝑻𝒔𝒔𝒂𝒂+𝟏𝟏𝒆𝒆−𝑳𝑳𝒔𝒔
K =66.16; T =12.73; L = 1.93; % time delay a=0.5; % alpha
10-3
10-2
10-1
100
101
102
-20
0
20
40
60FOPIλ controller
10-3
10-2
10-1
100
101
102
-100
-50
0
Fig2. FOPI controller with initially guessed parameters Kp_fopi=0.8812; Ki_fopi=0.3153; lambda = 1.082;
Some Results
40
These set of parameters are obtained without specifying phase margin. Kp = 0.2535 Ki = 0.3630 𝜆𝜆 = 1.5338 Pm_fopi = 22.9815
10-3
10-2
10-1
100
101
102
-50
0
50
100
150Loop transfer function with FOPIλ
10-3
10-2
10-1
100
101
102
-300
-200
-100
0
Some Results
41
These set of parameters are obtained withspecifying phase margin to be 𝜙𝜙𝑚𝑚 = 50°. Kp = 0.0501 Ki = 0.3815 𝜆𝜆 = 1.0618 Pm_fopi = 50.0000°.
10-3
10-2
10-1
100
101
102
-50
0
50
100Loop transfer function with FOPIλ
10-3
10-2
10-1
100
101
102
-300
-200
-100
0
Some Results
42
These set of parameters are obtained withspecifying phase margin to be 𝜙𝜙𝑚𝑚 = 50°. And aligning wc with phase_min. Kp = 0.0241 Ki = 0.3821 𝜆𝜆 =1.0614 Pm_fopi = 50.0000°.
10-3
10-2
10-1
100
101
102
-50
0
50
100Loop transfer function with FOPIλ
10-3
10-2
10-1
100
101
102
-300
-200
-100
0
Some Results
43
Some Results
44
10-3
10-2
10-1
100
101
102
-20
0
20
40
60Loop transfer function with initial attampted DOPIα
10-3
10-2
10-1
100
101
102
-300
-200
-100
0
Bode plot of loop transfer function with an arbitrary guessed DOPI Kp_dopi=1;
Ki_dopi=0.5; b_dopi=0.8;
10-3
10-2
10-1
100
101
102
-60
-40
-20
0
20Tuned DOPIα controller
10-3
10-2
10-1
100
101
102
0
50
100
150
Some Results
45
10-3
10-2
10-1
100
101
102
-100
-50
0
50Loop transfer function with DOPI
10-3
10-2
10-1
100
101
102
-300
-200
-100
0
100
The tuning fails by using DOPI. This confirms that for some plant, this tuning rule has no solution x_dopi = 0.0075 -0.0180 1.1039
10-3
10-2
10-1
100
101
102
0
10
20
30DOPIα controller with initial guessed parameters
10-3
10-2
10-1
100
101
102
-60
-40
-20
0
10-3
10-2
10-1
100
101
102
-20
0
20
40
X: 26.13Y: 0.04891
FO model of the HFE plant
10-3
10-2
10-1
100
101
102
-300
-200
-100
0
ωc
Some Results
46
Bode plot of loop transfer function with tuned IOPID x_pid = 0.0048 0.0102 0.8440
10-3
10-2
10-1
100
101
102
-50
0
50
100Loop transfer function with IOPID
10-3
10-2
10-1
100
101
102
-300
-200
-100
0
100Phase margin is: 211.1609
error = abs(wc-wd(end)) + abs(Pm-50)
Some Results
47
Bode plot of loop transfer function with tuned IOPID x_pid = 0.0048 0.0102 0.8440
error = abs(wc-wd(end)) + abs(Pm-50)
Future Work
48
• Mathematically show for what type of plants the 3 tuning equations are not applicable
• Implementing the 5 controllers on varieties of plant models.
Acknowledgements
49
• Dr. Yangquan Chen • Hadi Malek • Dr. Luo Ying • Calvin Coopmans
Q&A
50
I
O P I
[PI]