# Electromagnetics & Motors

There are 3 basic elements of any electrical machine

- Something to create a magnetic field on demand
- Something to channel said magnetic field
- Something to usefully be acted upon by the field

## Magnetic Fields

- Magnets are dipoles, with a north and south seeking pole
- Moving charge creates a magnetic field
- A magnetic field is a region of influence where a force can act on a particle

- Field lines are closed loops from north to south poles
- Lines never cross
- Closer the lines, stronger the field
- Lines are elastic, will always act to shorten themselves

Moving charges create a magnetic field, so a current moving through a wire will induce a magnetic field around the wire:

- The field radiates outwards from the wire
- Field is stronger close to the wire
- The number of field lines passing through an area is
**magnetic flux density**$B$, measure in Teslas - Area 1 has a higher flux density than area 2
- The direction of the field is determined by the corkscrew rule
- Make a fist with your right hand
- Thumb is the current direction
- Fingers point in field direction

The magnetic flux density around a conductor is $B$ is calculated:

$B=2πrμ_{0}I $

- $B$ is flux density in Teslas (T)
- $I$ is current in Amps (A)
- $r$ is the distance from the conductor in meters (m)
- $μ_{0}$ is the permeability of free space in Henries per meter H/m

Flux density may also be expressed in terms of flux $ϕ$:

$B=Aϕ $

- $ϕ$ is magnetic flux in Webers (Wb)
- $A$ is the enclosed area in square meters (m$_{2}$)

When there is more than one conducting wire, current in the same direction will augment a field

- A long wire with $N$ coils will create a solenoid
- Each extra turn develops a given flux, re-enforced with each turn
- The total flux available in a solenoid is the
**flux linkage**$λ=Nϕ$ in weber-turns

Permeability $μ$ is a measure of how well a material builds a magnetic field under the influence of a magnetising source. A coil of $N$ turns carrying a current $I$ with length $L$ develops a magnetic field intensity $H$, in amp-turns per meter:

$H=LNI $

The useful magnetic field from which is then

$B=μH$

By using a material with higher magnetic permeability, we can create a higher magnetic flux density.

- Permeability $μ$ is often given in terms of the permeability of free space, and the material's relative permeability: $μ=μ_{r}μ_{0}$
- $μ_{0}=4π×10_{−7}Hm_{−1}$
- Ferromagnetic materials have high permeability
- Non-ferrous materials have low permeability
- Magnetic cores of ferrous materials are used in solenoids to channel the field
- An iron core has a higher permeability than air

- Stronger field creates a higher flux density

A current-carrying wire will interact with a magnetic field to create a force

Fleming's left hand rule explains how this works, with force, magnetic field and current all acting in opposite directions.

A loop of wire in a field will have current flowing through it in opposite directions, so the wire will spin as equal forces will be induced on it in opposite directions. This is the basic principle behind how motors work.

The force on a conductor in a magnetic field can be calculated:

$F=BILsinθ$

- $F$ is the force on the conductor in Newtons (N)
- $B$ is the flux density in Teslas (T)
- $I$ is the current in Amps (A)
- $L$ is the wire length in meters (m)
- $θ$ is the angle between the plane of the coil and the magnetic field lines

## Magnetic Circuits

Magnetic circuits can be thought of in a similar way to electrical:

- Magneto-motive force $F$ causes flux $ϕ$ to flow through various reluctances $R$
- $F=ϕR$ - Hopkinson's Law

Magneto-motive force is considered the potential for a device to produce flux, and is related to the current and field intensity by:

$F=NI=Hl=ϕR$

- Flux is akin to magnetic current
- Reluctance defines how much flux a given potential develops
- Reluctance is a function of the geometry and material of the flux pathway
- Similar to electrical resistivity

$R=μ_{0}μ_{r}Al $

### Hysteresis/ B-H Curves

- The magnetic field obtained is a function of field intensity, the direction it is applied, and the existing field
- Saturation is the max possible field strength
- Remanence is the field left when the magnetising source is removed
- Coercivity is how hard it is to swap field direction
- Soft materials are easier to de-magnetise and re-magnetise

### Example

A steel ring, with a coil around it. The ring is 0.2m long with area 400mm$_{2}$, the coil has 300 turns:

Calculate the magneto-motive force for 500$μWb$ to flow, and the amount of current required to sustain this.

Flux density:

$B=Aϕ =400×10_{−6}500×10_{−6} =1.25T$

The field intensity is given from the table describing the hysteresis characteristics, $H=1500At/m$. Relating magneto-motive force, current and field intensity:

$F=Hl=1500×0.2=300At$

$F=NI=300$

$I=NF =300300 =1A$

### Lenz's Law

The direction of an induced EMF is always such that the current it produces acts to oppose the change in flux or motion causing the induced EMF.

- A clockwise field is generated by the first coil
- The flux generated by the first coil links with the second coil's turns
- If this flux is changing, an EMF is induced in the second coil
- More turns = more linkage = more emf

- The EMF induces a current in the second coil
- The current in the coil causes it to generate it's own flux, in opposition to the flux of the first coil
- EMF out and current out are a function of the ratio between coil turns due to flux linkage
- This is how transformers work

To induce an EMF, the flux linking the coil must be changing, so typically an AC signal is used. The magnitude of this induced EMF $e$ is the rate of change of flux linkage

$e=dtd (Nϕ)=dtdλ $

### Reluctance and Force

An armature exposed to a magnetic field will try to move to the point in the field where the least resistance to flux exists

- A current is applied to a the coil to develop a field
- A soft iron bar is inserted which becomes magnetised
- The forced drags the bar in toward the centre of the coil
- As the bar moves in the field a counter current is generated in the coil due to Lenz's law, which reduces net field and force
- The field is not uniform, and is strongest in the centre
- The bar moves back and forth and eventually comes to rest in the centre of the field, where the force is strongest and reluctance is lowest

The energy stored in the coil does work by moving the bar, and the energy comes from inductance, the property of a magnetic field that defines its ability to store energy. THe voltage accross an inductor is given as:

$V=LdtdI $

Thus the power is:

$VI=P=LIdtdI $

The total work done in Joules is the integral of the power over time:

$W_{f}=∫_{0}Pdt=21 LI_{2}$

The force developed in a field is the Maxwell pulling force, and can be determined in several ways:

$F=2xLI_{2} =2RxN_{2}I_{2} =μA2x_{2}N_{2}I_{2} =2μB_{2}A $

- $L$ is inductance in henries (H)
- $I$ is current in amps (A)
- $x$ is field length/air gap in meters (m)
- $N$ is coil turns
- $R$ is reluctance
- $μ$ is material or air gap permeability
- $A$ is field area in square meters (m$_{2}$)
- $B$ is flux density in Teslas (T)

The equation relating flux, current, turns and inductance is: $L=IϕN $

## PMDC Motors

Permanent magnet DC motors are widely used in a variety of applications due to their simplicity of control. They consist of two main parts: a stator, and an armature. Stationary magnets are attached to the stator, and coils of wire are wound around the rotating armature:

The circuit below is commonly used as a model of a PMDC motor:

Using this model, the following equations can be derived:

$V=Ldtdi +Ri+K_{e}θ˙$

$k_{t}i=Jθ¨+bθ˙+T_{L}$

- $V$ is applied voltage in Volts (V)
- $L$ is armature inductance in Henries (H)
- $R$ is armature resistance in ohms ($Ω$)
- $J$ is inertia in kgm$_{2}$
- $b$ is friction in Nm/rad/s
- $k_{e}$ is the back emf constant in V/rad/s
- $k_{t}$ is the torque constant in Nm/A
- $T_{L}$ is torque load in Nm
- $i$ is current in Amps (A)
- $θ$ is position in radians (rad)

### Operating Points

The voltage applied causes motion, and the speed is determined by torque. The motor has linear relationsips in speed, torque, and current.

- For a given voltage, speed will decrease with torque and current will increase with increase torque
- The motor can operate over a range of input voltages
- The voltage applied determines the exact relationship between speed, current, and load
- If a certain known torque load wants to be driven at a certain speed, then a set input voltage can be calculated, which will draw a set amount of current
- To increase the speed of the same torque load, increase the voltage, which will increase the current

- The combination of speed, current, and load is the motor's
**operating point**

Any given voltage and torque produces a speed and current, and the ideal operating point of a motor will be between the maximum efficiency and maximum output power points. When a motor is at a constant speed and current, the dynamic equations can be simplified to steady-state equations (also $k_{t}=k_{e}=k$):

$V=Ri+kθ˙$

$ki=bθ˙+T_{L}$

Steady state current and velocity are therefore:

$i=kbω+T_{L} $

$ω=Rb+k_{2}kV−RT_{L} $

- Increasing $V$ will cause an increase in $ω$
- Increasing $T_{L}$ will cause a decrease in $ω$
- Increasing $ω$ will cause an increase in $i$

### Power and Efficiency

The useful output power of a motor is rotational mechanical power. $Jθ¨$ and $bθ˙$ are considered losses.

$P_{out}=T_{L}ω$

Input electrial power is $P_{in}=iV$, so electrical losses are mainly $P_{loss}=i_{2}R$. The efficiency is output mechanical power over input electrical power:

$η=iVT_{L}ω =VT_{L} ×(bω+T_{L})(Rb+k_{2})k_{2}V−kRT_{L} $

Decreasing the friction $b$ will always increase efficiency, but as the other terms appear in both numerator and denominator, it is hard to find an optimum.

## Wound DC Motors

Wound DC motors have a magnetic field generated by an electromagnet instead of a permanent magnet, so are generally more powerful and controllable.

- Separately excited DC motors use a source of current separate from the armature current to generate the field
- Series connected DC motors have the field windings in series with the armature
- Shunt connected DC motors have the field windings in parallel with the armature

### Separately Excited

- Two separate input voltages
- Both windings used DC current
- Most controllable as field strength is isolated from armature current
- Mutual inductance couples the motor equations as the flux from $L_{f}$ and $L_{a}$ interact
- Used when a DC motor with high controllability and high power output is required, such as in electric trains

$dtdi_{a} =−L_{a}R_{a} i_{a}−L_{a}L_{af} i_{f}ω_{r}$

$dtdi_{f} =−L_{f}R_{f} i_{f}+L_{f}u_{f} $

$dtdω_{r} =JL_{af} i_{a}i_{f}−JB_{m} ω_{r}−Jτ_{L} $

- $i_{a}$, $i_{f}$ armature/field current
- $u_{a}$, $u_{f}$ armature/field voltage
- $R_{a}$, $R_{f}$ armature/field resistance
- $L_{a}$, $L_{f}$ armature/field inductance
- $L_{af}$ mutual inductance
- $J$ armature inertia
- $B_{m}$ armature damping
- $ω_{r}$ armature velocity
- $τ_{L}$ torque load

### Series Connected

- Self-exciting: no separate input to excite magnetic field
- Field lines are cut by armature field lines
- High starting torque
- Should not be run with no load as they have very high speeds
- Used in heavy industrial equipment with high torques

$dtdi_{a} =−L_{a}+L_{f}R_{a}+R_{f} i_{a}−L_{a}+L_{f}L_{af} i_{a}ω_{r}+L_{a}+L_{f}u_{a} $

$dtdω_{r} =JL_{af} i_{a}−JB_{m} ω_{r}−Jτ_{L} $

### Shunt Connected

- Field windings are connected in parallel with armature windings
- Very good speed regulation
- Better at maintaining speed over a range of torque loads
- Best used where torque loads can vary ie in machining tools

$dtdi_{a} =−L_{a}R_{a} i_{a}−L_{a}L_{af} i_{f}ω_{r}+L_{a}u_{a} $

$dtdi_{f} =−L_{f}R_{f} i_{f}+L_{f}u_{f} $

$dtdω_{r} =JL_{af} i_{a}i_{f}−JB_{m} ω_{r}−Jτ_{L} $

## Motor Control

- Changes in speed are often required in a system.
- This can be done in PMDC motors by changing armature voltage
- Microcontrollers output a control signal to control the voltage

### Pulse Width Modulation

- Works by providing a high-frequency square wave
- The ratio of high/low is called the duty ratio
- Effectively turns a transistor on/off very quickly
- Duty ratio determines voltage accross motor

The graph below shows a PWM signal along with the average voltages

- The signal switches on and off very quickly, meaning the motor control circuit is turned on/off, but the motor has a high inductance meaning it does not respond as quickly
- This has the effect of averaging the voltage
- The PWM frequency is typically very high, and the period must be lower than the response time of the load

Motors can be modelled as an circuit with an inductance in series with a resistor, and an emf representing the motor's back emf:

- The power supply is connected and disconnected by a switch controlled by PWM
- The instantaneous $V_{B}$ and average $E_{r}$ voltage accross the motor is shown on the graph for two different duty ratios
- The motor does not stop when disconnected because of the rise and fall time of the current in the RL circuit
- The diode is a freewheeling diode that allows a current path when the voltage switch is off

### Low Side Drive Circuit

- The basic circuit for implementing motor speed control is shown below, known as a "Low Side PMDC Motor Drive Circuit"
- A high side version swaps the transistor and motor

- The circuit is built around a transistor used to switch the voltage on and off
- N-type MOSFET generally the best choice

- Freewheeling diode provides a current path for motor current when the switch is off
- Typically a schottky diode
- Forward rated current should be greater than max current
- Reverse voltage should be higher than motor voltage

- Pull down resistor ensures transistor gate voltage is 0 when no input is applied
- Typically 10k

- Current limiting resistor protects transistor from damage

The signal from the controller will be connected to the transistor gate, switching on and off at the PWM frequency. The duty ratio $D$ determines the ratio of on/off, so the average voltage is:

$Vˉ=D×V_{cc}$

### H-Bridge

A H-Bridge is a power electronic circuit that can convert DC to AD current. For motor control, it can be used to drive a motor in either direction or apply PWM control.

- The switches $S_{1}$ and $S_{4}$, and $S_{2}$ and $S_{3}$ work in pairs
- The state of each pair should always be opposite
- Current flowing in different directions causes the motor to rotate in different directions
- There are also 3 other states:
- Shorting is when one side of the circuit has both switches closed and current flows straight to ground
- This is a short circuit and will cause damage
- Do not do this

- Braking
- $S_{2}$ and $S_{4}$ are closed, connecting both terminals to ground and causing the motor to brake sharply

- Coasting
- All switches open, motor will continue to spin until mechanical load brings it to a stop

- Shorting is when one side of the circuit has both switches closed and current flows straight to ground

## Equations

Below are just the majority of the equations in one place without having to scroll :)

$B=2πrμ_{0}I $

$B=Aϕ $

$H=LNI $

$B=μH$

$F=BILsinθ$

$F=NI=Hl=ϕR$

$R=μ_{0}μ_{r}Al $

$e=dtd (Nϕ)=dtdλ $

$V=LdtdI $

$VI=P=LIdtdI $

$W_{f}=∫_{0}Pdt=21 LI_{2}$

$F=2xLI_{2} =2RxN_{2}I_{2} =μA2x_{2}N_{2}I_{2} =2μB_{2}A $

$L=IϕN $

$V=Ldtdi +Ri+K_{e}θ˙$

$k_{t}i=Jθ¨+bθ˙+T_{L}$