Magnitude and phase measurement

Discussions about active development projects
PatrickLafont
Posts: 12
Joined: Sun Feb 01, 2015 1:28 pm

Magnitude and phase measurement

Post by PatrickLafont » Wed Feb 11, 2015 11:03 am

I am looking for someone who already have experience with implementing multiplier in the FPGA. I would like to make a phase sensitive demodulator inside the FPGA by multiplying the input signal with a sinus and a cosinus (the sinus is the output signal, and cosinus it the cosinus is the output signal shifted by pi/2) then passing the output signals through lowpass filters in order to remove the high frequency components. Finally, we retrieve the real and imaginary parts of the input signal, or its amplitude and its phase.
The lowpass filters may be very simple, like an integrator, for example. Different time constants and slopes choices could be added later.
Has anyone an idea of the same project ?
Regards

pavel-demin
Posts: 33
Joined: Tue Dec 23, 2014 10:52 pm

Re: FPGA Avaliblity

Post by pavel-demin » Wed Feb 11, 2015 1:41 pm

Dear Patrick,

I'm currently working on a project that includes an IQ modulator, some filters and amplitude reconstruction.

I agree that IQ modulator could be implemented with one DDS (for the sine wave synthesis) and two multipliers. However, I find it easier to use the CORDIC algorithm.

Xilinx provides a module that implements CORDIC and can be used with Red Pitaya. You can find mode details about this module at

http://www.xilinx.com/products/intellec ... ordic.html

Another nice feature of the CORDIC algorithm is that you can also use it for the amplitude and phase reconstruction. The full signal processing chain would look like the following:

[ADC] -> [CORDIC Vector Rotation] -> [CIC Filter] -> [FIR Filter] -> [CORDIC Vector Translation]

For example, here is my code for an AM receiver that uses all these modules:

https://github.com/pavel-demin/red-pita ... design.tcl

It occupies less than 40% of the FPGA resources.

If you still prefer to use DDS and multipliers, then here is the information about the modules that implement this functionality:

http://www.xilinx.com/products/intellec ... piler.html
http://www.xilinx.com/products/intellec ... plier.html

Regards,

Pavel

PatrickLafont
Posts: 12
Joined: Sun Feb 01, 2015 1:28 pm

CORDIC & Multiplier

Post by PatrickLafont » Thu Feb 12, 2015 11:15 am

Thank you so much for your very clear reply.

I would prefer the multiplier an dds IP in order to do the job in a classical manner, but the CORDIC algorithm interests me a lot.

I think you are an experienced developer on FPGA and particularly Redpitaya platform. Would you have a tutorial about the Redpitaya development chain or a blog ? I am very interested in what you do.

Patrick

pavel-demin
Posts: 33
Joined: Tue Dec 23, 2014 10:52 pm

Re: CORDIC & Multiplier

Post by pavel-demin » Thu Feb 12, 2015 1:05 pm

Dear Patrick,

Thanks for your interest in my work.

You can find some notes about my development chain at

http://pavel-demin.github.io/red-pitaya-notes/

It's still a work in progress. If you find some problems, don't hesitate to contact me.

If you are interested to continue this discussion, I propose to move it to a new forum thread (we could call it "magnitude and phase measurement" or "vector network analyzer") or to e-mail.

Regards,

Pavel

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: Magnitude and phase measurement

Post by Nils Roos » Thu Feb 12, 2015 4:40 pm

Pavel, as per your suggestion I've made this into a separate topic. I would appreciate it if you kept the discussion public as long as possible, because I - and I'd imagine other users as well - am very interested in what you can achieve with your building blocks.
Thank you for your contributions.

Nils

PatrickLafont
Posts: 12
Joined: Sun Feb 01, 2015 1:28 pm

Re: Magnitude and phase measurement

Post by PatrickLafont » Thu Feb 12, 2015 8:59 pm

Dear Pavel, Nils

Thank you for your replies and the creation of a new thread.

I have seen on the Xilinx's Web site that the Vivado dev tool chain is free for the Zynq model utilized on the Redpitaya. This is a very good new for me.
I have visited your pages on GitHub. I appreciate very much the Development Machine tutorial.

I intend to make a good open source pocket network analyzer. I see that the Redpitaya may not have enough gain for measuring low level signal. Beside this, as a measurement device, the targeted network analyzer should have several functions like self calibration, self test, etc. So, making a network analyzer is a complex task that needs the contribution of many people.

I am analog designer and can make prototypes, tests and characterizations. Unfortunately, I don't have much knowledge of FPGA and embedded software development. So I hope to receive help to setup C software and FPGA programming. In return, I will publish the hardware design and test & measurement results. So we can work as a team and advance rapidly.

I hope that my proposal interests you.

Best regards

pavel-demin
Posts: 33
Joined: Tue Dec 23, 2014 10:52 pm

Re: Magnitude and phase measurement

Post by pavel-demin » Fri Feb 13, 2015 9:29 am

PatrickLafont wrote:
I intend to make a good open source pocket network analyzer.
As I don't know much about network analyzers and would like to have an idea of what we could expect from this project, here is a couple of naive questions.

What characteristics we could expect from a network analyzer based on Red Pitaya?

Do you think that based on Red Pitaya and without using external DDS nor external analog mixers it would be possible to make a network analyzer that would perform better than SARK-110?

You can find all the information about SARK-110 at the following link:

http://sark110.ea4frb.eu

PatrickLafont
Posts: 12
Joined: Sun Feb 01, 2015 1:28 pm

Re: Magnitude and phase measurement

Post by PatrickLafont » Fri Feb 13, 2015 3:52 pm

I have visited the page you recommended. The sark110 is really an interesting instrument. It confirms what I think about portable network analyzer. I think that with the Redpitaya the result should be better.

In the low frequency range, from near dc upto several MHz, the Redpitaya can sample the input signal directly, may be with high quality conversion (I could not determine the reference of the ADC on the Redpitaya board). The STM32F103 in the SARK110 can sample only at 12 bits at 1 us sampling rate (its input signal is at the fixed IF frequency 1 kHz). So, at low frequencies, the Redpitaya may be better than the sark110.

At high frequency, the Redpitaya can not sample the 230 MHz analog input, so external mixer and local oscillator are mandatory. I can do this task.

I think that the Redpitay a is more powerful in signal processing, and has Ethernet and wifi connectivity, so a set of Redpitaya+external analog front end would be better than the Sark110.

Beside this, the Redpitaya can be used as FFT analyzer or other instruments. With a smart software, and a smart hardware, the Redpitaya+external analog front end can do the job of many "professional" instruments.

pavel-demin
Posts: 33
Joined: Tue Dec 23, 2014 10:52 pm

Re: Magnitude and phase measurement

Post by pavel-demin » Sun Feb 22, 2015 8:54 pm

I looked through the old Red Pitaya discussions archive at

https://redpitaya.zendesk.com/hc/commun ... lic/topics

and found a couple of related discussions.

1. Some problems with spectra purity of the Red Pitaya outputs were reported at

https://redpitaya.zendesk.com/hc/commun ... generator-

Should not we think of some initial tests in order to better understand what frequencies and what amplitudes would be usable for magnitude and phase measurements?

For example, I could generate a set of 1M FFT plots for different amplitudes and frequencies. Only I don't have any idea what frequencies and amplitudes could be of interest.

2. A simple vector network analyzer schematic was proposed at

https://redpitaya.zendesk.com/hc/commun ... k-analyzer

Image

Do you think that this simple schematic could be used for initial tests?

albert.ruiz
Posts: 12
Joined: Fri Jul 17, 2015 6:43 am

Re: Magnitude and phase measurement

Post by albert.ruiz » Tue Jan 19, 2016 9:04 am

Hi,

Currently, I am using redpitaya for measuring impedance. I have developed my own front-end in order to measure impedance of LRC networks and biological tissue, liquid or samples with 2 and 4 electrode configuration. At the moment it works pretty well from 10Hz to 200kHz (it can go up to 1MHZ but like I said from 200kHz I am having some noise, therefore some minimal errors when measuring very low impedances) and now I am re-designing to make it work perfectly up to 1MHz or even a few MHz.

However, due to my lack of knowledge in FPGA development and so on, I just have developed the application in Matlab and LabView. But for my application which is measuring impedance in biological tissue and liquids, I need a really fast measurements. I need someone that can help or guide me on how I can implement my application in the FPGA and the redpitaya and then create a GUI to control it from a computer.

The good thing with RP is that you can achieve a good portable impedance analyzer and almost get the same features of systems that cost some thousands of dollars. Of course I wouldnt mind to share all the information, designs and everything I have.

Cheers,
Albert

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: No registered users and 28 guests