• Non ci sono risultati.

This control problem can be solved by solving the following equation:

N/A
N/A
Protected

Academic year: 2021

Condividi "This control problem can be solved by solving the following equation:"

Copied!
5
0
0

Testo completo

(1)

Discrete systems: point to point control

Control problem: Given the states x (0) and x(k), compute the input sequence u (0), . . . , u(k − 1) which stirs the system from the initial state x(0) to the final state x (k) in the time interval [0, k].

b b b b

b b b b

b b b b

u(k) x (0)

x (k)

This control problem can be solved by solving the following equation:

x (k) = A k x (0) + X k−1

j=0

A (k−j−1) Bu (j) with respect to the unknown sequence u(j) for j ∈ [0, k − 1].

Property . The control problem has a solution if and only if:

x(k) − A k x(0) ∈ X + (k)

that is if the vector x(k) − A k x (0) is reachable from the zero state in k steps.

If the problem has a solution, the solution can be determined solving the fol- lowing non homogeneous linear system with respect to the unknown sequence u(j) for j ∈ [0, k − 1]:

x(k) − A k x(0) = [B AB . . . A k−1 B]

 

u(k − 1) u (k − 2)

...

 

 = R + (k)u

(2)

where u denotes the following unknown vector:

u =

 

 

u (k − 1) u (k − 2)

...

u(0)

 

 

=

 

 

 

 

 

u 1 (k − 1) ...

u m (k − 1) ...

u 1 (0) ...

u m (0)

 

 

 

 

 

The solution u of the given problem is NOT unique. All the possible solutions u can be obtained adding the kernel v of matrix R + (k) to a particular solution u :

u = ¯ u + ¯ v , v ¯ : R + (k)¯ v = 0 For brevity, in the following we will indicate R + k = R + (k).

Property. It can be proved that among all the possible solutions u, the one that minimizes the Euclidean norm

||u|| = v u u t

X k−1 i=0

u T (i) u(i)

is the following:

u = (R + k ) T [R + k (R + k ) T ] −1 [x(k) − A k x (0)]

This solution requires a perfect knowledge of the system parameters to be controlled (matrices A and B) and no disturbances acting on the system.

Note . If R + k is a full rank matrix, then (R + k ) T [R + k (R + k ) T ] −1 is the speudo-

inverse matrix of the rectangular matrix R + k .

(3)

Example. Let us consider the problem of heating steel bars which pass through a oven segmented in n = 5 zones. Let us suppose that the heating cost in each section is proportional to the square of the temperature in the zone itself.

θ

0

u

0

θ

1

u

1

θ

2

u

2

θ

3

u

3

θ

4

u

4

θ

5

let us consider the i-th zone of the oven, i = 0, 1, . . . , 4, and let:

θ

i

temperature of the incoming bar θ

i+1

temperature of the exit bar

u

i

temperature of the i-th zone of the oven

Let us consider the following model for the i-th zone of the oven (for i = 0, 1, . . . , 4):

θ

i+1

= θ

i

+ u

i

− θ

i

2 ↔ θ

i+1

= 1

2 θ

i

+ 1 2 u

i

Let R

5

be the reachability matrix of the system in 5 steps (A =

12

, B =

12

):

R

5

= 

1 2

1 4

1 8

1 16

1 32



The sequence u

0

, u

1

, . . ., u

4

of the oven temperatures which heats the steel bars from the room temperature θ

0

= 0 C

o

to the final temperature θ

5

= 1000 C

o

minimizing the heating cost function |u| = pP

n

i=1

u

2i

is the following:

¯

u = R

T5

(R

5

R

T5

)

−1

1000 =

 

 

 

 

1 2 1 4 1 8 1 16

1 32

 

 

 

 

 1 − (1/32)

2

3



−1

1000 =

 

 

 1502

751 375 188 94

 

 

=

 

 

 u

4

u

3

u

2

u

1

u

0

 

 

Temperatures of the steel bars for n ∈ {1, 2, 3, . . . , 6}:

500 600 700 800 900 1000

n=1 n=2 n=3 n=4 n=5 n=6

Temperatures of the steel bars

(4)

Optimal temperatures of the oven sections for n ∈ {1, 2, 3, . . . , 6}:

1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6

0 200 400 600 800 1000 1200 1400 1600 1800 2000

Optimal temperatures of the oven segments

Temperatures u(i) of the oven segments

Number n of oven segments

Heating cost function |u| for n ∈ {1, 2, 3, . . . , 6}:

1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6

1700 1750 1800 1850 1900 1950 2000

Heating cost function |u| for n=[ 1 2 3 4 5 6]

Cost function |u|

Number n of oven segments

(5)

• Matlab file opt k oven.m:

---

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% File: opt_k_oven.m

% Computation of the optimal temperatures of a n-segment oven

% which minimizes the quadratic cost.

x0=0; xf=1000; % Initial and final states

a=1/2; b=1/2; % Difference equation coefficients

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

MainString=’opt_k_oven’; Stampa=1;

figure(1); clf; n_max=6;

cost=zeros(1,n_max);

u=zeros(n_max);

for n=(1:n_max); % For n varying from 1 to n_max Rn=[b zeros(1,n-1)];

for ii=(2:n)

Rn(ii)=a*Rn(ii-1); % Reachability matrix end

u(n,1:n)=flipud(Rn’*inv(Rn*Rn’)*(xf-a^n*x0)); % Optimal input sequence xn=[x0 zeros(1,n)];

for ii=(1:n)

xn(ii+1)=a*xn(ii)+b*u(n,ii); % State evolution end

plot(0:n,xn,’*-’); hold on % Data plot text(n-1/2,0.95*xn(n+1),[’n=’ num2str(n)])

cost(n)=norm(u(n,:));

end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

figure(1)

title(’Temperatures of the steel bars’) ylabel(’Temperatures th(i) the steel bars’) xlabel(’Number n of oven segments’); grid on

if Stampa; eval([’print -depsc ’ MainString ’_’ num2str(gcf)]); end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

figure(2); clf;

for n=(1:n_max); % For n varying from 1 to n_max plot(n:n_max,u(n:n_max,n),’*-r’); hold on

end

xlim([1 n_max])

title(’Optimal temperatures of the oven segments’) ylabel(’Temperatures u(i) of the oven segments’) xlabel(’Number n of oven segments’); grid on

if Stampa; eval([’print -depsc ’ MainString ’_’ num2str(gcf)]); end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

figure(3); clf

plot((1:n), cost(1:n),’*-m’); % Plot the cost function title(’Heating cost function |u| for n=[ 1 2 3 4 5 6]’) ylabel(’Cost function |u|’)

xlabel(’Number n of oven segments’); grid on

if Stampa; eval([’print -depsc ’ MainString ’_’ num2str(gcf)]); end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

---

Riferimenti

Documenti correlati

Since distance affects not only the driver wage, but also the fuel consumption for traction, as shown in the CMEM model (Equation ( 3 )), when it is introduced in another

This dual system picks up household packaging in parallel to the existing municipal waste-collection systems. DSD only collects packaging material from manufacturers who pay a

In this paper we study the asymptotic behavior of solutions to an elliptic equation near the singularity of an inverse square potential with a coefficient related to the best

In Section 4 we prove Theorem 1.1 by combining the Pohozaev type identity with the results of our local blow-up analysis.. Section 5 is devoted to the computation of the

L’osservazione dinamica di un quadrilatero, come quello della figura 4 a destra, ha portato gradualmente alcuni studenti dal muovere la figura senza un particolare

A continuous-time system SYS can be discretized using the

The corresponding discrete sampled system (F, G, H) can be deter- mined as follows.. Let T the

Il lavoro si articola in tre parti: la prima riguarda l’opportunità di privilegiare il gioco e il problem solving nell’insegnamento della matematica in ordine al perseguimento