9
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

Software Three Main Functions Records/Monitors Zero Detection Points Gives our PWM a starting point Data used to dynamically adjust carrier frequency Detects

Embed Size (px)

Citation preview

Page 1: Software Three Main Functions Records/Monitors Zero Detection Points Gives our PWM a starting point Data used to dynamically adjust carrier frequency Detects

SoftwareThree 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

Page 2: Software Three Main Functions Records/Monitors Zero Detection Points Gives our PWM a starting point Data used to dynamically adjust carrier frequency Detects

StartSystem

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 CrossingAnalysis

PWM State

ISR

IncrementCounter

Reset ISR Flag

Return

Timer 2 Overflow

Interrupt

Yes

Yes

Yes

Yes

Yes

Yes

No

No

No

No

No

Software

Page 3: Software Three Main Functions Records/Monitors Zero Detection Points Gives our PWM a starting point Data used to dynamically adjust carrier frequency Detects

Waiting for Pulse

Waiting for Falling Edge

Calculations

Zero CrossingAnalysis

PWM State

Start

Phase 1 Falling?

Pulse Detected and System

Synced?

System Synced

Record Times/Reset Counters

Yes

Yes

No

No Set Next State

PWM Calculations/ PWM Sync Check

Break

Software

Page 4: Software Three Main Functions Records/Monitors Zero Detection Points Gives our PWM a starting point Data used to dynamically adjust carrier frequency Detects

Waiting for Pulse

Waiting for Falling Edge

Calculations

Zero CrossingAnalysis

PWM State

Start

Pulse Ended?

Increment Position/Decrement Counter

Record TimesYes

No

Set Next State

PWM Calculations/ PWM Sync Check

Break

Software

Page 5: Software Three Main Functions Records/Monitors Zero Detection Points Gives our PWM a starting point Data used to dynamically adjust carrier frequency Detects

Waiting for Pulse

Waiting for Falling Edge

Calculations

Zero CrossingAnalysis

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

Software

Page 6: Software Three Main Functions Records/Monitors Zero Detection Points Gives our PWM a starting point Data used to dynamically adjust carrier frequency Detects

Waiting for Pulse

Waiting for Falling Edge

Calculations

Zero CrossingAnalysis

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

Software

Page 7: Software Three Main Functions Records/Monitors Zero Detection Points Gives our PWM a starting point Data used to dynamically adjust carrier frequency Detects

Waiting for Pulse

Waiting for Falling Edge

Calculations

Zero CrossingAnalysis

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

Increment Counters

Software

Page 8: Software Three Main Functions Records/Monitors Zero Detection Points Gives our PWM a starting point Data used to dynamically adjust carrier frequency Detects

Problems EncounteredThree Main Problems

•Zero Detection Reference Signal: Triggered Falling Edge instead of Rising

•Edited software accordingly

•Resulted in simpler sine-triangle PWM software

•Transformer: Core Losses drew too much current from Fuel Cell

•Found smaller transformers

•Recalculated Turns Ratio

•TI2401 DSP: Flash Memory Damaged

•Flex-Trace Connection used to program DSP still a risk

•Ordered new DSP and is currently en route

Page 9: Software Three Main Functions Records/Monitors Zero Detection Points Gives our PWM a starting point Data used to dynamically adjust carrier frequency Detects

Item Predicted Cost Actual ExpendituresDC/DC Converter $318.00 $398.00DC/3-Phase AC Inverter $500.00 $500.00Hydrogen $45.00 $0.00Poster/Report Binding $70.00 $70.30Protection Circuitry $50.00 $28.80Filtering (Inductor Bank) $50.00 DonatedTransformer $125.00 DonatedPrinted Circuit Boards $350.00 $180.00Circuit Components $150.00 $159.96Utility Cart $100.00 $58.00Miscellaneous $300.00 $0.00Code Composer Studio $495.00 DonatedXDS510PP-Plus Parallel Port Emulator $999.00 Donated

Total Predicted Budget $3,552.00Total Donated $1,669.00

Total Expeditures $1,395.06Total Budget Left $487.94

Budget