Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

PMSMtables.h File Reference


Detailed Description

Motor control tables.

This file contains the table definitions used for motor control.

Application note:
AVR447: Sinusoidal driving of three-phase permanent motor using ATmega48/88/168
Documentation
For comprehensive code documentation, supported compilers, compiler settings and supported devices see readme.html
Author:
Atmel Corporation: http://www.atmel.com
Support email: avr@atmel.com
Name
RELEASE_1_0
Revision
1.4
RCSfile
PMSMtables.h,v
Date
2006/03/16 11:57:20

Definition in file PMSMtables.h.

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Variables

__flash const uint8_t blockCommutationTableForward [16]
 Block commutation port direction masks, forward driving.
__flash const uint8_t blockCommutationTableReverse [16]
 Block commutation port direction masks, reverse driving.
__flash const uint16_t CSOffsetsForward [8]
 Sine table offset values corresponding to hall sensor values when running in the forward direction.
__flash const uint16_t CSOffsetsReverse [8]
 Sine table offset values corresponding to hall sensor values when running in the reverse direction.
__flash const uint16_t divisionTable [256]
 Divistion table used to obtain sine table increment without performing a division at high motor speed.
__flash const uint8_t expectedHallSequenceForward [7]
 Table of next expected hall sensor value when running forward.
__flash const uint8_t expectedHallSequenceReverse [7]
 Table of next expected hall sensor value when running in the reverse direction.
__flash const uint8_t sineTable [SINE_TABLE_LENGTH *3]
 Sine wave modulation table.


Variable Documentation

__flash const uint8_t blockCommutationTableForward[16]
 

Initial value:

{
  0,                          0,
  (1 << PB3),                 (1 << PD5),                 
  (1 << PB2),                 (1 << PD6),                 
  ((1 << PB2) | (1 << PB3)),  0x00,                       
  (1 << PB1),                 (1 << PD3),                 
  (1 << PB1),                 (1 << PD5),                 
  0x00,                       ((1 << PD6) | (1 << PD3)),  
  0,  0
}
Block commutation port direction masks, forward driving.

This array contains port direction masks for block commutation when running in the forward direction.

Definition at line 503 of file PMSMtables.h.

Referenced by BlockCommutate().

__flash const uint8_t blockCommutationTableReverse[16]
 

Initial value:

{
  0,  0,
  0x00,                       ((1 << PD6) | (1 << PD3)),  
  (1 << PB1),                 (1 << PD5),                 
  (1 << PB1),                 (1 << PD3),                 
  ((1 << PB2) | (1 << PB3)),  0x00,                       
  (1 << PB2),                 (1 << PD6),                 
  (1 << PB3),                 (1 << PD5),                 
  0,  0
}
Block commutation port direction masks, reverse driving.

This array contains port direction masks for block commutation when running in the reverse direction.

Definition at line 521 of file PMSMtables.h.

Referenced by BlockCommutate().

__flash const uint16_t CSOffsetsForward[8]
 

Initial value:

{
  0,
  5 * (SINE_TABLE_LENGTH / 6),
  1 * (SINE_TABLE_LENGTH / 6),
  0 * (SINE_TABLE_LENGTH / 6),
  3 * (SINE_TABLE_LENGTH / 6),
  4 * (SINE_TABLE_LENGTH / 6),
  2 * (SINE_TABLE_LENGTH / 6),
  0
}
Sine table offset values corresponding to hall sensor values when running in the forward direction.

This array contains the sine table offset that corresponds to the hall sensor values when running in the forward direction. At the moment of a hall change, using the new hall sensor value as index into this table returns the sine table offset that will synchronize the generated sine waves to the back-EMF of the motor.

Definition at line 569 of file PMSMtables.h.

Referenced by HallChangeISR().

__flash const uint16_t CSOffsetsReverse[8]
 

Initial value:

{
  0,
  1 * (SINE_TABLE_LENGTH / 6),
  5 * (SINE_TABLE_LENGTH / 6),
  0 * (SINE_TABLE_LENGTH / 6),
  3 * (SINE_TABLE_LENGTH / 6),
  2 * (SINE_TABLE_LENGTH / 6),
  4 * (SINE_TABLE_LENGTH / 6),
  0
}
Sine table offset values corresponding to hall sensor values when running in the reverse direction.

This array contains the sine table offset that corresponds to the hall sensor values when running in the reverse direction. At the moment of a hall change, using the new hall sensor value as index into this table returns the sine table offset that will synchronize the generated sine waves to the back-EMF of the motor.

Definition at line 590 of file PMSMtables.h.

Referenced by HallChangeISR().

__flash const uint16_t divisionTable[256]
 

Divistion table used to obtain sine table increment without performing a division at high motor speed.

This table contains 8.8 fixed point step size values for 'ticks' less than 256.

Definition at line 239 of file PMSMtables.h.

Referenced by SineTableIncrementCalculate().

__flash const uint8_t expectedHallSequenceForward[7]
 

Initial value:

{
  0xff,    3,    6,    2,    5,    1,    4
}
Table of next expected hall sensor value when running forward.

This array contains the next expected hall sensor value when running in the forward direction. The value at the index pointed to by the current hall sensor value is the next expected hall sensor value in the forward direction.

Definition at line 541 of file PMSMtables.h.

Referenced by ActualDirectionUpdate().

__flash const uint8_t expectedHallSequenceReverse[7]
 

Initial value:

{
  0xff,    5,    3,    1,    6,    4,    2
}
Table of next expected hall sensor value when running in the reverse direction.

This array contains the next expected hall sensor value when running in the reverse direction. The value at the index pointed to by the current hall sensor value is the next expected hall sensor value in the reverse direction.

Definition at line 555 of file PMSMtables.h.

Referenced by ActualDirectionUpdate().

__flash const uint8_t sineTable[SINE_TABLE_LENGTH *3]
 

Sine wave modulation table.

Table containing modulation values for all three phases. The table is organized as [U1, V1, W1, U2, V2, W2, ...] for forward driving, and [U1, W1, V1, U2, W2, V2, ...] for reverse driving.

Definition at line 37 of file PMSMtables.h.

Referenced by Timer1CaptureISR().


Generated on Mon Mar 27 09:31:34 2006 for AVR447: Sine wave driving of three phase motor by  doxygen 1.4.4