• Non ci sono risultati.

Design of a control system

N/A
N/A
Protected

Academic year: 2021

Condividi "Design of a control system"

Copied!
12
0
0

Testo completo

(1)

SE4

Prof. Davide Manca – Politecnico di Milano

Dynamics and Control of Chemical Processes

Solution to Lab #4

Design of a control system

(2)

System representation

Data:

3

2 1

2 2

2 1

9.4 m s 30 m

50 m 1.2 s m F i

A A r

A 2

h 2

A 1

h 1

F i

r 1

LC

F o

I.C.:

2 6.6 m h 

New set-point

2 8.6 m

h 

(3)

Design of the proportional-integral controller

Performance criteria

• Integral of Square Error (ISE):

• Integral of the Absolute value of Error (IAE):

• Integral of the Time-weighted Absolute Error (ITAE):

• Where:

     

2 2

, ,

0 0

C I C I

K K

ISE t dt Min ISE Min t dt

 

 

   

    

 

 

     

, ,

0 0

C I C I

K K

IAE t dt Min IAE Min t dt

 

 

   

    

 

 

     

, ,

0 0

C I C I

K K

ITAE t t dt Min ITAE Min t t dt

 

 

   

    

 

 

) ( )

( )

( ty SP ty t

(4)

Design of the proportional-integral controller

Pick controller parameters to minimize integral:

ISE Longer settling time

IAE Allows larger deviation than ISE

ITAE Weights errors occurring later more heavily

(5)

Minimum search: brute-force method

 max

 min max

K C

min

K C

Points where to evaluate the objective function

K C

(6)

Optimizer use

  2  

, ,

C I C I

0

K K

Min ISE Min t dt

   

  

   

n , n

C I

K

Evaluation of the dynamics

Objective function evaluation

Evaluation of the new controller parameters

 

1

 

1

n

,

n

C I

K

 

1

,  

1

C I

n n n n

C C I I

KK

 

  

 

   

opt , opt

K

time

Initial steady state

New set-point

(7)

MATLAB optimizer

A constrained optimization is performed in order to avoid that the optimizer chooses unfeasible values of the variables respect to which the optimization is being done:

xmin = [min(kc) min(taui)]; % Lower limits xMax = [max(kc) max(taui)]; % Upper limits

x0 = [kc0 taui0]; % Initial values

[x] = fmincon(@(x)funct(x,params),x0,[],[],[],[],xmin,xmax);

Kc = x(1);

taui = x(2);

end

(8)

MATLAB implementation

function ISE=funct(x)

ti=x(2);

Kc=x(1);

global fold integral told SP

... %Definition of constraints

SP=6.6; %Set point

h10=F*r1+6.6; %Steady state conditions (See Lab 3) h20=6.6; %h2 initial value

y0=[h10 h20]; %Vector of initial values integral=0; %definition of the integral fold=h20; %trapezoid base

told=0; %trapezoid leg

option = odeset('RelTol',1E-8,'AbsTol',1E-10,'OutputFcn',@printo);

[time,height]=ode23s(@(t,y)tank_LC(t,y,F,A1,A2,r1, Kc, ti),[0 600],y0,option);

(9)

MATLAB implementation

err=(height(:,2)-SP); %%Error definition

err2=err.^2; %%Squared error (ISE)

stepm=length(time); %Number of steps

I=0; %Initialization of the integral

for m=2:stepm

%Calculation of the integral (Trapezoid method) I= I+(err2(m)+err2(m-1))*(time(m)-time(m-1))/2.;

end ISE=I;

end

(10)

MATLAB implementation

function dy=tank_LC(t,y,F,A1,A2,r1, Kc, ti) global fold integral told SP

h1=y(1);

h2=y(2);

if t>=20

Fin=F*2; %Disturbance: it doubles the inlet flow else

Fin=F;

end

integraltime= integral + (fold-SP + h2-SP)*(t-told)/2;

F1=(h1-h2)/r1; %Inlet flow, from the stady state assumption F2=F+Kc*(h2-SP)+Kc/ti*integraltime; %Outlet flow, controlled variable

dy(1,:)=(Fin-F1)/A1; %Governing equations

dy(2,:)=(F1-F2)/A2;

(11)

MATLAB Output function

function status = printo(t,y,flag) %Function printo global told fold SP integral

if strcmp(flag,'init')

elseif strcmp(flag,'done')

else

h2=y(2);

err=h2-SP;

integral=integral+(fold-SP+err)*(t-told)/2;

fold=h2;

told=t;

end

status=0;

end

(12)

Bibliography

• Stephanopoulos G. (1984) ‘Chemical Process Control. An Introduction to Theory and Practice’, Prentice-Hall, Englewood Cliff.

• Luyben, W., Tyréus, B., Luyben, M. (1998) ‘Plantwide Process Control’, McGraw-Hill, New York.

• Forzatti, P., Lietti, L. (2000) ‘Strumentazione industrial chimica. Elimenti di

regolazione’, CUSI, Milan.

Riferimenti

Documenti correlati

Determination of the parameters of the proportional and the proportional- integral control systems by means of the Cohen-Coon method assuming there is a step disturbance on the

• livello di rete: si deve stabilire quale cammino deve essere scelto nella sottorete e gestire gli eventuali problemi che possono sorgere per la congestione della rete, o

This paper analyzes the requirement of the computer control system of the chemical industry, undertakes the overall design of the control system with the centrifugal pump in

The vibration type transmission machine is a mechanical vibration system which is controlled by the inertia vibration exciter, to achieve high efficiency and energy saving,

Key problems related to screening and assessment include: failure to comprehensively examine one or more of the co-occurring disorders; inadequate staff training to identify

As it will be reported, sometimes the performances of the new PID will not be so optimal but the results can still be used because, as it was shown in the previous section,

As I have already said, I often make ‘posthumous’ sketches, under pressing demands, as in the aforementioned case of the Museum of Modern Art (MoMA), of which this sketch is

Come ho già detto, talvolta mi capita di fare schizzi postumi sotto pesanti richieste, come nel caso citato del Museum of Modern Art (MoMA), di cui questo schizzo è un esem-