rp final pdf

38
RESEARCH PROJECT By Phyo Khaing Tun Willys Soe Minn Htet 1

Upload: dennychiang

Post on 13-Jul-2016

25 views

Category:

Documents


3 download

DESCRIPTION

research

TRANSCRIPT

Page 1: Rp Final PDF

RESEARCH PROJECT By Phyo Khaing Tun

Willys

Soe Minn Htet

1

Page 2: Rp Final PDF

AcknowledgementWe would love to express our gratitude and appreciation towards our mentor for this project, Mr Wong Cho Loo, for his great advices and suggestions to this project.

Additionally we would very much like to thank anyone and any sources that have played a part in helping us in the writing of this report and our project.

2

Page 3: Rp Final PDF

1 TABLE OF CONTENTS

2 List of figures...............................................................................................................................4

3 Summary.....................................................................................................................................5

4 Introduction................................................................................................................................6

5 Method....................................................................................................................................... 7

5.1 Background Study................................................................................................................7

6 Theory.........................................................................................................................................8

6.1 DC motor..............................................................................................................................8

6.2 Brushless DC motor............................................................................................................10

6.3 AC motor............................................................................................................................13

6.4 Universal Motor.................................................................................................................15

6.5 Selection of Motor.............................................................................................................17

6.6 Speed Sensor..................................................................................................................... 18

6.7 Infrared Sensor.................................................................................................................. 20

6.8 PID..................................................................................................................................... 21

7 Results & Discussion..................................................................................................................23

8 Conclusion.................................................................................................................................30

9 Reference..................................................................................................................................31

3

Page 4: Rp Final PDF

2 LIST OF FIGURES

- Fig 5.1.1 Parrot AR.Drone 2.0 - Fig 6.1.1 Brush and commutator of DC motor - Fig 6.2.2 DC electric motor diagram - Fig 6.2.1 Brushless DC motor - Fig 6.2.2 Brushless DC motor - Fig 6.3.1 3-phase AC current - Fig 6.3.2 Induced current in rotor (squirrel cage) - Fig 6.4.1 Universal motor- Fig 6.4.2 Magnetic field of Universal motor- Fig 6.6.1 How speed sensor work- Fig 6.6.1 How speed sensor work- Fig 6.6.2 General view of speed sensor- Fig 6.6.2 Things in the speed sensor- Fig 6.7.1 Time of flight Technology- Fig 6.7.2 Voltage Vs Distance Chart - Fig 6.8.1 PID Controller- Fig 6.8.2 Characteristic of PID - Fig 6.8.3 PID tuning software- Fig 7.0 Brushless DC motor data sheet- Fig 7.1 Simulated motor plot- Fig 7.2 Scope of original output- Fig 7.3 Simulated motor plot after changing values- Fig 7.4 Scope of output after changing values- Fig 7.5 Final simulated motor plot - Fig 7.6 Scope of final output- Fig 7.7 The result of the Bode plot- Fig 7.8 3-dimensional axes of an aircraft

-

4

Page 5: Rp Final PDF

3 SUMMARY

In this project, we have chosen to research about DC brushed and brushless motors, AC motor and Universal motor. We have decided that DC brushless motor best fit our application, the drone. We have also researched on two sensors that are used in the drone, an infrared sensor to sense for obstacles and a speed sensor to sense the speed of the motor. We have used a PID controller in the simulation of the motor using MATLAB. We were able to simulate different kinds of data and we have plotted a bode plot using the transfer function of our motor to check the stability of our motor. We have included the discussion and conclusion at the end of the report.

5

Page 6: Rp Final PDF

4 INTRODUCTION

The aim of this project is to implement a PID controller to regulate the speed control of a DC motor. Our objective is to obtain the transfer function of a DC motor and to design the controller based on design techniques such as the Bode plot analysis. We also studied suitable feedback sensors and implement an electronic circuit using a microcontroller such as the PID for signal processing and output control. We have hence studied the effectiveness of the controller when an external disturbance is present. An example of an external disturbance is the total weight of the load or a change in the speed of the motor. We have used MATLAB to simulate the motor and the disturbance and show that the PID controller canachieve the desired control parameters.

6

Page 7: Rp Final PDF

5 METHOD

5.1 BACKGROUND STUDY

Drone is formally known as unmanned aerial vehicles (UAV). Drone is a flying robot which is remotely controlled or flown autonomously through software-controlled flight plans in their embedded systems working in conjunction with GPS. Drones are most often used in the military but they are also used for traffic monitoring, weather monitoring, search and rescue, surveillance and fire fighting among other things. Recently, drones are used for aerial photography.

The Parrot AR.Drone is a remote controlled flying quadcopter helicopter. It can be controlled by iOS or Android devices using the app provided by Parrot SA. Quadcopter helicopter is lifted and propelled by four rotors, using two sets of identical fixed pitched propellers; two clockwise and two counter-clockwise. Altering the rotation rate of one or more rotor discs will control the vehicle motion, therefore changing its torque load and thrust/lift characteristics.

Fig 5.1.1 Parrot AR.Drone 2.0

5.2

7

Page 8: Rp Final PDF

6 THEORY

6.1 DC MOTOR

Fig 6.1.1 Brush and commutator of DC motor

DC motors consist of two coils of wire (poles) which rotates about a magnetic field produced by two electromagnets. The power supply supplied to the coils of wire through the brushes polarises the split ring commutator, hence the like poles of the electromagnets and the commutator repel each other, creating a rotational motion. When the commutator completes one rotation, it reverses in polarity because of the gap between the rings. This will ensure continuous rotation of the commutator which in turn will turn the coils of wire. The coils of wire are often called poles, with each coil making a pole.

Motors are often found with three poles instead of two to give the motor better dynamics. It is relatively easy to control the speed of the rotation. The speed can be controlled either by using a greater power supply, or by using a stronger magnet. The DC motor consumes electrical power to produce mechanical power.

8

Page 9: Rp Final PDF

Fig 6.2.2 DC electric motor diagram

Advantages:

An advantage of the DC motor is that it has low initial cost. It is also relatively easy to control the speed of the motor accordingly. Another advantage is that as the brushes can be replaced, it can prolong the operational life of the motor. Brushed motors can handle rough environments quite reliably as it requires few or no external components to work (e.g. encoder/ controller)

Disadvantages:

A huge disadvantage of the DC motor is that it requires regular maintenance, due to mechanical wear. This is due to the contact between the brushes and commutator, which will need to be replaced with a new one once it’s worn out. The contact between the brushes and commutator can make the motor noisy and smelly when operating. It will also reduce the efficiency of the motor and more power is needed to overcome the friction.

9

Page 10: Rp Final PDF

6.2 BRUSHLESS DC MOTOR

Fig 6.2.1 Brushless DC motor

Brushless DC motors are synchronous motors. A brushless DC motor contains mainly two parts: a rotor and a stator. The rotor and the stator rotate at the same speed. The rotor of the motor is usually a permanent magnet, and the stator consists of coils of wire (poles). By providing a power supply to the stator, it becomes an electromagnet. The like poles of the electromagnet (stator) and the permanent magnet (rotor) repel each other and the unlike poles attract each other. This causes the rotor to rotate. However, to ensure it rotate continuously in the same direction, a brush and a commutator connect the stator with the power supply. The commutator reverses the polarity of the coils of wire in the stator. In order to detect the position of the rotor at any time, a Hall sensor may be used or a controller.

10

Page 11: Rp Final PDF

Fig 6.2.2 Brushless DC motor

Advantages:

Brushless DC motors require less maintenance, as it has no contacts between parts with a brush. As there are no contacts of the brushes and commutator, the brushless DC motor is less noisy and smelly. The brushless DC motor also has a higher efficiency than the brushed DC motor because there are no contacts between the brushes and commutator motor, hence less power is being lost as heat due to friction. The absence of friction can also cause the rotor to rotate faster, resulting in a higher motor speed.

Disadvantages:

Brushless DC motors have a high construction cost. This is due to the requirement of commutating devices like an encoder and a controller. The requirement of a Hall sensor to detect the position of the rotor also further increases the price of the motor.

11

Page 12: Rp Final PDF

DC motor’s Transfer Function

The figure at bottom represents a DC motor attached to an inertial load. The voltages applied to the field and armature sides of the motor are represented by Vf and Va . The resistances and inductances of the field and armature sides of the motor are represented by Rf , Lf , Ra , and La . The torque generated by the motor is proportional to f i and a i the currents in the field and armature sides of the motor.

Field-Current Controlled: In a field-current controlled motor, the armature current a i is held constant, and the field current is controlled through the field voltage Vf . In this case, the motor torque increases linearly with the field current. We write

By taking Laplace transforms of both sides of this equation gives the transfer function from the input current to the resulting torque.

For the field side of the motor the voltage/current relationship is

The transfer function from the input voltage to the resulting current is found by taking Laplace transforms of both sides of this equation. We get

12

Page 13: Rp Final PDF

6.3 AC MOTOR

Fig 6.3.1 3-phase AC current

A typical AC motor is made up of a stator and rotor. Power is supplied to the stator of the AC motor. A stator does not move freely and is usually an electromagnet made up of coils of wire to produce a rotating magnetic field. The rotor cuts the rotating magnetic field and the magnetic field induces an electromotive force in the rotor, due to Faraday’s Law of electromagnetic induction. The electromotive force will produce a current in the rotor. However, the rotor has to be an electrical conductor for an e.m.f to be induced. The induced current in turn produces its own magnetic field, and according to Lenz’s Law, it will rotate with the rotating magnetic field produced by the stator to reduce the cause. This type of motor is often known as induction motors.

13

Page 14: Rp Final PDF

Fig 6.3.2 Induced current in rotor (squirrel cage)

On the other hand, the speed of the rotor cannot be equal to the speed of the rotating magnetic field. This is due to a relative velocity between the rotor and the rotating magnetic field. The difference in the speed of the rotor and the rotating magnetic field is called “slip”. If the speed of the rotor is the same as the speed of the rotating magnetic field, there will be no torque generated as the rotor will not cut the magnetic flux lines of the stator and there will be no induced emf or current. If the rotor slows down in speed, it will experience a varying magnetic field of the stator, and will increase the induced current and force, causing the rotor to spin faster.

Advantages:

There is only one moving part in the AC motor which is the rotor. This will mean that they are long lasting, relatively quiet and cheap. As there are no contacts between parts, it requires less maintenance and mechanical wear is not a big problem. AC motors have less inertia, so it requires less power to start and can accelerate faster than DC motors.

14

Page 15: Rp Final PDF

Disadvantages:

The speed of an induction motor depends on the frequency of the input alternation current. This means that without a variable-frequency drive, the speed of the induction motor cannot be controlled. An inverter has to also be used to convert AC current to DC current. AC motors hence can be heavy and bulky. Due to Lenz’s Law, a voltage will oppose the original applied voltage. This means that the overall voltage across the armature decreases, and a smaller current will flow into the motor. This can reduce the efficiency of the motor.

6.4 UNIVERSAL MOTORA special type of motor, universal motor is designed to work on both DC and AC power supply. These motors are mostly a series wound which mean armature and field winding in series. Hence these two are in series ,it produce high torque at the starting that is very useful for household devices such as electric drills , electric saws , vacuum cleaner ,blender and mixer. Most of the universal motors run with a high speed which is over 3500 rpm. The difference between using AC and DC power supply is that the motor is running at lower speed in AC power supply rather than DC supply of same voltage. This is due to the reactance voltage drop which is only available in AC source and not in DC.

15

Page 16: Rp Final PDF

Fig 6.4.1 Universal motor

In the construction of universal motor, the motor generally consist of stator and rotor like the other kind of motors. But the whole magnetic path which is a stator field circuit and armature is laminated to reduce the eddy current while using with AC power source. The induced current in the armature foils make the commutation on AC to be poorer than that of DC. That’s the reason of using brushes to have a high resistance.

Fig 6.4.2 Magnetic field of Universal motor

Advantages:

A universal motor can run with both AC and DC power supplies and it can start up the motor with a very high torque so that we all can use immediately .The size is small and the weight is also lighter than other motors.

16

Page 17: Rp Final PDF

Disadvantages:

As the torque speed of the motor is high, it can be overheated and noisy. The commutator and electromagnetic interference can spoil easily due to the sparks which will shorten the operational life of the motor and needs regular maintenance.

6.5 SELECTION OF MOTORFor our application, we have selected to use the AR.Drone. This drone uses the DC brushless motor. The main reason of using brushless DC motor is that the motor is more capable, it provides sufficient torque, and greater speed than its brushed counterparts.

Using AC motor in AR.Drone is suitable as AC motors need AC supply. The drone can only provide DC power supply from its battery mounted in the vehicle.

The reason why the drone is not using Universal motor is that these motors may be used only in places where clean air is present. Drones are usually used in any environment, so it is not suitable for a drone to use Universal motor. Additionally, Universal motors generate a lot of heat and need a large cooling fan to circulate air to reduce the risk of overheating. This adds to the drone’s size and weight, making it less practical. Universal motors are also not very efficient due to its brush and commutator. The motor needs more power to overcome the friction between the brush and commutator. The motor also needs to provide power to the fan to cool itself. The extra consumption of power in the motor reduces its efficiency significantly. The efficiency is around 30% for smaller motors and 70-75% for bigger motors.

17

Page 18: Rp Final PDF

6.6 SPEED SENSOR

Fig 6.6.1 How speed sensor work

A sensor which measures the speed of a movement or rotation is called a speed sensor. A speed sensor can be used in the situation of extreme cold or heat and also can be used in the presence of dirt and grease. There are a lot of kind of speed sensors based on different principles and situation. For AR drone, variable reluctance speed sensor is suitable to measure the speed of the brushless DC motor.

VR speed sensor consists of a coil of ware wrapped around the magnet. The way of the sensor work is very simple and the sensor read the gear teeth also known as target gear. As the target gear moves, they make the amount of magnetic flex around the coil of the sensor. When a target is close to the sensor, the flux is at the maximum and on the other hand, when the target is far away, the flux drops off. Those fluxes go up and go down make an electrical waveform.

This speed sensor sense the rotational speed of the brushless DC motor and control the AR drone to lift and thrust as this is light in weight and no requirement of power supply for the sensor.

Fig 6.6.2 General view of speed sensor

18

Page 19: Rp Final PDF

Fig 6.6.2 Things in the speed sensor

Advantages:

These sensors don’t need any external power supply. The coil and the permanent magnet used in the sensor are pretty cheap. Moreover the weight of the sensor is super light, robust and is able to work under high temperature and high vibration environments. For example, this type of sensor can be able to work in the turbine speed of jet engine whose temperature is excess of 300°C.

Disadvantages:

Target material must contain iron which means the material is ferrous. Although these sensors are pretty cheap, the additional circuitry required device to read the digital signal of the low amplitudes of voltage makes the end price pretty expensive like other type of sensor.

19

Page 20: Rp Final PDF

6.7 INFRARED SENSOR

To be able to fly in unknown places, drones have to be able to detect obstacles and measure their distance from the drone. They have to know, accurate and at all time, where they are in a 3 dimensional space to prevent the drone from any incident. So the AR.Drone is using infrared sensor which is using infrared time-of-flight technology (ToF).

Fig 6.7.1 Time of flight Technology

Infrared sensors are lower cost and they have faster response time than Ultrasonic sensors. They also consume up to 30mA current and supply voltage of 4.5 to 5.5V. The Infrared sensor can detect any object from 100cm to 550cm. The sensor output is in analog but the drone is mounted with LPCxpresso board to convert analog to digital output. Basically the LPCxpresso board is connected via USB to the AR drone board and it receives analog voltage signal from each of the infrared sensors. Then the analog data are converted using the analog to digital converter, and the digital data is transferred to the AR drone board.

Fig 6.7.2 Voltage vs Distance Chart

All objects with a temperature above absolute zero emit heat energy in the form of radiation. The IR sensors detect the heat radiation emitted or reflected from an object. The analog voltage data coming from the sensors will have a corresponding distance. Hence, the sensor is able to detect

20

Page 21: Rp Final PDF

obstacles. Sensors are pointed forward, backward, left and right of the drone to get all 3 dimensional space.

6.8 PIDPID is a Proportional Integral Derivative controller which is used in a closed loop control system. The function of PID is to minimize or eliminate any error. A PID controller calculates the error by comparing the output to the input, and then eliminates the error by adjusting the value of the proportional, the integral and the derivative values accordingly. A well designed PID controller satisfies the performance requirements for most of the control systems.

Fig 6.8.1 PID Controller

A proportional controller will reduce the rise time and reduce the steady-state error but it will never eliminate the steady-state error. Meanwhile the Integral controller eliminates the steady-state error but may make the transient response worse. The Derivative controller will make the system more stable, reducing the overshoot, and improving the transient response.

The impact of the Proportional, Integral and Derivative gains on a closed loop control system is summarized below:

Fig 2.8.2 Characteristic of PID

21

Page 22: Rp Final PDF

If the gains of Proportional, Integral and Derivative aren’t tuned correctly, the system can become unstable. There are 5 types of tuning method and we have used manual method. We set both Ki and Kd values to zero. Increase the Kp until the output of the loop oscillates, then the Kp should set to approximately half of that value for a “quarter amplitude decay” type response. Then we can start to increase Ki until any offset is corrected in sufficient time for the process. However increasing too much gain in Ki will cause instability. Lastly increase Kd if needed but if Kd is tuned too much, it will cause excessive response and overshoot. Most modern industrials in the practical field usually use PID tuning software. Most of them no longer use the manual calculation method because the PID tuning software ensures to have consistent results. The PID tuning software will gather data, develop process models and suggest optimal tuning. The software can work either offline or online and it can be tuned automatically by using the computer. Thus it will let the worker to accomplish other task since the computer can automatically tune the system. However we have to buy the PID tuning software and needed a trained staff on the PID tuning software to be able to operate the software.

Fig 6.8.3 PID tuning software

22

Page 23: Rp Final PDF

7 RESULTS & DISCUSSION

Through MATLAB, we were able to simulate the motor and implement a PID controller to regulate the speed control of the motor. We have used the transfer function of the 1st order system shown below for the motor. After taking the values from the datasheet below to substitute into the 1st order transfer function, we have simulated data

Fig 7.0 Brushless DC motor data sheet

23

Page 24: Rp Final PDF

Through MATLAB we have plotted the diagram below as the motor and PID controller,

Fig 7.1 Simulated motor plot

And we obtained the following scope with a rise time of 1 second and approximately no overshoot:

24

Page 25: Rp Final PDF

Fig 7.2 Scope of original output

We then adjusted the values for the gain of the proportional (Kp), integral (Ki) and derivative (Kd). We obtained the following plot

Fig 7.3 Simulated motor plot after changing values

We simulated a scope at the output and obtained the following:

25

Page 26: Rp Final PDF

Fig 7.4 Scope of output after changing values

Next, we have added an external disturbance to our system, and plotted the following diagram

Fig 7.5 Final simulated motor plot

We obtained the following scope with a rise time of approximately 1 second and overshoot of 60%, with disturbance:

26

Page 27: Rp Final PDF

Fig 7.6 Scope of final output

27

Page 28: Rp Final PDF

This is the result of the Bode Plot

Fig 7.7 The result of the Bode plot

By looking at the Bode Plot, we can see that the system is stable because we are able to get a positive value of Gain Margin using the formula: [0 – (phase crossover magnitude)dB], 0 – (-109)= 109dB. For the Phase Margin, we can calculate using the formula: [180deg + (gain crossover phase)], 180deg+(-90deg)=90deg. The positive result for both Gain and Phase Margin indicates that the system is stable.

To be agile in the air, drone has to be able to change its course of movement almost instantaneously. Therefore the torque of the motor has to respond quickly. Hence having a short rise time is advantageous. A rise time of 1 second in our scope generated in MATLAB meets our requirement. As there are disturbances that will affect our system, the PID controller will have to tune its output to make our system stable again. We have simulated a disturbance to our system in MATLAB and the overshoot, caused by the disturbance, of approximately 60% was eliminated by the PID controller in a second. This meets our requirement to our application.

For the sensor, the drone is using infrared sensor instead of ultrasonic sensor because infrared sensors are cheaper than ultrasonic sensors. Infrared sensor are affordable and does not consume much energy. The required voltage is only 4.5 to 5.5 volts. Infrared sensors are also compact in size. This is a huge advantage to the portability and size of the drone.

In the design of the drone, there are two sets of identical rotors. Each sets of rotors rotates in opposite direction from each other; clockwise and counter clockwise. If all rotors are spinning at the same angular velocity, with rotors one and three rotating clockwise and rotors two and four 28

Page 29: Rp Final PDF

counter clockwise, the net aerodynamic torque, and hence the angular acceleration about the yaw axis, is exactly zero, which implies that the yaw stabilizing rotor of conventional helicopters is not needed. Hence we need speed sensors to measure the speed of the rotors to prevent instability in all 3 dimensions (yaw, roll and pitch axes).

Fig 7.8 3-dimensional axes of an aircraft

29

Page 30: Rp Final PDF

8 CONCLUSION

After the completion of this project, we have learnt more in-depth on DC, AC and universal motors. We have also learnt how to choose appropriate motors for different kind of applications. We have also gained more knowledge on infrared and speed sensors. We have also known how to apply the PID controller to eliminate the disturbance and stabilize the control system of the drone through MATLAB. Moreover, we were able to work closely in the group and manage our time very well. Additionally we have learnt more about the mechanism and dynamics of the drone.

30

Page 31: Rp Final PDF

9 REFERENCE

https://en.wikipedia.org/wiki/DC_motor

https://electronicdesign.com/electromechanical/what-s-difference-between-brush-dc-and-brushless-dc-motors#1

https://www.learnengineering.org/2014/10/Brushless-DC-motor.html

http://www.engineersgarage.com/articles/speed-sensor-types

http://www.che.rochester.edu/course-sites/CHE%20272/Homeworks/Doug272_2013_2.pdf

https://en.wikipedia.org/wiki/Universal_motor

http://www.explainthatstuff.com/induction-motors.html

http://www.learnengineering.org/2013/08/three-phase-induction-motor-working-squirrel-cage.html

http://www.electrical4u.com/working-principle-of-three-phase-induction-motor/

http://www.electricaleasy.com/2014/02/universal-motor-construction-working.html

https://en.wikipedia.org/wiki/Quadcopter

31