Design of stepper motor position control system based on DSP. Guan Fang Liu a, Hua Wei Li b

Similar documents
Design of double loop-locked system for brush-less DC motor based on DSP

Sensors and Sensing Motors, Encoders and Motor Control

Control System of Tension Test for Spring Fan Wheel Assembly

Design of intelligent vehicle control system based on machine visual

Design of Voltage Regulating Control Device of Improved PID Algorithm for the Vehicle AC Generator Based on DSP

Based on the ARM and PID Control Free Pendulum Balance System

UNIT 2: DC MOTOR POSITION CONTROL

Design of Signal Conditioning Circuit for Photoelectric Sensor. , Zhennan Zhang

Sensors and Sensing Motors, Encoders and Motor Control

Design and simulation of AC-DC constant current source with high power factor

DESIGN OF A TWO DIMENSIONAL MICROPROCESSOR BASED PARABOLIC ANTENNA CONTROLLER

Single-phase or three phase AC220V (-15% ~ +10%) 50 ~ 60Hz

2.017 DESIGN OF ELECTROMECHANICAL ROBOTIC SYSTEMS Fall 2009 Lab 4: Motor Control. October 5, 2009 Dr. Harrison H. Chin

A Simple Design of Clean Robot

Design of High Precision Digital AC Constant Current Source

Cleaning Robot Working at Height Final. Fan-Qi XU*

Manual. ihss57-xx. Integrate Stepper Servo Motor.

Control System Design of Magneto-rheoloical Damper under High-Impact Load

Research on the Electric Shifting Control System of AMT based on Brushless DC Motor

A New Simulation Technology Research for Missile Control System based on DSP. Bin Tian*, Jianqiao Yu, Yuesong Mei

DC motor control using arduino

The Research on Servo Control System for AC PMSM Based on DSP BaiLei1, a, Wengang Zheng2, b

Design of a Simulink-Based Control Workstation for Mobile Wheeled Vehicles with Variable-Velocity Differential Motor Drives

Research of Electric Welding Machine s Tractor System Based on Digital Signal Processor Li-li Ding1, Jin Hu2

A PID Controller for Real-Time DC Motor Speed Control using the C505C Microcontroller

Motor control using FPGA

Design of Removable Guardrail System Based on ZigBee Network

ELECTRICAL CONTROL DESIGN FOR DRIVING SYSTEM OF SERVO MOTOR

PYKC 7 March 2019 EA2.3 Electronics 2 Lecture 18-1

Study on Synchronous Generator Excitation Control Based on FLC

User manuel. Hybrid stepper servo drive

A Control Method of the Force Loading Electro-hydraulic Servo System Based on BRF Jing-Wen FANG1,a,*, Ji-Shun LI1,2,b, Fang YANG1, Yu-Jun XUE2

Stepping motor controlling apparatus

Study on Repetitive PID Control of Linear Motor in Wafer Stage of Lithography

Open Access Design of Diesel Engine Adaptive Active Disturbance Rejection Speed Controller

CHAPTER 4 HARDWARE DEVELOPMENT OF STATCOM

Permanent magnet brushless motor control based on ADRC

MICROCONTROLLERS Stepper motor control with Sequential Logic Circuits

Lab Exercise 9: Stepper and Servo Motors

Mercury technical manual

Performance Evaluation of Negative Output Multiple Lift-Push-Pull Switched Capacitor Luo Converter

CHAPTER-5 DESIGN OF DIRECT TORQUE CONTROLLED INDUCTION MOTOR DRIVE

ECE 5670/6670 Project. Brushless DC Motor Control with 6-Step Commutation. Objectives

A Digital Thyristor Trigger Control System based on DSP

Galil Motion Control. DMC 3x01x. Datasheet

The Allen-Bradley Servo Interface Module (Cat. No SF1) when used with the Micro Controller (Cat. No UC1) can control single axis

The Influence of Odevity of Carrier Ratio on Three-level Rectifier Wang Pengzhan1, a, Luo Wei2, Yang Shasha1, Cao Tianzhi3 and Li Huawei1

Design of an Intelligent Pressure Control System Based on the Fuzzy Self-tuning PID Controller

RAPID CONTROL PROTOTYPING FOR ELECTRIC DRIVES

MODEL BASED DESIGN OF PID CONTROLLER FOR BLDC MOTOR WITH IMPLEMENTATION OF EMBEDDED ARDUINO MEGA CONTROLLER

Design of Controller for Metal Linear Expansion Coefficient Tester Yufei FU1, a

Lab 5: Inverted Pendulum PID Control

Separately Excited DC Motor for Electric Vehicle Controller Design Yulan Qi

DMCode-MS(BL) MATLAB Library

Study and Simulation for Fuzzy PID Temperature Control System based on ARM Guiling Fan1, a and Ying Liu1, b

Lab 23 Microcomputer-Based Motor Controller

Data Sheet. AEDx-8xxx-xxx 2- or 3-Channel Incremental Encoder Kit with Codewheel. Description. Features. Assembly View. Housing.

PWM, ALT, HALT, HAST.

SERVO MOTOR CONTROL TRAINER

Fuzzy PID Speed Control of Two Phase Ultrasonic Motor

Resistance Furnace Temperature Control System Based on OPC and MATLAB

Integrated Servo Motor UCS57

Development of a MATLAB Data Acquisition and Control Toolbox for BASIC Stamp Microcontrollers

The Design and Realization of High Precision Micrometric. Displacement Measuring System Based on LVDT

Exercise 3: Sound volume robot

2HSS858H Low Voltage Digital Stepper Servo Drive Manual

Using Magnetic Sensors for Absolute Position Detection and Feedback. Kevin Claycomb University of Evansville

Design of Experimental Platform for Intelligent Car. , Heyan Wang

Analysis and Design of PLL Motor Speed Control System

The Research On the Control System of the Minimally Invasive Surgical Robot

Mechatronics System Design - Sensors

Image Acquisition Method Based on TMS320DM642

Assembly Language. Topic 14 Motion Control. Stepper and Servo Motors

Ch 5 Hardware Components for Automation

Observer-based Engine Cooling Control System (OBCOOL) Project Proposal. Students: Andrew Fouts & Kurtis Liggett. Advisor: Dr.

Negative Output Multiple Lift-Push-Pull Switched Capacitor for Automotive Applications by Using Soft Switching Technique

A Searching Analyses for Best PID Tuning Method for CNC Servo Drive

combine regular DC-motors with a gear-box and an encoder/potentiometer to form a position control loop can only assume a limited range of angular

6.270 Lecture. Control Systems

Feedback Devices. By John Mazurkiewicz. Baldor Electric

High-speed and High-precision Motion Controller

Experiment Of Speed Control for an Electric Trishaw Based on PID Control Algorithm

Design and Simulation of PID Controller using FPGA

ServoStep technology

GE420 Laboratory Assignment 8 Positioning Control of a Motor Using PD, PID, and Hybrid Control

Rotational Speed Control Based on Microcontrollers

Closed-Loop Transportation Simulation. Outlines

Application Note Using MagAlpha Devices to Replace Optical Encoders

Image Recognition for PCB Soldering Platform Controlled by Embedded Microchip Based on Hopfield Neural Network

Design of a Frequency Counter Based on Input Capture Function of a. Single Chip Computer. Wang Yanshuang; Liu Yuelong

Figure 1.1: Quanser Driving Simulator

CHAPTER 4 FUZZY LOGIC CONTROLLER

DC Brushed Motor Controller Module EDP-AM-MC1


DIGITAL SPINDLE DRIVE TECHNOLOGY ADVANCEMENTS AND PERFORMANCE IMPROVEMENTS

DESIGNING A POSITION REGULATOR FOR AN ACTUATOR POWERED BY A CONTINUOUS CURRENT MOTOR USING THE PIC16F73 MICROCONTROLLER

Application in composite machine using RBF neural network based on PID control

TMS320F241 DSP Boards for Power-electronics Applications

NEW DIGITAL ANGLE MEASUREMENT FACILITY BASED ON FPGA

It is widely used in curving machine, processing equipment, packing machine, electronic machine, and etc.

Transcription:

nd International Conference on Machinery, Electronics and Control Simulation (MECS 17) Design of stepper motor position control system based on DSP Guan Fang Liu a, Hua Wei Li b School of Electrical Engineering, Beijing Jiaotong University,Beijing 144,China a 1511436@bjtu.edu.cn,b151145@bjtu.edu.cn Abstract: In order to solve the problem that the stepper motor is prone to out-of-step or overshoot in the case of open-loop control, this paper designs a digital signal processor (DSP) position closed-loop control of stepper motor. The overall structure of the system, the main hardware module and the incremental PID control algorithm are designed. Through experiment and simulation comparison of the open-loop control and PID closed-loop control effect, the results show that the position error can be kept within.o under closed-loop control, which can effectively improve the precision and dynamic performance of the stepper motor. Key words: DSP, stepper motor, position control, PID algorithm. 1. Introduction The stepper motor is a discrete actuator that converts the pulse signal into a motor angular displacement or a line displacement [1]. When the stepper motor does not exceed the rated load, the speed and final stop position of the stepper motor depends only on the frequency and the number of pulses applied to the motor. Stepper motor can quickly start, reverse and brake. Because of its simple structure, easy control, cheap, more and more widely used in industrial location control occasions. In the actual position control system, if the use of open-loop control, it may bring the output accuracy is not high enough to meet the needs. Because in the open-loop control system can't know whether the motor out of step or overshoot. For high precision control case, general use of the stepper motor position closed-loop control. The closed-loop control of stepping motor based on PID algorithm can effectively solve the problem of out-of-step and overshoot [].. System overall program design DSP and PC through the serial port software establish communication. The PC sends control motor position command to the DSP via the serial assistant. The DSP receives the instruction in an interrupted manner and converts the received control instruction into the execution instruction of the motor. The DSP sends out the required PWM signal and direction signal to the drive circuit according to the motor execution instruction. The real-time position of the motor is detected by the photoelectric encoder and feed back to the QEP module of the DSP. Through the PID algorithm, the DSP corrects the position error and realizes the precise position control of the stepper motor. Stepper motor position control block diagram shown in Figure 1. SCI PC DSP Driver Driver Stepper motor Photoelectric encoder Fig.1 Stepper motor position control block diagram Copyright 17, the Authors. Published by Atlantis Press. This is an open access article under the CC BY-NC license (http://creativecommons.org/licenses/by-nc/4./). 7

.1 Control Chip TMS3F81 has a powerful digital signal processing and computing power, but also has a relatively complete event management functions, suitable for embedded development [3]. DSP81 maximum frequency up to 15MHZ, integrated conversion speed up to 8ns 1-bit 16-channel A / D converter, 16-channel PWM output channel. The DSP81 also integrates QEP circuits, and with the use of photoelectric encoders can be used to detect motor rotation speed, direction and position of rotation. The role of the control chip in the stepper motor position control system is: (1) receive the position control command; () output control pulse and direction signal; (3) receive the photoelectric encoder feedback real-time position.. Stepper motor and its drive 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, we can get the required location, speed and direction of rotation. Two-phase hybrid stepper motor is a more common stepper motor, it has a high step frequency, fast response and so on. The system uses a -phase 4-wire hybrid stepper motor. The basic step angle of the motor is 1.8o, the rated current is 1.A and the driving voltage is 4V. Stepper motor can not be directly connected to the DC power. It should use a stepper motor driver to operate. Stepper motor drivers are composed of pulse generation control circuit, ring splitter, power drive circuit and motor overcurrent protection circuit [4]. This set of devices used the driver model is TB656, by setting the Subdivision switch, we can achieve one-sixth of the step angle. The Figure shows the hardware connection relationship. PWM pulse PWM1 PWM A+ Direction control B+ HB43D A- 4V Stepper motor B- 3 1 F 8 S M T Fig. DSP connection with stepper motor.3 Photoelectric encoder Photoelectric encoders are divided into absolute encoder and incremental encoder. Incremental photoelectric encoder is generally used in the angle measurement occasion, with a simple structure, small size, low price, high precision, fast response speed and other advantages[5]. The system is selected ROTARY type incremental photoelectric encoder, the supply voltage 5-4V DC power supply, the maximum response frequency of 1kHZ. The photo code is divided into 14 grid, using A, B dual-channel upper and lower edge detection. The output is TTL voltage output. The resolution θb is.88o, to meet the accuracy requirements. When the DSP module QEP circuit is in operation, the pins CAP1_QEP1 and the pin CAP_QEP input two quadrature encoder pulse generated by the optical encoder A and B channels. CAP3_QEP3 input pulse generated by the Z channel, Z channel every revolution to produce a pulse, A, B, Z channel output shown in Figure 3. The QEP circuit counts the rising and falling edges of the quadrature encoded pulse, and the count value is stored in TCNT. The direction information and position information of the motor can be 8

obtained by program calculation. The angle of rotation of the motor is θ which is calculated as shown in Equation 1 (1) θ=(tcnt_1-tcnt_) θ b Where TCNT_1 is the current value of the counter, TCNT_ is the counter initial value. A B Z Fig.3 Incremental photoelectric encoder output signal 3. System control algorithm and program design PID algorithm is one of the most widely used algorithms in engineering practice. Compared with other algorithms, PID has the characteristics of simple principle, easy to use, strong adaptability, strong robustness and small computation. It is in accordance with the feedback signal deviation ratio, integral, differential combination of control law. The relationship between the output and the input is shown in Equation. K P e(t ) + u (t) = de 1 e(t )dt + Td Ti dt () Discrete later k u (= k ) K P e ( k ) + K I e ( j ) + K D e ( k ) e(k 1) (3) j = Equation (3) is the positional PID algorithm, for the stepper motor control system often used incremental PID, the algorithm is as follows. D= u ( k ) K P e ( k ) e(k 1) + K I e ( k ) + K D e ( k ) e ( k 1) + e(k ) (4) Compared with the positional algorithm, the incremental PID control algorithm overcomes the accumulation of errors and the calculation is small. Therefore, in this system, the incremental PID algorithm is selected to control the position of the motor. The system control program is in the CCS3.3 development environment using C language programming. The target location is sent to the DSP through the serial communication, the DSP receives the current position data sent back by the photoelectric encoder. The current position can be obtained by program calculation. By comparing the current position to the target position, the current position error can be obtained and the error positive and negative to determine the direction of rotation of the motor. Through the program set DSP GPIO module PWM pin for the general digital output pin, connect the direction control pin of the stepper motor driver. When the position error is positive, through the program set the pin is high level, so that the motor forward otherwise, set to low level, control the motor reverse. The Δu (k) is obtained by the incremental PID algorithm of the error e(k), which determines the number of PWM waves to be output, and the PWM wave is output from the PWM1 pin of the GPIO module.δu (k) determines the end position of the stepper motor. The Incremental PID control flow chart shown in Figure 4. 9

Start Waiting for commands r(t) Current position c(t) Motor forward > Position error e(k)=r(k)-c(k) e(k) Incremental PID algorithm Motor reversal Motor still = < Output PWM wave End Fig.4 Program flow chart 4. Experiment In order to verify the feasibility of the control system, we use experiments and simulations as the means. Figure 5 is the experimental platform. As the stepper motor is a discrete actuator, in order to make the motor not jitter near the target value in the closed-loop test, when the error value is small, it is lower than the set threshold value, there is no output control pulse. At this point, the stepper motor can be considered to reach the target value. In the experiment, we set the threshold is equal to.o and set the drive 16 subdivision. The step angle is.115. In the experiment, when the target position is 6, the final value of the angular displacement open-loop is 57.68o and the closed-loop control is 59.84o, through the observation window of the programming platform CCS. At this time, KP =.7, KI = 1., KD =. The experimental data is stored in the Excel, and the experimental curve depicted by the drawing tool is shown in Figure 6. When the target angle is 6o, the open-loop rise time tr is.4s, but the closed-loop rise time is.s, there is no overshoot in the open-loop and closed-loop control. Under different target values, the closed-loop control system can keep the position error within.o. Fig.5 Experimental platform Fig. 6 The comparative experiment between the open -loop and the closed loop 1

5. Simulation It is the simulation studies of the stepper motor position control system in MATLAB / Simulink environment [6]. In the simulation, the input excitation is a step signal, set the stepper motor driver for the 16 subdivision, step angle of.115o, and the target angular displacement of 6o. The open-loop and closed-loop response curves are shown in Figure 7. In Figure 7, the left curve is a closed-loop response curve and the right curve is an open-loop response curve. The simulation results show that Open-loop control of the motor is out of step, it has a large steady-state error, and the rise time of the open-loop control is about.5s. The rise time is about.3s in the closed-loop control and the steady-state error is small. Open-loop control and closed-loop control are no overshoot. Angualr displacement\( o ) 7 6 5 4 3 1.1..3.4.5.6.7.8.9 1. Time/s Fig.7 The comparative between Open-loop and closed-loop simulation 6. Conclusion According to the principle of stepper motor and DSP control method, the hardware and software of stepped motor position closed-loop control system are designed. The experimental results show that the open-loop control is less accurate than the open-loop control, and the closed-loop control system can control the position error of the stepper motor within.o. The response time of closed-loop control is shorter than the open-loop control. Open loop control and closed loop are not overshoot. The experimental and simulation results show that the stepper motor closed-loop control system based on DSP is superior to the open-loop control in control precision and dynamic performance, which solves the problem of out-of-step and overshoot under open-loop control. This set of closed-loop control system is suitable for high-precision position control occasions. 7. References [1] Shi J Z, Xu D G, Wang Z P. Study of the Hybrid Stepper Motor Servo System Based on DSP[J]. Transactions of China Electrotechnical Society,6,(4):7-78. [] Ma W B, Yang Y Z, Hong Y. Design and Application of the Stepper Motor Control System[J]. Application of Electronic Technique,15,(11):11-13. [3]Chang K. A Review of the Digital Control System Based on DSP Chip[J].Electronic Technology and Software Engineering,14,(6):48. [4]Song S J, Liu J L, Han Y T, Zhang Z H. Design of -phase Hybrid Stepping Motor Driver[J]. Electrified Transmission. 6,():59-64. [5]Jang Y. The Principle and Application of Photoelectric Encoder[J]. Sensor World,1,():16-19+. [6]Liu C, Liu J L. Analysis of Stepper Motor Close-Loop Control System Based on Simulink[J]. Measurement and Control Technology, 9,(1):44-49. 11