授業

Advanced Automation 2023

latest lecture

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

%-- 2023/09/07 13:21 --%
s = tf('s')
P = 1/(s-1)
pole(P)
impulse(P)
pole(P)
K = 2
help step
Tyr = K/(s-1+K)
step(Tyr)

[lecture #2] 2023.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
    • 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 fileex0914_1.m filemod0914_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 fileex0914_2.m filemod0914_2.mdl
      • Gain Margin(GM); Phase Margin(PM)
%-- 2023/09/14 13:06 --%
a = 1
u=[1;2;3]
ex0914_1.m
ex0914_1
sqrt(k/m)
sqrt(k/m)/(2*pi)

[lecture #3] 2023.9.21 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 fileex0921_1.m filemod0921_1.mdl
  2. ARE and quadratic equation
    • scalar case (solve by hand)
    • matrix case filelqr.pdffileproof4.pdf (from B3「動的システムの解析と制御」)
%-- 2023/09/21 13:42 --%
ex0921_1
A
eig(A)
Uc
B
A*B
ex0921_1
help are
P
eig(P)
G
F
F = [0, 0]
J
ex0921_1
F
J
J(end)
Jmin

[lecture #4] 2023.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)} \\ \| 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) fileex0928_1.m
%-- 2023/09/28 13:41 --%
s = tf('s');
G1 = 1/(s+1);
bode(G1);
norm(G1, 'inf')
format e
format long e
norm(G1, 'inf')
G3 = s/(s+1);
bode(G3);
norm(G3, 'inf')
G2 = 1/(s^2 + 0.1*s + 1);
bode(G2);
norm(G2, 'inf')
grid
ctrlpref
bode(G2);
grid

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

  1. cont.
    • solve the problem by hand
    • solve the problem by tool(hinfsyn) fileex0928_1.m
  2. complete the table in simple example
  3. confirm the cost function J for both controllers by simulation filemod1005.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
%-- 2023/10/05 13:06 --%
ex0928_1
K
help sigma
clp0
norm(clp, 'inf')
norm(clp0, 'inf')
sqrt(2-sqrt(2))
mod1005
f = -1+sqrt(2)
h = 0.01
x0 = 0
plot(t, x)
zz
zz(end)
x0
x0 = 1
zz
f
f = 1
zz
x0 = 0
zz
h
x0
h = 100
f
zz
sqrt(zz(end)/ww(end))
f = -1+sqrt(2)
sqrt(zz(end)/ww(end)) 

[lecture #6] 2023.10.12 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 fileex1012_1.m fileex1012_2.m
  5. the small gain theorem
    • proof: Nyquist stability criterion
%-- 2023/10/12 13:43 --%
ex1012_1
P
eig(P)
ctrlpref
ex1012_1
ex1012_2
K_hinf
eig(K_hinf)

[lecture #7] 2023.10.19 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 fileex1019_1.m
    • how to determine P0 and WT ?
      • frequency response based procedure for P0 and WT fileex1019_2.m
  6. robust stabilization problem and equivalent problem
%-- 2023/10/19 13:26 --%
ex1019_1
ex1019_3
ex1019_2
ex1019_3
mod1019
c
c = 0.8
c = 2
c = 1.5

[lecture #8] 2023.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 tradeoff between model robust stability and performance
  5. intro. to RP: weak point of mixed sensitivity problem(problem of NP) fileex1026_3.m
%-- 2023/10/26 13:36 --%
pwd
ex1026_1
K
ex1026_1
ex1026_2
gam
ex1026_2
gam
ex1026_2
gam
ex1026_2
gam
ex1026_3
ex1026_2
ex1026_3

[lecture #9] 2023.11.2 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, 1; 1i/sqrt(2), -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
  5. proof of ||Delta hat||_inf <= 1
  6. design example: fileex1102_1.m
    • robust performance is achieved but large gap
    • non structured uncertainty is considered ... the design problem is too conservative
%-- 2023/11/02 13:54 --%
M = [1, 1; 1i/sqrt(2), -1i/sqrt(2)]
M'
eig(M'*M)
svd(M)
pwd
ex1102_1

[lecture #10] 2023.11.9 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 fileex1109_1.m
%-- 2023/11/09 13:26 --%
M = [1, 1; 1i/sqrt(2), -1i/sqrt(2)]
[U, S, V] = svd(M)
U'*U
format long e
U'*U
U*U'
V'*V
U*S*V'
U*S*V'- M
format short
U*S*V'- M
ex1109_1
rand(1,1)
rand(1,3)

[lecture #11] 2023.11.16 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 fileex1116_1.m
    ex1102_1
    gam2 = gam_opt
    ex1116_1
    gam_opt
  6. mini exam #1 (10 min.)
%-- 2023/11/16 13:03 --%
ex1102_1
gam_opt
format long
gam_opt
gam2 = gam_opt
ex1116_1
gam_opt
gam2
opts = hinfsynOptions
opts.AutoScale = 'off'
ex1116_1

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

  1. return of mini exam #1
  2. review of scaling fileex1123_1.m
  3. mini report #2 filereport2.pdf
  4. introduction of a practical system: Speed control of two inertia system with servo motors
    • experimental setup
      filesetup_fixed.pdf
      filephoto.jpg
    • objective of control system = reference speed tracking control problem: to drive the drive-side servomotor by generating proper driving signal u (T_M) using drive-side speed y (\omega_M) such that y tracks the reference speed command r
    • frequency response experiment and physical model of speed control system fileservo1.dat fileservo2.dat
    • room 374 @ Dept. Mech. Bldg. 2
%-- 2023/11/23 13:09 --%
ex1123_1
format long
eig(clp2.a)
ex1123_2

[lecture #13] 2023.11.30 [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 schedule2023

[lecture #13] 2023.12.7 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
    • the same robust performance problem setup given in lecture can be used to design controllers
  3. design example
    • frequency response experiment data
      servo1.dat
    • determination of plant model(nominal plant and multiplicative uncertainty weight)
      filenominal.m
      fileweight.m
      fileweight_2.m ... loose weight was further used to prevent high-frequency oscillation
    • configuration of generalized plant and controller design by scaled H infinity control problem using one-dimensional search on the scaling d
      filecont.m
      filecont_2.m ... for loose weight design
    • result of control experiment and evaluation
      result.dat
      result_2.dat; ... for loose weight design
      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 sensitivity function
      3. time response of control experiment
    3. Why is the performance of your system improved(or unfortunately deteriorated)?
    • due date: 4th(Thu) Jan 17:00
    • submit your report(pdf file) 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 list2023(download is also possible) not later than 26th(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 ?
    • performance and sensitivity gain
    • accuracy of the nominal(physical) model, weighting for robust stability
    • caution: measurement noise in high frequency range due to rotational speed calculation
  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
        1st column ... frequency (Hz)
        2nd column ... gain from T_M(Nm) to Omega_M(rad/s)
        3rd column ... phase (deg) from T_M to Omega_M
        4th column ... gain from T_M to Omega_L
        5th column ... phase (deg) from T_M to Omega_L
    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 (Omega_M (rad/s))
        3rd column: Omega_L (rad/s)
        4th column: u (T_M (Nm))
        5th column: r (rad/s)
    3. configuration of control experiment
      • reference signal r is specified as described in hinf.h and hinf_module.c:
                   r = (double)COM_ROT_SPEED;;
                   if(t > 2){
                     t1 = t - 2;
                     t1 -= ((int)(t1 / REF_PERIOD))*REF_PERIOD;
                     t1 /= 0.2;
        
                     if(t1 < 1){
                       r += REF_AMP * t1;
                     }else if(t1 < 4){
                       r += REF_AMP;
                     }else if(t1 < 6){
                       r += REF_AMP * (5 - t1);
                     }else if(t1 < 9){
                       r -= REF_AMP;
                     }else if(t1 < 10){
                       r -= REF_AMP * (10 - t1);
                     }
                   }
      • 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.
%-- 2023/12/07 13:33 --%
pwd
cd ..
nominal
weight
cont
perf
axis([9.9, 10, -10, 50])
axis([9.99, 10, -10, 50])
weight_2
pwd
weight_2
cont_2
perf
cd ..
perf

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

%-- 2023/12/14 13:50 --%
load result.dat
plot(result(:,1), result(:,2))
axis([9, 10, 10, 25])
load result2.dat
plot(result(:,1), result(:,2))
plot(result2(:,1), result2(:,2))
axis([9, 10, -10, 50])
axis([9.9, 10, -10, 50])
plot(result2(:,1), result2(:,2), '.-')
axis([9.9, 10, -10, 50])
nominal
weight
weight2
weight_2

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


添付ファイル: fileperf.m 306件 [詳細] fileweight_2.m 221件 [詳細] filecont_2.m 231件 [詳細] filecont.m 245件 [詳細] fileweight.m 196件 [詳細] filenominal.m 239件 [詳細] file2023.11.23-1.jpg 147件 [詳細] file2023.11.23-2.jpg 159件 [詳細] fileex1123_2.m 188件 [詳細] fileex1123_1.m 184件 [詳細] fileservo2.dat 227件 [詳細] fileservo1.dat 211件 [詳細] filereport2.pdf 285件 [詳細] file2023.11.16-1.jpg 140件 [詳細] file2023.11.16-2.jpg 135件 [詳細] fileex1116_1_opts.m 92件 [詳細] fileex1116_1.m 242件 [詳細] file2023.11.09-1.jpg 157件 [詳細] file2023.11.09-2.jpg 146件 [詳細] fileex1109_1.m 187件 [詳細] file2023.11.02-3.jpg 177件 [詳細] file2023.11.02-2.jpg 183件 [詳細] file2023.11.02-1.jpg 189件 [詳細] filereport1.pdf 334件 [詳細] fileex1102_1.m 242件 [詳細] file2023.10.26-1.jpg 163件 [詳細] file2023.10.26-2.jpg 159件 [詳細] fileex1026_1.m 202件 [詳細] fileex1026_2.m 207件 [詳細] fileex1026_3.m 232件 [詳細] file2023.10.19-4.jpg 154件 [詳細] file2023.10.19-3.jpg 164件 [詳細] file2023.10.19-2.jpg 154件 [詳細] file2023.10.19-1.jpg 162件 [詳細] fileex1019_1.m 270件 [詳細] fileex1019_2.m 268件 [詳細] fileex1019_3.m 240件 [詳細] filemod1019.mdl 243件 [詳細] file2023.10.12-3.jpg 167件 [詳細] file2023.10.12-2.jpg 170件 [詳細] file2023.10.12-1.jpg 176件 [詳細] fileex1012_1.m 288件 [詳細] fileex1012_2.m 252件 [詳細] file2023.10.05-2.jpg 161件 [詳細] file2023.10.05-1.jpg 185件 [詳細] filemod1005.mdl 256件 [詳細] file2023.09.28-4.jpg 160件 [詳細] file2023.09.28-3.jpg 192件 [詳細] file2023.09.28-2.jpg 176件 [詳細] file2023.09.28-1.jpg 165件 [詳細] fileex0928_1.m 322件 [詳細] file2023.09.21-4.jpg 186件 [詳細] file2023.09.21-3.jpg 176件 [詳細] file2023.09.21-2.jpg 157件 [詳細] file2023.09.21-1.jpg 159件 [詳細] filemod0921_1.mdl 206件 [詳細] fileex0921_1.m 272件 [詳細] file2023.09.14-3.jpg 140件 [詳細] file2023.09.14-2.jpg 142件 [詳細] file2023.09.14-1.jpg 145件 [詳細] fileex0914_2.m 290件 [詳細] filemod0914_1.mdl 218件 [詳細] filemod0914_2.mdl 225件 [詳細] fileex0914_1.m 270件 [詳細] file2023.09.07-3.jpg 160件 [詳細] file2023.09.07-2.jpg 162件 [詳細] file2023.09.07-1.jpg 157件 [詳細]

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