INTRODUCTION TO CONTROL SYSTEMSPOSITION CONTROL OF A SPRING-MASS SYSTEM
Goal: Positioning the mass m at the desired positionx. To achieve this goal, a control force Fc is used.
To perform a control task, the transfer function of theconsidered system should be known. The transferfunction of an engineering system can be obtainedusing its governing equation of motion. The Lagrangemethod is a practical way of deriving the equation ofmotion. For this purpose, we first write the kineticand potential energies of the system together withthe virtual work expression.
Lagrange’s Equation:
The equation of motion of the spring-mass system:
Application of the Laplace Transform to the both side of theequation of motion gives the TRANSFER FUNCTION of the system.The TRANSFER FUNCTION relates the Input of the system (Fc ) to theOutput (x) assuming all initial conditions as zero.
s20
kscsm1)s(X 2 ++
=The Laplace transform ofthe output for a step inputwith magnitude 20 N.
step command calculates the response of the system to a unit step input. So, themagnitude of the step input should be specified in the numerator of the output.
The response of the spring-mass system to a control force Fc in the form of a stepfunction with magnitude 20 N can be obtained by using the step command inMatlab.
20
Fc(t)
t (sec)
kFx c
ss =
s20
kscsm1)s(X 2 ++
=
k20
kscsms20slimx 20sss =
++=
→
Magnitude of the step input
clc;clearm=50;c=50;k=2000;num=20;den=[m,c,k];step(num,den)
Spring constant
The response of the system can be obtained by using Matlab Simulink.
>>simulink
0 1 2 3 4 5 6 7 8 9 100
0.002
0.004
0.006
0.008
0.01
0.012
0.014
0.016
0.018
Zaman (s)
x (m
)
Considering that the the spring constant k in the system is constant, the onlyfactor, which determines the magnitude of the response is the amplitude of thecontrol force Fc.
The stedy-state response of the system xss will be different when a disturbanceacts on the system. If the disturbance is shown as Ft
Disturbance
The form of equation of motion with a disturbing (uncontrolled) force
K2=10 Volt/m
We will add an actuator , which converts the electric signal to a force /moment and a sensor, which converts a physical output to an electric signal (voltage)
The relation between the inputs (V1 and Ft) and the output V2 can be written as:
Main input Disturbance
If the desired output of the mass is xss=0.01 m (1 cm), the voltage output ofthe displacement sensor should be V2ss=xss*K2=0.01*10=0.1 V. (The steadystate value of the sensor output). The input voltage, which produces thedesired sensor output can be calculated using the relation given below
V2.010*100
2000*1.0KKkVV
21
ss2ss1 ===
The s term denotes the timederivative and in the steady-state case , all changes(derivatives) are zero.
ss1221ss2 Vkscsm
1KKV++
=
ss121
ss2 VkKKV =
Input voltage in order toobtain mass displacementas 1 cm.
Now, we calculate the response of the system to a step input with magnitude 0.2 V. In this calculation, we take the magnitude of disturbing input Ft as zero.
)s(Vkscsm
1KK)s(V 12212 ++=
s2.0
kscsm1KK)s(V 2212 ++
=
What will the system response be if the disturbing force is different from zero? Let’s assume the step disturbance Ft = 10 N.
Laplace transform of the disturbance
0 1 2 3 4 5 6 7 8 9 100
0.02
0.04
0.06
0.08
0.1
0.12
0.14
0.16
0.18
Ft=0
Ft=10 N
V2(t)
Time (s)
DisturbanceInput Voltage output
Displacement output
Δt should be choosen properly !
In a Closed Loop Control system, the output of the system is sent back and compared with the Reference signal.
Controller
The expression for the output of the system can be writen as
For Ft=0, V2ss=0.1 V and for Ft=10 N, V2ss=0.05. This result show that the output ofthe open-loop system is highly influenced from the disturbance. This undesiredeffect may be removed by converting the open loop system to a closed loop controlsystem.
Reference signal(Desired output)
ActuatorSystem
Sensor
Disturbance
EError
Where Hk is the transfer function of the controller used in the closed loopcontrol system. The transfer function of the controller determines the type ofthe operations which will be applied to the error signal.
22
11
VqR00qRV
=−=−
V2
R2
-+V1
R1
11
22 V
RRV −=
q
q
11
22
21
12
1
1
VRRV
VRVR
RVq
−=
=−
=
R2
-+V1
R1
q
q
V2
R
-+
R
V2'
11
21
1
222
11
22
VRRV
RR
RRV
RRV
VRRV
=
−−=′−=
−=′
GAIN CIRCUIT (PROPORTIONAL)
2
1
VqC10
0qRV
=−
=−
C
-+V1 V2
R
∫−= dtVRC1V 12
q
q
∫
∫∫
−=
==
=
=
dtVRC1V
dtVR1dtqq
VR1q
VqR
12
1
1
1
INTEGRAL CIRCUIT
R
-+V1 V2
C
dtdVRCV 1
2 −=
q
q
DERIVATIVE CIRCUIT
2
1
VqR0
0qC1V
=−
=−
dtdVRCV
dtdVCq
CVq
12
1
1
−=
=
=
cVRq0 =−
R
V2
R
R
V1 -+
Vc
R
R-+
21c VVV −=
+-
V1
V2
Vc
2q
3q
-+
V1 Vc
R
R
R
V2
V3
R
1qq
1qq
( )321cc321
c
321
33
22
1111
VVVVVRV
RV
RVR
VqR0qqqq
RVq,
RVq
RVq0qRV
++−=⇒=
++−
=−++=
==
=⇒=−
)VVV(V 321c ++−=
21 qqq += RVq
0qRVRR
11
11
−=
=−−
RVq
0RqV
22
22
=
=−
21c
21c
c
VVVRV
RVRV
VRq0
−=
+−−=
=−
2q
R2
-+
R1
R4
-+
C4
C3
-+
R3 R
R
R
R
-+
V1
V2
1
2P R
RK =33
I CR1K = 44D CRK =
∫ ++=dt
dVKdtVKVKV 1D1I1P2
PID CONTROLLER
P Control (PROPORTIONAL CONTROL)
In this type of control, the error signal is amplified in order to eliminate thenegative effect of the disturbance on the system output.
Choose Hk as 60
Without disturbanceclc;clearm=50;c=50;k=2000;k1=100;k2=10;hk=60;num=[k1*k2*hk];den=[m,c,k+k1*k2*hk];step(num*0.1,den)
With disturbance Ft=10 N
clc;clearm=50;c=50;k=2000;k1=100;k2=10;hk=60;num=[k1*k2*hk];den=[m,c,k+k1*k2*hk];step(num*0.1-k2*10,den)
P-I Control (PROPORTIONAL-INTEGRAL CONTROL)
P-I-D Control (PROPORTIONAL-INTEGRAL –DERIVATIVE CONTROL)