L1 adaptive control intro

Page 1

Intro to L1 Adaptive Control Steve Rogers 5 Aug 2015


Introduction to L1 Adaptive Control A high level L1 adaptive control diagram is shown* below.

• • •

The basic equations for an L1 adaptive control are shown* below. Note that there are 3 possible adaptation equations, with the bottom σ eqn most commonly used.

The three adaptation laws as shown may not all need to be implemented. In many cases only the bottom equation σ is used. The error that drives the adaptation is the model error. This suggests that the L1 controller as shown may not track a desired reference; however, it will provide stability as it forces the state predictor to match the plant. P is the solution of the Lyapunov equation: Am’P + Pam = -Q,Q=Q’>0 * Hovakimyan, N. and Cao, C., L1 Adaptive Control Theory, SIAM, 2010, ISBN 978-0-898717-04-4.


L1 Adaptive Controller Tunable Parameters For Simple Update

• Kg is a feedforward gain. Symbolically, an option for Kg is Kg = 1/(PC)(s=0), to facilitate tracking. • C is a low pass filter which is generally 1st order. • Gm is a plant approximation transfer function. Usually it is a 1st order low pass with gain and time constant. • Г is a scalar gain to regulate the value of σ.

A general way of obtaining parameter estimates* will be shown in the following slides. It is necessary to have a useful starting point to avoid excessive hand tweaking. * Rogers, S., Control and Estimation, 2015, ISBN


L1 Analysis For Obtaining Controller Gains L1 linear adaptive controller applied to a SISO system diagram below that uses only the σ update mechanism.

• P=G. By inspection we formulate the basic equations: x= GCe = GC(kgr-σ) and . • So, from these we have the closed loop transfer function . • Note that as , then as Г  inf, . • Through adaptation of the main eqn, as . This convergence allows us to use C*kg as a controller similar to what is done in internal model control (IMC). • For example if kg is known and C may be solved from the equation as C=

L1 tuning may be accomplished by using these 2 ideas.


Typical Controller Design Procedure And Example of Using L1 to Avoid Gain Scheduling with Variation of Operating Conditions

Much of the time controllers operating on a variety of linear models that represent diverse operating conditions must be evaluated. The following illustrates a Simulink based method for control evaluation: 1. Obtain and gather the models together. 2. Design a candidate controller 3. Implement the models in Simulink in such a way that a closed-loop linear model may be obtained using a command such as ‘linmod’. 4. Use the closed-loop linear model to obtain time based stability criteria and open-loop linear model to obtain frequency based stability criteria. 5. Optimize, if desired, based on desired performance and stability criteria.

The following matlab code shows one way of gathering linear models together. The following is a family of SISO 1st order plant model implementation in matlab. kp = 1:3;kp = kp*10; tc = 1:3;tc = tc*.01; td = 1:2:5;td = td*.002; kk = 1; for i = 1:length(kp) for j = 1:length(tc) for k = 1:length(td) G(:,:,kk) = tf(kp(i),[tc(j) 1],'InputDelay',td(k)); kplant(kk,:)=[kp(i),tc(j),td(k)]; kk = kk + 1; end end • ‘kp’ is the plant gain vector, end • ‘tc’ is the plant time constant vector, • ‘td’ is the plant time delay vector. • ‘G(:,:,kk)’ is a vector of plant linear transfer function.


More L1 Design Sequence

The next step is to design the L1 Adaptive Controller as shown in the script below. Here it is designed in a statespace format, but it may be formatted differently according to preferences or design needs. % L1 controller design gam = -10000;tcdes = .5; c = 15;am = -1/tcdes;kg = -am; Au = [-c -c 0;0 0 gam;1 1 am];Bu = [c/kg 0;0 -gam/kg;0 0]; Cu = [1 -1 0];Du = [0 0]; Ctrl = ss(Au,Bu,Cu,Du);

’ if ‘c’ and ‘gam’ are selected to be ‘large’ the L1 adaptive controller can become a decent tracking controller with respect to ‘am’.

Once the Simulink model inputs are in place a for-loop may be constructed to generate the closed-loop linear models for analyses. An example script is shown below. t_end = 10; t = 0.1:0.05:t_end; Gdes = tf(1,[tcdes 1]); % desired reference model ydes = step(Gdes,t); % desired reference trajectory [n1,n2,nm] = size(G); % G is generated on the previous page dat1 = [];dat2 = [];yerr1 = []; for i = 1:nm Gmdl = G(:,:,i); [A,B,C,D] = linmod(mdlname); % linmod uses above siso mdl to generate linear state space models G2B_Des(:,:,i) = ss(A,B,C,D);GmdlSS = G2B_Des(:,:,i); yt = step(GmdlSS,t); % model output generation yerr1 = [yerr1 yt(:,1,1)-ydes]; % error to be analyzed S1{i} = stepinfo(GmdlSS(1,1)); % generate time domain criteria [Gm1,Pm1,Wgm,Wpm1] = margin(GmdlSS(1,1)); % frequency domain criteria (used CL here for convenience) dat1 = [dat1;S1{i}.RiseTime S1{i}.SettlingTime S1{i}.Overshoot ... kplant(i,:)]; % generate table data, kplant is plant model params


Evaluation of L1 Adaptive Controller A step response of all the closed-loop models is very helpful. It is generated by the following script. The composite step plot is shown. In this case, the designed controller appears to handle the linear model combinations. The value pin1 appears in the plot title as pin. This is a performance index based on deviation of the plant output from the desired setpoint. pin1 = sum(sum(abs(yerr1))); figure(1),step(G2B_Des,t_end),grid on,hold on step(Gdes,t_end,'r'),grid on title(['step compare, pin = ',... num2str(pin1,'%10.1f')]) % G2B_Des is 27 vector of plant responses. Gdes is desired (am = tcdes =~.5 sec)

Time constant ~ 0.5 sec

As in the plot the controller becomes a good tracking controller with respect to a desired ‘am’ if ‘c’ and ‘gam’ are selected to be ‘large’. Please note that all 27 plus the desired trajectory are plotted below. That they overlay each other shows good performance. The performance index (pin) is the composite error for all plots compared to the desired trajectory.


Evaluation of L1 Adaptive Controller In the column headings • ‘rt’ is rise time in sec., • ‘st’ is 2% settling time in sec., • ‘os’ is % overshoot, • ‘kp’ is the corresponding plant gain, • ‘tc’ is the plant time constant in sec., • ‘td’ is the time delay in sec. The script shown below creates the table. The matrix ‘dat1’ could have been modified to include gain and phase margin, however, in this case the gain margin is infinity, so there is no useful information content. With more complex models it will be helpful to include them. pos = [500 650]; f = figure('Position',[800 100 pos]); cnames = {'rt','st','os','kp','tc','td'}; t = uitable('Parent',f,'Data',dat1,'ColumnName',cnames,... 'Position',[0 0 pos]);


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.