Bar Logo 3.8/7.6 kw Totem pole Demonstration Application (Part-No. (not specified))
 
Content
     
Loading...
Searching...
No Matches
PFC_frameworkSetup.h
Go to the documentation of this file.
1
10/*
11 [2024] Microchip Technology Inc. and its subsidiaries.
12
13 Subject to your compliance with these terms, you may use Microchip
14 software and any derivatives exclusively with Microchip products.
15 You are responsible for complying with 3rd party license terms
16 applicable to your use of 3rd party software (including open source
17 software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
18 NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
19 SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
20 MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
21 WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
22 INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
23 KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
24 MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
25 FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
26 TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
27 EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
28 THIS SOFTWARE.
29*/
30
31#ifndef DRV_USERSETUP_TPBLPFC_H
32#define DRV_USERSETUP_TPBLPFC_H
33
35
36
47#define SYNCHRONOUS_ACTIVE_SWITCH
48#define RECTIFIER_SWITCH
49
50#if defined MODE_PFC || defined MODE_INTERLEAVED
51 #define VOLTAGE_LOOP
52 #define DUTY_RATIO_FEEDFORWARD_ENABLED
53 #define AC_CYCLE_SKIPPING_ENABLED
54 #define ADAPTIVE_GAIN_ENABLED
55 #define ADAPTIVE_STEPRESPONSE_ENABLED
56#endif
57
58//always considered in PFC and GTI
59//#define CHARGEPUMP_ENABLED //chargepump option for startup after ZC
60//#define COMMON_MODE_DETECTION //AC_N measurement to limit startup after ZC time
61#undef AUTO_START //PFC starts after poweron. not via GUI
62
63//*** DEBUG ONLY ***
64//#define ADAPTIVE_GAIN_SLIDER_MODE //only for debug purposes
65//#define VOUT_PRECHARGE_PCS_ENABLE //only for debug purposes
66//*** ---------- ***
67
68#if HIGH_VOLTAGE
69 #define VOUT_REF 3152 //400 V
70 #define IIN_OC 930 //30 A
71 #define VOUT_OV 3546 //450 V
72 #define CCM_CURRENT 62 //2.0 A
73 #define DEAD_TIME 400 //100 ns
74 #define VOUT_PRECHARGE_VOLTAGE 360 // Volt
75 #define VOUT_PRECHARGE_VALUE (uint16_t)(VOUT_PRECHARGE_VOLTAGE * 7.88) //2834 //360V
76#else
77 #define VOUT_REF 1494 //40 V
78 #define IIN_OC 930 //30 A
79 #define VOUT_OV 3362 //90 V
80 #define CCM_CURRENT 62 //2.0 A
81 #define DEAD_TIME 320 //80 ns
82 #define VOUT_PRECHARGE_VOLTAGE 36 // Volt
83 #define VOUT_PRECHARGE_VALUE (uint16_t)(VOUT_PRECHARGE_VOLTAGE * 37.23)
84#endif
85
86#if HIGH_VOLTAGE
87 #define BURST_MODE_VMC_REF_FREEZE 200
88 #define BURST_MODE_LEVEL_HIGH 150
89#else
90#ifdef MODE_INTERLEAVED
91 #define BURST_MODE_VMC_REF_FREEZE 950
92 #define BURST_MODE_LEVEL_HIGH 900
93#else
94 #define BURST_MODE_VMC_REF_FREEZE 1900
95 #define BURST_MODE_LEVEL_HIGH 1800
96#endif
97#endif
98
99//*** Open Loop Startup after Zero Cross ***
100#if HIGH_VOLTAGE
101 #define OPEN_LOOP_STARTUP_PULSES 16
102 #define OPEN_LOOP_PWM_COUNTER_SHIFT 10
103#else
104 #define OPEN_LOOP_STARTUP_PULSES 10
105 #define OPEN_LOOP_PWM_COUNTER_SHIFT 10
106#endif
107
108#if defined MODE_PFC
109 #define M_HIGHLINE 0.64 //(0,75 - 0,4) / (20000 - 2000) *32767
110 #define BX_HIGHLINE 2000
111 #define GAINSLOPE_HIGHLINE (uint16_t)(M_HIGHLINE * 32767)
112 #define GAINOFFSET_HIGHLINE (uint16_t)(0.75 * 32767 + BX_HIGHLINE * M_HIGHLINE)
113
114 #define M_LOWLINE 0.96 //(0,66 - 0,30) / (13200 - 1000) * 32767
115 #define BX_LOWLINE 1000
116 #define GAINSLOPE_LOWLINE (uint16_t)(M_LOWLINE * 32767)
117 #define GAINOFFSET_LOWLINE (uint16_t)(0.66 * 32767 + BX_LOWLINE * M_LOWLINE)
118#endif
119
120#if defined MODE_INTERLEAVED
121 #define M_HIGHLINE 0.64 //(0,75 - 0,4) / (20000 - 2000) *32767
122 #define BX_HIGHLINE 2000
123 #define GAINSLOPE_HIGHLINE (uint16_t)(M_HIGHLINE * 32767)
124 #define GAINOFFSET_HIGHLINE (uint16_t)(0.75 * 32767 + BX_HIGHLINE * M_HIGHLINE)
125
126 #define M_LOWLINE 0.96 //(0,66 - 0,30) / (13200 - 1000) * 32767
127 #define BX_LOWLINE 1000
128 #define GAINSLOPE_LOWLINE (uint16_t)(M_LOWLINE * 32767)
129#define GAINOFFSET_LOWLINE (uint16_t)(0.66 * 32767 + BX_LOWLINE * M_LOWLINE)
130#endif
131
132
140#define PH1_PWM 1
141#define PH2_PWM 2
142#define PH3_PWM 3
143
144//==============================================================================
145//==============================================================================
146
147#endif /* DRV_USERSETUP_TPBLPFC_H */
148
Allows the user to easily change the operation modes.