PFC:800WPSUC7-4pin
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
init_bckgnd_funct.h File Reference

Header of the functions for SW initialization and running in the background during operation. More...

#include <DAVE.h>

Go to the source code of this file.

Data Structures

struct  FIR_lowpass_int
 
struct  IIR_lowpass_int
 
struct  controller_PI
 
struct  controller_int
 

Macros

#define CLK_CORE_HZ   48000000UL
 
CORDIC
#define DIV_AUTO_START   0
 
#define UNSIGNED_DIVISION   4
 
#define SIGNED_DIVISION   0
 
#define DIV_32BIT_BY_32BIT   0
 
Input voltage range for BOP
#define VIN_MIN_START_INIT   1330
 
#define VIN_MIN_START   1121
 
#define VIN_MIN_STOP_HARD   808
 
#define VIN_MIN_PLD_68V   938
 
#define VIN_MIN_PLD_75V   1068
 
Current limit
#define I_IN_AVG_MAX   15887
 
#define I_IN_MAX16b   0xFFFFU
 
#define I_IN_FACTOR   2
 
#define I_IN_MAX_FACTOR   (I_IN_MAX16b >> I_IN_FACTOR)
 
Timing definition
#define LIMIT_1_MILI_S   65
 
#define LIMIT_100_MILI_S   100
 

Typedefs

typedef struct FIR_lowpass_int FIR_lowpass_int_t
 
typedef struct IIR_lowpass_int IIR_lowpass_int_t
 
typedef struct controller_PI controller_PI_t
 
typedef struct controller_int controller_int_t
 

Functions

void IIR_param_init (void)
 Filter coefficients initialization.
IIR filter of the AC voltage to obtain the RMS value.
IIR notch filter of the DC voltage to obtain the DC value.
Both filters are two-section second order IIR filters executed at 3250Hz, every 2 cycles of CCU40.CC41 @ 6.5kHz. More...
 
void MATH_DIV_config (void)
 DIV kernel of the MATH co-processor initialization.
Used in the input RMS feedforward. More...
 
void control_loop_init (void)
 Assign value to the coefficients of voltage and current loops.
Reset the state and output of both controllers. More...
 
void time_counter (void)
 Time counter is a background process to count "real-time" in the application. More...
 
void temperature_sense_enable (void)
 Enable the internal temperature sensor and set the measurement pointer. More...
 
void delay_100us (uint32_t time)
 Delay function. More...
 
void input_voltage_observer (void)
 BOP protection, checking AVG input voltage.
The function modifies the control status register and turns off PWM. More...
 
void fan_control_temp_protection (void)
 Temperature monitoring: protection and fan control. More...
 

Variables

volatile IIR_lowpass_int_t ACfilter
 
volatile IIR_lowpass_int_t DCfilter
 
volatile int32_t auxAC
 
volatile int32_t auxDC
 
volatile uint16_t time_count_65kHz
 
uint8_t _1ms_count
 
uint8_t _100ms_count
 
uint8_t time_BOP
 
uint8_t time_ACOK
 
uint8_t time_PLD_68V
 
uint8_t time_PLD_75V
 
uint8_t time_V_step
 
uint8_t time_INIT
 
volatile bool power_stage_ON
 
volatile controller_int_t voltage_int_ctr
 
volatile controller_PI_t current_PI_ctr
 

Detailed Description

Header of the functions for SW initialization and running in the background during operation.

Author
Meneses Herrera, David
Date
20.06.2017

Macro Definition Documentation

#define CLK_CORE_HZ   48000000UL

CLK frequency (Hz)

#define DIV_32BIT_BY_32BIT   0

This sets 32-bit divide by 32-bit

#define DIV_AUTO_START   0

Calculation is automatically started with a write to DVS register

#define I_IN_AVG_MAX   15887

Maximum current limitation

#define I_IN_FACTOR   2

Multiplication factor during bulk undershoot (applied shift)

#define I_IN_MAX16b   0xFFFFU

Maximum current representation

#define I_IN_MAX_FACTOR   (I_IN_MAX16b >> I_IN_FACTOR)

Multiplication factor applied if reference under certain limit

#define LIMIT_100_MILI_S   100

100ms @ 1ms counter

#define LIMIT_1_MILI_S   65

1ms @ 65kHz

#define SIGNED_DIVISION   0

Signed division is selected

#define UNSIGNED_DIVISION   4

Unsigned division is selected

#define VIN_MIN_PLD_68V   938

72Vrms; 0.5s if the voltage is between 65V and 72V (Power line disturbance)

#define VIN_MIN_PLD_75V   1068

80Vrms; 2s if the voltage is between 72V and 80V (Power line disturbance)

#define VIN_MIN_START   1121

86Vrms

#define VIN_MIN_START_INIT   1330

86Vrms

#define VIN_MIN_STOP_HARD   808

66Vrms; Stop the PFC if the input voltage is under 65V

Typedef Documentation

Voltage controller with integral part

Controller structure for current loop

FIR filter structure, not used in the current implementation

IIR filter structure, used in AC-RMS and DC-Notch filtering