https://openemt.org/api.php?action=feedcontributions&user=Alexj&feedformat=atomOpenEMT.org - User contributions [en]2021-04-22T20:49:35ZUser contributionsMediaWiki 1.29.1https://openemt.org/index.php?title=System_design&diff=124System design2020-03-16T15:19:49Z<p>Alexj: </p>
<hr />
<div>Anser EMT is an open-source electromagnetic navigation platform for research use. The system can be readily build from the design files provided in this project. This page provides a brief summary of the system design. Detailed information can be found by clicking the individual section headings.<br />
<br />
The Anser system is comprised of eight sub-systems summarized below:<br />
<br />
<br />
=Overview=<br />
[[File:System.PNG|thumb|600px]]<br />
==[[Signal generator]]==<br />
This provides the source signal for the emitter coils of the field generator. Eight individual waveform generators ICs produce a set of sinusoidal signals in to 20kHz band for amplification.<br />
<br />
==[[AC current amplifier]]==<br />
A closed loop AC amplifier increases the power gain of the generated sinusoidal signals. This power gain allows the signal to drive the eight emitter coils to produce a time-varying magnetic field.<br />
<br />
==[[Tracking sensor]]==<br />
This coil produces a time-varying voltage signal when placed in the working volume of the field generator. The signal is a superposition of voltages induced by the time-varying magnetic field from each emitter coil.<br />
<br />
==[[Sensor amplifier]]==<br />
The induced sensor voltage is very weak, on the order of microvolts, and requires filtering and amplification before being sampled. This instrumentation amplifier circuit conditions the signal in preparation for sampling.<br />
<br />
==[[Data acquisition]]==<br />
Once conditioned, the tracking sensor is sampled by a data acquisition unit (DAQ). A current sense signal from the emitter coils is also sampled in order to determine the relative phase angle sensor voltage. Anser uses a National Instruments DAQ solution, but alternative/custom solutions may be used instead.<br />
<br />
==[[Signal demodulation]]==<br />
The tracked sensor signal and emitter current sense signals are both superpositions of eight frequency components, with each component due to a single emitter coil. Synchronous demodulation in software allows the magnitude and phase of each frequency component to be measured.<br />
<br />
==[[Position and orientation algorithm]]==<br />
The magnitude and phase information of each frequency components is fed into the position and orientation algorithm.</div>Alexjhttps://openemt.org/index.php?title=MediaWiki:Sidebar&diff=123MediaWiki:Sidebar2020-03-16T15:19:15Z<p>Alexj: </p>
<hr />
<div><br />
* navigation<br />
** mainpage|mainpage-description<br />
** Anser EMT|Anser EMT<br />
** recentchanges-url|recentchanges<br />
** randompage-url|randompage<br />
** helppage|help<br />
* Anser EMT<br />
**System design|System design<br />
**Signal generator|Signal generator<br />
**AC current amplifier|AC current amplifier<br />
**Field generator|Field generator<br />
**Tracking sensor|Tracking sensor<br />
**Sensor amplifier|Sensor amplifier<br />
**Data acquisition|Data acquisition<br />
**Signal demodulation|Signal demodulation<br />
**OpenIGTLink|OpenIGTLink<br />
* SEARCH<br />
* TOOLBOX<br />
* LANGUAGES</div>Alexjhttps://openemt.org/index.php?title=OpenEMT.org&diff=122OpenEMT.org2019-12-03T12:38:50Z<p>Alexj: </p>
<hr />
<div>'''Welcome to OpenEMT.org!'''<br />
<br />
Creating an open source community for electromagnetic tracking systems.<br />
[[File:Bitmap.png|right|500px]]<br />
<br />
==Discover Anser EMT==<br />
<br />
<embedvideo service="youtube" alignment="right" container="frame" valignment="baseline" dimensions="360">https://www.youtube.com/watch?v=44rin3eplZE</embedvideo><br />
The first open-source electromagnetic tracking system. This paper details the design and specification of an electromagnetic tracking system for research and pre-clinical testing. Experiments were conducted in collaboration with the German Cancer Research Centre ([https://www.dkfz.de DKFZ]) in Heidelberg, Germany.<br />
<br />
H. Jaeger ''et al.'', Int. J. Comput. Assist. Radiol. Surg. 2017 Jun;12(6):1059-1067. doi: [https://doi.org/10.1007/s11548-017-1568-7 10.1007/s11548-017-1568-7]<br />
<br />
* IPCAI presentation available [http://anser.io/anserlong.html#/ here]<br />
* Paper available [http://dx.doi.org/10.1007/s11548-017-1568-7 here]<br />
* Open Science Framework webpage available [https://osf.io/47q8q/ here]<br />
<br />
The Anser system design documentation is available [[System design| here]].<br />
<br />
<br />
<br />
==Tiled Field Generators==<br />
<br />
Anser EMT can be configured with multiple field generators to form larger tracking volumes. The design of the field generator can be found [[Field generator] here]. The square nature of the design provides the potentially unlimited tiling configuration for different tracking applications.<br />
<br />
H. Jaeger ''et al.'', IEEE Trans. Instrum. Meas., 2019 Dec;18(9):3059, doi: [https://doi.org/10.1109/TIM.2019.2900884 10.1109/TIM.2019.2900884]<br />
<br />
==Distortion Detection==<br />
The Anser EMT field generator can be configured to detect the presence of the metal objects in the vicinity of the tracking volume. Metal objects introduce tracking errors in the form of ferromagnetic and Eddy current distortion. The ability to detect and localise the origin of these distortions is the first step in mitigating their error causing effects.<br />
<br />
H. Jaeger ''et al.'', Sensors, 2018 Sep;68(2):4845-4852, doi: [https://doi.org/10.3390/s18093059 10.3390/s18093059]<br />
<br />
==Lung Navigation==<br />
Electromagnetic tracking is a useful tool in navigating the human airways enabling more effective diagnosis and treatment of lung cancer. We show the first use of Anser EMT in a pre-clinical setting by performing electromagnetic navigation bronchscopy (ENB) on a pig. The open-source medical imaging software [https://www.custusx.org/ CustusX] was used to visualise the EMT position data within the airways. This work was performed in collaboration with the Norwegian Foundation for Industrial and Technical Research [https://www.sintef.no SINTEF].<br />
<br />
H. Jaeger ''et al.'', Minimally Invasive Therapy & Allied Technologies, 2018 Nov;28(6):363-372, doi: [https://doi.org/10.1080/13645706.2018.1544911 10.1080/13645706.2018.1544911]<br />
<embedvideo service="youtube" alignment="inline" container="frame" valignment="baseline" dimensions="360">https://www.youtube.com/watch?v=MCIIBxnQawA</embedvideo><br />
<br />
==Liver Biopsy==<br />
Needle tracking for biopsy is an important application of EMT technology as it enables clincians to precisely navigate the needle's tip to perform biopsy. In this study we apply the Anser EMT system to target liver tumours in a pig and perform targeted ablation therapy.<br />
<br />
S. Hinds ''et al.'', Int. J. Comput. Assist. Radiol. Surg. 2019 Apr;14(9):1475–1484. doi: [https://doi.org/10.1007/s11548-019-01983-5 10.1007/s11548-019-01983-5]<br />
<embedvideo service="youtube" alignment="inline" container="frame" valignment="baseline" dimensions="360">https://www.youtube.com/watch?v=l-eon4gCWuM</embedvideo><br />
<br />
==Anser EMT Software==<br />
* Matlab implementation available [https://github.com/Anseremt here].<br />
* Cross-platform Python implementation available [https://github.com/Anseremt here].<br />
* Graphical User Interface (GUI) version available [https://github.com/StephenHinds/qt-anser here].<br />
<br />
==Anser EMT Hardware==<br />
* Field generator PCB design available [https://github.com/AlexJaeger/AnserEMT_FGPCB here]. (Requires Altium Designer)<br />
* Base station PCB design available [https://github.com/AlexJaeger/AnserEMT_BasePCB here]. (Requires Altium Designer)</div>Alexjhttps://openemt.org/index.php?title=OpenEMT.org&diff=121OpenEMT.org2019-11-28T15:32:09Z<p>Alexj: Added videos</p>
<hr />
<div>'''Welcome to OpenEMT.org!'''<br />
<br />
Creating an open source community for electromagnetic tracking systems.<br />
[[File:Bitmap.png|right|500px]]<br />
<br />
==Discover Anser EMT==<br />
<br />
<embedvideo service="youtube" alignment="right" container="frame" valignment="baseline" dimensions="360">https://www.youtube.com/watch?v=44rin3eplZE</embedvideo><br />
The first open-source electromagnetic tracking system. This paper details the design and specification of an electromagnetic tracking system for research and pre-clinical testing. Experiments were conducted in collabortation with the German Cancer Research Centre in Heidelberg, Germany.<br />
<br />
H. Jaeger ''et al.'', Int. J. Comput. Assist. Radiol. Surg. 2017 Jun;12(6):1059-1067. doi: [https://doi.org/10.1007/s11548-017-1568-7 10.1007/s11548-017-1568-7]<br />
<br />
* IPCAI presentation available [http://anser.io/anserlong.html#/ here]<br />
* Paper available [http://dx.doi.org/10.1007/s11548-017-1568-7 here]<br />
* Open Science Framework webpage available [https://osf.io/47q8q/ here]<br />
<br />
The Anser system design documentation is available [[System design| here]].<br />
<br />
<br />
<br />
==Tiled Field Generators==<br />
<br />
Anser EMT can be configured with multiple field generators to form larger tracking volumes. The design of the field generator can be found [[Field generator] here]. The square nature of the design provides the potentially unlimited tiling configuration for different tracking applications.<br />
<br />
H. Jaeger ''et al.'', IEEE Trans. Instrum. Meas., 2019 Dec;18(9):3059, doi: [https://doi.org/10.1109/TIM.2019.2900884 10.1109/TIM.2019.2900884]<br />
<br />
==Distortion Detection==<br />
The Anser EMT field generator can be configured to detect the presence of the metal objects in the vicinity of the tracking volume. Metal objects introduce tracking errors in the form of ferromagnetic and Eddy current distortion. The ability to detect and localise the origin of these distortions is the first step in mitigating their error causing effects.<br />
<br />
H. Jaeger ''et al.'', Sensors, 2018 Sep;68(2):4845-4852, doi: [https://doi.org/10.3390/s18093059 10.3390/s18093059]<br />
<br />
==Lung Navigation==<br />
Electromagnetic tracking is a useful tool in navigating the human airways enabling more effective diagnosis and treatment of lung cancer. We show the first use of Anser EMT in a pre-clinical setting by performing electromagnetic navigation bronchscopy (ENB) on a pig. The open-source medical imaging software [https://www.custusx.org/ CustusX] was used to visualise the EMT position data within the airways. This work was performed in collaboration with the Norwegian Foundation for Industrial and Technical Research [https://www.sintef.no SINTEF].<br />
<br />
H. Jaeger ''et al.'', Minimally Invasive Therapy & Allied Technologies, 2018 Nov;28(6):363-372, doi: [https://doi.org/10.1080/13645706.2018.1544911 10.1080/13645706.2018.1544911]<br />
<embedvideo service="youtube" alignment="inline" container="frame" valignment="baseline" dimensions="360">https://www.youtube.com/watch?v=MCIIBxnQawA</embedvideo><br />
<br />
==Liver Biopsy==<br />
Needle tracking for biopsy is an important application of EMT technology as it enables clincians to precisely navigate the needle's tip to perform biopsy. In this study we apply the Anser EMT system to target liver tumours in a pig and perform targeted ablation therapy.<br />
<br />
S. Hinds ''et al.'', Int. J. Comput. Assist. Radiol. Surg. 2019 Apr;14(9):1475–1484. doi: [https://doi.org/10.1007/s11548-019-01983-5 10.1007/s11548-019-01983-5]<br />
<embedvideo service="youtube" alignment="inline" container="frame" valignment="baseline" dimensions="360">https://www.youtube.com/watch?v=l-eon4gCWuM</embedvideo><br />
<br />
==Anser EMT Software==<br />
* Matlab implementation available [https://github.com/Anseremt here].<br />
* Cross-platform Python implementation available [https://github.com/Anseremt here].<br />
* Graphical User Interface (GUI) version available [https://github.com/StephenHinds/qt-anser here].<br />
<br />
==Anser EMT Hardware==<br />
* Field generator PCB design available [https://github.com/AlexJaeger/AnserEMT_FGPCB here]. (Requires Altium Designer)<br />
* Base station PCB design available [https://github.com/AlexJaeger/AnserEMT_BasePCB here]. (Requires Altium Designer)</div>Alexjhttps://openemt.org/index.php?title=OpenEMT.org&diff=120OpenEMT.org2019-11-28T15:10:38Z<p>Alexj: </p>
<hr />
<div>'''Welcome to OpenEMT.org!'''<br />
<br />
Creating an open source community for electromagnetic tracking systems.<br />
[[File:Bitmap.png|right|500px]]<br />
<br />
==Discover Anser EMT==<br />
The first open-source electromagnetic tracking system. This paper details the design and specification of an electromagnetic tracking system for research and pre-clinical testing. Experiments were conducted in collabortation with the German Cancer Research Centre in Heidelberg, Germany.<br />
<br />
H. Jaeger ''et al.'', Int. J. Comput. Assist. Radiol. Surg. 2017 Jun;12(6):1059-1067. doi: [https://doi.org/10.1007/s11548-017-1568-7 10.1007/s11548-017-1568-7]<br />
<br />
* IPCAI presentation available [http://anser.io/anserlong.html#/ here]<br />
* Paper available [http://dx.doi.org/10.1007/s11548-017-1568-7 here]<br />
* Open Science Framework webpage available [https://osf.io/47q8q/ here]<br />
<br />
The Anser system design documentation is available [[System design| here]]. A short video of the design is available [http://anser.io/img/anser1video.mp4 here].<br />
<br />
==Tiled Field Generators==<br />
Anser EMT can be configured with multiple field generators to form larger tracking volumes. The design of the field generator can be found [[Field generator] here]. The square nature of the design provides the potentially unlimited tiling configuration for different tracking applications.<br />
<br />
H. Jaeger ''et al.'', IEEE Trans. Instrum. Meas., 2019 Dec;18(9):3059, doi: [https://doi.org/10.1109/TIM.2019.2900884 10.1109/TIM.2019.2900884]<br />
<br />
==Distortion Detection==<br />
The Anser EMT field generator can be configured to detect the presence of the metal objects in the vicinity of the tracking volume. Metal objects introduce tracking errors in the form of ferromagnetic and Eddy current distortion. The ability to detect and localise the origin of these distortions is the first step in mitigating their error causing effects.<br />
<br />
H. Jaeger ''et al.'', Sensors, 2018 Sep;68(2):4845-4852, doi: [https://doi.org/10.3390/s18093059 10.3390/s18093059]<br />
<br />
==Lung Navigation==<br />
Electromagnetic tracking is a useful tool in navigating the human airways enabling more effective diagnosis and treatment of lung cancer. We show the first use of Anser EMT in a pre-clinical setting by performing electromagnetic navigation bronchscopy (ENB) on a pig. The open-source medical imaging software [https://www.custusx.org/ CustusX] was used to visualise the EMT position data within the airways. This work was performed in collaboration with the Norwegian Foundation for Industrial and Technical Research [https://www.sintef.no SINTEF].<br />
<br />
H. Jaeger ''et al.'', Minimally Invasive Therapy & Allied Technologies, 2018 Nov;28(6):363-372, doi: [https://doi.org/10.1080/13645706.2018.1544911 10.1080/13645706.2018.1544911]<br />
<br />
==Liver Biopsy==<br />
Needle tracking for biopsy is an important application of EMT technology as it enables clincians to precisely navigate the needle's tip to perform biopsy. In this study we apply the Anser EMT system to target liver tumours in a pig and perform targeted ablation therapy.<br />
<br />
S. Hinds ''et al.'', Int. J. Comput. Assist. Radiol. Surg. 2019 Apr;14(9):1475–1484. doi: [https://doi.org/10.1007/s11548-019-01983-5 10.1007/s11548-019-01983-5]<br />
<br />
<br />
==Anser EMT Software==<br />
* Matlab implementation available [https://github.com/Anseremt here].<br />
* Cross-platform Python implementation available [https://github.com/Anseremt here].<br />
* Graphical User Interface (GUI) version available [https://github.com/StephenHinds/qt-anser here].<br />
<br />
==Anser EMT Hardware==<br />
* Field generator PCB design available [https://github.com/AlexJaeger/AnserEMT_FGPCB here]. (Requires Altium Designer)<br />
* Base station PCB design available [https://github.com/AlexJaeger/AnserEMT_BasePCB here]. (Requires Altium Designer)</div>Alexjhttps://openemt.org/index.php?title=OpenEMT.org&diff=119OpenEMT.org2018-12-19T12:01:13Z<p>Alexj: </p>
<hr />
<div>'''Welcome to OpenEMT.org!'''<br />
<br />
Creating an open source community for electromagnetic tracking systems.<br />
[[File:Bitmap.png|right|500px]]<br />
* IPCAI presentation available [http://anser.io/anserlong.html#/ here]<br />
* Paper available [http://dx.doi.org/10.1007/s11548-017-1568-7 here]<br />
* Open Science Framework webpage available [https://osf.io/47q8q/ here]<br />
<br />
<br />
==Discover Anser EMT==<br />
* Check out the system design [[System design| here]].<br />
* Look at the new design [http://anser.io/img/anser1video.mp4 here].<br />
<br />
==Anser EMT Software==<br />
* Matlab implementation available [https://github.com/alexjaeger/anseremt here].<br />
* Cross-platform Python implementation available [https://github.com/alexjaeger/python-anser here].<br />
* Graphical User Interface (GUI) version available [https://github.com/StephenHinds/qt-anser here].<br />
<br />
==Anser EMT Hardware==<br />
* Field generator PCB design available [https://github.com/AlexJaeger/AnserEMT_FGPCB here]. (Requires Altium Designer)<br />
* Base station PCB design available [https://github.com/AlexJaeger/AnserEMT_BasePCB here]. (Requires Altium Designer)</div>Alexjhttps://openemt.org/index.php?title=OpenEMT.org&diff=118OpenEMT.org2018-10-31T12:13:08Z<p>Alexj: Updated link to Python QT</p>
<hr />
<div>'''Welcome to OpenEMT.org!'''<br />
<br />
Creating an open source community for electromagnetic tracking systems.<br />
[[File:Bitmap.png|right|500px]]<br />
* IPCAI presentation available [http://anser.io/anserlong.html#/ here]<br />
* Paper available [http://dx.doi.org/10.1007/s11548-017-1568-7 here]<br />
* Open Science Framework webpage available [https://osf.io/47q8q/ here]<br />
<br />
<br />
==Discover Anser EMT==<br />
* Check out the system design [[System design| here]].<br />
* Look at the new design [http://anser.io/img/anser1video.mp4 here].<br />
<br />
==Anser EMT Software==<br />
* Matlab implementation available [https://github.com/alexjaeger/anseremt here].<br />
* Cross-platform Python implementation available [https://github.com/alexjaeger/python-anser here].<br />
* Graphical User Interface (GUI) version available [https://github.com/StephenHinds/qt-anser here]</div>Alexjhttps://openemt.org/index.php?title=OpenEMT.org&diff=117OpenEMT.org2018-08-01T09:29:58Z<p>Alexj: </p>
<hr />
<div>'''Welcome to OpenEMT.org!'''<br />
<br />
Creating an open source community for electromagnetic tracking systems.<br />
[[File:Bitmap.png|right|500px]]<br />
* IPCAI presentation available [http://anser.io/anserlong.html#/ here]<br />
* Paper available [http://dx.doi.org/10.1007/s11548-017-1568-7 here]<br />
* Open Science Framework webpage available [https://osf.io/47q8q/ here]<br />
<br />
<br />
==Discover Anser EMT==<br />
* Check out the system design [[System design| here]].<br />
* Look at the new design [http://anser.io/img/anser1video.mp4 here].<br />
<br />
==Anser EMT Software==<br />
* Matlab implementation available [https://github.com/alexjaeger/anseremt here].<br />
* Cross-platform Python implementation available [https://github.com/alexjaeger/python-anser here].<br />
* Graphical User Interface (GUI) version available [https://github.com/AlexJaeger/python-anser/blob/gui/app.zip?raw=true here]</div>Alexjhttps://openemt.org/index.php?title=OpenEMT.org&diff=116OpenEMT.org2018-07-31T09:18:32Z<p>Alexj: </p>
<hr />
<div>'''Welcome to OpenEMT.org!'''<br />
<br />
Creating an open source community for electromagnetic tracking systems.<br />
[[File:Bitmap.png|right|500px]]<br />
* IPCAI presentation available [http://anser.io/anserlong.html#/ here]<br />
* Paper available [http://dx.doi.org/10.1007/s11548-017-1568-7 here]<br />
* Open Science Framework webpage available [https://osf.io/47q8q/ here]<br />
<br />
<br />
==Discover Anser EMT==<br />
* Check out the system design [[System design|here].<br />
* Look at the new design [http://anser.io/img/anser1video.mp4 here].<br />
<br />
==Anser EMT Software==<br />
* Matlab implementation available [https://github.com/alexjaeger/anseremt here].<br />
* Cross-platform Python implementation available [https://github.com/alexjaeger/python-anser here].</div>Alexjhttps://openemt.org/index.php?title=OpenIGTLink&diff=115OpenIGTLink2018-03-05T21:54:59Z<p>Alexj: </p>
<hr />
<div>[[File:Opeigtlinklogo.PNG|thumb|]]<br />
<br />
==Overview==<br />
OpenIGTLink is a commonly used communications standard that features in many image guided therapy applications. The standard facilitates the robust transmission and reception of medical data over a computer network. More information regarding the standard can be viewed on the OpenIGTLink homepage (http://openigtlink.org/).<br />
<br />
CustusX (https://www.custusx.org/), 3DSlicer (https://www.slicer.org/) and MITK (http://mitk.org/wiki/MITK) are medical imaging toolkits that integrate the OpenIGTLink communication standard. In this work 3D Slicer was originally used to effectively visualise the position of the Anser system in a 3D environment. Full compatability with CustusX is the focus of current work.<br />
<br />
===Matlab compatability===<br />
The OpenIGTLink standard can be implemented in Matlab using the utility package provided by the PLUS Toolkit Matlab Utility package (https://github.com/PlusToolkit/PlusMatlabUtils). The package is maintained by the Laboratory for Percutaneous Surgery in Queens University, Ontario, Canada.</div>Alexjhttps://openemt.org/index.php?title=OpenIGTLink&diff=114OpenIGTLink2017-11-09T16:18:51Z<p>Alexj: </p>
<hr />
<div>[[File:Opeigtlinklogo.PNG|thumb|]]<br />
<br />
==Overview==<br />
The OpenIGTLINK is a commonly used communications standard that features in many image guided therapy applications. The standard facilitates the robust transmission and reception of medical data over a computer network. More information regarding the standard can be viewed on the OpenIGTLink homepage (http://openigtlink.org/).<br />
<br />
CustusX (https://www.custusx.org/), 3DSlicer (https://www.slicer.org/) and MITK (http://mitk.org/wiki/MITK) are medical imaging toolkits that integrate the OpenIGTLink communication standard. In this work 3D Slicer was originally used to effectively visualise the position of the Anser system in a 3D environment. Full compatability with CustusX is the focus of current work.<br />
<br />
===Matlab compatability===<br />
The OpenIGTLink standard can be implemented in Matlab using the utility package provided by the PLUS Toolkit Matlab Utility package (https://github.com/PlusToolkit/PlusMatlabUtils). The package is maintained by the Laboratory for Percutaneous Surgery in Queens University, Ontario, Canada.</div>Alexjhttps://openemt.org/index.php?title=OpenIGTLink&diff=113OpenIGTLink2017-11-09T16:18:16Z<p>Alexj: </p>
<hr />
<div>[[File:Opeigtlinklogo.PNG|thumb|]]<br />
<br />
==Overview==<br />
The OpenIGTLINK is a commonly used communications standard that features in many image guided therapy applications. The standard facilitates the robust transmission and reception of medical data over a computer network. More information regarding the standard can be viewed on the OpenIGTLink homepage (http://openigtlink.org/).<br />
<br />
CustusX (https://www.custusx.org/), 3DSlicer (https://www.slicer.org/) and MITK (http://mitk.org/wiki/MITK) are medical imaging toolkits that integrate the OpenIGTLink communication standard. In this work 3D Slicer was originally used to effectively visualise the position of the Anser system in a 3D environment. Full compatability with CustusX is the focus of current work.<br />
<br />
===Matlab compatability===<br />
The OpenIGTLink standard can be implemented in Matlab using the utility package provided by the PLUS Toolkit's Matlab Utility package (https://github.com/PlusToolkit/PlusMatlabUtils). The package is maintained by the Laboratory for Percutaneous Surgery in Queens University, Ontario, Canada.</div>Alexjhttps://openemt.org/index.php?title=OpenIGTLink&diff=112OpenIGTLink2017-11-09T16:00:34Z<p>Alexj: </p>
<hr />
<div>[[File:Opeigtlinklogo.PNG|thumb|]]<br />
<br />
The OpenIGTLINK is a commonly used communications standard that features in many image guided therapy applications. The standard facilitates the robust transmission and reception of medical data over a computer network. More information regarding the standard can be viewed on the OpenIGTLink homepage (http://openigtlink.org/).<br />
<br />
CustusX (https://www.custusx.org/), 3DSlicer (https://www.slicer.org/) and MITK (http://mitk.org/wiki/MITK) are medical imaging toolkits that integrate the OpenIGTLink communication standard. In this work 3D Slicer was originally used to effectively visualise the position of the Anser system in a 3D environment. Full compatability with CustusX is the focus of current work.</div>Alexjhttps://openemt.org/index.php?title=File:Opeigtlinklogo.PNG&diff=111File:Opeigtlinklogo.PNG2017-11-09T15:58:05Z<p>Alexj: </p>
<hr />
<div></div>Alexjhttps://openemt.org/index.php?title=OpenIGTLink&diff=110OpenIGTLink2017-11-09T15:54:02Z<p>Alexj: </p>
<hr />
<div>The OpenIGTLINK is a commonly used communications standard that features in many image guided therapy applications. The standard facilitates the robust transmission and reception of medical data over a computer network. More information regarding the standard can be viewed on the OpenIGTLink homepage (http://openigtlink.org/).<br />
<br />
CustusX (https://www.custusx.org/), 3DSlicer (https://www.slicer.org/) and MITK (http://mitk.org/wiki/MITK) are medical imaging toolkits that integrate the OpenIGTLink communication standard. In this work 3D Slicer was originally used to effectively visualise the position of the Anser system in a 3D environment. Full compatability with CustusX is the focus of current work.</div>Alexjhttps://openemt.org/index.php?title=OpenIGTLink&diff=109OpenIGTLink2017-11-09T15:52:41Z<p>Alexj: </p>
<hr />
<div>The OpenIGTLINK is a commonly used communications standard that features in many image guided therapy applications. The standard facilitates the robust transmission and reception of medical data over a computer network. More information regarding the standard can be viewed on the OpenIGTLink homepage (http://openigtlink.org/).<br />
<br />
CustusX (https://www.custusx.org/), 3DSlicer (https://www.slicer.org/), MITK (http://mitk.org/wiki/MITK) are medical imaging toolkits that integrate the OpenIGTLink standard. In this work 3D Slicer is used to effectively visualise the position of the Anser system in a 3D environment.</div>Alexjhttps://openemt.org/index.php?title=System_design&diff=108System design2017-11-09T15:47:15Z<p>Alexj: </p>
<hr />
<div>Anser EMT is an open-source electromagnetic navigation platform for research use. The system can be readily build from the design files provided in this project. This page provides a brief summary of the system design. Detailed information can be found by clicking the individual section headings.<br />
<br />
The Anser system is comprised of eight sub-systems summarized below:<br />
<br />
<br />
=Overview=<br />
[[File:System.PNG|thumb|600px]]<br />
==[[Signal generator]]==<br />
This provides the source signal for the emitter coils of the field generator. Eight individual waveform generators ICs produce a set of sinusoidal signals in to 20kHz band for amplification.<br />
<br />
==[[AC current amplifier]]==<br />
A closed loop AC amplifier increases the power gain of the generated sinusoidal signals. This power gain allows the signal to drive the eight emitter coils to produce a time-varying magnetic field.<br />
<br />
==[[Tracking sensor]]==<br />
This coil produces a time-varying voltage signal when placed in the working volume of the field generator. The signal is a superposition of voltages induced by the time-varying magnetic field from each emitter coil.<br />
<br />
==[[Sensor amplifier]]==<br />
The induced sensor voltage is very weak, on the order of microvolts, and requires filtering and amplification before being sampled. This instrumentation amplifier circuit conditions the signal in preparation for sampling.<br />
<br />
==[[Data acquisition]]==<br />
Once conditioned, the tracking sensor is sampled by a data acquisition unit (DAQ). A current sense signal from the emitter coils is also sampled in order to determine the relative phase angle sensor voltage. Anser uses a National Instruments DAQ solution, but alternative/custom solutions may be used instead.<br />
<br />
==[[Signal demodulation]]==<br />
The tracked sensor signal and emitter current sense signals are both superpositions of eight frequency components, with each component due to a single emitter coil. Synchronous demodulation in software allows the magnitude and phase of each frequency component to be measured.<br />
<br />
==[[Position and orientation algorithm]]==<br />
The magnitude and phase information of each frequency components is fed into the position and orientation algorithm. The algorithm's minimisation process yields the position and orientation of the tracking sensor in space as a 5 degree of freedom vector: <math>[x,y,z,\theta,\varphi]</math></div>Alexjhttps://openemt.org/index.php?title=System_design&diff=107System design2017-11-09T15:45:13Z<p>Alexj: </p>
<hr />
<div>Anser EMT is an open-source electromagnetic navigation platform for research use. The system can be readily build from the design files provided in this project. This page provides a brief summary of the system design. Detailed implementation details can be found in the wiki.<br />
<br />
The Anser system is comprised of eight systems summarized below:<br />
<br />
<br />
=Overview=<br />
[[File:System.PNG|thumb|600px]]<br />
==[[Signal generator]]==<br />
This provides the source signal for the emitter coils of the field generator. Eight individual waveform generators ICs produce a set of sinusoidal signals in to 20kHz band for amplification.<br />
<br />
==[[AC current amplifier]]==<br />
A closed loop AC amplifier increases the power gain of the generated sinusoidal signals. This power gain allows the signal to drive the eight emitter coils to produce a time-varying magnetic field.<br />
<br />
==[[Tracking sensor]]==<br />
This coil produces a time-varying voltage signal when placed in the working volume of the field generator. The signal is a superposition of voltages induced by the time-varying magnetic field from each emitter coil.<br />
<br />
==[[Sensor amplifier]]==<br />
The induced sensor voltage is very weak, on the order of microvolts, and requires filtering and amplification before being sampled. This instrumentation amplifier circuit conditions the signal in preparation for sampling.<br />
<br />
==[[Data acquisition]]==<br />
Once conditioned, the tracking sensor is sampled by a data acquisition unit (DAQ). A current sense signal from the emitter coils is also sampled in order to determine the relative phase angle sensor voltage. Anser uses a National Instruments DAQ solution, but alternative/custom solutions may be used instead.<br />
<br />
==[[Signal demodulation]]==<br />
The tracked sensor signal and emitter current sense signals are both superpositions of eight frequency components, with each component due to a single emitter coil. Synchronous demodulation in software allows the magnitude and phase of each frequency component to be measured.<br />
<br />
==[[Position and orientation algorithm]]==<br />
The magnitude and phase information of each frequency components is fed into the position and orientation algorithm. The algorithm's minimisation process yields the position and orientation of the tracking sensor in space as a 5 degree of freedom vector: <math>[x,y,z,\theta,\varphi]</math></div>Alexjhttps://openemt.org/index.php?title=System_design&diff=106System design2017-11-09T15:44:32Z<p>Alexj: </p>
<hr />
<div>Anser EMT is an open-source electromagnetic navigation platform for research use. The system can be readily build from the design files provided in this project. This page provides a brief summary of the system design. Detailed implementation details can be found in the wiki.<br />
<br />
The Anser system is comprised of eight systems summarized below:<br />
<br />
<br />
=Overview=<br />
[[File:System.PNG|thumb|600px]]<br />
==Signal generator==<br />
This provides the source signal for the emitter coils of the field generator. Eight individual waveform generators ICs produce a set of sinusoidal signals in to 20kHz band for amplification.<br />
<br />
==[[AC current amplifier]]==<br />
A closed loop AC amplifier increases the power gain of the generated sinusoidal signals. This power gain allows the signal to drive the eight emitter coils to produce a time-varying magnetic field.<br />
<br />
==[[Tracking sensor]]==<br />
This coil produces a time-varying voltage signal when placed in the working volume of the field generator. The signal is a superposition of voltages induced by the time-varying magnetic field from each emitter coil.<br />
<br />
==[[Sensor amplifier]]==<br />
The induced sensor voltage is very weak, on the order of microvolts, and requires filtering and amplification before being sampled. This instrumentation amplifier circuit conditions the signal in preparation for sampling.<br />
<br />
==[[Data acquisition]]==<br />
Once conditioned, the tracking sensor is sampled by a data acquisition unit (DAQ). A current sense signal from the emitter coils is also sampled in order to determine the relative phase angle sensor voltage. Anser uses a National Instruments DAQ solution, but alternative/custom solutions may be used instead.<br />
<br />
==[[Signal demodulation]]==<br />
The tracked sensor signal and emitter current sense signals are both superpositions of eight frequency components, with each component due to a single emitter coil. Synchronous demodulation in software allows the magnitude and phase of each frequency component to be measured.<br />
<br />
==[[Position and orientation algorithm]]==<br />
The magnitude and phase information of each frequency components is fed into the position and orientation algorithm. The algorithm's minimisation process yields the position and orientation of the tracking sensor in space as a 5 degree of freedom vector: <math>[x,y,z,\theta,\varphi]</math></div>Alexjhttps://openemt.org/index.php?title=System_design&diff=105System design2017-11-09T15:43:36Z<p>Alexj: /* Position and orientation algorithm */</p>
<hr />
<div>Anser EMT is an open-source electromagnetic navigation platform for research use. The system can be readily build from the design files provided in this project. This page provides a brief summary of the system design. Detailed implementation details can be found in the wiki.<br />
<br />
The Anser system is comprised of eight systems summarized below:<br />
<br />
<br />
=Overview=<br />
[[File:System.PNG|thumb|600px]]<br />
==Signal generator==<br />
This provides the source signal for the emitter coils of the field generator. Eight individual waveform generators ICs produce a set of sinusoidal signals in to 20kHz band for amplification.<br />
<br />
==AC current amplifier==<br />
A closed loop AC amplifier increases the power gain of the generated sinusoidal signals. This power gain allows the signal to drive the eight emitter coils to produce a time-varying magnetic field.<br />
<br />
==Tracking sensor==<br />
This coil produces a time-varying voltage signal when placed in the working volume of the field generator. The signal is a superposition of voltages induced by the time-varying magnetic field from each emitter coil.<br />
<br />
==Sensor amplifier==<br />
The induced sensor voltage is very weak, on the order of microvolts, and requires filtering and amplification before being sampled. This instrumentation amplifier circuit conditions the signal in preparation for sampling.<br />
<br />
==Data acquisition==<br />
Once conditioned, the tracking sensor is sampled by a data acquisition unit (DAQ). A current sense signal from the emitter coils is also sampled in order to determine the relative phase angle sensor voltage. Anser uses a National Instruments DAQ solution, but alternative/custom solutions may be used instead.<br />
<br />
==Signal demodulation==<br />
The tracked sensor signal and emitter current sense signals are both superpositions of eight frequency components, with each component due to a single emitter coil. Synchronous demodulation in software allows the magnitude and phase of each frequency component to be measured.<br />
<br />
==[[Position and orientation algorithm]]==<br />
The magnitude and phase information of each frequency components is fed into the position and orientation algorithm. The algorithm's minimisation process yields the position and orientation of the tracking sensor in space as a 5 degree of freedom vector: <math>[x,y,z,\theta,\varphi]</math></div>Alexjhttps://openemt.org/index.php?title=MediaWiki:Sidebar&diff=104MediaWiki:Sidebar2017-11-09T15:36:52Z<p>Alexj: </p>
<hr />
<div><br />
* navigation<br />
** mainpage|mainpage-description<br />
** Anser EMT|Anser EMT<br />
** recentchanges-url|recentchanges<br />
** randompage-url|randompage<br />
** helppage|help<br />
* Anser EMT<br />
**System design|System design<br />
**Signal generator|Signal generator<br />
**AC current amplifier|AC current amplifier<br />
**Field generator|Field generator<br />
**Tracking sensor|Tracking sensor<br />
**Sensor amplifier|Sensor amplifier<br />
**Data acquisition|Data acquisition<br />
**Signal demodulation|Signal demodulation<br />
**Position and orientation algorithm|P&O algorithm<br />
**OpenIGTLink|OpenIGTLink<br />
* SEARCH<br />
* TOOLBOX<br />
* LANGUAGES</div>Alexjhttps://openemt.org/index.php?title=OpenEMT.org&diff=103OpenEMT.org2017-11-03T20:30:45Z<p>Alexj: </p>
<hr />
<div>'''Welcome to OpenEMT.org!'''<br />
<br />
Creating an open source community for electromagnetic tracking systems.<br />
[[File:Bitmap.png|right|500px]]<br />
* IPCAI presentation available [http://anser.io/anserlong.html#/ here]<br />
* Paper available [http://dx.doi.org/10.1007/s11548-017-1568-7 here]<br />
* Open Science Framework webpage available [https://osf.io/47q8q/ here]<br />
<br />
<br />
==Discover Anser EMT==<br />
* Check out the system design [[System design|here]]<br />
* Look at the new design [http://anser.io/img/anser1video.mp4 here]:</div>Alexjhttps://openemt.org/index.php?title=OpenEMT.org&diff=102OpenEMT.org2017-11-03T20:29:23Z<p>Alexj: </p>
<hr />
<div>'''Welcome to OpenEMT.org!'''<br />
<br />
Creating an open source community for electromagnetic tracking systems.<br />
[[File:Bitmap.png|right|500px]]<br />
* IPCAI presentation available [http://anser.io/anserlong.html#/ here]<br />
* Paper available here [http://dx.doi.org/10.1007/s11548-017-1568-7 here]<br />
* Open Science Framework webpage available [https://osf.io/47q8q/ here]<br />
<br />
<br />
==Discover Anser EMT==<br />
* Check out the system design [[System design|here]]<br />
* Look at the new design [http://anser.io/img/anser1video.mp4 here]:</div>Alexjhttps://openemt.org/index.php?title=OpenEMT.org&diff=101OpenEMT.org2017-11-03T20:00:51Z<p>Alexj: </p>
<hr />
<div>'''Welcome to OpenEMT.org!'''<br />
<br />
Creating an open source community for electromagnetic tracking systems.<br />
[[File:Bitmap.png|right|500px]]<br />
* IPCAI presentation available [http://anser.io/anserlong.html#/ here]<br />
* Paper available here [http://dx.doi.org/10.1007/s11548-017-1568-7 here]<br />
* Open Science Framework webpage available [https://osf.io/47q8q/ here]<br />
<br />
<br />
==Discover Anser EMT==<br />
* Check out the system design [[System design|here]]</div>Alexjhttps://openemt.org/index.php?title=System_design&diff=100System design2017-11-03T19:58:57Z<p>Alexj: </p>
<hr />
<div>Anser EMT is an open-source electromagnetic navigation platform for research use. The system can be readily build from the design files provided in this project. This page provides a brief summary of the system design. Detailed implementation details can be found in the wiki.<br />
<br />
The Anser system is comprised of eight systems summarized below:<br />
<br />
<br />
=Overview=<br />
[[File:System.PNG|thumb|600px]]<br />
==Signal generator==<br />
This provides the source signal for the emitter coils of the field generator. Eight individual waveform generators ICs produce a set of sinusoidal signals in to 20kHz band for amplification.<br />
<br />
==AC current amplifier==<br />
A closed loop AC amplifier increases the power gain of the generated sinusoidal signals. This power gain allows the signal to drive the eight emitter coils to produce a time-varying magnetic field.<br />
<br />
==Tracking sensor==<br />
This coil produces a time-varying voltage signal when placed in the working volume of the field generator. The signal is a superposition of voltages induced by the time-varying magnetic field from each emitter coil.<br />
<br />
==Sensor amplifier==<br />
The induced sensor voltage is very weak, on the order of microvolts, and requires filtering and amplification before being sampled. This instrumentation amplifier circuit conditions the signal in preparation for sampling.<br />
<br />
==Data acquisition==<br />
Once conditioned, the tracking sensor is sampled by a data acquisition unit (DAQ). A current sense signal from the emitter coils is also sampled in order to determine the relative phase angle sensor voltage. Anser uses a National Instruments DAQ solution, but alternative/custom solutions may be used instead.<br />
<br />
==Signal demodulation==<br />
The tracked sensor signal and emitter current sense signals are both superpositions of eight frequency components, with each component due to a single emitter coil. Synchronous demodulation in software allows the magnitude and phase of each frequency component to be measured.<br />
<br />
==Position and orientation algorithm==<br />
The magnitude and phase information of each frequency components is fed into the position and orientation algorithm. The algorithm's minimisation process yields the position and orientation of the tracking sensor in space as a 5 degree of freedom vector: <math>[x,y,z,\theta,\varphi]</math></div>Alexjhttps://openemt.org/index.php?title=System_design&diff=99System design2017-11-03T19:58:18Z<p>Alexj: /* Overview */</p>
<hr />
<div>Anser EMT is an open-source electromagnetic navigation platform for research use. The system can be readily build from the design files provided in this project. This page provides a brief summary of the system design. Detailed implementation details can be found in the wiki.<br />
<br />
The Anser system is comprised of eight systems summarized below:<br />
<br />
<br />
=Overview=<br />
[[File:System.PNG|frame|center]]<br />
==Signal generator==<br />
This provides the source signal for the emitter coils of the field generator. Eight individual waveform generators ICs produce a set of sinusoidal signals in to 20kHz band for amplification.<br />
<br />
==AC current amplifier==<br />
A closed loop AC amplifier increases the power gain of the generated sinusoidal signals. This power gain allows the signal to drive the eight emitter coils to produce a time-varying magnetic field.<br />
<br />
==Tracking sensor==<br />
This coil produces a time-varying voltage signal when placed in the working volume of the field generator. The signal is a superposition of voltages induced by the time-varying magnetic field from each emitter coil.<br />
<br />
==Sensor amplifier==<br />
The induced sensor voltage is very weak, on the order of microvolts, and requires filtering and amplification before being sampled. This instrumentation amplifier circuit conditions the signal in preparation for sampling.<br />
<br />
==Data acquisition==<br />
Once conditioned, the tracking sensor is sampled by a data acquisition unit (DAQ). A current sense signal from the emitter coils is also sampled in order to determine the relative phase angle sensor voltage. Anser uses a National Instruments DAQ solution, but alternative/custom solutions may be used instead.<br />
<br />
==Signal demodulation==<br />
The tracked sensor signal and emitter current sense signals are both superpositions of eight frequency components, with each component due to a single emitter coil. Synchronous demodulation in software allows the magnitude and phase of each frequency component to be measured.<br />
<br />
==Position and orientation algorithm==<br />
The magnitude and phase information of each frequency components is fed into the position and orientation algorithm. The algorithm's minimisation process yields the position and orientation of the tracking sensor in space as a 5 degree of freedom vector: <math>[x,y,z,\theta,\varphi]</math></div>Alexjhttps://openemt.org/index.php?title=File:System.PNG&diff=98File:System.PNG2017-11-03T19:57:48Z<p>Alexj: </p>
<hr />
<div></div>Alexjhttps://openemt.org/index.php?title=OpenEMT.org&diff=97OpenEMT.org2017-11-03T19:57:06Z<p>Alexj: </p>
<hr />
<div>'''Welcome to OpenEMT.org!'''<br />
<br />
Creating an open source community for electromagnetic tracking systems.<br />
[[File:Bitmap.png|right|500px]]<br />
* IPCAI presentation available [http://anser.io/anserlong.html#/ here]<br />
* Paper available here [http://dx.doi.org/10.1007/s11548-017-1568-7 here]<br />
* Open Science Framework webpage available [https://osf.io/47q8q/ here]</div>Alexjhttps://openemt.org/index.php?title=File:Bitmap.png&diff=96File:Bitmap.png2017-11-03T19:56:10Z<p>Alexj: </p>
<hr />
<div></div>Alexjhttps://openemt.org/index.php?title=Signal_generator&diff=95Signal generator2017-11-03T19:53:29Z<p>Alexj: </p>
<hr />
<div>The signal generator provides the reference sinusoidal signals for the field generator emitter coils.<br />
<br />
==Waveform generator==<br />
The waveform generator provides the reference sinusoidal signals for each emitter coil of the field generator. The generator comprises of a single Analog Devices [http://www.analog.com/media/en/technical-documentation/data-sheets/AD9833.pdf AD9833] programmable integrated circuit which provides a reference sinewave at a desired frequency. The IC is programmed over the SPI bus using a microcontroller.<br />
<br />
===Programming the AD9833===<br />
The AD9833 synthesises the reference sine waves for each emitter coil. The integrated circuit is programmed over the serial peripheral interface (SPI) using a microcontroller. On powering up the IC needs to be configured to output the required frequency. The AD9833 contains a set of registers which can be written over the SPI interface.<br />
<br />
The desired frequency register value (denoted 'FREQREG' in the datasheet) can be found using the following formula:<br />
<math display="block">\text{FREQREG} = \frac{f_{OUT}\times 2^{28}}{f_{MCLK}}</math><br />
<br />
where <math>f_{OUT}</math> is the desired output frequency of the AD9833 and <math>f_{MCLK}</math> is the frequency of the master clock signal input provided by a clock driver. For example, to program an output frequency of 20.5kHz using a 6MHz master clock signal:<br />
<math display="block">\text{FREQREG} = \frac{20500\times 2^{28}}{6\times10^6} = DFEA2_{16}=11011111111010100010_{2}</math><br />
<br />
The full programming sequence is detailed in the datasheet and [http://www.analog.com/media/en/technical-documentation/application-notes/AN-1070.pdf application note]. Typically a microcontroller platform (for example [https://www.arduino.cc/ Arduino] or [http://energia.nu/ MSP430] is used to program each waveform generator when the system powered-on.<br />
<br />
==Variable gain stage==<br />
The gain stage amplifies the output of the sinewave generator. The output of the AD9833 is capacitively coupled to the input of the [http://www.ti.com/product/TL081 TL081], a general purpose op-amp. The TL081 is configured with a potentiometer to allow the gain of the amplifier to be adjusted.<br />
<br />
[[File:Noninverting.png|400px|frame|Non-inverting amplifier configuration]]<br />
<br />
<math>R1</math> and <math>R2</math> form the feedback resistor network which controls the gain of the amplifier. The voltage gain is calculated using the following formula:<br />
<br />
<math display="block">A=1+\frac{R_2}{R_1}</math><br />
<br />
<math>R2</math> is potentiometer and can be varied to meet the gain requirements of the system. Detailed information regarding the circuit design and layout can be found in the schematics.</div>Alexjhttps://openemt.org/index.php?title=Signal_generator&diff=94Signal generator2017-11-03T19:53:16Z<p>Alexj: </p>
<hr />
<div>The signal generator provides the reference sinusoidal signals for the field generator emitter coils.<br />
<br />
==Waveform generator==<br />
The waveform generator provides the reference sinusoidal signals for each emitter coil of the field generator. The generator comprises of a single Analog Devices [http://www.analog.com/media/en/technical-documentation/data-sheets/AD9833.pdf AD9833] programmable integrated circuit which provides a reference sinewave at a desired frequency. The IC is programmed over the SPI bus using a microcontroller.<br />
<br />
===Programming the AD9833===<br />
The AD9833 synthesises the reference sine waves for each emitter coil. The integrated circuit is programmed over the serial peripheral interface (SPI) using a microcontroller. On powering up the IC needs to be configured to output the required frequency. The AD9833 contains a set of registers which can be written over the SPI interface.<br />
<br />
The desired frequency register value (denoted 'FREQREG' in the datasheet) can be found using the following formula:<br />
<math display="block">\text{FREQREG} = \frac{f_{OUT}\times 2^{28}}{f_{MCLK}}</math><br />
<br />
where <math>f_{OUT}</math> is the desired output frequency of the AD9833 and <math>f_{MCLK}</math> is the frequency of the master clock signal input provided by a clock driver. For example, to program an output frequency of 20.5kHz using a 6MHz master clock signal:<br />
<math display="block">\text{FREQREG} = \frac{20500\times 2^{28}}{6\times10^6} = DFEA2_{16}=11011111111010100010_{2}</math><br />
<br />
The full programming sequence is detailed in the datasheet and [http://www.analog.com/media/en/technical-documentation/application-notes/AN-1070.pdf application note]. Typically a microcontroller platform (for example [https://www.arduino.cc/ Arduino] or [http://energia.nu/ MSP430] is used to program each waveform generator when the system powered-on.<br />
<br />
===Variable gain stage===<br />
The gain stage amplifies the output of the sinewave generator. The output of the AD9833 is capacitively coupled to the input of the [http://www.ti.com/product/TL081 TL081], a general purpose op-amp. The TL081 is configured with a potentiometer to allow the gain of the amplifier to be adjusted.<br />
<br />
[[File:Noninverting.png|400px|frame|Non-inverting amplifier configuration]]<br />
<br />
<math>R1</math> and <math>R2</math> form the feedback resistor network which controls the gain of the amplifier. The voltage gain is calculated using the following formula:<br />
<br />
<math display="block">A=1+\frac{R_2}{R_1}</math><br />
<br />
<math>R2</math> is potentiometer and can be varied to meet the gain requirements of the system. Detailed information regarding the circuit design and layout can be found in the schematics.</div>Alexjhttps://openemt.org/index.php?title=Signal_generator&diff=93Signal generator2017-11-03T19:50:18Z<p>Alexj: </p>
<hr />
<div>The signal generator provides the reference sinusoidal signals for the field generator emitter coils.<br />
<br />
=Waveform generator=<br />
The waveform generator provides the reference sinusoidal signals for each emitter coil of the field generator. The generator comprises of a single Analog Devices [http://www.analog.com/media/en/technical-documentation/data-sheets/AD9833.pdf AD9833] programmable integrated circuit which provides a reference sinewave at a desired frequency. The IC is programmed over the SPI bus using a microcontroller.<br />
<br />
==Programming the AD9833==<br />
The AD9833 synthesises the reference sine waves for each emitter coil. The integrated circuit is programmed over the serial peripheral interface (SPI) using a microcontroller. On powering up the IC needs to be configured to output the required frequency. The AD9833 contains a set of registers which can be written over the SPI interface.<br />
<br />
The desired frequency register value (denoted 'FREQREG' in the datasheet) can be found using the following formula:<br />
<math display="block">\text{FREQREG} = \frac{f_{OUT}\times 2^{28}}{f_{MCLK}}</math><br />
<br />
where <math>f_{OUT}</math> is the desired output frequency of the AD9833 and <math>f_{MCLK}</math> is the frequency of the master clock signal input provided by a clock driver. For example, to program an output frequency of 20.5kHz using a 6MHz master clock signal:<br />
<math display="block">\text{FREQREG} = \frac{20500\times 2^{28}}{6\times10^6} = DFEA2_{16}=11011111111010100010_{2}</math><br />
<br />
The full programming sequence is detailed in the datasheet and [http://www.analog.com/media/en/technical-documentation/application-notes/AN-1070.pdf application note]. Typically a microcontroller platform (for example [https://www.arduino.cc/ Arduino] or [http://energia.nu/ MSP430] is used to program each waveform generator when the system powered-on.<br />
<br />
==Variable gain stage==<br />
The gain stage amplifies the output of the sinewave generator. The output of the AD9833 is capacitively coupled to the input of the [http://www.ti.com/product/TL081 TL081], a general purpose op-amp. The TL081 is configured with a potentiometer to allow the gain of the amplifier to be adjusted.<br />
<br />
[[File:Noninverting.png|400px|frame|Non-inverting amplifier configuration]]<br />
<br />
<math>R1</math> and <math>R2</math> form the feedback resistor network which controls the gain of the amplifier. The voltage gain is calculated using the following formula:<br />
<br />
<math display="block">A=1+\frac{R_2}{R_1}</math><br />
<br />
<math>R2</math> is potentiometer and can be varied to meet the gain requirements of the system. Detailed information regarding the circuit design and layout can be found in the schematics.</div>Alexjhttps://openemt.org/index.php?title=Signal_generator&diff=92Signal generator2017-11-03T19:49:54Z<p>Alexj: </p>
<hr />
<div>The signal generator provides the reference sinusoidal signals for the field generator emitter coils.<br />
<br />
=Waveform generator=<br />
The waveform generator provides the reference sinusoidal signals for each emitter coil of the field generator. The generator comprises of a single Analog Devices [http://www.analog.com/media/en/technical-documentation/data-sheets/AD9833.pdf AD9833] programmable integrated circuit which provides a reference sinewave at a desired frequency. The IC is programmed over the SPI bus using a microcontroller.<br />
<br />
===Programming the AD9833===<br />
The AD9833 synthesises the reference sine waves for each emitter coil. The integrated circuit is programmed over the serial peripheral interface (SPI) using a microcontroller. On powering up the IC needs to be configured to output the required frequency. The AD9833 contains a set of registers which can be written over the SPI interface.<br />
<br />
The desired frequency register value (denoted 'FREQREG' in the datasheet) can be found using the following formula:<br />
<math display="block">\text{FREQREG} = \frac{f_{OUT}\times 2^{28}}{f_{MCLK}}</math><br />
<br />
where <math>f_{OUT}</math> is the desired output frequency of the AD9833 and <math>f_{MCLK}</math> is the frequency of the master clock signal input provided by a clock driver. For example, to program an output frequency of 20.5kHz using a 6MHz master clock signal:<br />
<math display="block">\text{FREQREG} = \frac{20500\times 2^{28}}{6\times10^6} = DFEA2_{16}=11011111111010100010_{2}</math><br />
<br />
The full programming sequence is detailed in the datasheet and [http://www.analog.com/media/en/technical-documentation/application-notes/AN-1070.pdf application note]. Typically a microcontroller platform (for example [https://www.arduino.cc/ Arduino] or [http://energia.nu/ MSP430] is used to program each waveform generator when the system powered-on.<br />
<br />
==Variable gain stage==<br />
The gain stage amplifies the output of the sinewave generator. The output of the AD9833 is capacitively coupled to the input of the [http://www.ti.com/product/TL081 TL081], a general purpose op-amp. The TL081 is configured with a potentiometer to allow the gain of the amplifier to be adjusted.<br />
<br />
[[File:Noninverting.png|400px|frame|Non-inverting amplifier configuration]]<br />
<br />
<math>R1</math> and <math>R2</math> form the feedback resistor network which controls the gain of the amplifier. The voltage gain is calculated using the following formula:<br />
<br />
<math display="block">A=1+\frac{R_2}{R_1}</math><br />
<br />
<math>R2</math> is potentiometer and can be varied to meet the gain requirements of the system. Detailed information regarding the circuit design and layout can be found in the schematics.</div>Alexjhttps://openemt.org/index.php?title=MediaWiki:Sidebar&diff=91MediaWiki:Sidebar2017-11-03T19:48:17Z<p>Alexj: </p>
<hr />
<div><br />
* navigation<br />
** mainpage|mainpage-description<br />
** Anser EMT|Anser EMT<br />
** recentchanges-url|recentchanges<br />
** randompage-url|randompage<br />
** helppage|help<br />
* Anser EMT<br />
**System design|System design<br />
**Signal generator|Signal generator|<br />
**AC current amplifier|AC current amplifier<br />
**Field generator|Field generator<br />
**Tracking sensor|Tracking sensor<br />
**Sensor amplifier|Sensor amplifier<br />
**Data acquisition|Data acquisition<br />
**Signal demodulation|Signal demodulation<br />
**Position and orientation algorithm|P&O algorithm<br />
**OpenIGTLink|OpenIGTLink<br />
* SEARCH<br />
* TOOLBOX<br />
* LANGUAGES</div>Alexjhttps://openemt.org/index.php?title=MediaWiki:Sidebar&diff=90MediaWiki:Sidebar2017-11-03T19:47:38Z<p>Alexj: </p>
<hr />
<div><br />
* navigation<br />
** mainpage|mainpage-description<br />
** Anser EMT|Anser EMT<br />
** recentchanges-url|recentchanges<br />
** randompage-url|randompage<br />
** helppage|help<br />
* Anser EMT| Anser EMT Design<br />
**System design|System design<br />
**Signal generator|Signal generator|<br />
**AC current amplifier|AC current amplifier<br />
**Field generator|Field generator<br />
**Tracking sensor|Tracking sensor<br />
**Sensor amplifier|Sensor amplifier<br />
**Data acquisition|Data acquisition<br />
**Signal demodulation|Signal demodulation<br />
**Position and orientation algorithm|Position and orientation algorithm<br />
**OpenIGTLink|OpenIGTLink<br />
* SEARCH<br />
* TOOLBOX<br />
* LANGUAGES</div>Alexjhttps://openemt.org/index.php?title=MediaWiki:Sidebar&diff=89MediaWiki:Sidebar2017-11-03T19:46:41Z<p>Alexj: </p>
<hr />
<div><br />
* navigation<br />
** mainpage|mainpage-description<br />
** Anser EMT|Anser EMT<br />
** recentchanges-url|recentchanges<br />
** randompage-url|randompage<br />
** helppage|help<br />
* Anser EMT<br />
**System design|<br />
**Signal generator|<br />
**AC current amplifier|<br />
**Field generator|<br />
**Tracking sensor|<br />
**Sensor amplifier|<br />
**Data acquisition|<br />
**Signal demodulation|<br />
**Position and orientation algorithm|<br />
**OpenIGTLink|OpenIGTLink<br />
* SEARCH<br />
* TOOLBOX<br />
* LANGUAGES</div>Alexjhttps://openemt.org/index.php?title=MediaWiki:Sidebar&diff=88MediaWiki:Sidebar2017-11-03T19:45:58Z<p>Alexj: </p>
<hr />
<div><br />
* navigation<br />
** mainpage|mainpage-description<br />
** Anser EMT|Anser EMT<br />
** recentchanges-url|recentchanges<br />
** randompage-url|randompage<br />
** helppage|help<br />
* Anser EMT<br />
**System design<br />
**Signal generator<br />
**AC current amplifier<br />
**Field generator<br />
**Tracking sensor<br />
**Sensor amplifier<br />
**Data acquisition<br />
**Signal demodulation<br />
**Position and orientation algorithm<br />
**OpenIGTLink<br />
* SEARCH<br />
* TOOLBOX<br />
* LANGUAGES</div>Alexjhttps://openemt.org/index.php?title=OpenIGTLink&diff=87OpenIGTLink2017-11-03T19:32:37Z<p>Alexj: Created page with "The OpenIGTLINK is a commonly used communications standard that features in many image guided therapy applications. The standard facilitates the robust transmission and recept..."</p>
<hr />
<div>The OpenIGTLINK is a commonly used communications standard that features in many image guided therapy applications. The standard facilitates the robust transmission and reception of medical data over a computer network. More information regarding the standard can be viewed on the OpenIGTLink homepage (http://openigtlink.org/).<br />
<br />
3DSlicer (https://www.slicer.org/) and MITK (http://mitk.org/wiki/MITK) are medical imaging toolkits that integrate the OpenIGTLink standard. In this work 3D Slicer is used to effectively visualise the position of the Anser system in a 3D environment.</div>Alexjhttps://openemt.org/index.php?title=File:Calibration.PNG&diff=85File:Calibration.PNG2017-11-03T19:29:57Z<p>Alexj: </p>
<hr />
<div></div>Alexjhttps://openemt.org/index.php?title=File:Solver.PNG&diff=83File:Solver.PNG2017-11-03T19:28:28Z<p>Alexj: </p>
<hr />
<div></div>Alexjhttps://openemt.org/index.php?title=Signal_demodulation&diff=78Signal demodulation2017-11-03T19:16:44Z<p>Alexj: </p>
<hr />
<div>Demodulation refers to the extraction of information from a carrier wave. The extracted information is either digital or analog in nature. For example, Wifi transmits digital information on 2.4GHz and 5GHz frequencies, while a typical FM radio transmits analog signals in the form of sound at carrier frequencies between 80-100MHz.<br />
<br />
In the case of Anser EMT, the carrier signals are those transmitted by the eight field emitter coils in the field generator. The extracted information are the magnitudes of each of the received frequency components. The sensor coil detects these carrier frequencies as described in section (5b) and produces a composite signal representing the sum of the received carrier frequencies. Following amplification and sampling, the magnitudes of these carrier signals are extracted using asynchronous demodulation techniques. The position and orientation algorithm compares these magnitudes with the system magnetic field model in order resolve a unique sensor position and orientation.<br />
<br />
==Demodulation theory==<br />
Two modulation schemes are discussed in this section, synchronous and asynchronous methods are discussed. Asynchronous demodulation is the chosen scheme as it provides more information regarding the orientation of the sensor.<br />
<br />
In order to calculate the amplitude of the AC magnetic field experienced by the sensor many techniques are available. Generally, the signals of interest are small in amplitude with relatively large noise levels as well as interference from the other transmitting channels. The most common method to extract the signals of this type is synchronous demodulation, also known as synchronous detection or lock-in amplification<br />
<br />
<br />
===Synchronous demodulation===<br />
<br />
Synchronous demodulation is a method for extracting information from an AC carrier signal. Although asynchronous demodulation is used in Anser, synchronous demodulation illustrates basic concepts that are used in the asynchronous design.<br />
<br />
The amplitude and phase of an AC signal can be calculated through multiplication by a reference signal that is locked in frequency with the original signal. The multiplication by the reference signal, shifts the signal down to a lower frequency, typically DC, which is then easier to accurately measure. The "locking" of frequencies can be implemented in many ways although the simplest is to use the source of the signal as a reference.<br />
<br />
Consider an input signal:<br />
<math display="block">v(t)=V\sin(\omega t + \varphi)</math><br />
<br />
where <math>V</math> is the modulating signal we wish to extract. The amplitude and phase of this signal can be determined by multiplying by two reference signals at the same frequency:<br />
<math display="block">Y(t) = \sin(\omega t)</math><br />
<math display="block">X(t) = \cos(\omega t)</math><br />
<br />
This multiplication result in two quadrature signals:<br />
<br />
<math display="block">v_y(t) = v(t)Y(t) = \frac{V}{2}[\cos(\varphi)-\cos(2\omega t + \varphi)]</math><br />
<math display="block">v_x(t) = v(t)X(t) = \frac{V}{2}[\sin(\varphi)-\sin(2\omega t + \varphi)]</math><br />
<br />
The DC component of the signal is extracted by using an appropriate low-pass filter. The resulting DC values are:<br />
<br />
<math display="block">v'_y(t) = \frac{v}{2}\cos(\varphi)</math><br />
<math display="block">v'_x(t) = \frac{v}{2}\sin(\varphi)</math><br />
<br />
The amplitude of the modulating signal <math>V</math> can be found using:<br />
<math display="block">V = 2\sqrt{(v'_x(t)^2 + v'_y(t)^2)}</math><br />
The phase of the signal can be found using:<br />
<math display="block">\varphi = \arctan\left(\frac{v'_y(t)}{v'_x(t)}\right)</math><br />
<br />
Demodulating using this technique requires <math>Y(t)</math> and <math>X(t)</math> be generated from the reference source. This requires each of the eight coil voltages (20.5kHz, 21.5kHz...) to be individually sampled for processing, requiring an analogue to digital converter with a very high aggregate sampling frequency. Instead, simulated reference signals may be used to generate <math>Y(t)</math>and <math>X(t)</math>which results in asynchronous demodulation.<br />
<br />
<br />
===Asynchronous demodulation===<br />
<br />
Asynchronous demodulation uses simulated reference signals to generate the quadrature signals for demodulation. These simulated signals are '''not''' locked in phase with the signal to be demodulated and can experience frequency mismatch. This results in an increase in the number calculations required when determining the phase and magnitude of the signal of interest, but reduces the number of signals required for sampling.<br />
<br />
Consider a tracking system consisting of N emitting coils, each coil carrying a current component of the following form:<br />
<math display="block">i_i(t) = I_i\sin(\omega_i t + \varphi_{I_i})</math><br />
<br />
where <math>I_i</math> is the amplitude of the <math> i_{th}</math>emitting coil waveform, <math>\omega_i</math> is the excitation frequency and <math>\varphi_i</math> is the current phase relative to an arbitrary reference. Summing all N current waveforms results in:<br />
<br />
<math display="block">i(t) = \sum^N_{i=1} I_i\sin(\omega_i t + \varphi_{I_{i}})</math><br />
<br />
The induced voltage on the sensor is a sum of the voltages induced by the coil currents:<br />
<br />
<math display="block">v(t) = \sum^N_{i=1} V_i\sin(\omega_i t + \varphi_{V_{i}})</math><br />
<br />
where <math>V_i</math> is the amplitude of the induced voltage component and <math> \varphi_{V_i}</math> is the associated phase. Each frequency component of the voltage signal is extracted using two reference signals:<br />
<math display="block">Y_i = \sin(\omega_{ri} t)</math><br />
<math display="block">X_i = \cos(\omega_{ri} t)</math><br />
<br />
where <math>\omega_{ri}</math> is the frequency of the simulated reference signal. This demodulation results in the amplitudes and phases of all the frequency components relative to the simulated reference signal as follows:<br />
<math display="block">\mathbf{V} = [V_1,V_2...V_n]</math><br />
<math display="block">\mathbf{I} = [I_1,I_2...I_n]</math><br />
<math display="block">\mathbf{\varphi_V} = [\varphi_{V_1},\varphi_{V_2}...\varphi_{V_n}]</math><br />
<math display="block">\mathbf{\varphi_I} = [\varphi_{I_1},\varphi_{I_2}...\varphi_{I_n}]</math><br />
<br />
By subtracting the individual phases from each other the relative phase angle between the sensor voltage and coil current waveforms can be found:<br />
<math display="block">\Delta\mathbf{\varphi} = \mathbf{\varphi_V} - \mathbf{\varphi_I}</math><br />
<br />
The sign of this phase information indicates the axial orientation of the electromagnetic sensor with respect to the magnetic field.<br />
<br />
With a simulated reference signal it can be difficult to lock the frequency to the signal source without the use of phase locking techniques. In our system this often results in a small mismatch in frequency since the simulated reference signal for a particular coil <math> \omega_{ri}</math> is slightly different from the frequency to be demodulated <math> \omega_i</math>since they are not locked. This results in a <math> \Delta\omega=\omega_{ri} - \omega_r</math> causing a low frequency oscillation in the demodulated signal, which would not be present in synchronous demodulation.<br />
<br />
To demonstrate this, consider a single frequency where the coil current and sensor voltage waveforms are given by:<br />
<math display="block">i(t) = I\sin(\omega t + \varphi_I)</math><br />
<math display="block">v(t) = V\sin(\omega t + \varphi_V)</math><br />
<br />
The simulated reference signals used for demodulation are given by:<br />
<math display="block">Y(t) = \sin(\omega_r t)</math><br />
<math display="block">X(t) = \cos(\omega_r t)</math><br />
<br />
Starting with the sensor voltage <math>v(t)</math>, we multiply by the reference signals just as in the synchronous case to produce:<br />
<math display="block">v(t)Y(t) = \frac{V}{2}[\cos((\omega-\omega_r) + \varphi_V) - \cos((\omega+\omega_r) + \varphi_V)]</math><br />
<math display="block">v(t)X(t) = \frac{V}{2}[\sin((\omega-\omega_r) + \varphi_V) - \sin((\omega+\omega_r) + \varphi_V)]</math><br />
<br />
Extracting the low frequency components using a low-pass filter yields two quadrature voltage signals:<br />
<math display="block">v_x=\frac{V}{2}\sin(\Delta\omega t + \varphi_V)</math><br />
<math display="block">v_y=\frac{V}{2}\cos(\Delta\omega t + \varphi_V)</math><br />
<br />
where the difference in frequency is given by:<br />
<math display="block">\Delta\omega = \omega-\omega_r</math><br />
<br />
These signals are close to DC since they oscillate at a frequency of <math> \Delta\omega</math>. The amplitude <math> V</math> can be determined as in the synchronous case using:<br />
<math display="block">V = 2\sqrt{(v_x^2 + v_y^2)}</math><br />
The phase can be determined using:<br />
<math display="block">\gamma_V(t) = \arctan\frac{v_x}{v_y} = \Delta\omega t +\varphi_V</math><br />
<br />
Its clear that the phase has a time dependency. This is due to the frequency mismatch of the carrier and reference signals. In order to remove this dependency, the same demodulation procedure above is performed to the coil current waveform i(t) to produce <math> I</math> and <math> \gamma_I</math>. Subtracting the phase component <math> \gamma_V</math> from <math> \gamma_I</math> gives the constant relative phase angle between the two waveforms:<br />
<math display="block">\gamma_V - \gamma_I = \varphi_V-\varphi_I</math><br />
<br />
This 'double demodulation' allows both the accurate retrieval of the amplitude and phase of each of the induced sensor voltages. Implementation details of how this demodulation is achieved are described in the next section.<br />
<br />
<br />
==Demodulation implementation==<br />
<br />
<br />
The asynchronous demodulation process takes place in Matlab using an efficient matrix calculation technique. This method involves recording a number of samples of each signal of interest. This has the advantage of reduced solving time since all samples are available at the time of calculation. This is in contrast to real-time processing where samples are gathered and processed one-by-one in turn.<br />
<br />
The signals of interest we wish to sample are:<br />
<br />
* The induced voltage on the 5-DOF sensor coil(s)<br />
* The composite coil current signal<br />
<br />
Initially we consider the induced voltage on a single sensor that has been discretised through sampling:<br />
<math display="block">x[n] = \sum_{i=1}^N V_i\sin\left(\frac{2 \pi f_i n}{f_s}+\varphi_i\right)</math><br />
<br />
where N is the number of frequency of interest (N = 8, one frequency per emitter coil), <math>f_i</math> is the frequency of interest in hertz, <math>f_s</math> is the sampling frequency of the DAQ, <math>V_i</math> is the amplitude and <math>\varphi_i</math> is an associated phase shift. Collecting and string <math>p</math> points results in a vector <math>\mathbf{X}</math> containing <math>p</math> samples:<br />
<br />
<math display="block">\mathbf{X}=\left[x[0],x[1] ... x[p-1]\right]</math><br />
<br />
In the previous section asynchronous demodulation was discussed. The first step of the demodulation involves multiplying the sampled signal by two sinusoids <math>Y(n)=\sin(2\pi f_{ri} n)</math> and <math>X(n)=\cos(2\pi f_{ri} n)</math>, where <math>f_{ri}</math> is the simulated reference signal close in frequency to <math>f_i</math>. Using Euler's relation we combine <math>X(n)</math> and <math>Y(n)</math> into a single discrete complex sinusoid:<br />
<br />
<math display="block">\cos(2\pi f_{ri}n) + j\sin(2\pi f_{ri} n) = e^{\frac{2 \pi f_{ri} j n }{f_s}}</math><br />
<br />
where <math>j = \sqrt{-1}</math>. This complex exponential encapsulates the two quadrature signal components required for demodulation. Given the <math>N</math>emitter coil frequencies, <math>N</math> complex exponentials are required for the demodulation of each frequency. A <math>p \times N</math> matrix of complex exponentials is created such that when pre-multiplied by <math>\mathbf{X}</math> results in a vector of voltage magnitude:<br />
<br />
<math display="block"> \mathbf{E} = \begin{bmatrix}<br />
\epsilon_i[0] & \dots & \epsilon_N[0] \\<br />
\vdots& \ddots & \vdots \\<br />
\epsilon_i[p-1] & \dots & \epsilon_N[p-1]<br />
\end{bmatrix}</math><br />
where<br />
<math display="block">\epsilon_i[n]=e^{\frac{2 \pi f_{ri} j n }{f_s}}</math><br />
<br />
The row vector of demodulated voltages is given by premultiplying <math>\mathbf{E}</math> by the row vector of <math>p</math> samples:<br />
<math display="block">\mathbf{Y} = [\widetilde{V}_1 ... \widetilde{V}_N] = 2\mathbf{X}\mathbf{E}</math><br />
<br />
<math>\mathbf{Y}</math> is a complex valued row-vector due to the presence of <math>j</math> in the complex exponential calculation. The absolute value of each entry in <math>\mathbf{Y}</math> is the amplitude received frequency of interest, <math>V_i</math>. <br />
<br />
Finite impulse response (FIR filter)<br />
------------------------------------<br />
<br />
A finite impulse response filter is implemented as part of the demodulation step. This low pass FIR filter eliminates unwanted frequency components from the input sample stream <math>mathbf{X}</math>. Consider an FIR filter denoted by <math>f_i</math> with <math>p</math>coefficients (\textit{i.e.} equal to the number of input samples). The output of such a filter can be represented as:<br />
<math display="block">p[n] = \sum_{i=0}^{p-1}f_ix[n-i]</math><br />
<br />
where <math>p[n]</math> is the filtered sample vector and <math>f_i</math> is a single filter tap coefficient. Each filter coefficient can be represented by a single matrix <math>F</math> as shown below:<br />
<math display="block">F = [f_0, f_1, f_2 \dots f_{p-1}]</math><br />
<br />
The FIR filter can be applied to the demodulator by scaling each input sample of <math>X</math> with the corresponding FIR coefficient given by <math>F</math>. This is achieved using an element by element multiplication:<br />
<br />
<math display="block">\mathbf{Y} = 2(\mathbf{X}\circ \mathbf{F})\mathbf{E} </math><br />
<br />
where <math>\circ</math> represents the element-wise multiplication operator.<br />
<br />
The amplitude of each frequency component can be determined by calculating the absolute value of <math>\mathbf{Y}</math>, which is a complex quantity. The phase of <math>\mathbf{Y}</math>an be found using the complex argument of <math>Y</math><br />
<math display="block">[V_1 V_2 \dots V_N] = |\mathbf{Y}|</math><br />
<math display="block">[\varphi_1, \varphi_2 \dots \varphi_N] = \arg(\mathbf{Y})</math><br />
<br />
The implementation of this calculation can be found in the Matlab code provided in the OSF file repository.</div>Alexjhttps://openemt.org/index.php?title=Signal_demodulation&diff=77Signal demodulation2017-11-03T19:15:19Z<p>Alexj: </p>
<hr />
<div>Demodulation refers to the extraction of information from a carrier wave. The extracted information is either digital or analog in nature. For example, Wifi transmits digital information on 2.4GHz and 5GHz frequencies, while a typical FM radio transmits analog signals in the form of sound at carrier frequencies between 80-100MHz.<br />
<br />
In the case of Anser EMT, the carrier signals are those transmitted by the eight field emitter coils in the field generator. The extracted information are the magnitudes of each of the received frequency components. The sensor coil detects these carrier frequencies as described in section (5b) and produces a composite signal representing the sum of the received carrier frequencies. Following amplification and sampling, the magnitudes of these carrier signals are extracted using asynchronous demodulation techniques. The position and orientation algorithm compares these magnitudes with the system magnetic field model in order resolve a unique sensor position and orientation.<br />
<br />
==Demodulation theory==<br />
Two modulation schemes are discussed in this section, synchronous and asynchronous methods are discussed. Asynchronous demodulation is the chosen scheme as it provides more information regarding the orientation of the sensor.<br />
<br />
In order to calculate the amplitude of the AC magnetic field experienced by the sensor many techniques are available. Generally, the signals of interest are small in amplitude with relatively large noise levels as well as interference from the other transmitting channels. The most common method to extract the signals of this type is synchronous demodulation, also known as synchronous detection or lock-in amplification<br />
<br />
<br />
===Synchronous demodulation===<br />
<br />
-------<br />
Synchronous demodulation is a method for extracting information from an AC carrier signal. Although asynchronous demodulation is used in Anser, synchronous demodulation illustrates basic concepts that are used in the asynchronous design.<br />
<br />
The amplitude and phase of an AC signal can be calculated through multiplication by a reference signal that is locked in frequency with the original signal. The multiplication by the reference signal, shifts the signal down to a lower frequency, typically DC, which is then easier to accurately measure. The "locking" of frequencies can be implemented in many ways although the simplest is to use the source of the signal as a reference.<br />
<br />
Consider an input signal:<br />
<math display="block">v(t)=V\sin(\omega t + \varphi)</math><br />
<br />
where <math>V</math> is the modulating signal we wish to extract. The amplitude and phase of this signal can be determined by multiplying by two reference signals at the same frequency:<br />
<math display="block">Y(t) = \sin(\omega t)</math><br />
<math display="block">X(t) = \cos(\omega t)</math><br />
<br />
This multiplication result in two quadrature signals:<br />
<br />
<math display="block">v_y(t) = v(t)Y(t) = \frac{V}{2}[\cos(\varphi)-\cos(2\omega t + \varphi)]</math><br />
<math display="block">v_x(t) = v(t)X(t) = \frac{V}{2}[\sin(\varphi)-\sin(2\omega t + \varphi)]</math><br />
<br />
The DC component of the signal is extracted by using an appropriate low-pass filter. The resulting DC values are:<br />
<br />
<math display="block">v'_y(t) = \frac{v}{2}\cos(\varphi)</math><br />
<math display="block">v'_x(t) = \frac{v}{2}\sin(\varphi)</math><br />
<br />
The amplitude of the modulating signal <math>V</math> can be found using:<br />
<math display="block">V = 2\sqrt{(v'_x(t)^2 + v'_y(t)^2)}</math><br />
The phase of the signal can be found using:<br />
<math display="block">\varphi = \arctan\left(\frac{v'_y(t)}{v'_x(t)}\right)</math><br />
<br />
Demodulating using this technique requires <math>Y(t)</math> and <math>X(t)</math> be generated from the reference source. This requires each of the eight coil voltages (20.5kHz, 21.5kHz...) to be individually sampled for processing, requiring an analogue to digital converter with a very high aggregate sampling frequency. Instead, simulated reference signals may be used to generate <math>Y(t)</math>and <math>X(t)</math>which results in asynchronous demodulation.<br />
<br />
<br />
===Asynchronous demodulation===<br />
<br />
Asynchronous demodulation uses simulated reference signals to generate the quadrature signals for demodulation. These simulated signals are '''not''' locked in phase with the signal to be demodulated and can experience frequency mismatch. This results in an increase in the number calculations required when determining the phase and magnitude of the signal of interest, but reduces the number of signals required for sampling.<br />
<br />
Consider a tracking system consisting of N emitting coils, each coil carrying a current component of the following form:<br />
<math display="block">i_i(t) = I_i\sin(\omega_i t + \varphi_{I_i})</math><br />
<br />
where <math>I_i</math> is the amplitude of the <math> i_{th}</math>emitting coil waveform, <math>\omega_i</math> is the excitation frequency and <math>\varphi_i</math> is the current phase relative to an arbitrary reference. Summing all N current waveforms results in:<br />
<br />
<math display="block">i(t) = \sum^N_{i=1} I_i\sin(\omega_i t + \varphi_{I_{i}})</math><br />
<br />
The induced voltage on the sensor is a sum of the voltages induced by the coil currents:<br />
<br />
<math display="block">v(t) = \sum^N_{i=1} V_i\sin(\omega_i t + \varphi_{V_{i}})</math><br />
<br />
where <math>V_i</math> is the amplitude of the induced voltage component and <math> \varphi_{V_i}</math> is the associated phase. Each frequency component of the voltage signal is extracted using two reference signals:<br />
<math display="block">Y_i = \sin(\omega_{ri} t)</math><br />
<math display="block">X_i = \cos(\omega_{ri} t)</math><br />
<br />
where <math>\omega_{ri}</math> is the frequency of the simulated reference signal. This demodulation results in the amplitudes and phases of all the frequency components relative to the simulated reference signal as follows:<br />
<math display="block">\mathbf{V} = [V_1,V_2...V_n]</math><br />
<math display="block">\mathbf{I} = [I_1,I_2...I_n]</math><br />
<math display="block">\mathbf{\varphi_V} = [\varphi_{V_1},\varphi_{V_2}...\varphi_{V_n}]</math><br />
<math display="block">\mathbf{\varphi_I} = [\varphi_{I_1},\varphi_{I_2}...\varphi_{I_n}]</math><br />
<br />
By subtracting the individual phases from each other the relative phase angle between the sensor voltage and coil current waveforms can be found:<br />
<math display="block">\Delta\mathbf{\varphi} = \mathbf{\varphi_V} - \mathbf{\varphi_I}</math><br />
<br />
The sign of this phase information indicates the axial orientation of the electromagnetic sensor with respect to the magnetic field.<br />
<br />
With a simulated reference signal it can be difficult to lock the frequency to the signal source without the use of phase locking techniques. In our system this often results in a small mismatch in frequency since the simulated reference signal for a particular coil <math> \omega_{ri}</math> is slightly different from the frequency to be demodulated <math> \omega_i</math>since they are not locked. This results in a <math> \Delta\omega=\omega_{ri} - \omega_r</math> causing a low frequency oscillation in the demodulated signal, which would not be present in synchronous demodulation.<br />
<br />
To demonstrate this, consider a single frequency where the coil current and sensor voltage waveforms are given by:<br />
<math display="block">i(t) = I\sin(\omega t + \varphi_I)</math><br />
<math display="block">v(t) = V\sin(\omega t + \varphi_V)</math><br />
<br />
The simulated reference signals used for demodulation are given by:<br />
<math display="block">Y(t) = \sin(\omega_r t)</math><br />
<math display="block">X(t) = \cos(\omega_r t)</math><br />
<br />
Starting with the sensor voltage <math>v(t)</math>, we multiply by the reference signals just as in the synchronous case to produce:<br />
<math display="block">v(t)Y(t) = \frac{V}{2}[\cos((\omega-\omega_r) + \varphi_V) - \cos((\omega+\omega_r) + \varphi_V)]</math><br />
<math display="block">v(t)X(t) = \frac{V}{2}[\sin((\omega-\omega_r) + \varphi_V) - \sin((\omega+\omega_r) + \varphi_V)]</math><br />
<br />
Extracting the low frequency components using a low-pass filter yields two quadrature voltage signals:<br />
<math display="block">v_x=\frac{V}{2}\sin(\Delta\omega t + \varphi_V)</math><br />
<math display="block">v_y=\frac{V}{2}\cos(\Delta\omega t + \varphi_V)</math><br />
<br />
where the difference in frequency is given by:<br />
<math display="block">\Delta\omega = \omega-\omega_r</math><br />
<br />
These signals are close to DC since they oscillate at a frequency of <math> \Delta\omega</math>. The amplitude <math> V</math> can be determined as in the synchronous case using:<br />
<math display="block">V = 2\sqrt{(v_x^2 + v_y^2)}</math><br />
The phase can be determined using:<br />
<math display="block">\gamma_V(t) = \arctan\frac{v_x}{v_y} = \Delta\omega t +\varphi_V</math><br />
<br />
Its clear that the phase has a time dependency. This is due to the frequency mismatch of the carrier and reference signals. In order to remove this dependency, the same demodulation procedure above is performed to the coil current waveform i(t) to produce <math> I</math> and <math> \gamma_I</math>. Subtracting the phase component <math> \gamma_V</math> from <math> \gamma_I</math> gives the constant relative phase angle between the two waveforms:<br />
<math display="block">\gamma_V - \gamma_I = \varphi_V-\varphi_I</math><br />
<br />
This 'double demodulation' allows both the accurate retrieval of the amplitude and phase of each of the induced sensor voltages. Implementation details of how this demodulation is achieved are described in the next section.<br />
<br />
<br />
==Demodulation implementation==<br />
<br />
<br />
The asynchronous demodulation process takes place in Matlab using an efficient matrix calculation technique. This method involves recording a number of samples of each signal of interest. This has the advantage of reduced solving time since all samples are available at the time of calculation. This is in contrast to real-time processing where samples are gathered and processed one-by-one in turn.<br />
<br />
The signals of interest we wish to sample are:<br />
<br />
* The induced voltage on the 5-DOF sensor coil(s)<br />
* The composite coil current signal<br />
<br />
Initially we consider the induced voltage on a single sensor that has been discretised through sampling:<br />
<math display="block">x[n] = \sum_{i=1}^N V_i\sin\left(\frac{2 \pi f_i n}{f_s}+\varphi_i\right)</math><br />
<br />
where N is the number of frequency of interest (N = 8, one frequency per emitter coil), <math>f_i</math> is the frequency of interest in hertz, <math>f_s</math> is the sampling frequency of the DAQ, <math>V_i</math> is the amplitude and <math>\varphi_i</math> is an associated phase shift. Collecting and string <math>p</math> points results in a vector <math>\mathbf{X}</math> containing <math>p</math> samples:<br />
<br />
<math display="block">\mathbf{X}=\left[x[0],x[1] ... x[p-1]\right]</math><br />
<br />
In the previous section asynchronous demodulation was discussed. The first step of the demodulation involves multiplying the sampled signal by two sinusoids <math>Y(n)=\sin(2\pi f_{ri} n)</math> and <math>X(n)=\cos(2\pi f_{ri} n)</math>, where <math>f_{ri}</math> is the simulated reference signal close in frequency to <math>f_i</math>. Using Euler's relation we combine <math>X(n)</math> and <math>Y(n)</math> into a single discrete complex sinusoid:<br />
<br />
<math display="block">\cos(2\pi f_{ri}n) + j\sin(2\pi f_{ri} n) = e^{\frac{2 \pi f_{ri} j n }{f_s}}</math><br />
<br />
where <math>j = \sqrt{-1}</math>. This complex exponential encapsulates the two quadrature signal components required for demodulation. Given the <math>N</math>emitter coil frequencies, <math>N</math> complex exponentials are required for the demodulation of each frequency. A <math>p \times N</math> matrix of complex exponentials is created such that when pre-multiplied by <math>\mathbf{X}</math> results in a vector of voltage magnitude:<br />
<br />
<math display="block"> \mathbf{E} = \begin{bmatrix}<br />
\epsilon_i[0] & \dots & \epsilon_N[0] \\<br />
\vdots& \ddots & \vdots \\<br />
\epsilon_i[p-1] & \dots & \epsilon_N[p-1]<br />
\end{bmatrix}</math><br />
where<br />
<math display="block">\epsilon_i[n]=e^{\frac{2 \pi f_{ri} j n }{f_s}}</math><br />
<br />
The row vector of demodulated voltages is given by premultiplying <math>\mathbf{E}</math> by the row vector of <math>p</math> samples:<br />
<math display="block">\mathbf{Y} = [\widetilde{V}_1 ... \widetilde{V}_N] = 2\mathbf{X}\mathbf{E}</math><br />
<br />
<math>\mathbf{Y}</math> is a complex valued row-vector due to the presence of <math>j</math> in the complex exponential calculation. The absolute value of each entry in <math>\mathbf{Y}</math> is the amplitude received frequency of interest, <math>V_i</math>. <br />
<br />
Finite impulse response (FIR filter)<br />
------------------------------------<br />
<br />
A finite impulse response filter is implemented as part of the demodulation step. This low pass FIR filter eliminates unwanted frequency components from the input sample stream <math>mathbf{X}</math>. Consider an FIR filter denoted by <math>f_i</math> with <math>p</math>coefficients (\textit{i.e.} equal to the number of input samples). The output of such a filter can be represented as:<br />
<math display="block">p[n] = \sum_{i=0}^{p-1}f_ix[n-i]</math><br />
<br />
where <math>p[n]</math> is the filtered sample vector and <math>f_i</math> is a single filter tap coefficient. Each filter coefficient can be represented by a single matrix <math>F</math> as shown below:<br />
<math display="block">F = [f_0, f_1, f_2 \dots f_{p-1}]</math><br />
<br />
The FIR filter can be applied to the demodulator by scaling each input sample of <math>X</math> with the corresponding FIR coefficient given by <math>F</math>. This is achieved using an element by element multiplication:<br />
<br />
<math display="block">\mathbf{Y} = 2(\mathbf{X}\circ \mathbf{F})\mathbf{E} </math><br />
<br />
where <math>\circ</math> represents the element-wise multiplication operator.<br />
<br />
The amplitude of each frequency component can be determined by calculating the absolute value of <math>\mathbf{Y}</math>, which is a complex quantity. The phase of <math>\mathbf{Y}</math>an be found using the complex argument of <math>Y</math><br />
<math display="block">[V_1 V_2 \dots V_N] = |\mathbf{Y}|</math><br />
<math display="block">[\varphi_1, \varphi_2 \dots \varphi_N] = \arg(\mathbf{Y})</math><br />
<br />
The implementation of this calculation can be found in the Matlab code provided in the OSF file repository.</div>Alexjhttps://openemt.org/index.php?title=Signal_demodulation&diff=76Signal demodulation2017-11-03T19:14:14Z<p>Alexj: </p>
<hr />
<div>Demodulation refers to the extraction of information from a carrier wave. The extracted information is either digital or analog in nature. For example, Wifi transmits digital information on 2.4GHz and 5GHz frequencies, while a typical FM radio transmits analog signals in the form of sound at carrier frequencies between 80-100MHz.<br />
<br />
In the case of Anser EMT, the carrier signals are those transmitted by the eight field emitter coils in the field generator. The extracted information are the magnitudes of each of the received frequency components. The sensor coil detects these carrier frequencies as described in section (5b) and produces a composite signal representing the sum of the received carrier frequencies. Following amplification and sampling, the magnitudes of these carrier signals are extracted using asynchronous demodulation techniques. The position and orientation algorithm compares these magnitudes with the system magnetic field model in order resolve a unique sensor position and orientation.<br />
<br />
==Demodulation theory==<br />
Two modulation schemes are discussed in this section, synchronous and asynchronous methods are discussed. Asynchronous demodulation is the chosen scheme as it provides more information regarding the orientation of the sensor.<br />
<br />
In order to calculate the amplitude of the AC magnetic field experienced by the sensor many techniques are available. Generally, the signals of interest are small in amplitude with relatively large noise levels as well as interference from the other transmitting channels. The most common method to extract the signals of this type is synchronous demodulation, also known as synchronous detection or lock-in amplification<br />
<br />
<br />
===Synchronous demodulation===<br />
<br />
-------<br />
Synchronous demodulation is a method for extracting information from an AC carrier signal. Although asynchronous demodulation is used in Anser, synchronous demodulation illustrates basic concepts that are used in the asynchronous design.<br />
<br />
The amplitude and phase of an AC signal can be calculated through multiplication by a reference signal that is locked in frequency with the original signal. The multiplication by the reference signal, shifts the signal down to a lower frequency, typically DC, which is then easier to accurately measure. The "locking" of frequencies can be implemented in many ways although the simplest is to use the source of the signal as a reference.<br />
<br />
Consider an input signal:<br />
<math display="block">v(t)=V\sin(\omega t + \varphi)</math><br />
<br />
where <math>V</math> is the modulating signal we wish to extract. The amplitude and phase of this signal can be determined by multiplying by two reference signals at the same frequency:<br />
<math display="block">Y(t) = \sin(\omega t)</math><br />
<math display="block">X(t) = \cos(\omega t)</math><br />
<br />
This multiplication result in two quadrature signals:<br />
<br />
<math display="block">v_y(t) = v(t)Y(t) = \frac{V}{2}[\cos(\varphi)-\cos(2\omega t + \varphi)]</math><br />
<math display="block">v_x(t) = v(t)X(t) = \frac{V}{2}[\sin(\varphi)-\sin(2\omega t + \varphi)]</math><br />
<br />
The DC component of the signal is extracted by using an appropriate low-pass filter. The resulting DC values are:<br />
<br />
<math display="block">v'_y(t) = \frac{v}{2}\cos(\varphi)</math><br />
<math display="block">v'_x(t) = \frac{v}{2}\sin(\varphi)</math><br />
<br />
The amplitude of the modulating signal <math>V</math> can be found using:<br />
<math display="block">V = 2\sqrt{(v'_x(t)^2 + v'_y(t)^2)}</math><br />
The phase of the signal can be found using:<br />
<math display="block">\varphi = \arctan\left(\frac{v'_y(t)}{v'_x(t)}\right)</math><br />
<br />
Demodulating using this technique requires <math>Y(t)</math> and <math>X(t)</math> be generated from the reference source. This requires each of the eight coil voltages (20.5kHz, 21.5kHz...) to be individually sampled for processing, requiring an analogue to digital converter with a very high aggregate sampling frequency. Instead, simulated reference signals may be used to generate <math>Y(t)</math>and <math>X(t)</math>which results in asynchronous demodulation.<br />
<br />
<br />
===Asynchronous demodulation===<br />
<br />
Asynchronous demodulation uses simulated reference signals to generate the quadrature signals for demodulation. These simulated signals are '''not''' locked in phase with the signal to be demodulated and can experience frequency mismatch. This results in an increase in the number calculations required when determining the phase and magnitude of the signal of interest, but reduces the number of signals required for sampling.<br />
<br />
Consider a tracking system consisting of N emitting coils, each coil carrying a current component of the following form:<br />
<math display="block">i_i(t) = I_i\sin(\omega_i t + \varphi_{I_i})</math><br />
<br />
where <math>I_i</math> is the amplitude of the <math> i_{th}</math>emitting coil waveform, <math>\omega_i</math> is the excitation frequency and <math>\varphi_i</math> is the current phase relative to an arbitrary reference. Summing all N current waveforms results in:<br />
<br />
<math display="block">i(t) = \sum^N_{i=1} I_i\sin(\omega_i t + \varphi_{I_{i}})</math><br />
<br />
The induced voltage on the sensor is a sum of the voltages induced by the coil currents:<br />
<br />
<math display="block">v(t) = \sum^N_{i=1} V_i\sin(\omega_i t + \varphi_{V_{i}})</math><br />
<br />
where <math>V_i</math> is the amplitude of the induced voltage component and <math> \varphi_{V_i}</math> is the associated phase. Each frequency component of the voltage signal is extracted using two reference signals:<br />
<math display="block">Y_i = \sin(\omega_{ri} t)</math><br />
<math display="block">X_i = \cos(\omega_{ri} t)</math><br />
<br />
where <math>\omega_{ri}</math> is the frequency of the simulated reference signal. This demodulation results in the amplitudes and phases of all the frequency components relative to the simulated reference signal as follows:<br />
<math display="block">\mathbf{V} = [V_1,V_2...V_n]</math><br />
<math display="block">\mathbf{I} = [I_1,I_2...I_n]</math><br />
<math display="block">\mathbf{\varphi_V} = [\varphi_{V_1},\varphi_{V_2}...\varphi_{V_n}]</math><br />
<math display="block">\mathbf{\varphi_I} = [\varphi_{I_1},\varphi_{I_2}...\varphi_{I_n}]</math><br />
<br />
By subtracting the individual phases from each other the relative phase angle between the sensor voltage and coil current waveforms can be found:<br />
<math display="block">\Delta\mathbf{\varphi} = \mathbf{\varphi_V} - \mathbf{\varphi_I}</math><br />
<br />
The sign of this phase information indicates the axial orientation of the electromagnetic sensor with respect to the magnetic field.<br />
<br />
With a simulated reference signal it can be difficult to lock the frequency to the signal source without the use of phase locking techniques. In our system this often results in a small mismatch in frequency since the simulated reference signal for a particular coil <math> \omega_{ri}</math> is slightly different from the frequency to be demodulated <math> \omega_i</math>since they are not locked. This results in a <math> \Delta\omega=\omega_{ri} - \omega_r</math> causing a low frequency oscillation in the demodulated signal, which would not be present in synchronous demodulation.<br />
<br />
To demonstrate this, consider a single frequency where the coil current and sensor voltage waveforms are given by:<br />
<math display="block">i(t) = I\sin(\omega t + \varphi_I)</math><br />
<math display="block">v(t) = V\sin(\omega t + \varphi_V)</math><br />
<br />
The simulated reference signals used for demodulation are given by:<br />
<math display="block">Y(t) = \sin(\omega_r t)</math><br />
<math display="block">X(t) = \cos(\omega_r t)</math><br />
<br />
Starting with the sensor voltage <math>v(t)</math>, we multiply by the reference signals just as in the synchronous case to produce:<br />
<math display="block">v(t)Y(t) = \frac{V}{2}[\cos((\omega-\omega_r) + \varphi_V) - \cos((\omega+\omega_r) + \varphi_V)]</math><br />
<math display="block">v(t)X(t) = \frac{V}{2}[\sin((\omega-\omega_r) + \varphi_V) - \sin((\omega+\omega_r) + \varphi_V)]</math><br />
<br />
Extracting the low frequency components using a low-pass filter yields two quadrature voltage signals:<br />
<math display="block">v_x=\frac{V}{2}\sin(\Delta\omega t + \varphi_V)</math><br />
<math display="block">v_y=\frac{V}{2}\cos(\Delta\omega t + \varphi_V)</math><br />
<br />
where the difference in frequency is given by:<br />
<math display="block">\Delta\omega = \omega-\omega_r</math><br />
<br />
These signals are close to DC since they oscillate at a frequency of <math> \Delta\omega</math>. The amplitude <math> V</math> can be determined as in the synchronous case using:<br />
<math display="block">V = 2\sqrt{(v_x^2 + v_y^2)}</math><br />
The phase can be determined using:<br />
<math display="block">\gamma_V(t) = \arctan\frac{v_x}{v_y} = \Delta\omega t +\varphi_V</math><br />
<br />
Its clear that the phase has a time dependency. This is due to the frequency mismatch of the carrier and reference signals. In order to remove this dependency, the same demodulation procedure above is performed to the coil current waveform i(t) to produce <math> I</math> and <math> \gamma_I</math>. Subtracting the phase component <math> \gamma_V</math> from <math> \gamma_I</math> gives the constant relative phase angle between the two waveforms:<br />
<math display="block">\gamma_V - \gamma_I = \varphi_V-\varphi_I</math><br />
<br />
This 'double demodulation' allows both the accurate retrieval of the amplitude and phase of each of the induced sensor voltages. Implementation details of how this demodulation is achieved are described in the next section.<br />
<br />
<br />
==Demodulation implementation==<br />
<br />
<br />
The asynchronous demodulation process takes place in Matlab using an efficient matrix calculation technique. This method involves recording a number of samples of each signal of interest. This has the advantage of reduced solving time since all samples are available at the time of calculation. This is in contrast to real-time processing where samples are gathered and processed one-by-one in turn.<br />
<br />
The signals of interest we wish to sample are:<br />
<br />
* The induced voltage on the 5-DOF sensor coil(s)<br />
* The composite coil current signal<br />
<br />
Initially we consider the induced voltage on a single sensor that has been discretised through sampling:<br />
<math display="block">x[n] = \sum_{i=1}^N V_i\sin\left(\frac{2 \pi f_i n}{f_s}+\varphi_i\right)</math><br />
<br />
where N is the number of frequency of interest (N = 8, one frequency per emitter coil), <math>f_i</math> is the frequency of interest in hertz, <math>f_s</math> is the sampling frequency of the DAQ, <math>V_i</math> is the amplitude and <math>\varphi_i</math> is an associated phase shift. Collecting and string <math>p</math> points results in a vector <math>\mathbf{X}</math> containing <math>p</math> samples:<br />
<br />
<math display="block">\mathbf{X}=\left[x[0],x[1] ... x[p-1]\right]</math><br />
<br />
In the previous section asynchronous demodulation was discussed. The first step of the demodulation involves multiplying the sampled signal by two sinusoids <math>Y(n)=\sin(2\pi f_{ri} n)</math> and <math>X(n)=\cos(2\pi f_{ri} n)</math>, where <math>f_{ri}</math> is the simulated reference signal close in frequency to <math>f_i</math>. Using Euler's relation we combine <math>X(n)</math> and <math>Y(n)</math> into a single discrete complex sinusoid:<br />
<br />
<math display="block">\cos(2\pi f_{ri}n) + j\sin(2\pi f_{ri} n) = e^{\frac{2 \pi f_{ri} j n }{f_s}}</math><br />
<br />
where <math>j = \sqrt{-1}</math>. This complex exponential encapsulates the two quadrature signal components required for demodulation. Given the <math>N</math>emitter coil frequencies, <math>N</math> complex exponentials are required for the demodulation of each frequency. A <math>p \times N</math> matrix of complex exponentials is created such that when pre-multiplied by <math>\mathbf{X}</math> results in a vector of voltage magnitude:<br />
<br />
<math display="block"> \mathbf{E} = \begin{bmatrix}<br />
\epsilon_i[0] & \dots & \epsilon_N[0] \\<br />
\vdots& \ddots & \vdots \\<br />
\epsilon_i[p-1] & \dots & \epsilon_N[p-1]<br />
\end{bmatrix}</math><br />
where<br />
<math display="block">\epsilon_i[n]=e^{\frac{2 \pi f_{ri} j n }{f_s}}</math><br />
<br />
The row vector of demodulated voltages is given by premultiplying <math>\mathbf{E}</math> by the row vector of <math>p</math> samples:<br />
<math display="block">\mathbf{Y} = [\widetilde{V}_1 ... \widetilde{V}_N] = 2\mathbf{X}\mathbf{E}</math><br />
<br />
<math>\mathbf{Y}</math> is a complex valued row-vector due to the presence of <math>j</math> in the complex exponential calculation. The absolute value of each entry in <math>\mathbf{Y}</math> is the amplitude received frequency of interest, <math>V_i</math>. <br />
<br />
Finite impulse response (FIR filter)<br />
------------------------------------<br />
<br />
A finite impulse response filter is implemented as part of the demodulation step. This low pass FIR filter eliminates unwanted frequency components from the input sample stream <math>mathbf{X}</math>. Consider an FIR filter denoted by <math>f_i</math> with <math>p</math>coefficients (\textit{i.e.} equal to the number of input samples). The output of such a filter can be represented as:<br />
<math display="block">p[n] = \sum_{i=0}^{p-1}f_ix[n-i]</math><br />
<br />
where <math>p[n]</math> is the filtered sample vector and <math>f_i</math> is a single filter tap coefficient. Each filter coefficient can be represented by a single matrix <math>F</math> as shown below:<br />
<math display="block">F = [f_0, f_1, f_2 \dots f_{p-1}]</math><br />
<br />
The FIR filter can be applied to the demodulator by scaling each input sample of <math>X</math> with the corresponding FIR coefficient given by <math>F</math>. This is achieved using an element by element multiplication:<br />
<br />
<math display="block">\mathbf{Y} = 2(\mathbf{X}\circ \mathbf{F})\mathbf{E} </math><br />
<br />
where <math>\circ</math>represents the element-wise multiplication operator.<br />
<br />
The amplitude of each frequency component can be determined by calculating the absolute value of <math>\mathbf{Y}</math>, which is a complex quantity. The phase of <math>\mathbf{Y}</math>an be found using the complex argument of <math>Y</math><br />
<math display="block">[V_1 V_2 \dots V_N] = |\mathbf{Y}|</math><br />
<math display="block">[\varphi_1, \varphi_2 \dots \varphi_N] = \arg(\mathbf{Y})</math><br />
<br />
The implementation of this calculation can be found in the Matlab code provided in the OSF file repository.</div>Alexjhttps://openemt.org/index.php?title=Signal_demodulation&diff=75Signal demodulation2017-11-03T19:10:27Z<p>Alexj: </p>
<hr />
<div>Demodulation refers to the extraction of information from a carrier wave. The extracted information is either digital or analog in nature. For example, Wifi transmits digital information on 2.4GHz and 5GHz frequencies, while a typical FM radio transmits analog signals in the form of sound at carrier frequencies between 80-100MHz.<br />
<br />
In the case of Anser EMT, the carrier signals are those transmitted by the eight field emitter coils in the field generator. The extracted information are the magnitudes of each of the received frequency components. The sensor coil detects these carrier frequencies as described in section (5b) and produces a composite signal representing the sum of the received carrier frequencies. Following amplification and sampling, the magnitudes of these carrier signals are extracted using asynchronous demodulation techniques. The position and orientation algorithm compares these magnitudes with the system magnetic field model in order resolve a unique sensor position and orientation.<br />
<br />
==Demodulation theory==<br />
Two modulation schemes are discussed in this section, synchronous and asynchronous methods are discussed. Asynchronous demodulation is the chosen scheme as it provides more information regarding the orientation of the sensor.<br />
<br />
In order to calculate the amplitude of the AC magnetic field experienced by the sensor many techniques are available. Generally, the signals of interest are small in amplitude with relatively large noise levels as well as interference from the other transmitting channels. The most common method to extract the signals of this type is synchronous demodulation, also known as synchronous detection or lock-in amplification<br />
<br />
<br />
===Synchronous demodulation===<br />
<br />
-------<br />
Synchronous demodulation is a method for extracting information from an AC carrier signal. Although asynchronous demodulation is used in Anser, synchronous demodulation illustrates basic concepts that are used in the asynchronous design.<br />
<br />
The amplitude and phase of an AC signal can be calculated through multiplication by a reference signal that is locked in frequency with the original signal. The multiplication by the reference signal, shifts the signal down to a lower frequency, typically DC, which is then easier to accurately measure. The "locking" of frequencies can be implemented in many ways although the simplest is to use the source of the signal as a reference.<br />
<br />
Consider an input signal:<br />
<math display="block">v(t)=V\sin(\omega t + \varphi)</math><br />
<br />
where <math>V</math> is the modulating signal we wish to extract. The amplitude and phase of this signal can be determined by multiplying by two reference signals at the same frequency:<br />
<math display="block">Y(t) = \sin(\omega t)</math><br />
<math display="block">X(t) = \cos(\omega t)</math><br />
<br />
This multiplication result in two quadrature signals:<br />
<br />
<math display="block">v_y(t) = v(t)Y(t) = \frac{V}{2}[\cos(\varphi)-\cos(2\omega t + \varphi)]</math><br />
<math display="block">v_x(t) = v(t)X(t) = \frac{V}{2}[\sin(\varphi)-\sin(2\omega t + \varphi)]</math><br />
<br />
The DC component of the signal is extracted by using an appropriate low-pass filter. The resulting DC values are:<br />
<br />
<math display="block">v'_y(t) = \frac{v}{2}\cos(\varphi)</math><br />
<math display="block">v'_x(t) = \frac{v}{2}\sin(\varphi)</math><br />
<br />
The amplitude of the modulating signal <math>V</math> can be found using:<br />
<math display="block">V = 2\sqrt{(v'_x(t)^2 + v'_y(t)^2)}</math><br />
The phase of the signal can be found using:<br />
<math display="block">\varphi = \arctan\left(\frac{v'_y(t)}{v'_x(t)}\right)</math><br />
<br />
Demodulating using this technique requires <math>Y(t)</math> and <math>X(t)</math> be generated from the reference source. This requires each of the eight coil voltages (20.5kHz, 21.5kHz...) to be individually sampled for processing, requiring an analogue to digital converter with a very high aggregate sampling frequency. Instead, simulated reference signals may be used to generate <math>Y(t)</math>and <math>X(t)</math>which results in asynchronous demodulation.<br />
<br />
<br />
===Asynchronous demodulation===<br />
<br />
Asynchronous demodulation uses simulated reference signals to generate the quadrature signals for demodulation. These simulated signals are '''not''' locked in phase with the signal to be demodulated and can experience frequency mismatch. This results in an increase in the number calculations required when determining the phase and magnitude of the signal of interest, but reduces the number of signals required for sampling.<br />
<br />
Consider a tracking system consisting of N emitting coils, each coil carrying a current component of the following form:<br />
<math display="block">i_i(t) = I_i\sin(\omega_i t + \varphi_{I_i})</math><br />
<br />
where <math>I_i</math> is the amplitude of the <math> i_{th}</math>emitting coil waveform, <math>\omega_i</math> is the excitation frequency and <math>\varphi_i</math> is the current phase relative to an arbitrary reference. Summing all N current waveforms results in:<br />
<br />
<math display="block">i(t) = \sum^N_{i=1} I_i\sin(\omega_i t + \varphi_{I_{i}})</math><br />
<br />
The induced voltage on the sensor is a sum of the voltages induced by the coil currents:<br />
<br />
<math display="block">v(t) = \sum^N_{i=1} V_i\sin(\omega_i t + \varphi_{V_{i}})</math><br />
<br />
where <math>V_i</math> is the amplitude of the induced voltage component and <math> \varphi_{V_i}</math> is the associated phase. Each frequency component of the voltage signal is extracted using two reference signals:<br />
<math display="block">Y_i = \sin(\omega_{ri} t)</math><br />
<math display="block">X_i = \cos(\omega_{ri} t)</math><br />
<br />
where <math>\omega_{ri}</math> is the frequency of the simulated reference signal. This demodulation results in the amplitudes and phases of all the frequency components relative to the simulated reference signal as follows:<br />
<math display="block">\mathbf{V} = [V_1,V_2...V_n]</math><br />
<math display="block">\mathbf{I} = [I_1,I_2...I_n]</math><br />
<math display="block">\mathbf{\varphi_V} = [\varphi_{V_1},\varphi_{V_2}...\varphi_{V_n}]</math><br />
<math display="block">\mathbf{\varphi_I} = [\varphi_{I_1},\varphi_{I_2}...\varphi_{I_n}]</math><br />
<br />
By subtracting the individual phases from each other the relative phase angle between the sensor voltage and coil current waveforms can be found:<br />
<math display="block">\Delta\mathbf{\varphi} = \mathbf{\varphi_V} - \mathbf{\varphi_I}</math><br />
<br />
The sign of this phase information indicates the axial orientation of the electromagnetic sensor with respect to the magnetic field.<br />
<br />
With a simulated reference signal it can be difficult to lock the frequency to the signal source without the use of phase locking techniques. In our system this often results in a small mismatch in frequency since the simulated reference signal for a particular coil <math> \omega_{ri}</math> is slightly different from the frequency to be demodulated <math> \omega_i</math>since they are not locked. This results in a <math> \Delta\omega=\omega_{ri} - \omega_r</math> causing a low frequency oscillation in the demodulated signal, which would not be present in synchronous demodulation.<br />
<br />
To demonstrate this, consider a single frequency where the coil current and sensor voltage waveforms are given by:<br />
<math display="block">i(t) = I\sin(\omega t + \varphi_I)</math><br />
<math display="block">v(t) = V\sin(\omega t + \varphi_V)</math><br />
<br />
The simulated reference signals used for demodulation are given by:<br />
<math display="block">Y(t) = \sin(\omega_r t)</math><br />
<math display="block">X(t) = \cos(\omega_r t)</math><br />
<br />
Starting with the sensor voltage <math>v(t)</math>, we multiply by the reference signals just as in the synchronous case to produce:<br />
<math display="block">v(t)Y(t) = \frac{V}{2}[\cos((\omega-\omega_r) + \varphi_V) - \cos((\omega+\omega_r) + \varphi_V)]</math><br />
<math display="block">v(t)X(t) = \frac{V}{2}[\sin((\omega-\omega_r) + \varphi_V) - \sin((\omega+\omega_r) + \varphi_V)]</math><br />
<br />
Extracting the low frequency components using a low-pass filter yields two quadrature voltage signals:<br />
<math display="block">v_x=\frac{V}{2}\sin(\Delta\omega t + \varphi_V)</math><br />
<math display="block">v_y=\frac{V}{2}\cos(\Delta\omega t + \varphi_V)</math><br />
<br />
where the difference in frequency is given by:<br />
<math display="block">\Delta\omega = \omega-\omega_r</math><br />
<br />
These signals are close to DC since they oscillate at a frequency of <math> \Delta\omega</math>. The amplitude <math> V</math> can be determined as in the synchronous case using:<br />
<math display="block">V = 2\sqrt{(v_x^2 + v_y^2)}</math><br />
The phase can be determined using:<br />
<math display="block">\gamma_V(t) = \arctan\frac{v_x}{v_y} = \Delta\omega t +\varphi_V</math><br />
<br />
Its clear that the phase has a time dependency. This is due to the frequency mismatch of the carrier and reference signals. In order to remove this dependency, the same demodulation procedure above is performed to the coil current waveform i(t) to produce <math> I</math> and <math> \gamma_I</math>. Subtracting the phase component <math> \gamma_V</math> from <math> \gamma_I</math> gives the constant relative phase angle between the two waveforms:<br />
<math display="block">\gamma_V - \gamma_I = \varphi_V-\varphi_I</math><br />
<br />
This 'double demodulation' allows both the accurate retrieval of the amplitude and phase of each of the induced sensor voltages. Implementation details of how this demodulation is achieved are described in the next section.<br />
<br />
<br />
==Demodulation implementation==<br />
<br />
**Demodulation implementation**<br />
=======<br />
<br />
The asynchronous demodulation process takes place in Matlab using an efficient matrix calculation technique. This method involves recording a number of samples of each signal of interest. This has the advantage of reduced solving time since all samples are available at the time of calculation. This is in contrast to real-time processing where samples are gathered and processed one-by-one in turn.<br />
<br />
The signals of interest we wish to sample are:<br />
<br />
1. The induced voltage on the 5-DOF sensor coil(s)<br />
2. The composite coil current signal<br />
<br />
Initially we consider the induced voltage on a single sensor that has been discretised through sampling:<br />
<math display="block">x[n] = \sum_{i=1}^N V_i\sin\left(\frac{2 \pi f_i n}{f_s}+\varphi_i\right)</math><br />
<br />
where N is the number of frequency of interest (N = 8, one frequency per emitter coil), <math>f_i</math> is the frequency of interest in hertz, <math>f_s</math> is the sampling frequency of the DAQ, <math>V_i</math> is the amplitude and <math>\varphi_i</math> is an associated phase shift. Collecting and string <math>p</math> points results in a vector <math>\mathbf{X}</math> containing <math>p</math> samples:<br />
<br />
<math display="block">\mathbf{X}=\left[x[0],x[1] ... x[p-1]\right]</math><br />
<br />
In the previous section asynchronous demodulation was discussed. The first step of the demodulation involves multiplying the sampled signal by two sinusoids <math>Y(n)=\sin(2\pi f_{ri} n)</math> and <math>X(n)=\cos(2\pi f_{ri} n)</math>, where <math>f_{ri}</math> is the simulated reference signal close in frequency to <math>f_i</math>. Using Euler's relation we combine <math>X(n)</math> and <math>Y(n)</math> into a single discrete complex sinusoid:<br />
<br />
<math display="block">\cos(2\pi f_{ri}n) + j\sin(2\pi f_{ri} n) = e^{\frac{2 \pi f_{ri} j n }{f_s}}</math><br />
<br />
where <math>j = \sqrt{-1}</math>. This complex exponential encapsulates the two quadrature signal components required for demodulation. Given the <math>N</math>emitter coil frequencies, <math>N</math> complex exponentials are required for the demodulation of each frequency. A <math>p \times N</math> matrix of complex exponentials is created such that when pre-multiplied by <math>\mathbf{X}</math> results in a vector of voltage magnitude:<br />
<br />
<math display="block"> \mathbf{E} = \begin{bmatrix}<br />
\epsilon_i[0] & \dots & \epsilon_N[0] \newline<br />
\vdots& \ddots & \vdots \newline<br />
\epsilon_i[p-1] & \dots & \epsilon_N[p-1]<br />
\end{bmatrix}</math><br />
where<br />
<math display="block">\epsilon_i[n]=e^{\frac{2 \pi f_{ri} j n }{f_s}}</math><br />
<br />
The row vector of demodulated voltages is given by premultiplying <math>\mathbf{E}</math> by the row vector of <math>p</math> samples:<br />
<math display="block">\mathbf{Y} = [\widetilde{V}_1 ... \widetilde{V}_N] = 2\mathbf{X}\mathbf{E}</math><br />
<br />
<math>\mathbf{Y}</math> is a complex valued row-vector due to the presence of <math>j</math> in the complex exponential calculation. The absolute value of each entry in <math>\mathbf{Y}</math> is the amplitude received frequency of interest, <math>V_i</math>. <br />
<br />
Finite impulse response (FIR filter)<br />
------------------------------------<br />
<br />
A finite impulse response filter is implemented as part of the demodulation step. This low pass FIR filter eliminates unwanted frequency components from the input sample stream <math>mathbf{X}</math>. Consider an FIR filter denoted by <math>f_i</math> with <math>p</math>coefficients (\textit{i.e.} equal to the number of input samples). The output of such a filter can be represented as:<br />
<math display="block">p[n] = \sum_{i=0}^{p-1}f_ix[n-i]</math><br />
<br />
where <math>p[n]</math> is the filtered sample vector and <math>f_i</math> is a single filter tap coefficient. Each filter coefficient can be represented by a single matrix <math>F</math> as shown below:<br />
<math display="block">F = [f_0, f_1, f_2 \dots f_{p-1}]</math><br />
<br />
The FIR filter can be applied to the demodulator by scaling each input sample of <math>X</math> with the corresponding FIR coefficient given by <math>F</math>. This is achieved using an element by element multiplication:<br />
<br />
<math display="block">\mathbf{Y} = 2(\mathbf{X}\circ \mathbf{F})\mathbf{E} </math><br />
<br />
where <math>\circ</math>represents the element-wise multiplication operator.<br />
<br />
The amplitude of each frequency component can be determined by calculating the absolute value of <math>\mathbf{Y}</math>, which is a complex quantity. The phase of <math>\mathbf{Y}</math>an be found using the complex argument of <math>Y</math><br />
<math display="block">[V_1 V_2 \dots V_N] = |\mathbf{Y}|</math><br />
<math display="block">[\varphi_1, \varphi_2 \dots \varphi_N] = \arg(\mathbf{Y})</math><br />
<br />
The implementation of this calculation can be found in the Matlab code provided in the OSF file repository.</div>Alexjhttps://openemt.org/index.php?title=Signal_demodulation&diff=74Signal demodulation2017-11-03T19:09:13Z<p>Alexj: </p>
<hr />
<div>Demodulation refers to the extraction of information from a carrier wave. The extracted information is either digital or analog in nature. For example, Wifi transmits digital information on 2.4GHz and 5GHz frequencies, while a typical FM radio transmits analog signals in the form of sound at carrier frequencies between 80-100MHz.<br />
<br />
In the case of Anser EMT, the carrier signals are those transmitted by the eight field emitter coils in the field generator. The extracted information are the magnitudes of each of the received frequency components. The sensor coil detects these carrier frequencies as described in section (5b) and produces a composite signal representing the sum of the received carrier frequencies. Following amplification and sampling, the magnitudes of these carrier signals are extracted using asynchronous demodulation techniques. The position and orientation algorithm compares these magnitudes with the system magnetic field model in order resolve a unique sensor position and orientation.<br />
<br />
==Demodulation theory==<br />
Two modulation schemes are discussed in this section, synchronous and asynchronous methods are discussed. Asynchronous demodulation is the chosen scheme as it provides more information regarding the orientation of the sensor.<br />
<br />
In order to calculate the amplitude of the AC magnetic field experienced by the sensor many techniques are available. Generally, the signals of interest are small in amplitude with relatively large noise levels as well as interference from the other transmitting channels. The most common method to extract the signals of this type is synchronous demodulation, also known as synchronous detection or lock-in amplification<br />
<br />
<br />
===Synchronous demodulation===<br />
<br />
-------<br />
Synchronous demodulation is a method for extracting information from an AC carrier signal. Although asynchronous demodulation is used in Anser, synchronous demodulation illustrates basic concepts that are used in the asynchronous design.<br />
<br />
The amplitude and phase of an AC signal can be calculated through multiplication by a reference signal that is locked in frequency with the original signal. The multiplication by the reference signal, shifts the signal down to a lower frequency, typically DC, which is then easier to accurately measure. The "locking" of frequencies can be implemented in many ways although the simplest is to use the source of the signal as a reference.<br />
<br />
Consider an input signal:<br />
<math display="block">v(t)=V\sin(\omega t + \varphi)</math><br />
<br />
where <math>V</math> is the modulating signal we wish to extract. The amplitude and phase of this signal can be determined by multiplying by two reference signals at the same frequency:<br />
<math display="block">Y(t) = \sin(\omega t)</math><br />
<math display="block">X(t) = \cos(\omega t)</math><br />
<br />
This multiplication result in two quadrature signals:<br />
<br />
<math display="block">v_y(t) = v(t)Y(t) = \frac{V}{2}[\cos(\varphi)-\cos(2\omega t + \varphi)]</math><br />
<math display="block">v_x(t) = v(t)X(t) = \frac{V}{2}[\sin(\varphi)-\sin(2\omega t + \varphi)]</math><br />
<br />
The DC component of the signal is extracted by using an appropriate low-pass filter. The resulting DC values are:<br />
<br />
<math display="block">v'_y(t) = \frac{v}{2}\cos(\varphi)</math><br />
<math display="block">v'_x(t) = \frac{v}{2}\sin(\varphi)</math><br />
<br />
The amplitude of the modulating signal $V$ can be found using:<br />
<math display="block">V = 2\sqrt{(v'_x(t)^2 + v'_y(t)^2)}</math><br />
The phase of the signal can be found using:<br />
<math display="block">\varphi = \arctan\left(\frac{v'_y(t)}{v'_x(t)}\right)</math><br />
<br />
Demodulating using this technique requires <math>Y(t)</math> and <math>X(t)</math> be generated from the reference source. This requires each of the eight coil voltages (20.5kHz, 21.5kHz...) to be individually sampled for processing, requiring an analogue to digital converter with a very high aggregate sampling frequency. Instead, simulated reference signals may be used to generate <math>Y(t)</math>and <math>X(t)</math>which results in asynchronous demodulation.<br />
<br />
<br />
===Asynchronous demodulation===<br />
<br />
Asynchronous demodulation uses simulated reference signals to generate the quadrature signals for demodulation. These simulated signals are '''not''' locked in phase with the signal to be demodulated and can experience frequency mismatch. This results in an increase in the number calculations required when determining the phase and magnitude of the signal of interest, but reduces the number of signals required for sampling.<br />
<br />
Consider a tracking system consisting of N emitting coils, each coil carrying a current component of the following form:<br />
<math display="block">i_i(t) = I_i\sin(\omega_i t + \varphi_{I_i})</math><br />
<br />
where <math>I_i</math> is the amplitude of the <math> i_{th}</math>emitting coil waveform, <math>\omega_i</math> is the excitation frequency and <math>\varphi_i</math> is the current phase relative to an arbitrary reference. Summing all N current waveforms results in:<br />
<br />
<math display="block">i(t) = \sum^N_{i=1} I_i\sin(\omega_i t + \varphi_{I_{i}})</math><br />
<br />
The induced voltage on the sensor is a sum of the voltages induced by the coil currents:<br />
<br />
<math display="block">v(t) = \sum^N_{i=1} V_i\sin(\omega_i t + \varphi_{V_{i}})</math><br />
<br />
where <math>V_i</math> is the amplitude of the induced voltage component and <math> \varphi_{V_i}</math> is the associated phase. Each frequency component of the voltage signal is extracted using two reference signals:<br />
<math display="block">Y_i = \sin(\omega_{ri} t)</math><br />
<math display="block">X_i = \cos(\omega_{ri} t)</math><br />
<br />
where <math>\omega_{ri}</math> is the frequency of the simulated reference signal. This demodulation results in the amplitudes and phases of all the frequency components relative to the simulated reference signal as follows:<br />
<math display="block">\mathbf{V} = [V_1,V_2...V_n]</math><br />
<math display="block">\mathbf{I} = [I_1,I_2...I_n]</math><br />
<math display="block">\mathbf{\varphi_V} = [\varphi_{V_1},\varphi_{V_2}...\varphi_{V_n}]</math><br />
<math display="block">\mathbf{\varphi_I} = [\varphi_{I_1},\varphi_{I_2}...\varphi_{I_n}]</math><br />
<br />
By subtracting the individual phases from each other the relative phase angle between the sensor voltage and coil current waveforms can be found:<br />
<math display="block">\Delta\mathbf{\varphi} = \mathbf{\varphi_V} - \mathbf{\varphi_I}</math><br />
<br />
The sign of this phase information indicates the axial orientation of the electromagnetic sensor with respect to the magnetic field.<br />
<br />
With a simulated reference signal it can be difficult to lock the frequency to the signal source without the use of phase locking techniques. In our system this often results in a small mismatch in frequency since the simulated reference signal for a particular coil <math> \omega_{ri}</math> is slightly different from the frequency to be demodulated <math> \omega_i</math>since they are not locked. This results in a <math> \Delta\omega=\omega_{ri} - \omega_r</math> causing a low frequency oscillation in the demodulated signal, which would not be present in synchronous demodulation.<br />
<br />
To demonstrate this, consider a single frequency where the coil current and sensor voltage waveforms are given by:<br />
<math display="block">i(t) = I\sin(\omega t + \varphi_I)</math><br />
<math display="block">v(t) = V\sin(\omega t + \varphi_V)</math><br />
<br />
The simulated reference signals used for demodulation are given by:<br />
<math display="block">Y(t) = \sin(\omega_r t)</math><br />
<math display="block">X(t) = \cos(\omega_r t)</math><br />
<br />
Starting with the sensor voltage <math>v(t)</math>, we multiply by the reference signals just as in the synchronous case to produce:<br />
<math display="block">v(t)Y(t) = \frac{V}{2}[\cos((\omega-\omega_r) + \varphi_V) - \cos((\omega+\omega_r) + \varphi_V)]</math><br />
<math display="block">v(t)X(t) = \frac{V}{2}[\sin((\omega-\omega_r) + \varphi_V) - \sin((\omega+\omega_r) + \varphi_V)]</math><br />
<br />
Extracting the low frequency components using a low-pass filter yields two quadrature voltage signals:<br />
<math display="block">v_x=\frac{V}{2}\sin(\Delta\omega t + \varphi_V)</math><br />
<math display="block">v_y=\frac{V}{2}\cos(\Delta\omega t + \varphi_V)</math><br />
<br />
where the difference in frequency is given by:<br />
<math display="block">\Delta\omega = \omega-\omega_r</math><br />
<br />
These signals are close to DC since they oscillate at a frequency of <math> \Delta\omega</math>. The amplitude <math> V</math> can be determined as in the synchronous case using:<br />
<math display="block">V = 2\sqrt{(v_x^2 + v_y^2)}</math><br />
The phase can be determined using:<br />
<math display="block">\gamma_V(t) = \arctan\frac{v_x}{v_y} = \Delta\omega t +\varphi_V</math><br />
<br />
Its clear that the phase has a time dependency. This is due to the frequency mismatch of the carrier and reference signals. In order to remove this dependency, the same demodulation procedure above is performed to the coil current waveform i(t) to produce <math> I</math> and <math> \gamma_I</math>. Subtracting the phase component <math> \gamma_V</math> from <math> \gamma_I</math> gives the constant relative phase angle between the two waveforms:<br />
<math display="block">\gamma_V - \gamma_I = \varphi_V-\varphi_I</math><br />
<br />
This 'double demodulation' allows both the accurate retrieval of the amplitude and phase of each of the induced sensor voltages. Implementation details of how this demodulation is achieved are described in the next section.<br />
<br />
<br />
==Demodulation implementation==<br />
<br />
**Demodulation implementation**<br />
=======<br />
<br />
The asynchronous demodulation process takes place in Matlab using an efficient matrix calculation technique. This method involves recording a number of samples of each signal of interest. This has the advantage of reduced solving time since all samples are available at the time of calculation. This is in contrast to real-time processing where samples are gathered and processed one-by-one in turn.<br />
<br />
The signals of interest we wish to sample are:<br />
<br />
1. The induced voltage on the 5-DOF sensor coil(s)<br />
2. The composite coil current signal<br />
<br />
Initially we consider the induced voltage on a single sensor that has been discretised through sampling:<br />
<math display="block">x[n] = \sum_{i=1}^N V_i\sin\left(\frac{2 \pi f_i n}{f_s}+\varphi_i\right)</math><br />
<br />
where N is the number of frequency of interest (N = 8, one frequency per emitter coil), <math>f_i$ is the frequency of interest in hertz, <math>f_s$ is the sampling frequency of the DAQ, <math>V_i</math> is the amplitude and <math>\varphi_i</math> is an associated phase shift. Collecting and string <math>p$ points results in a vector <math>\mathbf{X}</math> containing <math>p$ samples:<br />
<br />
<math display="block">\mathbf{X}=\left[x[0],x[1] ... x[p-1]\right]</math><br />
<br />
In the previous section asynchronous demodulation was discussed. The first step of the demodulation involves multiplying the sampled signal by two sinusoids <math>Y(n)=\sin(2\pi f_{ri} n)</math> and <math>X(n)=\cos(2\pi f_{ri} n)</math>, where <math>f_{ri}</math> is the simulated reference signal close in frequency to <math>f_i</math>. Using Euler's relation we combine <math>X(n)$ and <math>Y(n)</math> into a single discrete complex sinusoid:<br />
<br />
<math display="block">\cos(2\pi f_{ri}n) + j\sin(2\pi f_{ri} n) = e^{\frac{2 \pi f_{ri} j n }{f_s}}</math><br />
<br />
where <math>j = \sqrt{-1}</math>. This complex exponential encapsulates the two quadrature signal components required for demodulation. Given the <math>N$ emitter coil frequencies, <math>N$ complex exponentials are required for the demodulation of each frequency. A <math>p \times N$ matrix of complex exponentials is created such that when pre-multiplied by <math>\mathbf{X}</math> results in a vector of voltage magnitude:<br />
<br />
<math display="block"> \mathbf{E} = \begin{bmatrix}<br />
\epsilon_i[0] & \dots & \epsilon_N[0] \newline<br />
\vdots& \ddots & \vdots \newline<br />
\epsilon_i[p-1] & \dots & \epsilon_N[p-1]<br />
\end{bmatrix}$$<br />
where<br />
<math display="block">\epsilon_i[n]=e^{\frac{2 \pi f_{ri} j n }{f_s}}$$<br />
<br />
The row vector of demodulated voltages is given by premultiplying <math>\mathbf{E}</math> by the row vector of <math>p$ samples:<br />
<math display="block">\mathbf{Y} = [\widetilde{V}_1 ... \widetilde{V}_N] = 2\mathbf{X}\mathbf{E}</math><br />
<br />
<math>\mathbf{Y}</math> is a complex valued row-vector due to the presence of <math>j</math> in the complex exponential calculation. The absolute value of each entry in <math>\mathbf{Y}</math> is the amplitude received frequency of interest, <math>V_i</math>. <br />
<br />
Finite impulse response (FIR filter)<br />
------------------------------------<br />
<br />
A finite impulse response filter is implemented as part of the demodulation step. This low pass FIR filter eliminates unwanted frequency components from the input sample stream <math>mathbf{X}</math>. Consider an FIR filter denoted by <math>f_i$ with $p$ coefficients (\textit{i.e.} equal to the number of input samples). The output of such a filter can be represented as:<br />
<math display="block">p[n] = \sum_{i=0}^{p-1}f_ix[n-i]</math><br />
<br />
where <math>p[n]</math> is the filtered sample vector and <math>f_i</math> is a single filter tap coefficient. Each filter coefficient can be represented by a single matrix <math>F</math> as shown below:<br />
<math display="block">F = [f_0, f_1, f_2 \dots f_{p-1}]</math><br />
<br />
The FIR filter can be applied to the demodulator by scaling each input sample of <math>X$ with the corresponding FIR coefficient given by <math>F$. This is achieved using an element by element multiplication:<br />
<br />
<math display="block">\mathbf{Y} = 2(\mathbf{X}\circ \mathbf{F})\mathbf{E} </math><br />
<br />
where <math>\circ</math>represents the element-wise multiplication operator.<br />
<br />
The amplitude of each frequency component can be determined by calculating the absolute value of <math>\mathbf{Y}</math>, which is a complex quantity. The phase of <math>\mathbf{Y}</math>an be found using the complex argument of <math>Y$<br />
<math display="block">[V_1 V_2 \dots V_N] = |\mathbf{Y}|</math><br />
<math display="block">[\varphi_1, \varphi_2 \dots \varphi_N] = \arg(\mathbf{Y})</math><br />
<br />
The implementation of this calculation can be found in the Matlab code provided in the OSF file repository.</div>Alexjhttps://openemt.org/index.php?title=Signal_demodulation&diff=73Signal demodulation2017-11-03T19:03:54Z<p>Alexj: </p>
<hr />
<div>Demodulation refers to the extraction of information from a carrier wave. The extracted information is either digital or analog in nature. For example, Wifi transmits digital information on 2.4GHz and 5GHz frequencies, while a typical FM radio transmits analog signals in the form of sound at carrier frequencies between 80-100MHz.<br />
<br />
In the case of Anser EMT, the carrier signals are those transmitted by the eight field emitter coils in the field generator. The extracted information are the magnitudes of each of the received frequency components. The sensor coil detects these carrier frequencies as described in section (5b) and produces a composite signal representing the sum of the received carrier frequencies. Following amplification and sampling, the magnitudes of these carrier signals are extracted using asynchronous demodulation techniques. The position and orientation algorithm compares these magnitudes with the system magnetic field model in order resolve a unique sensor position and orientation.<br />
<br />
==Demodulation theory==<br />
Two modulation schemes are discussed in this section, synchronous and asynchronous methods are discussed. Asynchronous demodulation is the chosen scheme as it provides more information regarding the orientation of the sensor.<br />
<br />
In order to calculate the amplitude of the AC magnetic field experienced by the sensor many techniques are available. Generally, the signals of interest are small in amplitude with relatively large noise levels as well as interference from the other transmitting channels. The most common method to extract the signals of this type is synchronous demodulation, also known as synchronous detection or lock-in amplification<br />
<br />
<br />
===Synchronous demodulation===<br />
<br />
-------<br />
Synchronous demodulation is a method for extracting information from an AC carrier signal. Although asynchronous demodulation is used in Anser, synchronous demodulation illustrates basic concepts that are used in the asynchronous design.<br />
<br />
The amplitude and phase of an AC signal can be calculated through multiplication by a reference signal that is locked in frequency with the original signal. The multiplication by the reference signal, shifts the signal down to a lower frequency, typically DC, which is then easier to accurately measure. The "locking" of frequencies can be implemented in many ways although the simplest is to use the source of the signal as a reference.<br />
<br />
Consider an input signal:<br />
<math display="block">v(t)=V\sin(\omega t + \varphi)</math><br />
<br />
where <math>V</math> is the modulating signal we wish to extract. The amplitude and phase of this signal can be determined by multiplying by two reference signals at the same frequency:<br />
<math display="block">Y(t) = \sin(\omega t)</math><br />
<math display="block">X(t) = \cos(\omega t)</math><br />
<br />
This multiplication result in two quadrature signals:<br />
<br />
<math display="block">v_y(t) = v(t)Y(t) = \frac{V}{2}[\cos(\varphi)-\cos(2\omega t + \varphi)]</math><br />
<math display="block">v_x(t) = v(t)X(t) = \frac{V}{2}[\sin(\varphi)-\sin(2\omega t + \varphi)]</math><br />
<br />
The DC component of the signal is extracted by using an appropriate low-pass filter. The resulting DC values are:<br />
<br />
<math display="block">v'_y(t) = \frac{v}{2}\cos(\varphi)</math><br />
<math display="block">v'_x(t) = \frac{v}{2}\sin(\varphi)</math><br />
<br />
The amplitude of the modulating signal $V$ can be found using:<br />
<math display="block">V = 2\sqrt{(v'_x(t)^2 + v'_y(t)^2)}</math><br />
The phase of the signal can be found using:<br />
<math display="block">\varphi = \arctan\left(\frac{v'_y(t)}{v'_x(t)}\right)</math><br />
<br />
Demodulating using this technique requires <math>Y(t)</math> and <math>X(t)</math> be generated from the reference source. This requires each of the eight coil voltages (20.5kHz, 21.5kHz...) to be individually sampled for processing, requiring an analogue to digital converter with a very high aggregate sampling frequency. Instead, simulated reference signals may be used to generate <math>Y(t)</math>and <math>X(t)</math>which results in asynchronous demodulation.<br />
<br />
<br />
===Asynchronous demodulation===<br />
<br />
Asynchronous demodulation uses simulated reference signals to generate the quadrature signals for demodulation. These simulated signals are '''not''' locked in phase with the signal to be demodulated and can experience frequency mismatch. This results in an increase in the number calculations required when determining the phase and magnitude of the signal of interest, but reduces the number of signals required for sampling.<br />
<br />
Consider a tracking system consisting of N emitting coils, each coil carrying a current component of the following form:<br />
<math display="block">i_i(t) = I_i\sin(\omega_i t + \varphi_{I_i})</math><br />
<br />
where <math>I_i</math> is the amplitude of the <math> i_{th}</math>emitting coil waveform, <math>\omega_i</math> is the excitation frequency and <math>\varphi_i</math> is the current phase relative to an arbitrary reference. Summing all N current waveforms results in:<br />
<br />
<math display="block">i(t) = \sum^N_{i=1} I_i\sin(\omega_i t + \varphi_{I_{i}})</math><br />
<br />
The induced voltage on the sensor is a sum of the voltages induced by the coil currents:<br />
<br />
<math display="block">v(t) = \sum^N_{i=1} V_i\sin(\omega_i t + \varphi_{V_{i}})</math><br />
<br />
where <math>V_i</math> is the amplitude of the induced voltage component and <math> \varphi_{V_i}</math> is the associated phase. Each frequency component of the voltage signal is extracted using two reference signals:<br />
<math display="block">Y_i = \sin(\omega_{ri} t)</math><br />
<math display="block">X_i = \cos(\omega_{ri} t)</math><br />
<br />
where <math>\omega_{ri}</math> is the frequency of the simulated reference signal. This demodulation results in the amplitudes and phases of all the frequency components relative to the simulated reference signal as follows:<br />
<math display="block">\mathbf{V} = [V_1,V_2...V_n]</math><br />
<math display="block">\mathbf{I} = [I_1,I_2...I_n]</math><br />
<math display="block">\mathbf{\varphi_V} = [\varphi_{V_1},\varphi_{V_2}...\varphi_{V_n}]</math><br />
<math display="block">\mathbf{\varphi_I} = [\varphi_{I_1},\varphi_{I_2}...\varphi_{I_n}]</math><br />
<br />
By subtracting the individual phases from each other the relative phase angle between the sensor voltage and coil current waveforms can be found:<br />
<math display="block">\Delta\mathbf{\varphi} = \mathbf{\varphi_V} - \mathbf{\varphi_I}</math><br />
<br />
The sign of this phase information indicates the axial orientation of the electromagnetic sensor with respect to the magnetic field.<br />
<br />
With a simulated reference signal it can be difficult to lock the frequency to the signal source without the use of phase locking techniques. In our system this often results in a small mismatch in frequency since the simulated reference signal for a particular coil <math> \omega_{ri}</math> is slightly different from the frequency to be demodulated <math> \omega_i</math>since they are not locked. This results in a <math> \Delta\omega=\omega_{ri} - \omega_r</math> causing a low frequency oscillation in the demodulated signal, which would not be present in synchronous demodulation.<br />
<br />
To demonstrate this, consider a single frequency where the coil current and sensor voltage waveforms are given by:<br />
<math display="block">i(t) = I\sin(\omega t + \varphi_I)</math><br />
<math display="block">v(t) = V\sin(\omega t + \varphi_V)</math><br />
<br />
The simulated reference signals used for demodulation are given by:<br />
<math display="block">Y(t) = \sin(\omega_r t)</math><br />
<math display="block">X(t) = \cos(\omega_r t)</math><br />
<br />
Starting with the sensor voltage <math>v(t)</math>, we multiply by the reference signals just as in the synchronous case to produce:<br />
<math display="block">v(t)Y(t) = \frac{V}{2}[\cos((\omega-\omega_r) + \varphi_V) - \cos((\omega+\omega_r) + \varphi_V)]</math><br />
<math display="block">v(t)X(t) = \frac{V}{2}[\sin((\omega-\omega_r) + \varphi_V) - \sin((\omega+\omega_r) + \varphi_V)]</math><br />
<br />
Extracting the low frequency components using a low-pass filter yields two quadrature voltage signals:<br />
<math display="block">v_x=\frac{V}{2}\sin(\Delta\omega t + \varphi_V)</math><br />
<math display="block">v_y=\frac{V}{2}\cos(\Delta\omega t + \varphi_V)</math><br />
<br />
where the difference in frequency is given by:<br />
<math display="block">\Delta\omega = \omega-\omega_r</math><br />
<br />
These signals are close to DC since they oscillate at a frequency of <math> \Delta\omega</math>. The amplitude <math> V</math> can be determined as in the synchronous case using:<br />
<math display="block">V = 2\sqrt{(v_x^2 + v_y^2)}</math><br />
The phase can be determined using:<br />
<math display="block">\gamma_V(t) = \arctan\frac{v_x}{v_y} = \Delta\omega t +\varphi_V</math><br />
<br />
Its clear that the phase has a time dependency. This is due to the frequency mismatch of the carrier and reference signals. In order to remove this dependency, the same demodulation procedure above is performed to the coil current waveform i(t) to produce <math> I</math> and <math> \gamma_I</math>. Subtracting the phase component <math> \gamma_V</math> from <math> \gamma_I</math> gives the constant relative phase angle between the two waveforms:<br />
<math display="block">\gamma_V - \gamma_I = \varphi_V-\varphi_I</math><br />
<br />
This 'double demodulation' allows both the accurate retrieval of the amplitude and phase of each of the induced sensor voltages. Implementation details of how this demodulation is achieved are described in the next section.<br />
<br />
<br />
==Demodulation implementation==</div>Alexjhttps://openemt.org/index.php?title=Signal_demodulation&diff=72Signal demodulation2017-11-03T19:02:27Z<p>Alexj: </p>
<hr />
<div>Demodulation refers to the extraction of information from a carrier wave. The extracted information is either digital or analog in nature. For example, Wifi transmits digital information on 2.4GHz and 5GHz frequencies, while a typical FM radio transmits analog signals in the form of sound at carrier frequencies between 80-100MHz.<br />
<br />
In the case of Anser EMT, the carrier signals are those transmitted by the eight field emitter coils in the field generator. The extracted information are the magnitudes of each of the received frequency components. The sensor coil detects these carrier frequencies as described in section (5b) and produces a composite signal representing the sum of the received carrier frequencies. Following amplification and sampling, the magnitudes of these carrier signals are extracted using asynchronous demodulation techniques. The position and orientation algorithm compares these magnitudes with the system magnetic field model in order resolve a unique sensor position and orientation.<br />
<br />
==Demodulation theory==<br />
Two modulation schemes are discussed in this section, synchronous and asynchronous methods are discussed. Asynchronous demodulation is the chosen scheme as it provides more information regarding the orientation of the sensor.<br />
<br />
In order to calculate the amplitude of the AC magnetic field experienced by the sensor many techniques are available. Generally, the signals of interest are small in amplitude with relatively large noise levels as well as interference from the other transmitting channels. The most common method to extract the signals of this type is synchronous demodulation, also known as synchronous detection or lock-in amplification<br />
<br />
<br />
===Synchronous demodulation===<br />
<br />
-------<br />
Synchronous demodulation is a method for extracting information from an AC carrier signal. Although asynchronous demodulation is used in Anser, synchronous demodulation illustrates basic concepts that are used in the asynchronous design.<br />
<br />
The amplitude and phase of an AC signal can be calculated through multiplication by a reference signal that is locked in frequency with the original signal. The multiplication by the reference signal, shifts the signal down to a lower frequency, typically DC, which is then easier to accurately measure. The "locking" of frequencies can be implemented in many ways although the simplest is to use the source of the signal as a reference.<br />
<br />
Consider an input signal:<br />
<math display="block">v(t)=V\sin(\omega t + \varphi)</math><br />
<br />
where <math>V</math> is the modulating signal we wish to extract. The amplitude and phase of this signal can be determined by multiplying by two reference signals at the same frequency:<br />
<math display="block">Y(t) = \sin(\omega t)</math><br />
<math display="block">X(t) = \cos(\omega t)</math><br />
<br />
This multiplication result in two quadrature signals:<br />
<br />
<math display="block">v_y(t) = v(t)Y(t) = \frac{V}{2}[\cos(\varphi)-\cos(2\omega t + \varphi)]</math><br />
<math display="block">v_x(t) = v(t)X(t) = \frac{V}{2}[\sin(\varphi)-\sin(2\omega t + \varphi)]</math><br />
<br />
The DC component of the signal is extracted by using an appropriate low-pass filter. The resulting DC values are:<br />
<br />
<math display="block">v'_y(t) = \frac{v}{2}\cos(\varphi)</math><br />
<math display="block">v'_x(t) = \frac{v}{2}\sin(\varphi)</math><br />
<br />
The amplitude of the modulating signal $V$ can be found using:<br />
<math display="block">V = 2\sqrt{(v'_x(t)^2 + v'_y(t)^2)}</math><br />
The phase of the signal can be found using:<br />
<math display="block">\varphi = \arctan\left(\frac{v'_y(t)}{v'_x(t)}\right)</math><br />
<br />
Demodulating using this technique requires <math>Y(t)</math> and <math>X(t)</math> be generated from the reference source. This requires each of the eight coil voltages (20.5kHz, 21.5kHz...) to be individually sampled for processing, requiring an analogue to digital converter with a very high aggregate sampling frequency. Instead, simulated reference signals may be used to generate <math>Y(t)</math>and <math>X(t)</math>which results in asynchronous demodulation.<br />
<br />
<br />
===Asynchronous demodulation===<br />
<br />
Asynchronous demodulation uses simulated reference signals to generate the quadrature signals for demodulation. These simulated signals are '''not''' locked in phase with the signal to be demodulated and can experience frequency mismatch. This results in an increase in the number calculations required when determining the phase and magnitude of the signal of interest, but reduces the number of signals required for sampling.<br />
<br />
Consider a tracking system consisting of N emitting coils, each coil carrying a current component of the following form:<br />
<math display="block">i_i(t) = I_i\sin(\omega_i t + \varphi_{I_i})</math><br />
<br />
where <math>I_i</math> is the amplitude of the <math> i_{th}</math>emitting coil waveform, <math> \omega_i</math> is the excitation frequency and <math> \varphi_i$ is the current phase relative to an arbitrary reference. Summing all N current waveforms results in:<br />
<br />
<math display="block">i(t) = \sum^N_{i=1} I_i\sin(\omega_i t + \varphi_{I_{i}})</math><br />
<br />
The induced voltage on the sensor is a sum of the voltages induced by the coil currents:<br />
<br />
<math display="block">v(t) = \sum^N_{i=1} V_i\sin(\omega_i t + \varphi_{V_{i}})</math><br />
<br />
where $V_i$ is the amplitude of the induced voltage component and <math> \varphi_{V_i}$ is the associated phase. Each frequency component of the voltage signal is extracted using two reference signals:<br />
<math display="block">Y_i = \sin(\omega_{ri} t)</math><br />
<math display="block">X_i = \cos(\omega_{ri} t)</math><br />
<br />
where $\omega_{ri}$ is the frequency of the simulated reference signal. This demodulation results in the amplitudes and phases of all the frequency components relative to the simulated reference signal as follows:<br />
<math display="block">\mathbf{V} = [V_1,V_2...V_n]</math><br />
<math display="block">\mathbf{I} = [I_1,I_2...I_n]</math><br />
<math display="block">\mathbf{\varphi_V} = [\varphi_{V_1},\varphi_{V_2}...\varphi_{V_n}]</math><br />
<math display="block">\mathbf{\varphi_I} = [\varphi_{I_1},\varphi_{I_2}...\varphi_{I_n}]</math><br />
<br />
By subtracting the individual phases from each other the relative phase angle between the sensor voltage and coil current waveforms can be found:<br />
<math display="block">\Delta\mathbf{\varphi} = \mathbf{\varphi_V} - \mathbf{\varphi_I}</math><br />
<br />
The sign of this phase information indicates the axial orientation of the electromagnetic sensor with respect to the magnetic field.<br />
<br />
With a simulated reference signal it can be difficult to lock the frequency to the signal source without the use of phase locking techniques. In our system this often results in a small mismatch in frequency since the simulated reference signal for a particular coil <math> \omega_{ri}</math> is slightly different from the frequency to be demodulated <math> \omega_i</math>since they are not locked. This results in a <math> \Delta\omega=\omega_{ri} - \omega_r$ causing a low frequency oscillation in the demodulated signal, which would not be present in synchronous demodulation.<br />
<br />
To demonstrate this, consider a single frequency where the coil current and sensor voltage waveforms are given by:<br />
<math display="block">i(t) = I\sin(\omega t + \varphi_I)</math><br />
<math display="block">v(t) = V\sin(\omega t + \varphi_V)</math><br />
<br />
The simulated reference signals used for demodulation are given by:<br />
<math display="block">Y(t) = \sin(\omega_r t)</math><br />
<math display="block">X(t) = \cos(\omega_r t)</math><br />
<br />
Starting with the sensor voltage $v(t)$, we multiply by the reference signals just as in the synchronous case to produce:<br />
<math display="block">v(t)Y(t) = \frac{V}{2}[\cos((\omega-\omega_r) + \varphi_V) - \cos((\omega+\omega_r) + \varphi_V)]</math><br />
<math display="block">v(t)X(t) = \frac{V}{2}[\sin((\omega-\omega_r) + \varphi_V) - \sin((\omega+\omega_r) + \varphi_V)]</math><br />
<br />
Extracting the low frequency components using a low-pass filter yields two quadrature voltage signals:<br />
<math display="block">v_x=\frac{V}{2}\sin(\Delta\omega t + \varphi_V)</math><br />
<math display="block">v_y=\frac{V}{2}\cos(\Delta\omega t + \varphi_V)</math><br />
<br />
where the difference in frequency is given by:<br />
<math display="block">\Delta\omega = \omega-\omega_r</math><br />
<br />
These signals are close to DC since they oscillate at a frequency of <math> \Delta\omega$. The amplitude <math> V$ can be determined as in the synchronous case using:<br />
<math display="block">V = 2\sqrt{(v_x^2 + v_y^2)}</math><br />
The phase can be determined using:<br />
<math display="block">\gamma_V(t) = \arctan\frac{v_x}{v_y} = \Delta\omega t +\varphi_V</math><br />
<br />
Its clear that the phase has a time dependency. This is due to the frequency mismatch of the carrier and reference signals. In order to remove this dependency, the same demodulation procedure above is performed to the coil current waveform i(t) to produce <math> I</math> and <math> \gamma_I$. Subtracting the phase component <math> \gamma_V</math> from <math> \gamma_I</math> gives the constant relative phase angle between the two waveforms:<br />
<math display="block">\gamma_V - \gamma_I = \varphi_V-\varphi_I</math><br />
<br />
This 'double demodulation' allows both the accurate retrieval of the amplitude and phase of each of the induced sensor voltages. Implementation details of how this demodulation is achieved are described in the next section.<br />
<br />
<br />
==Demodulation implementation==</div>Alexjhttps://openemt.org/index.php?title=Signal_demodulation&diff=71Signal demodulation2017-11-03T18:57:42Z<p>Alexj: Created page with "Demodulation refers to the extraction of information from a carrier wave. The extracted information is either digital or analog in nature. For example, Wifi transmits digital..."</p>
<hr />
<div>Demodulation refers to the extraction of information from a carrier wave. The extracted information is either digital or analog in nature. For example, Wifi transmits digital information on 2.4GHz and 5GHz frequencies, while a typical FM radio transmits analog signals in the form of sound at carrier frequencies between 80-100MHz.<br />
<br />
In the case of Anser EMT, the carrier signals are those transmitted by the eight field emitter coils in the field generator. The extracted information are the magnitudes of each of the received frequency components. The sensor coil detects these carrier frequencies as described in section (5b) and produces a composite signal representing the sum of the received carrier frequencies. Following amplification and sampling, the magnitudes of these carrier signals are extracted using asynchronous demodulation techniques. The position and orientation algorithm compares these magnitudes with the system magnetic field model in order resolve a unique sensor position and orientation.<br />
<br />
==Demodulation theory==<br />
Two modulation schemes are discussed in this section, synchronous and asynchronous methods are discussed. Asynchronous demodulation is the chosen scheme as it provides more information regarding the orientation of the sensor.<br />
<br />
In order to calculate the amplitude of the AC magnetic field experienced by the sensor many techniques are available. Generally, the signals of interest are small in amplitude with relatively large noise levels as well as interference from the other transmitting channels. The most common method to extract the signals of this type is synchronous demodulation, also known as synchronous detection or lock-in amplification<br />
<br />
<br />
===Synchronous demodulation===<br />
<br />
-------<br />
Synchronous demodulation is a method for extracting information from an AC carrier signal. Although asynchronous demodulation is used in Anser, synchronous demodulation illustrates basic concepts that are used in the asynchronous design.<br />
<br />
The amplitude and phase of an AC signal can be calculated through multiplication by a reference signal that is locked in frequency with the original signal. The multiplication by the reference signal, shifts the signal down to a lower frequency, typically DC, which is then easier to accurately measure. The "locking" of frequencies can be implemented in many ways although the simplest is to use the source of the signal as a reference.<br />
<br />
Consider an input signal:<br />
<math display="block">v(t)=V\sin(\omega t + \varphi)</math><br />
<br />
where <math>V</math> is the modulating signal we wish to extract. The amplitude and phase of this signal can be determined by multiplying by two reference signals at the same frequency:<br />
<math display="block">Y(t) = \sin(\omega t)</math><br />
<math display="block">X(t) = \cos(\omega t)</math><br />
<br />
This multiplication result in two quadrature signals:<br />
<br />
<math display="block">v_y(t) = v(t)Y(t) = \frac{V}{2}[\cos(\varphi)-\cos(2\omega t + \varphi)]</math><br />
<math display="block">v_x(t) = v(t)X(t) = \frac{V}{2}[\sin(\varphi)-\sin(2\omega t + \varphi)]</math><br />
<br />
The DC component of the signal is extracted by using an appropriate low-pass filter. The resulting DC values are:<br />
<br />
<math display="block">v'_y(t) = \frac{v}{2}\cos(\varphi)</math><br />
<math display="block">v'_x(t) = \frac{v}{2}\sin(\varphi)</math><br />
<br />
The amplitude of the modulating signal $V$ can be found using:<br />
<math display="block">V = 2\sqrt{(v'_x(t)^2 + v'_y(t)^2)}</math><br />
The phase of the signal can be found using:<br />
<math display="block">\varphi = \arctan\left(\frac{v'_y(t)}{v'_x(t)}\right)</math><br />
<br />
Demodulating using this technique requires <math>Y(t)</math> and <math>X(t)</math> be generated from the reference source. This requires each of the eight coil voltages (20.5kHz, 21.5kHz...) to be individually sampled for processing, requiring an analogue to digital converter with a very high aggregate sampling frequency. Instead, simulated reference signals may be used to generate <math>Y(t)</math>and <math>X(t)</math>which results in asynchronous demodulation.<br />
<br />
==Demodulation implementation==</div>Alexjhttps://openemt.org/index.php?title=Sensor_amplifier&diff=70Sensor amplifier2017-11-03T18:53:17Z<p>Alexj: </p>
<hr />
<div>==Sensor signal==<br />
[[File:Sensoramp.PNG|thumb|500px|Instrumentation amplifier topology for amplifying the sensor signal]]<br />
<br />
The signal induced on the sensor coil is very weak and requires amplification before further processing can be performed. Careful amplification is required in order to prevent loading and distortion of the sensor signal which would degrade the system performance. An instrumentation amplifier based design is used. A diagram of the circuit schematic is shown below:<br />
<br />
The [http://www.ti.com/lit/ds/symlink/ina128.pdf INA128] is a general purpose instrumentation amplifier from Texas Instruments. The sensor wires are directly connected to the inputs of the INA128. The gain of the amplifier is set using a 10kΩ potentiometer <math></math> (not shown). The 47kΩ resistors at the op-amp inputs are necessary in order to provide the necessary bias currents to the amplifier.<br />
<br />
The [http://www.ti.com/lit/gpn/tl081 TL081] is a general purpose operational amplifier configured as an inverting unity gain buffer using two 10kΩ resistors. The precision of these resistors is not important as the device is a simple buffer. The output of this buffer is connected to the data acquisition unit (DAQ).<br />
<br />
The Eagle PCB project files and Gerber CAM files for this circuit can be found in the Anser project repository.<br />
<br />
==Current signal==<br />
[[File:Currentsummer.PNG|thumb|350px| Current summer circuit used to detect the phase of the current through the coils]]<br />
<br />
A current summer amplifier is required to efficiently sample the current in each of the emitter coil PCBs. The composite signal is demodulated in an identical manner to the sensor signal. Data regarding the phases of the signals are extracted to provide information regarding the orientation of the sensor. This is used by the position and orientation algorithm (P&O). Without this, the sign of the <math>n_A</math> vector cannot be determined. (i.e. Two solutions exist for the orientation angle, <math>\theta</math> and <math>\theta+\pi</math> The phase information decides which orientation is valid). The circuit schematic of the summer circuit is shown below<br />
<br />
<math>V1</math> to <math>V8</math> represent the current-sense voltage signals from each emitter coil. These voltage signals are generated from the high-speed amplifier shown in section 2a. Capacitors <math>C_{DC}</math> block any DC bias from being amplified. Resistors <math>Rin</math> set the gain of the amplifier in conjunction with <math>R_f</math>. Both <math>R_f</math> and <math>C_f</math> also form a low-pass filter to block any high frequency noise from entering amplifier. A single TL081 operational amplifier is used in the Anser system, although this particular model is not required. The resulting output voltage <math>V_{sum}</math> is given by:<br />
<br />
<math display="block">V_{sum} = -\frac{R_f}{R_{in}}\left( V_1 +V_2+...V_8\right)</math><br />
<br />
The precision of this circuit not vital for accurate system operation. The purpose of <math>V_{sum}</math> is to provide the phase information of the coil current. i.e. magnitudes are not important. The amplifier gain should be chosen such that it can be accurately sampled by the data acquisition system (DAQ).</div>Alexjhttps://openemt.org/index.php?title=Sensor_amplifier&diff=69Sensor amplifier2017-11-03T18:51:56Z<p>Alexj: </p>
<hr />
<div>==Sensor signal==<br />
[[File:Sensoramp.PNG|thumb|500px|Instrumentation amplifier topology for amplifying the sensor signal]]<br />
<br />
The signal induced on the sensor coil is very weak and requires amplification before further processing can be performed. Careful amplification is required in order to prevent loading and distortion of the sensor signal which would degrade the system performance. An instrumentation amplifier based design is used. A diagram of the circuit schematic is shown below:<br />
<br />
The [http://www.ti.com/lit/ds/symlink/ina128.pdf INA128] is a general purpose instrumentation amplifier from Texas Instruments. The sensor wires are directly connected to the inputs of the INA128. The gain of the amplifier is set using a 10kΩ potentiometer <math></math> (not shown). The 47kΩ resistors at the op-amp inputs are necessary in order to provide the necessary bias currents to the amplifier.<br />
<br />
The TL081 (datasheet here) is a general purpose operational amplifier configured as an inverting unity gain buffer using two 10kΩ10kΩ resistors. The precision of these resistors is not important as the device is a simple buffer. The output of this buffer is connected to the data acquisition unit (DAQ).<br />
<br />
The Eagle PCB project files and Gerber CAM files for this circuit can be found in the Anser project repository.<br />
<br />
==Current signal==<br />
[[File:Currentsummer.PNG|thumb|350px| Current summer circuit used to detect the phase of the current through the coils]]<br />
<br />
A current summer amplifier is required to efficiently sample the current in each of the emitter coil PCBs. The composite signal is demodulated in an identical manner to the sensor signal. Data regarding the phases of the signals are extracted to provide information regarding the orientation of the sensor. This is used by the position and orientation algorithm (P&O). Without this, the sign of the <math>n_A</math> vector cannot be determined. (i.e. Two solutions exist for the orientation angle, <math>\theta</math> and <math>\theta+\pi</math> The phase information decides which orientation is valid). The circuit schematic of the summer circuit is shown below<br />
<br />
<math>V1</math> to <math>V8</math> represent the current-sense voltage signals from each emitter coil. These voltage signals are generated from the high-speed amplifier shown in section 2a. Capacitors <math>C_{DC}</math> block any DC bias from being amplified. Resistors <math>Rin</math> set the gain of the amplifier in conjunction with <math>R_f</math>. Both <math>R_f</math> and <math>C_f</math> also form a low-pass filter to block any high frequency noise from entering amplifier. A single TL082 operational amplifier is used in the Anser system, although this particular model is not required. The resulting output voltage <math>V_{sum}</math> is given by:<br />
<br />
<math display="block">V_{sum} = -\frac{R_f}{R_{in}}\left( V_1 +V_2+...V_8\right)</math><br />
<br />
The precision of this circuit not vital for accurate system operation. The purpose of <math>V_{sum}</math> is to provide the phase information of the coil current. i.e. magnitudes are not important. The amplifier gain should be chosen such that it can be accurately sampled by the data acquisition system (DAQ).</div>Alexj