Download presentation
Presentation is loading. Please wait.
1
InstaSPIN-FOC Code Functionality
Navigating through the InstaSPIN-FOC Code Rev. 0.2 continue Dave Wilson
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
107
Amplitude Invariant Forward Clarke Transform
CLARKE_run() 2 + - 1/3 A alpha + B + - beta C Amplitude Invariant Forward Clarke Transform numSensors = 3
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
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
126
Page 1
132
Thank You! …for using InstaSPIN-FOC
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.