Download presentation
Presentation is loading. Please wait.
Published byBrook White Modified over 9 years ago
1
Software Three Main Functions Records/Monitors Zero Detection Points Gives our PWM a starting point Data used to dynamically adjust carrier frequency Detects possible faults situations and shuts off PWM accordingly Creates Sine-Triangle PWM Triangle wave carrier frequency (~ 6 kHz) Sine wave generated from sine lookup table Values passed into Compare Registers which control PWM outputs with specified dead-band time (4 us) Controls Power Flow Delta incrementally added over 100 cycles to generate Power Flow
2
Start System Initialization While (1) Switch State Case 1 Case 2 Case 3 Case 4 Case 5 Default Waiting for Pulse Waiting for Falling Edge Calculations Zero Crossing Analysis PWM State Yes No
3
Waiting for Pulse Waiting for Falling Edge Calculations Zero Crossing Analysis PWM State Start Phase 1 Falling? Pulse Detected and System Synced? System Synced Record Times/Reset Counters Yes No Set Next State PWM Calculations/ PWM Sync Check Break
4
Waiting for Pulse Waiting for Falling Edge Calculations Zero Crossing Analysis PWM State Start Pulse Ended? Increment Position/ Decrement Counter Record Times Yes No Set Next State PWM Calculations/ PWM Sync Check Break
5
Waiting for Pulse Waiting for Falling Edge Calculations Zero Crossing Analysis PWM State Start Half Period? Calculate Time Between Pulses Calculate Pulse Width Yes No Calculate Half Period PWM Calculations/ PWM Sync Check Break Set Next State
6
Waiting for Pulse Waiting for Falling Edge Calculations Zero Crossing Analysis PWM State Start Decrement Iteration Counter Calculate Actual Zero Crossing with Error Adjust PWM Calculations/ PWM Sync Check Break Set Next State Detect Fault? Yes No System Shutdown
7
Waiting for Pulse Waiting for Falling Edge Calculations Zero Crossing Analysis PWM State Start Triangle Wave Rising Edge? Convert to Q15 Format Calculate Phase Counts YesNo PWM Calculations/ PWM Sync Check Break Calculate Timings/Update Carrier Frequency Turn on PWM Output Calculate/Load Sin Positions in CMPR Registers Increment Counters
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.