You are on page 1of 14

Simulink project

Velocity control with a PID controller

Simon AMBOISE, Weronika KRAKOWIAK

11/06/2008
1
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

2
1) Introduction
Servomechanism 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 the
speed 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. That’s why we have applied huge voltage (170 V) in order to obtain quite a big torque.

2) Choice of our DC motor


We 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 résistant Ω R 0,9
Inductance µH L 238
Inertia kg.m² 10-5 Jm 230

3
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.

Tload

Fig.2 The free body diagram of the rotor showing the direction of rotation.

Fig.3 The electric circuit of the armature.

The motor’s torque - T m - 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:

4
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 Newton’s 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 motor’s rotor, we can write the
following equation:

Where:
J – Moment of inertia of the rotor
K t – Electromotive force constant (armature constant)
i – Armature current
T – Motor’s torque
b – Damping ratio of the mechanical system

Integrals of the rotational acceleration

The second equation is based on the Kirchoff’s law, presenting the sum of voltages in the electric
circle of the armature:

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
K e – Electromotive force constant (motor constant)
b – Damping ratio of the mechanical system

Rate of change of armature current

5
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


Input:
Vin: Voltage input
T_load: load torque
Output:
th_m: θmotor
dth_m: dθmotor/dt

Fig4 Motor model


Input:
th_m: θmotor
dth_m: dθmotor/dt
Output:
T_load: load’s torque
dth_l: dθload/dt
th_l: θload
Tbrl: spring damping
torque for connection
rotor/load
TKrl: spring constant
torque for connection
rotor/load

6
5) Open-loop
a) The input voltage

On this graph we can see the behavior of the


motor with the load as it starts to rotate, then we
observe 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
motor’s voltage (170V) and afterwards, after 1s,
as the voltage value changes sign to the opposite
the direction of the motor’s movement changes.
b) Angular Velocity

On this graph we can observe the behavior of the motor’s angular velocity (yellow line) in
comparison to the load’s 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 motor’s (yellow line) and
load’s (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

7
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
On this graph we can observe the motor’s
(yellow line) and load’s 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 motor’s, and than the load’s,
direction of movement changes. We may
observe that the movement after one second
doesn’t start immediately.

d) Torque

8
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.

9
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 loop

a) 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 :

10
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 method

The "P" gain is increased until it reaches the "critical gain" K c at which the output of the loop
starts to oscillate.

We have found K c = 256 and the oscillation period P c = 0,005 s.


K c and the oscillation period P c are used to set the gains as shown:
K p = 0,6 * K c = 153,6
K i = 0,5 * P c = 0,0025
K i = 0,125 * P c = 0,000625

d) The results

11
On this graph we can observe the behavior of the load’s 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 transformation

a) Open loop discret function

12
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 :

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.001


s) and the digital profile of this
digital representation.

b) Close loop discret function

In the same way, we obtain the discret transfer function:


For a sample time of 0.001 s.

13
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 system’s
reaction. With the Ziegler-Nichol’s 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 Matlab’s function : dlinmod. It’s very important to take
an appropriate sample time in order to have an acceptable system’s response.

14

You might also like