PMSM_tables.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 ATtiny261/461/861.
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$
Revision
2571
$RCSfile$
Date
2007-10-08 15:53:50 +0200 (ma, 08 okt 2007)

Definition in file PMSM_tables.h.

#include "PMSM.h"
#include "stdint.h"

Include dependency graph for PMSM_tables.h:

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

Go to the source code of this file.

Variables

uint8_t __flash const blockCommutationTableForward [8]
 Block commutation Output Compare Override Enable masks.
uint8_t __flash const blockCommutationTableReverse [8]
 Block commutation Output Compare Override Enable masks.
__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 uint8_t expectedHallSequenceForward [8]
 Table of next expected hall sensor value when running forward.
__flash const uint8_t expectedHallSequenceReverse [8]
 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

uint8_t __flash const blockCommutationTableForward[8]

Initial value:

{
  0x00,
  ((1 << WH_OCOE) | (1 << UL_OCOE)),
  ((1 << UH_OCOE) | (1 << VL_OCOE)),
  ((1 << WH_OCOE) | (1 << VL_OCOE)),
  ((1 << VH_OCOE) | (1 << WL_OCOE)),
  ((1 << VH_OCOE) | (1 << UL_OCOE)),
  ((1 << UH_OCOE) | (1 << WL_OCOE)),
  0x00
}
Block commutation Output Compare Override Enable masks.

This array contains Output Compare Override Enable masks for block commutation when running in the forward direction.

Definition at line 257 of file PMSM_tables.h.

Referenced by BlockCommutate().

uint8_t __flash const blockCommutationTableReverse[8]

Initial value:

{
  0x00,
  ((1 << UH_OCOE) | (1 << WL_OCOE)),
  ((1 << VH_OCOE) | (1 << UL_OCOE)),
  ((1 << VH_OCOE) | (1 << WL_OCOE)),
  ((1 << WH_OCOE) | (1 << VL_OCOE)),
  ((1 << UH_OCOE) | (1 << VL_OCOE)),
  ((1 << WH_OCOE) | (1 << UL_OCOE)),
  0x00
}
Block commutation Output Compare Override Enable masks.

This array contains Output Compare Override Enable masks for block commutation when running in the reverse direction.

Definition at line 275 of file PMSM_tables.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 322 of file PMSM_tables.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 343 of file PMSM_tables.h.

Referenced by HallChangeISR().

__flash const uint8_t expectedHallSequenceForward[8]

Initial value:

{
  0xff,    3,    6,    2,    5,    1,    4,   0xff
}
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 295 of file PMSM_tables.h.

Referenced by ActualDirectionUpdate().

__flash const uint8_t expectedHallSequenceReverse[8]

Initial value:

{
  0xff,    5,    3,    1,    6,    4,    2,   0xff
}
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 308 of file PMSM_tables.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 42 of file PMSM_tables.h.

Referenced by SineOutputUpdate().


Generated on Wed Oct 10 15:31:45 2007 for AVR449 by  doxygen 1.5.2