授業

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
%-- 2017/10/05 13:08 --%
sqrt(2-sqrt(2))
mod1005
ex0928
A
B
C
D
h = 0.01
x0 = 0
f = -1+sqrt(2)
zz
h = 0.0001
zz
f = 1
zz
x0 = 1
zz
h
h = 1
x0
x0 = 0
h
zz
sqrt(zz(end)/ww(end))
f
h = 100
sqrt(zz(end)/ww(end))
f = -1+sqrt(2)
sqrt(zz(end)/ww(end))

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

  1. outline: filemap_v1.1_mixedsens1.pdf
  2. H infinity control problem (general case)
  3. reference tracking problem
  4. weighting function for sensitivity function
  5. design example fileex1012_1.m fileex1012_2.m
  6. the small gain theorem
    • proof: Nyquist stability criterion
%-- 2017/10/12 13:38 --%
ex1012_1
P
pole(P)
ex1012_2

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

  1. review filemap_v1.1_mixedsens2.pdf and outline
  2. normalized uncertainty Delta
  3. uncertainty model
  4. how to determine P0 and WT
    • example: frequency response of plant with perturbation fileex1019_1.m
    • frequency response based procedure for P0 and WT fileex1019_2.m
  5. robust stabilization problem and equivalent problem
%-- 2017/10/19 13:30 --%
ex1019_1
ex1019_2
ex1019_3
K
figure(4)
bode(K)
mod1019
c
c = 0.8
c = 0
c = 2

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

  1. mixed sensitivity problem ---> (1) and (2) : proof
  2. generalized plant for mixed senstivity problem
  3. design example fileex1026_1.m minimize gamma by hand
  4. gamma iteration by bisection method fileex1026_2.m
  5. nominal performance and robust performance fileex1026_3.m
  6. introduction of robust performance problem
ex1026_1
K
ex1026_2
gam
ex1026_3

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

  1. review
    • mixed sensitivity problem : N.P. but not R.P.
    • robust performance problem (R.P.) c.f. the last whiteboard
  2. an equivalent robust stability (R.S.) problem to R.P.
    • with structured uncertainty Delta hat
  3. definition of H infinity norm for general case (MIMO)
    • definition of singular values and the maximum singular value
      M = [sqrt(2), sqrt(2); -1i/sqrt(2), 1i/sqrt(2)]
      M'
      eig(M'*M)
      svd(M)
    • mini report #1 filereport1.pdf filereport1_fixed.pdf ... You will have a mini exam #1 related to this report
  4. proof of ||Delta hat||_inf <= 1
  5. design example: fileex1102_1.m
    • robust performance is achieved but large gap
    • non structured uncertainty is considered ... the design problem is too conservative
M = [sqrt(2), sqrt(2); -1i/sqrt(2), 1i/sqrt(2)]
M'
eig(M'*M)
svd(M)
ex1102_1

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

  1. return of mini report #1
  2. review
    • robust performance but too conservative
      ex1102_1
    • robust stability problem for Delta hat and its equivalent problem(?) with Delta tilde
    • structured unertainty Delta hat and unstructured uncertainty Delta tilde
  3. SVD: singular value decomposition
    • definition
    • meaning of the largest singular value
    • 2-norm of vectors (Euclidean norm)
    • SVD for 2-by-2 real matrix fileex1109_1.m
%-- 2017/11/09 13:07 --%
ex1102_1
M = [1i, 1i; 0, 1]
[U,S,V] = svd(M)
U'*U
V'*V
ex1109_1

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

  1. review: R.S. prob. for Delta hat and Delta tilde
  2. scaled H infinity control problem
  3. how to determine structure of scaling matrix
  4. design example fileex1116_1.m
    ex1102_1
    gam_opt0 = gam_opt
    K_opt0 = K_opt;
    ex1116_1
    gam_opt
  5. mini report #2 filereport2.pdf
  6. mini exam #1
%-- 2017/11/16 13:46 --%
ex1102_1
gam_opt
gam_opt0 = gam_opt
Kopt
K_opt
K_opt0 = K_opt
ex1116_1
gam_opt
d
d_opt

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

  1. return of mini exam #1 and mini report #2
  2. review of scaling fileex1130_1.m
  3. introduction of a practical system: active noise control in duct
    • a standard ANC 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
    • difficulty in physical modeling
    • experimental setup in lab.
    • frequency response experiment
    • room 157 @ Dept. Mech. Bldg. 2
%-- 2017/11/30 13:07 --%
ex1130_1
gamma0
gamma1
format long e
norm(M1_d, 'inf')
ex1130_2
c0 = 346
L = 1.8
c0/(2*L)

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

  1. mini exam #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
    • frequency response experiment data
      spk1.dat
      spk2.dat
    • determination of plant model(nominal plant and additive uncertainty weight)
      filenominal.m
      filesubspace.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
      result.dat
      filecompare_result.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 and frequency spectrum (PSD) of control experiment
    3. Why is the performance of your system improved(or unfortunately deteriorated)?
    • due date: 5th(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 list2017(download is also possible) not later than 27th(Wed) Dec
    • the system will be started until next lecture
    • You can send up to 5 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: 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
    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 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 0.16Hz (1 rad/s) is used to remove 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];
%-- 2017/12/07 13:01 --%
nominal
n4sid
which n4sid
weight
cont
K
who
Kd
size(Kd.a)
compare
compare_result

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

%-- 2017/12/14 13:47 --%
compare
compare_result_fixed
help print
compare_result_fixed

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

%-- 2017/12/21 13:32 --%
nominal
weight
compare
weight
cont
compare
weight
cont
compare
nominal
weight
cont
compare
weight
compare_result
cont

添付ファイル: file2017.12.14-1.jpg 431件 [詳細] file2017.12.07-1.jpg 423件 [詳細] file2017.12.07-2.jpg 454件 [詳細] file2017.11.30-1.jpg 463件 [詳細] file2017.11.30-2.jpg 418件 [詳細] filespk1.dat 392件 [詳細] filespk2.dat 369件 [詳細] fileex1130_1.m 344件 [詳細] fileex1130_2.m 359件 [詳細] file2017.11.16-1.jpg 474件 [詳細] file2017.11.16-2.jpg 411件 [詳細] file2017.11.16-3.jpg 473件 [詳細] fileex1116_1.m 361件 [詳細] filereport2.pdf 501件 [詳細] file2017.11.09-1.jpg 392件 [詳細] file2017.11.09-2.jpg 435件 [詳細] file2017.11.09-3.jpg 386件 [詳細] file2017.11.09-4.jpg 402件 [詳細] fileex1109_1.m 350件 [詳細] filereport1_fixed.pdf 467件 [詳細] file2017.11.02-1.jpg 410件 [詳細] file2017.11.02-2.jpg 464件 [詳細] file2017.11.02-3.jpg 494件 [詳細] file2017.11.02-4.jpg 412件 [詳細] filereport1.pdf 458件 [詳細] fileex1102_1.m 379件 [詳細] file2017.10.26-1.jpg 414件 [詳細] file2017.10.26-2.jpg 441件 [詳細] file2017.10.26-3.jpg 430件 [詳細] fileex1026_2.m 350件 [詳細] fileex1026_1.m 360件 [詳細] fileex1026_3.m 379件 [詳細] file2017.10.19-1.jpg 386件 [詳細] file2017.10.19-2.jpg 393件 [詳細] file2017.10.19-3.jpg 414件 [詳細] file2017.10.19-4.jpg 398件 [詳細] fileex1019_3.m 379件 [詳細] fileex1019_1.m 359件 [詳細] filemod1019.mdl 366件 [詳細] fileex1019_2.m 357件 [詳細] filemap_v1.1_mixedsens2.pdf 761件 [詳細] file2017.10.12-1.jpg 421件 [詳細] file2017.10.12-2.jpg 403件 [詳細] file2017.10.12-3.jpg 443件 [詳細] file2017.10.12-4.jpg 397件 [詳細] fileex1012_1.m 401件 [詳細] fileex1012_2.m 370件 [詳細] filemap_v1.1_mixedsens1.pdf 610件 [詳細] file2017.10.05-1.jpg 491件 [詳細] file2017.10.05-2.jpg 530件 [詳細] file2017.10.05-3.jpg 439件 [詳細] filemod1005.mdl 379件 [詳細] file2017.09.28-1.jpg 411件 [詳細] file2017.09.28-2.jpg 448件 [詳細] file2017.09.28-3.jpg 493件 [詳細] file2017.09.28-4.jpg 508件 [詳細] file2017.09.28-5.jpg 898件 [詳細] fileex0928.m 407件 [詳細] file2017.09.21-1.jpg 434件 [詳細] file2017.09.21-2.jpg 458件 [詳細] file2017.09.21-3.jpg 452件 [詳細] filemod0921_1.mdl 419件 [詳細] fileex0921_1.m 416件 [詳細] file2017.09.14-1.jpg 481件 [詳細] file2017.09.14-2.jpg 495件 [詳細] file2017.09.14-3.jpg 441件 [詳細] file2017.09.14-4.jpg 458件 [詳細] file2017.09.14-5.jpg 449件 [詳細] filemod0914_1.mdl 399件 [詳細] filemod0914_2.mdl 362件 [詳細] fileex0914_1.m 427件 [詳細] fileex0914_2.m 392件 [詳細] file2017.09.07-1.jpg 467件 [詳細] file2017.09.07-2.jpg 498件 [詳細] file2017.09.07-3.jpg 420件 [詳細] file2017.09.07-4.jpg 452件 [詳細] filemap_v1.1.pdf 819件 [詳細] filemap_v1.1_review.pdf 859件 [詳細]

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