<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Marty de Vries &#8211; ASN Home</title>
	<atom:link href="https://www.advsolned.com/author/mdevries/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.advsolned.com</link>
	<description>ASN home site</description>
	<lastBuildDate>Tue, 16 May 2023 07:32:09 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>How to add an extra MA or Median filter to the ASN DSP filtering ANSI C code framework</title>
		<link>https://www.advsolned.com/how-to-add-an-extra-ma-or-median-filter-to-the-asn-dsp-filtering-ansi-c-code-framework/</link>
		
		<dc:creator><![CDATA[Marty de Vries]]></dc:creator>
		<pubDate>Thu, 06 Apr 2023 13:25:21 +0000</pubDate>
				<category><![CDATA[ASN Filter Designer]]></category>
		<category><![CDATA[ANSI C]]></category>
		<category><![CDATA[Arm Cortex-M]]></category>
		<category><![CDATA[digital filter]]></category>
		<category><![CDATA[filters]]></category>
		<category><![CDATA[MA filter]]></category>
		<category><![CDATA[moving average]]></category>
		<guid isPermaLink="false">https://www.advsolned.com/?p=19328</guid>

					<description><![CDATA[<p>ASN Filter Designer’s ANSI C SDK framework, provides developers with a comprehensive C code framework for developing an AIoT filtering application on microcontrollers and embedded platforms.</p>
<p>The post <a rel="nofollow" href="https://www.advsolned.com/how-to-add-an-extra-ma-or-median-filter-to-the-asn-dsp-filtering-ansi-c-code-framework/">How to add an extra MA or Median filter to the ASN DSP filtering ANSI C code framework</a> appeared first on <a rel="nofollow" href="https://www.advsolned.com">ASN Home</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><section class="av_textblock_section "  itemscope="itemscope" itemtype="https://schema.org/BlogPosting" itemprop="blogPost" ><div class='avia_textblock  '   itemprop="text" ><p>ASN Filter Designer’s ANSI C SDK framework, provides developers with a comprehensive C code framework for developing  AIoT filtering application on microcontrollers and embedded platforms. Although the framework has been primarily designed to support the just ASN filter Designer’s filter cascade, it is possible to create extra filter objects to augment the cascade.</p>
<p>Two common filtering methods used by AIoT developers are the Median and moving average (MA) filters. Although these fully integrated within the Framework’s filter cascade, it is often useful to have the flexibility of an additional filtering block to act as a post filter smoothing filter.</p>
<p>An extra median or MA filter may be easily added to <code>main.c</code> as shown below. Notice that data is filtered in blocks of 4 as required by the framework.</p>
<h2>Median filter</h2>
<p>The Median filter is non-linear filtering method that uses the concept of majority voting (i.e. calculating the median) to remove glitches and smooth data.  It is edge preserving, making it a good choice for enhancing square waves or pulse like data.<br />
[code language=&#8221;cpp&#8221;]<br />
#include &quot;ASN_DSP/DSPFilters/MedianFilter.h&quot;<br />
float InputTemp[4];<br />
float OutputTemp[4];</p>
<p>MedianFilter_t MyMedianfilter;</p>
<p>InitMedianFilter(&amp;MyMedianfilter,7);  // median of length 7</p>
<p>   for (n=0; n&lt;TEST_LENGTH_SAMPLES; n+=4)<br />
   {<br />
        InputTemp[0]=InputValues[n];<br />
        InputTemp[1]=InputValues[n+1];<br />
        InputTemp[2]=InputValues[n+2];<br />
        InputTemp[3]=InputValues[n+3];</p>
<p>        MedianFilterData(&amp;MyMedianfilter,InputTemp, OutputTemp);</p>
<p>        OutputValues[n]=OutputTemp[0];<br />
        OutputValues[n+1]=OutputTemp[1];<br />
        OutputValues[n+2]=OutputTemp[2];<br />
        OutputValues[n+3]=OutputTemp[3];<br />
   }</p>
<p>[/code]<br />
<span class="" style="display:block;clear:both;height: 0px;padding-top: 20px;border-top-width:0px;border-bottom-width:0px;"></span></p>
<h2>Moving Average filter</h2>
<p>The moving average (MA) filter is optimal for reducing random noise while retaining a sharp step response, making it a versatile building block for smart sensor signal processing applications. It is perhaps one of the most widely used digital filters due to its conceptual simplicity and ease of implementation.<br />
[code language=&#8221;cpp&#8221;]<br />
#include &quot;ASN_DSP/DSPFilters/MAFilter.h&quot;<br />
float InputTemp[4];<br />
float OutputTemp[4];</p>
<p>MAFilter_t MyMAfilter;</p>
<p>InitMAFilter(&amp;MyMAfilter,9);  // MA of length 9</p>
<p>   for (n=0; n&lt;TEST_LENGTH_SAMPLES; n+=4)<br />
   {<br />
       InputTemp[0]=InputValues[n];<br />
       InputTemp[1]=InputValues[n+1];<br />
       InputTemp[2]=InputValues[n+2];<br />
       InputTemp[3]=InputValues[n+3];</p>
<p>       MAFilterData(&amp;MyMAfilter,InputTemp, OutputTemp);</p>
<p>       OutputValues[n]=OutputTemp[0];<br />
       OutputValues[n+1]=OutputTemp[1];<br />
       OutputValues[n+2]=OutputTemp[2];<br />
       OutputValues[n+3]=OutputTemp[3];<br />
   }</p>
<p>[/code]<br />
<span class="" style="display:block;clear:both;height: 0px;padding-top: 20px;border-top-width:0px;border-bottom-width:0px;"></span></p>
<p><a href="https://www.advsolned.com/wp-content/uploads/2018/02/ASNFDbox.png"><img decoding="async" class="alignleft wp-image-3310" style="margin: 10px 80px 10px 20px;" src="https://www.advsolned.com/wp-content/uploads/2018/02/ASNFDbox.png" alt="" width="183" height="253" srcset="https://www.advsolned.com/wp-content/uploads/2018/02/ASNFDbox.png 800w, https://www.advsolned.com/wp-content/uploads/2018/02/ASNFDbox-217x300.png 217w, https://www.advsolned.com/wp-content/uploads/2018/02/ASNFDbox-768x1062.png 768w, https://www.advsolned.com/wp-content/uploads/2018/02/ASNFDbox-745x1030.png 745w, https://www.advsolned.com/wp-content/uploads/2018/02/ASNFDbox-510x705.png 510w, https://www.advsolned.com/wp-content/uploads/2018/02/ASNFDbox-450x622.png 450w" sizes="(max-width: 183px) 100vw, 183px" /></a></p>
<p style="text-align: left;"><a class="button" href="https://www.advsolned.com/request-form-asn-filter-designer-demo/">Download demo now</a></p>
<p><a class="button" href="https://www.advsolned.com/pricing-and-licencing/#Best_licence_forme">Licencing information</a></p>
</div></section><br />
<span class="" style="display:block;clear:both;height: 0px;padding-top: 20px;border-top-width:0px;border-bottom-width:0px;"></span>
                
                    <!--begin code -->

                    
                    <div class="pp-multiple-authors-boxes-wrapper pp-multiple-authors-wrapper pp-multiple-authors-layout-boxed multiple-authors-target-shortcode box-post-id-19551 box-instance-id-1 ppma_boxes_19551"
                    data-post_id="19551"
                    data-instance_id="1"
                    data-additional_class="pp-multiple-authors-layout-boxed.multiple-authors-target-shortcode"
                    data-original_class="pp-multiple-authors-boxes-wrapper pp-multiple-authors-wrapper box-post-id-19551 box-instance-id-1">
                                                                                    <h2 class="widget-title box-header-title">Author</h2>
                                                                            <span class="ppma-layout-prefix"></span>
                        <div class="ppma-author-category-wrap">
                                                                                                                                    <span class="ppma-category-group ppma-category-group-1 category-index-0">
                                                                                                                        <ul class="pp-multiple-authors-boxes-ul author-ul-0">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                    <li class="pp-multiple-authors-boxes-li author_index_0 author_mdevries has-avatar">
                                                                                                                                                                                    <div class="pp-author-boxes-avatar">
                                                                    <div class="avatar-image">
                                                                                                                                                                                                                <img alt='' src='https://www.advsolned.com/wp-content/uploads/2023/05/martydvries.png' srcset='https://www.advsolned.com/wp-content/uploads/2023/05/martydvries.png' class='multiple_authors_guest_author_avatar avatar' height='80' width='80'/>                                                                                                                                                                                                            </div>
                                                                                                                                    </div>
                                                            
                                                            <div class="pp-author-boxes-avatar-details">
                                                                <div class="pp-author-boxes-name multiple-authors-name"><a href="https://www.advsolned.com/author/mdevries/" rel="author" title="Marty de Vries" class="author url fn">Marty de Vries</a></div>                                                                                                                                                                                                        <p class="pp-author-boxes-description multiple-authors-description author-description-0">
                                                                                                                                                    Marty is an applications engineer and embedded software expert at ASN. He has over 10 years experience in developing high performance embedded libraries and applications for Arm processors.                                                                                                                                                </p>
                                                                                                                                
                                                                                                                                    <span class="pp-author-boxes-meta multiple-authors-links">
                                                                        <a href="https://www.advsolned.com/author/mdevries/" title="View all posts">
                                                                            <span>View all posts</span>
                                                                        </a>
                                                                    </span>
                                                                                                                                <a class="ppma-author-user_email-profile-data ppma-author-field-meta ppma-author-field-type-email" aria-label="Email" href="mailto:info@advsolned.com"  target="_self"><span class="dashicons dashicons-email-alt"></span> </a>
                                                                                                                            </div>
                                                                                                                                                                                                                        </li>
                                                                                                                                                                                                                                    </ul>
                                                                            </span>
                                                                                                                        </div>
                        <span class="ppma-layout-suffix"></span>
                                            </div>
                    <!--end code -->
                    
                
                                <style>
                .pp-multiple-authors-boxes-wrapper.pp-multiple-authors-layout-boxed.multiple-authors-target-shortcode .pp-author-boxes-avatar img { 
        width: 80px !important; 
        height: 80px !important; 
    }

    .pp-multiple-authors-boxes-wrapper.pp-multiple-authors-layout-boxed.multiple-authors-target-shortcode .pp-author-boxes-avatar img {
        border-radius: 50% !important; 
    }

    .pp-multiple-authors-boxes-wrapper.pp-multiple-authors-layout-boxed.multiple-authors-target-shortcode .pp-author-boxes-meta a {
        background-color: #655997 !important; 
    }

    .pp-multiple-authors-boxes-wrapper.pp-multiple-authors-layout-boxed.multiple-authors-target-shortcode .pp-author-boxes-meta a {
        color: #ffffff !important; 
    }

    .pp-multiple-authors-boxes-wrapper.pp-multiple-authors-layout-boxed.multiple-authors-target-shortcode .pp-author-boxes-meta a:hover {
        color: #ffffff !important; 
    }

    .pp-multiple-authors-boxes-wrapper.pp-multiple-authors-layout-boxed.multiple-authors-target-shortcode .ppma-author-user_url-profile-data {
        background-color: #655997 !important; 
    }

    .pp-multiple-authors-boxes-wrapper.pp-multiple-authors-layout-boxed.multiple-authors-target-shortcode .ppma-author-user_url-profile-data {
        border-radius: 100% !important; 
    }

    .pp-multiple-authors-boxes-wrapper.pp-multiple-authors-layout-boxed.multiple-authors-target-shortcode .ppma-author-user_url-profile-data {
        color: #ffffff !important; 
    }

    .pp-multiple-authors-boxes-wrapper.pp-multiple-authors-layout-boxed.multiple-authors-target-shortcode .ppma-author-user_url-profile-data:hover {
        color: #ffffff !important; 
    }

    .pp-multiple-authors-boxes-wrapper.pp-multiple-authors-layout-boxed.multiple-authors-target-shortcode .ppma-author-user_email-profile-data {
        background-color: #655997 !important; 
    }

    .pp-multiple-authors-boxes-wrapper.pp-multiple-authors-layout-boxed.multiple-authors-target-shortcode .ppma-author-user_email-profile-data {
        border-radius: 100% !important; 
    }

    .pp-multiple-authors-boxes-wrapper.pp-multiple-authors-layout-boxed.multiple-authors-target-shortcode .ppma-author-user_email-profile-data {
        color: #ffffff !important; 
    }

    .pp-multiple-authors-boxes-wrapper.pp-multiple-authors-layout-boxed.multiple-authors-target-shortcode .ppma-author-user_email-profile-data:hover {
        color: #ffffff !important; 
    }

    .pp-multiple-authors-boxes-wrapper.pp-multiple-authors-layout-boxed.multiple-authors-target-shortcode .pp-author-boxes-recent-posts-title {
        border-bottom-style: dotted !important; 
    }

    .pp-multiple-authors-boxes-wrapper.pp-multiple-authors-layout-boxed.multiple-authors-target-shortcode .pp-multiple-authors-boxes-li {
        border-style: solid !important; 
    }

    .pp-multiple-authors-boxes-wrapper.pp-multiple-authors-layout-boxed.multiple-authors-target-shortcode .pp-multiple-authors-boxes-li {
        color: #3c434a !important; 
    }

    .pp-multiple-authors-boxes-wrapper.pp-multiple-authors-layout-boxed.multiple-authors-target-shortcode .pp-multiple-authors-boxes-li {
        border-radius: px !important; 
    }

            </style>
        
        </p>
		<div class="wpulike wpulike-default " ><div class="wp_ulike_general_class wp_ulike_is_not_liked"><button type="button"
					aria-label="Like Button"
					data-ulike-id="19328"
					data-ulike-nonce="836056a7ec"
					data-ulike-type="post"
					data-ulike-template="wpulike-default"
					data-ulike-display-likers=""
					data-ulike-likers-style="popover"
					class="wp_ulike_btn wp_ulike_put_image wp_post_btn_19328"></button><span class="count-box wp_ulike_counter_up" data-ulike-counter-value="+2"></span>			</div></div>
	<p>The post <a rel="nofollow" href="https://www.advsolned.com/how-to-add-an-extra-ma-or-median-filter-to-the-asn-dsp-filtering-ansi-c-code-framework/">How to add an extra MA or Median filter to the ASN DSP filtering ANSI C code framework</a> appeared first on <a rel="nofollow" href="https://www.advsolned.com">ASN Home</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
