Week-7 Challenge: DC Motor Control
1. A. Explain a MATLAB demo model named ‘Speed control of a DC motor using BJT H-bridge’.
DC MOTOR WORKING:
The simplest of all motors, DC motors turn when a DC voltage is applied across it. This kind of motor can be found in drones, power tools, and robots. A DC motor can change speend and direction depending on how much power is fed to it and in which direction.The DC motor uses the uses a magnetic field generated by the by an electromagnet to turn the armature of a motor. The electromagnet is activated by applying voltage, so when the power is on, the magnetic field it generates will cause the armature (a coil of wire) to generate its own nagmetic field, these fields push eachother away and cause the armature to spin.

To get the motor to spin the other way, we need to reverse the applied voltage, meaning the flow of current through the motor will be reversed. Unfortunately switching the direction of current from a controller like the Omega is difficult. The processors use low current and voltages, plus they are usually disconnected from the motor to prevent inductive feedback distrupting their operation.
Hence the switching is done by using power electronic i.e Power BJT, IGBT ,Diode etc. Lets us see the Switching using BJT-H Bridge.
WORKING OF H-BRIDGE:
An H-Bridge is a circuit that allows voltages to be applied across a load in either direction. Electric current flows from the source to ground, and many components need to be oriented according to the direction of current to work as expected. An H-Bridge is a circuit built to change the direction of the voltage and thus the current flowing to a load.
An H-Bridge is made up of four switches: two in series, and two in parallel, with the load placed in between the switches. In this configuration the circuit takes an “H” shape.

In order to change the direction of the voltage supplied, the H-Bridge controls the switches that deliver power to the load (S1). Looking at the diagram, if we close S1 and S4 while leaving the rest open, the voltage will be applied from left to right across the motor. If S2 and S3 are closed instead and the others open, the voltage will be applied from right to left.
When switches S1 and S4 are switched on, motor runs in clockwise direction.

When S2 and S3 are switched on, motor runs in anticlockwise direction.

In actual practice these switches are replaced by transistors.
MATLAB MODEL:

The Bipolar Junction Transistor (BJT) when used for power switching applications, operates as an IGBT. When it is conducting (BJT operating in the saturated region), a forward voltage Vf is developed between collector and emitter (in the range of 1 V). Therefore, the IGBT block can be used to model the BJT device.The IGBT block does not simulate the gate current controlling the BJT or IGBT. The switch is controlled by a Simulink signal (1/0). The DC motor uses the preset model (5 HP 24V 1750 rpm). It simulates a fan type load (where Load torque is proportional to square of speed). The armature mean voltage can be varied from 0 to 240 V when the duty cycle (specified in the Pulse Generator block) is varied from 0 to 100%.
The H-bridge consists of four BJT/Diode pairs (BJT simulated by IGBT models). Two transistors are switched simultaneously: Q1 and Q4 or Q2 and Q3. When Q1 and Q4 are fired, a positive voltage is applied to the motor and diodes D2-D3 operate as free-wheeling diodes when Q1 and Q4 are switched off. When Q2 and Q3 are fired, a negative voltage is applied to the motor and diodes D1-D4 operate as free-wheeling diodes when Q2 and Q3 are switched off.
SIMULATION RESULTS:

The motor starts in the positive direction with a duty cycle of 75% (mean DC voltage of 180V). At t= 0.5 sec., the armature voltage is suddenly reversed and the motor runs in the negative direction.'Scope' shows motor speed, armature current and load torque and 'Currents' shows currents flowing in BJT Q3 and diode D3.

- We observe from the current output scope that the D3 is conducting current from 0 to 0.5 sec and the next half time the Q3 is conducting current.
- The graphs shows spike in current at starting and futher gets steady at a lower limit as we know that the starting current of motor is high to generate the torque.
- D3 represent the diode in quadrant 3 and Q3 represents the IGBT in 3rd quadrant.
- D3 is on and then Q3 is on step wise as input feeded by pulse generator.

- The `Tl prop omega^2` by using this formula the Ia(Armature current) is calculated.
- We observe that their is clear spike in Ia during both forward and reverse movement.
- When the motor is running in forward direction the Ia is shootup and then as the speed is incresed it gets steady at lower value.
- The motor runs the reverse direction the switches used change the polarity of motor due to which we see at 0.5 sec the Ia is drop very low and agained shoots ups and gets constant.
- At the same time the torque is also reversed.
- Hence we can conclude that at every switching action the Ia is going to shoot up in their respective direction.
- The shootup can be reduced by changing the pulse generator input.
C. Refer to the help section of ‘The Four-Quadrant Chopper DC Drive (DC7) block’. Compare it with the H-bridge model.
4 Quadrant Operation:
A dc drive operates in two modes - motoring and braking.
In motoring, it converts electrical energy to mechanical energy, which supports the motion.
In braking, it works as generator converting mechanical energy to electrical energy and thus opposes the motion.
DC drives can provide motoring and braking operations for both forward and reverse directions therefore it is called four quadrant operation of drives.
We know that power developed in a drive is equal to the product of angular speed and torque.Speed is considered positive when motor rotates in forward direction. Torque is positive when it produces a positive rate of change of speed.

- In quadrant 1, developed power is positive, hence the machine works as motor supplying mechanical energy. This is called forward motoring.
- Operation in quadrant II represents braking, because in this part the speed is positive and the torque is negative. The machine operates as a generator developing a negative torque which opposes the motion.This is called forward barking.
- In the third quadrant the action is reversed as both speed and torque have negative value but the power is positive. Direction of rotation is reversed as compared to operation in quadrant I.This is called reverse motoring.
- In the fourth quadrant, the torque is positive and speed is negative. This quadrant corresponds to braking in reverse braking.
The Four-Quadrant Chopper 200hp DC Drive Model:

Description
- The 200 HP DC motor is separately excited with a constant 150 V DC field voltage source.
- The armature voltage is provided by an IGBT converter controlled by two PI regulators.
- The converter is fed by a 515 V DC bus obtained by rectification of a 380 V AC 50 Hz voltage source. In order to limit the DC bus voltage during dynamic braking mode, a braking chopper has been added between the diode rectifier and the DC7 block.
- The first regulator is a speed regulator, followed by a current regulator.
- The speed regulator outputs the armature current reference (in p.u.) used by the current controller in order to obtain the electromagnetic torque needed to reach the desired speed.
- The speed reference change rate follows acceleration and deceleration ramps in order to avoid sudden reference changes that could cause armature over-current and destabilize the system.
- The current regulator controls the armature current by computing the appropriate duty ratios of the 5 kHz pulses of the four IGBT devices (Pulse Width Modulation).
- For proper system behaviour, the instantaneous pulse values of IGBT devices 1 and 4 are opposite to those of IGBT devices 2 and 3.
- This generates the average armature voltage needed to obtain the desired armature current. In order to limit the amplitude of the current oscillations, a smoothing inductance is placed in series with the armature circuit.
Results :

Comparision:
| BJT H BRIDGE DRIVE | 4 QUADRANT CHOPPER |
| Regenarative Braking not possible | Regenarative Braking possible |
| It is used to change direction of motor in forward and reverse. | This drive operates motor in 4 direction modes Forward & Reverse (Motoring & Braking) |
| Control is less | Effective and better control is achived |
| Signals are cotinuous | Signals are discrete |
| Ia shoots up during switching | Comparitively less |
| Fixed Dc source | Ac supply is rectified to variable dc supply |
The 2-quadrant chopper is also know as Type-C chopper is obtained by the parallel connection of Class-A and Class-B chopper. Figure below shows the circuit diagram of this type of chopper.

chopper CH1, free-wheeling diode (FD) and load are forming Class-A Chopper whereas chopper CH2, D2 and Load are forming Class-B chopper. Both these choppers are connected in parallel. To obtain first quadrant operation we should switch ON chopper CH1 and for getting second quadrant operation we should switch ON chopper CH2. Let us discuss this in detail.
Case-1: When CH1 is switched ON / OFF
When chopper CH1 is switched ON, source Vs directly gets connected to the load and hence, load voltage Vo is equal to source voltage. The direction of load current is from source to load as shown in the circuit diagram which is assumed positive.
When CH1 is switched OFF, the free-wheeling diode FD comes into the circuit as it gets forward biased and hence shorts the load. Therefore, the output voltage Vo becomes zero. However, the io continues to die down through the FD and L in the same direction as shown in circuit diagram. Thus, the average output voltage Vo and current Io are positive and hence operation of chopper is in first quadrant.
Case-2: When CH2 is switched ON / OFF
When chopper CH2 is switched ON, load DC source E drives current through CH2 and load. The direction of this current io will be opposite to that shown in circuit diagram and hence is assumed negative. Output voltage Vo is zero during this time. When CH2 is made OFF, diode D2 gets forward biased and hence the current into the source from the load. The output voltage is Vs in this time as the load is connected to the source through D2 during OFF time of chopper CH2. Thus, the load current is always negative i.e. operation of chopper is within second quadrant
From the above two cases, we can conclude the following points:
- The output voltage Vois zero when chopper CH2 is ON or free-wheeling diode FD conducts.
- The output voltage Vois equal to source voltage Vs when chopper CH1 is ON or diode D2 conducts.
- The load current flows in the direction shown in circuit diagram i.e.iois positive when CH1 is ON or FD conducts.
- The load current flows opposite to the direction shown in circuit diagram i.e.iois negative when CH2 is ON or D2 conducts.
The average load voltage is always positive but the average load current may be positive or negative. Therefore, power flow may be from source to load (first quadrant operation) or load to source (second quadrant operation). The operating region of Class-C or Type-C chopper is shown below by hatched area.

Caution:
Choppers CH1 and CH2 should not be ON simultaneously as this would lead to direct short circuit on the supply lines.



A Brushless DC Motor is similar to a Brushed DC Motor but as the name suggests, a BLDC doesn’t use brushes for commutation but rather they are electronically commutated. In conventional Brushed DC Motors, the brushes are used to transmit the power to the rotor as they turn in a fixed magnetic field.
As mentioned earlier, a BLDC motor used electronic commutation and thus eliminates the mechanically torn brushes.
Construction of BLDC Motor
The main design difference between a brushed and brushless motors is the replacement of mechanical commutator with an electric switch circuit. Keeping that in mind, a BLDC Motor is a type of synchronous motor in the sense that the magnetic field generated by the stator and the rotor revolve at the same frequency.
Brushless Motors are available in three configurations: single phase, two phase and three phase. Out of these, the three phase BLDC is the most common one.
The following image shows the cross-section of a BLDC Motor.

As you can see in the image, a BLDC Motor consists of two main parts: a stator and a rotor.
Stator
The structure of the stator of a BLDC Motor is similar to that of an induction motor. It is made up of stacked steel laminations with axially cut slots for winding. The winding in BLDC are slightly different than that of the traditional induction motor.
Generally, most BLDC motors consists of three stator windings that are connected in star or ‘Y’ fashion (without a neutral point). Additionally, based on the coil interconnections, the stator windings are further divided into Trapezoidal and Sinusoidal Motors.

In a trapezoidal motor, both the drive current and the back EMF are in the shape of a trapezoid (sinusoidal shape in case of sinusoidal motors). Usually, 48 V (or less) rated motors are used in automotive and robotics (hybrid cars and robotic arms).
Rotor
The rotor part of the BLDC Motor is made up of permanent magnets (usually, rare earth alloy magnets like Neodymium (Nd), Samarium Cobalt (SmCo) and alloy of Neodymium, Ferrite and Boron (NdFeB)).
Based on the application, the number of poles can vary between two and eight with North (N) and South (S) poles placed alternately. The following image shows three different arrangements of the poles. In the first case, the magnets are placed on the outer periphery of the rotor.

The second configuration is called magnetic-embedded rotor, where rectangular permanent magnets are embedded into the core of the rotor. In the third case, the magnets are inserted into the iron core of the rotor.
Position Sensors (Hall Sensors)
Since there are no brushes in a BLDC Motor, the commutation is controlled electronically. In order to rotate the motor, the windings of the stator must be energized in a sequence and the position of the rotor (i.e. the North and South poles of the rotor) must be known to precisely energize a particular set of stator windings.
A Position Sensor, which is usually a Hall Sensor (that works on the principle of Hall Effect) is generally used to detect the position of the rotor and transform it into an electrical signal. Most BLDC Motors use three Hall Sensors that are embedded into the stator to sense the rotor’s position.
The output of the Hall Sensor will be either HIGH or LOW depending on whether the North or South pole of the rotor passes near it. By combining the results from the three sensors, the exact sequence of energizing can be determined.
Working Principle
Consider the following setup of three windings in the stator designated A, B and C. For the sake of understanding, let us replace the rotor with a single magnet.

We know that when a current is applied through a coil, a magnetic field is generated and the orientation of the field lines i.e. the poles of the generated magnet will depend on the direction of the current flowing through the coil.
Using this principle, if we supply current to the coil A so that it will generate a magnetic field and attract the rotor magnet. The position of the rotor magnet will shift slightly clockwise and will align with A.
If we now pass current through coils B and C one after the other (in that order), the rotor magnet will rotate in clock wise direction.

To increase efficiency, we can wind the opposite coils using a single coil so that we get double attraction. Further increasing the efficiency, we can energize two coils at the same time so that one coil will attract the magnet and the other coil will repel it. During this time, the third will be idle.
For a complete 3600 rotation of the rotor magnet, six possible combinations of the coils A, B and C are applicable and are shown in the following timing diagram.

Base on the above diagram, we can confirm that at any time, one phase is positive, one phase is negative and the third phase is idle (or floating). So, based on the inputs from the Hall Sensors, we have two switch the phases as per the above diagram.