3-phase Brushless DC Motor control with Hall sensors

As the use of BLDCM is increasing, we will build a simple example of BLDCM with a sensor-based control. In this example, we use a DC source to drive a three-phase brushless DC motor through a DC/AC inverter. Then install three Hall Effect sensors to measure the position of the rotor. Hall Effect sensor is one kind of position sensors which is often used when a motor requires a high initial or starting torque. Hall sensors send hall signals to control the commutation sequence while the north pole (shown as the red magnet) is in front of any of them.

<br>Click to close the image

To get a DC source (can also use a battery), left-click Components/Circuit/Source/V (step 1) and release the mouse. The voltage follows the cursor and right-click to change its direction (step 2). Until the voltage source is upward, left-click to put the voltage source on the workscreen. Currently we have not set an electric ground so that CASPOC will give a suggested message to insert an electric ground automatically. Click yes to insert the ground (step 3). Make sure there is a ground label shown in the anode of the DC source after the auto-insertion (step 4). Right-click on the voltage source (step 5) to modify its parameter. In the pop-window, enter value = 150 (step 6), make the rotary direction is 90 degree (step 7) and click OK to save the settings (step 8).

<br>Click to close the image

Here we need six MOSFETs and six diodes to build a DC/AC inverter. Left-click Components/Circuit/Semiconductors/D/MOSFET (step 1) and release the mouse. The MOSFET follows the cursor and left-click on the workscreen to put the MOSFET in the upper right corner of the voltage source. Right-click on the MOSFET (step 2) to change its parameters. In the pop-window, we can see the parameters as below (step 3):

Make sure that the rotary direction is 90 degrees (step 4) and then click OK to save the setting (step 5).

<br>Click to close the image

Again, left-click Components/Circuit/Semiconductors/MOSFET (step 1) and release the mouse. Left-click on the workscreen to place the second MOSFET in the right side of the first MOSFET (step 2). Right-click the MOSFET to modify BVdss(Vmax) = 1e35 (step 3), check the rotary direction is 90 degrees (step 4), and click OK to save the setting (step 5). Repeat the previous steps to add four more MOSFETs with the following configuration (step 6-9).

<br>Click to close the image

Left-click Components/Circuit/Semiconductors/D (step 1) and release the mouse. The diode follows the cursor and right-click to change its direction (step 2). Until the cathode of the diode is upward, left-click to put the diode in the right side of the first MOSFET (step 3). Right-click the diode to modify its parameters. In the pop-window, we can see the parameters as below:

Make sure the rotary direction is 270 degrees (step 5) and click OK to save the settings (step 6).

<br>Click to close the image

Again, left-click Components/Circuit/Semiconductors/D (step 1) and release the mouse. Left-click on the workscreen to put the second diode in the right side of the second MOSFET (step 2). Right-click the diode to modify BV(BreakDown) = 1e35 (step 3), check the rotary direction is 90 degrees (step 4), and click OK to save the setting (step 5). Repeat the previous steps to add four more MOSFETs with the following configuration (step 6-9).

<br>Click to close the image

To measure the current value between the DC source and the inverter, add a current sensor in the DC circuit. Left-click Components/Library/Sensor/Current/I (step 1) and release the mouse. Left-click on the workscreen to put the current sensor around the cathode of the MOSFET and the anode of the DC voltage source (step 2). Right-click on the current sensor to change its internal resistance R= 1n (=1 nano ohm) (step 3). Make sure the rotary direction is 0 degree (step 4) and click OK to save the setting (step 5). Connect all the MOSFETs, diodes and the voltage source with the following configuration (step 6). Make sure there is a ground label (electrical ground) in the anode of the voltage source (step 7).

<br>Click to close the image

Also, we put a three-phase current sensor for measuring the output currents of the DC/AC inverter. Left-click Components/Library/Sensor/Current/I_3phase (step 1) and release the mouse. Left-click on the workscreen to put the 3-phase current sensor in the right side of the inverter (step 2). Left-click on the current sensor to modify its parameter. In the pop-window, enter R=1u (=1 micro ohm) (step 3), make sure the rotary direction is 0 degree (step 4) and click OK to save the setting (step 5). Then, connect the current sensor and the inverter with the following configuration (step 6).

<br>Click to close the image

Give labels for the output values of these current sensors. To get the direct current value, right-click on the bottom output of the current sensor (step 1) to give a label. In the pop-window, enter label = I_dc (step 2) and click OK to save the setting (step 3). To get the 3-phase alternating current values, assign 3 labels to the 3 bottom outputs. Right-click the bottom left one (step 4), enter label = I_a (step 5) and click OK to save the setting (step 6). Right-click the bottom center one (step 7), enter label = I_b (step 8) and click OK to save the setting (step 9). Right-click the bottom right one (step 10), enter label = I_c (step 11) and click OK to save the setting (step 12).

<br>Click to close the image

Our goal is to drive a BLDC motor by using a DC voltage source and an inverter. To add a BLDCM, left-click Components/Library/ElectricalMachines/Brushless/Brushless (step 1) and release the mouse. The BLDCM follows the cursor and left-click on the workscreen to put it in the right side of the 3-phase current sensor. Make sure that the 3-phase current inputs are well connected to the current sensor (step 2). Right-click on the BLDCM (step 3) to modify the parameters. In the pop-window, we can see the parameters as below (step 4):

Click OK to save the settings (step 5).

<br>Click to close the image

According to BLDCM’s high starting torque, we use Hall Effect sensors to measure the rotor’s position in order to control the ON/OFF states of the six MOSFETs in the inverter. Left-click Components/Sensor/Rotational/Encoder/HallThreePhase (step 1) and release the mouse. Left-click on the workscreen to put the hall sensors in the right side of the BLDCM. Make sure that the BLDCM is well connected with the hall sensors (step 2). Right-click on the hall sensors (step 3) to modify its parameters if needed. In the pop-window, we can see the parameters as below (step 4):

Click OK to save the setting (step 5).

<br>Click to close the image

To get the hall signals and control the ON/OFF state of MOSFET, we use a commutation sequence. Left-click Components/Library/ElectricalMachine/Brushless/CommutationSequence (step 1) and release the mouse. Left-click on the workscreen to put the commutation sequence below the DC/AC inverter. Connect the three bottom outputs of the hall sensors to the right inputs of the commutation sequence (step 2).

Assign three labels to the three hall output signals. Right-click on the first input signal (step 3), enter label = H1 (step 4) and click OK to save the setting (step 5). Right-click on the second input signal (step 6), enter label = H2 (step 7) and click OK to save the setting (step 8). Right-click on the third input signal (step 9), enter label = H3 (step 10) and click OK to save the setting (step 11).

<br>Click to close the image

Connect the gates of these MOSFETs to the commutation sequence with the following configuration (step 1). Also assign six labels for the six gates: Right-click on the upper left gate (step 2), enter label = QH_1 (step 3) and click OK to save the setting (step 4). Right-click on the lower left gate (step 5), enter label = QL_1 (step 6) and click OK to save the setting (step 7). Right-click on the upper center gate (step 8), enter label = QH_2 (step 9) and click OK to save the setting (step 10). Right-click on the lower center gate (step 11), enter label = QL_2 (step 12) and click OK to save the setting (step 13). Right-click on the upper right gate (step 14), enter label = QH_3 (step 15) and click OK to save the setting (step 16). Right-click on the lower right gate (step 17), enter label = QL_3 (step 18) and click OK to save the setting (step 19).

<br>Click to close the image

To measure the voltage values after the inverter, we assign also three labels: Right-click on the upper anode of the 3-phase current sensor (step 1), enter label = V_a (step 2) and click OK to save the setting (step 3). Right-click on the middle anode of the 3-phase current sensor (step 4), enter label = V_b (step 5) and click OK to save the setting (step 6). Right-click on the lower anode of the 3-phase current sensor (step 7), enter label = V_c (step 8) and click OK to save the setting (step 9).

Before adding a mechanical load, install an encoder which provides the information of torque (T), power (P), angular speed (ω) and the position of the rotor(θ). Left-click Components/Library/Sensor/Rotational/Encoder (step 10) and release the mouse. Make sure the encoder is well connected with the hall sensor (step 11). Assign the torque output a label by right-clicking it (step 12), enter label = T (step 13) in the pop-window, and then click OK to save the setting (step 14).

<br>Click to close the image

Add a mechanical load for the rotating rotor of BLDCM. Left-click Components/Library/Mechanic/Rotational/LoadQuadratic (step 1) and release the mouse. Left-click on the workscreen to put the quadratic load in the right side of the encoder. Make sure the load is connected to the encoder (step 2). Right-click on the quadratic load to modify its parameters (step 3). In the pop-window, we can see the parameters as below (step 4):

Click OK to save the setting (step 5).

<br>Click to close the image

First, we take a scope for getting the direct current value. Click the scope icon in the experience bar (step 1) and release the mouse. Left-click to put the scope below the commutation sequence (step 2). Left-click the right-bottom corner of the scope and hold down the mouse to enlarge this scope (step 3). Connect the label I_dc to the input trace of the scope.

<br>Click to close the image

Take second scope to read the 3-phase alternating current values (step 1). Click the scope icon in the experience bar (step 2) and release the mouse. Left-click to put the scope below the first scope. Left-click the right-bottom corner of the scope and hold down the mouse to enlarge this scope (step 3). Left-click the first blue input trace and draw it leftward a bit to extend its length (step 4). Repeat the same steps with the second red and the third azure input traces.

Right-click the first input trace (step 5) to add a label. In the pop-window, enter label = I_a (step 6) and click OK to save the setting (step 7). Right-click the second input trace (step 8) to add a label. In the pop-window, enter label = I_b (step 9) and click OK to save the setting (step 10). Right-click the third input trace (step 11) to add a label. In the pop-window, enter label = I_c (step 12) and click OK to save the setting (step 13).

<br>Click to close the image

Take third scope to read the 3-phase voltage values (step 1). Click the scope icon in the experience bar (step 2) and release the mouse. Left-click to put the scope below the second scope. Left-click the right-bottom corner of the scope and hold down the mouse to enlarge this scope (step 3). Left-click Components/Library/Sensor/Voltage/v2 (step 4) and put it in the left side of the third scope. Right-click the upper input of the voltage differential sensor (step 5), enter label = V_a (step 6) in the pop-window and then click OK to save the setting (step 7). Right-click the lower input of the voltage differential sensor (step 8), enter label = V_b (step 9) in the pop-window and then click OK to save the setting (step 10).

<br>Click to close the image

Take three more scopes to read 3 hall signals (step 1). Click the scope icon in the experience bar (step 2) and release the mouse. Left-click to put the scope below the second scope. Left-click the right-bottom corner of the scope and hold down the mouse to enlarge this scope (step 3). Repeat the steps to put two more scopes (step 4 and 5). Left-click the first blue input trace of scope 4 and draw it leftward a bit to extend its length, the same steps for scope 5 and 6. Right-click the first input trace of scope 4 (step 6) to add a label. In the pop-window, enter label = H1 (step 7) and click OK to save the setting (step 8). Right-click the first input trace of scope 5 (step 9) to add a label. In the pop-window, enter label = H2 (step 10) and click OK to save the setting (step 11). Right-click the first input trace of scope 6 (step 12) to add a label. In the pop-window, enter label = H3 (step 13) and click OK to save the setting (step 14).

<br>Click to close the image

Take 2 more scopes to read the torque value and the ON/OFF states of the upper gates. Click the scope icon in the experience bar (step 1) and release the mouse. Left-click to put the scope below the sixth scope. Left-click the right-bottom corner of the scope and hold down the mouse to enlarge this scope (step 2). Repeat these steps to add one more scope below scope 7 (step 3).

Left-click the first blue input trace of scope 7 and draw it leftward a bit to extend its length. Right-click the first input trace of scope 7 (step 4) to add a label. In the pop-window, enter label = T (step 5) and click OK to save the setting (step 6).

Left-click the first blue input trace of scope 8 and draw it leftward a bit to extend its length. Repeat the same steps with the second red and the third azure input traces. Right-click the first input trace of scope 8(step 7) to add a label. In the pop-window, enter label = QH_1 (step 8) and click OK to save the setting (step 9). Right-click the second input trace of scope 8 (step 10) to add a label. In the pop-window, enter label = QH_2 (step 11) and click OK to save the setting (step 12). Right-click the third input trace of scope 8 (step 13) to add a label. In the pop-window, enter label = QH_3 (step 14) and click OK to save the setting (step 15).

<br>Click to close the image

Take ninth scope to read the ON/OFF states of the lower gates. Click the scope icon in the experience bar (step 1) and release the mouse. Left-click to put the scope below the eighth scope. Left-click the right-bottom corner of the scope and hold down the mouse to enlarge this scope (step 2).

Left-click the first blue input trace of scope 9 and draw it leftward a bit to extend its length. Repeat the same steps with the second red and the third azure input traces. Right-click the first input trace (step 3) to add a label. In the pop-window, enter label = QL_1 (step 4) and click OK to save the setting (step 5). Right-click the second input trace (step 6) to add a label. In the pop-window, enter label = QL_2 (step 7) and click OK to save the setting (step 8). Right-click the third input trace (step 9) to add a label. In the pop-window, enter label = QL_3 (step 10) and click OK to save the setting (step 11).

<br>Click to close the image

Take the last scope for reading the angular speed of the rotor. Click the scope icon in the experience bar (step 1) and release the mouse. Left-click to put the scope below the encoder. Left-click the right-bottom corner of the scope and hold down the mouse to enlarge this scope (step 2). Connect the angular speed output (ω) to the first input trace of scope 10 (step 3).

<br>Click to close the image

Click the short-cut of simulation parameter (step 1). In the pop-window, select Euler for the Numerical Integration Method (step 2), Tscreen = 500m, dt = 100u (step 3) and then click OK to save the setting (step 4).

<br>Click to close the image

Click the short-cut of start simulation and then we can see the measured information is shown in all the scopes. From the scopes, we can see that in order to reach a certain angular speed, the starting torque is very high. After 50 milliseconds, the torque drops and keeps stable, so does the current value.

<br>Click to close the image

The following picture shows the structure inside the BLDCM. The red part represents the North Pole and the blue the South Pole. When the North Pole is in front of any of these hall sensors, a hall signal will be sent to control the commutation sequence. In the end of the simulation, we can see the first and third hall sensors are both sending a hall signal because of the North Pole. Only second hall sensor sends no signal at the moment. We can also find that ON/OFF state of these MOSFETs strongly depend on the hall signal for either upper or lower gates.

<br>Click to close the image
© 2018 CASPOC, All rights reserved. Home   |   Terms and Conditions   |   Legal   |   Export Compliance   |   Privacy Policy   |   Site Map