simulink - simon amboise
TRANSCRIPT
-
8/9/2019 Simulink - Simon AMBOISE
1/14
1
Simon AMBOISE, Weronika KRAKOWIAK
11/06/2008
Velocity control with a PID controller
Simulink project
-
8/9/2019 Simulink - Simon AMBOISE
2/14
2
Sommaire
1) Introduction..................................................................................................................................... 3
2) Choice of our DC motor................................................................................................................... 3
3) Equations for the motor and for the load : ..................................................................................... 4
4) Motor and load model with simulink .............................................................................................. 6
5) Open-loop........................................................................................................................................ 7
6) Close loop ...................................................................................................................................... 10
7) Digital transformation ................................................................................................................... 12
-
8/9/2019 Simulink - Simon AMBOISE
3/14
3
1)IntroductionServomechanism is an automatic device for the control of a large power output by means of a
small power input or for maintaining correct operating conditions in a mechanism. It is a type of
feedback control system. The constant speed control system of a DC motor is a servomechanism that
monitors any variations in the motor's speed so that it can quickly and automatically return thespeed to its correct value. Servomechanisms are also used for the control systems of guided missiles,
aircraft, and manufacturing machinery.
In our case, we assume that the direction of the rotational movement of the motor changes in
time. Thats why we have applied huge voltage (170 V) in order to obtain quite a big torque.
2)Choice of our DC motorWe have decided to choose the DC motor AXEM MC23S which is product by Parker SSD Parvex.
This DC motor is used as a part of servomotor.
Fig.1 : F series (on left) and MC series (on right)
The characteristics of this motor are given in the table below:
DC Motor Unit Symbol MC23S
Rated torque Nm Cn 6,1
Rated speed rpm Nn 3000
Rated power output W Pn 1900
Rated voltage V Un 170
Rated current A In 13
EMF at 1000 rpm V Ke 53
Torque constant Nm/A Kt 0,506
Friction coefficient at 1000 rpm Nm Kd 0,013
Armature rsistant R 0,9
Inductance H L 238
Inertia kg.m 10-5 Jm 230
-
8/9/2019 Simulink - Simon AMBOISE
4/14
4
So, we can calculate the back EMF constant Kb and damping ratio of the mechanical
system b (linear model):
So, Kb=Kt=K=0,506
3)Equations for the motor and for the load :a)The motor
A common actuator in control systems is the DC motor directly provides rotary motion and,
coupled with wheels or drums and cables, can provide transitional motion.
Fig.2 The free body diagram of the rotor showing the direction of rotation.
Fig.3 The electric circuit of the armature.
The motors torque - Tm - is related to the armature current - i - by a constant factor Kt:
The electromotive force - e - is related to the rotational velocity by the following equation:
Tload
-
8/9/2019 Simulink - Simon AMBOISE
5/14
5
This system will be modeled by summing the torques acting on the rotor inertia and
integrating the acceleration to give the velocity, and integrating velocity to get position.
The first equation is based on the Newtons law, presenting the sum of momentum acting on the
rotor equal to zero:
Basing on the Fig.2, it means on the free body diagram of the motors rotor, we can write the
following equation:
Where:
J Moment of inertia of the rotor
Kt
Integrals of the rotational acceleration
The second equation is based on the Kirchoffs law, presenting the sum of voltages in the electric
circle of the armature:
Electromotive force constant (armature constant)
i Armature current
T Motors torque
b Damping ratio of the mechanical system
Basing on the Fig. 3, it means on the electric circuit of the armature, we can write the following
equation:
Where:
L Electric inductance
R Electric resistance
i Armature current
V Armature voltage
Ke
Rate of change of armature current
Electromotive force constant (motor constant)
b Damping ratio of the mechanical system
-
8/9/2019 Simulink - Simon AMBOISE
6/14
6
b)The load
At the same way:
The load is coupled with the motor rotor through a somewhat flexible link there will be a spring
action if the positions of the rotor and the load differ. The difference in position (angle) is thus feed
back as a counter torque multiplied by the spring constant. The same is true for the damping. The
difference in velocities between the two bodies will damp the system.
4)Motor and load model with simulink
Fig4 Motor model
Input:
Vin: Voltage input
T_load: load torque
Output:
th_m: motor
dth_m: dmotor/dt
Input:th_m: motor
dth_m: dmotor/dt
Output:
T_load: loads torque
dth_l: dload/dt
th_l: load
Tbrl: spring damping
torque for connection
rotor/load
TKrl: spring constant
torque for connectionrotor/load
-
8/9/2019 Simulink - Simon AMBOISE
7/14
7
5)Open-loopa) The input voltage
b) Angular Velocity
On this graph we can observe the behavior of the motors angular velocity (yellow line) in
comparison to the loads angular velocity (violet line). We can see certain fluctuations at the
very beginning of the movement, in the close neighbourhood of the point zero, as well as after
1s - when the motor changes its direction of movement. We can see that the value of the
angular velocity approaches 335 rad/s, and that its sign indicates the proper direction of
movement.
On the two small graphs we can observe exactly the behavior of the motors (yellow line) and
loads (violet line) angular velocities in the places where the fluctuations appear. On the first
graph we can see that at the very beginning the motor starts its normal movement and then -
as the movement of the load appears - the angular velocity of the motor stabilizes and
afterwards both velocities become almost equal, which we can observe on the graph (~0.065s)
by the two lines almost covering each other perfectly. On the second graph we observe the
behavior of the system after 1s. We can see that as the direction of the movement changes
(~1s), the behavior of the system is similar to the one at the beginning. The motor starts its
On this graph we can see the behavior of the
motor with the load as it starts to rotate, then weobserve that after 1s its direction of movement
changes. These are the initial condition that we
have applied. We observe how the voltage
changes during this process at the beginning its
value is equal to the nominal value of the
motors voltage (170V) and afterwards, after 1s,
as the voltage value changes sign to the opposite
the direction of the motors movement changes.
-
8/9/2019 Simulink - Simon AMBOISE
8/14
8
normal movement in the opposite direction as previously and then as the movement of the
load also changes, the angular velocity of the motor stabilizes and both velocities become
almost equal it is visible on the graph graph (~1.065s) by the two lines almost covering each
other perfectly. We can see that the time after which the both velocities become almost equal
measuring it as the movement of the motor starts or as the direction of the movement
changes - in each case, is very similar.
c) Angular position
d) Torque
On this graph we can observe the motors
(yellow line) and loads position (violet line)
behavior presented in radians. We can see that
the lines cover each other almost perfectly.
However, on the two graphs presented below,
we may notice some fluctuations in the
neighbourhood of the point zero as the motor,and then the load, starts its movement and after
1s as the motors, and than the loads,
direction of movement changes. We may
observe that the movement after one second
doesnt start immediately.
-
8/9/2019 Simulink - Simon AMBOISE
9/14
9
On this graph we may observe the phenomenon of damping. On the vertical line we have
placed the torque appearing on the rod due to the movement of the load with respect to the
motor. Damping is any effect, either deliberately engendered or inherent to a system, that
tends to reduce the amplitude of oscillations of an oscillatory system. It depends on the
angular velocity and the damping coefficient. We can observe this phenomenon at the
beginning of the movement of the system and after 1s when there is a change in the
direction. We can see that the values of the torque are very small, we can even say negligable.
http://en.wikipedia.org/wiki/Oscillationhttp://en.wikipedia.org/wiki/Oscillation -
8/9/2019 Simulink - Simon AMBOISE
10/14
10
On this graph we may observe the behavior of the torque developed by the spring constant.
On the vertical line we have placed the torque. It depends on the spring constant and the
position of the system. We can observe this phenomenon as before - at the beginning of the
movement of the system and after 1s when there is a change in the direction. We can see
that the values of the torque are very big in comparison to the previous values (of the torque
appearing due to the relative moevement of the components).
The total torque is equal to the sum of two torques that we have mentioned before: the one
due to the movement and the second due to the spring constant. As the first torque is
negligable we may say that the total torque of the system is equal to the one which is
developed due to the movement.
6)Close loopa) Motor+Load transfert function
First, we have transformed the Motor+load system by one transfert function. We used the matlab
functions :
[A,B,C,D]=linmod('positionanalogicTrFun')
[num,den]=ss2tf(A,B,C,D)
So we obtained as transfert function :
-
8/9/2019 Simulink - Simon AMBOISE
11/14
11
b) Close loop presentation
At the beginning, we assume that the input angular velocity is equal 50 rad/sec, and after one
second, we change its value to -50 rad/sec. We have added a PID controller and we have searched
the parameters with the Ziegler-Nichols method.
c) The Ziegler-Nichols methodThe "P" gain is increased until it reaches the "critical gain" Kc
at which the output of the loop
starts to oscillate.
We have found Kc = 256 and the oscillation period P c = 0,005 s.
Kc and the oscillation period Pc are used to set the gains as shown:
Kp = 0,6 * Kc = 153,6Ki = 0,5 *Pc = 0,0025
Ki = 0,125 *Pc
d) The results= 0,000625
-
8/9/2019 Simulink - Simon AMBOISE
12/14
12
On this graph we can observe the behavior of the loads angular velocity. At the beginning we
assume that the value of this velocity is equal to 50 rad/s. We may see that after 0.03s the angular
velocity of the load stabilises and there are no fluctuations visible. The similar behavior we may
observe when the direction of the rotational movement of the whole system changes (after 1s).
7)Digital transformationa) Open loop discret function
-
8/9/2019 Simulink - Simon AMBOISE
13/14
13
First, we have included Zero-order Hold blocks with sample time equal to 0.001s. The
terminator blocks are needed to block the parameters which are not used. Then we have used the
matlab functions :
[A,B,C,D]=dlinmod('VelocitydigitalTrFun',.001)
[num,den]=ss2tf(A,B,C,D)
With sample time equal to 0.001s.
We obtain the discret transfer function :
The result for the open loop is :
b) Close loop discret functionIn the same way, we obtain the discret transfer function:
For a sample time of 0.001 s.
The shape of this curve is nearly the same as
the shape of the curve presented above
(analog one)
We may see the sample time (0.001s) and the digital profile of this
digital representation.
-
8/9/2019 Simulink - Simon AMBOISE
14/14
14
As a result, wa have :
Conclusion
Our DC motor needs an high voltage because we need a great torque at the input. With open-loop, we may observe the influence of the load and its inertia on the angular
velocity, angular position. We have considered the influence of the connection rod too.
We used a PID controller in order to optimize, stabilize and improve the output systemsreaction. With the Ziegler-Nichols method, we have found the parameters for the PID
controller. As a result, for our input demand, the response time is small (< 0,05s).
We have digitized this system using Matlabs function : dlinmod. Its very important to takean appropriate sample time in order to have an acceptable systems response.