1. Speed Control under Disturbance
Consider the above situation we we are driving a car under a unknown constant wind disturbance. Then assume that we are required to keep a specified speed . In order to go forward against the wind disturbance, we will step down the acceleration pedal compared with the case of no wind disturbance. But usually we will not able to measure the disturbance force . How do we manipulate the driving force in an automatic way?
Let , and be the mass, the velocity and the driving force at time of the car respectively. Its motion is governed by the following differential equation:
(1)
The usual speed control is given by
(2)
In addition to this proportional control, we need an extra term to cancel the disturbance as follows:
(3)
Then substituting (2) into (1), the closed-loop system is described by
(4)
Noting , this can be rewritten as
(5)
In general, the solution of is derived as
(6)
Therefore the solution of (4) is given by
(7)
Based on this expression, it is trivial that if , . But this strategy can’t be used because of unknown . We need some mechanism to estimate the the value of .
Consider the following integral action:
(8)
Instead of (3), we will use the following proportional control with integral action (PI Control):
(9)
Substituting (9) into (1) and using , the closed-loop system is described by
(10)
Furthermore, combining with (8), we have
(11)
Therefore if is a stable matrix, when , the following holds:
(12)
Therefore
(13)
This means that can estimate which is unknown.
The above control strategy is depicted as follows:
Exercise 1
Execute the following program under SCILAB. Determine appropriate the D gain (kv) and the I gain (kI), observing the corresponding constant distance estimated.
——————————————————————————————————————–
//cart3.sce
function dx=f(t,x),dx=A*x+w, endfunction
m=1; kv=3; kI=1; A=[-kv/m -kI/m;1 0];
ws=-1; w=[-1/m*ws;0]
v0=1; vs=0.5; x0=[vs-v0;0];
t0=0; t=0:0.1:20;
x=ode(x0,t0,t,f);
v=vs-x(1,:); d=-kI*x(2,:);
scf(1);
subplot(211), plot(t,v), mtlb_grid, title(‘v(t)’)
subplot(212), plot(t,d), mtlb_grid, title(‘w*’)
——————————————————————————————————————–
2. Position Control under Disturbance
Consider the above situation we we are driving a car under a unknown constant wind disturbance. Then assume that we are required to stop in front of the obstacle. How do we manipulate the driving force in an automatic way?
Let , , and be the mass, the position and the driving force at time of the car respectively. The velocity is . Its motion is governed by the following differential equation:
(14)
Consider the following integral action:
(15)
The position control under disturbance should be given by the following proportional and derivative control with integral action (PID Control, PD-I Control):
(16)
where , . Substituting (16) into (14) and using , the closed-loop system is described by
(17)
Combining with , we have
(18)
Therefore if is a stable matrix, when , the following holds:
(19)
Therefore
(20)
This means that can estimate which is unknown.
The above control strategy is depicted as follows:
This is equivalent to the following structure:
Exercise 2
Execute the following program under SCILAB. Determine appropriate PID gains (kr, kv, kI), observing the corresponding constant distance (ws) estimated.
——————————————————————————————————————–
//cart4.sce
function dx=f(t,x),dx=A*x+w,endfunction
m=1; kr=5; kv=5; kI=1; A=[0 1 0;-kr/m -kv/m -kI/m;1 0 0];
ws=-1; w=[0;-1/m*ws;0]
r0=-1; rs=0; v0=0; vs=0; x0=[rs-r0;vs-v0;0];
t0=0; t=0:0.1:20;
x=ode(x0,t0,t,f);
r=rs-x(1,:); d=-kI*x(3,:);
scf(1);
subplot(211), plot(t,r), mtlb_grid, title(‘r(t)’)
subplot(212), plot(t,d), mtlb_grid, title(‘w*’)
——————————————————————————————————————–