21.01.2014 Views

3.22EjemploDRM007 Co..

3.22EjemploDRM007 Co..

3.22EjemploDRM007 Co..

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Software Design <strong>Co</strong>nsiderations<br />

The desired time constant is 100 milliseconds for the closed loop<br />

system. That gives the following values for the controller parameters:<br />

Ki = 0.00995<br />

Kp = 0.094609<br />

In the microcontroller implementation of this controller, a scale factor is<br />

defined. It is better if the scale value is a power of two. So, 256 is our<br />

scale value.<br />

I_ Gain = 0.00995 • 256 = 2.54 ≈ 3<br />

P_Gain = 0.094609 • 256 = 24.22 ≈ 24<br />

Once the controller parameters are calculated, it is possible to<br />

implement them into the microcontroller.<br />

The PI controller implementation is shown in Figure 5-1.<br />

5.4 Speed <strong>Co</strong>ntrol Algorithm<br />

The speed control algorithm consists of three main parts: the actual<br />

speed calculation, the speed regulator by a PI controller, and a motor<br />

stalled protection. This algorithm is executed by a timer overflow<br />

interrupt handler each millisecond. The flowchart of this interrupt handler<br />

is shown in Figure 5-2.<br />

DRM007<br />

BLDC Motor <strong>Co</strong>ntrol Board for Industrial and Appliance Applications<br />

76 Software Design <strong>Co</strong>nsiderations MOTOROLA

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!