1. Speed Control
We are driving a car with a constant speed. Consider the situation that we are necessary to reduce the speed to stop somewhere. How do we manipulate the driving force?
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 problem is how to manipulate the driving force . Consider the following proportional control (P Control):
(2)
Substituting (2) into (1), we have the closed-loop system:
(3)
That is, the driving force is manipulated to be proportional to the velocity with negative sign. This means that for a high speed the large regulating force is produced in the reverse direction, and for a low speed the small regulating force is applied. This control strategy is called as feedback mechanism and depicted as follows:
In general, the solution of a differential equation is given by
(4)
Therefore the solution of (3) is given by
(5)
This means
(6)
That is, we can reduce the car speed gradually and stop it.
By the way, assume that we are required to change the current speed to the new speed . How do we manipulate the driving force for the speed up or speed down?
Let the velocity error from the current velocity to the required constant speed be
(7)
Then consider the following proportional control:
(8)
i.e.
(9)
Substituting (8) into (1), we have
(10)
Noting , this can be rewritten as
(11)
Therefore, we have
(12)
This means
(13)
The above control strategy is depicted as follows:
Exercise 1
Execute the following program under SCILAB. By changing the P gain (kv) and the target speed (vs), investigate how the velocity approaches to .
——————————————————————————————————————–
//cart1.sce
function dx=f(t,x),dx=A*x,endfunction
m=1; kv=1; A=-kv/m;
v0=1; vs=0.5; x0=vs-v0;
t0=0; t=0:0.1:10;
x=ode(x0,t0,t,f);
v=vs-x;
scf(1);
plot(t,v), mtlb_grid, title(‘v(t)’)
——————————————————————————————————————–
2. Position Control
Under the speed control described in the above, we can’t specify the stop position. For example, in the case of encountering an obstacle at the distance from the current position as shown in the following, we will be required to stop in front of the obstacle. How do we manipulate the driving force in order to stop within the running distance of ?
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)
Let the position error from the current position to the required target position be
(15)
Then consider the following proportional and derivative control (PD Control):
(16)
i.e.
(17)
Here is the speed error given by (7), in which must be 0. Note .
Substituting (16) into (1), we have
(18)
Noting , this can be rewritten as
(19)
Furthermore, taking account of , we have
(20)
As shown here, the solution is given by
(21)
As is a stable matrix, the following holds.
(22)
This means
(23)
The above control strategy is depicted as follows:
Based on (17), this is equivalent to the following structure:
Exercise 2
Execute the following program under SCILAB. Determine the D gain (kv) for collision avoidance, such that no undershoot occurs in the position .
——————————————————————————————————————–
//cart2.sce
function dx=f(t,x),dx=A*x,endfunction
m=1; kr=1; kv=2; A=[0 1;-kr/m -kv/m];
r0=-1; rs=0; v0=0; vs=0; x0=[rs-r0;vs-v0];
t0=0; t=0:0.1:10;
x=ode(x0,t0,t,f);
v=vs-x(2,:); r=rs-x(1,:);
scf(1);
subplot(211), plot(t,v), mtlb_grid, title(‘v(t)’)
subplot(212), plot(t,r), mtlb_grid, title(‘r(t)’)
——————————————————————————————————————–
Question:
Why the control law (2) is called as not D control but P control?
Answer:
In the situation of the speed control, we are assumed to measure the velocity, that is, we don’t have to differentiate the position. So we need to feed back the value proportional to the measured velocity. On the other hand, in the situation of the position control, we are assumed to measure the position, that is, we have to differentiate the position to get the velocity.