AM243x Motor Control SDK  09.02.00

Introduction

Here is the list of first-order filter library APIs

Files

file  filter_fo.h
 first order filter library
 

Functions

static float32_t FILTER_FO_get_a1 (FILTER_FO_Handle handle)
 Gets the first-order filter denominator coefficient a1. More...
 
static float32_t FILTER_FO_get_b0 (FILTER_FO_Handle handle)
 Gets the first-order filter numerator coefficient b0. More...
 
static float32_t FILTER_FO_get_b1 (FILTER_FO_Handle handle)
 Gets the first-order filter numerator coefficient b1. More...
 
static float32_t FILTER_FO_get_x1 (FILTER_FO_Handle handle)
 Gets the first-order filter input value at time sample n=-1. More...
 
static float32_t FILTER_FO_get_y1 (FILTER_FO_Handle handle)
 Gets the first-order filter output value at time sample n=-1. More...
 
void FILTER_FO_getDenCoeffs (FILTER_FO_Handle handle, float32_t *pa1)
 Gets the first-order filter denominator coefficients. More...
 
void FILTER_FO_getInitialConditions (FILTER_FO_Handle handle, float32_t *px1, float32_t *py1)
 Gets the initial conditions of the first-order filter. More...
 
void FILTER_FO_getNumCoeffs (FILTER_FO_Handle handle, float32_t *pb0, float32_t *pb1)
 Gets the first-order filter numerator coefficients. More...
 
FILTER_FO_Handle FILTER_FO_init (void *pMemory, const size_t numBytes)
 Initializes the first-order filter. More...
 
static float32_t FILTER_FO_run (FILTER_FO_Handle handle, const float32_t inputValue)
 Runs a first-order filter of the form y[n] = b0*x[n] + b1*x[n-1] - a1*y[n-1]. More...
 
static float32_t FILTER_FO_run_form_0 (FILTER_FO_Handle handle, const float32_t inputValue)
 Runs a first-order filter of the form y[n] = b0*x[n] - a1*y[n-1]. More...
 
static void FILTER_FO_set_a1 (FILTER_FO_Handle handle, const float32_t a1)
 Sets the first-order filter denominator coefficient a1. More...
 
static void FILTER_FO_set_b0 (FILTER_FO_Handle handle, const float32_t b0)
 Sets the first-order filter numerator coefficient b0. More...
 
static void FILTER_FO_set_b1 (FILTER_FO_Handle handle, const float32_t b1)
 Sets the first-order filter numerator coefficient b1. More...
 
static void FILTER_FO_set_x1 (FILTER_FO_Handle handle, const float32_t x1)
 Sets the first-order filter input value at time sample n=-1. More...
 
static void FILTER_FO_set_y1 (FILTER_FO_Handle handle, const float32_t y1)
 Sets the first-order filter output value at time sample n=-1. More...
 
void FILTER_FO_setDenCoeffs (FILTER_FO_Handle handle, const float32_t a1)
 Sets the first-order filter denominator coefficients. More...
 
void FILTER_FO_setInitialConditions (FILTER_FO_Handle handle, const float32_t d1, const float32_t d2)
 Sets the initial conditions of the first-order filter. More...
 
void FILTER_FO_setNumCoeffs (FILTER_FO_Handle handle, const float32_t b0, const float32_t b1)
 Sets the first-order filter numerator coefficients. More...
 

Typedefs

typedef DCL_DF11 FILTER_FO_Obj
 
typedef DCL_DF11FILTER_FO_Handle
 

Macros

#define _FILTER_FO_Obj_   dcl_df11
 

Macro Definition Documentation

◆ _FILTER_FO_Obj_

#define _FILTER_FO_Obj_   dcl_df11

Typedef Documentation

◆ FILTER_FO_Obj

◆ FILTER_FO_Handle

Function Documentation

◆ FILTER_FO_get_a1()

static float32_t FILTER_FO_get_a1 ( FILTER_FO_Handle  handle)
inlinestatic

Gets the first-order filter denominator coefficient a1.

Parameters
[in]handleThe filter handle
Returns
The filter coefficient value for z^(-1)

◆ FILTER_FO_get_b0()

static float32_t FILTER_FO_get_b0 ( FILTER_FO_Handle  handle)
inlinestatic

Gets the first-order filter numerator coefficient b0.

Parameters
[in]handleThe filter handle
Returns
The filter coefficient value for z^0

◆ FILTER_FO_get_b1()

static float32_t FILTER_FO_get_b1 ( FILTER_FO_Handle  handle)
inlinestatic

Gets the first-order filter numerator coefficient b1.

Parameters
[in]handleThe filter handle
Returns
The filter coefficient value for z^(-1)

◆ FILTER_FO_get_x1()

static float32_t FILTER_FO_get_x1 ( FILTER_FO_Handle  handle)
inlinestatic

Gets the first-order filter input value at time sample n=-1.

Parameters
[in]handleThe filter handle
Returns
The input value at time sample n=-1

◆ FILTER_FO_get_y1()

static float32_t FILTER_FO_get_y1 ( FILTER_FO_Handle  handle)
inlinestatic

Gets the first-order filter output value at time sample n=-1.

Parameters
[in]handleThe filter handle
Returns
The output value at time sample n=-1

◆ FILTER_FO_getDenCoeffs()

void FILTER_FO_getDenCoeffs ( FILTER_FO_Handle  handle,
float32_t pa1 
)

Gets the first-order filter denominator coefficients.

Parameters
[in]handleThe filter handle
[in]pa1The pointer to memory for the filter coefficient value for z^(-1)

◆ FILTER_FO_getInitialConditions()

void FILTER_FO_getInitialConditions ( FILTER_FO_Handle  handle,
float32_t px1,
float32_t py1 
)

Gets the initial conditions of the first-order filter.

Parameters
[in]handleThe filter handle
[in]px1The pointer to memory for the input value at time sample n=-1
[in]py1The pointer to memory for the output value at time sample n=-1

◆ FILTER_FO_getNumCoeffs()

void FILTER_FO_getNumCoeffs ( FILTER_FO_Handle  handle,
float32_t pb0,
float32_t pb1 
)

Gets the first-order filter numerator coefficients.

Parameters
[in]handleThe filter handle
[in]pb0The pointer to memory for the filter coefficient value for z^0
[in]pb1The pointer to memory for the filter coefficient value for z^(-1)

◆ FILTER_FO_init()

FILTER_FO_Handle FILTER_FO_init ( void *  pMemory,
const size_t  numBytes 
)

Initializes the first-order filter.

Parameters
[in]pMemoryA pointer to the memory for the first-order filter object
[in]numBytesThe number of bytes allocated for the first-order filter object, bytes
Returns
The filter (FILTER) object handle

◆ FILTER_FO_run()

static float32_t FILTER_FO_run ( FILTER_FO_Handle  handle,
const float32_t  inputValue 
)
inlinestatic

Runs a first-order filter of the form y[n] = b0*x[n] + b1*x[n-1] - a1*y[n-1].

Parameters
[in]handleThe filter handle
[in]inputValueThe input value to filter
Returns
The output value from the filter

◆ FILTER_FO_run_form_0()

static float32_t FILTER_FO_run_form_0 ( FILTER_FO_Handle  handle,
const float32_t  inputValue 
)
inlinestatic

Runs a first-order filter of the form y[n] = b0*x[n] - a1*y[n-1].

Parameters
[in]handleThe filter handle
[in]inputValueThe input value to filter
Returns
The output value from the filter

◆ FILTER_FO_set_a1()

static void FILTER_FO_set_a1 ( FILTER_FO_Handle  handle,
const float32_t  a1 
)
inlinestatic

Sets the first-order filter denominator coefficient a1.

Parameters
[in]handleThe filter handle
[in]a1The filter coefficient value for z^(-1)

◆ FILTER_FO_set_b0()

static void FILTER_FO_set_b0 ( FILTER_FO_Handle  handle,
const float32_t  b0 
)
inlinestatic

Sets the first-order filter numerator coefficient b0.

Parameters
[in]handleThe filter handle
[in]b0The filter coefficient value for z^0

◆ FILTER_FO_set_b1()

static void FILTER_FO_set_b1 ( FILTER_FO_Handle  handle,
const float32_t  b1 
)
inlinestatic

Sets the first-order filter numerator coefficient b1.

Parameters
[in]handleThe filter handle
[in]b1The filter coefficient value for z^(-1)

◆ FILTER_FO_set_x1()

static void FILTER_FO_set_x1 ( FILTER_FO_Handle  handle,
const float32_t  x1 
)
inlinestatic

Sets the first-order filter input value at time sample n=-1.

Parameters
[in]handleThe filter handle
[in]x1The input value at time sample n=-1

◆ FILTER_FO_set_y1()

static void FILTER_FO_set_y1 ( FILTER_FO_Handle  handle,
const float32_t  y1 
)
inlinestatic

Sets the first-order filter output value at time sample n=-1.

Parameters
[in]handleThe filter handle
[in]y1The output value at time sample n=-1

◆ FILTER_FO_setDenCoeffs()

void FILTER_FO_setDenCoeffs ( FILTER_FO_Handle  handle,
const float32_t  a1 
)

Sets the first-order filter denominator coefficients.

Parameters
[in]handleThe filter handle
[in]a1The filter coefficient value for z^(-1)

◆ FILTER_FO_setInitialConditions()

void FILTER_FO_setInitialConditions ( FILTER_FO_Handle  handle,
const float32_t  d1,
const float32_t  d2 
)

Sets the initial conditions of the first-order filter.

Parameters
[in]handleThe filter handle
[in]d1The input value at time sample n=-1
[in]d2The output value at time sample n=-1

◆ FILTER_FO_setNumCoeffs()

void FILTER_FO_setNumCoeffs ( FILTER_FO_Handle  handle,
const float32_t  b0,
const float32_t  b1 
)

Sets the first-order filter numerator coefficients.

Parameters
[in]handleThe filter handle
[in]b0The filter coefficient value for z^0
[in]b1The filter coefficient value for z^(-1)