0% found this document useful (0 votes)
60 views4 pages

Digital PID Control System For DC Servo Motor Using VHDL Code

This document summarizes a research project that investigates using a PID motion control system and VHDL coding to control the position of a DC servo motor. It provides background on PID control algorithms and how they are implemented digitally using proportional, integral and derivative terms. It then describes the design of the VHDL-based PID controller for the servo motor, including the hardware implementation using adders and multipliers. Simulation results are presented showing the motor achieving different desired position setpoints.

Uploaded by

enghasan1969
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views4 pages

Digital PID Control System For DC Servo Motor Using VHDL Code

This document summarizes a research project that investigates using a PID motion control system and VHDL coding to control the position of a DC servo motor. It provides background on PID control algorithms and how they are implemented digitally using proportional, integral and derivative terms. It then describes the design of the VHDL-based PID controller for the servo motor, including the hardware implementation using adders and multipliers. Simulation results are presented showing the motor achieving different desired position setpoints.

Uploaded by

enghasan1969
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

International Journal of Science and Research (IJSR)

ISSN (Online): 2319-7064


Index Copernicus Value (2016): 79.57 | Impact Factor (2017): 7.296

Digital PID Control System for DC Servo Motor


Using VHDL Code
Jayaraman .K
Assistant Professor, Department Electronics and Instrumentation, Chennai India

Abstract: This project investigates based PID motion control systems for small, self- adaptive systems. The closed loop position control
of DC servo motor is performed using PWM signal. VHDL based PID motion control system provides an efficient and cheap method.
Proportion (P)–increases gain margin, increase system response speed. Integration (I)-minimizes steady state error Differentiation (D)–
increases system stability. VHDL: HARDWARE DESCRIPTION LANGUAGES (HDL’S) are used to describe hardware for the purpose
of simulation, modeling, testing design and documentation of digital systems. PWM PULSE WIDTH MODULATION which circuit
works by making a square wave. Advantage of pulse width modulation is that the pulses reach the full supply voltage and will produce
more torque in a motor

Keywords: component; formatting; style; styling; insert (key words)

1. Introduction  P and Pd correspond to the controlled variable (e.g.


rotational position).
The PID controller provides,  Pd Goal is to eliminate the error between P and.
P – Increases gain margin, increase system response speed  Value of P is measured by the sensor, which is compared
I – Minimizes steady state error with Pd to generate the error e(t).
D – Increases system stability  The output to the controlled device u(t).
 Closed-loop controller is e(t).

 For a small sample interval T, this above equation can


be turned into a difference equation by discretization .

 A difference equation can be implemented by a digital


Figure: Closed loop control system system, either in hardware or software.
 The derivative term is simply replaced by a first-order
A closed loop control system is shown in figure which is difference expression and the integral by a sum, thus the
used to control a device such as a servo motor. P and Pd difference equation is given as:
correspond to the controlled variable (e.g. rotational
position) and its desired value, which is provided at a higher PID Control Algorithm
control level. The goal is to eliminate the error between P
and Pd. The value of P is measured by the sensor, which is
compared with Pd to generate the error e(t). The output to the u(t)=The output to the controlled device
controlled device, u(t), from the closed-loop controller is a Kp = proportional gain
function of e(t).Typically this is a weak signal that requires Kd = derivative gain
amplification. e = error
KI = integral gain
2. Block Diagram of PID Control System Ti-integral time constant,
Td-derivative time constant

PID Control Algorithm


 A closed-loop control system is used to control a device
such as a servo motor .

Volume 7 Issue 4, April 2018


www.ijsr.net
Licensed Under Creative Commons Attribution CC BY
Paper ID: 12041804 DOI: 10.21275/12041804 719
International Journal of Science and Research (IJSR)
ISSN (Online): 2319-7064
Index Copernicus Value (2016): 79.57 | Impact Factor (2017): 7.296
Centre 1.5mS

Minimum 0.5Ms

For example, sending a 1.5 ms pulse to the servo, tells the


servo that the desired position is 90 degrees. In order for
the servo to hold this position, the command must be sent at
about 50Hz or every 20ms.

Once the servo has received the desired position (via the
PWM signal) the servo must attempt to match the desired
and actual positions. It does this by turning a small, geared
motor left or right. If, for example, the desired position is
less than the actual position, the servo will turn to the left.
On the other hand, if the desired position is greater than the
actual position, the servo will turn to the right

PID DESIGN
 The design requires 4 adders and 3 multipliers.
 Signal clk is used to control sampling frequency.
 Encoder counter value, represents the current position P.
 The negation of P, P neg, is generated by bit-wise
complementing and adding 1.
 Latched at register REG0, thus becomes e(n−1)
 e(n−2)and u(n − 1) are recorded at REG 1and REG2 by
latching (n − 1) and u(n) respectively.
 p0,p1,p2,s1 ,s2 are temporary variables. Specifications of Servo Motor
 e(n) = pd + (-p) Voltage: 24V DC
 p0 = k0 * e(n) Current : 1.0 Amp
 p1 = k1* e(n-1) Speed: 1500 rpm
 p2 = k2 * e(n-2) Armature Inductance: 2.2mH
 s1 = p0 + p1 Torque: 1.50 N cm
 s2 = p2 + u(n-1) Torque constant: 12.44 N cm/A Moment of Inertia : 0.25 Kg
 u(n) = s1 + s2 cm2
 PID design
General Equations of Motor
 V=IR+L dl/dt+E
 T= j dw/dt+Bw+Tf
 where, V= voltage in volts,
 T= Torque in N cm,ØØØØ
 I= current in Amperes, J= Moment of Inertia in Kg-cm2
 R= Resistance in ohms, B= Viscous coefficient of friction
in Nm-s/rad,
 L= Inductance in henry, Tf= Load Torque in N cm,
 w=angular velocity in rad/s
 The position transfer function obtained by taking laplace
Operation of Servomotor transform of above equation is
A typical servo consists of a DC motor, a gear head, a (Ø)s/ v(s)=6.374/s(12.421s+1)
potentiometer for position feedback, and a small circuit to
read the pot and position the motor. Position Pulse width Simulation Output

Maximum 2.5 mS

Volume 7 Issue 4, April 2018


www.ijsr.net
Licensed Under Creative Commons Attribution CC BY
Paper ID: 12041804 DOI: 10.21275/12041804 720
International Journal of Science and Research (IJSR)
ISSN (Online): 2319-7064
Index Copernicus Value (2016): 79.57 | Impact Factor (2017): 7.296
Servo motor output for 72 degree position

Servo motor output for 90 degree position

Servo motor output 108 degree position

Servo motor output for 126 degree position

Degree Position Binary value Clock pluses


0 00000000 0
18 00010010 02
36 00100100 04 Servo motor output for 144 degree position
54 00110110 06
72 01001000 08
90 01011010 10
108 01101100 12
126 01111110 14
144 10010000 16
162 10100010 18
180 10110100 20
Servo motor output for 162degree position
Servo Motor for 18 degree position

Servo motor output 36 degree position Servo motor output for 180 degree position

Servomotor output for 54 degree position


References
[1] Wei Zhao, Byung Hwa kim, Amy C. Larson and
Richard M. Voyles, “FPGA implementation of closed
loop control system for small scale robot” in

Volume 7 Issue 4, April 2018


www.ijsr.net
Licensed Under Creative Commons Attribution CC BY
Paper ID: 12041804 DOI: 10.21275/12041804 721
International Journal of Science and Research (IJSR)
ISSN (Online): 2319-7064
Index Copernicus Value (2016): 79.57 | Impact Factor (2017): 7.296
Proceedings 12th International conference on advanced
robotics - ICAR 05, pages 70–77, 2005
[2] Daijin Kim, “An implementation of fuzzy logic
controller on the reconfigurable FPGA system,” IEEE
Transactions on Industrial Electronics, Vol. 47, No. 3,
2000
[3] Panagiotis Vouzis, Leonidas G. Bleris, Mayuresh V.
Kothare and Mark Arnold, “Towards a co-design
implementation of a system for model predictive
control” in Proceedings, Annual Meeting, American
Institute of Chemical Engineers, Cincinnati Convention
Center, Cincinnati, OH, November 2005
[4] National Instruments: http://www.ni.com, FPGA based
control: Millions of transistors at your command, 2004
[5] Xilinx Comparing and Contrasting FPGA and
Microprocessor System Design and Development, July
2004
[6] Wikipedia: http://www.wikipedia.org, Field
programmable gate array, 2005
[7] Charles H. Roth Jr., “Digital system design using
VHDL” Bross/Cole, 1918

Volume 7 Issue 4, April 2018


www.ijsr.net
Licensed Under Creative Commons Attribution CC BY
Paper ID: 12041804 DOI: 10.21275/12041804 722

You might also like