Sunteți pe pagina 1din 19

MEC522 – CONTROL ENGINEERING

EMD6M1A

LAB REPORT

TITLE - CLOSED LOOP ANGULAR POSITION CONTROL SYSTEM

PREPARED BY:

MOHAMMAD AIDIL BIN MD ZAINI 2017665754

MUHAMMAD NORFITRI BIN MOHD AZMAN 2017665858

MOHAMAD ALIF AIMAN BIN MOHAMAD NOR 2016229392

MOHD ALIFF BIN MOHD ZAIDI 2017806626

NUR AFIQAH BINTI ZAIDI 2017806428

AIMAN SYAFIQ BIN KHAIRUDDIN 2016218492

PREPARED FOR:

SIR SAHRIL KUSHAIRI


TABLE OF CONTENTS

1.0 INTRODUCTION

2.0 OBJECTIVES

3.0 METHODOLOGY

4.0 RESULTS AND ANALYSIS

5.0 DISCUSSION

6.0 CONCLUSION

REFERENCES
1.0 INTRODUCTION

There are few components or elements that are used in this angular position control system
experiment, such as DC motor, an encoder, pulse width modulation (PWM) and a
microcontroller.

Figure 1.1: Schematic diagram of system’s connection

A DC motor is an electrical machine which converts electrical energy into mechanical energy.
The working operation of DC motor is based on the principle that when a current carrying
conductor is placed in a magnetic field, it experiences a mechanical force.

Pulse Width Modulation (PWM) is a method for encoding an analog signal into a single digital
bit. It is used in transmission of information by encoding a message into a pulsing signal, also for
power control of electronic devices such as motors. A PWM signal consists of two main
components that define its behavior: a duty cycle and a frequency. The duty cycle describes the
amount of time the signal is in a high (ON) state as a percentage of the total time of it takes to
complete one cycle. While the frequency determines how fast the PWM completes a cycle, and
therefore how fast it switches between high and low states.
A microcontroller is a single chip microcomputer that integrates the main parts of a
microcomputer on a chip. Microcontrollers are designed for embedded applications especially in
automatically controlled products and devices, such as automobile engine control systems,
implantable medical devices, remote controls and other embedded systems. By reducing the size
and cost compared to a design that uses a separate microprocessor, memory, and input/output
devices, microcontrollers make it economical to digitally control even more devices and
processes. In the application of measurement and control system, a variety of industrial control
systems, adaptive control systems, data acquisition systems, such as automatic control of
electroplating production line, are made up of microcontrollers.

Encoder is an electromechanical device that can measure displacement. Encoders are normally
digital displacement transducers, consisting of a mechanical element and a sensing head. The
mechanical element used in this experiment is a disk (for rotary type encoders) with deposited or
carved patterns. The sensing head includes a light source (LED) and a light sensor (photo
detector) to read the generator code (the decoder output). With this encoder, the displacement is
obtained by counting the number of time that transitions occur between logical values “0” and
“1”. This allows the transformation of physical quantities by converting the angular displacement
variations into electrical type signal output that is translated into logical values by suitable
electronics.

2.0 OBJECTIVES

i. To develop mathematical models and principles of control system for the Angular
Position Control System
ii. To propose appropriate solutions and analyze the performance of the PID controller of
the system
3.0 METHODOLOGY

There are three variables that are needed to be manipulated in this experiment which are
proportional control, integral control and derivative control to achieve the best possible output or
result. This is due to the performance is based on the disturbance rejection, steady state error, the
peak time, settling time and percentage of overshoot. There are no limitations to these values;
hence try and error method is applied to these changes since there is no base or initial value
present.

By applying the try and error method, first we have to set Ki and Kd values to zero and increase
proportional term (Kp) until system reaches to oscillating behavior. Once it is oscillating, adjust
Ki (Integral term) so that oscillations stops and finally adjust Kd to get fast response.

Figure 3.1: Flow chart of computer algorithm


4.0 RESULTS AND ANALYSIS

1st Result:

Figure 4.1: Graph with Kp =1.00, Ki=0.05 and Kd = 0.00

2nd Result:

Figure 4.2: Graph with Kp = 1.00, Ki = 0.10 and Kd = 0.00


3rd Result:

Figure 4.3: Graph with Kp = 0.10, Ki = 0.15 and Kd = 0.00

4rd Result:

Figure 4.4: Graph with Kp = 0.10, Ki = 0.20 and Kd = 0.00


5th Result:

Figure 4.5: Graph with Kp = 0.10, Ki = 0.20 and Kd = 0.05

Proportional controller produces output which is proportional to current error. It compares


desired or set point with actual value or feedback process value. This controller requires biasing
or manual reset when used alone. This is because it never reaches the steady state condition. It
provides stable operation but always maintains the steady state error.  Speed of the response is
increased when the proportional constant Kp increases. If the proportional gain is well chosen,
the time the plant takes to reach a new set point will be as short as possible, with overshoot and
oscillation minimized.

Integral controller provides necessary action to eliminate the steady state error. It integrates the
error over a period of time until error value reaches to zero. It holds the value to final control
device at which error becomes zero. Integral control decreases its output when negative error
takes place. It limits the speed of response and affects stability of the system. Speed of the
response is increased by decreasing integral gain Ki.

Integral controller doesn’t have the capability to predict the future behavior of error. So it reacts
normally once the set point is changed. Derivative controller overcomes this problem by
anticipating future behavior of the error. Its output depends on rate of change of error with
respect to time, multiplied by derivative constant. It gives the kick start for the output thereby
increasing system response.

5.0 DISCUSSION (MUHAMMAD NORFITRI BIN MOHD AZMAN)

Based on the result, the proportional controller (Kp) effects the graph as the value
increase/decrease the rise time. The integral controller (Ki) is to eliminate/increase ess and the
derivative controller (Kd) is to reduce/gain overshot. The first result, at the proportional
controller (Kp) is 1.00, the integral controller (Ki) is 0.05 and the derivative controller (Kd) is
0.00. The set point is below 400 altitudes while the red line (error) drop from 380 to 0 and keep
constant after few second. Second result, at the proportional controller (Kp) is 1.00, the integral
controller (Ki) is 0.10 and the derivative controller (Kd) is 0.00. The graph shows the similar
result but the error takes more time before it becomes stable.

The third result, at the proportional controller (Kp) is 0.10, the integral controller (Ki) is 0.15 and
the derivative controller (Kd) is 0.00. The set point near to 400 altitude compared to first result
and the error drop from the same altitude value before it constant at 0. The forth result, at the
proportional controller (Kp) is 0.10, the integral controller (Ki) is 0.20 and the derivative
controller (Kd) is 0.00. The graph shows the same result as third result but it takes more time to
constant. The fifth result, at the proportional controller (Kp) is 0.10, the integral controller (Ki) is
0.20 and the derivative controller (Kd) is 0.05. The set point at 370 altitudes while the red line
(error) drop from 370 (same) to 0 and keep constant after few second.

6.0 CONCLUSION (MUHAMMAD NORFITRI BIN MOHD AZMAN)

In conclusion, trial and error method is the best way to determine the optimal PID parameters.
There are a few tips to tune PID. Firstly, set all gains to zero. Secondly, Increase the P gain until
the response to a disturbance is steady oscillation. Thirdly, Increase the D gain until the the
oscillations go away (i.e. it's critically damped). Lastly, Repeat steps 2 and 3 until increasing the
D gain does not stop the oscillations. The counterfeit results indicate that the presented
perspective works effectively and provides a good relation between the target function that
optimizes the PID controller and dynamic response of the system to be controlled. It is
demonstrated that we increase integral controller, Ki to eliminate the steady state error and
control the derivative controller, Kd to increase the stability of the system.

Mohd Aliff Bin Mohd Zaidi (2017806626)

DISCUSSION

In this experiment, they were 5 different graphs which each of the value of Kp, Ki and
Kd were different from one another. The purpose of Kp is used to decrease or increase rise time.
Kd is used to gain or reduce the overshoot and setting time while Ki is used to increase or
eliminate. A stepper motor is used to achieve precise positioning via digital control.
The motor operates by accurately synchronizing with the pulse signal output from the controller
to the driver. The motor drive section includes stepper motors and stepper motor driver. In the
case where the motor does not exceed the rated load, the displacement of the stepper motor and
the numbers of input pulses are strictly proportional. As long as control the number of pulses,
frequency, motor winding power sequence, the required location, speed and direction of rotation
can be conquered.

CONCLUSION

From this experiment, we got to learn about stepper motor which easily control by
changing the value of Kp, Kd and Ki. We also got to learn how this stepper moto is running in
the open loop system. By researching, there are few flaws about open loop stepper motor which
are resonances, oscillation, step loss and difficult to achieve high speed.
NUR AFIQAH ZAIDI (2017806428)

DISCUSSION

In this experiment, they were 5 different graphs which each of the value of Kp, Ki and Kd were
different from one another. The purpose of Kp is used to decrease or increase rise time. Kd is
used to gain or reduce the overshoot and setting time while Ki is used to increase or eliminate.
The motor drive section includes stepper motors and stepper motor driver. In the case where the
motor does not exceed the rated load, the displacement of the stepper motor and the numbers of
input pulses are strictly proportional. As long as control the number of pulses, frequency, motor
winding power sequence, the required location, speed and direction of rotation can be conquered.

NUR AFIQAH ZAIDI (2017806428)

CONCLUSION

To conclude, stepper motors convert electrical power into rotation. A stepper motor is an
electromechanical device which converts electrical pulses into discrete mechanical movements.
The sequence of the applied pulses is directly related to the direction of motor shafts rotation
.For applications where precise measuring of a motors' rotor position is critical, a Stepper Motor
is the best choice. Stepper motors operate differently from other motors; rather than voltage
being applied and the rotor spinning smoothly, stepper motors turn on a series of electrical pulses
to the motor's windings.
MOHAMAD ALIF AIMAN BIN MOHAMAD NOR (2016229392)

Discussion

The aim of experiment is to investigate the performance of position control system using
stepper motor and also to analyze the performance of the control system. Basically, for this
experiment, we set the set point to 384, so the system must run at the set point to be optimum. To
stabilize the control system we manipulate the value of Kp, Kd, and Ki. Kp value is manipulated
to control the proportional gain. Kd is set to control the derivative gain. Ki is set to control the
integral gain. In this experiment, we only manipulated the value of Ki which is we only control
the integral gain. Firstly, we set the value of Ki into 0.05. We found out the system stabilized at
the point 385 which is it can be said that the graph is overshot. The value of error for this system
is 1.00%. Next, we changed the value of Ki into 0.1. The system ran in the desired set point
which is 384. The error for this value Ki is 0%. Then, we increase the value of Ki to 0.20, the
graph shows it overshoot to the value of 390. This results 6.00% from the fixed set point.

Besides, for this experiment we also change the value the value of derivative gain which
is Kd. Initially, we set Kp = 0.1, Ki = 0.20, and Kd = 0.00. The graph graph shows the system
operate at the set point 384 with zero percent error. This shows that the system is already stable.
Then, we increase the value of Kd to 0.05. From the graph plot, we found that the rise time for
the system to reach 384 increase. At this value also the system operated at stable condition but
the time for the system to stable is increase.
Conclusion

Based on result above, we might say that the value of Kp, Kd and Ki are very crucial in a
control system. We can easily control a system by changing its value. Not every systems are
running at desired output. Therefore, the presence of this controller parameter will help to
stabilize the system. Under open-loop control, the step motor is controlled by a pulse sequence
with definite time interval, and the feedback to the sensor and the corresponding electronic
circuit are unneeded in the control system. This kind of circuit is simple with low cost, so that the
open-loop control system of stepper motor can be widely used.

However, the open loop control system have some disadvantages which are resonances,
oscillation, step loss and difficult to achieve high speed. The positioning accuracy of open loop
system is lower compared to closed loop one. Therefore, in the system with high requirement of
accuracy and stability standards, the closed loop control system should be adopted.
AIMAN SYAFIQ BIN KHAIRUDDIN

2016218492

DISCUSSION

The implementation of the discrete-time PID controller, required the usage of both discrete time
integrators and differentiators. This is required to perform digital signal processing because the
motor speed signal is a discrete series of values describing performance. The discrete time
integrators and differentiators allow the system to interpret the system response based on current,
future, and past data. Discrete-time integrators allow the system to compensate for fluctuations
between measurements. Discrete-time differentiators allow the system to compensate for
predicted error before the next iteration.

Whereas continuous-time systems can be described with differential equations and analyzed
using Laplace transforms, discrete-time systems use difference equations to analyze signals over
a fixed period. The entire signal can be represented (approximately) by considering each sample
at each period, along with the sample from the previous iteration. The current signal or value is a
sum of the current sample, the previous sample, and the predicted next sample. The difference
equations take on physical meaning when the sampling rate/period of hardware is considered.

These difference equations are derived where a signal occurring over a specific interval is
analyzed. The controller performs corrections based on the changes during sampling, and then
outputs a reconstructed signal. This is analogous to using analog-to-digital conversion before
processing, and then using digital-to-analog conversion to create the output. In the case of
angular velocity response, the results from the simulations are a decent approximation of the
response observed from the physical experimentation. Moreover, the continuous and discrete
mathematical models exhibit nearly exact same responses.
In the case of angular position response, the shapes of the modelled and actual responses are
radically dissimilar from one another for nearly all PID gain combinations. The continuous and
discrete models generally shared the same overall trend, however they did not match as closely
as in the angular velocity case. Through additional experimentation, it was found that if the gains
were quadrupled from their supposed values in the simulations, both the continuous and discrete
modelled responses closely matched the actual response. This indicates that a possible scaling
issue caused the original discrepancy in the angular position responses. However, a more
probable cause of this discrepancy is from the fact that a linear model is used to approximately
represent a nonlinear physical model. These nonlinearities can arise in the physical model in the
form of start up friction in the DC motor’s drive shaft and gears and the limited resolution of the
optical encoder.

CONCLUSION

The objective of this experiment was to design a PID feedback controller for the speed and
position of a DC motor. Through both physical testing and simulations, the individual effects of
manipulating proportional, integral and derivative on the system’s response were examined and
characterized. For speed control, the actual and simulated responses mostly matched. On the
other hand, for angular position control, large discrepancies between the responses were
observed, most likely a result from using a linear mathematical model to approximate a physical
non-linear system.
DISCUSSION (MOHAMMAD AIDIL BIN MD ZAINI / 2017665754)

Based on the result obtained, in the first trial, the proportional controller (Kp) is 1.00, the integral
controller (Ki) is 0.05 and the derivative controller (Kd) is 0.00. The error (red line) is below 400
altitudes while set line is constant at 0 as it is initially deflect slightly in between 20 microsec and
60 microsec. Next, the proportional controller (Kp) is 1.00, the integral controller (Ki) is 0.10
and the derivative controller (Kd) is 0.00. The graph diverts in the first 100 microsec but then the
set point stays steady above 300 altitudes and the error maintain at 0.

During the third trial, the proportional controller (Kp) is 0.10, the integral controller (Ki)
is 0.15 and the derivative controller (Kd) is 0.00. The set point is slightly below 400 altitudes
while the error is 0 then proportionally moving upward to slightly below 400. Lastly, the
proportional controller (Kp) is 0.10, the integral controller (Ki) is 0.20 and the derivative
controller (Kd) is 0.05. Next, at 4rd trial the the proportional controller (Kp) is 0.10, the integral
controller (Ki) is 0.20 and the derivative controller (Kd) is 0.00. The graph diverts in the first 60
microsec but then the set point stays steady above 300 altitudes and the error maintain at 0.
Lastly, same as the previous test, the experiment is stopped as we successfully achieve the best
possible system performance.

CONCLUSION (MOHAMMAD AIDIL BIN MD ZAINI / 2017665754)

In this experiment, optimal PID parameters were obtained by trial and error method. The
objectives of this experiment was to develop mathematical models and principles of control
system for the angular position control system. And also to propose appropriate solutions and
analyze the performance of the PID controller of the system. The counterfeit results indicate that
the presented perspective works effectively and provides a good relation between the target
function that optimizes the PID controller and dynamic response of the system to be controlled.
It is demonstrated that we increase integral controller, Ki to eliminate the steady state error and
control the derivative controller, Kd to increase the stability of the system.
REFERENCES

1. Barr M. (August 1, 2002). Introduction to Closed-Loop Control and PID. Retrieved


from https://barrgroup.com/Embedded-Systems/How-To/PID-Closed-Loop-Control
2. Encoder Working Principle. (Accessed on: April 27, 2019). Retrieved from
https://instrumentationtools.com/encoder-working-principle/
3. Kynix Semiconductor. (January 17, 2018). Microcontroller Applications and Its
Principle. Retrieved from http://www.apogeeweb.net/article/58.html
4. PWM principles. (Accessed on: April 30, 2019). Retrieved from
http://people.ucalgary.ca/~aknigh/vsd/ssim/vsi/pwm.html
5. The Working Principle of a PID Controller for Beginners. (Accessed on: April 27,
2019). Retrieved from https://www.elprocus.com/the-working-of-a-pid-controller/
6. Working Principle of DC Motor. (Accessed on: April 27, 2019). Retrieved from
http://people.ucalgary.ca/~aknigh/vsd/ssim/vsi/pwm.html

S-ar putea să vă placă și