Data Structures | Typedefs | Functions
DCLINK_SS

Data Structures

struct  _MATH_ui_Vec3_
 Defines unsigned integer three element vector. More...
 
struct  _MATH_ui_Vec2_
 Defines unsigned integer two element vector. More...
 
struct  _DCLINK_SS_Obj_
 Defines the DC_Link Single-Shunt Object. More...
 

Typedefs

typedef struct _MATH_ui_Vec3_ MATH_ui_Vec3
 Defines unsigned integer three element vector. More...
 
typedef MATH_ui_Vec3 MATH_ui_vec3
 
typedef struct _MATH_ui_Vec2_ MATH_ui_Vec2
 Defines unsigned integer two element vector. More...
 
typedef MATH_ui_Vec2 MATH_ui_vec2
 
typedef struct _DCLINK_SS_Obj_ DCLINK_SS_Obj
 Defines the DC_Link Single-Shunt Object. More...
 
typedef struct _DCLINK_SS_Obj_DCLINK_SS_Handle
 Defines the DCLINK Single-Shunt handle. More...
 

Functions

DCLINK_SS_Handle DCLINK_SS_init (void *pMemory, const size_t numBytes)
 Initializes the DC-Link Single-Shunt object. More...
 
void DCLINK_SS_setInitialConditions (DCLINK_SS_Handle handle, const uint16_t pwmPeriod, const float32_t SSTOffThrVs_pu)
 Sets the initial conditions for single-shunt variables. More...
 
static void DCLINK_SS_runCurrentReconstruction (DCLINK_SS_Handle handle, const MATH_vec2 *pIdc1, const MATH_vec2 *pIdc2)
 Run the three-phase current reconstruction. More...
 
static void DCLINK_SS_runPWMCompensation (DCLINK_SS_Handle handle, const MATH_vec2 *pVab_out, const float32_t Vdc_V, MATH_ui_vec3 *pPwmCMPA, MATH_ui_vec3 *pPwmCMPB, MATH_ui_vec2 *pUpSoc, MATH_ui_vec2 *pDownSoc)
 Run the PWM phase shift compensation. More...
 
static float32_t DCLINK_SS_getSector (DCLINK_SS_Handle handle)
 Gets the sector value of present PWM cycle. More...
 
static float32_t DCLINK_SS_getSector1 (DCLINK_SS_Handle handle)
 Gets the sector value of last PWM cycle. More...
 
static float32_t DCLINK_SS_getIa (DCLINK_SS_Handle handle)
 Gets the reconstructed phase-A current. More...
 
static float32_t DCLINK_SS_getIb (DCLINK_SS_Handle handle)
 Gets the reconstructed phase-B current. More...
 
static float32_t DCLINK_SS_getIc (DCLINK_SS_Handle handle)
 Gets the reconstructed phase-A current. More...
 
static void DCLINK_SS_setMinAVDuration (DCLINK_SS_Handle handle, const uint16_t minTime)
 Sets the initial conditions for single-shunt variables. More...
 
static void DCLINK_SS_setSampleDelay (DCLINK_SS_Handle handle, const uint16_t sampleDelay)
 Sets the SOC trigger delay for ADC sampling. More...
 
static void DCLINK_SS_setSampleHoldTime (DCLINK_SS_Handle handle, const uint16_t sampleHoldTime)
 Sets the ADC sampling hold value for ADC sampling. More...
 
static void DCLINK_SS_setFlag_enableFullSampling (DCLINK_SS_Handle handle, const bool state)
 Sets the flag of full sampling. More...
 
static void DCLINK_SS_setFlag_enableSequenceControl (DCLINK_SS_Handle handle, const bool state)
 Sets the flag of sequence control. More...
 
static void DCLINK_SS_runFastPWMCompensation (DCLINK_SS_Handle handle, MATH_ui_vec3 *pPWMCMPA, MATH_ui_vec3 *pPWMCMPB, MATH_ui_vec2 *pADCSoc)
 Run the Fast PWM phase shift compensation. More...
 
static void DCLINK_SS_runFastCurrentReconstruction (DCLINK_SS_Handle handle, const MATH_vec2 *pIdc1, const MATH_vec2 *pIdc2)
 Run the three-phase current reconstruction. More...
 

Detailed Description

Typedef Documentation

◆ MATH_ui_Vec3

typedef struct _MATH_ui_Vec3_ MATH_ui_Vec3

Defines unsigned integer three element vector.

◆ MATH_ui_vec3

◆ MATH_ui_Vec2

typedef struct _MATH_ui_Vec2_ MATH_ui_Vec2

Defines unsigned integer two element vector.

◆ MATH_ui_vec2

◆ DCLINK_SS_Obj

Defines the DC_Link Single-Shunt Object.

◆ DCLINK_SS_Handle

Defines the DCLINK Single-Shunt handle.

Function Documentation

◆ DCLINK_SS_init()

DCLINK_SS_Handle DCLINK_SS_init ( void *  pMemory,
const size_t  numBytes 
)

Initializes the DC-Link Single-Shunt object.

Parameters
[in]*pMemoryPointer in to the DC-Link Single-Shunt object
[in]numBytesSize of the object
Returns
The DC-Link Single-Shunt(DCLINK_SS) object handle

◆ DCLINK_SS_setInitialConditions()

void DCLINK_SS_setInitialConditions ( DCLINK_SS_Handle  handle,
const uint16_t  pwmPeriod,
const float32_t  SSTOffThrVs_pu 
)

Sets the initial conditions for single-shunt variables.

Parameters
[in]handleThe DC-Link Single-Shunt(DCLINK_SS) handle
[in]pwmPeriodThe PWM period value
[in]offsetThe dc-link offset voltage
[in]SSTOffThrDutyThe threshold output duty for sequence control off
Returns
None

◆ DCLINK_SS_runCurrentReconstruction()

static void DCLINK_SS_runCurrentReconstruction ( DCLINK_SS_Handle  handle,
const MATH_vec2 pIdc1,
const MATH_vec2 pIdc2 
)
inlinestatic

Run the three-phase current reconstruction.

Parameters
[in]handleThe DC-Link Single-Shunt(DCLINK_SS) handle
[in]pIdc1A pointer to the currents measured at up count
[in]pIdc2A pointer to the currents measured at down count
Returns
None

References _DCLINK_SS_Obj_::flag_SST_1, _DCLINK_SS_Obj_::flagEnableFullSample, _DCLINK_SS_Obj_::I_A, _DCLINK_SS_Obj_::sector_1, _MATH_Vec2_::value, _MATH_Vec3_::value, and _DCLINK_SS_Obj_::vecArea_1.

◆ DCLINK_SS_runPWMCompensation()

static void DCLINK_SS_runPWMCompensation ( DCLINK_SS_Handle  handle,
const MATH_vec2 pVab_out,
const float32_t  Vdc_V,
MATH_ui_vec3 pPwmCMPA,
MATH_ui_vec3 pPwmCMPB,
MATH_ui_vec2 pUpSoc,
MATH_ui_vec2 pDownSoc 
)
inlinestatic

Run the PWM phase shift compensation.

Parameters
[in]handleThe DC-Link Single-Shunt(DCLINK_SS) handle
[in]pVab_outThe pointer to the Vab reference voltage
[in]Vdc_VThe DC_bus voltage
[in]pPwmCMPAThe pointer to the PWM compare-A values
[in]pPwmCMPBThe pointer to the PWM compare-B values
[in]pUpSocThe pointer to the up counter SOC trig values
[in]pDownSocThe pointer to the down conter SOC trig values
Returns
None

References _DCLINK_SS_Obj_::flag_SST, _DCLINK_SS_Obj_::flag_SST_1, _DCLINK_SS_Obj_::flagEnableSequenceControl, _DCLINK_SS_Obj_::flagRunInHighModulation, MATH_SQRTTHREE_OVER_TWO, _DCLINK_SS_Obj_::minAvDuration, _DCLINK_SS_Obj_::pwmPeriod, _DCLINK_SS_Obj_::sampleDelay, _DCLINK_SS_Obj_::sector, _DCLINK_SS_Obj_::sector_1, _DCLINK_SS_Obj_::SSTOffThrVs_pu, _MATH_ui_Vec3_::value, _MATH_ui_Vec2_::value, _MATH_Vec2_::value, _DCLINK_SS_Obj_::vecArea, and _DCLINK_SS_Obj_::vecArea_1.

◆ DCLINK_SS_getSector()

static float32_t DCLINK_SS_getSector ( DCLINK_SS_Handle  handle)
inlinestatic

Gets the sector value of present PWM cycle.

Parameters
[in]handleThe DC-Link Single-Shunt(DCLINK_SS) handle
Returns
the sector value of present PWM cycle

References _DCLINK_SS_Obj_::sector.

◆ DCLINK_SS_getSector1()

static float32_t DCLINK_SS_getSector1 ( DCLINK_SS_Handle  handle)
inlinestatic

Gets the sector value of last PWM cycle.

Parameters
[in]handleThe DC-Link Single-Shunt(DCLINK_SS) handle
Returns
the sector value of last PWM cycle

References _DCLINK_SS_Obj_::sector_1.

◆ DCLINK_SS_getIa()

static float32_t DCLINK_SS_getIa ( DCLINK_SS_Handle  handle)
inlinestatic

Gets the reconstructed phase-A current.

Parameters
[in]handleThe DC-Link Single-Shunt(DCLINK_SS) handle
Returns
Phase-A current, A

References _DCLINK_SS_Obj_::I_A, and _MATH_Vec3_::value.

◆ DCLINK_SS_getIb()

static float32_t DCLINK_SS_getIb ( DCLINK_SS_Handle  handle)
inlinestatic

Gets the reconstructed phase-B current.

Parameters
[in]handleThe DC-Link Single-Shunt(DCLINK_SS) handle
Returns
Phase-B current, A

References _DCLINK_SS_Obj_::I_A, and _MATH_Vec3_::value.

◆ DCLINK_SS_getIc()

static float32_t DCLINK_SS_getIc ( DCLINK_SS_Handle  handle)
inlinestatic

Gets the reconstructed phase-A current.

Parameters
[in]handleThe DC-Link Single-Shunt(DCLINK_SS) handle
Returns
Phase-C current, A

References _DCLINK_SS_Obj_::I_A, and _MATH_Vec3_::value.

◆ DCLINK_SS_setMinAVDuration()

static void DCLINK_SS_setMinAVDuration ( DCLINK_SS_Handle  handle,
const uint16_t  minTime 
)
inlinestatic

Sets the initial conditions for single-shunt variables.

Parameters
[in]handleThe DC-Link Single-Shunt(DCLINK_SS) handle
[in]minTimeThe minimum active duration for dc link current measurement
Returns
None

References _DCLINK_SS_Obj_::minAvDuration.

◆ DCLINK_SS_setSampleDelay()

static void DCLINK_SS_setSampleDelay ( DCLINK_SS_Handle  handle,
const uint16_t  sampleDelay 
)
inlinestatic

Sets the SOC trigger delay for ADC sampling.

Parameters
[in]handleThe DC-Link Single-Shunt (DCLINK_SS) handle
[in]sampleDelayThe SOC trigger delay value
Returns
None

References _DCLINK_SS_Obj_::sampleDelay.

◆ DCLINK_SS_setSampleHoldTime()

static void DCLINK_SS_setSampleHoldTime ( DCLINK_SS_Handle  handle,
const uint16_t  sampleHoldTime 
)
inlinestatic

Sets the ADC sampling hold value for ADC sampling.

Parameters
[in]handleThe DC-Link Single-Shunt (DCLINK_SS) handle
[in]sampleHoldTimeThe ADC sampling hold value
Returns
None

References _DCLINK_SS_Obj_::sampleHoldTime.

◆ DCLINK_SS_setFlag_enableFullSampling()

static void DCLINK_SS_setFlag_enableFullSampling ( DCLINK_SS_Handle  handle,
const bool  state 
)
inlinestatic

Sets the flag of full sampling.

Parameters
[in]handleThe DC-Link Single-Shunt(DCLINK_SS) handle
[in]stateThe desired flag state, on (1) or off (0)
Returns
None

References _DCLINK_SS_Obj_::flagEnableFullSample.

◆ DCLINK_SS_setFlag_enableSequenceControl()

static void DCLINK_SS_setFlag_enableSequenceControl ( DCLINK_SS_Handle  handle,
const bool  state 
)
inlinestatic

Sets the flag of sequence control.

Parameters
[in]handleThe DC-Link Single-Shunt(DCLINK_SS) handle
[in]stateThe desired flag state, on (1) or off (0)
Returns
None

References _DCLINK_SS_Obj_::flagEnableSequenceControl.

◆ DCLINK_SS_runFastPWMCompensation()

static void DCLINK_SS_runFastPWMCompensation ( DCLINK_SS_Handle  handle,
MATH_ui_vec3 pPWMCMPA,
MATH_ui_vec3 pPWMCMPB,
MATH_ui_vec2 pADCSoc 
)
inlinestatic

Run the Fast PWM phase shift compensation.

Parameters
[in]handleThe DC-Link Single-Shunt(DCLINK_SS) handle
[in]pPwmCMPAThe pointer to the PWM compare-A values
[in]pPwmCMPBThe pointer to the PWM compare-B values
[in]pADCSocThe pointer to the up counter SOC trig values
Returns
None

References _DCLINK_SS_Obj_::minAvDuration, _DCLINK_SS_Obj_::pwmPeriod, _DCLINK_SS_Obj_::sampleDelay, _DCLINK_SS_Obj_::sector, _DCLINK_SS_Obj_::sector_1, _MATH_ui_Vec3_::value, _MATH_ui_Vec2_::value, and _DCLINK_SS_Obj_::vecArea.

◆ DCLINK_SS_runFastCurrentReconstruction()

static void DCLINK_SS_runFastCurrentReconstruction ( DCLINK_SS_Handle  handle,
const MATH_vec2 pIdc1,
const MATH_vec2 pIdc2 
)
inlinestatic

Run the three-phase current reconstruction.

Parameters
[in]handleThe DC-Link Single-Shunt(DCLINK_SS) handle
[in]pIdc1A pointer to the currents measured at up count
[in]pIdc2A pointer to the currents measured at down count
Returns
None

References _DCLINK_SS_Obj_::I_A, _DCLINK_SS_Obj_::sector_1, _MATH_Vec2_::value, and _MATH_Vec3_::value.


Copyright 2023, Texas Instruments Incorporated