This example demonstrates the use of Basic Math and Support Functions to calculate the variance of an input sequence with N samples. Uniformly distributed white noise is taken as input. As per the algorithm, variance of a sequence is the mean of the squared deviation of the sequence from its mean.This is denoted by the following equation:
variance = ((x[0] - x') * (x[0] - x') + (x[1] - x') * (x[1] - x') + ... + * (x[n-1] - x') * (x[n-1] - x')) / (N-1)
where, x[n]
is the input sequence, N
is the number of input samples, and x'
is the mean value of the input sequence, The mean value x'
is defined as:
x' = (x[0] + x[1] + ... + x[n-1]) / N
. CMSIS DSP Software Library Functions which are being used in this example are as follows:
Parameter | Value |
---|---|
CPU + OS | m4fss0-0 freertos |
m4fss0-0 nortos | |
Toolchain | ti-arm-clang |
Boards | xWRL6432-evm |
Example folder | examples/cmsis-dsp/arm_variance_example/ |
A GUI tool SysConfig is used to configure different modules and peripherals of the example. Using this tool, users can select and customize different modules and peripherals. The SysConfig tool will generate the code for initializing and configuring these modules. This configuration is saved to a file called example.syscfg for every example. To know more about how to use SDK with SysConfig, Visit this page
Shown below is a sample output when the application is run,