beautypg.com

Motorola M68HC08 User Manual

Page 82

background image

Software Design

Designer Reference Manual

DRM028 — Rev 0

82

Software Design

MOTOROLA

This information is compared with the reference set point and the error
signal is generated. The magnitude and polarity of the error signal
corresponds to the difference between the actual and desired speeds.
Based on the speed error, the PI controller generates the corrected
motor voltage in order to compensate for the error. The speed regulator
parameters (gain...), internal, and input/output variables are located in
the structure PIParamsScl_U8_Speed.

The speed controller works with a constant execution (sampling) period.
The period is timed by timer 3, with the constant PER_T3_RUN_US.

PWM duty cycle is set for all six PWM channels according to regulator
output, OutReg_U8. The maximum duty cycle is at OutReg_U8 = 255.
The implementation is described in

Implementation Notes

5.6.3

BLDC Speed Control and Calculation

.

5.3.9 Process Alignment Control

The process alignment control controls the current, Curr, using the PI
regulator during alignment state (see

5.5 State Diagram

). The dc-bus

current is regulated to required value Curr_Align. The current regulator
parameters (gain...), internal, and input/output variables are located in
the structure PIParamsScl_S8_Curr.

The current controller works with a constant execution (sampling)
period. The period is timed by timer1, with the constant
PER_CS_T1_US.

5.3.10 Processes Commutation and Zero Crossing Preset and Set

The processes commutation and zero crossing preset and set provides
the BLDC commutation and zero crossing selection. Here the BLDC
commutation means generation of the six step commutation which
creates the voltage system shown in

Figure 3-2

. The required BLDC

motor voltage system and commutation is provided using the
MC68HC08MR32 PWM block.

The zero crossing selection means the selection of the required zero
crossing phase as described in

3.2.4.2 Indirect Back EMF Sensing

and

F

re

e

sc

a

le

S

e

m

ic

o

n

d

u

c

to

r,

I

Freescale Semiconductor, Inc.

For More Information On This Product,

Go to: www.freescale.com

n

c

.

..