Presentation is loading. Please wait.

Presentation is loading. Please wait.

InstaSPIN-FOC Code Functionality

Similar presentations


Presentation on theme: "InstaSPIN-FOC Code Functionality"— Presentation transcript:

1 InstaSPIN-FOC Code Functionality
Navigating through the InstaSPIN-FOC Code Rev. 0.2 continue Dave Wilson

2

3

4 PI Series Form

5 PI Parallel Form

6 Amplitude Invariant Forward Clarke Transform
CLARKE_run( ) 2 + - 1/3 A alpha + B + - beta C Amplitude Invariant Forward Clarke Transform numSensors = 3

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107 Amplitude Invariant Forward Clarke Transform
CLARKE_run() 2 + - 1/3 A alpha + B + - beta C Amplitude Invariant Forward Clarke Transform numSensors = 3

108

109 Inverse Park Transform
IPARK_run( ) Vd + - Valpha Cos + Vbeta Vq angle Sin Inverse Park Transform

110 Vd Vq Valpha Vbeta

111 2 2 Vq_max = Vbus - Vd

112

113 Inverse Clarke Transform

114 Vmax Vcom Vmin pT -> value[0] pT -> value[1] pT -> value[2]
This SVM technique is nice for overmodulation, as the clipping occurs naturally when the gain is increased.

115 Angle Compensation PROBLEM: The output voltages from the FOC algorithm are calculated assuming a specific angle of the rotor flux. When the PWM values are placed into the PWM registers, they don’t affect the PWM pins until the next PWM cycle due to the double-buffered nature of the PWM module. By this time, the rotor flux angle has changed by an amount that is directly proportional to the speed of the flux vector rotation and inversely proportional to the PWM frequency. As a result, the applied voltages are incorrect in relation to the new rotor flux angle. SOLUTION: Based on the PWM frequency and speed at the time that the voltages are calculated, predict what the angle will be when the calculated voltages will appear on the motor windings. Then use this angle prediction for the inverse Park transform. I_Park_angle = calculated_angle + electrical speed * PWM period * compensation_factor If the sampling frequency is equal to the PWM frequency, then the compensation_factor is equal to However, the compensation_factor changes as the relationship between PWM frequency and sampling frequency changes (next slide…)

116 Compensation Factor changes as a function of
USER_NUM_PWM_TICKS_PER_ISR_TICK The Compensation factor is the number of PWM periods (T) from when the ADC samples used to calculate a given angle are acquired until the average time that the PWM values resulting from that angle calculation appear on the motor windings. Example 1 PWM Ticks / ISR Ticks = 1 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 Compensation Factor = 1.5 PWM Values V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 Example 2 PWM Ticks / ISR Ticks = 3 q1 q2 q3 q4 q5 q6 Compensation Factor = 2.5 PWM Values V1 V2 V3 V4 V5 V6 T T = PWM period Compensated angle = Uncompensated angle + speed * T * Compensation Factor

117

118

119

120

121

122

123

124

125

126 Page 1

127

128

129

130

131

132 Thank You! …for using InstaSPIN-FOC


Download ppt "InstaSPIN-FOC Code Functionality"

Similar presentations


Ads by Google