<?xml version="1.0" encoding="UTF-8" standalone="no"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:gd="http://schemas.google.com/g/2005" xmlns:georss="http://www.georss.org/georss" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-410288222235817148</atom:id><lastBuildDate>Fri, 30 Aug 2024 04:21:50 +0000</lastBuildDate><title>Microwave Engineering Project</title><description>A system for amateur radio.</description><link>http://microwaveengineeringproject.blogspot.com/</link><managingEditor>noreply@blogger.com (Michelle)</managingEditor><generator>Blogger</generator><openSearch:totalResults>150</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><language>en-us</language><itunes:explicit>no</itunes:explicit><copyright>copyright MEP</copyright><itunes:image href="http://photos12.flickr.com/14340560_a4f24642c2_s.jpg"/><itunes:keywords>amateur,radio,ham,communications,software,microwave</itunes:keywords><itunes:summary>This feed pushes updated documents relating to a microwave-band amateur radio project. The design process is open source, open architecture, and open invitation.</itunes:summary><itunes:subtitle>Microwave Engineering Project for Amateur Radio</itunes:subtitle><itunes:category text="Technology"><itunes:category text="Tech News"/></itunes:category><itunes:author>w5nyv</itunes:author><itunes:owner><itunes:email>w5nyv@yahoo.com</itunes:email><itunes:name>w5nyv</itunes:name></itunes:owner><item><guid isPermaLink="false">tag:blogger.com,1999:blog-410288222235817148.post-9097464958720067401</guid><pubDate>Sun, 10 Jun 2012 17:34:00 +0000</pubDate><atom:updated>2012-06-10T10:34:04.603-07:00</atom:updated><title>LinkedIn Password Reset Notification</title><description>&lt;table border="0" width="550" cellpadding="0" cellspacing="0" style="max-width:550px; border-top:4px solid #39C; font: 12px arial, sans-serif; margin: 0 auto;"&gt;&lt;tr&gt;&lt;td&gt;      &lt;h1 style="color: #000; font: bold 23px arial; margin:5px 0;" &gt;LinkedIn&lt;/h1&gt;    &lt;p style="margin-bottom: 6pt;"&gt;Hi Jeffrey,&lt;/p&gt;    &lt;p style="margin-bottom: 6pt;"&gt;Your LinkedIn password has been reset successfully.&lt;/p&gt;    &lt;p style="margin-bottom: 6pt;"&gt;Thank you,&lt;/p&gt;  &lt;p&gt;The LinkedIn Team&lt;/p&gt;        &lt;table border="0" cellspacing="0" cellpadding="0" style="font-family:Arial;" width="100%"&gt;    &lt;tr&gt;&lt;td&gt;&lt;table width="1" border="0" cellspacing="0" cellpadding="0"&gt;&lt;tr&gt;&lt;td&gt;&lt;div style="height:10px;font-size:10px;line-height:10px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;    &lt;tr&gt;      &lt;td align="left" style="font-size:11px; font-family:Arial,sans-serif; color:#999999;"&gt;                This email was intended for Jeffrey Pawlan. &lt;a style="color: #006699" href="http://www.linkedin.com/e/8eya3p-h3ae73f5-2c/plh/http%3A%2F%2Fhelp%2Elinkedin%2Ecom%2Fapp%2Fanswers%2Fdetail%2Fa_id%2F4788/-GXI/?hs=false&amp;tok=3REx2IIwE-Dlg1"&gt;Learn why we included this&lt;/a&gt;. &amp;copy; 2012, LinkedIn Corporation. 2029 Stierlin Ct. Mountain View, CA 94043, USA      &lt;/td&gt;    &lt;/tr&gt;    &lt;tr&gt;&lt;td&gt;&lt;table width="1" border="0" cellspacing="0" cellpadding="0"&gt;&lt;tr&gt;&lt;td&gt;&lt;div style="height:10px;font-size:10px;line-height:10px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;  &lt;/table&gt;      </description><link>http://microwaveengineeringproject.blogspot.com/2012/06/linkedin-password-reset-notification.html</link><thr:total>0</thr:total><author>w5nyv@yahoo.com (w5nyv)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-410288222235817148.post-7024192105457244643</guid><pubDate>Fri, 27 Jan 2012 20:40:00 +0000</pubDate><atom:updated>2012-01-27T12:40:16.120-08:00</atom:updated><title>Heads-up Display Proposal for GNU Radio (and MEP)</title><description></description><enclosure length="0" type="application/pdf" url="http://www.delmarnorth.com/microwave/newsletters/GNU_Radio_HUD.pdf"/><link>http://microwaveengineeringproject.blogspot.com/2012/01/heads-up-display-proposal-for-gnu-radio.html</link><thr:total>1</thr:total><author>w5nyv@yahoo.com (w5nyv)</author><itunes:explicit>no</itunes:explicit><itunes:author>w5nyv</itunes:author><itunes:keywords>amateur,radio,ham,communications,software,microwave</itunes:keywords></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-410288222235817148.post-4200434787669795469</guid><pubDate>Sun, 28 Aug 2011 16:14:00 +0000</pubDate><atom:updated>2011-08-28T09:14:03.948-07:00</atom:updated><title>Six-Ports</title><description>Paper appearing in The Proceedings of Microwave Update 2011. It's about the basics of six-port theory, with an explanation of six-ports as modulator and demodulator.</description><enclosure length="0" type="application/pdf" url="http://www.delmarnorth.com/microwave/newsletters/sixportmodel.pdf"/><link>http://microwaveengineeringproject.blogspot.com/2011/08/six-ports.html</link><thr:total>0</thr:total><author>w5nyv@yahoo.com (w5nyv)</author><itunes:explicit>no</itunes:explicit><itunes:subtitle>Paper appearing in The Proceedings of Microwave Update 2011. It's about the basics of six-port theory, with an explanation of six-ports as modulator and demodulator.</itunes:subtitle><itunes:author>w5nyv</itunes:author><itunes:summary>Paper appearing in The Proceedings of Microwave Update 2011. It's about the basics of six-port theory, with an explanation of six-ports as modulator and demodulator.</itunes:summary><itunes:keywords>amateur,radio,ham,communications,software,microwave</itunes:keywords></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-410288222235817148.post-2495687719975733741</guid><pubDate>Sun, 28 Aug 2011 02:19:00 +0000</pubDate><atom:updated>2011-08-27T19:19:45.421-07:00</atom:updated><title>Six-port article for MUD</title><description>&lt;div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"&gt;&lt;div&gt;&lt;meta http-equiv="x-dns-prefetch-control" content="off"&gt;&lt;/div&gt;&lt;div id="yiv1813008296"&gt;&lt;div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "&gt;&lt;div id="yiv1813008296yui_3_2_0_17_131440696601448"&gt;&lt;span id="yiv1813008296yui_3_2_0_17_131440696601471"&gt;Greetings all!&lt;/span&gt;&lt;/div&gt;&lt;div id="yiv1813008296yui_3_2_0_17_131440696601448"&gt;&lt;span id="yiv1813008296yui_3_2_0_17_131440696601471"&gt;&lt;br&gt;&lt;/span&gt;&lt;/div&gt;&lt;div id="yiv1813008296yui_3_2_0_17_131440696601448"&gt;This October, a six-port paper will be included in the Proceedings of Microwave Update 2011. If you read the old six-port paper, this is a major revision and expansion.&amp;nbsp;&lt;/div&gt;&lt;div id="yiv1813008296yui_3_2_0_17_131440696601448"&gt;&lt;br&gt;&lt;/div&gt;&lt;div  id="yiv1813008296yui_3_2_0_17_131440696601448"&gt;http://www.delmarnorth.com/microwave/newsletters/sixportmodel.pdf&lt;br id="yiv1813008296yui_3_2_0_17_131440696601495"&gt;&lt;/div&gt;&lt;div id="yiv1813008296yui_3_2_0_17_131440696601448"&gt;&lt;br&gt;&lt;/div&gt;&lt;div id="yiv1813008296yui_3_2_0_17_131440696601448"&gt;Next step: building six-ports with the recently received couplers and dividers, at 1.2GHz in order to experiment with local amateur  DTV.&amp;nbsp;&lt;/div&gt;&lt;div id="yiv1813008296yui_3_2_0_17_131440696601448"&gt;&lt;br&gt;&lt;/div&gt;&lt;div id="yiv1813008296yui_3_2_0_17_131440696601448"&gt;https://plus.google.com/114254220048556407553/posts/MVTkLTbNuXB&lt;br id="yiv1813008296yui_3_2_0_17_1314406966014112"&gt;&lt;/div&gt;&lt;div id="yiv1813008296yui_3_2_0_17_131440696601448"&gt;&lt;br&gt;&lt;/div&gt;&lt;div id="yiv1813008296yui_3_2_0_17_131440696601448"&gt;I'm hoping that experiments at 1.2GHz will produce enough know-how to make a reliable recipe, and then that recipe can be used at 3 and 5 GHz.&lt;br id="yiv1813008296yui_3_2_0_17_1314406966014123"&gt;&lt;/div&gt;&lt;div id="yiv1813008296yui_3_2_0_17_131440696601448"&gt;&lt;br&gt;&lt;/div&gt;&lt;div id="yiv1813008296yui_3_2_0_17_131440696601448"&gt;I'll be out of town until September 7th. My three children will be back in school on Monday, and I'll begin to have a lot more time to help out on MEP and related experiments. Summer is a bit more challenging in terms of having uninterrupted time.&lt;/div&gt;&lt;div  id="yiv1813008296yui_3_2_0_17_131440696601448"&gt;&lt;br&gt;&lt;/div&gt;&lt;div id="yiv1813008296yui_3_2_0_17_131440696601448"&gt;This list is intended to support and encourage  amateur microwave engineering projects, so please speak up with ideas, comments, critiques, proposals and plans.&amp;nbsp;&lt;/div&gt;&lt;div id="yiv1813008296yui_3_2_0_17_131440696601454"&gt;&lt;br&gt;&lt;/div&gt;&lt;div id="yiv1813008296yui_3_2_0_17_131440696601454"&gt;Looking forward to the fall,&amp;nbsp;&lt;/div&gt;&lt;div id="yiv1813008296yui_3_2_0_17_1314406966014136"&gt;-Michelle W5NYV&lt;br id="yiv1813008296yui_3_2_0_17_131440696601459"&gt;&lt;/div&gt;&lt;br&gt;&lt;div id="yiv1813008296yui_3_2_0_17_1314406966014146"&gt;Sit vis vobiscum!&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;meta http-equiv="x-dns-prefetch-control" content="on"&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://microwaveengineeringproject.blogspot.com/2011/08/six-port-article-for-mud.html</link><thr:total>0</thr:total><author>w5nyv@yahoo.com (w5nyv)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-410288222235817148.post-6735914889227253361</guid><pubDate>Mon, 08 Aug 2011 17:19:00 +0000</pubDate><atom:updated>2011-08-08T10:20:13.491-07:00</atom:updated><title>Qt4 built, building a GUI for SDRs</title><description>&lt;div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"&gt;&lt;div&gt;&lt;span&gt;After reinstalling Xcode, Qt4 installed from the repository. This is the recommended way to build GUIs for MEP. Thanks to Jacob for highlighting Qt4 and recommending a book.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;If you're interested in building the GUI, then install Qt and speak up! &amp;nbsp;:+)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;Tom Rondeau had some very nice things to say about a model-view-controller architecture-for-SDR letter I wrote him and fred harris a couple months back. The response got me thinking about exactly how one would want to partition tasks for an SDR, and how those partitions could improve the user experience and user interface.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;Model-view-controller type software writing can be very user (and user-interface) focused. What  I'd like to look at is how to best write a GUI for SDR. While the application is MEP, I'm looking for generalizations that will be useful to others.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;What do you all think?&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;-Michelle W5NYV&lt;/div&gt;&lt;/div&gt;</description><link>http://microwaveengineeringproject.blogspot.com/2011/08/qt4-built-building-gui-for-sdrs.html</link><thr:total>0</thr:total><author>w5nyv@yahoo.com (w5nyv)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-410288222235817148.post-8810463585112047096</guid><pubDate>Fri, 22 Jul 2011 22:51:00 +0000</pubDate><atom:updated>2011-07-22T15:51:55.474-07:00</atom:updated><title>Numbering Scheme, looking for hybrid couplers and dividers, and MUD?</title><description>&lt;div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"&gt;&lt;div&gt;&lt;span&gt;Hi everyone!&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;/span&gt;Here's a document about the numbering scheme in the IQ Gain and Phase Correction Filter.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I bought the first set of parts for experimenting with six-port structures. Two 90 degree hybrid couplers off eBay. The target application is DVB amateur television. There's a repeater near me for DVB ATV. The frequency of interest for this experiment is 1.2GHz.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;If you have any 90 degree hybrid couplers or power dividers for this frequency, and are willing to donate them to the cause, let me know! I'm looking for at least 4 more couplers and 2 dividers (0 degree phase, equal power dividers).&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Does anyone have any plans to attend Microwave Update in Connecticut this  year?&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;-Michelle W5NYV&lt;br&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;</description><link>http://microwaveengineeringproject.blogspot.com/2011/07/numbering-scheme-looking-for-hybrid.html</link><thr:total>0</thr:total><author>w5nyv@yahoo.com (w5nyv)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-410288222235817148.post-2985021683577920287</guid><pubDate>Thu, 02 Jun 2011 19:48:00 +0000</pubDate><atom:updated>2011-06-02T12:48:49.247-07:00</atom:updated><title>FPGAs in space</title><description>Article from EE Times about FPGAs in a cubesat project.&lt;p&gt;&lt;br&gt;&lt;a href="http://www.eetimes.com/design/military-aerospace-design/4216480/High-performance-FPGAs-take-flight-in-microsatellites?cid=NL_ProgrammableLogic&amp;amp;Ecosystem=programmable-logic"&gt;http://www.eetimes.com/design/military-aerospace-design/4216480/High-performance-FPGAs-take-flight-in-microsatellites?cid=NL_ProgrammableLogic&amp;amp;Ecosystem=programmable-logic&lt;/a&gt;&lt;p&gt;&amp;#160;-Michelle W5NYV &lt;p&gt;&lt;br&gt;Potestatem obscuri lateris nescis.</description><link>http://microwaveengineeringproject.blogspot.com/2011/06/fpgas-in-space.html</link><thr:total>0</thr:total><author>w5nyv@yahoo.com (w5nyv)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-410288222235817148.post-4562797561771722045</guid><pubDate>Sat, 28 May 2011 19:26:00 +0000</pubDate><atom:updated>2011-05-28T12:26:56.845-07:00</atom:updated><title>VHDL implementation compared to MATLAB model - overall success</title><description>Overview of successful results with synthesizeable VHDL implementation. &lt;br&gt;Comparison with MATLAB results. &lt;br&gt; -Michelle W5NYV</description><link>http://microwaveengineeringproject.blogspot.com/2011/05/vhdl-implementation-compared-to-matlab.html</link><thr:total>0</thr:total><author>w5nyv@yahoo.com (w5nyv)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-410288222235817148.post-3428321908345721300</guid><pubDate>Thu, 19 May 2011 23:06:00 +0000</pubDate><atom:updated>2011-05-19T16:06:07.604-07:00</atom:updated><title>"What's Up With ARM"</title><description>Here&amp;#39;s an opinion piece about the current state of Linux development on ARM. I &lt;br&gt;thought it was interesting, largely agree with the author, and wanted to share &lt;br&gt;it with you guys.&lt;p&gt;&lt;a href="http://www.linux.com/news/featured-blogs/171-jonathan-corbet/445344-whats-up-with-arm"&gt;http://www.linux.com/news/featured-blogs/171-jonathan-corbet/445344-whats-up-with-arm&lt;/a&gt;&lt;p&gt;&lt;br&gt;Having got the beagleboard lab back up and running after the extended tour of &lt;br&gt;duty doing VHDL, I find that it is very true that getting Linux working on ARM &lt;br&gt;can be much more &amp;quot;some assembly required&amp;quot; than, say, a desktop. It&amp;#39;s well worth &lt;br&gt;it, considering how powerful the ARM family is. &lt;p&gt;&lt;br&gt;In order to develop something useful for MEP on ARM, there is quite a bit of &lt;br&gt;slogging to do through various rough edges. When experimenting with cameras and &lt;br&gt;video output, nothing ever really &amp;quot;quite worked&amp;quot;, and the variety and &lt;br&gt;duplication mentioned in the article were in full evidence.&lt;p&gt;The current Angstrom build I&amp;#39;m working with was obtained from the Narcissus &lt;br&gt;Angstrom image builder. I used this because I simply could not get the demo &lt;br&gt;build of Angstrom to cleanly update from the package server. This sort of &lt;br&gt;obstacle can be really frustrating. &lt;p&gt;&lt;br&gt;Here is the link to generate a build of Angstrom:&lt;br&gt;&lt;a href="http://narcissus.angstrom-distribution.org/"&gt;http://narcissus.angstrom-distribution.org/&lt;/a&gt;&lt;p&gt;This image boots, but I haven&amp;#39;t gotten much farther than launching Firefox. &lt;p&gt;&lt;br&gt;More soon!&lt;br&gt;-Michelle W5NYV</description><link>http://microwaveengineeringproject.blogspot.com/2011/05/whats-up-with-arm.html</link><thr:total>0</thr:total><author>w5nyv@yahoo.com (w5nyv)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-410288222235817148.post-5768563871212454006</guid><pubDate>Tue, 10 May 2011 04:22:00 +0000</pubDate><atom:updated>2011-05-09T21:22:09.277-07:00</atom:updated><title>updated synthesizeable VHDL block - progress</title><description>Here is updated VHDL code for the IQ Gain and Phase Correction&amp;#160;filter.&lt;p&gt;I&amp;#39;m working with an adjusted&amp;#160;numbering scheme in signed arithmetic to correct an &lt;br&gt;overflow problem (thanks to KB5MU, who helped&amp;#160;identify).&amp;#160;&lt;p&gt;This&amp;#160;implementation, which is&amp;#160;designed to be synthesizeable,&amp;#160;is&amp;#160;beginning to &lt;br&gt;function&amp;#160;as intended.&amp;#160;There is a factor of two error, but the compiled block &lt;br&gt;outputs&amp;#160;I and Q. &lt;p&gt;&lt;br&gt;With some data visualization,&amp;#160;these might prove to be a passed-through I and &lt;br&gt;phase corrected Q at the output, with a massive gain&amp;#160;overcorrection. I&amp;#39;ll check &lt;br&gt;that&amp;#160;tomorrow! &lt;p&gt;&amp;#160;-Michelle W5NYV</description><link>http://microwaveengineeringproject.blogspot.com/2011/05/updated-synthesizeable-vhdl-block.html</link><thr:total>0</thr:total><author>w5nyv@yahoo.com (w5nyv)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-410288222235817148.post-7045137741329373432</guid><pubDate>Fri, 22 Apr 2011 16:16:00 +0000</pubDate><atom:updated>2011-04-22T09:16:55.630-07:00</atom:updated><title>VHDL update - IQ Gain and Phase correction, next blocks</title><description>Hi everyone! I&amp;#39;m back to work on the VHDL after an interruption for a DXpedition &lt;br&gt;to Cura&amp;#231;ao, spring break shennanigans, and photographing a wedding. &lt;p&gt;I took the entity, architecture, and the testbench from the variable &lt;br&gt;(non-synthesizeable) version, and started a new workspace. The goal is to get &lt;br&gt;the register-based version working. When last I attempted this, I got incorrect &lt;br&gt;results from multiplication. I&amp;#39;m making another run at it to get this filter &lt;br&gt;ready for synthesis (when it&amp;#39;s put into an FPGA, instead of just working as a &lt;br&gt;mathematical model).&lt;p&gt;If you&amp;#39;re interested in working on VHDL for MEP, there is PLENTY of opportunity. &lt;br&gt;It doesn&amp;#39;t even have to be VHDL. If you work in Verilog, and can synthesize the &lt;br&gt;block, then go for it. &lt;p&gt;I&amp;#39;m approaching this like a slow-growing bacteria that spreads to adjacent &lt;br&gt;blocks in the petri dish. The next block upstream is automatic gain control. &lt;br&gt;I&amp;#39;ve read the wikipedia article about AGC, but that&amp;#39;s about as far as I&amp;#39;ve &lt;br&gt;gotten.&lt;p&gt;Article here:&lt;br&gt;&lt;a href="http://en.wikipedia.org/wiki/Automatic_gain_control"&gt;http://en.wikipedia.org/wiki/Automatic_gain_control&lt;/a&gt;&lt;p&gt;Does anyone on the list have any experience with AGC design or analysis? I &lt;br&gt;understand why AGC is important, and I think I understand the trade-offs. I&amp;#39;m &lt;br&gt;not sure quite yet how to design a block that achieves AGC. Right now, the AGC &lt;br&gt;is modeled in the IQ correction block by simply dividing the incoming values of &lt;br&gt;the signals by the maximum expected value. &lt;p&gt;I&amp;#39;d like to replace that modeling with a block that does the AGC before the &lt;br&gt;samples are delivered to the filter. &lt;p&gt;The next block downstream is, I believe, the demodulator.&lt;p&gt;I have attached a pdf with the current snapshot of the IQ Gain and Phase code.&lt;br&gt; &lt;br&gt;More soon,-Michelle W5NYV&lt;p&gt;&lt;br&gt;Potestatem obscuri lateris nescis.</description><link>http://microwaveengineeringproject.blogspot.com/2011/04/vhdl-update-iq-gain-and-phase.html</link><thr:total>0</thr:total><author>w5nyv@yahoo.com (w5nyv)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-410288222235817148.post-8328251143742339396</guid><pubDate>Sat, 05 Mar 2011 21:52:00 +0000</pubDate><atom:updated>2011-03-05T13:52:24.791-08:00</atom:updated><title>IQ Correction VHDL update</title><description>Greetings everyone,&lt;p&gt;I have a&amp;#160;VHDL implementation of the IQ&amp;#160;phase and gain correction algorithm &lt;br&gt;working. This implementation isn&amp;#39;t synthesizeable in logic (yet), but it will be &lt;br&gt;as soon as I&amp;#160;figure out why signed multiplication gives&amp;#160;the wrong result.&lt;p&gt;Since I have a version that is working (with some of the internal math done&amp;#160;with &lt;br&gt;variables instead of registers) I&amp;#39;m&amp;#160;taking the opportunity to work on gain and &lt;br&gt;phase lock and&amp;#160;the creation of&amp;#160;&amp;quot;corrected&amp;quot; I and Q signals.&lt;p&gt;I&amp;#160;is passed along with&amp;#160;a filter delay, and corrected Q is&amp;#160;passed along. &lt;p&gt;This part needs to be done regardless of how the internals of the correction &lt;br&gt;block are implemented.&lt;p&gt;If you haven&amp;#39;t&amp;#160;visited the &lt;a href="http://opencores.com"&gt;opencores.com&lt;/a&gt; site, then you might want to drop by &lt;br&gt;and check it out. We&amp;#39;re in there! &lt;p&gt;&lt;br&gt;IQ Phase and Gain Correction&amp;#160;is the name of the project and our page is &lt;br&gt;&lt;a href="http://opencores.com/project,iqcorrection"&gt;http://opencores.com/project,iqcorrection&lt;/a&gt;&lt;p&gt;I&amp;#39;ll have today&amp;#39;s cut of code up there after&amp;#160;a celebratory lunch.&amp;#160;&lt;br&gt;&amp;#160;&lt;br&gt;More soon (phase and gain lock signals in progress)&lt;br&gt;-Michelle W5NYV &lt;p&gt;&lt;br&gt;Potestatem obscuri lateris nescis.</description><link>http://microwaveengineeringproject.blogspot.com/2011/03/iq-correction-vhdl-update.html</link><thr:total>0</thr:total><author>w5nyv@yahoo.com (w5nyv)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-410288222235817148.post-1680740104632236500</guid><pubDate>Wed, 23 Feb 2011 05:29:00 +0000</pubDate><atom:updated>2011-02-22T21:29:24.330-08:00</atom:updated><title>Package that makes normally distributed random numbers from uniform numbers</title><description>In order to be able to have normal distribution noise, I made a package that &lt;br&gt;takes the uniform distribution random numbers and uses the central limit theorem &lt;br&gt;to give an (approximately) normal distribution. Here&amp;#39;s the package: &lt;p&gt;&lt;p&gt;library ieee;&lt;br&gt;use ieee.std_logic_1164.all;&lt;br&gt;use ieee.math_real.all;&lt;br&gt;use ieee.numeric_std.all;&lt;br&gt;use work.random_int.all;&lt;p&gt;--by MEP 22 February 2011&lt;br&gt;--usage:&lt;br&gt;--this is a function, which means it can be on the right-hand side&lt;br&gt;--of an assignment. It returns a mean-zero random number from a&lt;br&gt;--normal distribution. The argument is a real number that indicates&lt;br&gt;--the standard deviation desired. &lt;br&gt;--&lt;br&gt;--random_noise(sigma);&lt;br&gt;--&lt;p&gt;package normal_distribution_random_noise is&lt;p&gt;    function random_noise ( &lt;br&gt;    sigma : real)&lt;br&gt;    return real;&lt;p&gt;end package normal_distribution_random_noise;&lt;p&gt;&lt;br&gt;package body normal_distribution_random_noise is&lt;p&gt;    function random_noise ( &lt;br&gt;    sigma : real&lt;br&gt;    )&lt;br&gt;    return real is&lt;br&gt;    &lt;br&gt;        --variables&lt;br&gt;        variable u_noise: real; --uniform distribution noise&lt;br&gt;        variable n_noise: real := 0.0; --normal distribution noise&lt;br&gt;        variable seed1 : positive;&lt;br&gt;        variable seed2 : positive; &lt;br&gt;    &lt;br&gt;    begin&lt;p&gt;        --obtain a uniformly distributed random number&lt;br&gt;        uniform(seed1, seed2, u_noise);&lt;br&gt;        --report &amp;quot;Random uniform noise is &amp;quot; &amp;amp; real&amp;#39;image(u_noise) &amp;amp; &amp;quot;.&amp;quot;;&lt;br&gt;        &lt;br&gt;        for normal_count in 0 to 12 loop&lt;br&gt;        --Turn the uniform distributed number &lt;br&gt;        --into a normally distributed number&lt;br&gt;        --by using the central limit theorem.&lt;br&gt;        --Make it mean zero and make it have&lt;br&gt;        --the range of the uniform numbers&lt;br&gt;        --that it is composed from. &lt;br&gt;        n_noise := n_noise + u_noise;&lt;br&gt;        end loop;&lt;br&gt;        &lt;br&gt;        n_noise := n_noise - (0.5)*(real(12)); --normal distribution with a mean &lt;br&gt;of zero&lt;br&gt;        --report &amp;quot;Random normal noise is &amp;quot; &amp;amp; real&amp;#39;image(n_noise) &amp;amp; &amp;quot;.&amp;quot;;&lt;br&gt;        n_noise := n_noise/(real(12));&lt;br&gt;        --report &amp;quot;Random normal noise using range of uniform is &amp;quot; &amp;amp; &lt;br&gt;real&amp;#39;image(n_noise) &amp;amp; &amp;quot;.&amp;quot;;&lt;br&gt;        n_noise := sigma*n_noise;&lt;br&gt;        &lt;br&gt;        return n_noise;&lt;br&gt;    end function random_noise;&lt;br&gt;end package body normal_distribution_random_noise;</description><link>http://microwaveengineeringproject.blogspot.com/2011/02/package-that-makes-normally-distributed.html</link><thr:total>0</thr:total><author>w5nyv@yahoo.com (w5nyv)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-410288222235817148.post-7244593866977400740</guid><pubDate>Wed, 23 Feb 2011 05:29:00 +0000</pubDate><atom:updated>2011-02-22T21:29:14.435-08:00</atom:updated><title>Package that creates I and Q samples to test the IQ Correction block</title><description>library ieee;&lt;br&gt;use ieee.std_logic_1164.all;&lt;br&gt;use ieee.math_real.all;&lt;br&gt;use ieee.numeric_std.all;&lt;br&gt;use work.normal_distribution_random_noise.all;&lt;p&gt;--by MEP 22 February 2011&lt;br&gt;--usage:&lt;br&gt;--these are functions, which means they can be on the right-hand side&lt;br&gt;--of an assignment. These functions create an I and Q sample.&lt;br&gt;--The arguments are &lt;br&gt;--a natural number standing for the index of the sample,&lt;br&gt;--a real number that provides a way to have many samples per period,&lt;br&gt;--a real number standing for the standard deviation of the normally distributed &lt;br&gt;noise added to the sample,&lt;br&gt;--a real number standing for the amplitude of the signal,&lt;br&gt;--a natural number indicating the width of the vector holding the returned &lt;br&gt;value,&lt;br&gt;--a real number indicating the gain error of Q with respect to I,&lt;br&gt;--and a real number indicating the phase error of Q with respect to I&lt;br&gt;--&lt;br&gt;--create_I_sample(n_dat, freq, sgma, amplitude, return_width);&lt;br&gt;--create_Q_sample(n_dat, freq, sgma, amplitude, return_width, e1, a1);&lt;br&gt;--&lt;p&gt;package create_sample is&lt;br&gt;    &lt;br&gt;    function create_I_sample(&lt;br&gt;    n_dat : integer; &lt;br&gt;    freq : real;&lt;br&gt;    sgma : real;&lt;br&gt;    amplitude : real;&lt;br&gt;    return_width : natural) &lt;br&gt;    return signed;&lt;br&gt;    &lt;br&gt;    function create_Q_sample(&lt;br&gt;    n_dat : integer; &lt;br&gt;    freq : real;&lt;br&gt;    sgma : real;&lt;br&gt;    amplitude : real;&lt;br&gt;    return_width : natural; --x1_tb&amp;#39;LENGTH&lt;br&gt;    e1 : real; --gain error&lt;br&gt;    a1 : real)   --phase error  &lt;br&gt;    return signed;&lt;br&gt;    &lt;br&gt;end package create_sample;&lt;p&gt;&lt;br&gt;package body create_sample is&lt;br&gt;    &lt;br&gt;    function create_I_sample(&lt;br&gt;    n_dat : integer; &lt;br&gt;    freq : real;&lt;br&gt;    sgma : real;&lt;br&gt;    amplitude : real;&lt;br&gt;    return_width : natural)  --x1_tb&amp;#39;LENGTH&lt;br&gt;    return signed is&lt;p&gt;    variable local_x1 : real;&lt;br&gt;    variable int_x1: integer;&lt;br&gt;    variable returned_x1 : signed(return_width downto 0);&lt;br&gt;    &lt;br&gt;    begin&lt;p&gt;        local_x1 := amplitude*sin(2.0*math_pi*(real(n_dat))*freq) + &lt;br&gt;random_noise(sgma);&lt;br&gt;        --report &amp;quot;local_x1 inside CREATE_I_SAMPLE function is &amp;quot; &amp;amp; &lt;br&gt;real&amp;#39;image(local_x1) &amp;amp; &amp;quot;.&amp;quot;;&lt;br&gt;        &lt;br&gt;        --AGC scaling. Scaling factor is maximum value the signal can take. &lt;br&gt;        local_x1 := local_x1/(1.11); &lt;br&gt;        --report &amp;quot;local_x1 after AGC inside CREATE_I_SAMPLE function is &amp;quot; &amp;amp; &lt;br&gt;real&amp;#39;image(local_x1) &amp;amp; &amp;quot;.&amp;quot;;&lt;br&gt;        &lt;br&gt;        int_x1 := integer(trunc(local_x1*((2.0**31.0)-1.0)));  --scaled&lt;br&gt;        --report &amp;quot;integer version of x1 inside CREATE_I_SAMPLE function is &amp;quot; &amp;amp; &lt;br&gt;integer&amp;#39;image(int_x1) &amp;amp; &amp;quot;.&amp;quot;;&lt;br&gt;        &lt;br&gt;        returned_x1 := (to_signed(int_x1, return_width+1));&lt;br&gt;        &lt;br&gt;        return returned_x1;&lt;br&gt;end function; &lt;p&gt;function create_Q_sample(&lt;br&gt;    n_dat : integer; &lt;br&gt;    freq : real;&lt;br&gt;    sgma : real;&lt;br&gt;    amplitude : real;&lt;br&gt;    return_width : natural; --x1_tb&amp;#39;LENGTH&lt;br&gt;    e1 : real; --gain error&lt;br&gt;    a1 : real) &lt;br&gt;    return signed is&lt;p&gt;    variable local_y1 : real;&lt;br&gt;    variable int_y1: integer;&lt;br&gt;    variable returned_y1 : signed(return_width downto 0);&lt;br&gt;    &lt;br&gt;    begin&lt;br&gt;        local_y1 := amplitude*(1.0 + e1)*cos(2.0*math_pi*(real(n_dat))*freq + &lt;br&gt;a1) + random_noise(sgma);&lt;br&gt;        --report &amp;quot;local_y1 first created CREATE_Q_SAMPLE function is &amp;quot; &amp;amp; &lt;br&gt;real&amp;#39;image(local_y1) &amp;amp; &amp;quot;.&amp;quot;;&lt;br&gt;        &lt;br&gt;        --AGC scaling. Scaling factor is maximum value the signal can take.&lt;br&gt;        local_y1 := local_y1/(1.11); &lt;br&gt;        --report &amp;quot;local_y1 after AGC inside CREATE_Q_SAMPLE function is &amp;quot; &amp;amp; &lt;br&gt;real&amp;#39;image(local_y1) &amp;amp; &amp;quot;.&amp;quot;;&lt;br&gt;        &lt;br&gt;        int_y1 := integer(trunc(local_y1*((2.0**31.0)-1.0)));  --scaled&lt;br&gt;        --report &amp;quot;integer version of y1 inside CREATE_Q_SAMPLE function is &amp;quot; &amp;amp; &lt;br&gt;integer&amp;#39;image(int_y1) &amp;amp; &amp;quot;.&amp;quot;;&lt;br&gt;        &lt;br&gt;        returned_y1 := (to_signed(int_y1, return_width+1));&lt;br&gt;        &lt;br&gt;        return returned_y1;&lt;br&gt;    end function;&lt;br&gt;end package body create_sample;</description><link>http://microwaveengineeringproject.blogspot.com/2011/02/package-that-creates-i-and-q-samples-to.html</link><thr:total>0</thr:total><author>w5nyv@yahoo.com (w5nyv)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-410288222235817148.post-347800550254219102</guid><pubDate>Wed, 23 Feb 2011 05:29:00 +0000</pubDate><atom:updated>2011-02-22T21:29:06.517-08:00</atom:updated><title>IQ Phase Gain Correction testbench</title><description>library ieee;&lt;br&gt;use ieee.std_logic_1164.all;&lt;br&gt;use ieee.math_real.all;&lt;br&gt;use ieee.numeric_std.all;&lt;br&gt;use work.normal_distribution_random_noise.all;&lt;br&gt;use work.create_sample.all;&lt;p&gt;entity IQGainPhaseCorrection_testbench is&lt;br&gt;end entity;&lt;p&gt;&lt;br&gt;architecture IQGainPhaseCorrection_testbench_arch of &lt;br&gt;IQGainPhaseCorrection_testbench is&lt;p&gt;--declare the DUT as a component.&lt;br&gt;component IQGainPhaseCorrection is&lt;br&gt;    generic(width :natural);&lt;br&gt;    port(&lt;br&gt;    clk                :in std_logic;&lt;br&gt;    x1                :in signed(width downto 0);&lt;br&gt;    y1                :in signed(width downto 0);&lt;br&gt;    gain_error        :out signed(width downto 0);&lt;br&gt;    gain_lock        :out bit;&lt;br&gt;    phase_error        :out signed(width downto 0);&lt;br&gt;    phase_lock        :out bit;&lt;br&gt;    corrected_x1    :out signed(width downto 0);&lt;br&gt;    corrected_y1    :out signed(width downto 0)&lt;br&gt;    );&lt;br&gt;    end component;&lt;p&gt;--provide signals to run the DUT.&lt;br&gt;signal clk_tb            : std_logic := &amp;#39;0&amp;#39;;&lt;br&gt;signal clk_tb_delayed    : std_logic    := &amp;#39;0&amp;#39;;&lt;br&gt;signal x1_tb            : signed(31 downto 0);&lt;br&gt;signal y1_tb            : signed(31 downto 0);&lt;br&gt;signal gain_error_tb    : signed(31 downto 0);&lt;br&gt;signal gain_lock_tb        : bit;&lt;br&gt;signal phase_error_tb    : signed(31 downto 0);&lt;br&gt;signal phase_lock_tb    : bit;&lt;br&gt;signal corrected_x1_tb    : signed(31 downto 0);&lt;br&gt;signal corrected_y1_tb    : signed(31 downto 0);&lt;p&gt;begin&lt;p&gt;    --connect the testbench signal to the component&lt;br&gt;    DUT:IQGainPhaseCorrection&lt;br&gt;    generic map(&lt;br&gt;    width =&amp;gt; 31&lt;br&gt;    )&lt;br&gt;    port map(&lt;br&gt;    clk =&amp;gt; clk_tb_delayed,&lt;br&gt;    x1 =&amp;gt; x1_tb,&lt;br&gt;    y1 =&amp;gt; y1_tb,&lt;br&gt;    gain_error =&amp;gt; gain_error_tb,&lt;br&gt;    gain_lock =&amp;gt; gain_lock_tb,&lt;br&gt;    phase_error =&amp;gt; phase_error_tb,&lt;br&gt;    phase_lock =&amp;gt; phase_lock_tb,&lt;br&gt;    corrected_x1 =&amp;gt; corrected_x1_tb,&lt;br&gt;    corrected_y1 =&amp;gt; corrected_y1_tb&lt;br&gt;    );&lt;p&gt;         &lt;br&gt;--create I and Q. MTreseler says, &amp;quot;sin in vhdl I use use ieee.math_real.all and &lt;br&gt;cast to integer.&amp;quot;&lt;p&gt;CREATE_I_Q_SAMPLES: process (clk_tb) is&lt;br&gt;--for both I and Q&lt;br&gt;variable n_dat : integer := 0;&lt;br&gt;variable freq : real := 0.03; --relative frequency&lt;br&gt;variable sgma : real :=0.01; --sigma of noise&lt;br&gt;variable amplitude : real := 1.0; --amplitude&lt;br&gt;--for Q&lt;br&gt;variable e1 : real := 0.1; --gain error&lt;br&gt;variable a1 : real := (10.0*math_pi)/180.0; --phase error of 10 degrees&lt;p&gt;begin&lt;br&gt;    if (clk_tb&amp;#39;event and clk_tb = &amp;#39;1&amp;#39;) then&lt;br&gt;        x1_tb &amp;lt;= create_I_sample(n_dat, freq, sgma, amplitude, 31);&lt;br&gt;        y1_tb &amp;lt;= create_Q_sample(n_dat, freq, sgma, amplitude, 31, e1, a1);&lt;br&gt;        n_dat := n_dat + 1;&lt;br&gt;    end if;&lt;br&gt;end process CREATE_I_Q_SAMPLES;&lt;p&gt;&lt;br&gt;DRIVE_CLOCK:process&lt;br&gt;begin &lt;br&gt;    wait for 50 ns;&lt;br&gt;    clk_tb &amp;lt;= not clk_tb;&lt;br&gt;    clk_tb_delayed &amp;lt;= not clk_tb_delayed after 1 ns;&lt;br&gt;end process;&lt;p&gt;end IQGainPhaseCorrection_testbench_arch;</description><link>http://microwaveengineeringproject.blogspot.com/2011/02/iq-phase-gain-correction-testbench.html</link><thr:total>0</thr:total><author>w5nyv@yahoo.com (w5nyv)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-410288222235817148.post-1792075810411483855</guid><pubDate>Wed, 23 Feb 2011 05:28:00 +0000</pubDate><atom:updated>2011-02-22T21:28:56.241-08:00</atom:updated><title>IQ Phase Gain Correction architecture</title><description>architecture IQGainPhaseCorrection_beh of IQGainPhaseCorrection is&lt;p&gt;    --signal declarations&lt;p&gt;    --phase error estimate accumulator&lt;br&gt;    signal reg_1:signed(width downto 0) := (others =&amp;gt; &amp;#39;0&amp;#39;);&lt;p&gt;    --gain error estimate accumulator&lt;br&gt;    signal reg_2:signed(width downto 0) := (0 =&amp;gt; &amp;#39;1&amp;#39;, others =&amp;gt; &amp;#39;0&amp;#39;);&lt;br&gt;    &lt;br&gt;    --Phase Offset Adjustment Applied to y1&lt;br&gt;    signal y2:signed(width downto 0) := (others =&amp;gt; &amp;#39;0&amp;#39;);&lt;p&gt;    --Gain and Phase Adjustment Applied    to y1&lt;br&gt;    signal y3:signed(2*width+1 downto 0) := (others =&amp;gt; &amp;#39;0&amp;#39;);    &lt;br&gt;    &lt;br&gt;    signal x1y2:signed(2*width+1 downto 0):= (others =&amp;gt; &amp;#39;0&amp;#39;);&lt;br&gt;    signal mu_1:signed(width downto 0):= (others =&amp;gt; &amp;#39;0&amp;#39;);&lt;br&gt;    signal x1x1y3y3:signed(width downto 0):= (others =&amp;gt; &amp;#39;0&amp;#39;);&lt;br&gt;    signal mu_2:signed(width downto 0):= (others =&amp;gt; &amp;#39;0&amp;#39;);&lt;br&gt;    &lt;br&gt;    signal reg_1x1:signed(2*width+1 downto 0):= (others =&amp;gt; &amp;#39;0&amp;#39;);&lt;br&gt;    signal y3y3: signed(4*width+3 downto 0):= (others =&amp;gt; &amp;#39;0&amp;#39;);&lt;br&gt;    signal x1x1: signed(2*width+1 downto 0):= (others =&amp;gt; &amp;#39;0&amp;#39;);&lt;br&gt;    &lt;br&gt;begin&lt;p&gt;    correction : process (clk) is    &lt;br&gt;        begin&lt;br&gt;        &lt;br&gt;           if clk&amp;#39;event and clk = &amp;#39;1&amp;#39; then&lt;br&gt;        &lt;br&gt;        --phase error estimate, step size set to 0.000244&lt;br&gt;        --which is achieved with a shift right by 12.&lt;br&gt;        reg_1x1 &amp;lt;= reg_1 * x1; --clock 0&lt;br&gt;        y2 &amp;lt;= y1 - reg_1x1(2*width+1 downto width+1); --clock 1&lt;br&gt;        x1y2 &amp;lt;= x1 * y2; --clock 2&lt;br&gt;        mu_1 &amp;lt;= shift_right(x1y2(2*width+1 downto width+1),12); --step size &lt;br&gt;applied.      --clock 3&lt;br&gt;        reg_1 &amp;lt;= reg_1 + mu_1;      --clock 4&lt;br&gt;        phase_error &amp;lt;= reg_1;  --update phase error estimate.     --clock 5&lt;br&gt;        &lt;br&gt;        --gain error estimate, step size set to 0.000122&lt;br&gt;        --which is achieved with a shift right by 13.&lt;br&gt;        y3 &amp;lt;= y2 * reg_2;       --clock 0       --63 downto 0 n*32 - 1, n = 2&lt;br&gt;        x1x1 &amp;lt;= x1 * x1;     --clock 0       --63 downto 0&lt;br&gt;        y3y3 &amp;lt;= y3 * y3;  --clock 1           --127 downto 0  n*32 -1, n = 4 to &lt;br&gt;n = 3&lt;br&gt;        x1x1y3y3 &amp;lt;= (abs(x1x1(2*width+1 downto width+1))) - (abs(y3y3(4*width+3 &lt;br&gt;downto 3*width+3)));   --clock 2&lt;br&gt;        mu_2 &amp;lt;= shift_right(x1x1y3y3, 13);     --clock 3&lt;br&gt;        reg_2 &amp;lt;= reg_2 + mu_2;      --clock 4&lt;br&gt;        gain_error &amp;lt;= reg_2;   --update gain error estimate.  --clock 5&lt;br&gt;        &lt;br&gt;        end if;&lt;br&gt;        &lt;br&gt;    end process;    &lt;p&gt;end IQGainPhaseCorrection_beh;</description><link>http://microwaveengineeringproject.blogspot.com/2011/02/iq-phase-gain-correction-architecture.html</link><thr:total>0</thr:total><author>w5nyv@yahoo.com (w5nyv)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-410288222235817148.post-3959354793296940306</guid><pubDate>Wed, 23 Feb 2011 05:28:00 +0000</pubDate><atom:updated>2011-02-22T21:28:47.010-08:00</atom:updated><title>IQ Phase Gain Correction entity</title><description>library ieee;&lt;br&gt;use ieee.std_logic_1164.all;&lt;br&gt;use ieee.std_logic_arith;&lt;br&gt;use ieee.numeric_std.all;  &lt;p&gt;&lt;br&gt;entity IQGainPhaseCorrection is&lt;p&gt;generic(width:natural);&lt;p&gt;port(&lt;br&gt;    clk                :in std_logic;&lt;br&gt;    x1                :in signed(width downto 0);&lt;br&gt;    y1                :in signed(width downto 0);&lt;br&gt;    gain_error        :out signed(width downto 0);&lt;br&gt;    gain_lock        :out bit;&lt;br&gt;    phase_error        :out signed(width downto 0);&lt;br&gt;    phase_lock        :out bit;&lt;br&gt;    corrected_x1    :out signed(width downto 0);&lt;br&gt;    corrected_y1    :out signed(width downto 0)&lt;br&gt;    );&lt;p&gt;end IQGainPhaseCorrection;</description><link>http://microwaveengineeringproject.blogspot.com/2011/02/iq-phase-gain-correction-entity.html</link><thr:total>0</thr:total><author>w5nyv@yahoo.com (w5nyv)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-410288222235817148.post-1147774883741621737</guid><pubDate>Tue, 22 Feb 2011 19:14:00 +0000</pubDate><atom:updated>2011-02-22T11:14:15.846-08:00</atom:updated><title>IQ Phase and Gain Correction - Testbench</title><description>Below is the testbench for the IQ Phase and Gain Correction. &lt;p&gt;As you can see, there&amp;#39;s a lot more going on in the testbench than in the block &lt;br&gt;for the algorithm. This is because the testbench has to generate the test &lt;br&gt;signals and provide the clock and establish the various settings for the test, &lt;br&gt;and that all adds up in this case to more lines of code. &lt;p&gt;&lt;br&gt;On the list of improvements is to move the I and Q signal creation into a &lt;br&gt;procedure. This encapsulates code and will make the testbench a lot more &lt;br&gt;readable. &lt;p&gt;&lt;br&gt;Another obvious improvement is to figure out exactly why the gain correction &lt;br&gt;isn&amp;#39;t working yet. &lt;p&gt;&lt;br&gt;More soon,&lt;br&gt;-Michelle W5NYV&lt;p&gt;&lt;br&gt;library ieee;&lt;br&gt;use ieee.std_logic_1164.all;&lt;br&gt;use ieee.math_real.all;&lt;br&gt;use ieee.numeric_std.all; &lt;p&gt;entity IQGainPhaseCorrection_testbench is&lt;br&gt;end entity;&lt;p&gt;architecture IQGainPhaseCorrection_testbench_arch of &lt;br&gt;IQGainPhaseCorrection_testbench is&lt;br&gt;--declare the DUT as a component.&lt;br&gt;component IQGainPhaseCorrection is&lt;br&gt;    generic(width :natural);&lt;br&gt;    port(&lt;br&gt;    clk                :in std_logic;&lt;br&gt;    x1                :in signed(width downto 0);&lt;br&gt;    y1                :in signed(width downto 0);&lt;br&gt;    gain_error        :out signed(width downto 0);&lt;br&gt;    gain_lock        :out bit;&lt;br&gt;    phase_error        :out signed(width downto 0);&lt;br&gt;    phase_lock        :out bit;&lt;br&gt;    corrected_x1    :out signed(width downto 0);&lt;br&gt;    corrected_y1    :out signed(width downto 0)&lt;br&gt;    );&lt;br&gt;    end component;&lt;p&gt;--provide signals to run the DUT.&lt;br&gt;signal clk_tb            : std_logic := &amp;#39;0&amp;#39;;&lt;br&gt;signal x1_tb            : signed(31 downto 0);&lt;br&gt;signal y1_tb            : signed(31 downto 0);&lt;br&gt;signal gain_error_tb    : signed(31 downto 0);&lt;br&gt;signal gain_lock_tb        : bit;&lt;br&gt;signal phase_error_tb    : signed(31 downto 0);&lt;br&gt;signal phase_lock_tb    : bit;&lt;br&gt;signal corrected_x1_tb    : signed(31 downto 0);&lt;br&gt;signal corrected_y1_tb    : signed(31 downto 0);&lt;p&gt;begin&lt;p&gt;    --connect the testbench signal to the component&lt;br&gt;    DUT:IQGainPhaseCorrection&lt;br&gt;    generic map(&lt;br&gt;    width =&amp;gt; 31&lt;br&gt;    )&lt;br&gt;    port map(&lt;br&gt;    clk =&amp;gt; clk_tb,&lt;br&gt;    x1 =&amp;gt; x1_tb,&lt;br&gt;    y1 =&amp;gt; y1_tb,&lt;br&gt;    gain_error =&amp;gt; gain_error_tb,&lt;br&gt;    gain_lock =&amp;gt; gain_lock_tb,&lt;br&gt;    phase_error =&amp;gt; phase_error_tb,&lt;br&gt;    phase_lock =&amp;gt; phase_lock_tb,&lt;br&gt;    corrected_x1 =&amp;gt; corrected_x1_tb,&lt;br&gt;    corrected_y1 =&amp;gt; corrected_y1_tb&lt;br&gt;    );&lt;p&gt;         &lt;br&gt;--create x1 and y1. MTreseler says, &amp;quot;sin in vhdl I use use ieee.math_real.all &lt;br&gt;and cast to integer.&amp;quot;&lt;p&gt;&lt;br&gt;CREATE_X1_I: process&lt;br&gt;variable angle : real;&lt;br&gt;variable local_x1 : real;&lt;br&gt;variable sgma : real :=0.01; --sigma of noise&lt;br&gt;variable amplitude : real := 1.0; --amplitude&lt;br&gt;variable freq : real := 0.03; --relative frequency&lt;br&gt;variable u_noise: real; --uniform distribution noise&lt;br&gt;variable n_noise: real := 0.0; --normal distribution noise&lt;br&gt; &lt;br&gt;variable seed1 : positive := 10;&lt;br&gt;variable seed2 : positive := 200;&lt;p&gt;--loop controls&lt;br&gt;variable make_normal_count : integer := 12;&lt;br&gt;variable n_dat : integer := 4;&lt;p&gt;variable int_x1: integer;&lt;p&gt;begin&lt;br&gt;    for n_dat_count in 0 to n_dat loop&lt;br&gt;        --make a random number&lt;br&gt;        uniform(seed1, seed2, u_noise);&lt;br&gt;        report &amp;quot;Random uniform noise in I creation is &amp;quot; &amp;amp; real&amp;#39;image(u_noise) &amp;amp; &lt;br&gt;&amp;quot;.&amp;quot;;&lt;br&gt;        &lt;br&gt;        for normal_count in 0 to make_normal_count loop&lt;br&gt;            --turn the uniform distributed number &lt;br&gt;            --into a normally distributed number&lt;br&gt;            --by using the central limit theorem.&lt;br&gt;            n_noise := n_noise + u_noise;&lt;br&gt;        end loop;&lt;br&gt;        n_noise := n_noise - (0.5)*(real(make_normal_count)); --normal &lt;br&gt;distribution with a mean of zero&lt;br&gt;        report &amp;quot;Random normal noise in I creation is &amp;quot; &amp;amp; real&amp;#39;image(n_noise) &amp;amp; &lt;br&gt;&amp;quot;.&amp;quot;;&lt;br&gt;        n_noise := n_noise/(real(make_normal_count)); --max values reduced?&lt;br&gt;        report &amp;quot;Random normal noise (normalized?) in I creation is &amp;quot; &amp;amp; &lt;br&gt;real&amp;#39;image(n_noise) &amp;amp; &amp;quot;.&amp;quot;;&lt;br&gt;        &lt;br&gt;    local_x1 := amplitude*cos(2.0*math_pi*(real(n_dat_count))*freq) + &lt;br&gt;sgma*(n_noise);&lt;br&gt;    --local_x1 := cos(2.0*math_pi*(real(n_dat_count))*freq);    --simpler &lt;br&gt;version&lt;br&gt;    &lt;br&gt;    --AGC scaling&lt;br&gt;    local_x1 := local_x1/(1.01); &lt;br&gt;    &lt;br&gt;    report &amp;quot;local_x1 is &amp;quot; &amp;amp; real&amp;#39;image(local_x1) &amp;amp; &amp;quot;.&amp;quot;;&lt;br&gt;    --x1_tb &amp;lt;= local_x1; --somehow get real turned into signed.&lt;br&gt;    -- 1. rescale to 0..(nearly)4096, find integer part&lt;br&gt;    --int_x1 := INTEGER(TRUNC(local_x1*4294967296.0)); -- from random_vector&lt;br&gt;    &lt;br&gt;    &lt;br&gt;    int_x1 := integer(trunc(local_x1*(2.0**31.0)));  --scaled&lt;br&gt;    &lt;br&gt;    report &amp;quot;integer version of x1 is &amp;quot; &amp;amp; integer&amp;#39;image(int_x1) &amp;amp; &amp;quot;.&amp;quot;;&lt;br&gt;    -- 2. convert to signed&lt;br&gt;    x1_tb &amp;lt;= (to_signed(int_x1, x1_tb&amp;#39;LENGTH));&lt;p&gt;    &lt;br&gt;    end loop;&lt;br&gt;    wait;&lt;br&gt;    &lt;br&gt;end process CREATE_X1_I;&lt;p&gt;&lt;br&gt;CREATE_Y1_Q: process&lt;br&gt;variable angle : real;&lt;br&gt;variable local_y1 : real;&lt;br&gt;variable e1 : real := 0.1; --gain error&lt;br&gt;variable a1 : real := (10.0*math_pi)/180.0; --phase error of 10 degrees&lt;br&gt;variable sgma : real := 0.01; --sigma of noise&lt;br&gt;variable amplitude : real := 1.0; --amplitude&lt;br&gt;variable freq : real := 0.03; --relative frequency&lt;br&gt;variable u_noise: real; --uniformly distributed noise&lt;br&gt;variable n_noise: real := 0.0; --normally distributed noise&lt;br&gt;variable seed1 : positive := 1;&lt;br&gt;variable seed2 : positive := 2;&lt;p&gt;--loop controls&lt;br&gt;variable make_normal_count : integer := 12;&lt;br&gt;variable n_dat : integer := 4;&lt;p&gt;variable int_y1: integer;&lt;br&gt;begin&lt;br&gt;    &lt;br&gt;    for n_dat_count in 0 to n_dat loop&lt;br&gt;        --make a random number&lt;br&gt;        uniform(seed1, seed2, u_noise);&lt;br&gt;        report &amp;quot;Random uniform noise in I creation is &amp;quot; &amp;amp; real&amp;#39;image(u_noise) &amp;amp; &lt;br&gt;&amp;quot;.&amp;quot;;&lt;br&gt;        &lt;br&gt;        for normal_count in 0 to make_normal_count loop&lt;br&gt;            --turn the uniform distributed number &lt;br&gt;            --into a normally distributed number&lt;br&gt;            --by using the central limit theorem.&lt;br&gt;            n_noise := n_noise + u_noise;&lt;br&gt;        end loop;&lt;br&gt;        n_noise := n_noise - (0.5)*(real(make_normal_count));&lt;br&gt;        n_noise := n_noise/(real(make_normal_count)); --reduce size of noise&lt;br&gt;        report &amp;quot;Random normal noise in I creation is &amp;quot; &amp;amp; real&amp;#39;image(n_noise) &amp;amp; &lt;br&gt;&amp;quot;.&amp;quot;;&lt;br&gt;         n_noise := n_noise/(real(make_normal_count)); --max values reduced?&lt;br&gt;        report &amp;quot;Random normal noise (normalized?) in I creation is &amp;quot; &amp;amp; &lt;br&gt;real&amp;#39;image(n_noise) &amp;amp; &amp;quot;.&amp;quot;;&lt;br&gt;    &lt;br&gt;    local_y1 := amplitude*(1.0 + e1)*cos(2.0*math_pi*(real(n_dat_count))*freq + &lt;br&gt;a1) + sgma*(n_noise);&lt;br&gt;    &lt;br&gt;        --AGC scaling&lt;br&gt;    local_y1 := local_y1/(1.01);&lt;br&gt;    &lt;br&gt;    --int_y1 := INTEGER(TRUNC(local_y1*4294967296.0));  -- from random_vector &lt;br&gt;    int_y1 := integer(trunc(local_y1*(2.0**31.0)));  --scaled&lt;br&gt;    report &amp;quot;integer version of y1 is &amp;quot; &amp;amp; integer&amp;#39;image(int_y1) &amp;amp; &amp;quot;.&amp;quot;;&lt;br&gt;    &lt;br&gt;    -- 2. convert to signed&lt;br&gt;    y1_tb &amp;lt;= (to_signed(int_y1, y1_tb&amp;#39;LENGTH));&lt;p&gt;    end loop;&lt;br&gt;    wait;&lt;br&gt;    &lt;br&gt;end process CREATE_Y1_Q;&lt;p&gt;&lt;br&gt;DRIVE_CLOCK:process&lt;br&gt;begin &lt;br&gt;    clk_tb &amp;lt;= not clk_tb;&lt;br&gt;    wait for 50 ns;&lt;br&gt;end process;&lt;p&gt;&lt;p&gt;&lt;p&gt;&lt;p&gt;end IQGainPhaseCorrection_testbench_arch;</description><link>http://microwaveengineeringproject.blogspot.com/2011/02/iq-phase-and-gain-correction-testbench.html</link><thr:total>0</thr:total><author>w5nyv@yahoo.com (w5nyv)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-410288222235817148.post-3586675372188279341</guid><pubDate>Tue, 22 Feb 2011 19:01:00 +0000</pubDate><atom:updated>2011-02-22T11:01:36.432-08:00</atom:updated><title>IQ Phase and Gain Correction</title><description>I&amp;#39;m working on the IQ Phase and Gain Correction VHDL implementation today. Here &lt;br&gt;is the entity and architecture below.&lt;p&gt;In the testbench, the phase correction works (with some amount of oscillation), &lt;br&gt;but the gain correction increases without bound. Trying to track that down &lt;br&gt;today. I&amp;#39;ll post the testbench next in a separate email.&lt;p&gt;&lt;p&gt;library ieee;&lt;br&gt;use ieee.std_logic_1164.all;&lt;br&gt;use ieee.std_logic_arith;&lt;br&gt;use ieee.numeric_std.all;  &lt;p&gt;entity IQGainPhaseCorrection is&lt;p&gt;generic(width:natural);&lt;p&gt;port(&lt;br&gt;    clk                :in std_logic;&lt;br&gt;    x1                :in signed(width downto 0);&lt;br&gt;    y1                :in signed(width downto 0);&lt;br&gt;    gain_error        :out signed(width downto 0);&lt;br&gt;    gain_lock        :out bit;&lt;br&gt;    phase_error        :out signed(width downto 0);&lt;br&gt;    phase_lock        :out bit;&lt;br&gt;    corrected_x1    :out signed(width downto 0);&lt;br&gt;    corrected_y1    :out signed(width downto 0)&lt;br&gt;    );&lt;p&gt;end IQGainPhaseCorrection;&lt;p&gt;&lt;br&gt;architecture IQGainPhaseCorrection_beh of IQGainPhaseCorrection is&lt;p&gt;    --signal declarations&lt;p&gt;    --phase error estimate accumulator&lt;br&gt;    signal reg_1:signed(width downto 0) := (others =&amp;gt; &amp;#39;0&amp;#39;);&lt;p&gt;    --gain error estimate accumulator&lt;br&gt;    signal reg_2:signed(width downto 0) := (0 =&amp;gt; &amp;#39;1&amp;#39;, others =&amp;gt; &amp;#39;0&amp;#39;);&lt;br&gt;    &lt;br&gt;    --Phase Offset Adjustment Applied to y1&lt;br&gt;    signal y2:signed(width downto 0) := (others =&amp;gt; &amp;#39;0&amp;#39;);&lt;p&gt;    --Gain and Phase Adjustment Applied    to y1&lt;br&gt;    signal y3:signed(2*width+1 downto 0) := (others =&amp;gt; &amp;#39;0&amp;#39;);    &lt;br&gt;    &lt;br&gt;    signal x1y2:signed(2*width+1 downto 0):= (others =&amp;gt; &amp;#39;0&amp;#39;);&lt;br&gt;    signal mu_1:signed(width downto 0):= (others =&amp;gt; &amp;#39;0&amp;#39;);&lt;br&gt;    signal x1x1y3y3:signed(width downto 0):= (others =&amp;gt; &amp;#39;0&amp;#39;);&lt;br&gt;    signal mu_2:signed(width downto 0):= (others =&amp;gt; &amp;#39;0&amp;#39;);&lt;br&gt;    &lt;br&gt;    signal reg_1x1:signed(2*width+1 downto 0):= (others =&amp;gt; &amp;#39;0&amp;#39;);&lt;br&gt;    signal y3y3: signed(4*width+3 downto 0):= (others =&amp;gt; &amp;#39;0&amp;#39;);&lt;br&gt;    signal x1x1: signed(2*width+1 downto 0):= (others =&amp;gt; &amp;#39;0&amp;#39;);&lt;br&gt;    &lt;br&gt;begin&lt;p&gt;    correction : process (clk) is    &lt;br&gt;        begin&lt;br&gt;        &lt;br&gt;           if clk&amp;#39;event and clk = &amp;#39;1&amp;#39; then&lt;br&gt;    &lt;br&gt;        --phase error estimate, step size set to 0.000244&lt;br&gt;        --which is achieved with a shift right by 12.&lt;br&gt;        reg_1x1 &amp;lt;= reg_1 * x1; --clock 0&lt;br&gt;        y2 &amp;lt;= y1 - reg_1x1(2*width+1 downto width+1); --clock 1&lt;br&gt;        x1y2 &amp;lt;= x1 * y2; --clock 2&lt;br&gt;        mu_1 &amp;lt;= shift_right(x1y2(2*width+1 downto width+1),12); --step size &lt;br&gt;applied.      --clock 3&lt;br&gt;        reg_1 &amp;lt;= reg_1 + mu_1;      --clock 4&lt;br&gt;        phase_error &amp;lt;= reg_1;  --update phase error estimate.     --clock 5&lt;br&gt;        &lt;br&gt;        --gain error estimate, step size set to 0.000122&lt;br&gt;        --which is achieved with a shift right by 13.&lt;br&gt;        y3 &amp;lt;= y2 * reg_2;       --clock 0       --63 downto 0 n*32 - 1, n = 2&lt;br&gt;        x1x1 &amp;lt;= x1 * x1;     --clock 0       --63 downto 0&lt;br&gt;        y3y3 &amp;lt;= y3 * y3;  --clock 1           --127 downto 0  n*32 -1, n = 4 to &lt;br&gt;n = 3&lt;br&gt;        x1x1y3y3 &amp;lt;= (abs(x1x1(2*width+1 downto width+1))) - (abs(y3y3(4*width+3 &lt;br&gt;downto 3*width+3)));   --clock 2&lt;br&gt;        mu_2 &amp;lt;= shift_right(x1x1y3y3, 13);     --clock 3&lt;br&gt;        reg_2 &amp;lt;= reg_2 + mu_2;      --clock 4&lt;br&gt;        gain_error &amp;lt;= reg_2;   --update gain error estimate.  --clock 5&lt;br&gt;        &lt;br&gt;        end if;&lt;br&gt;        &lt;br&gt;    end process;    &lt;p&gt;end IQGainPhaseCorrection_beh;</description><link>http://microwaveengineeringproject.blogspot.com/2011/02/iq-phase-and-gain-correction.html</link><thr:total>0</thr:total><author>w5nyv@yahoo.com (w5nyv)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-410288222235817148.post-7054634842980930987</guid><pubDate>Fri, 18 Feb 2011 02:29:00 +0000</pubDate><atom:updated>2011-02-17T18:29:37.145-08:00</atom:updated><title>VHDL experience so far</title><description>I&amp;#39;m halfway through the VHDL class and well into implementing the IQ Phase and &lt;br&gt;Gain correction&amp;#160;algorithm. I&amp;#39;ll&amp;#160;publish a cut of it in a separate email.&lt;p&gt;What I wanted to share was a few very brief observations about learning VHDL.&lt;p&gt;The actual description of what you want to accomplish may take much less time &lt;br&gt;than constructing a test that really tests what you have designed.&lt;p&gt;VHDL projects are&amp;#160;usually&amp;#160;broken down into components, which are the blocks that &lt;br&gt;implement your function, and testbenches, which (as the name implies) are &lt;br&gt;constructed&amp;#160;logic that&amp;#160;proves the block&amp;#160;that implements the function does &lt;br&gt;what&amp;#160;you intended to tell it to&amp;#160;do.&lt;p&gt;So far, the proportion of time spent&amp;#160;designing the block that implements the &lt;br&gt;function vs. designing the testbench for it is about 4:1. I don&amp;#39;t expect this to &lt;br&gt;change throughout the&amp;#160;remaining 5 weeks of the course.&amp;#160;&lt;p&gt;VHDL is very strongly typed, and most of the issues I&amp;#39;ve had so far have been &lt;br&gt;getting used to this.&amp;#160;Once you get&amp;#160;the hang of it, it does get better, and makes &lt;br&gt;it easy to catch most errors. &lt;p&gt;&amp;#160;&lt;br&gt;We&amp;#39;re using the student version of Aldec Active-HDL for the development &lt;br&gt;environment. I have to say I like it a bit more than the Xilinx ISE webpack, but &lt;br&gt;the differences are minor, and the Aldec license is good for only a year at a &lt;br&gt;time. &lt;p&gt;&lt;br&gt;More soon!-Michelle W5NYV &lt;p&gt;&lt;br&gt;Potestatem obscuri lateris nescis.</description><link>http://microwaveengineeringproject.blogspot.com/2011/02/vhdl-experience-so-far.html</link><thr:total>0</thr:total><author>w5nyv@yahoo.com (w5nyv)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-410288222235817148.post-2255623413368509960</guid><pubDate>Sun, 13 Feb 2011 02:32:00 +0000</pubDate><atom:updated>2011-02-12T18:32:57.929-08:00</atom:updated><title>Software-defined radio ideas</title><description>From twitter this past week, Tom Rondeau asked: &amp;quot;I&amp;#39;m giving a day-long lecture &lt;br&gt;on SDR. What would you want to hear about? I&amp;#39;m focusing on software and &lt;br&gt;processing.&amp;quot;&lt;p&gt;Tom Rondeau is giving a talk with fred harris, a well-known DSP lecturer and &lt;br&gt;professor at SDSU. &lt;p&gt;&lt;br&gt;Balister offered, &amp;quot;Explain the difference between a collection of functions that &lt;br&gt;do operations and a framework providing structure for using them.&amp;quot;&lt;p&gt;What do you all think? What are the current concerns in software-defined radio &lt;br&gt;design? I have some ideas,&amp;#160;but I&amp;#39;m very interested in what you all think.&lt;br&gt;&amp;#160;-Michelle W5NYV</description><link>http://microwaveengineeringproject.blogspot.com/2011/02/software-defined-radio-ideas.html</link><thr:total>0</thr:total><author>w5nyv@yahoo.com (w5nyv)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-410288222235817148.post-5980072969263299923</guid><pubDate>Mon, 24 Jan 2011 05:13:00 +0000</pubDate><atom:updated>2011-01-23T21:19:05.559-08:00</atom:updated><title>Pressing on with IQ Correction algorithm - vhdl entity and architecture update</title><description>Here's tonight's progress on the entity and architecture for the implementation &lt;br /&gt;
of the IQ Correction algorithm.&lt;br /&gt;
&lt;br /&gt;
It compiled after solving&amp;nbsp;some trouble I had with implmenting shifts.&amp;nbsp;Standard &lt;br /&gt;
logic vectors can't be shifted, but signed vectors can be.&amp;nbsp;So converting, then &lt;br /&gt;
shifting, then converting back did the trick. &lt;br /&gt;
&lt;br /&gt;
More soon,&lt;br /&gt;
-Michelle W5NYV&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
library ieee;&lt;br /&gt;
use ieee.std_logic_1164.all; &lt;br /&gt;
use IEEE.std_logic_signed.all;&lt;br /&gt;
use ieee.numeric_std.all; &lt;br /&gt;
&lt;br /&gt;
entity IQGainPhaseCorrection is&lt;br /&gt;
generic(input_width:natural:=15;&lt;br /&gt;
output_width:natural:=31);&lt;br /&gt;
port(&lt;br /&gt;
clk :in std_logic;&lt;br /&gt;
x1 :in std_logic_vector(input_width downto 0);&lt;br /&gt;
y1 :in std_logic_vector(input_width downto 0);&lt;br /&gt;
gain_error :out std_logic_vector(output_width downto 0);&lt;br /&gt;
phase_error :out std_logic_vector(output_width downto 0)&lt;br /&gt;
);&lt;br /&gt;
end IQGainPhaseCorrection;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
architecture IQGainPhaseCorrection_beh of IQGainPhaseCorrection is &lt;br /&gt;
--signal declarations &lt;br /&gt;
--phase error calculation&lt;br /&gt;
signal reg_1:std_logic_vector(input_width downto 0);&lt;br /&gt;
signal reg_1_sv:std_logic_vector(input_width downto 0);&lt;br /&gt;
--gain error calculation&lt;br /&gt;
signal reg_2:std_logic_vector(input_width downto 0);&lt;br /&gt;
signal reg_2_sv:std_logic_vector(input_width downto 0);&lt;br /&gt;
&lt;br /&gt;
--Phase Offset Corrected&lt;br /&gt;
signal y2:std_logic_vector(2*input_width downto 0);&lt;br /&gt;
&lt;br /&gt;
--Gain and Phase Offset Corrected&lt;br /&gt;
signal y3:std_logic_vector(input_width downto 0); &lt;br /&gt;
signal x1y2:signed(2*input_width downto 0);&lt;br /&gt;
signal mu_1:signed(2*input_width downto 0);&lt;br /&gt;
signal x1x1y3y3:signed(4*input_width downto 0);&lt;br /&gt;
signal mu_2:signed(2*input_width downto 0);&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
correction : process &lt;br /&gt;
begin&lt;br /&gt;
wait until clk'event and clk = '1';&lt;br /&gt;
&lt;br /&gt;
--phase error estimate, step size set to 0.000244&lt;br /&gt;
y2 &amp;lt;= y1 - reg_1 * x1;&lt;br /&gt;
--reg_1_sv &amp;lt;= reg_1;&lt;br /&gt;
x1y2 &amp;lt;= signed(x1 * y2); --have to convert to signed to use shift.&lt;br /&gt;
mu_1 &amp;lt;= shift_right(x1y2,12); --step size applied.&lt;br /&gt;
reg_1 &amp;lt;= reg_1 + std_logic_vector(mu_1); --convert back to std_logic_vector.&lt;br /&gt;
phase_error &amp;lt;= reg_1; --update phase error estimate.&lt;br /&gt;
&lt;br /&gt;
--gain error estimate,&amp;nbsp;step size set to&amp;nbsp;0.000122&lt;br /&gt;
y3 &amp;lt;= y2 * reg_2;&lt;br /&gt;
--reg_2_sv &amp;lt;= reg_2;&lt;br /&gt;
x1x1y3y3 &amp;lt;= signed(abs((x1)*(x1)) - abs((y3)*(y3))); --have to convert to signed to use shift.&lt;br /&gt;
mu_2 &amp;lt;= shift_right(x1x1y3y3, 13); --step size applied.&lt;br /&gt;
reg_2 &amp;lt;= reg_2 + std_logic_vector(mu_2); --convert back to std_logic_vector.&lt;br /&gt;
gain_error &amp;lt;= reg_2; --update gain error estimate.&lt;br /&gt;
&lt;br /&gt;
end process;&lt;br /&gt;
end IQGainPhaseCorrection_beh;</description><link>http://microwaveengineeringproject.blogspot.com/2011/01/pressing-on-with-iq-correction.html</link><thr:total>0</thr:total><author>w5nyv@yahoo.com (w5nyv)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-410288222235817148.post-6842364352958230698</guid><pubDate>Thu, 20 Jan 2011 04:59:00 +0000</pubDate><atom:updated>2011-01-19T21:00:02.006-08:00</atom:updated><title>IQ Correction Model - proposed plotting change, question about absolute values</title><description>PDF attached. &lt;p&gt;&lt;br&gt;More soon! -Michelle W5NYV</description><link>http://microwaveengineeringproject.blogspot.com/2011/01/iq-correction-model-proposed-plotting.html</link><thr:total>0</thr:total><author>w5nyv@yahoo.com (w5nyv)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-410288222235817148.post-5124344225862773814</guid><pubDate>Mon, 17 Jan 2011 06:09:00 +0000</pubDate><atom:updated>2011-01-16T22:09:20.638-08:00</atom:updated><title>IQ Correct entity and architecture files - update</title><description>Here&amp;#39;s the snapshot of the latest work on the entity and architecture for the IQ &lt;br&gt;gain and phase correction algorithm. &lt;p&gt;&lt;p&gt;more soon!&lt;br&gt;-Michelle W5NYV</description><link>http://microwaveengineeringproject.blogspot.com/2011/01/iq-correct-entity-and-architecture.html</link><thr:total>2</thr:total><author>w5nyv@yahoo.com (w5nyv)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-410288222235817148.post-6016684313154909814</guid><pubDate>Fri, 14 Jan 2011 05:04:00 +0000</pubDate><atom:updated>2011-01-13T21:04:40.719-08:00</atom:updated><title>IQ Correction entity, architecture update</title><description>entity IQGainPhaseCorrection is&lt;p&gt;generic(input_width:natural:=12;&lt;br&gt;	output_width:natural:=7);&lt;p&gt;port(&lt;br&gt;	clk:in bit;&lt;br&gt;	x1:in bit_vector(input_width downto 0);&lt;br&gt;	y1:in bit_vector(input_width downto 0);&lt;br&gt;	gain_error:out bit_vector(output_width downto 0);&lt;br&gt;	phase_error:out bit_vector(output_width downto 0)&lt;br&gt;);&lt;p&gt;end IQGainPhaseCorrection;&lt;p&gt;architecture IQGainPhaseCorrection_beh of IQGainPhaseCorrection is&lt;p&gt;&lt;p&gt;&lt;br&gt;begin&lt;p&gt;--as long as there are samples, do a loop&lt;p&gt;    correction : process is&lt;br&gt;	&lt;br&gt;	--local variables&lt;br&gt;	variable count_value : natural := 0;&lt;br&gt;	&lt;br&gt;	--phase error calculation&lt;br&gt;	variable reg_1:bit_vector(7 downto 0):=00000000;&lt;br&gt;	variable reg_1_sv:bit_vector(7 downto 0):=00000000;&lt;p&gt;	--gain error calculation&lt;br&gt;	variable reg_2:bit_vector(7 downto 0):=00000001;&lt;br&gt;	variable reg_2_sv:bit_vector(7 downto 0):=00000000;&lt;p&gt;	--SNR scaling?&lt;br&gt;	constant mu_1:real:=0.0002;&lt;br&gt;	constant mu_2:real:=0.0001;&lt;p&gt;	--Phase Offset Corrected&lt;br&gt;	variable y2:bit_vector(7 downto 0):=00000000;&lt;p&gt;	--Gain and Phase Offset Corrected&lt;br&gt;	variable y3:bit_vector(7 downto 0):=00000000;&lt;p&gt;	    begin&lt;p&gt;	      loop&lt;br&gt;	        wait until clk;&lt;br&gt;	      &lt;br&gt;		y2(nn) = y1(nn)-reg_1*x1(nn);&lt;br&gt;		reg_1_sv(nn) = reg_1;&lt;br&gt;		reg_1 = reg_1 + mu_1*x1(nn)*y2(nn);
&lt;br&gt;    &lt;br&gt;		y3(nn) = y2(nn)*reg_2;&lt;br&gt;		reg_2_sv(nn) = reg_2;&lt;br&gt;		reg_2 = reg_2+mu_2*(abs(x1(nn))^2 - abs(y3(nn))^2);&lt;p&gt;	      end loop;&lt;br&gt;	    end process correction;&lt;p&gt;end IQGainPhaseCorrection_beh;&lt;p&gt;&lt;br&gt;Attached are the entity and architecture for the IQ Correction algorithm, as &lt;br&gt;well as the original MATLAB model.&lt;p&gt;I added a clock to the entity, and started the architecture. The architecture is &lt;br&gt;&amp;quot;sketch&amp;quot; stage, but you can see where I&amp;#39;m going with it. &lt;br&gt; &lt;br&gt;Got some advice from Ken Easton on how to handle the types, and we&amp;#39;re set to &lt;br&gt;talk again about how best to handle memory. &lt;p&gt;more soon! -Michelle W5NYV</description><link>http://microwaveengineeringproject.blogspot.com/2011/01/iq-correction-entity-architecture.html</link><thr:total>0</thr:total><author>w5nyv@yahoo.com (w5nyv)</author></item></channel></rss>