AN APPLICATION OF OBSERVER FOR POSITION SENSORLESS STEPPER MOTOR DRIVES NOR ARYMASWATI BINTI ABDULLAH UNIVERSITI TEKNOLOGI MALAYSIA AN APPLICATION OF OBSERVER FOR POSITION SENSORLESS STEPPER MOTOR DRIVES NOR ARYMASWATI BINTI ABDULLAH This project report submitted in partial fulfilment of the requirements for the award of the degree of Master of Engineering (Electrical - Mechatronics and Automatic Control) Faculty of Electrical Engineering Universiti Teknologi Malaysia NOVEMBER 2009 iii Dedicated with deepest love to: My family, parents and siblings for their support, guidance and love. My dearest friends for being there whenever I needed them. iv ACKNOWLEDGEMENT In the name of ALLAH, the Most Beneficent, The Most Gracious and the Most Merciful who has given me persistence in completing the project. First of all, I would like to express my sincere gratitude to my project supervisor, Dr Salinda Buyamin, for the commitment, encouragement and valuable advice she provided me along the entire course of this project and report. Her rigorous views to do the project and inspire the idea to solve problems are precious for my future career. I wish to thank my lab mates at Process Control Laboratory , Mr Alifa, Mr Rozaimi and Mr Azuni from Advanced Machine laboratory for the intellectual input and technical assistance . I would like to thank to my colleague members, from MEM class of 2008/09 session for their support and advice. A special thanks to my department, Malaysian Nuclear Agency who gives me the opportunity to continue my study. v ABSTRACT A control method for stepper motor drives system can be made in open-loop circumstance which mean the system control did not require any feedback input signal in order to run the system. By applying the right sequences of pulses, the stepper motor capable to operate as other motion control. However, the performance of such system cannot be achieved to high level condition and demanded a feedback signal input to compensate the error produced while running the drive system. Therefore, a physical sensor or an encoder is placed in the motor system to obtain the feedback and form a close-loop system for error compensation. Nevertheless, the prices of these instruments are expensive, bulky and also may degrade the system performance. As a result this project presents a sensorless system in stepper motor drive system as an alternative to develop a close-loop system where the input signals are taken from voltage and current of the magnetic flux of the stepper motor. vi ABSTRAK Kaedah kawalan sistem motor stepper boleh dijalankan dalam keadaan lingkaran terbuka iaitu bermaksud sistem kawalan tidak memerlukan apa-apa suapbalik signal masukan semasa operasi dijalankan. Dengan mengaplikasikan urutan denyutan yang betul, stepper motor mampu beroperasi seperti kawalan gerakan yang lain. Walaubagaimanapun prestasi tersebut tidak boleh mencapai pada tahap yang tinggi. Ini memerlukan suapbalik masukan untuk mengimbangi kesilapan semasa sistem pemanduan beroperasi. Dengan itu, alat pengesan atau encoder diletakkan dalam sistem motor untuk menghasilkan suapbalik dan seterusnya membentuk sistem lingkaran tertutup sebagai pengimbangan kesilapan. Akan tetapi, harga alatan ini adalah mahal, bersaiz besar and juga boleh mengurangkan prestasi sistem. Oleh itu, projek ini mengetengahkan satu sistem tanpa alat pengesan dalam sistem pemanduan motor stepper sebagai alternatif membentuk sistem lingkaran tertutup di mana signal masukan diambil dari voltan dan arus magnetik fluk yang dihasilkan oleh stepper motor. vii TABLE OF CONTENTS CHAPTER 1 2 TITLE PAGE DECLARATION ii DEDICATION iii ACKNOWLEDGEMENT iv ABSTRACT v ABSTRAK vi TABLE OF CONTENTS vii LIST OF TABLES x LIST OF FIGURES xi LIST OF ABBREVIATIONS xiii INTRODUCTION 1.1 Background 1 1.2 Problem Statement 2 1.3 Objective of The Project 3 1.4 Scope of The Project 3 1.5 Methodology 3 LITERATURE REVIEWS 2.1 Introduction 6 2.2 Previous Research In Sensorless Technology 7 General Structured Unknown Input 7 2.2.1 Observer 2.2.2 Robust Speed Control Of DC Servo Motor 8 Based On Lyapunov’s Direct Method 2.2.3 Sliding Mode Based Disturbance Observer For Motion Control 9 viii 2.2.4 Observer-Based Inertial Identification For 9 Auto-Tuning Servo Motor Drives 2.3 2.4 2.5 2.6 3 Observer 10 2.3.1 Model Reference Adaptive System (MRAS) 11 2.3.2 Unknown Input Observer 13 2.3.3 Disturbance Torque Observer 13 2.3.4 Instantaneous Speed Observer 14 Stepper Motor System 14 2.4.1 Stepper Motor Operation 15 2.4.2 Type Of Stepper Motor 17 2.4.2.1 Variable Reluctance Stepper Motor 17 2.4.2.2 Permanent Magnet Stepper Motor 18 2.4.2.3 Hybrid Stepper Motor 19 Controller And Driver 21 2.5.1 Current Controller 21 2.5.2 Feedback Linearizing Controller 21 2.5.3 Voltage Level Controller 22 2.5.4 Neural Controller 23 2.5.5 PID Controller 23 2.5.6 L6208 Chip Driver 24 2.5.7 Microstepping Driver 24 Encoder 25 2.6.1 Incremental Encoder 26 2.6.2 Absolute Encoder 26 2.6.3 Linear Encoder 27 2.6.4 Rotary Encoder 27 PROJECT BACKGROUND 3.1 Introduction 28 3.2 Sensorless System Control 29 3.2.1 MRAS Observer 29 3.2.2 Mathematical modeling of stepper motor 30 3.2.3 Stepper motor selection 33 ix 4 3.2.4 Stepper motor controller 35 3.2.5 Stepper motor driver 37 SOFTWARE AND HARDWARE CONSTRUCTION 4.1 4.2 Characteristic Of Hybrid Stepper Motor 42 4.1.1 Circuit Representation 42 4.1.2 Speed Characteristic 43 Simulation Implementation 46 4.2.1 Open Loop Simulation 46 4.2.2 Close Loop Simulation 50 4.2.2.1 Transformation Of Four Phase Into 50 Two Phase 4.2.2.2 MRAS Derivation 4.3 5 6 Hardware Implementation 54 57 4.3.1 Open Loop System 57 4.3.2 Close Loop System 59 RESULTS AND DISCUSSIONS 5.1 Introduction 61 5.2 Open Loop System 61 5.3 Close Loop System (Sensorless System) 65 CONCLUSIONS AND FUTURE WORKS 5.1 Conclusion 69 5.2 Future Works 70 REFERENCES 71 Appendices A - B 75 x LIST OF TABLES TABLE NO. TITLE PAGE 3.1 Sequence and Direction of Rotation HSM 34 3.2 Technical Specification of HSM 34 3.3 Full Step Mode 39 3.4 Half Step Mode 39 4.1 Parameters for Driver Block and Hybrid Stepper 50 Motor xi LIST OF FIGURES FIGURE NO. TITLE PAGE 1.1 Flow Chart Of The Methodology 5 2.1 Block Diagram Of The Observer And Adaptive 10 Controller 2.2 MRAS General Structure 12 2.3 From Controller (Logic Sequencer) To Motor 15 2.4 Input Controller 15 2.5 Cross Sectional Of Stepper Motor 16 2.6 Cross Section Of VR Stepper Motor 18 2.7 Permanent Magnet Stepper Motor Cross Section 19 2.8 Cross Section Hybrid Stepper Motor 19 2.9 Special Features In HSM 20 2.10 L6208 Functional Block Diagram 24 3.1 Block Diagram Of MRAS Estimator 30 3.2 Stepper Motor Selected 34 3.3 Stepper Motor Configuration 34 3.4 The Pin Diagram Of PIC 36 3.5 Block Diagram For PIC16F8X 37 3.6 a)Unipolar Drive b) The Effect On Motor 38 Performance Higher Supply Voltage And Larger Series Limiting Resistance 3.7 Typical Motor Winding Connections 38 4.1 Circuit Model For One Phase Of A Hybrid Stepper 42 4.2 Simulink Block For Open Loop 46 4.3 Signal Generator Output 47 4.4 Look Under Mask For Four Phase HSM 48 4.5 a)Look Under Mask Of HSM b) Look Under Mask 49 xii Of Model Discrete 4 Phases HSM 4.6 Equivalent Constant Air Gap For 4 Phase HSM 50 4.7 Block Diagram Of The Whole System 54 4.8 Basic Configuration Of MRAS 54 4.9 Simulink Block For Close Loop System 58 4.10 Circuit Simulation For Stepper Motor Driver 59 4.11 Waveform At Each Coil 59 4.12 Circuit Construction On a)Protoboard b)Strip Board 59 4.13 a)Pair Of Optical And 8 Slot Disc Rotary Encoder 60 b)Motor Shaft Was Slotted With Rotary Encoder Disc 5.1 Voltage Phase, Current Phase And Torque Of Open 62 Loop HSM 5.2 The Speed (Top) And Position (Bottom) Of The Open 62 Loop HSM 5.3 The Speed (Top) And Position (Bottom) Of The 63 MRAS System Without Feedback 5.4 The Comparison Between Open Loop System And 63 Open Loop MRAS System Without Feedback For Speed (Top) And Position (Bottom) 5.5 Output Signal Of Rotary Encoder 64 5.6 The Speed (Top) And Position (Bottom) Of The 66 Sensorless System With Feedback 5.7 The Comparison Between Open Loop System And 66 Open Loop MRAS System With Feedback For Speed (Top) And Position (Bottom) 5.8 Current Phase Of Simulation 67 5.9 Voltage Phase Of Simulation 67 5.10 Voltage Phase Of Hardware Implementation 68 xiii LIST OF ABBREVIATIONS ADC - Analog to Digital Converter BCD - Binary Coded Decimal CCW - Counter Clock Wise CW - Clock Wise DC - Direct Current DIR - Direction DMOS - Double-diffused Metal Oxide Semiconductor DQ - Direct Quadrature DSP - Digital Signal Processing FPGA - Field- Programmable Gate Array GS - General Structure HSM - Hybrid Stepper Motor IPM - Interior Permanent Magnet LTI - Linear Time-Invariant MOSFET - Metal Oxide Semiconductor Field Effect Transistor MRAS - Model Reference Adaptive System MSU - Microcontroller PC - Personal Computer PID - Proportional Integral Derivative PLC - Programmable Logic Control PM - Permanent Magnet PWM - Pulse Width Modulated UIO - Unknown Input Observer VHDL - Very High-level Design Language VR - Variable Reluctance xiv LIST OF APPENDICES APPENDIX A TITLE Source Code For Embedded MATLAB Function In PAGE 74 Simulink B Subsystem Of Simulation 75 CHAPTER 1 INTRODUCTION 1.1 Background In recent years, a real robust of motion control in mechatronics technique is required in a very precise positioning and broad speed range applications. It means that drive systems are robust-controllable for precise positioning and broad speed range including from an ultra small to large positioning and ultra low to ultra high speed range. Both speed and positioning controller is very important for the performance improvement of drive systems. One of the important motion controls is to design a self reconfigurable controller such as electric motor controller for a hybrid electric vehicle application. This system detects the current sensors failure and will estimate the current successfully such that the motor continues working safely. The motor model is used for estimating the currents and the phase are estimated using Luenberger observer. The hall sensors with 60 degrees resolution have been used for positioning sensor. [1]. Nowadays, the emerging control applications become advance as a power assisting tools. An example is a power-assisted wheelchair where a controller is considering necessary conditions for power assisting tools. For advanced controls of a power-assisted wheelchair, the control for speed of power assisting motors is needed. One of the features of a wheelchair is operating at very slow speed and even stops frequently. Thus, an instantaneous speed observer is necessary for the control of a power-assisted wheelchair since the instantaneous speed observer has fast convergence speed, and applies it to gravity compensation controller of a powerassisted wheelchair especially when it goes on a hill [2]. 2 Observer also called a sensorless system is a popular application in motion control where the physical sensor such as encoder will not be used to obtain the system feedback. Besides be able to remove space allocation for rotation-sensor hardware, it also is able to eliminate mechanical adjustment and maintenance. The other applications of the sensorless system are in city-scooter application, which has been design of a sensorless scheme suitable for general applications where low speed and standstill such as high speed operations are required. The observer detects the rotor magnet flux components in the two-phase stationary reference frame using the motor electrical equations [3]. The observer also used in solving the speed estimation problem in high-power railway traction applications, including the very low speed range. The full-order Luenberger observer design, based on voltage and current models, is used as the optimal alternative instead of the conventional method based on observer pole placement. [4]. 1.2 Problem statement Recently, there has been an increase attention of drives system in positioning applications. This increasing is attributed of the developments in power electronics and computing technology. Together with faster computing capabilities, the complex calculations can be performed in a shorter period of time. These advances have opened up new opportunities for advanced control methods such as in nonlinear and optimal control. Moreover, a self-tuning and adaptive methods which used to determine unknown or slowly varying parameters are capable of adjusting the control system to maximize performance with minimal or no operator intervention automatically [1]. In motion control, accurate speed and positioning information is necessary to realize high performance and precision control. Many techniques were developed to achieve speed and positioning including mechanical sensors such as shaft encoder or a resolver. Nevertheless, the prices of these instruments are expensive, bulky and degrade the system. Therefore, a sensorless motion control is developed to replace the hardware part [5]. 3 1.2 Objectives of the project The objectives of the project are determined as: i) To investigate the performance of position control of stepper motor using PIC controller ii) To study the application of sensorless in position control system of stepper motor 1.3 Scope of the project The scope of the project includes: i) To construct the hardware for stepper motor drive ii) To apply the sensorless method of MRAS to the system iii) To do performance comparison/analysis on position control of the system. 1.4 Methodology Figure 1.1 shows the flow chart of project methodology. It started off with determine the objectives and scope of the project, literature review and to identify the whole system requirement such as device/component, the type of drive system, driver, controller and also the observer. The construction of the open-loop hardware stepper motor system was initiated after procurement of the device has been done. The construction of the circuit is including the controller, driver, interfacing between computer and hardware. And, followed by the developing of the sequences of pulses for stepper motor running in the open-loop system. The signal input or initial position was sent to the driver to rotate the motor shaft to desire position. The feedback from the output signal was then used to compensate the error at the reference input. For the first stage, the encoder will be used to obtain the feedback signal and then will be replaced by observer (MRAS observer) to form a close-loop 4 system. In order to get the MRAS observer, the mathematical modelling and the derivation of the MRAS will be determined. These two experimental will be held to get both result data. The data will be analysed and the performance comparison was carried out between those two conditions. 5 Objective Literature review Identify :-the whole system -type of observer, controller, motor Modelling & Simulation for open loop motor drive system No Valid? Yes Develop open loop hardware motor system Modelling and derivation MRAS observer Apply MRAS observer into the system to develop close loop system No Complete? Yes Comparison and Analysis End Figure 1.1 Flow Chart Of The Methodology CHAPTER 2 LITERATURE REVIEW 2.1 Introduction Usually sensorless control is defined as a control scheme where no mechanical parameters like, speed and torque, are measured. In recent years, observer is used to estimate parameters and states of electrical machines. Model based sensorless schemes; generally, rely on accurate system modelling and accurate model parameters values. As in hybrid electric vehicle application, the phase currents are estimated using Luenberger type observer. The state space equations in this application have been decoupled and linearized using the feedback linearization technique. Hall sensors which have the resolution of 60 degrees have been used instead of high resolution position sensors. The method has been simulated in Matlab/Simulink under different speed commands and different load torques. The developed observer can also stand for the current sensors during the whole operating time. The system drive is implemented on a interior permanent magnet (IPM) motor and the digital signal processor [1]. Meanwhile in designing the brake-by-wire systems, a new angle-tracking observer in which a closed-loop linear time-invariant (LTI) observer is integrated with a quadrature encoder is introduced. Finite-gain stability of the proposed design and its robustness to three different kinds of parameter variations are proven based on theorems of input–output stability in nonlinear control theory. The performance of observer and two other methods (a well-known LTI observer and an Extended Kalman Filter) was examined to estimate the position and speed of a brake-by-wire actuator [7]. Meanwhile, a sensorless controller for IPM synchronous motors has 7 been used in city-scooter application. In this application, the final solution consists a hybrid technique that employing an adaptive observer for medium/high speed operation and a signal injection based technique for low speed and standstill operation. The observer detects the rotor magnet flux components in the two-phase stationary reference frame using the motor electrical equations. The motor speed is identified by a model reference adaptive scheme using an additional equation obtained by a Lyapunov function [3]. 2.2 Previous research in sensorless technology 2.2.1 General-Structured Unknown Input Observers The author [9] using the framework of the general structured observer and present a straightforward procedure for designing an Unknown Input Observer (UIO) for a linear system subject to unknown inputs or uncertain disturbances. Necessary and sufficient conditions in terms of the transmission zeros are provided for the existence of a full order UIO capable of producing an asymptotic estimate of the state. An extension of the UIO, called the extended UIO, is developed to estimate both the system state and the unknown input simultaneously. Experimental results for a DC servo motor system demonstrate the applicability of the proposed methodologies. Based on the Luenberger observer the writer focused on a design in fullorder UIO based on the configuration of the General Structured (GS) observer proposed by Cheok et al. Since the existence conditions are provided in terms of transmission zeros the same as the existence conditions of the inverse system problem, the writer also propose an extended design of the UIO, the extended UIO, for estimating both system states and unknown inputs. The estimate of unknown inputs can be further applied to accommodate process uncertainty so as to produce robust control systems. The writers have implemented the proposed UIO separately on a DC servo motor system and a servo table system with external loading. The dominant disturbance of the two systems is friction and the external loading, 8 respectively. Experimental estimations of states and disturbance are in good agreement with measurements, thus confirming the applicability of the developed UIO methodologies. 2.2.2 Robust Speed Control of DC Servo Motor Based on Lyapunov’s Direct Method The author [10] proposed the robust speed control method of DC servo motor with disturbance torque observer, in which the disturbance observer is used for compensating parameter variations and disturbance also the stability of speed control system and current control system are discussed. The useful features and validity of proposed control method are confirmed by computer simulations. The disturbance observer is constructed using Gopinath’s observer design algorithm. The influence of estimation error for disturbance torque is restrained by feedback gain based on Lyapunov’s direct method. Lyapunov function is selected as a test function for stability criterion and the feedback gain is determined to be negative the time derivative of Lyapunov function. The writer used the voltage source PWM (Pulse Width Modulated) inverter for power supply of DC servo motor. But the method produced undesirable current fluctuation because of system parameter variations. Therefore, current control method taking account of the variations of motor parameters is necessary and the writer presented the robust current control method of voltage source PWM inverter with disturbance voltage observer. Armature current is controlled to be exactly equal to the reference current under the variations of motor parameters and operating conditions. In this control method, load circuit of inverter is R-L load with emf. This is electrical equivalent circuit of DC servo motor. The disturbance voltage generated by parameter variations is estimated by disturbance voltage observer. The estimation voltage is used as control input voltage of inverter. The influence of estimation error is restrained by feedback gain based on Lyapunov’s direct method. The feedback gains are adjusted in on-line calculations to ensure system’s 9 stability with various disturbances. Since the feedback gains are determined instantaneously with respect to state variables, feedback gains are not excessive high-gain and therefore the stability of the system in digital control is improved. 2.2.3 Sliding Mode Based Disturbance Observer for Motion Control The author [11] focused on the experimental system which is a Digital Signal Processing (DSP) controlled single degree-of-freedom motion control system and consists of a conventional DC servo motor with harmonic gear and encoder feedback. The inertia load is coupled by a relatively rigid shaft. With the help of the proposed disturbance compensation, the servo system is forced to track a reference model. The relatively big parameter perturbation, external disturbance and friction are estimated and compensated. The experimental system consists of a conventional DC servo motor with harmonic gear and encoder feedback. The inertia load is coupled by a relatively rigid shaft. The controller is implemented by using a DSP as the computation engine. The DC motor is supplied by a DC chopper. In the control design, a reduced order model is used; the armature inductance and the flexibility of the shaft are ignored. The system has a big friction, if less than 18% of the maximum voltage input is switched to the motor, it cannot move because of the friction. 2.2.4 Observer-based inertial identification for auto-tuning servo motor drives. An observer-based auto-tuning scheme for servo motor drives is presented by the author in [12]. The scheme is consisted of a state estimator to estimate motor disturbance and two adaptive controllers to separately adjust drive inertia and friction to their correct value. The servo control loop is tuned automatically with the inertia found. For disturbance torque 10 estimator, the authors use a full state estimator and use it to calculate the motor position. By using relation between motor speed and position, ߱ ൌ ߠݏ the estimator can be arrange into block diagram. For actual external disturbance and friction, the author assumed that disturbance torque vary much slowly than the servo motor’s cycle time, then, its average over a servo cycle can be calculated. The inertia can be estimated when the motor is in acceleration and deceleration regions. From the block diagram shows in Figure 2.1, motor current and speed information are used to estimate the mechanical parameter influenced external disturbance and two adaptive controllers are used to determine disturbance estimator. Figure 2.1 Block Diagram Of The Observer And Adaptive Controller 2.3 Observer The idea of observer was introduced because not all state variable feedback could assign the closed loop poles arbitrarily. It is basic mechanism to estimate the unmeasured state from the available output measurement or could called virtual sensor or sensorless. The state space model is; 11 ݔሶ ሺݐሻ ൌ ܣ ݔሺݐሻ ܤ ݑሺݐሻሺͳሻ ݕሺݐሻ ൌ ܥ ݔሺݐሻሺʹሻ And a general linear observer takes the form of; ݔሶ ሺݐሻ ൌ ܣ ݔොሺݐሻ ܤ ݑሺݐሻ ݕܬሺݐሻ െ ܥ ݔොሺݐሻሺ͵ሻ Where ܬis the observer gain and ݔොሺݐሻ is the state estimate. If ܬൌ Ͳ, the observer degenerates into open-loop model as in (1). The term of ݒሺݐሻ ݔ ሺݐሻ െ ݔොሺݐሻሺͶሻ is known as the innovation process which represent the feedback error between the observation and the predict model output for nonzero ܬin (3). The following result shows how the observer gain ܬcan be chosen such that the error ݔොሺݐሻ, defined as ݔሺݐሻ ݔ ሺݐሻ െ ݔොሺݐሻሺͷሻ can be made to decay at any desired rate. Consider the state space model (1) – (2) and an associated observer of the form (3). Then the estimate error ݔሺݐሻ defined by (5) satisfies ݔሶ ሺݐሻ ൌ ሺܣ െ ܥܬ ሻݔሺݐሻሺሻ Moreover, provided the model is completely observable, then the eigenvalues of ሺܣ െ ܥܬ ሻ can be arbitrary assigned by choice of [ ܬ12]. There are many types of observer, depend on what type to observe as a feedback to system. The type of observer to be used in application is depending on kind of parameter to be observer and the availability of the parameter in the system. 2.3.1 Model reference adaptive system (MRAS) observer Model Reference Adaptive Control (MRAC) also called MRAS is one of the main approaches to adaptive control. The basic structure of MRAS observer is shown is Figure 2.2. The reference model is chosen to generate 12 the desired trajectory, ݕ , that the plant output ݕ has to follow. The tracking error ݁ ݕ െ ݕ represents the deviation of the plant output from the desired trajectory. The purpose of MRAS is to design the controller and parameter adjustment mechanism so that all signals in the closed-loop plant are bounded and the plant output ݕ tracks ݕ as close as possible. ݕ Reference model ݎ ݑ Controller ߠ Adjustment mechanism ݁ Plant ݕ ݕ ݁ Figure 2.2 MRAS General Structure There are two categories of MRAS as direct or indirect and with normalized or unnormalized adaptive laws. For direct MRAS, the parameter vector , of the controller is updated directly by an adaptive law. For indirect MRAS, is calculated at each time, t, by solving a certain algebraic equation that relates with the online estimates of the plant parameters. But both categories with normalized adaptive law, the controller is motivated from the known parameter case is kept unchanged. This design can be used with adaptive include gradient, least-squares and SPR-Lyapunov design. Meanwhile, with unnormalized adaptive laws, controller is modified to lead to an error equation whose form allows the use of the SPR-Lyapunov design approach for generating the adaptive law. In 13 unnormalized, the controller design is more complicated in both direct and indirect case, but simpler in analysis and follows a consideration of a single Lyapunov-like function [14]. 2.3.2 Unknown input observer The unknown input observer (UIO) was developed to estimate the state of an uncertain system despite of the existence of unknown inputs or uncertain disturbances. The problem of reconstruction of the state of a dynamic system whose input is not measurable, which is importance in practice since there are many situations where plant disturbance occurs or part of the input of the system is inaccessible. Under such circumstances, a conventional observer that requires knowledge of all inputs cannot be used directly [9]. 2.3.3 Disturbance torque observer Generally, the motor control methods using disturbance observer is used to compensate parameter variations and disturbance torque to achieve high performance control of motor drives. This can be seen in the ability of speed control drive system especially DC servo motor is affected by variations and disturbance torque. As sensorless system, a mathematical modelling is used for controlling the machines. However, an accurate parameter measurement is very difficult to obtain and it’s vary with operation conditions such as temperature or saturation effects. This method also considers error estimation since the estimated disturbance by disturbance observer produce estimation error. The current tracking control is very important on motor control, since motor torque is generated by the armature current. The disturbance torque observer is constructed using Gopinath’s observer design algorithm [10]. 14 2.3.4 Instantaneous speed observer Normally, a speed sensor based on rotary encoder can be used to obtain speed information by counting an increased or decreased number of encoder pulses in a sampling period of mechatro servo system. However, in an ultra low speed range, a speed resolution of speed sensor based on rotary encoder is easily lost. Hence, the instantaneous speed observer is used. These methods have some effects of mechanical parameter variation and disturbance torque. Therefore, the new instantaneous speed observer in motor drives was deliberated, which mounts the electrical parameter identification algorithm to cancel out the estimation error caused by both the voltage drop of power converter and the armature resistance variation. From the state equation of DC servo motor, the motor speed is obtained. The differential state equation is transformed into the discrete state equation by the backward difference approximation. The speed observer is constructed by using both the discrete state equation and the nominal parameters of DC servo motor. The speed observer estimates the instantaneous value of motor speed in the sampling period and its input variables are an armature voltage and an armature current [15]. 2.4 Stepper motor system A stepper motor is an electromechanical actuators, converts electrical pulses into mechanical actions. When the right sequence pulses signal are applied to the system, the shaft of a stepper motor rotates in discrete step. The stepper motors revolution has various direct relationships to applied input pulses. The speed of the shafts rotation is connected to the frequency of the input pulses and the length of rotation is associated to the amount of input pulses applied. Meanwhile the direction of the shaft rotation is depends on sequences of the input pulses. Not like other type of motor, the stepper motor has no contacts or brushes. It is a synchronous motor in order to rotate armature magnet through the magnetic field switching. The essential function of a stepper motor is to translate switching excitation changes into precisely 15 defined increments of rotor position. Generally the stepper motor capable works as an electric motor when the drive running without commutator. The rotor of the stepper motor can be permanent magnet or variable reluctance motor which has a toothed block of some magnetically soft material. Typically, all the windings in the stepper motor are part of the stator. A stepping motor control system consists of three basic elements; controller, driver and motor [16]. 2.4.1 Stepper motor operation A simple drive system of a stepping motor is expressed by the figure shown that the stepper motor system can be an open loop system [16-22]. The block diagram is represented detailed in Figure 2.3 and Figure 2.4. The figure represents the portion from logic sequence to motor. Step Controller Motor Driver Direction command Controlsignal Figure 2.3 From Controller (Logic Sequencer) to Motor Phase Input controller Controller Input controller 1 2 3 4 Figure 2.4 Input Controller When a step command pulse is applied to the logic sequencer, the states of the output terminal are changed to control the motor driver so as to rotate the motor a step angle in the commanded direction. The rotational 16 direction is determined by the logic state at direction input, e.g. the H level indicate High for CLOCK WISE (CW) rotation and L indicate Low for the COUNTER CLOCK WISE (CCW) direction input. In the same application, the logic sequence is unidirectional, having no direction signal terminal. If one increment of movement is performed by one step, the block diagram of figure represents the whole system. But, when an increment is performed by two or more steps, another stage to produce a proper train of pulses is needed to put before the logic sequencer, and this is represented in next Figure 2.4. This logic circuit is denoted the “input controller”. In sophisticated applications the function of input controller is carried out pulse train to speed up, slew, and slow down the motor in the most efficient and reliable manner. The step command pulses are given from an external source, and it is expected that the stepping motor is able to follow every pulse [5]. Stepper motor uses electromagnetic field to create the motor shaft turn into a precise distance when a sequence of pulses is applied to the input pulses. The action is like the same poles of a magnet keep away and different poles are attracted. Figure 2.5 shows a typical cross-sectional view of the rotor and stator of a stepper motor. From the diagram, the stator has four poles, and the rotor has six poles. So the rotor will require 12 pulses of electricity to move the 12 steps to make one complete revolution. The rotor will move precisely 30 degrees (360°/12 steps) for each pulse of electricity the motor receives. However for different stepper motor has different degree rotation for each pulse. Figure 2.5 Cross Sectional Of Stepper Motor 17 When no power is supplied to the motor, the residual magnetism in the rotor magnets will cause the rotor to detent or align one set of its magnetic pole. This magnetic pole will be aligned with the magnetic poles of one of the stator magnets. For the figure type as shown in Figure 2.5, the rotor will have 12 possible detent positions. When the rotor is in a detent position, it will have enough magnetic force to keep the shaft from moving to the next position. This makes the rotor feel like it is clicking from one position to the next as the rotation rotate the rotor by hand with no power supplied [16]. 2.4.2 Type of stepper motor There are three basic stepper motor types. They are: • Variable-reluctance • Permanent-magnet • Hybrid 2.4.2.1 Variable-reluctance (VR) stepper motor The variable reluctance motor has been around for a long time in stepper world. Figure 2.6 shows a cross section of a typical V.R. stepper motor. This VR motor consists of a soft iron multi-toothed rotor and a wound stator. When the stator windings are energized with DC current the poles become magnetized. Rotation occurs when the rotor teeth are attracted to the energized stator poles [18]. The variable-reluctance (VR) stepper motor at its core basically differs from the PM stepper in that it has no permanent-magnet rotor and thus no residual torque to hold the rotor at one position when turned off. This means the field strength can be varied. The stator of a variablereluctance stepper motor has a magnetic core constructed with a stack 18 of steel laminations. The rotor is made of demagnetized soft steel with teeth and slots, or any other such magnetically permeable substance, unlike PM stepper motors. When the stator coils are energized, the rotor teeth will align with the energized stator poles. In the non-energized condition there is no magnetic flux in the air gap so there is no detent torque. This type of motor operates on the principle of minimizing the reluctance along the path of the applied magnetic field. By alternating the windings that are energized in the stator, the stator field changes, and the rotor moves to a new position [6]. Figure 2.6 Cross Section of VR Stepper Motor 2.4.2.2 Permanent Magnet (PM) stepper motor The permanent magnet step motor also known as a “tin can” or “canstock” is a low cost and low resolution type motor with typical step angles of 7.5° to 15° or 48 – 24 steps/revolution respectively. The PM motors have permanent magnets which added to the motor structure. Contrary to the variable reluctance (VR), the rotor of the PM motor no longer has teeth as in the motor structure. Instead the rotor is magnetized with alternating north and south poles situated in a straight line parallel to the rotor shaft. These magnetized rotor poles provide an increased magnetic flux intensity and because of this the PM motor exhibits improved torque characteristics when compared with the VR type [17]. A PM stepper motor operates on the reaction between a permanent-magnet rotor and an electromagnetic field. Figure 2.7 shows a cutaway diagram of a typical permanent magnet 19 stepper motor and shows that the permanent magnet motor can have multiple rotor windings, which means that the shaft for this type of stepper motor will turn fewer degrees as each pulse of current is received at the stator [16]. Figure 2.7 Permanent Magnet Stepper Motor Cross Section 2.4.2.3 Hybrid stepper motor The hybrid stepper motor unites the well characteristics of both the PM and VR type stepper motors. The rotor of the hybrid motor is a multi-toothed like the VR motor and includes an axially magnetized concentric magnet around its shaft. The teeth on the rotor provide an even better conduit which helps guide the magnetic flux to preferred locations in the air gap. As a result, the detent, holding and dynamic torque characteristics of the motor increase when compared with both the VR and PM types. Normally, the hybrid stepper motor is more expensive than the PM stepper motor but provides better performance with respect to step resolution, torque and speed. A Typical step angles for the hybrid stepper motor is range from 3.6° to 0.9° or 100 – 400 steps per revolution respectively [17]. Figure 2.8 Cross Section Hybrid Stepper Motor 20 A typical hybrid motor is shown in Figure 2.8. The stator construction is similar to the permanent magnet motor where the rotor is a cylindrical type and magnetized like the PM motor with numerous teeth like a VR motor. The teeth on the rotor provide a better path for the flux to flow through the preferred locations in the air gap. This increases the detent, holding, and dynamic torque characteristics of the motor compared to the other two types of motors. Even the hybrid motor are more expensive compare to the other two motors, one of the advantages of hybrid motors is it offer a smaller step angle compared to the permanent magnet motor. This feature gives a precise position compare with PM and VR motors. For low cost applications, the step angle of a permanent magnet motor is divided into smaller angles using better control techniques [16]. The two most commonly used types of stepper motors in the practical application are the permanent magnet and the hybrid types. If a designer is not sure which type will best fit his applications requirements he should first evaluate the PM type as it is normally several times less expensive. If not then the hybrid motor may be the right choice. There stepper motor designs also come with special feature i.e. the disc magnet motor. This feature contain the rotor is designed as a disc with rare earth magnets as shown in Figure 2.9. This motor type has a very low inertia and a optimized magnetic flow path with no coupling between the two stator windings. qualities are essential in some applications [17]. Figure2.9 Special Features In HSM These 21 2.5 Controller and driver 2.5.1 Current controller The controlling process include chopper control perform inside controller. Normally, the controller contains 2 PWM channels for chopper control where to control the current of 2 phase stepper motor. The process of selecting a correct PWM duty cycle is under the influence of different parameters (the angle of the magnetic vector, the amount of current through each phase and shaft resonance considerations). In synchronization, the rotor teeth are aligned with the magnetic flux vector and with a small amount of angular error which depends on the amount of load. The profile of the torque can be adjusted by controlling the current flowing through each phase using a sin table. By controlling the angle, the zero crossing of torque profile can be adjusted about the stator. The duty cycle of the PWM signal controls each phase voltage that include the flux linkage, the induced voltage and the applied phase voltage. Since the phase current depends on both phase voltages, rotor speed and motor specific parameter, constant current controlling requires feedback of current [28]. 2.5.2 Feedback linearizing controller A feedback linearization algorithm is used to control a permanent magnet (PM) stepper motor for point-to-point moves of a linear positioning. Issues such as rotor speed estimation from an optical encoder, the effects of high-frequency noise on current measurements due to pulse-width modulated (PWM) amplifiers, and the constraints of source voltage limits are addressed and resolved. The feedback linearizing controller used guarantees global trajectory tracking as long as the amplifier limits are not exceeded. A setup consists of a PM stepper motor with a encoder attached to a linear positioning location, two PWM amplifiers, and a digital signal processor for implementing the algorithm. The point of feedback 22 linearization control is to find a (nonlinear) state-space transformation such that, in the new coordinates, the nonlinearities may be cancelled out by state feedback. For the PM stepper motor, the appropriate nonlinear coordinate transformation is known as the direct-quadrature (DQ) transformation and is presented with phase voltage and current. The PWM amplifiers are used for actuation because of their high efficiency. Due to the switching nature of the PWM, there is a high frequency signal contained in the measurements of the phase currents. To remove this noise, analog filters are added to filter the currents before sampling. However, these filters add significant phase shifts to the current measurements that shown that these phase shifts distort the DQ transformation to the extent that the exact linearization controller will not work. A solution to the current measurement noise is to apply the DQ transformation on the noisy currents and then filter them on the digital signal processor (DSP) [29]. 2.5.3 Voltage level controller The voltage-level controller is designed using robust backstepping by first considering mechanical dynamics and then “stepping back” to electrical dynamics. The dynamics of the three mechanical position states x, y, and z are essentially similar and partially decoupled (coupling being only through current dynamics and disturbance forces and torque). The dynamics of each mechanical position state is second order with force (or torque) considered as input. Since currents are unmeasured, backstepping is carried out not through these unmeasured states, but instead through the filter state. The filter states act as estimates of currents. Hence, the voltage control inputs will be designed by robust backstepping applied to the subsystems [30]. 23 2.5.4 Neural controller A neural controller of the stepper motor has been created and implemented in a FPGA unit using a VHDL model is based on voltagecurrent control strategy,. The neural stepper motor controller developed uses a FPGA alongside with a programmable peripheral interface unit 82C55 (PPI) to control the stator voltage and current induced. As a means of communication and control of the 80C188EB-based overall system controller, an application control program in Intel 80x86 family assembly language is provided. The software module that was implemented in the controller generates, through the 82C55 programmable interface adapter, the triggering signals the drive (a high-voltage and high current ULN2004 circuit) of the stepper motor that positions the manipulator's end-tool [31]. 2.5.5 PID controller Over 90% of the controllers in operation today are Proportional Integral Derivative (PID) controllers (or at least some form of PID controller like a P or PI controller). The PID controllers are based on the common control algorithm, due to their simplicity and robustness. The PID controllers are widely use. Moreover, they are often incorporated into the programmable logic controllers (PLCs) that are used to control many industrial processes. The basic form of the PID controller is ௧ ݑሺݐሻ ൌ ܭ ݁ሺݐሻ ܭ න ݁ሺ߬ሻ݀ ܭௗ ݀݁ሺݐሻ ݀ݐ Where u is the input to the plant, y is plant output, r is the reference input and the error input to the PID is e = r - y. Meanwhile, Kp is the proportional gain, Ki is the integrals gain, and Kd is the derivative gain [14]. In order to validate the effectiveness of the system, mostly a stepper motor speed control was implemented with PID and any controller. By assigning feedback signal element, the system output voltage could be monitored for each controller action [30]. 24 2.5.6 L6208 Chip Driver The L6208 is a fully integrated stepper motor driver manufactured with multipower BCD technology, which combines isolated DMOS power transistors with CMOS and bipolar circuits on the same chip. The L6208 is a highly integrated, mixed-signal power IC that allows the user to easily design a complete motor control system for two-phase bipolar stepper motors. Figure 2.10 shows the L6208 functional block diagram. The IC integrates eight power DMOS devices, a centralized logic circuit which implements the phase generation, a PWM current control technique (quasisynchronous mode) for each of the two phases of the motor, plus other added features for safe operation and flexibility [16]. Figure 2.10 L6208 Functional Block Diagram 2.5.7 Microstepping driver Microstepping driver is the classical approach to drive a PM stepper motor at high resolution. It deals mechanical steps of the motor itself by 25 injecting current in several coils simultaneously: the rotor simply aligns itself with the magnetic field generated by the stator coils. This highresolution electronic driver has the advantage of being easily controlled with digital pulses, since each pulse corresponds to a single microstep (of about 40 nm with the 256 microstep driver IM483H and the NEMA 17 stepper motor selected). So as to track unpredictable stochastic trajectories, it is proposed to close the loop on the estimated position error of the coarse stage. Since the coarse actuator perturbs the overall controlled output with its actions, a hybrid like nonlinear control law is proposed to minimize its action. The coarse controller input signal is evaluated and compared to an absolute threshold. The action is taken only when the input signal is greater than a predefined level. The stepper closed-loop stage reacts to the error signal only when it is above a certain limit. With the dead-zone controller, the piezoelectric stack actuator is driven slowly back to its mid-position when getting too close to its stroke limits. Thus, the controller design amounts to fixing the limits. Then, generating the trigger of the coarse moves whenever the coarse stage estimated error is larger than the predefined limits. The main advantage of such a controller is the ease of implementation of the control algorithm. The controller deals only with digital lines, that are really robust to electromechanical perturbations and it does not require a complicated control algorithm [27]. 2.6 Encoder Encoder is a device used to change a signal or data into a code. The most application is used in high precision machining tools. In motion control, the encoder will convert the analog signal into digital signal to keep track the increasing or decreasing number of revolutions of the motor shaft has rotates from its initial position. In close-loop system, the encoder output will be used as a feedback signal to the controller reference input to compensate the error. There are many types of encoder. The simple and most application encoder now days are in mouse pc which it uses optical encoder or quadrature encoder. 26 2.6.1 Incremental encoder This type of encoders determines the current position by stating a single data and counting measuring steps. The output signals from incremented rotary encoders are manipulated by an electronic counter in where the measured value is generated by counting increments. These encoders form the majority of all rotary encoders. The electronics interpolation can be manipulated to get the desire resolution which means the precision rotary encoders capable to design for angle measurement for precise positioning. The higher resolution, the more precise positioning of the motion control. Petar Crnoˇsija et al. [31] use incremental encoder to analyse of the torque characteristics and the optimal control angle of hybrid stepper motor drives with a chopper amplifier and current controller. The proposed optimal control algorithms have been realized and tested for feasibility in a motor drive containing a hybrid stepper motor with incremental encoder by Phytron, a power supply (chopper amplifier) and current controller by Phytron, a microcontroller card by Intel, and a PC. The two-phase incremental encoder with 500 pulses/revolution was mounted on the motor shaft. The dependence of the optimal control angle on angular speed was calculated from the known parameter values of the presented stepper motor drive using the analytical expressions. The number of pulses counted by the timer within one step was measured. 2.6.3 Absolute encoder Absolute rotary encoders are derived from the design of the coded disc to provide an angular position since it’s require no previous transfer to provide the current position. The code signal is processed within a computer or in a numerical control and position value produced once power is available. There are many versions of absolute encoders available today, 27 such as single-turn or multi-stage versions and each must be evaluated based on its intended application. Absolute encoders provide a continuous, accurate measurement of the angle, but they are expensive [32]. 2.6.4 Linear encoder A linear encoder is a sensor, transducer paired with a scale that encodes position. The sensor reads the scale in for converting the encoded position by a digital readout. Atsushi Kato et al. [33] used optical linear encoder together with motor driver and PC to form a Linear DC Solenoid Motor system. The optical linear encoder puts on the tip of moving part directly. Its resolution is 0.1um. 2.6.5 Rotary encoder A rotary encoder is an electro-mechanical device. It used to convert the angular position of a shaft into digital code. It also called shaft encoder making it a sort of a transducer. Rotary encoders serve as measuring sensors for rotary motion. In motion control, the rotary encoder can gives speed information by counting increased or decreased number of encoder pulses in sampling period but in ultra low speed range, the speed resolution is easily lost. Kiyoshi Ohishi et al. [15] used rotary encoder to detect speed of the motor to identify the parameter identification algorithm, the voltage drop and the armature resistance variation. The rotary encoder has 20000 pulses/revolution resolution. CHAPTER 3 PROJECT BACKGROUND 3.1 Introduction Stepper motor is a nonlinear electromechanical incremental motion device and cam be used in positioning applications. This motor was designed to provide precise positioning control to within an integer number of steps without using sensors. In fact, the stepper motor is open-loop stable to any step position and thus, no feedback is needed to control them. This motor is electronically commutated and has no windings on the rotor. The motor do not have two major disadvantages of DC brush motors i.e. mechanical wear of the commutator and limitation to a 50% duty cycle to allow the armature windings to cool. These features give better reliability and better heat dissipations the winding are located on the stator and not on the rotor. For these reasons, many positioning systems now use stepper motors with the addition of encoder (position) feedback. Furthermore, it more reliable and, being brushless machines, require less maintenance. The ability to provide accurate control over speed and position combined with small size and relatively low cost make stepper motor a popular choice in a range of applications. In particular, permanent magnet stepper motor deliver higher peak torque per unit weight and has a higher torque to inertia ratio than DC motor [21, 22]. However, the performance of a stepping motor is limited under the openloop mode. The drive may fail to follow a pulse command when the frequency of the pulse train is too high or inertial load is too heavy. Their step response has quite a bit of overshoot and a relatively long settling time. Moreover the motor motion tends to be oscillatory in open–loop drives. The performance of stepping motor can be improved to a great extent by employing position feedback and/or speed feedback to 29 determine the proper phase(s) to be switched at proper timings. This type of control is termed ‘closed–loop’ drive. The closed–loop control is advantageous over the open loop control not only in that step failure never occurs but also that the motion is much quicker and smoother. In closed-loop control, a position sensor is needed for detecting the rotor position. As a typical sensor, nowadays, many types of encoder is used and it is usually coupled to the motor shaft. Position and speed sensors have some disadvantages; they are usually expensive, the sensor and the corresponding wires will take up space and inn defective and aggressive environments, the sensor might be the weakest part of the system [1, 8]. As an alternative, an observer is introduced to overcome the problem. The observer also called sensorless system. The application of sensorless drives system is widely used in the world such as hybrid electric vehicle, power-assisted wheelchair, city-scooter and high-power railway traction. 3.2 Sensorless system control 3.2.1 MRAS observer MRAS (Model Reference Adaptive System) observer is one of the method to estimate speed the of a drive machines that is directed towards the high performance speed control without a mechanical sensor for speed feedback. The method MRAS observers based on rotor flux as the error vector. The MRAS observer used to estimate the rotor speed and rotor flux angle is shown in below. The rotor flux angle will be used to detect the position of the motor shaft. The observer is based on a current-model is derived from rotor flux equation and the voltage-model is derived from stator flux equation. Figure 3.1 shown the block diagram of MRAS estimator for speed and angle estimator. The rotor frame equations for the current model are given by; ߖ ൌ ܮ ݅ ߬ Ǥ ݏ ͳ ௦ 30 Where; ߬ ൌ ೝ ோೝ is the rotor time constant. As can be seen in the block diagram, the rotor flux angle is derived from the current model since this is independent of the reference voltage of the machine [23]. Adjustment parameter Controller Input Current model Input Voltage model Figure 3.1 Block Diagram of MRAS Estimator 3.2.2 Mathematical modelling of stepper motor The dynamic equations, derived in are cast in state-space form as follows [1]: െܴ ۍ ܮ ێ ݅ ێ ݀ ݅ ൦ ൪ൌͲ ێ ݀߱ ݐ ݇ ێ ߠ െ ܬ ێ Ͳ ۏ Ͳ െܴ ܮ ݇ ܿߠݏ ܬ Ͳ ݇ ߠ݊݅ݏ ܮ െ݇ ܿߠݏ ܮ െܤ ܬ ͳ ͳ Ͳې ې ۍ ݅ ۑ ۑ ܮێ Ͳ ۑǤ ൦݅ ൪ ۑͳێǤ ሾݒ ߱ ۑ ۑ ܮێ ۑ ۑͲێ Ͳ ߠ ۑ ےͲۏ Ͳے And the output vector; ݓ Ͳ Ͳ ͳ ቂ ቃൌቂ ߠ Ͳ Ͳ Ͳ ݅ Ͳ ݅ Ͳ ቃ ൦ ൪ ቂ ቃ ሾݒ ͳ ߱ Ͳ ߠ ݒ ሿ ݒ Ͳ Ͳሿ 31 Where; ߱ ቂ ቃ is the output vector ߠ R is the resistance of the coils L is the inductance of the coils ݇ is the motor torque constant depending on the design of the rotor J is the inertia of the rotor and the load ߠ(t ) is the actual rotor position ߠ is the location of the coil a in the stator ߱ is the rotational velocity of the rotor ݅ is the current in the coil as function of time The model described above conforms to the general state space model given by; x = Ax + Bu y = Cx + Du x, u and y are called the state, input and output vectors, respectively. Where; ଵ ۍې ێଵۑ ܤൌ ێ ۑis called the input matrix, ۑ Ͳێ ے Ͳۏ Ͳ Ͳ ܥൌቂ Ͳ Ͳ ͳ Ͳ ቃ is called output matrix and Ͳ ͳ Ͳ ܦൌ ቂ ቃ is the direct transmission matrix. Ͳ The equation above can be developed from follow derivation. The derivative of winding current: ݅ ܮൌ ܸ െ ܴ ܫെ ݇߱ ߱ܬሶ ൌ ߣ ܫെ ܶ 32 For phase A of stepper motor: ܸ ൌ ܮ ௗೌ ௗ௧ െ ܴ݅ െ ௗఒೌ ௗ௧ ൌ Ͳሺሻ For phase B of stepper motor: ܸ ൌ ܮ ௗ್ ௗ௧ െ ܴ݅ െ ௗఒ್ ௗ௧ ൌ Ͳሺͺሻ The flux due to permanent magnet of rotor for each phase: ߣ ൌ ߣ ሺܰ ߠሻ ߣ ൌ ߣ ሺܰ ߠሻ And the voltage induced in winding each phase (A and B): െ݀ߣ ൌ ݇ ɘ ሺܰ ߠሻሺͻሻ ݀ݐ െ݀ߣ ݁ ൌ ൌ െ݇ ɘ ሺܰ ߠሻሺͳͲሻ ݀ݐ ݁ ൌ Where; ݇ ܰ ߣ and ߱ ൌ ௗఏ ௗ௧ The power absorbed (negative power) by winding from voltage source; ݅ ݁ ݅ ݁ ൌ ݅ ݇ ɘ ሺܰ ߠሻ െ ݅ ݇ ɘ ሺܰ ߠሻ But ߬ ൌ െ݅ ݁ െ ݅ ݁ Thus, ߬ ൌ െ݅ ݇ ሺܰ ߠሻ ݅ ݇ ሺܰ ߠሻ At equilibrium position; ߠ ൌ Ͳǡ ݅ ൌ ݅ ǡ ݅ ൌ Ͳ Thus, ߬ ൌ െ݅ ݇ ሺܰ ߠሻ Substitute (9) into (7) and substitute (10) into (8). These equations can be formed into mathematical modelling of stepper motor as, 33 ݀݅ െ ܴ݅ ݇ ɘ ሺܰ ߠሻ ݀ݐ ݀݅ ܸ ൌ ܮ െ ܴ݅ െ ݇ ɘ ሺܰ ߠሻ ݀ݐ ݀ߠ ൌ߱ ݀ݐ ݀߱ ൌ െ݅ ݇ ሺܰ ߠሻ ݅ ݇ ሺܰ ߠሻ െ ܤ ܬ ݀ݐ ܸ ൌ ܮ 3.2.3 Stepper motor selection The hybrid stepper motor is manufactured by RS modeled RS440-442 was choosen for the proposed project. This four phase hybrid stepper motor are capable of delivering much higher working torques and stepping rates than permanent magnet types. The stepper motor can produce 1.8° per step meanwhile permanent maganet stepper motor can achive 7.5° and 1.5° per step. Whilst at the same time maintaining a high detent torque even when not energised. This feature is important for position integrity. The choosen stepper motor are supplied in 8-lead wire configuration which allows the maximum felxibility when connecting to the drive boards. Rear extension shafts are proviede to enable connection of the drive requirements and feedback devices. The picture of stepper motor was depicted in Figure 3.2 below [24]. Figure 3.2 Stepper Motor Selected 34 The 8 lead wire configuration exiting sequence and direction of rotation when facing mounting flange end are shown in Figure 3.3 and Table 3.1. Technical specification of the selection stepper is depicted in Table 3.2; Figure 3.3 Stepper motor configuration Table 3.1 Sequence And Direction Of Rotation HSM Step Red 1 On Green Black Yellow 2 On On 3 4 Com +dcV On On On On On Table 3.2: Technical Specification of HSM Specification Value Rated voltage 5V Rated current 0.5I Resistance 10ohm Inductance 6mH Detent torque 5mHm Holding torque 70mNm Step angle accuracy 5% Step angle 1.8° Insulation class B CW 35 3.2.4 Stepper Motor Controller The existing of various microcontrollers now days give numerous embedded and intelligent applications can be built. The project will use the PIC microcontroller that is produced by Microchip. PIC is one of the microcontroller (MCU) types and MCU is a computer implemented on a single very large scale integrated (VLSI) circuit. MCU have been used in almost every application that requires certain amount of intelligence. This embedded system can be found in keyboard, printers, home appliance and nowadays, they have being used in luxurious car. MCU contains some of the following peripheral components [16, 25]; - Memory - Timers - Pulse width modulation (PWM) - Analog to digital converter (ADC) - Digital to analog converter (DAC) - Parallel I/O interface - Asynchronous serial communication interface (UART) - Synchronous serial communication interface - Direct memory access (DMA controller) - Memory component interface controller - Software debug support software In order to run the real-time control algorithm and create pulse width modulation (PWM) signals, a 8-bit microcontroller from Microchip is used. Microchip has introduced six different lines of 8-bit MCUs including PIC12XXX, PIC14000, PIC16C5X, PIC16CXX, PIC 17 and PIC18 [25]. For this project PIC16f877 was used in order to create PWM. It consists of fixed-point and floating-point capability. This microcontroller combines this real-time processing capability with controller peripherals to create a suitable solution for a vast majority of control system applications. 36 • Flexible instruction set • Inherent operational flexibility • Comparative high-speed performance • Cost effectiveness The pin and block diagram for the PIC16F877 is shown in Figure 3.4[25]. The other specification of PIC16F877 is attached in Appendix. Figure 3.4 The Pin Diagram of PIC 37 Figure 3.5 Block Diagram For PIC16F8X 3.2.5 Motor Driver The normal way of driving a four phase stepper motor is shown in Figure 3.6. This is commonly known as the ‘Unipolar Linear Drive’ as shown in Figure 3.6(a). When energizing, the current in each winding flows in one direction only, n (n1) and ܴ݊ are the sum of the external resistance plus the winding resistance, ܴ. By supplying a higher value for n (i.e. larger external resistance) and dc voltages, the torque speed characteristics can be improved. This is because of the rated voltages and current is to be maintained for each winding. As a result, a 6V, 6ohm motor (1A per phase) can be driven from a 6V dc. Alternatively, it can be driven from a 24Vdc supply using 18ohm series resistance in the L/4R mode with much improved 38 performance. The effect on motor performance of higher supply voltages and larger series limiting resistance is shown in Figure 3.6(b). (a) (b) Figure 3.6 a) Unipolar Drive b) The Effect On Motor Performance On Higher Supply Voltage And Larger Series Limiting Resistance One of the disadvantages of stepper motor is losses track on drive input at certain frequencies. This situation occurs because of the stepper motor facing resonant problem and at the same time an audible vibration come together. These frequencies can be avoided by driving the motor on half step mode which can reduce the effect of resonance. Alternatively, extra load inertia and external damping may be added to shift resonance regions away from the operating frequency. When the winding of the stepper motor are assigned ( ͳെ Ͷ) as shown in Figure 3.7, they can be connected to the driver board according to the unipolar drive in Figure 3.6a). Figure 3.7 Typical Motor Winding Connections 39 A specific switching sequence for the drive transistors Q1-Q4 needs to be followed in order to step a motor in particular direction. The sequence examples are shown in Table 3.3 and Table 3.4 which for full step mode and half step mode respectively. It results in the rotor advancing through one complete step at a time [24]. Table 3.3 Full Step Mode Step no. Start position Repeating sequence Q1 Q2 Q3 Q4 On Off Off On 1 On Off On Off 2 Off On On Off 3 Off On Off On 4 On Off Off On 5 On Off On Off Anti clockwise Clockwise Table 3.4 Half Step Mode Step no. Start Repeating sequence Q1 Q2 Q3 Q4 On Off Off On 1 On Off On Off 2 Off On On Off 3 Off On Off On 4 On Off Off On 5 On Off On Off 6 Off On On Off 7 Off Off On Off 8 On Off On Off Anti clockwise Clockwise The implementation plant of the project was shown in the Table 3.5 which divided into two stages. The first stage is from January to April and second stage from July to November. 7. Report 6. Seminar Presentation 5. Slide preparation 4.Synopsis preparation - Circuit simulation - Driver - Controller (PIC) - Stepper motor - Previous research 2.Stepper Motor Control system - Motor - Observer 1. Literature review 2 Week 1 January Month 3 4 1 2 February 3 4 Table 3.5 Project Implementation Plan 1 2 March 3 4 1 April 2 6. Writing - Performance analysis -Experimental result 5. Result - MRAS application - Hardware and software 4. Integration of the system - Derivation - Modelling 3. MRAS Observer - Signal generation and controlling 2.Software development - Validation - Circuit construction - Device procurement 1. Hardware part Month Week 1 July 2 3 4 August 1 2 3 4 September 1 2 3 4 October 1 2 3 4 November 1 2 3 4 CHAPTER 4 SOFTWARE AND HARDWARE CONSTRUCTION 4.1 Characteristics of hybrid stepper motor Since the hybrid stepper motor is a combination of variable reluctance and permanent magnet, the voltages induced in VR stepper motor must also be considered. The variation of the phase inductance with rotor position will produce the voltages that were induced by the rotor motion. If the stator and rotor teeth of one phase are misaligned, the flux path will have high reluctance. For a given phase current, a small flux links the winding, so the phase inductance is at its minimum value. The opposite values occur for a fully aligned condition. 4.2.1 Circuit representation In the hybrid stepping motor, the inductance of the windings is almost independent of the rotor position and the average inductance specified by the manufacturer. The phase circuit model shown in Figure 4.1 includes the total circuit resistance (R) and the average winding inductance (L). The hybrid motor has four phase windings that are mounted on separate stator poles. Consequently for each winding, the phase circuit model must include the resistance and inductance. Normally, the inductance is specified by the manufacturer and the resistance is specified in the drive circuit design. 43 R L Figure 4.1 Circuit Model For One Phase Of A Hybrid Stepper Motor 4.2.2 Speed characteristic of hybrid stepper motor For the complete model, the voltages that were induced in the phase winding by the rotor motion must be considered. The induced voltage occur because of the permanent magnet flux linkage at each windings are varies sinusoidally with the rotor position. The flux linkage for four phase hybrid stepper motor with p rotor teeth can be described as; ߰ ൌ ߰ெ ߠ ߰ ൌ ߰ெ ሺ ߠെ ߨȀʹሻ ߰ ൌ ߰ெ ሺ ߠെ ߨሻ ߰ ൌ ߰ெ ሺ ߠെ ͵ߨȀʹሻ (11) Where ߮ெ , is the maximum flux linkage each winding,is number of rotor teeth. ൌ ͻͲȀݐ݄݈݃݊݁ ݁ݐݏ ൌ ͻͲ ͳǤͺ ൌ ͷͲ (12) ߠis integration of the average rotor velocity over one supply cycle with respect to time. This will give the variation of rotor position with time as expressed below; 44 ݀ߠ ൌ ݀݅݁ܿ݊ܽݐݏȀ݁݉݅ݐ ݀ݐ ߱ ʹߨ ߠ ൌ ሺʹߨȀሻȀሺ ሻ ൌ ߱ Thus, ߠൌ ߱ ݐെ ߜሺͳ͵ሻ Where; ߜ ൌ ି݊ܽݐଵ ሺ߱ܮȀܴሻ The voltages in the phase windings are equal to the rate of change of flux linkages. Thus, ݀߰ ݀ߠ ൌ ߰ெ ሺߠሻ ݀ݐ ݀ݐ ݀߰ ݀ߠ ݁ ൌ ൌ ߰ெ ሺ ߠെ ߨȀʹሻ ݀ݐ ݀ݐ ݀߰ ݀ߠ ݁ ൌ ൌ ߰ெ ሺ ߠെ ߨሻ ݀ݐ ݀ݐ ݀߰ௗ ݀ߠ ݁ ൌ ൌ ߰ெ ሺ ߠെ ߨȀʹሻ ሺͳͶሻ ݀ݐ ݀ݐ ݁ ൌ This four phase hybrid stepper motor is excited by positive and negative current. With four steps will produce one excitation cycle. If the motor running at stepping rate f, then the excitation cycle repeats at frequency of f/4. Thus, for one excitation cycle, the angular frequency is given by; ݂ ߱ ൌ ʹߨ ൈ ൬ ൰ ൌ ߨ݂Ȁʹ Ͷ From Figure.1.1, the instantaneous voltages and currents in each phase can be expressed as below; ݀݅ ݁ ݀ݐ ݀݅ ݒ ൌ ܴ݅ ܮ ݁ ݀ݐ ݒ ൌ ܴ݅ ܮ 45 ݒ ൌ ܴ݅ ܮ ݒ ൌ ܴ݅ ܮ ݀݅ ݁ ݀ݐ ௗವ ௗ௧ ݁ ሺͳͷሻ The fundamental currant component in phase for each phase can be expressed as; ݅ ൌ ݏܿܫሺ߱ ݐെ ߜ െ ܽሻ ݅ ൌ ݏܿܫሺ߱ ݐെ ߜ െ ܽ െ ߨȀʹሻ ݅ ൌ ݏܿܫሺ߱ ݐെ ߜ െ ܽ െ ߨሻ ݅ ൌ ݏܿܫሺ߱ ݐെ ߜ െ ܽ െ ͵ߨȀʹሻሺͳሻ Where ܽ is a phase angle, ߜis the load angle. By taking phase A, the flux linked with phase is the product of current and inductance; ߰ ൌ ܮ ݅ (17) Where ܮ is the phase inductance with rotor teeth which is given by ܮ ൌ ܮ ܮଵ ߠሺͳͺሻ And the rate of changes in flux linkage with time can divided into two portions, the first part is the voltage induced in the phase windings by the rotor motion and the second is the changing current in the phase inductance [33]. Thus can be described as; ݀߰ ݀ܮ ݀݅ ൌ ݅ ܮ ݀ݐ ݀ݐ ݀ݐ ݀ܮ ݀ߠ ݀݅ ൌ ݅ ൈ ܮ ݀ߠ ݀ݐ ݀ݐ ߱ ݀݅ ൌ ݅ ሺܮଵ ߠሻ ൈ ܮ ݀ݐ ൌ ߱ܮଵ ݅ ሺ߱ ݐെ ߜሻ ܮ ݀݅ ሺͳͻሻ ݀ݐ 46 4.2 Simulation Implementation The model of the stepper motor system was simulated in Simulink/MATALB. There are two parts simulation, open loop and close loop which means the MRAS observer is included. 4.2.1 Open loop simulation Figure 4.2 Simulink Block For Open Loop The Simulink model for open loop is presented in Figure 4.2. The motor phases are fed by three H-bridge MOSFET PWM converters as shown in Fig. 4.3. For simulation part, the DC bus is representing by a 28V DC voltage source. The motor currents are independently regulated by three hysteresis-based controllers that generate the MOSFETs drive signals by comparing the measured currents with their references. The ripple in the current waveforms is controlled by the hysteresis band of the comparators. The switching frequency is variable and dependent on the motor parameters. 47 Figure 4.3 Signal Generator Output For this simulation, double-phase-on excitation scheme is used. Square-wave current references are generated using the current amplitude and the step frequency parameters specified in the dialog window. The movement of the stepper drive is controlled by the STEP and DIR signals received from Signal Builder block. The current amplitude and the stepping rate are selected in the dialog mask to be 2A and 238.7 step/s respectively. The STEP signal from the Signal Builder block controls the movement of the stepper drive. A positive value (1.0) will make the motor rotates and a zero value will stop the rotation. The DIR signal controls the rotation direction. A positive value (1.0) will impose the positive direction while a zero value will impose the reverse direction [34]. This is shown in Figure 4.3. The simulation is done using a variable-step solver with a sampling time of 1 us, providing acceptable accuracy for the PWM. If a high PWM accuracy is required, a smaller step time can be used but the simulation will be slower. block Additional Figure 4.4 Look Under Mask For Four Phase HSM 49 In the Simulink block, when changing the two phase into four phase stepper motor, the additional connections are needed in order to connect two extra points in HSM. This change is required in order to synchronize of the hardware application where the stepper motor is four phase type. These connections are connected to the Driver where some additional blocks have been done in Look Under Mask of the Driver. The additional blocks were depicted in Figure 4.4.Figure 4.5 shows the Look Under Mask of the HSM and Model discrete four phase HSM. The phases of FEM input was changed from [ 0 –pi/2] into [0 –pi/2 –pi pi/2] (which is equivalent to [0 – pi/2 –pi –pi3/2] ) for four phase condition. Table 4.1 shows the parameters used in simulation. (a) (b) Figure 4.5 a)Look Under Mask of HSM b) Look Under Mask of Model Discrete 4 Phases HSM 50 Table 4.1 Parameters for Driver Block and Hybrid Stepper Motor Parameters Driver Block HSM 2 2 238.7 238.7 Ts Ts Phase current (A) Stepping rate (step/s) Sampling time (s) 4.2.1 Close loop simulation The close loop system required the transformation of four phase system to two phase system using ݀ߠ െ ߠݍrotational condition. 4.2.2.1 Transformation of four phase into two phase system Figure 4.6 shows the star connection of the stator windings, an equivalent four-phase synchronous machine with constant air gap and one pole pair. ݀ఏ d axis ߠ ݃ ݃ ݃ q axis ݍఏ ݃ Figure 4.6 Equivalent Constant Air Gap For 4 Phase HSM 51 Based on the space-phasor theory, the space phasor ݃Ԧ corresponding to four phase system of magnitudes ݃ ǡ ݃ ǡ ݃ ǡ and ݃ where ݃Ԧ can be stator current ݅௦ , voltage ݒ௦ or flux ߰௦ . Thus, the space phasor for voltage and current are given by; ʹ ʹ ݒൌ ሺݒ ݒ ݒ ݒ ሻ ൌ ݒௗ ݆ݒ ݇ ݇ ʹ ʹ ଓԦ ൌ ݅ ൌ ሺ݅ ݅ ݅ ݅ ሻ ൌ ݅ௗ ݆݅ ሺʹͲሻ ݇ ݇ ݒԦ ൌ Where ݒௗ ,݆ݒ ,݅ௗ and ݆݅ are the components in the complex plane and ݇ is the number of phase. The homopolar components ݒା and ݒି are needed for the transformation of four phase system into two phase system as; ͳ ሺ ݒ ݒ ݒ ݒ ሻ ݇ ͳ ൌ ሺݒ െ ݒ ݒ െ ݒ ሻ ݇ ݒା ൌ ݒି ሺʹͳሻ These homopolar components are linked to each other together with space phasor in matrix form where ݇ ൌ Ͷ as follow; ሾݒԦ ሿ ൌ ሾܽԦସ ሿሾ ݒሿସ ൌ ൣܬԦସ ൧ሾݒሿଶ Where, ݒ ݒௗ ݒԦ ݒ ݒ ݒԦ כ ሾݒԦሿ ൌ ൦ ൪ ǡ ሾݒሿସ ൌ ൦ ݒ൪ ǡ ሾݒሿଶ ൌ ݒ ݒା ା ݒି ݒ ݒି ͳ ͳ ͳ ሾܽԦସ ሿ ൌ ൦ ʹ ͲǤͷ ͲǤͷ ݅ െ݅ ͲǤͷ െͲǤͷ െͳ െ݅ െͳ ݅ ൪ ͲǤͷ ͲǤͷ ͲǤͷ െͲǤͷ 52 ͳ ͳ ൣܬԦସ ൧ ൌ ൦ Ͳ Ͳ ݅ െ݅ Ͳ Ͳ Ͳ Ͳ ͳ Ͳ Ͳ Ͳ ൪ Ͳ ͳ ሺʹʹሻ Thus, ͳ ሾݒԦ ሿ ൌ ͲǤͷ ൦ ͳ ͲǤͷ ͲǤͷ ͳ ݅ ͳ െ݅ ൌ൦ Ͳ Ͳ Ͳ Ͳ ݅ െ݅ ͲǤͷ െͲǤͷ Ͳ Ͳ ͳ Ͳ ݒ െͳ െ݅ ݒ െͳ ݅ ൪൦ ൪ ͲǤͷ ͲǤͷ ݒ ͲǤͷ െͲǤͷ ݒ Ͳ ݒௗ Ͳ ݒ ൪ Ͳ ݒା ͳ ݒି Therefore, the formulae of transformation from four phase system into two phase system or vice verse are; ሾݒሿଶ ൌ ሾܣସ ሿሾ ݒሿସ and ሾ ݒሿସ ൌ ሾܣସ ሿିଵ ሾݒሿଶ Where; ሾܣସ ሿ ൌ ሾܬସ ሿିଵ ሾܽସ ሿ and ሾܣସ ሿିଵ ൌ ሾܽସ ሿିଵ ሾܬସ ሿ Thus for transformation of the four phase hybrid stepper motor can be explained as; ሾݒሿଶ ൌ ሾܣସ ሿሾݒሿସ ൌ ሾܬସ ሿିଵ ሾܽସ ሿሾݒሿସ ͳ ݅ ͳ െ݅ ൌ൦ Ͳ Ͳ Ͳ Ͳ Ͳ Ͳ ͳ Ͳ Ͳ ିଵ ͳ Ͳ ͳ ൪ ͲǤͷ ൦ ͲǤͷ Ͳ ͲǤͷ ͳ ݅ െ݅ ͲǤͷ െͲǤͷ ݒ െͳ െ݅ ݒ െͳ ݅ ൪ ൦ ൪ ͲǤͷ ͲǤͷ ݒ ͲǤͷ െͲǤͷ ݒ 53 ݒ ݒௗ ͲǤͷ Ͳ െͲǤͷ Ͳ ݒ Ͳ ͲǤͷ Ͳ െͲǤͷ ݒ ൌ ൌ൦ ൪ ൦ ൪ ሺʹ͵ሻ ݒା ͲǤʹͷ ͲǤʹͷ ͲǤʹͷ ͲǤʹͷ ݒ ݒି ͲǤʹͷ െͲǤʹͷ ͲǤʹͷ െͲǤʹͷ ݒ The complex equations of the four phase system into two phases are; ݒௗ ൌ ͲǤͷݒ െ ͲǤͷݒ ൌ ͲǤͷሺݒ െ ݒ ሻ ݒ ൌ ͲǤͷݒ െ ͲǤͷݒ ൌ ͲǤͷሺݒ െ ݒ ሻ (24) The above equations are in fixed stator ݀ െ ݍsystem. In order to construct the system in rotational ݀ߠ െ ߠݍsystem, the rotational operator of ሾܦସ ሺߠሻሿ is used where the two phases can be constructed from; ሾݒଶ ሿଶఏ ൌ ሾܦସ ሺߠሻሿሾݒሿଶ Where ܿߠݏ ሾܦସ ሿ ൌ ൦െߠ݊݅ݏ Ͳ Ͳ ሾݒଶ ሿଶఏ ߠ݊݅ݏ ܿߠݏ Ͳ Ͳ Ͳ Ͳ ͳ Ͳ Ͳ Ͳ ൪ Ͳ ͳ ݒௗఏ ݒ ൌ ఏ ሺʹͷሻ ݒାఏ ݒିఏ Thus, ݒௗఏ ܿߠݏ ݒఏ െߠ݊݅ݏ ൌ ൦ ݒାఏ Ͳ ݒିఏ Ͳ ߠ݊݅ݏ ܿߠݏ Ͳ Ͳ Ͳ Ͳ ͳ Ͳ Ͳ ݒௗ Ͳ ݒ ൪ Ͳ ݒା ͳ ݒି As a result, the rotational stators ݀ߠ െ ߠݍfor the voltages are; ݒௗఏ ൌ ݒௗ ܿ ߠݏെ ݒ ߠ݊݅ݏ ݒఏ ൌ ݒ ܿ ߠݏെ ݒௗ ߠ݊݅ݏሺʹሻ 54 Since the derivation of voltages and currents are identical, thus the rotational stators ݀ߠ െ ߠݍfor the currents are [35]; ݅ௗఏ ൌ ݅ௗ ܿ ߠݏെ ݅ ߠ݊݅ݏ ݅ఏ ൌ ݅ ܿ ߠݏെ ݅ௗ ߠ݊݅ݏ (27) 4.2.2.2 Derivation of Model Reference Adaptive Control (MRAS) The whole system of the hybrid stepper motor including MRAS become a close loop or a sensorless system is shown in the Figure 4.7 and the basic configuration of the MRAS is depicted in Figure 4.8. Power supply Controller Driver MRAS ADC Figure 4.7 Block Diagram Of The Whole System Reference model Adjustable model Adaptive mechanism Plant Figure 4.8 Basic Configuration of MRAS 55 The reference models are represented from equation (14) and (15) and can be expressed as; ݀݅ ݀߰ ൌ ݒ െ ܴ݅ െ ܮ ݀ݐ ݀ݐ ݀߰ ݀݅ ൌ ݒ െ ܴ݅ െ ܮ ݀ݐ ݀ݐ ݀݅ ݀߰ ൌ ݒ െ ܴ݅ െ ܮ ݀ݐ ݀ݐ ݀݅ ݀߰ ൌ ݒ െ ܴ݅ െ ܮ ሺʹͺሻ ݀ݐ ݀ݐ And adjustable models can be expressed from equation (18) and (19) as; ݀߰ ݀݅ ൌ ߱ܮଵ ݅ ሺ߱ ݐെ ߜሻ ሺܮ ܮଵ ߠሻ ݀ݐ ݀ݐ ݀݅ ݀߰ ൌ ߱ܮଵ ݅ ሺ߱ ݐെ ߜሻ ሺܮ ܮଵ ߠሻ ݀ݐ ݀ݐ ݀݅ ݀߰ ൌ ߱ܮଵ ݅ ሺ߱ ݐെ ߜሻ ሺܮ ܮଵ ߠሻ ݀ݐ ݀ݐ ݀݅ ݀߰ ൌ ߱ܮଵ ݅ ሺ߱ ݐെ ߜሻ ሺܮ ܮଵ ߠሻ ݀ݐ ݀ݐ Since the system is using models are reduced. ݀ߠ െ ߠݍrotational system, the above By substitution equation (24) into (26) the models are simplified as below. For reference model in ݀ߠ െ ߠݍsystem are; ݒௗఏ ൌ ͲǤͷሺݒ െ ݒ ሻܿ ߠݏ ͲǤͷሺݒ െ ݒ ሻߠ݊݅ݏ ݒఏ ൌ ͲǤͷሺݒ െ ݒ ሻܿ ߠݏെ ͲǤͷሺݒ െ ݒ ሻߠ݊݅ݏ By substituting equation (28), the flux linkages for reference models become; 56 ݀݅ௗఏ ݀߰ௗఏ ൌ ݒௗఏ െ ܴ݅ௗఏ െ ܮ ݀ݐ ݀ݐ ݀߰ఏ ݀݅ఏ ൌ ݒఏ െ ܴ݅ఏ െ ܮ ݀ݐ ݀ݐ Meanwhile for adaptation model in ݀ߠ െ ߠݍsystem are; ݅ௗఏ ൌ ͲǤͷሺ݅ െ ݅ ሻܿ ߠݏ ͲǤͷሺ݅ െ ݅ ሻߠ݊݅ݏ ݅ఏ ൌ ͲǤͷሺ݅ െ ݅ ሻܿ ߠݏെ ͲǤͷሺ݅ െ ݅ ሻ ߠ݊݅ݏሺʹͻሻ When substituting equation (29), the flux linkage for adaptation models can be formed as; ݀݅ௗఏ ݀߰ௗఏ ൌ ߱ܮଵ ݅ௗఏ ሺ߱ ݐെ ߜሻ ሺܮ ܮଵ ߠሻ ݀ݐ ݀ݐ ݀߰ఏ ݀݅ఏ ൌ ߱ܮଵ ݅ఏ ሺ߱ ݐെ ߜሻ ሺܮ ܮଵ ߠሻ ݀ݐ ݀ݐ The adaptive mechanism is using Proportional Integral (PI) controller to turn the error state of reference and adaptive model to zero by adjusting the input of adaptive model, which variable is the rotor speed. The error between two models is the angle between two flux linkage vectors and can be expressed as; ݁ఠ ൌ ߰௩ఏ െ ߰ఏ The angle produced between two flux linkages was then used in adjustment parameter to get the speed. Then, the PI controller was used as speed regulation in order to regulate the state speed to follow the actual speed. equation (13). The parameter adjustment was derived from And by using the PI controller, the regulated estimation speed as; 57 ௧ ߱ ෝ ൌ ሺܭ න ܭ ሻ݁ఠ The position of the sensorless system can be achieved by differential the speed [35, 36]. The Simulink block diagram for sensorless system for hybrid stepper motor is depicted in Figure 4.9. The subsystems are attached in Appendix. 4.3 Hardware implementation 4.3.1 Open loop system The open loop of the hybrid stepper motor system is using PIC to get the desired speed and position. Before proceed to develop the circuit, the simulation of the circuit had been executed. The circuit simulation for stepper motor driver was carried out with MultiSim7. Figure 4.10 shows the circuit simulation for stepper motor driver with MultiSim7. The driver circuit was selected from manufacturer recommendation but need to include inverter as buffer (7404N). This buffer is included to overcome the overshoot at the outputs. The LED diodes are acting as coil for each stepper motor winding since the MultiSim 7 do not have stepper motor tool. The stepping signals to each coil of the stepper motor were examined by oscilloscope. Figure 4.11 shows the result from the driver circuit simulation. The generated waveform is same as expected in Table 3.3 Full step mode. As a conclusion, the stepper motor driver can be used and the next step is to develop an open loop system of the stepper motor system hardware followed by two stages close-loop system. The first stage is using the encoder to get the feedback input and then will be replaced with observer as a feedback to the drive system. construction of the hybrid stepper motor. Figure 4.12 shows the Figure 4.9 Simulink Block For Close Loop System 59 Figure 4.10 Circuit Simulation For Stepper Motor Driver Figure 4.11 Waveform At Each Coil (a) (b) Figure 4.12 Circuit Construction On A)Protoboard B)Stripboard 4.3.1 Close loop system In order to make the system close loop, a rotary encoder is applied to the open loop system. Rotary encoder is a sensor or transducer used to convert the data of rotary motion into a series of electrical pulses that can be 60 readable by controller. This type encoder comes with eight slotted disc and sensor board. The slotted disc has 35mm outsider diameter with eight slots that provides sixteen transitions. The optical sensor is used to sense the 16 transitions. The pulses produced will be sent to controller to recognize the rotary angle of the disc. Therefore, the current position of the hybrid stepper motor can be acquired by employ the rotary encoder. The rotary encoder is depicted in Figure 4.13. Rotor shaft (a) (b) Figure 4.13 a)Pair Of Optical And 8 Slot Disc Rotary Encoder. b) Motor Shaft Was Slotted With Rotary Encoder Disc In second stage, the encoder was removed and replace with the MRAS system. The hardware implementation for sensorless system can be achieved via converting the simulation of sensorless Simulink/MATLAB file into C language by using Real Time Workshop. Then compile the C language by MicroC compiler before loaded into microcontroller. Since the voltage phase and current phase of the hardware is analogue input, thus the analogue to digital converter (ADC) is required. Hence, a PCI 1711 card from Advantech was utilized. CHAPTER 5 RESULT AND DISCUSSION 5.1 Introduction The sensorless technique using Model Reference Adaptive System (MRAS) for hybrid stepper motor has been developed. The sensorless technique purpose is to replace the physical sensor or encoder to measure observable parameters. By using these parameters, it can estimate speed or position using the measured states in form of current or voltage. The simulation of the system is using the proper system model and input in MATLAB. The hardware implementation also has been done in the open loop system to obtain the measured value of the hybrid stepper motor speed. 5.2 Open loop Figure 5.1 depict the output from open loop simulation with zero load torque where it shows the voltages phase, currents phase and torque while in Figure 5.2 shows the speed and position respectively. From this figure, it shows that the stepper motor moved forward where the position increase from 0 rad to 0.82 rad with respected speed of 140 rad/s in 0.105s. Then it stays at same position for 0.055s before it reverse the direction at time 0.153s and stop at 0.205s at 0.44 rad 62 Figure 5.1 Voltage Phase, Current Phase And Torque of Open Loop HSM Figure 5.2 The Speed (Top) And Position (Bottom) of The Open Loop HSM 63 Figure 5.3 The Speed (Top) And Position (Bottom) of The MRAS System Without Feedback Figure 5.4 The Comparison Between Open Loop System And Open Loop MRAS System Without Feedback For Speed (Top) And Position (Bottom) 64 Figure 5.3 shows the speed and position of the MRAS system without feedback respectively. Many time simulations were throughout in order to obtain the PI value to produce the best performance. The value of Proportional is 1120000 and Derivative is 1. Generally the figure illustrates the MRAS system without feedback is able to achieve the target position with slowly raising the speed. On the other hand, the position is slowly increases when forward condition (DIR ‘1) and stay at position 0.8 rad for almost 0.06s but very fast decrease when backward condition (DIR ‘0’) and stop at low position i.e. 0.5 rad. Figure 5.4 show the comparison between the open loop system of HSM and MRAS system without feedback. For hardware implementation result, the signal was tapped from rotary encoder point and observes the signal via oscilloscope. The data taken was shown in Figure 5.5. From the graph, the period is 50ms (2.5scale box) and the rotary encoder gives eight pulses per revolution. Figure 5.5 Output Signal of Rotary Encoder As a result, the speed of the hardware implementation can be achieved. The speed of the rotary encoder can be obtained from revolution per minute equation. Revolution per minute, ܴܲ ܯൌ ͲȀሺ ݊݅ݐݑ݈ݒ݁ݎݎ݁݁ݏ݈ݑൈ ݀݅ݎ݁ ൌ Ͳ ͺ ൈ ͷͲ݉ݏ ൌ ͳͷͲ ݀ܽݎȀݏ 65 5.3 Close loop (Sensorless system) These close loop simulations were carried out with model reference adaptive system (MRAS) with feedback in many time in order to obtain and verify the performance of the speed and position as accurate as possible. The feedback is the output of the MRAS into the parameter adjustment in the system. The speed and position for MRAS system with feedback were depicted in Figure 5.6. In general, both figures illustrate that the speed and position were capable to follow the pattern of the system. Compare with the system without MRAS feedback, it shows that the speed is faster rise up and slower fall down. The simulation shows the MRAS system is able to increase position (DIR ‘1’) at speed around 140 rad/s. The motion stays at position 0.8 rad at time 0.106s before it reverse the direction (DIR ‘0’) from 0.158s to 0.206s and stop at position 0.45rad, which is higher from MRAS without feedback. The comparison between open loop system HSM and open loop MRAS system with feedback for speed and position was shown in Figure 5.7. The Proportional value for this simulation is 26000 and Derivative value is 1 which is lower than open loop MRAS without feedback. The uneven speed and position occurs since the inner simulation of the Stepper Motor Drive cannot be modified easily. Therefore, the voltage phase and current phase were used are unexpected signal. Figure 5.8 and Figure 5.9 show the current phase and voltage phase respectively that were used in sensorless system. 66 Figure 5.6 The Speed (Top) And Position (Bottom) Of The Sensorless System With Feedback Figure 5.7 The Comparison Between Open Loop System And Open Loop MRAS System With Feedback For Speed (Top) And Position (Bottom) 67 Figure 5.8 Current Phase Of Simulation Figure 5.9 Voltage Phase Of Simulation 68 Nevertheless, the hardware implementation for the sensorless system could not be done due to lack of current sensor. Consequently, only the voltage phase data can be acquired from ADC card. The voltage phases are shown in Figure 5.12. Figure 5.10 Voltage Phase Of Hardware Implementation CHAPTER 6 CONCLUSION AND FUTURE RESERACH 6.1 Conclusion Generally, both open loop and close loop or sensorless systems of the hybrid stepper motor were investigated. Both simulation and hardware for open loop system were shown that the speed and position can be getting easily. However, by applying the sensorless system can improve the performance of the motion control. In this project the MRAS was implemented to form a sensorless system for a hybrid stepper motor. The MRAS can be acting as a non physical sensor in motion control. Via MRAS, the speed and position ware estimated before applying both parameters to the HSM system. The main inputs of the MRAS system are current phase and voltage phase were induced into the system to produce two flux linkages. The error between these two flux linkages is the angle which was used in adjustment parameter to get the speed estimation. Then by regulating with PI controller, the speed estimation will follow the actual value and by doing differential on these value, the position estimation will be getting. Overall, the speed estimation and position estimation from developed MRAS in simulation is able to follow the pattern of the actual speed. The speed of the MRAS are obtain to track the speed at average 140rad/s and position along the forward (DIR ‘1’) and reverse direction (DIR ‘0’) with error convergence to smaller value. The result can be improved by improving the voltage and current phase input of the MRAS system. 70 The hardware implementation of the close HSM system was implemented by using rotary encoder where it measures the speed at 150rad/s. By the way, the sensorless system can be implemented if the current sensor is available. The ADC card only acquire the voltage input. Moreover, the constructions of the circuit for the current sensor take a quite long time. 6.2 Future Work The availability of current sensor is one of the key to validate the developed observer i.e. model reference adaptive system observer. The convenient current sensor with small modification is available in the market, but the price quite expensive in order to measure four current phase. Other than that, the current sensor circuit also can be assembled by using operational amplifier. In MRAS, besides by measuring the flux linkage as the error vector, as well as the back EMF and reactive power by using additional full order adaptive observer may one of the alternatives. Beside MRAS itself, other observer also can be used as sensorless system such as Luenberger observer, Extended Kalman Filter (EKF) or Sliding Mode Base observer. To overcome the low performance of the PIC controller, the faster microcontroller or DSP may be used. The Motorola microcontroller is one of the best choices because it is specifically design for motor control application. 71 REFERENCES [1] Leila Parsa and Hamid A. Toliyat, A Self Reconfigurable Electric Motor Controller for Hybrid Electric Vehicle Applications, IEEE pg 919 [2] Sehoon Oh and Yoichi Hori, Development of a Novel Instantaneous Speed Observer and its Application to the PowerAssisted Wheelchair Control, IEEE Journals pg 1471-1476 [3] Marco Tursini, Roberto Petrella and Francesco Parasiliti, Sensorless Control of an IPM Synchronous Motor for CityScooter Applications, IEEE Journals pg 1472 – 1479 2003 [4] Iban Vicente, Joseba Arza, Martin Brown and Alasdair Renfrew, Parameter Estimation Selection for a Sensorless Railway Traction Application, IEEE Journals 2006 [5] Azzeddine Ferrah, Jehad Al-Khalaf Bani-Younes, Mounir Bouzguenda, and Abdelkader Tami, Sensorless Speed and Position Estimation in a Stepper Motor, IEEE 2007 [6] Bhavinkumar Shah, Field oriented Control of Step Motors, Department of Electrical and Computer Engineering, Cleveland State University. Master Of Science In Electrical Engineering, 2000 [7] Reza Hoseinnezhad, Position Sensing in Brake-By-Wire Callipers Using Resolvers, IEEE Transactions On Vehicular Technology, Vol. 55, No. 3, May 2006 [8] John N. Chiasson and Robert T. Novotnak, Nonlinear Speed Observer for the PM Stepper Motor, IEEE Transactions On Automatic Control, Vol. 38, No. 10, October 1993 [9] Shao-Kung Chang, Wen-Tong You, and Pau-Lo Hsu, GeneralStructured Unknown Input Observers, IEEE Proceeding of the 72 American Control Conference, pg 666-670, 1994 [10] Tomonobu Senjyu, Hisashi Kamifurutono and Katsumi Uezato, Robust Speed Control of DC Servo Motor Based on Lyapunov’s Direct Method, IEEE, pg 522 – 527,1994 [11] Peter Korondi, David Young and Hideki Hashimoto, Sliding Mode-based Disturbance Observer for Motion Conrol, th Proceedings of the 37 IEEEConference and Decision & Control, December 1998 [12] Sheng-Ming Yang and Yu-Jye Deng, Observer-Based Inertial Identification for Auto-Tuning Servo Motor Drives, IEEE IAS 2005, pg 968 – 972, 2005 [13] Graham C. Goodwin, Stefan F. Graebe and Mario E. Salgado, Control System Design, Prentice hall 2001 pg 531- 532 [14] Petros A. Ioannou and Jing Sun, Robust Adaptive Control [15] Kiyoshi Ohishi and Yoshihiro Nakamura, Robust Speed Servo System for Wide Speed Range Based on Instantaneous Speed Observer and Disturbance Observer, IEEE AMC ’96-MIE, pg 326 – 331, 1996 [16] Chirayu Shah, Sensorless Control of Stepper Motor Using Kalman Filter, Department of Electrical and Computer Engineering, Cleveland State University. Master Of Science In Electrical Engineering ,2004 [17] Industrial Circuit application note, Stepper. Motor basics, libarary.solarbotics.net/pdflib/pdf/motorbus.pdf [18] Gallegos-Lopez, G. and Kjaer, P.C. and Miller, T.J.E. (1998) A new sensorless method for switched reluctance motor drives. IEEE Transactions on Industry Applications 34(4):pp. 832-840. [19] P. Krishnamurthy, F. Khorrami, On Intriguing Effects of ClosedLoop Commutation Delay in Stepper Motor Control with Application to Parameter Estimation, IEEE Proceedings of the 2006 American Control Conference 2006:pp. 3171-3175 [20] John N. Chiasson and Robert T. Novotnak, Nonlinear Speed Observer for the PM Stepper Motor, IEEE Transactions On 73 Automatic Control, Vol. 38, No. 10, October 1993 [21] John N. Chiasson and Robert T. Novotnak, Nonlinear Speed Observer for the PM Stepper Motor, IEEE Transactions On Automatic Control, Vol. 38, No. 10, October 1993 [22] F. Nollet, T. Floquet_, W. Perruquetti, Observer-Based Second Order Sliding Mode Control Laws for Stepper Motors, Science Direct Control Engineering Practice 16 (2008) 429–443 [23] Qiang Gao, C. Spiteri Staines, G. M. Asher and M. Sunmer, Sensorless Speed Operation of Cage Induction Motor using Zero Drift Feedback Integration with MRAS Observer, IEEE EPE, 2005 [24] RS Datasheet, Hybrid Stepper Motor, Data Pack B, March 1997 232-5749. [25] Microchip Technology Inc., PIC16F87X Datasheet 28/40 Pin 8_bit CMOS Flash Microcontroller, 2001, DS30292C [26] Han-Way Huang, PIC Microcontroller: An Introduction to Software and Hardware Interfacing, Thomson Delmar Learning [27] Yvan Michellod, Philippe Mullhaupt and Denis Gillet, Strategy for the Control of a Dual-stage Nano-positioning System with a Single Metrology, IEEE, 2006 [28] Farid Sheikholeslam and Mehdi Habibi, A Low Cost Single Microcontroller Hybrid Stepper Motor Controller and Drive with Adaptive Ripple Reduction Using Current Feedback, IEEE 2006 pp:2514-2518 [29] Marc Bodson, John N. Chiasson, Robert T. Novotnak, and Ronald B. Rekowski , High-Performance Nonlinear Feedback Control of a Permanent Magnet Stepper Motor, IEEE Transactions On Control Systems Technology, Vol. I , No. I , March 1993 [30] Ahmad Shulai Rahman and Mahd. Nasir Taib, Stepper Motor PID and Fuzzy Logic Controller With Tachogenerator Feedback, IEEE Asia SEENSE SENSOR, pg. 365 – 368 2003 [31] Petar Crnošija and Stpe Ajdukkovi, Microcomputer Implementation Of Optimal Algorithms for Close Loop Control of 74 a Hybrid Stepper Motor Drives, IEEE, ISIE’99- Bled, Slovenia [32] R C Seals, Position Feedback Control with a 'Smart' Controller based on an FPGA, IEEE [33] Atsushi Kato', and Kouhei Ohnishi, High Speed and High Precision Linear DC Solenoid Servo System, The 30th Annual Conference of the IEEE Industrial Electronics Society, 2004 [34] Paul Acarnley, Stepping motors: Aguide to theory and practice, The Institute of Electrical Engineers, 4th Edition 2002 [35] MATLAB Help, Stepper Motor Drive, MATLAB R2008a [36] Prof. Dr Farouk M. Abdel Kader, Prof. Dr Hassan E. Eldeeb, Dr. Ahmad E. Kalas, and Eng. M. El Shahat Dessouki, Field Oriented Control of Hybrid Stepping Motor, Suez Canal University, Faculty of Engineering [37] Dao Hung Anh and Pham Dinh Truc, Model Reference Adaptive System (MRAS) Based Sensorless Control of Induction Motor, The University of Technology 75 APPENDICES A. Source code for embedded MATLAB function in Simulink Embedded MATLAB function [t,CosPT,w_new] = Function#1 fcn(t_nminus1,w_in) t=1e-6 + t_nminus1; w_new=w_in; R=0.7; L=0.0014; delta=atan((w_new*L)/R); CosPT=0.0014*Cos(w_new*t - delta); Embedded MATLAB function L = fcn(theta) Function #10 L=0.0014 + 0.01*sin(50*theta); Embedded MATLAB function [t,omega] = fcn(t_nminus1,w,angle) Function #11 t=1e-6 + t_nminus1; R=0.7; L=0.0014; P=50; delta=atan((w*L)/R); omega=2.05*(P*angle + delta)/t; 76 B. Subsystem of simulation Subsystem Subsystem1 Subsystem3 Subsystem2 74