Simulation of Motor Braking Control A thesis submitted in partial fulfillment for the degree of BSc

Department of Electrical and Electronic Engineering

University of Khartoum

By

Qutyba AbdElhameed Elhasan Salih 054051

Supervisor: Dr. Fayez M. Elsadik

July 2011

I

قال هللا تعالى:

"وما أوتيتم من العلم اال قليال"

صدق هللا العظيم

II

Dedication

" If you want to learn a thing, read that. If you want to know a thing, write that; if you want to master a thing, teach that."

To my parents… supervisor dr. Fayez… project mate … everyone who helped …

III

Abstract

- With the advent of low-cost personal computers and various easily accessible software packages, computer- aided tools have become an essential part of laboratory experiments in electrical machinery education .The computer models and simulations of induction motors illustrate easily steady-state operation of the motor under various loading conditions. The PSB is a useful software package to develop simulation models for power system applications in the MATLAB/SIMULINK environment with its graphical user interface and extensive library provides power engineers and researchers with a modern and interactive design tool to build simulation models rapidly and easily. The reason that MATLAB with its toolboxes was selected is that it is the main software package used in almost as a computation tool to reinforce electrical engineering experiment.

- Transient performance of any electrical machine is greatly affected by sudden changes in its supply system, operating speed, shaft load including any variations in moment of inertia due to gear arrangement applications. MATLAB/SIMULINK based modeling is adopted to compare the transient performance of three-phase including main flux saturation with and without the moment of inertia (MOI) of the system attached to the motor.

- This project describes some models of the three-phase induction motor and its computer simulation using MATLAB/SIMULINK. Constructional details of various sub-models for the induction motor are given and their implementation in SIMULINK is outlined.

IV

List of Contents Dedication …………………………………………………………………III Abstraction ………………………………………………………………...IV List of Contents………………………………………………………..……V Chapter one: introduction 1-1: Induction motor ………………………………………………………..... 1 1-1-1: Speed and slip …………………………………………………………..... 2 1-1-2: Conventional induction machine model..……………………………….... 3 1-1-3: Speed torque curves ………………………………………………….…….6 1-1-4: advantages & disadvantages of electrical braking over mechanical braking8 1-2: DC Motor…………………………...……………………………………9 1-2-1: Concept of DC Motor…………………………………………………….…9 1-2-2: Advantages of DC Motor…………………………………………….....…10 1-2-3: Disadvantages of DC Motor…………………………………………….…11

Chapter two: Electrical braking & Self Excitation 2-1: Introduction to electrical braking methods………. …………….………12 2-1-1: DC Injection Braking …………………………………………...... ….….13 2-1-2: Plugging…………………………………………………………………..15 2-1-3: dynamic braking ……………………………………………………….16 2-2: Self-Excitation…………………………………………………………16 2-2-1: Condition for self-excitation……………………………………………….17 2-2-2: Dynamic braking control methods………………………………...……….18 2-2-3: Capacitor load combination………………………………………………..18 2-2-4: Double separated capacitor combination…………………………………..19 2-2-5: Fixed capacitor with static synchronous compensator combination…….…20

Chapter three: DC Motor control with MCU 3-1: Direction control...... 21 3-2: Speed control...... 22 3-2-1: Delta modulation…………………………………………………...... 25

3-2-2: Delta-sigma modulation…………………………………………...... …25

3-2-3: Time proportioning ...... 26

V

3-2-4: Types of PWM ………………………………………………..…….26 3-2-5: Duty cycle…………………………………………………………….27 3-2-6: PWM generation……………………………………………………...29 3-2-7: Spectrum of PWM……………………………………………………31 3-2-8: Application of PWM………………………………………………….31

Chapter four: 4-1: Parameters influence on capacitor self-excited method……………….32

4-1-1: Capacitive reactive power influence………………………………..33 4-1-2: Inertia effects ...... 35 4-1-3: Friction factor effects……………… ……………………………….36 4-1-4: The effect of load (active power)…………………………………...37 4-1-5: Some odd values of parameters ……………………………………..38 4-2: Parameters effects on DC injection method ………………..….……40 4-2-1: DC injection without load ...... 40 4-2-2: DC injection with load………………………………………………..41

4-3: Parameters effects on magnetic braking method ………………………42 4-3-1: Magnetic braking without load………………………………..………42 4-3-2: Magnetic braking with load………………………………..…….……43 4-4: Optimum combination of the three methods to drive the machine to rest.43 4-5: Reclosing...... 44 4-5-1: Reclosing during the self excitation…………………………………..44 4-5-2: Reclosing out of the self excitation…………………………………...45

Chapter five: Conclusion and proposed future work 5-1: Conclusion …………………...……………………………….……47 5-2: Proposed future work………………………………………………48

References…………………………………………………………………... 49 Appendix 1……………………………………………………………….…..50 Appendix 2……………………………………………………………….…..51 Appendix 3…………………………………………………………………...52

VI

Chapter one Introduction

Chapter one Introduction

Motors provide motion. Whether rotational or linear, motors move people and machines, impacting every aspect of our daily lives. Electric motors are clean and relatively efficient for the tasks they perform when compared to pneumatic or hydraulic alternatives. Freescale's strong portfolio of cutting-edge motor control technologies, tools and expert support enables a wide variety of cost-effective and energy-efficient motor control applications.

Braking of motors is generally required when there is a need to bring a drive quickly to rest, to hold a drive at standstill after some operation has been completed, or to hold an overhauling load that tends to drive the machine above synchronous speed.

The principal ways of controlling the speed of a revolving load by mechanical brakes whereby the kinetic energy of the rotating masses is converted into heat, by arranging the motor itself to exert a braking torque, or a combination of the two methods.

With mechanical braking, a drum or disc friction-type brake is usual, the brake shoes being held off against spring loading by a solenoid or electrically-operated thruster gear normally connected across the motor terminals.

[1-1] INDUCTION MOTOR Before beginning of studying induction motor braking let's have a general view of Induction Machine.

Induction Machines are widely used because they are the simplest and most rugged

The main aspect which distinguishes the induction machine from other types of electric machines is that the secondary currents are created solely by induction, as in a

Simulation of motor braking control 1

Chapter one Introduction

transformer, instead of being supplied by a DC exciter or other external power source, through slip rings or a , as in synchronous and DC machines. Depending on the condition of operation, the induction machine can be used as a motor or generator.

Induction machines are available in single-phase or three-phase winding configurations. In this thesis the modeling and investigation is given only for the three-phase induction machine.

Figure1.1 AC induction motor

When the is excited from a balanced three-phase supply, the three phases together create a constant magnitude, synchronously revolving MMF or field in the air gap with a crest value 3/2 times the peak value of the alternating field due to one phase alone.

[1-1-1] speed & slip This field rotates around the air-gap at synchronous speed Ne, which can be calculated as

(1.1) Where - excitation frequency in cycles per second (Hz) - number of pole pairs - synchronous speed in revolutions per minute (rpm) Ne is also expressed as the rotational speed of the stator magnetic field, or mmf. The slip of a motor, s, which is defined as the slip of the with respect to the stator

Simulation of motor braking control 2

Chapter one Introduction

magnetic field, can be given as

(1.2a) Where Nr - the rotational speed of the rotor in rpm. If the speeds are expressed in radians per second the slip is given by

(1.2b) Where - synchronous speed in radians per second (rad/sec) - rotor speed in rad/sec.

[1-1-2] Conventional induction machine model The relative speed between the synchronous speed and the rotor speed is expressed in its

equivalent electrical speed as e- r or s ωe, where the electrical rotor speed is the product of the mechanical speed and the number of pole pairs. Rotation of the rotor changes the relationships between stator and rotor emfs. However, it does not directly change the inductance and resistance parameters. The angular frequency

of the induced current in the rotor is s e and the induced voltage in the rotor will be sEr, where Er is the induced voltage in the rotor when the rotor is stationary.

Figure 1.2 stator equivalent circuit Where - stator voltage, V - stator current, A - stator winding resistance,

- stator leakage inductance, H - induced emf in the stator winding due to the rotating magnetic field that links the stator and rotor windings, V

Simulation of motor braking control 3

Chapter one Introduction

s - stator current angular frequency, rad/sec

For constant stator flux the voltage induced in the rotor depends solely on the slip, which is the relative speed between the stator flux rotating at synchronous speed and rotor speed. Maximum induced voltage occurs in the rotor when the rotor is stationary. Without any external input on the rotor side, the rotor circuit is given by

Figure 1.3 rotor equivalent circuit Where s - induced voltage in the rotor, V - rotor current, A - rotor winding resistance, - rotor leakage inductance, H s - rotor current angular frequency, rad/sec. If all the terms in the rotor side are divided by the slip, s, a modified circuit is obtained as shown

\ Figure 1.4 rotor referred to stator

Using the appropriate voltage transformation ratio between the stator and rotor, the rotor voltage, Er, referred to the stator is then equal to Es, The stator and rotor circuits are linked because of the mutual inductance Lm. When all circuit parameters are referred to the stator, the stator and rotor circuits can be combined to give the circuit shown

Simulation of motor braking control 4

Chapter one Introduction

Figure 1.5 motor equivalent circuit In Fig 1.5 the core loss, which is due to hysteresis and eddy current losses, is neglected. It can be compensated by deducting the core loss from the internal mechanical power at the same time as the friction and winding losses are subtracted. The no load current in three- phase induction machines consists of the iron loss or core loss component and the magnetizing component. From the iron loss current component and from the applied voltage the equivalent resistance for the excitation loss can easily be calculated. There is also some core loss in the rotor. Under operating conditions, however, the rotor frequency is so low that it may reasonably be assumed that all core losses occur in the stator only. The core loss can be accounted for by a resistance Rm in the equivalent circuit of the induction machine. Rm is dependent on the flux in the core and frequency of excitation. For constant flux and frequency Rm remains unchanged. As Rm is independent of load current it is connected in parallel with the magnetizing inductance Lm. The equivalent circuit including Rm is shown

Figure 1.6 equivalent circuit including core losses

Simulation of motor braking control 5

Chapter one Introduction

[1-1-3] speed torque curves Speed-torque curves are useful for understanding motor performance under load.One way to evaluate whether the torque capabilities of a motor meet the torque requirements of the load is to compare the motor’s speed-torque curve with the speed-torque requirements of the load.

s=

=

=

=

T ……. for large [s] T ……. for small [s]

Figure 1.7 torque-speed characteristic

Simulation of motor braking control 6

Chapter one Introduction

One way to evaluate whether the torque capabilities of a motor meet the torque requirements of the load is to compare the motor’s speed-torque curve with the speed- torque requirements of the load.

Figure 1.8 torque-speed curve on loads

[1-1-4] advantages & disadvantages of electrical braking over mechanical braking: Advantages: • Electrical braking is smooth. • Electrical braking is more economical. • Mechanical braking produces metal dust, which can damage bearings. • Mechanical braking produces very high noise. • In regenerative braking energy can be returned back to supply. • If mechanical braking are not correctly adjusted it may result in shock loading of machine or machine parts in case of lifts, trains which may result in discomfort to the occupants. • Due to wear and tear of brake liner equipment adjustments are needed thereby making the maintenance costly.

Simulation of motor braking control 7

Chapter one Introduction

• In mechanical braking the heat is produced at brake liner or brake drum which may be a source of failure of the brake. In electrical braking the heat is produced at convenient place which is no way harmful to the braking system. • By employing electrical braking the capacitance of the system can be increased by way of higher speeds and haulage of heavy loads.

Disadvantage Limitations: • Since the motor has to function as a generator during braking period, therefore, it must have suitable braking characteristics Le. the choice of motor is limited. • In electrical braking the driving motor operates as a generator during the period of braking, and motor cents to operate as a generator at standstill so that although an electric brake can almost stop a machine or load, but it cannot bold it stationary therefore, a friction brake is required in addition • Additional complications, high initial cost, special motors capable of generating electrical energy, make electric braking costly.

[1-2] DC MOTOR

Recent advancement in microcontroller (MCU) technology allows motors to be controlled more efficiently and at a lower cost than ever before. This has accelerated the transition from electromechanical to electronic motor control. The MCU-controlled blushless DC motors eliminate the wear out mechanism and arcing. The advantages include higher efficiency, high torque-to-inertia ratios, greater speed capability, lower audible noise, higher thermal efficiency and lower EMI characteristics.

Simulation of motor braking control 8

Chapter one Introduction

[1-2-1] Concept of DC Motors

A DC motor is electromechanical device that converts electrical energy into mechanical energy that can be used to do many useful works. It can produce mechanical movement like moving the tray of CD/DVD drive in and out .This shows how software controls a motor. DC motors come in various ratings like 6V and 12V. It has two wires or pins. When connected with power supply the shaft rotates. The direction of rotation can be reversed by reversing the polarity of input.

Figure 1.9 general form of DC motor

[1-2-2] Advantages of DC Motors

• Easy to understand design

• Easy to control speed

• Easy to control torque

• Simple, cheap drive design

• Smaller than induction motors of same power

• Variable speed requires fewer components than induction motors

Simulation of motor braking control 9

Chapter one Introduction

[1-2-3] Disadvantages of DC Motors

• Expensive to produce

• Can't reliably control at lowest speeds

• Physically larger

• High maintenance

• Dust

• Cannot be used in some hazardous environments

• Louder than induction motors

Simulation of motor braking control 10 Chapter two Electrical Braking and Self-Excitation

Chapter two

Electrical Braking and Self-Excitation

[2-1] Introduction For safety reasons or for repeated duty cycles, it is sometimes desirable to brake the motor and its connected load. There are two types of braking: mechanical or electrical. For either one the speed of the rotating system is reduced by transforming the kinetic energy into another form of energy, dissipated through heat. In mechanical braking, the transformed energy turns into heat due to friction. In electrical braking, the transformed energy turns into heat due to joule Effect losses in the rotor bars. Mechanical braking is used to prevent rotor rotation or to maintain a fixed position at stand still. Electrical braking has a broader application when: the machine is an induction motor, i.e. generator and reverse rotation braking and DC braking.

When the induction motor is driven above synchronous speed, it acts as a generator. In this mode, the induction motor draws reactive power from the line for its excitation and it delivers real power to the line resulting in braking action on the rotor (regenerative braking) the mechanical energy is taken from the rotating part, transformed into electrical energy and transferred to the electrical distribution system. When the rotor speed goes beyond synchronous speed, the induction motor produces regenerative braking to lower the rotor speed below synchronous speed.

In the reverse rotation braking mode consist of any two phases of the stator windings are reversed.

This result in reversing the phase sequence and thus the direction of the rotation of the magnetic field. If a motor is operating at full load speed and any two stator leads are reversed, the magnetic will suddenly start rotating in the opposite direction of the rotor, which result in a rotor instantaneous braking. This method called “plugging” used widely in emergency cases.

Simulation of motor braking control 12 Chapter two Electrical Braking and Self-Excitation

The evaluation of braking needs starting from the mechanics .Typically, the requirement is to brake the mechanical system within a specified time, or there are sub-cycles in the process where the motor operates on the generator side at constant or slightly varying speed.

In this chapter we talk about different types electrical braking techniques according induction motors. For the AC machine we introduce for example:

 the dc injection braking  plugging for braking  dynamic braking using capacitors bank

Showing its characteristics, mechanism, common usage, the interconnection and the advantages, for each.

[2-1-1] DC Injection Braking

DC injection braking is a method of braking in which (DC) is applied to the stationary windings of an AC motor after the AC voltage is removed. This is an efficient and effective method of braking most AC motors. DC injection braking provides a quick and smooth braking action on all types of loads, including high-speed and high- inertia loads.

Figure 2.1 DC injection braking

Simulation of motor braking control 13 Chapter two Electrical Braking and Self-Excitation

Recalls that opposite magnetic poles attract and like magnetic poles repel. This principle, when applied to both AC and DC motors, is the reason why the motor shaft rotates.

By applying a DC voltage to the stationary windings once the AC is removed, a magnetic field is created in the stator that will not change polarity.

In turn, this constant magnetic field in the stator creates a magnetic field in the rotor. Because the magnetic field of the stator is not changing in polarity, it will attempt to stop the rotor when the magnetic fields are aligned (N to S and S to N).

Figure 2.2 DC injection braking

The only thing that can keep the rotor from stopping with the first alignment is the rotational inertia of the load connected to the motor shaft. However, because the braking action of the stator is present at all times, the motor is braked quickly and smoothly to a standstill.

Figure 2.3 Automatic dc injection braking

Simulation of motor braking control 14 Chapter two Electrical Braking and Self-Excitation

[2-1-2] Plugging

To reverse a motor all we need to do is reverse the sequence in which the Line Power is fed to the motor. This wiring change is accomplished by “swapping” two of the phases of power. In short, A motor wired with phases ABC to run forward, would have its phases wired CBA to run in reverse.

Figure 2.4 plugging

This method is used in applications were it is desirable to run a motor in both forward and reverse, reversing process can be done by one of two technique :

1- A Manual Reversing uses two interlocked manual motor starters. The operator has to physically (manually) engage the starters to put the motor in forward or reverse. 2- A Magnetically Reversing Starter uses interlocked electromagnetic starters. The motor can be reversed at the control panel (selector switches and pushbuttons) or remotely.

Simulation of motor braking control 15 Chapter two Electrical Braking and Self-Excitation

Figure 2.5 Reversing the Motor

[2-1-3]Dynamic braking Dynamic braking is one of important types of electrical braking using to brake induction motor. It is achieved by reconnecting a running motor to act as a generator immediately after it is turned off, rapidly stopping the motor. The generator action converts the mechanical energy of rotation to electrical energy that can be dissipated as heat in a resistor or stored as electrical in regenerative braking.

Dynamic braking will be studied in the next chapters and it will be applied using MATLAB/SIMULINK and using microcontroller for DC motor, results and figures are viewed later.

[2-2] Self-Excitation in induction motor

Introduction: Some times in induction motor braking we need to stop the machine gradually, for that dynamic braking using capacitance is required. But when we connect capacitance with a stator and disconnect the supply Self- excitation may occur depending on the value of capacitance. In choosing the capacitor value to perform the braking we must to consider some requirements: 1. Self-excitation is important to perform dynamic braking. 2. Effective braking required high capacitance.

Simulation of motor braking control 16 Chapter two Electrical Braking and Self-Excitation

Figure 2.6 speed curves over capacitance

3. Economically and, it is not advisable to choose the maximum value of capacitance. This is due to the fact that for the same voltage rating the higher capacitance value will cost more. 4. Technically, if the higher capacitance value is chosen then there is a possibility that the current flowing in the capacitor might exceed the rated current of the stator due to the fact that the capacitive reactance reduces as the capacitance value increases. - Because of these requirements we need to calculate and determine the minimum capacitance to satisfy self excitation.

[2-2-1] Condition for self excitation For self excitation, the total loop impedance seen by Is in each circuit will be equal to zero.

There are two solution techniques based on the steady-state equivalent circuit are: 1- Nodal Admittance Method This method considers the admittances connected across the nodes which define the air gap. By equating the sum of real parts to zero (which is equivalent to active power balance), a polynomial in „F‟ is obtained. „Xm‟ can be determined upon equating the sum of imaginary parts to zero, using the value of „F‟ obtained after solving the polynomial by any method among various methods as iterative method, secant method etc.

Simulation of motor braking control 17 Chapter two Electrical Braking and Self-Excitation

2- Loop Impedance Method For a given load and speed, two non-linear simultaneous equations in „F‟ and Xm are obtained by equating the real and imaginary terms of the complex loop impedances respectively to zero. These equations are then solved by using an optimization method. Knowing „F‟ and Xm and with the aid of the magnetization curve, the equivalent circuit is completely solved and the steady-state performance of the Self-Excitation can be determined.

[2-2-2] Dynamic braking control Methods

Some time we need to control the value of capacitor required , because of any conduction or variation with the system .We have different combinations to control dynamic braking

based on : 1. varying the value of capacitor 2. varying the required capacitor by varying the circuit characteristic

[2-2-3] capacitor load combination:

Figure 2.7 capacitor load combination

We use this combination to control required capacitor varying the circuit characteristic (magnetization characteristic), the below figures describes the effect of load in magnetization curve.

Simulation of motor braking control 18 Chapter two Electrical Braking and Self-Excitation

-

Figure 2.8

[2-2-4] double separated capacitor combination:

Figure 2.9 double separated capacitor combination

This combination used to control by varying the value of applied capacitor (fixed capacitor) by adding reserve capacitor to cover the base capacitor. The disadvantage of this method is the deterministic value of capacitance and to develop this scheme we can add more than one reserve capacitor or using variable capacitor.

Simulation of motor braking control 19 Chapter two Electrical Braking and Self-Excitation

[2-2-5] fixed capacitor with static synchronous compensator combination:

Figure 2.10 fixed capacitor with static synchronous compensator

This method is the most use combination to control by varying the value of applied capacitor (fixed capacitor) by adding reserve capacitor to cover the base capacitor. In this method three variable capacitors represent by single dc capacitor and inverter, controlling the value of reserve capacitor by a logical control which control thyristors.

Simulation of motor braking control 20 DC motor control with MCU Chapter three

Chapter three DC motor control with MCU

[3-1] Direction control using H-bridge

The name "H-Bridge" is derived from the actual shape of the switching circuit which controls the motion of the motor. It is also known as "Full Bridge".

There are four switching elements named as "High side left", "High side right", "Low side right", "Low side left". When these switches are turned on in pairs motor changes its direction accordingly. This is shown in figure 4.1:

Figure 3.1

A small truth table can be made according to the switching of H-Bridge explained in table3.1.

H-bridge can be made with the help of transistors as well as MOSFETs, the only thing is the power handling capacity of the circuit. If motors are needed to run with high current then lot of dissipation is there. So head sinks are needed to cool the circuit.

Simulation of motor braking control 21 DC motor control with MCU Chapter three

Truth Table High Left High Right Low Left Low Right Description On Off Off On Motor runs clockwise Off On On Off Motor runs anti-clockwise On On Off Off Motor stops or decelerates Off Off On On Motor stops or decelerates Table 3.1 H-bridge states

[3-2] Speed Control

The speed of DC motor can also be controlled with MCU. PWM or pulse width modulation technique is used to digitally control speed of DC motors.

In any electric motor, operation is based on simple and most common DC motors the external magnetic field is produced by high-strength permanent .

Every DC motor has six basic parts :

Axle, rotor (), stator, commutator, field (s), and brushes.

Pulse-width modulation (PWM), or pulse-duration modulation (PDM), is a commonly used technique for controlling power to inertial electrical devices, made practical by modern electronic power switches.

The PWM switching frequency has to be much faster than what would affect the load, which is to say the device that uses the power. Typically switching have to be done several times a minute in an electric stove, 120 Hz in a lamp dimmer, from few kilohertz (kHz) to tens of kHz for a and well into the tens or hundreds of kHz in audio amplifiers and computer power supplies.

Simulation of motor braking control 22 DC motor control with MCU Chapter three

The main advantage of PWM is that power loss in the switching devices is very low. When a switch is off there is practically no current, and when it is on, there is almost no voltage drop across the switch.

PWM also works well with digital controls, which, because of their on/off nature, can easily set the needed duty cycle.

PWM has also been used in certain communication systems where its duty cycle has been used to convey information over a communications channel.

A simplified example of pulse-width modulated (PWM) voltage supply to a magnetic circuit. The voltage in a magnetic circuit is proportional to the rate of change of the flux density.

Since DC motors are closed loop control, it always has feedback from the motor. Some motor has rotor position sensors (hall sensors), and some are sensor less. For the hall sensors, Position Detect Circuit in Multi-pulse

Generator is used to detect the edge/level of the position input (SNI2~0) to detect the rotor position of the DC motor.

Figure 3.2 a pulse wave

Pulse-width modulation uses a rectangular pulse wave whose pulse width is modulated resulting in the variation of the average value of the waveform.

If we consider a pulse waveform f (t) with a low value ymin, a high value ymax and a duty cycle D, the average value of the waveform is given by:

Simulation of motor braking control 23 DC motor control with MCU Chapter three

As f (t) is a pulse wave, its value is ymax for and ymin for . The above expression then becomes:

This latter expression can be fairly simplified in many cases where ymin = 0 as . From this, it is obvious that the average value of the signal ( ) is directly dependent on the duty cycle D.

Figure 3.3 PWM pulse train

The signal is compared with a saw tooth waveform .When the latter is less than the former, the PWM signal is in high state (1). Otherwise it is in the low state (0).

The simplest way to generate a PWM signal is the intersecting method, which requires only a saw tooth or a triangle waveform (easily generated using a simple oscillator) and a comparator.

Simulation of motor braking control 24 DC motor control with MCU Chapter three

[3-2-1] Delta modulation

In the use of delta modulation for PWM control, the output signal is integrated, and the result is compared with limits, which correspond to a reference signal offset by a constant. Every time the integral of the output signal reaches one of the limits, the PWM signal changes state.

Figure 3.4 Principle of the delta PWM

[3-2-2] Delta-sigma modulation

In delta-sigma modulation as a PWM control method, the output signal is subtracted from a reference signal to form an error signal. This error is integrated, and when the integral of the error exceeds the limits, the output changes state.

Figure 3.5 Principle of the sigma-delta PWM

Simulation of motor braking control 25 DC motor control with MCU Chapter three

[3-2-3] Time proportioning

Many digital circuits can generate PWM signals (e.g. many microcontrollers have PWM outputs).

They normally use a counter that increments periodically (it is connected directly or indirectly to the clock of the circuit) and is reset at the end of every period of the PWM.

When the counter value is more than the reference value, the PWM output changes state from high to low (or low to high). This technique is referred to as time proportioning, particularly as time-proportioning control– which proportion of a fixed cycle time is spent in the high state.

[3-2-4] Types of PWM

Figure 3.6 Three types of PWM signals

Leading edge modulation (top), trailing edge modulation (middle) and centered pulses (both edges are modulated, bottom). The green lines are the saw tooth waveform (first and second cases) and a triangle waveform (third case) used to generate the PWM waveforms using the intersecting method.

Three types of pulse-width modulation (PWM) are possible:

1. The lead edge can be held at the lead edge of the window and the tail edge modulated.

Simulation of motor braking control 26 DC motor control with MCU Chapter three

Figure 3.7

2. The tail edge can be fixed and the lead edge modulated. 3. The pulse repetition frequency can be varied by the signal, and the pulse width can be constant. However, this method has a more-restricted range of average output than the other two.

A digital device, like a microcontroller can only generate two levels on its output lines, HIGH=5v and LOW=0V.

In the figure 3.7 a PWM signal. It is just a digital signal (can easily be generated by MCUs).

From the figure:

 The signal remains "ON" for some time and "OFF" for some time.  Ton = Time the output remains high.  Toff = Time the output remains Low.  When output is high the voltage is 5v'  When output is low the voltage is 0v  T = Time Period = Ton + Toff

[3-2-5] Duty cycle

It is defined by

Simulation of motor braking control 27 DC motor control with MCU Chapter three

Figure 3.8 A PWM Waveform. Duty Cycle = 12.5%

The percentage of the total time the output was high. In 4.8 Ton = Toff = Half of the time period. So the duty cycle is 50%. If the frequency of such wave is sufficiently high (say 500 Hz) the output half of 5v i.e. 2.5 volts. Thus if this output is connected to a motor (by means of suitable drivers) it will run at 50% of its full speed at 5v.

Figure 3.9 A PWM Waveform. Duty Cycle = 75%

Generation of PWM signals is such a common need that all modern microcontrollers like AVR have dedicated hardware for that. The dedicated hardware eliminates the load of generation of PWM signal from software (thus frees the CPU).

The PWM hardware with start delivering the required signal from one of its PINs while the CPU can continue with other tasks.

Simulation of motor braking control 28 DC motor control with MCU Chapter three

In AVR microcontrollers PWM signals are generated by the TIMER units. There are two methods by which you can generate PWM from AVR TIMER0 (for ATmega16 and ATmega32 MCUs):

1. Fast PWM 2. Phase Correct PWM

[3-2-6] PWM Generation

TIMER0 for PWM generation.(Note TIMER0 of ATmega8 cannot be used for PWM generation, these are valid for ATmega16 and ATmega32).

We have a 8bit counter counting from 0-255 and the goes to 0 and so on.

Figure 3.10 AVR Timer Count Sequence for Fast PWM

The period depends upon the pre scalar settings. Now for PWM generation from this count sequence we have a new "friend" named OCR0 (Output Compare Register Zero).

The value between 0-255 in OCR0, for example 64 in OCR0 then it would appear in the graph as follows

Simulation of motor braking control 29 DC motor control with MCU Chapter three

Figure 3.11 AVR Timer Count Sequence for Fast PWM with OCR0=64

When the TIMER0 is configured for fast PWM mode, while up counting whenever the value of TIMER0 counter (TCNT0 register) matches OCR0 register an output PIN is pulled low (0) and when counting sequence begin again from 0 it is SET again (pulled high=VCC). This is shown in the figure 3.11. This PIN is named OC0.

Figure 3.12 AVR Timer Count Sequence for Fast PWM with OCR0=64

From figure 3.12 a wave of duty cycle of 64/256 = 25% is produced by setting OCR0=64.

Simulation of motor braking control 30 DC motor control with MCU Chapter three

[3-2-7] Spectrum of PWM

The resulting spectra (of the three cases) are similar, and each contains a DC component, a base sideband containing the modulating signal and phase modulated carriers at each harmonic of the frequency of the pulse.

- On the contrary, the delta modulation is a random process that produces continuous spectrum without distinct harmonics.

[3-2-8] Applications of PWM

1- Telecommunications.

2- Power delivery.

3- Light dimmers.

4- Electric cookers.

5- Voltage regulation.

6- Audio effects and amplification.

The simulation block of DC motor control using PROTUES is discussed in the appendix (Appendix3).

Simulation of motor braking control 31 Chapter four Results & Discussion

Chapter four Results and Discussion

Introduction

This chapter presents simulation results for the effect of machine static loads and machine parameters on the braking behavior of a three-phase induction motor under three different operating methods using MATLAB/SIMULINK. These are the capacitor excited method, the dynamic short circuit method and the DC injection method. The simulation blocks are shown in the appendix (Appendix1) and (Appendix2).

[4-1] Parameters influence on capacitor self-excited method

The results obtained in Figure 1 for the multistage capacitor-excited braking represent the base case for investigating the influence of machine, static load and capacitance effects. The parameters for this case are as follows:

J (inertia) = 0.089 kg.m2

B (friction factor) = 0.01N.m.s

Load active power P (power) = 0 Watt

Exciting Capacitive VARs [Qc1= 3000 Qc2=3000 Qc3=3000] VAR

As can be seen from the MATLAB block diagram, the simulation run is executed for two identical machines where the second machine for which the violet curve represents is introduced as a base case of a machine falling under friction braking, and the yellow curve shows the machine falling under multistage capacitor-self-excited braking, the second machine was under our study.

Simulation of motor braking control 23 Chapter four Results & Discussion

Figure 4.1 general form of speed curve for Self-excited multistage capacitor method compared to under friction method

Figure 4.2 rotor and stator currents for braking using multistage

[4-1-1] capacitive reactive power influence Braking using only one stage:

Figure 4.3 [Qc1=9000 Var Qc2 and Qc3 are not used ]

Simulation of motor braking control 22 Chapter four Results & Discussion

Figure 4.4 rotor and stator currents for braking using one stage

The use of multi-stage braking method instead of one capacitance bank of the same equivalent capacitive Vars provides many benefits. The main two benefits: (1) The first is technical and concerned about the machine life time and safety; when using one grand capacitance bank there will be a dangerous dynamic on both starting and braking operations also very high currents on winding. (2) The second one is economical; its more feasible to manufacture and practical to use banks of 3000 VAR than ones of 9000VAR.

Figure 4.5

[Qc1= 500 Qc2=500 Qc3=3000] VAR

Simulation of motor braking control 23 Chapter four Results & Discussion

In figure 4.5 the value of the third capacitive reactive power (Qc3) is much more than

(Qc1 and Qc2) so the two curves are the same until the third capacitive reactive power

(Qc3) enters with its large value and makes the difference and reduce the speed obviously, bringing the initial braking speed to nearly half the rated speed.

Figure 4.6

[Qc1= 10000 Qc2=10000 Qc3=10000] VAR In figure 4.6 the large value of the first capacitive reactive power (Qc1) was enough to perform the task of braking without need for the second and the third capacitive reactive power (Qc2, Qc3). [4-1-2] Inertia effects

2 Figure 4.7 [J= 1 kg.m , B= 1 N.m.s, Qc = 10000 Var /bank, P= 0 Watt]

Simulation of motor braking control 24 Chapter four Results & Discussion

In figure 4.7 the inertia = unity so the speed of the machine does not reach the rated speed (1800rpm) and the braking is very fast. Although the values of other parameters are large too, the effect of inertia is more than the effect of the other parameters.

2 Figure 4.8 [J= 1kg/m , B= 0 N.m.s , Qc = 500 Var/bank] [P= 150 Watt]

In figure 4.8 the value of inertia is still = unity, but the other parameters were changed and the behavior of the speed curve looks like that in figure 4.7, this means: when the inertia = unity, it governs the speed curve and the effects of other parameters do not appear. [4-1-3] Friction factor effects

2 Figure 4.9 [J= 1kg.m , B= 0 N.m.s ,Qc = 10000 Var/bank] [ P= 0 Watt]

Simulation of motor braking control 25 Chapter four Results & Discussion

2 Figure 4.10 [J= 0.9kg.m , B= 0 N.m.s, Qc = 10000 Var/bank]

[ P= 1500 Watt]

In figure 4.9 and figure 4.10 there is no friction (friction factor = zero) so there is no braking, the speed does not reach the rated speed and the braking does not take place because of the absence of the friction.

[4-1-4]The effect of load (active power)

2 Figure 4.11 [J= 0.01kg.m , B=0.01N.m.s, Qc = 500 Var/bank]

[P= 0 Watt]

Simulation of motor braking control 26 Chapter four Results & Discussion

In figure 4.11 it is obvious the two curves are identical, the load is set to be zero and the other parameters are set to be as moderate as possible (not odd values).The effect of the load increasing is shown in the next figure.

2 Figure 4.12 [J= 0.01kg.m , B=0.01N.m.s, Qc = 500 Var/bank]

[P= 1500 Watt]

In figure 4.12 the two curves are not identical because of the increasing of the load. This means the increasing of the load leads to fast baking or reduce the braking time. The presence of load makes the difference of this figure compared to figure 4.11.

[4-1-5]Some odd values of parameters

(I) very large capacitance:

2 Figure 4.13 [J= 0.01kg.m , B=0.01N.m.s, P= 0 Watt] Qc =1000000 VAR/bank

Simulation of motor braking control 27 Chapter four Results & Discussion

In figure 4.13 the capacitance is set to be large value and the other parameters are set to be small to cancel their effects on the speed curve. From the figure the value of speed does not reach the rated value because of the large value of the capacitance, and this large capacitance consume the most amount of voltage and the motor cannot rotate at high speed because the most amount of energy is consumed by the large capacitance.

Figure 4.14 [J= 0.01kg.m2, B=0.01N.m.s, P= 0 Watt]

Qc= 250000 VAR/bank

In figure 4.14 the capacitance decreases from 1000000VAR/bank in figure 4.13 to 250000VAR, this increases the speed value because the amount of energy that consumed by the capacitance is decreased as a result of capacitance decreasing.

Simulation of motor braking control 28 Chapter four Results & Discussion

(II) Torque Loading

Figure 4.15 [J= 0.01kg.m2, B=0.01N.m.s, P= 0 Watt]

Load torque = 10 N.m

In figure 4.15 the load torque is set to have a relatively large value, this has a result of making the machine rotate in the opposite direction of rotation after it reaches the rated value of speed and it reaches to zero before the other machine that under friction braking.

[4-2] Parameters effects on DC injection method

[4-2-1] DC injection without load:

Figure 4.16 [J= 0.01kg.m2, B=0.01N.m.s [P= 0 Watt]

Simulation of motor braking control 34 Chapter four Results & Discussion

In figure 4.16 the DC injection braking method is shown without load applying, the two curves are identical until the DC injection braking is applied after 3.5 seconds then the machine stops rotating directly and the speed of the rotating becomes zero after very short time from applying the DC injection braking (approximately = zero).

[4-2-2] DC injection with load:

Figure 4.17 [J= 0.01kg.m2, B=0.01N.m.s]

[P= 100 Watt]

In figure 4.17 we have three periods of time:

(a) Time from 0s to 1s: the two curves are approximately identical from the starting at 0s to turning the supply of at 1s.

(b) Time from 1s to 3.5 s (from turning the supply of to applying the DC injection braking): the effect of load presence is obvious at this period and the speed of the motor is less than the other that under friction due to load increasing.

(c) Time after 3.5 s: at this period the effect of DC injection braking appears and the machine stops directly, in this period the effect of load disappears because

Simulation of motor braking control 34 Chapter four Results & Discussion

of the effect of the DC injection braking which covers (cancel) the effect of load increasing.

[4-3] Parameters effects on magnetic braking method

[4-3-1]Magnetic braking without load:

Figure 4.18 [J= 0.01kg.m2, B=0.01N.m.s]

[P= 0 Watt]

- In figure 4.18 we have two periods of time:

(a) Time from 0s to 3s: the two curves are typical.

(b) Time after 3s (short circuit applying time): the effect of the magnetic braking appears, but this effect is not obvious enough compared to other types of braking.

Simulation of motor braking control 33 Chapter four Results & Discussion

[4-3-2]Magnetic braking with load:

Figure 4.19 [J= 0.01kg.m2, B=0.01N.m.s]

[P= 100 Watt]

In figure 4.19 the effect of the load appears from the beginning to the end of figure and this effect eliminates the effect of the magnetic braking which is not obvious with the presence of load.

[4-4] Optimum combination of the three methods to drive the machine to rest

2 Figure 4.20 [J=0.089kg. m ,B= 0.01N.m.s, Qc=3000var/bank VD.C=100v]

Simulation of motor braking control 32 Chapter four Results & Discussion

In figure 4.20 the three methods are applied sequentially to drive the motor to rest to avoid dangerous dynamics which occurs when applying D.C injection.

In this figure we have three periods of time:

(a) From 0s to 2.2s: the multi-stage self excited capacitors applied.

(b) From 3s to 3.5 s: magnetic braking is applied.

(c) At 3.5s: D.C injection is applied to stop the machine.

[4-5]Reclosing

The following simulation plots examine the transients that would occur following supply re-closure on a self-excited machine-capacitor combination with falling speeds due to supply interruption.

[4-5-1]Reclosing during the self excitation

The supply returns after 2s (during the self excitation)

Figure 4.21 rotor and stator current

Simulation of motor braking control 33 Chapter four Results & Discussion

2 Figure 4.22 [J= .089kg/m , B= 0.01 N.m.s, Qc = 3000 VAR/bank] [P= 0 Watt]

Figures 4.21 and 4.22 show the transient rotor and stator currents and the speed following supply reconnection after 2s during the second stage with 3000Vars/bank connected across the machine so that self-excitation is guaranteed.

[4-5-2]Reclosing out of the self excitation

The supply returns after 4s

Figure 4.23 rotor and stator currents

Simulation of motor braking control 34 Chapter four Results & Discussion

2 Figure 4.24 [J= .089kg/m , B= 0.01 N.m.s, Qc = 3000 VAR/bank] [P= 0 Watt]

Figures 4.23 and 4.24 show the current transients and the speed following supply reconnection after 4s during the third stage with capacitive Vars of 3000 connected. Noting the improvement in speed performance, a recommendation for the amount of capacitive Vars can be made based on the possible reclosing times.

Stages times:

(1) The first stage: from 1s to 1.6 s.

(2) The second stage: from 1.6 s to 2.2 s.

(3) The third stage starts at 2.2 s.

Simulation of motor braking control 35 Chapter five Conclusions

Chapter five Conclusion & proposed future work

[5-1] Conclusion:

The objective of this project was to observe the behavior of induction motor braking under different states and different values of machine parameters using MATLAB/SIMULINK. And develop a way to control the speed and direction of DC motor with microcontroller

SIMULINK is a powerful software package for the study of dynamic and nonlinear systems. Using SIMULINK, the simulation model can be built up systematically starting from simple sub-models. The induction motor model developed may be used alone, as in the direct-on-line starting example presented, or it can be incorporated in an advanced motor drive system. We believe that SIMULINK will soon become an indispensable tool for the teaching and research of electrical machine drives.

Electric braking of induction motor has advantages over mechanical braking. There are many ways of braking motor electrically, however each has its usage according to the application which applied on and the purpose of braking, e.g. plugging is used when instantaneous stop is needed. For self-excitation using capacitor it is not advised to choose the maximum value on either economical or technical points of view. The capacitive braking systems make use of the well known self-excitation of the machine. The requirements were automation of the initialization process as well as the recording with different capacitors and static loads of braking variables in terms of speeds, frequencies, currents and voltages. These would employ interfacing equipment and techniques to a PC.

Simulation of motor braking control 74 Chapter five Conclusions

[5-2] Future work:

In the future it will be very important to develop interface for the whole control schemes with the computer using HMI programs, lab view or other simulation software to record characteristics of braking variables for transient state.

With the availability of solution algorithm, these should be applied for the transient and steady state analysis of the braking variables which must be recorded using the correct sensors for interfacing to a PC.

Simulation of motor braking control 74 References

References:

[1] Paul C. Krause, O. Wasynczuk and S. D. Sudhoff. 2004. Analysis of Electric Machinery and Drive Systems. IEEE Press Series on Power Engineering, John Wiley and Sons Inc. Publication. [2] 1994. The MATLAB compiler user‘s guide, in Mathworks Handbook. Math Works. [3] Levy W. et al. 1990. Improved models for the simulation of deep bar induction motor. IEEE Trans. on Energy Conversion. 5(2): 393-400. June. [4] Ghani, S. N., ‗Digital computer simulation of three-phase induction machine dynamics — a generalized approach‘, IEEE T rans Industry Appl., Vol. 24, No. 1, pp. 106–114 (1988). [5] Using SIMUL INK, Dynamic System Simulation for MAT L AB, The Mathworks Inc. (1997). [6]C.R. Nave, Department of Physics and Astronomy, Georgia State University. How does an electric motor work? In: Hyperphysics, Electricity and Magnetism. 2005. [7]Rodwell International Corporation. Basic Motor Theory. On: Reliance Electric Motor Technical Reference home page, 1999. [8] Muhammad H. Rashid, ―Power Electronics‖, Prentice Hall International Inc., New Jersey, 1996. [9] MALINOWSKI M., KAZMIERKOWSKI M. P., HANSEN S., BLAABJERG F., MARQUES G. D., Virtual-Flux-Based Direct Power Control of Three-Phase PWM , IEEE Transactions on Industry Applications, vol.37, no.4, July/August 2001. [10] H. A. Smolleck, ―Modeling and analysis of induction machine: A computational / experimental approach,‖ IEEE Trans. Power Syst., vol. 5, pp. 482–485, May 1990.

Simulation of motor braking control 94 APPENDICES

APPENDIX 1: Selfexc_Shunt_Cap_Shunt_Load_[Dynamic Braking]With SIMULINK

05 APPENDICES

APPENDIX 2: Selfexc_Shunt_Cap_Shunt_Load_ [Dynamic-Magnetic-Dc Injection Braking] With SIMULINK

05 APPENDICES

APPENDIX 3: Dc Motor Control Using MCU With PROTUES

05