Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

ECE 5570 Lab 8

Brushless DC Motor Control with 6-Step Commutation

1 Introduction
The objective of the lab is to develop a velocity and position control system for a threephase permanent magnet motor. A standard method for current control of the motor is
to use a three phase inverter and 6-step commutation scheme to drive the motor. The
6-step commutation scheme for the motor is shown in Figure 1

Figure 1: 6-step commutation scheme for a three-phase motor


The invert provides a way to generate pseudo three-phase voltages to drive the motor
giving the correct switching strategy. Transistors in the figure are turned on and off
based on the commutation table for a Y-connected motor, define as
np!
-30! " 30!
30!"90!
90! "150!
150!"210!
210! "270!
270!" 330!

iA
0
- IREF
- IREF
0
IREF
IREF

iB
IREF
IREF
0
-IREF
- IREF
0

iC
- IREF
0
IREF
IREF
0
- IREF

To change the direction, one changes the sign of the current. For example, transistors
T2 and T6 are turned on in the -30! "30! step of the sequence for positive torque. For
negative torque, T3 and T5 are turned on.

2 Experiments
Equipment!list:!
You will need

!
!
!
!

!
!

brushless DC motor,
Brush DC motor,
Dual power amplifier,
A bread board, 6 - TIP 110 transistors, 6 - N1004 diodes,
an 0.51 " resistor (1%, 3W), 2 - LM324 chips, 9 - 1k "
resistors, 9 - 10k " resistors,
DC power supply to provide 5V.
Digital IO breakout cable

2.1 Hall effect sensors and Back-EMF


The motor connections should be interpreted as follows:
Large gauge wires ! Yellow wire: motor winding A.
! Red wire:
motor winding B.
! Black wire: motor winding C.
Small gauge wires ! Red wire:
Positive DC power to Hall-effect sensors.
! Black wire: Ground power to Hall-effect sensors.
! Blue wire:
Hall-effect sensor A.
! Green wire: Hall-effect sensor B.
! White wire: Hall-effect sensor C.
The first task of the lab is to connect a 5V power supply to the hall effect sensor power
(red and black) and on a bread board connect the sensor outputs (blue, green, white )
to the three digital inputs labeled 6,7,and 8 on the Digital IO breakout cable. The order
will be determine latter what matters is that each sensor is driving an input. Write down
the digital input each sensor is hooked to.
Connect the brushless DC motor to a brush DC motor and apply a positive voltage to
the brush DC motor to rotate both motors. Measure the induced back-emf voltages eA,
eB, and eC using ADCH2, ADCH3, ADCH4 of the dSPACE system (tye all the grounds
together). Make sure to note what motor phase is hooked to which A/D channel.
In Matlab, plot the line-to-line eA, eB, and eC back-emf voltages, as well as the sensor
voltages. Compare waveform plots to Figure 5.10 to fill in the following table
np!

hA

hB

hC

-30! " 30!


30!"90!
90! "150!
150!"210!
210! "270!
270!" 330!
A layout called data display is provided in dSpace to view the sensed current
(ADCH1), voltages (ADCH2 - 4) and digital input and output lines to try and ease
understanding of what is going on in the system.

2.3 Six-step commutation transistor drivers and logic


!

Develop the driver circuitry for the 6-step commutation diagram, using digital
outputs of the dSPACE system and an A/D input used for current feedback.
Since the digital output voltage is only a 5V TTL signal, amplifiers are necessary
to connect 6 digital outputs to the 6 transistor inputs. For example, one of the 4
op-amps of an LM324 chip can be used to connect the digital output D1 to the
transistor input T1 as shown Figure 2.

Figure 2: Op-amp connection as a buffer between the digital outputs and the transistors

The resistor R3 is chosen to limit the current to drive the transistor. For the T1,
T2 and T3 use R3 = 1 k " resistor. For the other transistors a 10 k " resistor can
be used. The resistors R1 and R2 are to provide a threshold voltage for the TTL
signal coming from the digital output. By choosing R1 = 10k " and R2 = 1k " a
voltage of 1/11*Vs is provide. This configuration is not generally desirable as it
possible to exceed the value of TTL low-state voltage given a large enough Vs
but the maximum voltage of the application is limited by the dSpace application
to 15 V.
Once the buffers are built, it is time to edit the lab8.c file to implement the logic.
The functions pos_commutate and neg_commutate are provided as a starting
point. Variables, bit_in[0..2], are connected to digital lines 6, 7, and 8. these are
the hall-effect sensor you connected earlier. Variables, bit_out[0..5], are
connected to digital lines 0 thru 5. Using the information you gained from the
relationship of the sensor states and back-emf fill in the bit_out[] states for the
provided bit_in[] combinations

!
!

Connect the Digital Outputs to the driver circuits.


Run the program in both the positive and negative commutation mode and check
for correct states at the buffer outputs. Spinning the motor by hand and checking
that the bit_in[] logic produces the correct bit_out[] logic.
! Build the Inverter circuitry being careful about the routing of wires and polarity of
the diodes. Test the circuitry of the inverter using the bench power supply so that
a current limit is provided in case of short circuits.
! Now that you are sure of the commutation table and inverter circuit. Hookup the
inverter to the buffers and the motor and use the dual power amplifier to provide
the voltage to the inverter and drivers.
Set the reference voltage to 12V and capture the following:
1. The data produced in positive and negative commutation mode. In matlab
plot ISENS and the motor velocity on the same figure but different subplots
2. Make note of the maximum startup current and the steady-state current
levels

2.1 Current control scheme


To understand the requirements of current control, pick the first state of the positive
commutation sequence, where current flows into winding B and out of winding C. Both
T2 and T6 will be on. This will result in a positive Isens. For the negative commutation
case of current through T3 and T5, the resulting sensed current will also be positive.
Any current regulating scheme must deal with Isens $ 0. In other current control
schemes when you desire positive (negative) torque you can would sense a positive
(negative) current. There is a one-to-one relationship where the magnitude and sign are
conserved. For this current regulation scheme only the magnitude is known, therefore;
to regulate the current around the desired value IREF , the transistors will be rapidly
turned on and off by comparing the magnitude of IREF to ISENS. The direction of
commutation is determined from the sign of IREF. A simple control law would be
abs( IREF ) ! ISENS and IREF " 0 positively commutate
abs( IREF ) # ISENS and IREF # 0 negatively commutate
otherwise turn off all outputs

A better control law would be a dead-zone type control law but other options may work
as well. The dead zone control law added a region, #, around which the controller is
disabled. This law can be expressed as
abs( IREF ) ! ISENS $ # and IREF " 0 positively commutate
!

abs( IREF ) # ISENS $ # and IREF # 0 negatively commutate


otherwise turn off all outputs

The value of # should be small enough to provide good tracking of the current reference,
while large enough to limit the frequency of switching. To avoid burning the motor, a

limit on the current reference IREF of about 4 amps should be inserted in the current
control scheme.
! Implement one of the current control laws in the Lab8.c. notice that EPS is
defined at the top of the code as 0.1
! Test the law by editing the velocity control, mode=3, switch case to provide a
current reference, IREF
! Set the IREF for a value greater than the steady-state current but smaller than
maximum starting current. Run the motor and notice how the waveform is
chopped on startup to limit the current by IREF
! Try a value of IREF close to or smaller than the steady state current . Does the
motor start? If the motor is helped to start with it keep running. Why or why not?

2.4 Velocity control scheme


Measure the position using a brush DC motor attached to the brushless DC motor. With
the derived estimate of the velocity, regulate the speed using a proportional controller. If
successful, try a proportional/integral controller for speed, as shown in Fig. 3. Look for
the best parameters to minimize the time constant of the response and the speed ripple.
w

!#$%

"#$%

&'()*+,
-.//0)1)2.3

"6$76$

!
!
!

4.).5
8199,*::*-)

Figure 3: Speed control using 6-step commutation


Capture the step response of the system by stepping the reference signal from
40 rad/sec to 80 rad/sec and back to 40 rad/sec
Comment on the time constant and any overshoot and document your controller
gains
Comment on any limit that exists for the minimum time constant

2.5 Position control scheme


Extend the proportional control scheme for speed to obtain a position control scheme,
as shown in Fig. 4. Find parameters to obtain the fastest response.

;%;<!
=#$%

!#$%

;>
;<!
!

=!

"#$%

&'()*+,
-.//0)1)2.3!

"6$76$

4.).5
8199,*::*-)

Figure 4: Position control of a three-phase permanent magnet motor


!

Capture and plot the best step response for an small step, %REF = 90 deg

Implement an anti-windup measure to turn of the integrator when | IREF | > Vs / R

Capture and plot the best response for large step, %REF = 3600 deg

Comment on the shape of the responses and document your controller gains

You might also like