授業

Advanced Automation

latest lecture

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

%-- 2019/09/05 13:23 --%
s = tf('s')
P = 1/(s-1)
pole(P)
impulse(P)
k = 2
Tyr = feedback(P*k, 1)
step(Tyr)
k = 10
Tyr = feedback(P*k, 1)
step(Tyr)

[lecture #2] 2019.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 difinition)
    • m file
  2. 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
  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)
%-- 2019/09/12 13:04 --%
a = 1
t = [1 2 3]
u = [4; 5; 6]
t'
who
b = u
who
ex0912_1
P
P.num
P.num{:}
P.den{:}
ex0912_2

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

  1. LQR problem
    • controllability
    • cost function J >= 0
    • (semi)-positive definiteness
    • 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「動的システムの解析と制御」)
%-- 2019/09/19 13:16 --%
ex0919_1
A
B
P
A
A'*P+P*A+Q-P*B*inv(R)*B'*P
P
Q
R
J
plot(t, J)
Jmin

[lecture #4] 2019.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 = 1/(s^2 + 0.1*s + 1);
    bode(G2);
    norm(G2, 'inf')
  4. definition of H infinity norm (SIMO)
  5. solve the problem by hand
  6. solve the problem by tool(hinfsyn) fileex0926_1.m
%-- 2019/09/26 13:55 --%
s = tf('s')
G1 = 1/(s+1);
bode(G1);
norm(G1, inf)
help norm
G2 = 1/(s^2+0.1*s+1)
bode(G2)
ctrlpref
bode(G2)
grid on
norm(G2, inf)
format long e
norm(G2, inf)

[lecture #5] 2019.10.03 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 filemod1003.mdl
    • block diagram in the simulink model
    • how to approximate impulse disturbance with a step function
    • 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) ?
    • how to make the worst-case disturbance w(t)? w(t) for 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
%-- 2019/10/03 13:20 --%
ex0926_1
K
bode(K)
sqrt(2)/2
sqrt(2-sqrt(2))
mod1003
h
h = 0.01
x0
x0 = 0
f = -1+sqrt(2)
zz
zz(end)
h
h = 0.00001
zz(end)
f = 1
zz(end)
x0
x0 = 1
f
zz(end)
f = -1+sqrt(2)
zz(end)
h
h = 100
x0
x0 = 0
zz(end)
sqrt(zz(end)/ww(end))
h
h = 10000
sqrt(zz(end)/ww(end))
sqrt(2-sqrt(2)) 

[lecture #6] 2019.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
%-- 2019/10/10 12:58 --%
ex1010_1
P
pole(P)
eig(P)
ex1010_2
K_hinf
K_hinf.a
eig(K_hinf.a)
ex1010_2

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

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

[lecture #8] 2019.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
  5. intro. to RP(problem of NP) fileex1024_3.m
%-- 2019/10/24 13:00 --%
ex1024_1
K
ex1024_1
ex1024_2
ex1024_3

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

[lecture #9] 2019.10.31 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 = [1, 1i/sqrt(2); 1, -1i/sqrt(2)]
      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: fileex1031_1.m
    • robust performance is achieved but large gap
    • non structured uncertainty is considered ... the design problem is too conservative
%-- 2018/11/08 13:03 --%
ex1101_1
ex1101_2
ex1101_3
1i
j
M = [1i, 1i; 0, 1]
M'
eig(M'*M)
svd(M)
(3+sqrt(5))/2
sqrt((3+sqrt(5))/2)
ex1108_1

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

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

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

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

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

  1. return of mini report #1
  2. review
    • robust performance but too conservative
      ex1108_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 &ref(): File not found: "ex1115_1.m" at page "授業/制御工学特論2019";
%-- 2018/11/15 13:01 --%
M = [1, 2; 3, 4]
[U, S, V] = svd(M)
M = [1, 1i/sqrt(2); 1, -1i/sqrt(2)]
[U, S, V] = svd(M)
U'*U
format long e
U'*U
V'*V
M = [1, 2; 3, 4]
[U, S, V] = svd(M)
fomat short
format short
[U, S, V] = svd(M)
ex1115_1
S
sys = tf(1, [1, 1])
sys2 = tf(1, [1, 1])
sys2 = tf(1, [1, 2])
sys = tf(1, [1, 1])
sys
sys2
M = [0, sys; 0, sys2]
M
hinfnorm(M)
M = [0, sys; 0, sys]
hinfnorm(M)

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

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

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

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

[lecture #11] 2018.11.22 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 &ref(): File not found: "ex1122_1.m" at page "授業/制御工学特論2019";
    ex1108_1
    gam2 = gam_opt
    K2 = K_opt;
    ex1122_1
    gam_opt
  5. mini report #2 filereport2.pdf
  6. mini exam #1 (10 min.)
%-- 2018/11/22 13:37 --%
ex1108_1
gam2 = gam_opt
K2 = K_opt
ex1122_1
gam_opt
gam2
d_opt

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

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

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

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

[lecture #12] 2018.11.29 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 &ref(): File not found: "ex1129_1.m" at page "授業/制御工学特論2019";
  3. introduction of a practical system: Speed control of two inertia system with servo motor
    • experimental setup
      filesetup.pdf ... ``spring plate'' in Table 1 is replaced with a thin long shaft
      &ref(): File not found: "photo1.png" at page "授業/制御工学特論2019";
    • objective of control system = disturbance attenuation control problem: to drive the drive-side servomotor by generating proper driving signal u using drive-side speed (as well as driven-side speed) y such that the driven-side speed is maintained at constant against the disturbance torque input w
    • frequency response experiment and physical model of speed control system

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

    • room 374 @ Dept. Mech. Bldg. 2
%-- 2018/11/29 13:07 --%
ex1129_1
gam2
gam3
clp2.b
format long
norm(M3_d, 'inf')
ex1129_2

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

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

[lecture #13] 2018.12.6 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
      servo1.dat
      servo2.dat
    • determination of plant model(nominal plant and additive uncertainty weight)
      filenominal.m
      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
      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: 4th(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 20
    • submit your controller.dat, controller_order.dat, and controller.mat at this page:participant list2018(download is also possible) not later than 26th(Wed) Dec
    • the system will be started until next lecture
    • You can send up to 510 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 accuracy of the nominal(physical) model
    • weighting for robust stability
  6. specifications of the experimental system
    1. program sources for frequency response experiment
      • freqresp.h
      • freqresp_module.c
      • freqresp_app.c
      • format of servo1.dat (w is used instead of u for servo2.dat)
        1st column ... frequency (Hz)
        2nd column ... gain from u(Nm) to y(rad/s)
        3rd column ... phase (deg) from u to y
        4th column ... gain from u to z
        5th column ... phase (deg) from u to z
    2. program sources for control experiment
      • hinf.h
      • hinf_module.c
      • hinf_app.c
      • format of result.dat
        1st column: time (s)
        2nd column: y (rad/s)
        3rd column: z (rad/s)
        4th column: u (Nm)
        5th column: w (Nm)
    3. configuration of control experiment
      • disturbance signal w is specified as described in hinf.h and hinf_module.c:
        w = 0; // disturbance torque for driven motor                       
        if((t > 2)&&(t < 3)){
          w = RATED_TORQ * -0.15;
        }
        if((t > 4)&&(t < 5)){
          w = RATED_TORQ * -0.1 * sin(2*M_PI*5.0 * (t-4.0));
        }
        da_conv(torq_volt_conv_1(w), 1);
      • control signal u is limited as specified in hinf.h and hinf_module.c:
        #define U_MAX (RATED_TORQ / 3.0)
        
        if(u > U_MAX) u = U_MAX;
        if(u < -U_MAX) u = -U_MAX;
        u is generated by PI control for t < 1(s). Your designed controller is started at t = 1(s).
    4. calculation of rotational speed
      • The rotational speed is approximately calculated by using difference for one sampling period in hinf_module.c and freqresp_module.c like:
        theta_rad[0] = (double)read_theta(0) / (double)Pn212 * 2.0 * M_PI;
        theta_rad[1] = (double)read_theta(1) / (double)Pn212 * 2.0 * M_PI;
        y = (theta_rad[0] - theta_rad_before[0]) / msg->sampling_period;
        z = (theta_rad[1] - theta_rad_before[1]) / msg->sampling_period;
        theta_rad_before[0] = theta_rad[0];
        theta_rad_before[1] = theta_rad[1];
        where the sampling period is given as 0.25 ms.
%-- 2018/12/06 12:53 --%
nominal
w
size(w)
servo1
size(servo1)
nupwd
pwd
cd data
ls
cd ..
nominal
size(w)
size(resp)
size(servo2)
size(servo1)
n
nominal
n
k
resp
k
w
clear all
nominal
weight
cont
compare
perf
nominal

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

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

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

%-- 2018/12/13 13:58 --%
help subspace
nominal_ave
pwd
cd ..
pwd
nominal_ave
G_g
G1_g
G2_g
(G_g + G10_g)/2
bode((G_g + G10_g)/2)
figure(2)
bode((G_g + G10_g)/2)
figure(2)

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

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

%-- 2018/12/20 13:19 --%
nominal
weight
cont
compare
nominal
weight
ctrlpref
cont
compare
weigh
weight
cont
weight
nominal
weight

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


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