HPM SDK
HPMicro Software Development Kit
hpm_mcl_filter.h File Reference
#include "hpm_common.h"

Go to the source code of this file.

Data Structures

struct  mcl_filter_iir_df1_matrix_t
 Gain matrix for iir filter type df1. More...
 
struct  mcl_filter_iir_df1_memory_t
 Buffer for running data. More...
 
struct  mcl_filter_iir_df1_cfg_t
 Configuration of iir filter type df1. More...
 
struct  mcl_filter_iir_df1_t
 iir df1 running data More...
 
struct  mcl_filter_pll_type_ii_cfg_t
 configuration of pll type ii filter More...
 
struct  mcl_filter_pll_type_ii_t
 Running data of pll type ii filter. More...
 
struct  mcl_filter_pll_type_i_cfg_t
 configuration of pll type i filter More...
 
struct  mcl_filter_pll_type_i_t
 Running data of pll type i filter. More...
 
struct  mcl_filter_pll_output_t
 Phase Locked Loop Filter Output Data. More...
 

Functions

hpm_mcl_stat_t hpm_mcl_filter_iir_df1_init (mcl_filter_iir_df1_t *iir, mcl_filter_iir_df1_cfg_t *cfg, mcl_filter_iir_df1_memory_t *mem)
 Initialising the iir filter. More...
 
float hpm_mcl_filter_iir_df1 (mcl_filter_iir_df1_t *iir, float input)
 iir filtering of input data More...
 
void hpm_mcl_filter_pll_type_ii (mcl_filter_pll_type_ii_t *pll, float sin_val, float cos_val, mcl_filter_pll_output_t *output)
 
void hpm_mcl_filter_pll_type_i (mcl_filter_pll_type_i_t *pll, float sin_val, float cos_val, mcl_filter_pll_output_t *output)
 

Function Documentation

◆ hpm_mcl_filter_iir_df1()

float hpm_mcl_filter_iir_df1 ( mcl_filter_iir_df1_t iir,
float  input 
)

iir filtering of input data

Parameters
iirmcl_filter_iir_df1_t
inputraw data
Returns
Filtered data

◆ hpm_mcl_filter_iir_df1_init()

hpm_mcl_stat_t hpm_mcl_filter_iir_df1_init ( mcl_filter_iir_df1_t iir,
mcl_filter_iir_df1_cfg_t cfg,
mcl_filter_iir_df1_memory_t mem 
)

Initialising the iir filter.

Parameters
iirmcl_filter_iir_df1_t
cfgmcl_filter_iir_df1_cfg_t
memmcl_filter_iir_df1_memory_t
Returns
hpm_mcl_stat_t

◆ hpm_mcl_filter_pll_type_i()

void hpm_mcl_filter_pll_type_i ( mcl_filter_pll_type_i_t pll,
float  sin_val,
float  cos_val,
mcl_filter_pll_output_t output 
)

Type I Phase-Locked Loop (PLL) Filter. This function processes the input signal to estimate the phase and speed of the signal.

Parameters
pllPointer to the mcl_filter_pll_type_i_t structure, containing the internal state and configuration of the PLL.
sin_valThe sine component of the input signal, used for phase difference calculation.
cos_valThe cosine component of the input signal, used for phase difference calculation.
outputPointer to the mcl_filter_pll_output_t structure, for storing the output results including theta and speed.

◆ hpm_mcl_filter_pll_type_ii()

void hpm_mcl_filter_pll_type_ii ( mcl_filter_pll_type_ii_t pll,
float  sin_val,
float  cos_val,
mcl_filter_pll_output_t output 
)

Type II Phase-Locked Loop (PLL) Filter. This function updates the PLL state based on the input sine and cosine values and calculates the output theta and speed.

Parameters
pllPointer to the PLL structure containing the state and configuration parameters.
sin_valThe sine value of the input signal, representing the sine component.
cos_valThe cosine value of the input signal, representing the cosine component.
outputPointer to the output structure to store the computed theta and speed.