授業

Advanced Automation

[lecture #1] 2017.9.7 outline of the lecture, review of classical and modern control theory (1/3)

%-- 2017/09/07 13:29 --%
s = tf('s')
P = 1/(s-1)
pole(P)
impulse(P)
Tyr = feedback(P*k, 1)
k = 2
Tyr = feedback(P*k, 1)
P
Tyr = feedback(P*k, 1)
step(Tyr)
k = 0.5
Tyr = feedback(P*k, 1)
step(Tyr)
k = 10
Tyr = feedback(P*k, 1)
step(Tyr)

[lecture #2] 2017.9.14 review of classical and modern control theory (2/3) with introduction of Matlab/Simulink

  1. introduction of Matlab and Simulink filetext_fixed.pdf Basic usage of MATLAB and Simulink used for 情報処理演習及び考究II/Consideration and Practice of Information Processing II: Advanced Course of MATLAB
  1. system representation: Transfer Function(TF) / State-Space Representation (SSR)
    • example: mass-spring-damper system
    • difinition of SSR
    • from SSR to TF
    • from TF to SSR: controllable canonical form
  2. open-loop characteristic
    • open-loop stability: poles and eigenvalues
    • Bode plot and frequency response fileex0914_1.m filemod0914_1.mdl
      • cut off frequency; DC gain; -40dB/dec; variation of c
      • relation between P(jw) and steady-state response
  3. closed-loop stability
    • Nyquist stability criterion (for L(s):stable)
    • Nyquist plot fileex0914_2.m filemod0914_2.mdl
      • Gain Margin(GM); Phase Margin(PM)
%-- 2017/09/14 13:05 --%
a = 1
who
a + 2
demo
lookfor demo
demo toolbox
demo toolbox]
demo toolbox
t = [1, 2, 3]
t = [1 2 3]
u = [1; 2; 3]
t
t'
penddemo
help penddemo
penddemo
ls
ex0914_1
who
P

[lecture #3] 2017.9.21 review of classical and modern control theory (3/3)

  1. LQR problem
    • controllability
    • cost function J >= 0
    • (semi)-positive definiteness
  2. solution of LQR problem
    • ARE and quadratic equation
    • closed loop stability ... Lyapunov criterion
    • Jmin filelqr.pdffileproof4.pdf (from B3「動的システムの解析と制御」)
  3. example fileex0921_1.m filemod0921_1.mdl
%-- 2017/09/21 13:17 --%
ex0921_1
B
A
A*B
P
eig(P)
F
J
x0
x0'*P*x0

[lecture #4] 2017.9.28 relation between LQR and H infinity control problem (1/2)

  1. a simple example relating LQR and H infinity control problems
    • For given plant G \[ G = \left[\begin{array}{c|c:c} a & 1 & b \\ \hline \sqrt{q} & 0 & 0 \\ 0 & 0 & \sqrt{r} \\ \hdashline 1 & 0 & 0 \end{array} \right] = \left\{ \begin{array}{l} \dot x = ax + bu + w\\ z = \left[ \begin{array}{c} \sqrt{q} x \\ \sqrt{r} u \end{array}\right] \\ x = x \end{array}\right. \] with zero initial state value x(0) = 0, find a state-feedback controller \[ u = -f x \] such that \begin{eqnarray} (i) &&\quad \mbox{closed loop is stable} \\ (ii) &&\quad \mbox{minimize} \left\{\begin{array}{l} \| z \|_2 \mbox{ for } w(t) = \delta(t) \quad \mbox{(LQR, $H_2$ control)} \\ \| T_{zw} \|_\infty \mbox{($H_\infty$ control problem)}\end{array}\right. \end{eqnarray}
    • comparison of norms in (ii) (for a = -1, b = 1, q = 1, r = 1) \[ \begin{array}{|c||c|c|}\hline & \mbox{LQR}: f=-1+\sqrt{2} & \quad \quad H_\infty: f=1\quad\quad \\ \hline\hline J=\|z\|_2^2 & & \\ \hline \|T_{zw}\|_\infty & & \\ \hline \end{array} \]
  2. an alternative description to LQR problem
    1. J = (L2 norm of z)^2
    2. impulse resp. with zero initial value = initial value resp. with zero disturbance
  3. definition of H infinity norm (SISO)
    s = tf('s');
    P1 = 1/(s+1);
    bode(P1);
    norm(P1, 'inf')
    P2 = 1/(s^2 + 0.1*s + 1);
    bode(P2);
    norm(P2, 'inf')
  4. definition of H infinity norm (SIMO)
  5. solve the problem by hand
  6. solve the problem by tool(hinfsyn) fileex0928.m
%-- 2017/09/28 13:40 --%
s = tf('s');
P1 = 1/(s+1);
bode(P1);
norm(P1, 'inf')
P1
norm(P1, 'inf')
P2 = 1/(s^2 + 0.1*s + 1);
bode(P2)
grid on
norm(P3, 'inf')
norm(P2, 'inf')
format long e
norm(P2, 'inf')
ex0928
ex0929
ex0928
f
K
dcgain(K)
gopt
1/sqrt(29
1/sqrt(2)
gopt

[lecture #5] 2017.10.5 relation between LQR and H infinity control problem (2/2)

  1. complete the table in simple example
  2. confirm the cost function J for both controllers by simulation filemod1005.mdl
    • block diagram in the simulink model
    • how to approximate impulse disturbance
    • impulse disturbance resp. with zero initial condition = initial condition resp. with zero disturbance
  3. confirm the closed-loop H infinity norm for both controllers by simulation
    • H infinity norm = L2 induced norm
    • review: steady-state response; the worst-case disturbance w(t) which maximizes L2 norm of z(t) ?
    • what is the worst-case disturbance in the simple example ?
  4. general state-feedback case: filehinf.pdf
    • includes the simple example as a special case
    • LQR filelqr.pdf is included as a special case in which gamma -> infinity, w(t) = 0, B2 -> B, and non-zero x(0) are considered

!!! the remaining page is under construction (the contents below are from 2016) !!!

%-- 2016/10/06 13:09 --%
1/sqrt(2)
sqrt(2+sqrt(2))
sqrt(2-sqrt(2))
mod1006
ex0929
A
B
C
D
h
h = 0.01
x0 = 0
f
f = -1+sqrt(2)
zz
zz(end)
h = 0.0001
zz(end)
x0
x0 = 1
zz(end)
f
f = 1
x0
x0 = 0
zz(end)
x0
h
h = 10
zz(end)/ww(end)
sqrt(zz(end)/ww(end))
f
h = 100
sqrt(zz(end)/ww(end))
f
f = -1+sqrt(2)
sqrt(zz(end)/ww(end))

&ref(): File not found: "2016.10.06-1.jpg" at page "授業/制御工学特論2017"; ... sorry for the missing picture in which A, B1, B2, C1, and D12 were additionally written in red color.

#ref(): File not found: "2016.10.06-2.jpg" at page "授業/制御工学特論2017"

#ref(): File not found: "2016.10.06-3.jpg" at page "授業/制御工学特論2017"

[lecture #6] 2016.10.13 Mixed sensitivity problem 1/3

  1. review: LQR and H infinity
  2. outline: filemap_v1.0_intro1.pdf ; schedule2016
  3. H infinity control problem (general case)
  4. reference tracking problem
  5. weighting function for sensitivity function
  6. design example &ref(): File not found: "ex1013_1.m" at page "授業/制御工学特論2017"; &ref(): File not found: "ex1013_2.m" at page "授業/制御工学特論2017";
  7. the small gain theorem
    • proof: Nyquist stability criterion
  8. from performance optimization to robust stabilization
%-- 2016/10/13 13:58 --%
ex1013_1
P
pole(P)
ex1013_2
K
K_hinf
eig(K_hinf.a)

#ref(): File not found: "2016.10.13-1.jpg" at page "授業/制御工学特論2017"

#ref(): File not found: "2016.10.13-2.jpg" at page "授業/制御工学特論2017"

#ref(): File not found: "2016.10.13-3.jpg" at page "授業/制御工学特論2017"

#ref(): File not found: "2016.10.13-4.jpg" at page "授業/制御工学特論2017"

[lecture #7] 2016.10.20 Mixed sensitivity problem 2/3

  1. review filemap_v1.0_intro2.pdf and outline
  2. an equivalent problem of robust stabilization for reference tracking problem
  3. uncertainty model and normalized uncertainty Delta
  4. how to determine P0 and WT
    • example: frequency response of plant with perturbation &ref(): File not found: "ex1020_1.m" at page "授業/制御工学特論2017";
    • frequency response based procedure for P0 and WT &ref(): File not found: "ex1020_2.m" at page "授業/制御工学特論2017";
  5. robust stabilization problem and equivalent problem
    • design example and simulation &ref(): File not found: "ex1020_3.m" at page "授業/制御工学特論2017"; &ref(): File not found: "mod1020.mdl" at page "授業/制御工学特論2017";
%-- 2016/10/20 13:36 --%
ex1020_1
ex1020_2
ex1020_3
mod1020
c

#ref(): File not found: "2016.10.20-1.jpg" at page "授業/制御工学特論2017"

#ref(): File not found: "2016.10.20-2.jpg" at page "授業/制御工学特論2017"

#ref(): File not found: "2016.10.20-3.jpg" at page "授業/制御工学特論2017"

[lecture #8] 2016.10.27 Mixed sensitivity problem 3/3

  1. mixed sensitivity problem ---> (1) and (2) : proof
  2. generalized plant for mixed senstivity problem
  3. design example &ref(): File not found: "ex1027_1.m" at page "授業/制御工学特論2017"; minimize gamma by hand
  4. gamma iteration by bisection method &ref(): File not found: "ex1027_2.m" at page "授業/制御工学特論2017";
  5. nominal performance and robust performance &ref(): File not found: "ex1027_3.m" at page "授業/制御工学特論2017";
  6. introduction of robust performance problem
%-- 2016/10/27 13:46 --%
ex1027_1
K
ex1027_2
ex1027_3

#ref(): File not found: "2016.10.27-1.jpg" at page "授業/制御工学特論2017"

#ref(): File not found: "2016.10.27-2.jpg" at page "授業/制御工学特論2017"

... sorry for the mistake in the left-upper inequality, please correct it as pointed out by a student as below

#ref(): File not found: "2016.10.27-3.jpg" at page "授業/制御工学特論2017"

[] 2016.11.10 canceled

[lecture #9] 2016.11.17 robust performance problem 1/3

  1. review
    • mixed sensitivity problem
      ex1027_1
      ex1027_2
      ex1027_3
    • robust performance problem c.f. the last whiteboard
  2. an equivalent robust stability problem
  3. definition of H infinity norm for general case (MIMO)
    • definition of singular values and the maximum singular value
      M = [1/sqrt(2), 1/sqrt(2); j, -j]
      M'
      eig(M'*M)
      svd(M)
    • mini report #1 filereport1.pdf ... You will have a mini exam #1 related to this report
  4. proof of ||Delta hat||_inf <= 1
  5. design example: &ref(): File not found: "ex1117_1.m" at page "授業/制御工学特論2017";
    • robust performance is achieved but large gap
    • non structured uncertainty is considered ... the design problem is too conservative
%-- 2016/11/17 13:05 --%
ex1027_1
ex1027_2
ex1027_3
M = [1/sqrt(2), 1/sqrt(2); j, -j]
M'
eig(M'*M)
svd(M)
ex1117_1

#ref(): File not found: "2016.11.17-1.jpg" at page "授業/制御工学特論2017"

#ref(): File not found: "2016.11.17-2.jpg" at page "授業/制御工学特論2017"

#ref(): File not found: "2016.11.17-3.jpg" at page "授業/制御工学特論2017"

#ref(): File not found: "2016.11.17-4.jpg" at page "授業/制御工学特論2017"

[lecture #10] 2016.11.24 Robust performance problem (2/3)

  1. return of mini report #1
  2. review
    • robust performance but too conservative
      ex1027_2
      ex1117_1
    • structured unertainty Delta hat and unstructured uncertainty Delta tilde
    • robust stability problem for Delta hat and its equivalent problem(?) with Delta tilde
  3. SVD: singular value decomposition
    • definition
    • meaning off the largest singular value
    • 2-norm of vectors
    • SVD for 2-by-2 real matrix &ref(): File not found: "ex1124_1.m" at page "授業/制御工学特論2017";
%-- 2016/11/24 13:04 --%
ex1027_2
ex1117_1
M = [1/sqrt(2), 0; 1/sqrt(2), 0]
svd(M)
M
[U, S, V] = svd(M)
[U, S, V] = svd(M);
U
V
U*S*V'
U*S*V' - M
S
U'*'
U'*U
V'*V
help norm
ex1124_1

#ref(): File not found: "2016.11.24-1.jpg" at page "授業/制御工学特論2017"

#ref(): File not found: "2016.11.24-2.jpg" at page "授業/制御工学特論2017"

#ref(): File not found: "2016.11.24-3.jpg" at page "授業/制御工学特論2017"

#ref(): File not found: "2016.11.24-4.jpg" at page "授業/制御工学特論2017"

[lecture #11] 2016.12.1 Robust performance problem (3/3)

  1. review: conservative design with Delta tilde
  2. scaled H infinity control problem
  3. how to determine structure of scaling matrix
  4. design example &ref(): File not found: "ex1201_1.m" at page "授業/制御工学特論2017";
    ex1027_2
    ex1117_1
    gam_opt0 = gam_opt
    K_opt0 = K_opt;
    ex1201_1
    gam_opt
  5. mini exam #1

#ref(): File not found: "2016.12.01-1.jpg" at page "授業/制御工学特論2017"

#ref(): File not found: "2016.12.01-2.jpg" at page "授業/制御工学特論2017"

%-- 2016/12/01 13:59 --%
ex1027_2
ex1117_1
gam_opt
gam_opt0 = gam_opt
K_opt0 = K_opt;
ex1201_1
gam_opt
gam_opt0
d_opt

[lecture #12] 2016.12.8 Robust performance problem (3/3) (cont.), Control system design for practical system (1/3)

  1. return of mini exam #1;
  2. review of the scaled H infinity control problem
  3. effect of scaling &ref(): File not found: "ex1208_1.m" at page "授業/制御工学特論2017";
    ex1027_2
    ex1117_1
    gam_opt0 = gam_opt
    K_opt0 = K_opt;
    ex1201_1
    gam_opt
    ex1208_1
  4. mini report #2 filereport2.pdf please use modified file &ref(): File not found: "report2_fixed.pdf" at page "授業/制御工学特論2017"; ... You will have a mini exam #2 related to this report
  5. introduction of a practical system: active noise control in duct
    • experimental setup
    • objective of control system: to drive control loudspeaker by generating proper driving signal u using reference microphone output y such that the error microphone's output z is attenuated against the disturbance input w
    • frequency response experiment

      #ref(): File not found: "ex1208_2.m" at page "授業/制御工学特論2017"

%-- 2016/12/08 13:25 --%
ex1027_2
ex1117_1
gam_opt0 = gam_opt
K_opt0 = K_opt;
ex1201_1
gam_opt
ex1208_1
ex1208_1
format long
ex1208_1
M = [0, 0.5; sqrt(2), 0]
W = mdiag(1/sqrt(3), 0)
W = mdiag(1/sqrt(3), 1)
svd(M)
Mhat = inv(W)*M*W
Mhat = W\M*W
svd(Mhat)
ex1208_2

#ref(): File not found: "2016.12.08-1.jpg" at page "授業/制御工学特論2017"

#ref(): File not found: "2016.12.08-2.jpg" at page "授業/制御工学特論2017"

#ref(): File not found: "2016.12.08-3.jpg" at page "授業/制御工学特論2017"

[lecture #13] 2016.12.15 Control system design for practical system (2/3)

  1. return of mini report #2
  2. review of the experimental system
    • closed-loop system of 2-by-2 plant G and controller K
    • closed-loop gain is desired to be minimized
    • how to handle modeling error of G ?
  3. design example
    • determination of plant model(nominal plant and additive uncertainty weight)
      &ref(): File not found: "nominal.m" at page "授業/制御工学特論2017";
      &ref(): File not found: "subspace.m" at page "授業/制御工学特論2017"; ... replacement of n4sid in System Identification Toolbox (not provided in IPC)
      &ref(): File not found: "weight.m" at page "授業/制御工学特論2017";
    • configuration of generalized plant and controller design by scaled H infinity control problem using one-dimensional search on the scaling d
      &ref(): File not found: "cont.m" at page "授業/制御工学特論2017";
    • comparison of closed-loop gain characteristics with and without control
      &ref(): File not found: "compare.m" at page "授業/制御工学特論2017";
    • result of control experiment
      &ref(): File not found: "result.dat" at page "授業/制御工学特論2017";
      &ref(): File not found: "compare_result.m" at page "授業/制御工学特論2017";
  4. room 157 @ Dept. Mech. Bldg.2
  5. final report and remote experimental system
    1. design your controller(s) so that the system performance is improved compared with the design example
    2. Draw the following figures and explain the difference between two control systems (your controller and the design example):
      1. bode diagram of controllers
      2. gain characteristic of closed-loop system from w to z
      3. time response and frequency spectrum (PSD) of control experiment
    3. Why is the performance of your system improved(or unfortunately deteriorated)?
    • due date: 6th(Fri) Jan 17:00
    • submit your report(pdf or doc) by e-mail to kobayasi@nagaokaut.ac.jp
    • You can use Japanese
    • maximum controller order is 35
    • submit your controller.dat, controller_order.dat, and controller.mat at this page:participant list2016(download is also possible) not later than 28th(Wed) Dec
    • Your login password will be e-mailed on Dec 16.
    • You can send up to 5 controllers
    • control experimental results will be uploaded here
    • freqresp ... frequency response will be measured and uploaded everyday
  6. how to improve the performance ?
    • order of the nominal plant
    • weighting for robust stability
  7. specifications of the experimental system
    1. experimental equipments
    • loudspeakers: AURA SOUND NSW2-326-8A (2inch, 15W)
    • pressure sensors: NAGANO KEIKI KP15
    • A/D, D/A converters: CONTEC AD12-16(PCI), DA12-4(PCI)
    • PC: Dell Dimension 1100
    • OS: Linux kernel 2.4.22 / Real Time Linux 3.2-pre3
    1. program sources for frequency response experiment
    • freqresp.h
    • freqresp_module.c
    • freqresp_app.c
    • format of spk1.dat (u is used instead of w for spk2.dat)
      • 1st column ... frequency (Hz)
      • 2nd column ... gain from w(V) to y(V) (signal's unit is voltage (V))
      • 3rd column ... phase from w to y
      • 4th column ... gain from w to z
      • 5th column ... phase from w to z
    1. program sources for control experiment
    • hinf.h
    • hinf_module.c
    • hinf_app.c
    • format of result.dat
      • 1st column: time (s)
      • 2nd column: z (V)
      • 3rd column: y (V)
      • 4th column: u (V)
      • 5th column: w (V)
    1. configuration of control experiment
    • disturbance signal w is specified as described in hinf.h and hinf_module.c:
      #define AMP 3.0 // amplitude for disturbance
      #define DIST_INTERVAL 5 // interval step for updating w
      
      count_dist++;
      if(count_dist >= DIST_INTERVAL){
        w = AMP * (2. * rand() / (RAND_MAX + 1.) - 1.); // uniform random number in [-AMP, AMP]
        count_dist = 0;
      }
      
      da_conv(V_OFFSET + w, 0); // D/A output to noise source
      w is updated with 1ms period (sampling period 0.2ms times DIST_INTERVAL 5)
    • control signal u is limited to [-4, 4] as specified in hinf.h and hinf_module.c:
      #define U_MAX 4.00
      
      if(u > U_MAX) u = U_MAX;
      if(u < -U_MAX) u = -U_MAX;
      u is set to 0 for t < 10(s). (controller is operated for 10 <= t < 15.)
    • a high pass filter with cut-off frequency are used to cut DC components in z and y as described in hinf.h and hinf_module.c
      // HPF(1 rad/s) to cut DC in z and y
      #define AF 9.9980001999866674e-01  
      #define BF 1.9998000133326669e-04
      #define CF -1.0000000000000000e+00
      #define DF 1.0000000000000000e+00
      
      ad_conv(&yz); // A/D input
      
      // HPFs
      yf = CF*xf_y + DF*yz[0];
      xf_y = AF*xf_y + BF*yz[0];
      zf = CF*xf_z + DF*yz[1];
      xf_z = AF*xf_z + BF*yz[1];
%-- 2016/12/15 13:18 --%
ls
nominal
ls data
nominal
ctrlpre
ctrlpref
nominal
345/3.6
who
G0
size(G0.a)
weight
help n4sid
eig(A)
max(real(eig(A)))
weight
cont
compare
compare_result

#ref(): File not found: "2016.12.15-1.jpg" at page "授業/制御工学特論2017"

#ref(): File not found: "2016.12.15-2.jpg" at page "授業/制御工学特論2017"

[lecture #14] 2016.12.20 Control system design for practical system (3/3)

[lecture #15] 2016.12.22 Control system design for practical system (cont.)

%-- 2016/12/22 13:09 --%
weight
load result.dat
pwd
load data/result.dat;
plot(result(:,1),result(:,4),'-');
compare

#ref(): File not found: "2016.12.22-1.jpg" at page "授業/制御工学特論2017"


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS