FiltersSDK 1.0.8

dotnet add package FiltersSDK --version 1.0.8                
NuGet\Install-Package FiltersSDK -Version 1.0.8                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FiltersSDK" Version="1.0.8" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FiltersSDK --version 1.0.8                
#r "nuget: FiltersSDK, 1.0.8"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install FiltersSDK as a Cake Addin
#addin nuget:?package=FiltersSDK&version=1.0.8

// Install FiltersSDK as a Cake Tool
#tool nuget:?package=FiltersSDK&version=1.0.8                

Filters SDK

Description

It is a cross-platform library that allows you to filter the signal with a given set of filters for a specified sampling rate.

The library provides built-in filters of the following types:

  1. high pass - high pass filter (HPF). Cuts off all frequencies below the filter pass frequency
  2. low pass - low pass filter (LPF). Cuts off all frequencies above filter pass frequency.
  3. band pass - bandpass filter. Passes a certain bandwidth
  4. band stop is a band reject filter. Suppresses a certain band.

Digital signal processing involves the formation of the necessary bandwidth and suppression of network interference. The bandwidth is formed by sequential application of VFD and LPF filters. The HPF removes the constant component of the signal and the drift of the isoline, attracting the signal to 0. The LPF removes high-frequency noise from the signal. Mains interference caused by mains interference usually has the frequency of the mains itself - 50 Hz for Russia and CIS countries and 60 Hz for America and some other countries. Mains interference often has a very high amplitude signal and even when outside the signal bandwidth it still gives significant distortion, which leads to the need to suppress it with regenerative filters.

Maximum available signal bandwidth directly depends on sampling frequency and according to Nyquest law does not exceed half of sampling frequency. In practice, usually guided by the rule - Fh=Fd/4. Thus, if we have a sampling frequency of 1000 Hz, the maximum signal frequency will be 250 Hz. This value can be pushed higher, up to 400 Hz, but the higher the frequency, the lower the accuracy of the signal transmission will be.

Thus, a typical signal processing chain is the use of LPF, LPF and the required number of notch filters. The order in which the filters are applied does not matter.

Each filter has a set of internal coefficients, which are recalculated after each new sample of the signal. This means that you cannot use the same instance of the filter class to process multiple signals at once. The rule 1 filter - 1 signal works here.

Types

IIR FilterType

Type of filter, enum with values:

  1. FtHP - high pass filter
  2. FtLP - low pass filter
  3. FtBandStop - band stop filter
  4. FtBandPass - band pass filter
  5. FtNone - default value, type not set
IIR FilterParam

Parameters of filter, structure with fields:

  1. type - type of filter
  2. samplingFreq - sampling frequency of raw signal, integer value
  3. cutoffFreq - central frequency, double value

Preinstalled filters

Library contains a list of some filters. The full list you can get with functions:

C#
IIRFilterParam[] preinstallFilters = PreinstalledFilters.List();

Initialization

For work with filter you need to create a Filter object and optionally FilterList object. The FilterList contains objects of the Filter type and manipulates them.

C#
// creating filter
IIRFilterParam param;
param.type = FtBandStop;
param.samplingFreq = 250;
param.cutoffFreq = 50.0;
IIRFilter filter = new IIRFilter(param);

// then create list of filters
FilterList flist = new FilterList();

// and add the filter
flist.AddFilter(filter);

Work with library

Filter one value:

C#
// by one filter
double sample = SAMPLE;
double filteredValue = filter.Filter(sample);

// by list of filters
double sample = SAMPLE;
double filteredValue = flist.Filter(sample);

Filter array of values:

C#
// by one filter
double[] samples = new double[max_samples];
filter.FilterArray(samples);

// by list of filters
double[] samples = new double[max_samples];
flist.FilterArray(samples);

Finishing work with the library

C#
// removing filters
filter.Dispose();

// removing list of filters
flist.Dispose();
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid is compatible. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Universal Windows Platform uap was computed.  uap10.0 is compatible. 
Xamarin.iOS xamarinios was computed.  xamarinios10 is compatible. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.
  • MonoAndroid 0.0

    • No dependencies.
  • UAP 10.0

    • No dependencies.
  • Xamarin.iOS 1.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.8 258 12/21/2023
1.0.7 140 12/21/2023
1.0.6 125 12/21/2023
1.0.5 203 8/2/2023
1.0.4 186 7/24/2023