<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Convolution on Lloyd Rochester's Geek Blog</title><link>https://lloydroc.github.io/tags/convolution/</link><description>Recent content in Convolution on Lloyd Rochester's Geek Blog</description><generator>Hugo</generator><language>en</language><copyright>Copyright © 2025, Lloyd Rochester.</copyright><lastBuildDate>Tue, 21 Apr 2020 00:00:00 +0000</lastBuildDate><atom:link href="https://lloydroc.github.io/tags/convolution/index.xml" rel="self" type="application/rss+xml"/><item><title>A CLI Tool to Recommend Text</title><link>https://lloydroc.github.io/post/c/recommend-command-line/</link><pubDate>Tue, 14 Apr 2020 00:00:00 +0000</pubDate><guid>https://lloydroc.github.io/post/c/recommend-command-line/</guid><description>&lt;h1 id="hahahugoshortcode29s0hbhb">A CLI Tool to Recommend Text&lt;/h1>
&lt;p>Computers are fast at comparing one string to another, however, when we need to find which string is &lt;em>closest&lt;/em> to other strings things become more challenging. In this post we&amp;rsquo;ll create an command line utility that will recommend a string by comparing it to a list of strings. We&amp;rsquo;ll recommend the string that is the &lt;em>closest&lt;/em> one to our input string.&lt;/p>
&lt;p>Spell checkers and search engines have similar algorithms to this to recommend and match queries for search results.&lt;/p></description></item><item><title>PSK31 Convolutional Decoder Implementation in C</title><link>https://lloydroc.github.io/psk31/cnvdec/</link><pubDate>Wed, 13 Feb 2019 00:00:00 +0000</pubDate><guid>https://lloydroc.github.io/psk31/cnvdec/</guid><description>&lt;h1 id="psk31-convolutional-decoder">PSK31 Convolutional Decoder&lt;/h1>
&lt;p>In my humble opinion decoding a convolutionally encoded PSK31 output stream is the most challenging part of all. Decoding is also where all the magic happens. The Viterbi Decoder corrects the erroneous bits and allows reception of the intended bit stream.&lt;/p>
&lt;p>If this is the first time you&amp;rsquo;ve heard of a &lt;a href="https://en.wikipedia.org/wiki/Viterbi_decoder">Viterbi Decoder&lt;/a> please look at the former link from Wikipedia as well as these great examples that are in links below. What these examples allow you do is better visualize the entire state machine since they have a very small value for &lt;code>K&lt;/code> and only &lt;code>4&lt;/code> states. What we have here in QPSK31 is &lt;code>32&lt;/code> states and it makes it a bit inconvenient to use this as the first example to learn Viterbi Decoding. Also, be very comfortable with &lt;a href="https://lloydroc.github.io/psk31/cnvenc/">PSK31 Convolutional Encoding&lt;/a> and the state machine it uses, the generator functions, shift register and process to encode a bit stream with the PSK31 convolutional encoder.&lt;/p></description></item><item><title>PSK31 Convolutional Encoder implementation in C</title><link>https://lloydroc.github.io/psk31/cnvenc/</link><pubDate>Wed, 13 Feb 2019 00:00:00 +0000</pubDate><guid>https://lloydroc.github.io/psk31/cnvenc/</guid><description>&lt;h1 id="hahahugoshortcode109s0hbhb">PSK31 Convolutional Encoder implementation in C&lt;/h1>
&lt;h1 id="psk31-convolution-encoding">PSK31 Convolution Encoding&lt;/h1>
&lt;p>Convolutional Codes are often charactarized by three aspects:&lt;/p>
&lt;ol>
&lt;li>&lt;code>n&lt;/code> Base Code Rate - Number of bits into the encoder&lt;/li>
&lt;li>&lt;code>k&lt;/code> Output Symbol Rate - Number of bits out for an input&lt;/li>
&lt;li>&lt;code>K&lt;/code> Memory Depth&lt;/li>
&lt;/ol>
&lt;p>For QPSK31 we have &lt;code>[n,k,K] = [1,2,5]&lt;/code>. We give the encoder 1-bit of input, out comes 2-bits, and 5-bits of input are stored in our shift register. For the 2-bits of output 1-bit is In-Phase and the other is Quadrature. Let&amp;rsquo;s look at a diagram that allows us to envision &lt;code>[n,k,K]&lt;/code>.&lt;/p></description></item><item><title>Root Raised Cosine Filter in C</title><link>https://lloydroc.github.io/psk31/rrc/</link><pubDate>Wed, 13 Feb 2019 00:00:00 +0000</pubDate><guid>https://lloydroc.github.io/psk31/rrc/</guid><description>&lt;h1 id="hahahugoshortcode110s0hbhb">Root Raised Cosine Filter in C&lt;/h1>
&lt;h1 id="root-raised-cosine-filtering">Root Raised Cosine Filtering&lt;/h1>
&lt;p>The PSK31 Standard uses &lt;a href="https://en.wikipedia.org/wiki/Root-raised-cosine_filter">Root Raised Cosine Filters&lt;/a> as a matched filter. Our PSK31 signal is convolved by the Root Raised Cosine waveform to mimimize Inter-Symbol Interference. For this project we can easily compute the RRC filter and then convolve it with our output stream. For the computation of the RRC we need a couple of constants specific to the PSK31 standard.&lt;/p></description></item><item><title>Simple Convolution in C</title><link>https://lloydroc.github.io/post/c/convolution/</link><pubDate>Wed, 17 Oct 2018 06:10:00 +0000</pubDate><guid>https://lloydroc.github.io/post/c/convolution/</guid><description>&lt;h1 id="hahahugoshortcode15s0hbhb">Simple Convolution in C&lt;/h1>
&lt;p>Updated April 21, 2020&lt;/p>
&lt;p>In this blog post we&amp;rsquo;ll create a simple 1D convolution in C. We&amp;rsquo;ll show the classic example of convolving two squares to create a triangle. When convolution is performed it&amp;rsquo;s usually between two discrete signals, or time series. In this example we&amp;rsquo;ll use C arrays to represent each signal.&lt;/p>
&lt;p>When implementing convolution it&amp;rsquo;s important to know the length of convolution result, since the resulting array is bigger than the two input arrays. This can cause memory problems. Computing the length of the convolution result is actually a simple computation. If you have array &lt;strong>H&lt;/strong> convolved with array &lt;strong>X&lt;/strong>, where the lengths are 5 and 5 respectively, the resulting size of &lt;strong>Y=H*X&lt;/strong> (&lt;strong>H&lt;/strong> convolved with &lt;strong>X&lt;/strong> to make &lt;strong>Y&lt;/strong>) will be &lt;strong>Length(H) + Length(X) - 1&lt;/strong>. For this example the resulting length of two size 5 arrays will be 5+5-1 = 9. This convolution is typically done where &lt;strong>H&lt;/strong> is a digital filter and &lt;strong>X&lt;/strong> is a time series to be filtered. The output array &lt;strong>Y&lt;/strong> is the time series that results after filtering. For our example we have input arrays &lt;strong>H&lt;/strong> and &lt;strong>X&lt;/strong>. The output of array of our convolution will be called &lt;strong>Y&lt;/strong>.&lt;/p></description></item></channel></rss>