Project

Week 7 Challenge DC Motor Control

Week 7 Challenge: DC Motor Control

  1. Run MATLAB demo ‘Speed control of a DC motor using BJT H-bridge’. Modify the model such that armature current doesn’t shoot up when motor changes direction from forward to reverse.
  2. Refer to help section of ‘The Four-Quadrant Chopper DC Drive (DC7) block’. Compare it with H-bridge model.
  3. Make a suitable EV model using DC7 block and make result report.

ANS 1:

In the MATLAB/SIMULINK documentation, we can search for the simulation model of the \'Speed control of a DC Motor using BJT H-bridge\'. It is used to generate a chopped voltage and to control the speed of the DC motor. This model can be opened in SIMULINK from the documentation itself. As the name suggests, it uses a BJT (Bipolar Junction Transistor which is a type of transistor that uses both electrons and holes as charge carriers, hence the name bipolar. Other transistors such as FETs (Field Effect Transistors) are unipolar transistors meaning that they only use one type of charge carrier. BJTs are used for switching and amplifying applications.

BJTs have 3 terminals which are: the emitter (E), the base (B) and the collector (C). Current flows in only the emitter and the collector and the amount of current that flows through them is controlled by the base. BJTs use semiconductors in their working, and so there are 2 types of BJT: NPN type and PNP type. Their circuit symbols are shown below:

  • PNP Transistor

This type uses 2 p-type semiconductors and one n-type semiconductor. The n-type semiconductor will be the base of the transistor. The emitter terminal is more positive in relation to the collector and base terminals. The collector is connected to positive supply and emitter is connected to negative supply. The base terminal is supplied with voltage and it operates the transistor by switching between ON or OFF states. When the base voltage is the same as the emitter voltage, the transistor is in the OFF state. When the base voltage decreases with respect to the emitter voltage, the transistor is in the ON state.

  • NPN Transistor

This type uses 2 n-type semiconductors and one p-type semiconductor. The p-type semiconductor will be the base of the transistor. Construction wise it is exactly the same as the PNP type having 3 terminals. Just as in the PNP type, the collector terminal is conneced to the positive voltage supply and the emitter terminal is connected to the negative voltage supply. The base terminal is supplied with a voltage and controls the transistor being either in an ON or OFF state. When the base voltage is the same as the emitter voltage, the transistor will be in the OFF state. When the base voltage increases with respect to the emitter voltage, the transistor will be in the ON state.

BJT H-Bridge

When the BJT is conducting i.e. operating in the saturated region, there will be a forward voltage developed between the collector and the emitter (in the range of 1V). An IGBT is used to model the BJT because of this. The switch is controlled by a SIMULINK signal. The DC motor used in this model is preset to with specifications: 5HP, 24V, 1750rpm. It simulates a fan type load where the load is proportional to the square of the speed. The mean armature voltage can be varied between 0 and 240V when the duty cycle is changed anywhere from 0 to 100%. The duty cycle can be changed from the pulse generator block.

The H-bridge consists of 4 BJT and Diode pairs. Two transistors are switched on simultaneously: Q1 and Q4 or Q2 and Q3. When Q1 and Q4 are fired, a positive voltage is applied to the motor and the diodes, D2 and D3 operate as free wheeling diodes when Q1 and Q4 are switched off. Similarly, when Q2 and Q3 are fired, a negative voltage is applied to the motor and the diodes, D1 and D4 operate as free wheeling diodes when Q2 and Q3 are switched off.

By default, the motor will start in the positive direction and has a preset duty cycle of 75% with a mean DC voltage of 180V. At t = 0.5 seconds, the armature voltage will reverse and the motor will run in the negative direction.

This is the SIMULINK model for the BJT H-Bridge used in the speed control of a DC motor:

The second part of this model is shown below:

Here, we can see the \'Pulse Generator 500Hz\' block. If we open it, we will get a dialog box with its settings which is shown below:

As we can see, the pulse generator is already preset with some settings. The pulse width field allows us to modify the duty cycle of the motor and hence, we can prevent the motor current from shooting up when the motor changes its direction from forward to reverse. By default the duty cycle is 75% meaning that the voltage is supplied to the motor for 75% of the time for one cycle. For the remaining 25%, the motor is off and receives no voltage from the source. It is this alternation between the ON and OFF states, that allows us to vary the voltage that is supplied to the motor and thereby control the speed of an electric vehicle.

The image below shows the output of the scope when the simulation is run using the preset values in the pulse generator block. There are 3 output graphs of angular speed, armature current and the load torque all against a time axis.

For this question, we are interested in modifying the simulation in order to prevent the initial shoot up of the armature current at the start of the cycle. This shootup occurs whenever the armature voltage reverses direction which is every 0.5 seconds. In the second graph above (which shows the armature current vs. time) we can see that at the start of the cycle, there is a sharp increase in the armature current that then decreases and comes to a more stable level where it remains until 0.5 seconds. When the next cycle begins, the exact same effect occurs but in the negative axis because in this cycle, the armature voltage is reversed.

This frequency of reversing the voltage direction has been preset in the \'armature voltage control\' block. Opening it will give you a dialog box of its setting where the \'step time\' field controls the frequency at which the voltage is reversed.

If we change the duty cycle i.e. the pulse width, we can control this initial shoot up of the current that occurs every time the armature voltage direction is reversed. When the duty cycle is decreased to 50% the output graph that is obtained is shown below:

For the 50% duty cycle, we can see that armature current does not shoot up initially for the positive direction of the armature voltage. However, after the 0.5 second mark when the armature voltage is reversed, the armature current shoots up in the negative direction. So, we need to decrease the duty cycle further to prevent this.

This time, I have reduced the duty cycle to 40%. The output graph is shown below:

Here, we can see that at the start of the cycle in the positive armature voltage direction, the armature current does not shoot up like it did before. The armature current increases immediately to approximately 7A and it maintains that level until the next cycle where the armature voltage is reversed to -7A.

ANS 2:

The four quadrant chopper DC drive block in MATLAB/SIMULINK represents a four quadrant, DC supplied chopper drive for DC motors. It is also referred to as the \'DC7\' motor drive in SIMSCAPE. It features closed loop speed control with four quadrant operation. The closed loop speed control will output the armature current of the machine. Using a PI current controller, the chopper duty cycle corresponding to the commanded armature current is derived. The duty cycle is then compared with a sawtooth carrier signal to obtain the required PWM signals for the chopper.

Compared to other DC drives, the main advantage of using the four quadrant chopper DC drive is that it can operate in all 4 quadrants. Each quadrant in its characteristics represents a different mode of operation. The first quadrant is forward motoring, the second is reverse braking, the third is reverse motoring and the forth is forward braking. Another advantage is that it uses high switching frequency DC-DC converters resulting in a lower armature current ripple is occurs than compared to thyristor based DC drives.

The image below shows the DC7 block:

The detailed circuit diagram for the DC7 block is shown below:

The four quadrant chopper DC drive uses these 4 main blocks from the fundamental drive blocks library:

  • speed controller
  • current controller
  • regulation switch
  • chopper
dc7_example 

Entering this code shown above in the command window will open the SIMULINK model for the 4 quadrant chopper DC drive.

4 quadrant chopper DC drives are used mainly due to their ability to work in the 4 different quadrants of operation. It allows the controller to command the DC motor to rotate in clockwise and counter clockwise directions and to perform braking. Traditional DC motors would rely on the innate friction and air resistance forces or actual physical brakes to bring the motor to rest. The other simpler option is to switch off the motor till it comes to rest.

Operation

  • Forward Motoring: motor rotates clockwise and controller applies a clockwise drive.
  • Reverse Motoring: motor rotates anti-clockwise and controller applies an anti-clockwise drive.
  • Forward Braking: motor rotates clockwise and controller applies anti-clockwise drive.
  • Reverse Braking: motor rotates anti-clockwise and controller applies a clockwise drive.

Advantages

4 quadrant choppers have more control over the deceleration of the motor and can more accurately brake the motor. This will make the deceleration more smoother. The second benefit is that it reduces the risk of current spikes (and possibly damage the motor and the controller) which can occur when the motor is made to brake while running at a high speed. So the controller life is generally longer with 4 quadrant choppers. A third advantage is that 4 quadrant choppers are more efficient because lesser energy is wasted as heat and lesser current spikes occur which means lesser power dissipation. Finally, the 4 quadrant chopper makes regenerative braking possible so that when the motor is made to brake, the kinetic energy of the rotor moving is transferred back as electrical energy which can then be used to charge a battery.

Comparison to H-Bridge

Both BJT H-bridges and 4 quadrant choppers have their advantages and disadvantages. H-Bridges like the 4 quadrant choppers are also capable of the braking operation without using air resistance or friction or physical brakes to bring the motor to rest. 4 quadrant DC choppers are more commonly used in automobiles whereas BJT H-bridges are commonly used in robotics and electro-mechanical devices.

Unlike 4 quadrant DC choppers, BJT H-bridges are not capable of performing regenerative braking but they can perform dynamic braking. It is this difference that makes 4 quadrant DC choppers useful in hybrid and electric vehicles.

In 4 quadrant DC choppers, the current signals are interrupted with one another to change the direction of rotation of the motor. This is done by a speed reference or a drive cycle from which the speed values are converted to current signals which interrupt one another to change the rotation of direction of the motor. However in BJT H-bridges, the polarity of the current is reversed (depending on the duty cycle) to change the direction of rotation of the motor.

Also, the current signals in 4 quadrant DC choppers are chopped meaning that they are not continuous, they are discrete and so take less time for simulations. But in BJT H-bridges, the current values are not chopped, meaning that they are continuous and so take more time for simulations.

Finally, in 4 quadrant DC choppers, a PI controller is used to control the speed and the current and in the H-bridge, this is not implemented.

ANS 3:

Using the four quadrant DC chopper drive, we will now model an electric vehicle. The screenshot of my model is shown below:

On the left hand side, we can see that I have replaced the default blocks of the DC7 model with new blocks of my making. The first block to be replaced is the linear load torque block. For this model of the EV, we will be using a new equation that characterizes the relation between the torque and the speed which is shown below:

`T_m = 0.0051omega^2 + 24.7`

where:

angular speed of motor (radians per second) - `omega`

Torque of motor (Nm) - Nm

To model this relation in SIMULINK, we need to first insert the math function block which will perform power functions. In our case, we need to square the angular speed of the motor. So a connection is made between the DC chopper drive block to the math function block.

Math Function Block:

Next, the math function block is connected to a \'gain\' block to multiply the squared angular speeds with a coefficient, 0.0051 as needed by the torque-speed equation. The \'gain\' block is modified with the gain value of 0.0051.

Gain Block:

A new block called a \'constant\' block is created with a constant value of 24.7 as needed by the torque-speed equation.

Constant Block:

The gain block and the constant block are separate and both connect to the \'add\' block so that the terms from the 2 blocks are added together which gives the RHS of the torque-speed equation. The add block is then connected to the \'Tm\' terminal of the DC chopper drive block.

Add Block:

Next, a DC voltage source block is inserted from the library and the negative terminal is connected to the \'Gnd\' i.e. ground terminal of the DC chopper drive block. The DC voltage source is modifed with a voltage amplitude of 200V.

DC Voltage Block:

The positive terminal of the DC voltage source is connected to a \'current measurement\' block of which the negative terminal is connected to the \'Vcc\' terminal of the DC chopper drive block.

Current Measurement Block:

The \'i\' terminal of the current measurement block is connected to a newly made \'scope\' block.

Scope Block:

Finally, a drive cycle is inserted from the workspace of my own making. This drive cycle has a duration of 10 seconds and it is just a numeric matrix of time and velocity in the first and second columns respectively. This drive cycle block is connected to the \'SP\' terminal of the DC chopper drive block. The drive cycle block and the cycle itself is shown below:

Drive Cycle Block:

Then, the \'stop time\' of the simulation is set to 10 seconds because the drive cycle is also 10 seconds in duration. After this, the simulation is run and the output of the simulation is seen from the scope block connected to the selector block.

The screenshot of the scope output is shown below:

These graphs are zoomed in at the y-axis for better readability.

We can see that the results of the different graphs are plotted against the time axis up to 10 seconds which matches the duration of the drive cycle which was inserted to the DC chopper drive block. The first 2 graphs show the duty cycles of the IGBT switches 1&4 and 2&3 and it is evident that the 2 graphs are mirror images of one another. The results of each of the the scope outputs are explained below.

IGBT 1&4 Duty Cycle

Initially, there is a spike in the duty of IGBT switches 1&4 because the system is adjusting itself to provide the correct voltage to the operate the motor. Throughout the operation, the duty cycle is seen in pulses as it steadily increases to change the output voltage that is provided to the motor load. The duty cycle increases to reach a peak value of 0.535 at t = 6 seconds which is when the motor angular speed is a maximum of 30 radians per second. After this, the duty cycle decreases as the motor angular speed decreases and eventually reaches the duty cycle level at which it started. The increase and decrease in the duty cycle corresponds to the power requirement by the motor to achieve a particular angular speed. When the motor angular speed increases, the duty cycle will also increase so that the average voltage that is supplied to the motor will be more. When the motor angular speed decreases, the duty cycle will also decrease so that the average voltage that is supplied to the motor will be lesser.

IGBT 2&3 Duty Cycle

Similar to IGBT 1&4, there is initially a spike in the duty cycle as the system adjusts itself to provide the correct voltage to operate the motor. The duty cycle of IGBT switches 2 and 3 decreases in pulses as the motor angular speed increases. The decrease in this duty cycle correspond to the increase in the duty cycle of IGBT 1&4. In other words, the first 2 graphs are mirror images of each other by form shape. The duty cycle reaches a minimum of 0.467 at t = 6 seconds when the motor angular speed is at a maximum level of 30 radians per second. From here, the duty cycle increases for the rest of the drive cycle as the motor speed decreases. The increase and decrease in the duty cycle corresponds to the power requirement by the motor to achieve a particular angular speed. When the motor angular speed increases, the duty cycle will also increase so that the average voltage that is supplied to the motor will be more. When the motor angular speed decreases, the duty cycle will also decrease so that the average voltage that is supplied to the motor will be lesser.

Armature Voltage

The armature voltage from the graph appears to be fluctuating between 100V and -100V and this is occurring at a very high frequency. The armature voltage will fluctuate because everytime the power switch occurs between IGBT 1&4 and 2&3, the polarity of the voltage will reverse as it flows through the armature of the inductor. When IGBT switches 1&4 are ON and switches 2&3 are OFF, the polarity of the armature voltage polarity will be positive. When IGBT switches 2&3 are ON and switches 1&4 are OFF, the armature voltage polarity will be negative. This fluctuation in polarity will continue throughout the drive cycle as the motor will operate in the forward motoring mode only since the motor is not being made to brake or rotate in the reverse direction.

Armature Current

Initially, there is a spike in the armature current when the motor starts to work. The armature current then stabilizes its fluctuation levels between approximately 5A and 13A within the first 0.1 seconds of time. Then, the armature current fluctuations occur very rapidly as the IGBT switches 1&4 get switched ON and OFF continuosly at a very high frequency. This switching is done obviously to control the power that the motor receives to make it perform the forward motoring operation. The forward motoring operation occurs till t = 6 seconds which is when the motor angular speed is a maximum. After this, the motor angular speed decreases till the end of the drive cycle and this causes a change in the fluctuation of current. The maximum armature current and minimum armature current both decrease as the power requirement to the motor decreases when the motor angular speed decreases. The armature current follows the drive cycle data very well.

Motor Speed

This graph is simply plotting the motor angular speeds against the time and just translates the drive cycle data in to a plot. The angular speed of the motor increases gradually from rest at t = 0 seconds to a maximum level of 30 radians per second at t = 6 seconds. It is at this point, that the maximum power is required by the motor to achieve this angular speed. From here, the motor speed steadily decreases and eventually returns to the resting state by the end of the drive cycle at t = 10 seconds.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.