Cascade control of DC brushed motor


Master's Thesis, 2014
69 Pages, Grade: Distinction

Excerpt

Table of Contents

INTRODUCTION

HARDWARE
DC motor test rig
Flexible Inverter Board
RL Load and Current Clamp
dsPIC30F3010 microcontroller
In-circuit debugger unit (ICD3)

SOFTWARE
MPLAB X IDE
LABVIEW
MATLAB
Project Stages

BACKGROUND THEORY
Permanent Magnet DC Motor
Mathematical Model of PMDC Motor
Electrical Characteristics
Mechanical Characteristics

MATLAB simulation PMDC motor
H-Bridge
Four – Quadrant (4Q) operation of DC motor
Cascade speed control of Permanent DC Motor
Current Loop
Speed Loop
Optical Encoder

ADC CONVERSION
C Code
Experimental Results
CONTROL of LEG A and LEG B of H-BRIDGE
LEG-A of H-Bridge
LEG-B of H-Bridge
Role of Gate Driver IC IR2130
C Code

Experimental Results

UNIPOLAR PWM SWITCHING OF H-BRIDGE
Experimental results
CURRENT CONTROL

Experimental results

SPEED CONTROL
Experimental result
INNER CURRENT LOOP
Inner current Loop C Code
Experimental Results

OUTER SPEED LOOP
Outer speed loop C Code
Experimental result

CONCLUSION

REFERENCE

APPENDIX

A] Complete C Code for Cascade Control

B] LABVIEW PANELS

ABSTRACT

The aim of this project is to control speed of permanent magnet DC motor by using technique called cascade control. In this project the working of PMDC motor, H-bridge using unipolar switching scheme, PI controller in current loop and speed loop of cascade control is first studied by simulating in MATLAB software and after that practically applied cascade control on PMDC motor using flexible inverter board. In this project dsPIC30F3010 is programmed and armature current and armature voltage is controlled by inner current loop and outer speed loop of coascade control. In this project investigation of effect of anti-windup C code on drive performance is done. The flexible board has microcontroller, current sensor and H-bridge circuit on it which will be used to supply voltage to PMDC motor. As a PMDC motor, DC motor rig is used which has two identical DC motor coupled together and one motor have encoder fitted on it and other motor have tacho-generator fitted on it.

INTRODUCTION

The aim of this project is to control the speed of permanent magnet brushed DC motor. Figure-1 shows the simplified internal structure of permanent magnet DC motor. All DC motor is made up of rotating part called rotor and stationary part called stator. The working of brushed DC motor depends on maintaining armature MMF at 90 degrees by using brushes and commutators in order to maximise output torque. [1]

illustration not visible in this excerpt

Fig – 1) Stator and rotor of PMDC motor [2] DRIVE NOTES

By using H-bridge converter, the variable voltage source can be supplied to DC motor in order to vary the speed of motor. This technique can be used in application which requires motor to operate at variable speed. The H-bridge can be operated by using pulse width modulation (PWM) technique to operate DC motor at variable voltage. The DC motor performance is better when H-bridge is operated by unipolar PWM switching technique as compared to bipolar switching technique. The Figure-2 shown below shown simplified diagram of H-bridge. [1]

illustration not visible in this excerpt

Fig – 2) H-bridge diagram [1]

In many applications it is important to control and maintain speed where load torque varies and one technique to control and maintain speed is called cascade control system. In cascade control system, there are two loops, inner current loop and outer speed loop. During a stall or rapid transient condition, current loop protects the DC motor from over-current fault tripping. The outer speed loop maintains the speed in varying load torque by controlling the demand current which fed in inner current loop. The figure-3, shows diagram of cascade speed control of DC motor. [1]

illustration not visible in this excerpt

Fig – 3) Cascade control of DC motor [1]

HARDWARE

DC motor test rig

illustration not visible in this excerpt

Fig – 4) DC motor test rig [1]

This project is all about implementing a digital cascade speed control on DC motor and as DC motor, DC motor test rig is used as shown in Fig-4. The motor rig contents two motor of same specifications which are coupled together as shown in figure. The DC motor is attached with optical encoder which gives signal of some frequency and that frequency is directly proportional to speed of DC motor. On other hand, load DC motor is attached tacho-generator which generates DC voltage which is also proportional to speed of load DC motor. Since shaft of both DC motor and load DC motor are coupled together, they should rotate with same angular velocity and thus frequency of encoder signal and voltage generated by tacho-generator should indicate same angular speed of DC motor. [1]

Flexible Inverter Board

In this project, the Flexible inverter board is used, which consists of H-bridge and digital control system on it. The figure-5 shows the picture of flexible inverter board. On flexible inverter board, there are 3-phase MOSFET bridge power circuit, two out of three MOSFET bridge will be used to make H-bridge for controlling DC motor. The board also consists a gate driver IC IR2135, dsPIC30F3010 microcontroller and 3 current sensors LTS 6-NP, out which one is used in inner current loop. The figure-6, shows the flexible inverter board connection diagram. In this figure, U2 connector is used to program dsPIC30F3010 microcontroller, J2 connector is used to send and receive data from PIC to LABVIEW software interface, J9 connector is used to get encoder signal from optical encoder to microcontroller, J20 and J24 connector is used to power the flexible inverter board and DC motor is connected from J13 connector which is also output voltage of H-bridge. [1]

illustration not visible in this excerpt

Fig – 5) Flexible inverter board [1]

illustration not visible in this excerpt

Fig – 6) Connection diagram of flexible inverter board [1]

RL Load and Current Clamp

In this project, RL load is used which made up of three 47 Ohms resistor and three 3.3 mH inductor connected in star formation. The Fig-7(right) shows picture of RL load. This RL load is used in project in initial stage to check the flow of current, before connecting DC motor. In this project, current clamp is also used to observe current waveform on oscilloscope and measure current ripple and average value of current. The figure-7(left) show the picture current clamp used in this project.

illustration not visible in this excerpt

Fig – 7) Current clamp (left) [3] and RL load (right)

dsPIC30F3010 microcontroller

For implementation of digital cascade speed control on DC motor, dsPIC30F3010 microcontroller is used on flexible inverter board. The microcontroller dsPIC30F3010 receives analogue signal from current sensor LTS-6NP and digital signal from optical encoder as current feedback and speed feedback signal respectively to imply digital cascade control on DC motor. This microcontroller have different type of unit inside it which is shown in figure-8 in simplified diagram. The ADC converter is used to convert analogue signal from trimpot (R22) and LTS6NP current sensor to corresponding digital signal. The memory unit is where C program is stored in hex format. CPU unit is a place where all athematic calculation and logical calculation are done. The encoder unit is a place where microcontroller reads the frequency of optical encoder and PWM unit is a place where microcontroller sends signals to gate driver IC IR2130 to control H-bridge. [1]

illustration not visible in this excerpt

Fig – 8) dsPIC30F3010 pic on flexible inverter board [1]

illustration not visible in this excerpt

Fig – 9) ISR timing diagram [1] [2]

Usually, the timing of ADC conversion and controller PWM interrupt are synchronise in applications like motor speed control. In such application, PWM interrupt triggers ADC conversion interrupt and when ADC conversion is finished, ADC interrupt triggers other control interrupt like transmit and receive interrupt (to send and receive data from LABVIEW software panel) and encoder signal interrupt (to capture encoder signal and calculated current speed of DC motor). After all these interrupt functions are completed, dsPIC30F3010 calculates modulation index value for PWM and applies that value in next PWM cycle. The figure-9 shows the timing diagram of dsPIC30F3010. [1]

In-circuit debugger unit (ICD3)

In-circuit debugger unit is used to program the dsPIC30F3010 microcontroller by connecting PC and flexible inverter board (U2 connector) using USB link (as shown in figure-10). The in-circuit debugger unit (IC3) has feature to debug the C language program which is used to program microcontroller, which mean after programming microcontroller, the code can be checked line by line and effect of every line of code can be observed and this allow us to change the code to make microcontroller work properly. [1]

illustration not visible in this excerpt

Fig – 10) Picture of IC3 debugger unit [4]

SOFTWARE

MPLAB X IDE

The manufacturer of dsPIC30F03010, Microchip has developed software called MPLAB X, to write, modify and run C language program in microcontroller dsPIC30F3010. This software MPLABX runs on PC and communicates with flexible inverter board via IC3 unit (which has been describe in hardware section). The work of this software is convert C language into assembly language using complier (small software inside MPLAB) like C16 and then convert it to machine code. The main reason converting C language into hex file is that microcontroller only understand binary form and hex file is in binary form which hard for engineer to understand and on other hand C language is easy to understand by engineer but microcontroller cannot understand C language so it needs to be converted into binary form which is called hex file. Another work of complier is to indicate error in C language in process called build, so if there is no error in C code the complier shows message called “ build successfully” after completing build process and convert C code in assembly language and this process is called make. [1]

LABVIEW

The LABVIEW software is created by national instruments manufacturer. This software is used to receive data like digital format current sensor values, digital format potentiometer voltage value, PDC1 and PDC2 register value and rpm value which is used by microcontroller to calculate speed while C program is running. This data is send by transmit interrupt function in C language code. The use of LABVIEW is to send data like duty cycle (in open loop), current demand (while checking working current loop) and speed demand (while check speed loop). This data is send by receive interrupt function in C language code. This allows to see whether or not DC motor and digital cascade control is working properly.

MATLAB

MATLAB software is used to simulate permanent magnet DC motor, H bridge, current loop and speed loop. By simulation DC motor model, the behaviour and working of DC motor can be analysed in order to implement digital cascade control. By simulation of H-bridge, unipolar PWM switching technique can be understood and analysed. By simulation current control, kp (proportional gain) and ki (integral gain) for PI controller in current loop can found and can be checked whether or not actual current does not exceed demand current in any condition. By simulation of speed loop, kp (proportional gain) and ki (integral gain) for PI controller in speed loop can found and error in actual and demand speed can be found. MATLAB is also used to plot graph for better understanding of concepts.

Project Stage s

This project is divided into seven major steps in order to monitor and record the progress of project. These steps are made to build and experiment the control system.

- Familiarising with C programming, developing software MPLAB and system control software LabVIEW.
- C code for ADC input to set the modulation index of output of leg A of H-brigde and monitor PWM1L and PWM1H on the oscilloscope to check the adjustment of duty ratio of the PWM channel using R22 and also confirming similar operation for the leg B of drive.
- Developing C program for unipolar PWM and confirming the control of DC current flow and magnitude using trim-pot by connecting RL load to the drive.
- Developing C code for sampling the armature current and displaying it on LabVIEW panel and confirming the control of motor by H Bridge and trimpot by replacing RL load by DC motor and monitoring output voltage from tacho-generator with DVM. Activate code to allow monitoring of the encoder position on LabVIEW panel. Calibrate the output from the tacho-generator against the speed.
- Develop C code for implementing a PI controller for armature current loop and prevent integrator windup and test Drive performance using RL load and then DC motor.
- Develop C code for implementing a PI controller for speed control loop cascaded with armature current loop with anti-windup code in it and then testing performance of drive using DC motor
- Investigate alternative approaches to the speed control and implementing on hardware. [1] [5]

BACKGROUND THEORY

Permanent Magnet DC Motor

illustration not visible in this excerpt

Fig – 11) Simplified diagram of PMDC motor [1]

A permanent magnet DC motor is a machine or device which converts electrical power to mechanical power using magnetic coupling. The voltage source provides electrical power while mechanical output power is rotation of rotor due attraction and repletion of stator magnetic field and armature magnetic field generated by rotor winding. A permanent magnet DC motor mainly consists of two components stator and rotor. [5]

The stator of PMDC motor consists of magnets which produce magnetic field called stator magnetic field (green dotted line in fig-11) and rotor (also called armature in DC machine) consists of many coils wound around iron core which produces magnetic field, when motor is connected to voltage source and this magnetic field is called armature field (red dotted line in fig-11 ). The phenomenon of opposing and attracting forces of the stator magnetic field and rotor magnetic field make armature (rotor) to rotate. Another way to analyse the reason for rotation of armature is that as electric current following through armature coil create armature magnetic field and the polarity of electric current (or direction of current flow) is changed constantly by commutator to make always make armature magnetic field perpendicular to stator magnetic field to maximise the torque. Since torque is equal to dot-product of force and length, so torque is maximum when angle is 90 degree. [5]

The commutator consists of two semi-circular copper segments fitted on the shaft at the end of rotor (armature) as shown in fig -11. Each rotor coil terminal is connected to a copper segment of commutator. Stationary brushes touch the copper segments and the coil on rotor gets connected to a stationary dc voltage supply by a near frictionless contact. [5]

Mathematical Model of PMDC Motor

Electrical Characteristics

illustration not visible in this excerpt

Fig – 12) Equivalent circuit of PMDC motor [5]

The Fig-12 shows the equivalent electrical circuit of a Permanent magnet DC motor, where Va represents terminal voltage across PMDC motor, Ra represents resistance of armature coils, La represents inductance of armature coil, Ia represents current flowing in armature coils, Vc represents back EMF induced which opposes the terminal voltage (Va). This EMF is induced voltage which is generated by rotating armature coils in permanent magnet fixed flux lines. [5]

The Kirchhoff’s voltage law states that net voltage around an electrical circuit loop is always zero. So using Kirchhoff’s voltage law, an equation for equivalent electrical circuit of a Permanent magnet DC motor is

illustration not visible in this excerpt

Where Va is terminal voltage, Vra is voltage across resistance of armature coil, Vla is voltage across inductance of armature coil and Vc is back EMF generated by PMDC motor.

illustration not visible in this excerpt

Where ia is armature current flowing in coil and Ra is armature resistance of coil. [5]

illustration not visible in this excerpt

Where ia is armature current flowing in coil and La is armature inductance of coil.

illustration not visible in this excerpt

Where ke is flux constant of PMDC motor, ω is angular speed of PMDC motor and ψ is flux produced by magnets. So the equation in transient state becomes

illustration not visible in this excerpt

In steady state Abbildung in dieser Leseprobe nicht enthaltenia becomes zero, so the above equation reduces to

illustration not visible in this excerpt

Therefore, armature current ia equal to

illustration not visible in this excerpt

and Abbildung in dieser Leseprobe nicht enthaltenia is equal to

illustration not visible in this excerpt

Mechanical Characteristics

By performing an energy balance on PMDC motor system or in other words, as we know energy is neither created nor destroyed but changed from one form to other. The mechanical equation of PMDC motor system becomes, [5]

illustration not visible in this excerpt

Where Te is electric torque, Tὠ is torque due to rotor’s rotational acceleration, Tω is torque produced by by rotor’s velocity, TL is mechanical load torque. Electric torque is proportional to the armature current which can be written as [5]

illustration not visible in this excerpt

Where kt is torque constant which depend on magnet flux density, armature coil’s turns and reluctance of iron core.

illustration not visible in this excerpt

where J represents inertia of the rotor and the equivalent mechanical load.

illustration not visible in this excerpt

where B is the damping coefficient associated with the mechanical rotational system of the machine, but B can be assumed to zero. [5]

illustration not visible in this excerpt

So, Abbildung in dieser Leseprobe nicht enthaltenω is equal to

illustration not visible in this excerpt

MATLAB simulation PMDC motor

In this project, PMDC motor’s armature resistance is equal to 7.8 Ohm, armature inductance is 5mH, torque constant kt is equal to 0.09 Nm/Amp, electrical constant ke is equal to 0.09V/ ω and rotor inertia is equal to 2.14e-5 Kgm2[11]. So state space diagram of PMDC motor is shown in fig-13.

The Figure shows the graph of terminal voltage, armature current and rotor speed verses time. In this figure show that current increases rapidly to reach value almost equal to maximum armature current value which is equal to 3.07 A (V/ Ra 24/7.8 = 3.07). At time t=0, DC motor is at rest that means rotor speed is equal to zero. So therefore EMF is also zero and hence current which equal to difference between terminal voltage and EMF divided by armature resistance increase rapidly. As DC motor starts rotating, back EMF is generated and as time passes EMF value becomes equal to terminal voltage, thus the difference between back EMF and terminal voltage become zero and hence armature current becomes zero and at that moment the rotor speed reaches it maximum value.

illustration not visible in this excerpt

Fig – 13) State space model of PMDC motor

The figure-13, shows state-space diagram of PMDC motor which is used to analyse the working of motor using MATLAB software. The figure-14 shows armature current and motor speed waveform of PMDC motor when supplied with 24V dc terminal voltage. At time t=0, motor is at rest and motor speed is zero rad/s, armature current increases rapidly because armature current is directly proportional to difference between terminal voltage and back EMF and since back EMF is 0 as motor speed is zero, the difference is at maximum value at time t=0.

illustration not visible in this excerpt

Fig – 14) Simulation results of state space model of PMDC motor

The figure -15 shows armature current waveform in condition where rotor is locked or in other words, rotor is held tightly in order to maintain motor speed equal to 0 rad/s. This figure clearly shows that armature reaches it maximum value [3.08A, (VT – EMF) / RA = (24-0)/7.8]. In this condition, the rotor winding will heat up and burn which will damage the motor if current stay at its maximum value for long time. So by implementing the cascade speed control on PMDC motor, the current is limited to some value by inner current loop to prevent this damage.

illustration not visible in this excerpt

Fig – 15) Armature current in rotor locked condition

H-Bridge

illustration not visible in this excerpt

Fig – 16) State space model of H bridge [1] [6]

The figure-16 shows the simplified H bridge and MATLAB model of H-bridge which is used for simulation process to understand and analyse the working H-bridge in unipolar PWM switching technique. The figure-17 show the carrier triangular, leg A and leg B voltage and armature current and voltage waveform when unipolar PWM switching technique is used. The carrier waveform is of 10 KHz which has PWM time period of 100 micro-second and two black line are modulation index value going in leg-A (upper black line) and leg-B (lower black line), So in both legs when modulation index is greater than carrier waveform, the leg has 24 DC volt and when modulation index is smaller than carrier waveform, the leg has 0 DC volts. The difference between leg-A and leg-B voltage gives armature voltage which is shown last graph of the figure -17. Since DC motor can be assumes RL load, when armature voltage is 24 DC volt, the inductor store the current and current graph increases exponentially and when armature voltage is 0 DC volt, inductor acts like current source gives away the stored current and current graph decreases exponentially as shown in figure-17. It can be observed that in unipolar switching technique, the frequency of armature voltage is twice that of carrier triangular waveform.

illustration not visible in this excerpt

Fig – 17) Simulation of state space model of H-bridge

Four – Quadrant (4Q) operation of DC motor

The PMDC motor or other type DC motor can rotate in forward and backward direction and can also become DC generator. In order to do so DC drive (in this project Flexible inverter board) should be able to provide PMDC motor with positive and negative armature voltage. Another very important point to note is that DC drive should be able direct power flow from voltage source to DC motor when motor operate in motoring mode and direct power flow from DC motor to voltage source when DC motor operate in generating mode. The figure-18 shows torque-speed graph and planes where DC motor works as generator and motor. [2]

illustration not visible in this excerpt

Fig – 18) Four Quadrant operation of DC motor

When DC motor operates in braking mode, energy is generates by DC motor which goes back in DC drive. So DC drive should be able to handle this regenerated energy by absorbing it to prevent overcharging DC bus capacitor in DC drive. The figure-19 show one low cost option in which brake chopper circuit is used in DC drive to absorb the excess energy. In brake chopper circuit, resistor get heated and convert electrical energy to heat energy. But this option is not is effective in applications where DC motor generates energy for long time as resistor in brake chopper will get damaged due to overheating, so figure-20 shows another option where energy generated by motor gets back in power source rather than damping into brake resistor. [2]

illustration not visible in this excerpt

Fig – 19) Brake chopper circuit [2]

The second option requires feedback control for bi-directional rectifier to converter AC supply to DC supply for DC link, thus making it more complex than first option and also 8 power semi-conductor switches are used, four for bi-directional rectifier and four for H-bridge which make this option more expensive than first option. Therefore first option for DC link supply is cheap and simple to control but cannot be implemented in every applications and second option of DC link supply is expensive and complex to control but can be implemented in most applications. [2]

illustration not visible in this excerpt

Fig – 20) bi-directional rectifier [2]

Cascade speed control of Permanent DC Motor

The cascade speed control technique is most efficient in DC drives, which has fast response inner loop for armature current enclosed by outer loop for speed loop, as compared to other techniques. The inner current loop prevent armature current to reach maximum value thus protecting DC motor. In this technique, inner current loop can tested before apply outer speed loop. This technique works effectively when inner loop response is ten times faster than outer loop. The figure-21 show simple diagram of cascade control. [2]

illustration not visible in this excerpt

Fig – 21) Cascade speed control of Permanent DC Motor [2]

[...]

Excerpt out of 69 pages

Details

Title
Cascade control of DC brushed motor
College
University of Newcastle upon Tyne
Grade
Distinction
Author
Year
2014
Pages
69
Catalog Number
V283511
ISBN (eBook)
9783656835189
ISBN (Book)
9783656835196
File size
5569 KB
Language
English
Tags
cascade
Quote paper
Ninad Gondhalekar (Author), 2014, Cascade control of DC brushed motor, Munich, GRIN Verlag, https://www.grin.com/document/283511

Comments

  • No comments yet.
Read the ebook
Title: Cascade control of DC brushed motor


Upload papers

Your term paper / thesis:

- Publication as eBook and book
- High royalties for the sales
- Completely free - with ISBN
- It only takes five minutes
- Every paper finds readers

Publish now - it's free