Beruflich Dokumente
Kultur Dokumente
Table of Content
OBJECTIVE ................................................................................................................. 3
ABSTRACT .................................................................................................................. 3
METHODOLOGY ....................................................................................................... 4
INTRODUCTION……………………………………………………………………… 5
CONCLUSION ........................................................................................................... 28
APPENDICES................................................................................................... 29-30-21
REFERENCES ........................................................................................................... 32
3
ABSTRACT
This project is based on analyzing DC motor speed response through IR speed sensor
under a constant input voltage, estimation of motor electrical and mechanical parameters
through which transfer function is obtained. Experimental results are presented to demonstrate
the application of this approach and its effectiveness. The estimated parameters can be used to
verify the DC motor performance, or can be used to build a model of the motor subsequent
controller design or system optimization. This approach is especially suited to quick field
application.
METHODOLOGY
INTRODUCTION
Today’s industries are increasingly demanding process automation in all sectors.
Automation results into better quality, increased production in reduced costs. The variable
speed drives, which can control the speed of A.C/D.C motors, are indispensable controlling
elements in automation systems. Depending on the applications, some of them are fixed speed
and some of the variable speed drives.
Direct currents (DC) motors have been used in variable speed drives for a long time.
The versatile characteristics of dc motors can provide high starting torques which is required
for traction drives. Control over a wide speed range, both below and above the rated speed can
be very easily achieved. The methods of speed control are simpler and less expensive than
those of alternating current motors.
There are different techniques available for the speed control of DC motors. In this
complex engineering problem, armature control method is used for DC motor. The
mathematical modeling is one of the most important and often the most difficult step towards
understanding physically a DC motor, an accurate model is required for developing the motor
equations, transfer function that relates the input and output data. There are few parameters of
the DC motor that are complicated to determine using measurements. Hence we need parameter
estimation techniques. Parameter identification is emerging as a topic of great importance
because for almost every servo control design a mathematical model is needed and parameter
identification is often the only means of obtaining mathematical models of most physical
systems because most systems are usually so complex that, unlike DC motors, there is no easy
way to derive their models based on physical law. Due to some limitation in classical methods,
the recent trend is to use intelligent tool that is “system identification tool” on MATLAB for
DC motor parameters identification.
5
For the fast dynamic response of the system, many control strategies have been
deployed in various feedback control systems. The vital role of controls in a drive system
include precise and quick tracking for reference speed with minimum overshoot or undershoot
and having little or eliminated steady state error. The conventional (proportional integral-
derivative).PID controllers have become very popular and widely used in industrial control
applications due to their features like simple mathematical modeling, easy to operate, good
robustness, high reliability, stabilization and eliminating steady state error. Root locus
technique is used to illustrate the changes that PID controller tuning inflicts on the control
system performance.
6
PROJECT SETUP
DC STEP RESPONSE
FILTERING
7
Hardware Setup
In the beginning, DC motor is energized through a 9 volts battery and to measure the
speed of DC motor (in rpm), motor disc is placed between the slots of IR sensor (i.e. LM393
module). The ardiuno board is used to read the sensor readings. The sensor output pin is
connected to the digital pin 2 of the arduino board and sensor is supplied with 3.3 volts through
arduino. The sensor and arduino connections are as follows:
Software Setup
The software setup consists of arduino, PLX DAQ and MATLAB. The code of rpm
sensing is implemented on Arduino. When motor starts rotating, the rpm readings are shown on
the serial monitor. These rpm readings are imported to MATLAB through PLX-DAQ. It acts as
interface software between arduino and excel. It download readings from arduino on the excel
sheet which are then transferred to MATLAB for further analysis.
For sensing speed, it simply measures the rate at which some event occurs. Usually this
is done by counting the events for a given period of time (integration interval) and then simply
dividing the number of events by the time to get the rate. It works on the principle of
interrupting visual path of its optical sensor which consists of photo transistor and light
emitting diode by some sort of slotted wheel. The speed sensor uses a disc with holes to block
the infrared beam. This encoder disc is placed in the slot of optical sensor to count rotation rate
of a connected wheel. Thus, we will count the number of time the speed sensor goes from Low
to High in a second and then divide that number by 20 (number of holes in the encoder disc) to
get the number of revolution per second.
1.3- FILTERING:
Estimating the parameters of the DC motor through system identification toolbox on MATLAB
and obtaining transfer function will be discussed in the next chapter.
11
SYSTEM IDENTIFICATION
PARAMETER ESTIMATION
TRANSFER FUNCTION
12
BRIEF OVERVIEW
DC motors speed and position are easy control and have adjustable range to follow a
speed or position under load. To control the position and speed of a DC motor, an accurate
model of the system is required. The specifications given by manufactures may not be accurate;
also, some motors are produced with coupling gears from manufacturing which add some
inertia and viscous damping coefficient to the original motors, therefore changing the original
values specified by the manufacturer. Several methods have been employed for parameter
identifications of a DC motor.
System identification is the best means of obtaining mathematical models of most
physical systems, because most systems are so complex, that there is no simple way to derive
their models based on physical laws. System identification methods can be applied for DC
motor model identification which will give more concise estimate of the DC motor model than
mathematical modeling.
BLOCK DIAGRAM
Once the input and output sequence is fed to the estimator, the accuracy of the results
depends upon the efficiency of the algorithm that is implemented inside the estimator block.
This procedure is diagrammatically shown in this figure.
SIMULINK MODEL
Above Simulink model is a combination of electrical and mechanical blocks to account for the
electro-mechanical domains involved in a DC motor. To model the friction coefficient, a
damper block is used, while the moment of inertia is modeled using an inertia block. The back
emf constant is specified in the rotational electro-mechanical converter.
PROCEDURE
We first run the simulation with arbitrary R, L, K, B and J values. The model takes a shape
similar to measured data; however, the magnitudes are far off.
14
Next, we use the parameter estimation app, which is under Simulink Design Optimization
toolbox. This is where we plug in experimental input-output data, specify parameter constraints
and start the estimation process. With the data, Simulink runs optimization processes against
DC motor model to determine the parameter values.
The estimation converges after 30 minutes. Simulated response and measured response are
shown below:
15
RESULTS:
GENERAL FORM
Firstly, we have to determine a generalize transfer function of dc motor.
The development of torque of dc motor is proportional to the magnitude of flux due to field
current If and armature current Ia. For any given motor, these two quantities are adjustable.
For armature control mode,
The torque developed by the motor is proportional to the armature current; thus
𝑇𝑚 (S) = kt × Ia (S)
16
Where 𝑇𝑚 is the torque developed by the motor, and Kt is a constant of proportionality, called
the motor torque constant.
Rearranging
𝑇𝑚 (S)
Ia (S) =
kt
d
Vb(t) = kb θ (t)
dt m
Vb(S) = kb S θm (S)
By KVL
Now we must find Tm(s) in terms of 𝜃𝑚 (𝑆) if we are to separate the input and output
variables and obtain the transfer function, 𝜃𝑚 (𝑠)/𝐸𝑎 (𝑠).
Substituting:
If we assume that the armature inductance, 𝐿𝑎 , is small compared to the armature resistance,
𝑅𝑎 , which is usual for a dc motor, above equation ) becomes,
17
𝑅𝑎
((𝐽 𝑆 + 𝐷𝑚 ) + 𝐾𝑏)𝑆𝜃𝑚 𝑆 = 𝐸𝑎 (𝑆)
𝐾𝑡 𝑚
In general,
After specifying number of poles and zeroes, system identification toolbox gives the first order
transfer function as follows
18
LTI VIEW
Through LTI viewer, our step response (i.e. transfer function) is shown as:
OVERVIEW
The stability and control of any system is extremely important and is generally a safety
issue in the modeling of the system. The stability of the system relates to its response to the
inputs or disturbances. A system is said to be stable when it remains to a constant state unless
affected by an external action and which returns to a constant state when the external action is
removed. In order to achieve the desired stability, proper controlling of system is necessary.
Therefore controlling and stability are linked to each other and are important to get the desired
response of any system.
DC motors are widely used in many applications and hence their controlling and
stability analysis are important aspects to be learned. In this chapter we will discuss the basic
concepts of controlling and stability of DC motor, will implement those concepts on our DC
motor response and hence will interpret and evaluate the results.
The PID controller calculation (algorithm) involves three constant parameters called the
proportional (P), integral (I) and derivative (D) values, these values can be interpreted in terms
of time. P depends on the present error, I on the accumulation of past error, and D is a
prediction of future error, based on current rate of change .The weighted sum of these three
actions is used to adjust the process via a control element.
The block diagram of a PID controller is shown as below:
21
Mathematically;
Y(t) = e(t) KP + KI ∫( ) + KD ( )
These gains or constant are tuned or selected according to our desired response. By
changing the values of these gains, different parameters of the responses of such as rise time,
overshoot, settling time, steady state errors are adjusted and a desired response id achieved.
The table below shows the effect of changing constants on different parameters:
PID parameters are set according to our set point and the plant response in order to achieve
above characteristics.
We have implemented the control blocks and make a feedback control system as follows. We
have implemented our tuned PID block to the system. At the input we have set our desired
speed then the tuned PID block is inserted and then our plant (motor) transfer function is added
and a feedback system is implemented. It reduces the error in the loop and gives the desired
response. The Simulink model is shown below:
After changing the values of P, I, PI, PD and PID we have find out some responses which is
given below:
By changing P:
This is showing that the step response of DC motor is an UNDER DAMPED RESPONSE
By changing I:
By changing PI:
This is showing that the step response of DC motor is an OVER DAMPED RESPONSE
24
By changing PD:
This is showing that the step response of DC motor is an UNDER DAMPED RESPONSE
By changing PID:
This is showing that the step response of DC motor is an UNDER DAMPED RESPONSE
By changing the values of P, I, PI, PD and PID accordingly, we are able to reduced the under
damped response significantly after the tuning. It is noticeable that before tuning there were
oscillations which make a response under damped but after then applying the certain values, we
tried to reduced the under damped response as much as it was able.
2645
--------------------------------
𝑠2 + 4.976 s + 7.496
𝑠2 1 7.496
𝑠1 4.976 0
𝑠0 7.469 0
There are no sign changing in the first column of the table this means that there are no
poles of the system in the right half plane and hence the system is stable. All the poles that are
2 poles of the system are in left half plane making the system as stable.
The transient response of a system plays an important role in the design of a control
system. The nature of the transient response is determined by the location of poles of the closed
loop system. Usually, the loop gain of the system is adjustable and the value of this gain
determines the location of poles of the closed loop system. It will be very informative, if one
26
can determine how these poles change their location as the gain is increased. The locus of these
roots as one parameter of the system, usually the gain, is varied over a wide range is known as
the root locus plot of the system.
METHOD
In Root locus technique, the locus of the roots of the characteristic equation is plotted for all
values of the parameter. Once the complete locus is obtained, all the roots for a given value of
the parameter can be determined. The method can be developed assuming that the gain is the
variable parameter and it can be varied from zero to infinity.
FOR K = 10:
27
FOR K =50:
It is shown on the plot that the system is stable. Conclusively in this chapter we have applied
different control and stability approaches on our motor response.
CONCULSION
In above complex engineering problem, we analyzed DC motor speed response through
IR speed sensor under a constant input voltage, and found out the transfer function of DC
motor by estimating electrical and mechanical parameters. We implemented our theoretical
knowledge to this practical work and carried out some observations by obtaining the graph of
DC motor. Moreover we got different responses of motor like under damped, over damped,
undamped etc, by changing some parameters. Also we did the same approaches by adding
gears at the shaft of the motor to control different speed levels.
29
APPENDICES
ARDIUNO CODE
int sensorvalue;
int state1 = HIGH;
int state2;
float rps;
float rpm;
long prevMillis = 0;
long interval = 100;
long currentTime;
long prevTime = 1;
long diffTime;
int sensorthreshold = 40;
int i=0;
// this value indicates the limit reading between dark and light,
// it has to be tested as it may change acording to the
// distance the leds are placed.
// to see what number is good, check the sensorvalue variable value
// as printed out in the serial monitor
void setup()
{
Serial.begin(9600);
//pinMode(2,INPUT); // assign pin 13 led as indicator because we cannot
se the IR light
Serial.println("CLEARDATA");
Serial.println("LABEL,Date,Time,seconds,RPM");
// Get true random value from Excel to feed into RandomNumberGenerator from
Arduino (randomSeed())
Serial.println("RPM");
}
void loop()
30
{
sensorvalue = analogRead(0); // read from pin 0
if(sensorvalue < sensorthreshold)
state1 = HIGH;
else
state1 = LOW;
// digitalWrite(2,state1); // as iR light is invisible for us, the led on
pin 13
// indicate the state of the circuit.
delay(100);
}
prevTime = currentTime;
}
31
state2 = state1;
}
/*
//only for testing to determine the sensorthreshold value
delay(500);
Serial.println(sensorvalue);
*/
}
BODE PLOT CODE
% clear everything
close all
clear all
clc
%Numerator
num = [2645];
%Denominator
den = [1 4.976 7.496];
%Transfer Function
G = tf(num, den)
REFERENCES
Link: https://medium.com/@islamnegm/quick-start-to-simple-daq-system-using-
plx-daq-excel-arduino-d2457773384b
Link: https://www.mathworks.com/help/sldo/examples/dc-servo-motor-parameter-
estimation.html
Link: https://www.mathworks.com/videos/series/using-bode-plots-95148.html