授業

Advanced Automation 2024

latest lecture

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

s = tf('s')
P = 1/(s-1)
pole(P)
impulse(P)
K = 2
Tyr = K/(s-1+K)
step(Tyr)
%-- 2024/09/05 13:40 --%
s = tf('s')
P = 1/(s-1)
pole(P)
impulse(P)
K = 2
Tyr = K/(s-1+K)
step(Tyr)

[lecture #2] 2024.9.12 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
    • interactive system (no compilation, no variable definition)
    • m file
  2. system representation: Transfer Function(TF) / State-Space Representation (SSR)
    • example: mass-spring-damper system
    • definition of SSR
    • from SSR to TF
    • from TF to SSR: controllable canonical form
  3. open-loop characteristic
    • open-loop stability: poles and eigenvalues
    • Bode plot and frequency response fileex0912_1.m filemod0912_1.mdl
      • cut off frequency; DC gain; -40dB/dec; variation of c
      • relation between P(jw) and steady-state response
  4. closed-loop stability
    • Nyquist stability criterion (for L(s):stable)
    • Nyquist plot fileex0912_2.m filemod0912_2.mdl
      • Gain Margin(GM); Phase Margin(PM)
%-- 2024/09/12 13:07 --%
a = 2
a + 1
t=[1 2 3]
t + 2
pwd
ex0912_1
sqrt(k/m)
sqrt(k/m)/(2*pi)

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

  1. LQR problem
    • controllability
    • cost function J >= 0
    • positive (semi-)definite matrices
    • solution of LQR problem
    • example fileex0919_1.m filemod0919_1.mdl
  2. ARE and quadratic equation
    • scalar case (solve by hand)
    • matrix case filelqr.pdffileproof4.pdf (from B3「動的システムの解析と制御」)
%-- 2024/09/19 13:53 --%
ex0919_1
Uc
[B A*B]
ex0919_1
F

[lecture #4] 2024.9.26 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)} \\ \| 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');
    G1 = 1/(s+1);
    bode(G1);
    norm(G1, 'inf')
    G2 = s/(s+1);
    bode(G2);
    norm(G2, 'inf')
    G3 = 1/(s^2 + 0.1*s + 1);
    bode(G3);
    norm(G3, 'inf')
  4. definition of H infinity norm (SIMO)
    G4 = [1/(s+2); -1/(s+2)];
    norm(G4, 'inf') 
  5. solve the problem by hand
  6. solve the problem by tool(hinfsyn) fileex0926_1.m
%-- 2024/09/26 14:04 --%
s = tf('s');
G1 = 1/(s+1);
bode(G1);
norm(G1, 'inf')
G2 = s/(s+1);
bode(G2);
norm(G2, 'inf')
bode(G1);
norm(G1, 'inf')
bode(G2);
norm(G2, 'inf')
G3 = 1/(s^2 + 0.1*s + 1);
bode(G3);
norm(G3, 'inf')
ctrlpref
bode(G3);
grid on
G4 = [1/(s+2); -1/(s+2)];
norm(G4, 'inf')
1/sqrt(2)

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

  1. cont.
    • solve the problem by hand
    • solve the problem by tool(hinfsyn) fileex0926_1.m
  2. complete the table in simple example
  3. confirm the cost function J for both controllers by simulation filemod1003.mdl
    • block diagram in the simulink model
    • how to approximate impulse disturbance with a step function
    • (unit) impulse disturbance resp. with zero initial condition = (unit) initial condition resp. with zero disturbance
  4. confirm the closed-loop H infinity norm for both controllers by simulation
    • H infinity norm = L2 induced norm
    • review: steady-state response for sinusoidal input signal; how to choose the frequency such that the output amplitude is maximized ?
    • the worst-case disturbance w(t) for the simple example ?
  5. 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
%-- 2024/10/03 13:17 --%
ex0926_1
sqrt(2-sqrt(2))
mod1003
h = 0.01
x0 = 0
f = 1
plot(t, x)
zz
plot(t, zz)
zz(end)
x0
zz(end)
x0 = 1
zz(end)
f = -1+sqrt(2)
zz(end)
h = 100
x0 = 0
f
sqrt(zz(end)/ww(end))
f = 1
sqrt(zz(end)/ww(end))

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

  1. outline: filemap_v1.1_mixedsens1.pdf
    • sensitivity function S and complementary sensitivity function T
  2. H infinity control problem (general case)
    • with generalized plant G
    • including the state-feedback case
  3. reference tracking problem
    • how to translate the condition (ii) into one with H infinity norm ?
    • corresponding generalized plant G ?
    • introduction of weighting function for sensitivity function in (ii)
  4. design example fileex1010_1.m fileex1010_2.m
  5. the small gain theorem
    • proof: Nyquist stability criterion
%-- 2024/10/10 13:47 --%
ex1010_1
pole(P)
ex1010_2
K_hinf
K_hinf.a
eig(K_hinf.a)
ex1010_2

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

  1. outline: from point to set filemap_v1.1_mixedsens2.pdf
  2. the small gain theorem ... robust stability = H infinity norm condition
  3. normalized uncertainty Delta
  4. uncertainty model
  5. simple example of plant set
    • given plant P tilde
      • frequency response of plant with perturbation fileex1017_1.m
    • how to determine P0 and WT ?
      • frequency response based procedure for P0 and WT fileex1017_2.m
  6. robust stabilization problem and equivalent problem
%-- 2024/10/17 13:36 --%
ex1017_1
ex1017_2
ex1017_1
ex1017_2
ex1017_1
ex1017_2
ex1017_3
mod1017
c
c = 0.8
c = 2
c = 1.5

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

  1. mixed sensitivity problem => (1) and (2) : proof
  2. generalized plant for mixed senstivity problem
  3. design example fileex1024_1.m minimize gamma by hand
  4. gamma iteration by bisection method fileex1024_2.m tradeoff between model robust stability and performance
  5. intro. to RP: weak point of mixed sensitivity problem(problem of NP) fileex1024_3.m
%-- 2024/10/24 13:41 --%
ex1024_1
K
ex1024_1
ex1024_2
gam
ex1024_2
gam
ex1024_2
gam
help hinfsyn
ex1024_3
ex1024_2
ex1024_3

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

  1. review
    • mixed sensitivity problem : N.P. but not R.P.
  2. robust performance problem (R.P.), but can not be solved by tool
  3. an equivalent robust stability (R.S.) problem to R.P.
    • (i) introduction of a fictitious uncertainty Delta_p (for performance)
    • (ii) for 2-by-2 uncertainty block Delta hat which includes Delta and Delta_p
  4. 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); 1i, -1i]
      M'
      eig(M'*M)
      svd(M)
    • mini report #1 filereport1.pdf ... You will have a mini exam #1 related to this report
  5. proof of ||Delta hat||_inf <= 1
  6. design example: fileex1031_1.m
    • robust performance is achieved but large gap
    • non structured uncertainty is considered ... the design problem is too conservative
%-- 2024/10/31 14:05 --%
M = [1/sqrt(2), 1/sqrt(2); 1i, -1i]
M'
eig(M'*M)
svd(M)
ex1031_1

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

  1. return of mini report #1
  2. SVD: singular value decomposition
    • definition
    • meaning of the largest singular value (a property and proof)
    • 2 norm of vectors (Euclidean norm)
    • SVD for 2-by-2 real matrix fileex1107_1.m
%-- 2024/11/07 13:24 --%
M = [sqrt(2), sqrt(2); -1i/sqrt(2), 1i/sqrt(2)]
1i
j
i
[U, Sigma, V] = svd(M)
U'*U
format long e
U'*U
V*V'
ex1107_1

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

  1. review : R.S. problems for structured and unstructured uncertainty
  2. scaled H infinity control problem
  3. relation between three problems
  4. how to determine structure of scaling matrix
  5. design example fileex1114_1.m filedgam.jpg
    ex1031_1
    gam2 = gam_opt
    ex1114_1
    gam_opt
  6. mini exam #1 (10 min.)
%-- 2024/11/14 13:22 --%
ex1031_1
gam_opt
format long e
gam_opt
gam2 = gam_opt
ex1114_1
gam_opt
gam2

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

  1. return of mini exam #1
  2. review of scaling fileex1121_1.m
  3. mini report #2 filereport2.pdf
  4. introduction of a practical system: active noise control in duct
    • experimental setup
      filephoto1.jpg filephoto2.jpg
    • 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 fileex1121_2.m filespk1.dat filespk2.dat
    • room 157 @ Dept. Mech. Bldg. 2
%-- 2024/11/21 13:03 --%
ex1121_1
gam2
gam3
ex1121_2
ctrlpref
ex1121_2
c0 = 346
L = 1.55
c0/(2*L)

[lecture #13] 2024.11.28 [CANCELLED]

Due to a hardware problem in our experimental environment, today's lecture is cancelled. I'm sorry for the inconvenience.

Please check the modified schedule at schedule2024

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

  1. return of mini report #2; ... You will have a mini exam #2 related to this report next week
  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
    • frequency response data of G can be used; how to handle modeling error of G ?
  3. design example (modeling error for Gyu is only considered for simplicity)
    • frequency response experiment data
      spk1.dat
      spk2.dat
    • determination of plant model(nominal plant and additive uncertainty weight)
      filenominal.m
      filen4sid_replaced.m ... replacement of n4sid in System Identification Toolbox (not provided in IPC)
      fileweight.m
    • configuration of generalized plant and controller design by scaled H infinity control problem using one-dimensional search on the scaling d
      filecont.m
    • comparison of closed-loop gain characteristics with and without control
      filecompare.m
    • result of control experiment and evaluation
      result.dat
      fileperf.m
  4. 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 of control experiment
    3. Why is the performance of your system improved(or unfortunately deteriorated)?
    • due date: 6th(Mon) Jan 17:00
    • submit your report(pdf file) 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 list2024(download is also possible) not later than 24th(Tue) Dec
    • the system will be started until next lecture
    • You can send up to 10 controllers
    • control experimental results will be uploaded here
    • freqresp ... frequency response will be measured and uploaded everyday
  5. how to improve the performance ?
    • order of the nominal plant
    • weighting for robust stability
  6. specifications of the experimental system
    1. experimental equipments
      • loudspeakers: FOSTEX FE87E(10W)
      • 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
    2. 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
    3. 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)
    4. configuration of control experiment
      • disturbance signal w is specified as described in hinf.h and hinf_module.c:
        #define AMP 0.5 // amplitude for disturbance
        
        w = AMP * (2. * rand() / (RAND_MAX + 1.) - 1.); // uniform random number in [-AMP, AMP]
        
        da_conv(V_OFFSET + w, 0); // D/A output to noise source
      • control signal u is limited to [-3, 3] as specified in hinf.h and hinf_module.c:
        #define U_MAX 3.00
        
        if(u > U_MAX) u = U_MAX;
        if(u < -U_MAX) u = -U_MAX;
        u is set to 0 for t < 5(s). (controller is operated for 5 <= t < 10)
%-- 2024/12/05 13:31 --%
nominal
pwd
nominal
ls data
ls data/spk1.dat
save data/nominal.mat G0 G_g G0_g w
nominal
weight
cont
compare

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

%-- 2024/12/12 12:58 --%
nominal
weight
cont
compare
perf

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

%-- 2024/12/19 14:18 --%
pwd
cd ..
ls
perf
result
plot(t, result(:,2))
plot(result(:,1), result(:,2))
size(result)
plot(result(49000:,1), result(49000:,2))
plot(result(49000:end,1), result(49000:end,2))
plot(result(49000:end,1), result(49000:end,2), '.-')
plot(result(49000:end,1), result(49000:end,2), '-.')
plot(result(49000:end,1), result(49000:end,2), 'bo-')

添付ファイル: file2024.12.12-1.jpg 88件 [詳細] filephoto3.jpg 87件 [詳細] file2024.12.05-2.jpg 135件 [詳細] file2024.12.05-1.jpg 127件 [詳細] fileperf.m 85件 [詳細] filecompare.m 78件 [詳細] filen4sid_replaced.m 79件 [詳細] filecont.m 80件 [詳細] fileweight.m 84件 [詳細] filenominal.m 83件 [詳細] file2024.11.21-2.jpg 151件 [詳細] file2024.11.21-1.jpg 138件 [詳細] fileex1121_2.m 73件 [詳細] filespk2.dat 81件 [詳細] filespk1.dat 90件 [詳細] filephoto2.jpg 80件 [詳細] filephoto1.jpg 86件 [詳細] fileex1121_1.m 64件 [詳細] filereport2.pdf 113件 [詳細] file2024.11.14-1.jpg 124件 [詳細] file2024.11.14-2.jpg 113件 [詳細] fileex1114_1.m 73件 [詳細] filedgam.jpg 92件 [詳細] file2024.11.07-1.jpg 99件 [詳細] file2024.11.07-2.jpg 109件 [詳細] file2024.11.07-3.jpg 115件 [詳細] fileex1107_1.m 99件 [詳細] file2024.10.31-1.jpg 110件 [詳細] file2024.10.31-2.jpg 132件 [詳細] file2024.10.31-3.jpg 101件 [詳細] fileex1031_1.m 89件 [詳細] filereport1.pdf 130件 [詳細] file2024.10.24-1.jpg 90件 [詳細] file2024.10.24-2.jpg 105件 [詳細] fileex1024_3.m 97件 [詳細] fileex1024_2.m 85件 [詳細] fileex1024_1.m 90件 [詳細] file2024.10.17-3.jpg 152件 [詳細] file2024.10.17-2.jpg 125件 [詳細] file2024.10.17-1.jpg 134件 [詳細] filemod1017.mdl 133件 [詳細] fileex1017_3.m 125件 [詳細] fileex1017_2.m 138件 [詳細] fileex1017_1.m 133件 [詳細] file2024.10.10-3.jpg 158件 [詳細] file2024.10.10-2.jpg 181件 [詳細] file2024.10.10-1.jpg 163件 [詳細] fileex1010_2.m 136件 [詳細] fileex1010_1.m 130件 [詳細] file2024.10.03-3.jpg 123件 [詳細] file2024.10.03-2.jpg 139件 [詳細] file2024.10.03-1.jpg 147件 [詳細] filemod1003.mdl 136件 [詳細] file2024.09.26-4.jpg 185件 [詳細] file2024.09.26-3.jpg 150件 [詳細] file2024.09.26-2.jpg 205件 [詳細] file2024.09.26-1.jpg 173件 [詳細] fileex0926_1.m 186件 [詳細] file2024.09.19-1.jpg 167件 [詳細] file2024.09.19-4.jpg 171件 [詳細] file2024.09.19-3.jpg 164件 [詳細] file2024.09.19-2.jpg 175件 [詳細] fileex0919_1.m 180件 [詳細] filemod0919_1.mdl 143件 [詳細] file2024.09.12-4.jpg 150件 [詳細] file2024.09.12-3.jpg 156件 [詳細] file2024.09.12-2.jpg 165件 [詳細] file2024.09.12-1.jpg 153件 [詳細] filemod0912_2.mdl 157件 [詳細] filemod0912_1.mdl 164件 [詳細] fileex0912_2.m 168件 [詳細] fileex0912_1.m 153件 [詳細] file2024.09.05-4.jpg 124件 [詳細] file2024.09.05-3.jpg 141件 [詳細] file2024.09.05-2.jpg 131件 [詳細] file2024.09.05-1.jpg 116件 [詳細]

トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2024-12-19 (木) 14:16:33