MotorWare f2806x Module API Documentation
Data Structures | Typedefs | Functions
float/filter_so.h File Reference

Contains the public interface to the second-order filter (FILTER_SO) module routines. More...

#include "sw/modules/types/src/types.h"

Go to the source code of this file.

Data Structures

struct  _FILTER_SO_Obj_
 Defines the second-order filter (FILTER_SO) object. More...
 

Typedefs

typedef struct _FILTER_SO_Obj_ FILTER_SO_Obj
 Defines the second-order filter (FILTER_SO) object. More...
 
typedef struct _FILTER_SO_Obj_FILTER_SO_Handle
 Defines the second-order filter (FILTER_SO) handle. More...
 

Functions

static float_t FILTER_SO_get_a1 (FILTER_SO_Handle handle)
 Gets the second-order filter denominator coefficient a1. More...
 
static float_t FILTER_SO_get_a2 (FILTER_SO_Handle handle)
 Gets the second-order filter denominator coefficient a2. More...
 
static float_t FILTER_SO_get_b0 (FILTER_SO_Handle handle)
 Gets the second-order filter numerator coefficient b0. More...
 
static float_t FILTER_SO_get_b1 (FILTER_SO_Handle handle)
 Gets the second-order filter numerator coefficient b1. More...
 
static float_t FILTER_SO_get_b2 (FILTER_SO_Handle handle)
 Gets the second-order filter numerator coefficient b2. More...
 
static float_t FILTER_SO_get_x1 (FILTER_SO_Handle handle)
 Gets the second-order filter input value at time sample n=-1. More...
 
static float_t FILTER_SO_get_x2 (FILTER_SO_Handle handle)
 Gets the second-order filter input value at time sample n=-2. More...
 
static float_t FILTER_SO_get_y1 (FILTER_SO_Handle handle)
 Gets the second-order filter output value at time sample n=-1. More...
 
static float_t FILTER_SO_get_y2 (FILTER_SO_Handle handle)
 Gets the second-order filter output value at time sample n=-2. More...
 
void FILTER_SO_getDenCoeffs (FILTER_SO_Handle handle, float_t *pa1, float_t *pa2)
 Gets the second-order filter denominator coefficients. More...
 
void FILTER_SO_getInitialConditions (FILTER_SO_Handle handle, float_t *px1, float_t *px2, float_t *py1, float_t *py2)
 Gets the initial conditions of the second-order filter. More...
 
void FILTER_SO_getNumCoeffs (FILTER_SO_Handle handle, float_t *pb0, float_t *pb1, float_t *pb2)
 Gets the second-order filter numerator coefficients. More...
 
FILTER_SO_Handle FILTER_SO_init (void *pMemory, const size_t numBytes)
 Initializes the second-order filter. More...
 
static float_t FILTER_SO_run (FILTER_SO_Handle handle, const float_t inputValue)
 Runs a second-order filter of the form y[n] = b0*x[n] + b1*x[n-1] + b2*x[n-2] - a1*y[n-1] - a2*y[n-2]. More...
 
static float_t FILTER_SO_run_form_0 (FILTER_SO_Handle handle, const float_t inputValue)
 Runs a simplified second-order filter of the form y[n] = b0*x[n] - a1*y[n-1] - a2*y[n-2]. More...
 
static float_t FILTER_SO_run_form_1 (FILTER_SO_Handle handle, const float_t inputValue)
 Runs a second-order filter of the form y[n] = b0*x[n] + b1*x[n-1] - a1*y[n-1] - a2*y[n-2]. More...
 
static void FILTER_SO_set_a1 (FILTER_SO_Handle handle, const float_t a1)
 Sets the second-order filter denominator coefficient a1. More...
 
static void FILTER_SO_set_a2 (FILTER_SO_Handle handle, const float_t a2)
 Sets the second-order filter denominator coefficient a2. More...
 
static void FILTER_SO_set_b0 (FILTER_SO_Handle handle, const float_t b0)
 Sets the second-order filter numerator coefficient b0. More...
 
static void FILTER_SO_set_b1 (FILTER_SO_Handle handle, const float_t b1)
 Sets the second-order filter numerator coefficient b1. More...
 
static void FILTER_SO_set_b2 (FILTER_SO_Handle handle, const float_t b2)
 Sets the second-order filter numerator coefficient b2. More...
 
static void FILTER_SO_set_x1 (FILTER_SO_Handle handle, const float_t x1)
 Sets the second-order filter input value at time sample n=-1. More...
 
static void FILTER_SO_set_x2 (FILTER_SO_Handle handle, const float_t x2)
 Sets the second-order filter input value at time sample n=-2. More...
 
static void FILTER_SO_set_y1 (FILTER_SO_Handle handle, const float_t y1)
 Sets the second-order filter output value at time sample n=-1. More...
 
static void FILTER_SO_set_y2 (FILTER_SO_Handle handle, const float_t y2)
 Sets the second-order filter output value at time sample n=-2. More...
 
void FILTER_SO_setDenCoeffs (FILTER_SO_Handle handle, const float_t a1, const float_t a2)
 Sets the second-order filter denominator coefficients. More...
 
void FILTER_SO_setInitialConditions (FILTER_SO_Handle handle, const float_t x1, const float_t x2, const float_t y1, const float_t y2)
 Sets the initial conditions of the second-order filter. More...
 
void FILTER_SO_setNumCoeffs (FILTER_SO_Handle handle, const float_t b0, const float_t b1, const float_t b2)
 Sets the second-order filter numerator coefficients. More...
 

Detailed Description

Contains the public interface to the second-order filter (FILTER_SO) module routines.

(C) Copyright 2014, Texas Instruments, Inc.

Definition in file float/filter_so.h.

Function Documentation

static float_t FILTER_SO_get_a1 ( FILTER_SO_Handle  handle)
inlinestatic

Gets the second-order filter denominator coefficient a1.

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

Definition at line 105 of file float/filter_so.h.

References _FILTER_SO_::a1.

static float_t FILTER_SO_get_a2 ( FILTER_SO_Handle  handle)
inlinestatic

Gets the second-order filter denominator coefficient a2.

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

Definition at line 116 of file float/filter_so.h.

References _FILTER_SO_::a2.

static float_t FILTER_SO_get_b0 ( FILTER_SO_Handle  handle)
inlinestatic

Gets the second-order filter numerator coefficient b0.

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

Definition at line 127 of file float/filter_so.h.

References _FILTER_SO_::b0.

static float_t FILTER_SO_get_b1 ( FILTER_SO_Handle  handle)
inlinestatic

Gets the second-order filter numerator coefficient b1.

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

Definition at line 138 of file float/filter_so.h.

References _FILTER_SO_::b1.

static float_t FILTER_SO_get_b2 ( FILTER_SO_Handle  handle)
inlinestatic

Gets the second-order filter numerator coefficient b2.

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

Definition at line 149 of file float/filter_so.h.

References _FILTER_SO_::b2.

static float_t FILTER_SO_get_x1 ( FILTER_SO_Handle  handle)
inlinestatic

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

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

Definition at line 160 of file float/filter_so.h.

References _FILTER_SO_::x1.

static float_t FILTER_SO_get_x2 ( FILTER_SO_Handle  handle)
inlinestatic

Gets the second-order filter input value at time sample n=-2.

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

Definition at line 171 of file float/filter_so.h.

References _FILTER_SO_::x2.

static float_t FILTER_SO_get_y1 ( FILTER_SO_Handle  handle)
inlinestatic

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

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

Definition at line 182 of file float/filter_so.h.

References _FILTER_SO_::y1.

static float_t FILTER_SO_get_y2 ( FILTER_SO_Handle  handle)
inlinestatic

Gets the second-order filter output value at time sample n=-2.

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

Definition at line 193 of file float/filter_so.h.

References _FILTER_SO_::y2.