Author Topic: Converting magnitude ratio to complex form  (Read 335 times)

0 Members and 1 Guest are viewing this topic.

Offline chamathkv

  • Newbie
  • Posts: 2
  • Country: lk
Converting magnitude ratio to complex form
« on: April 11, 2018, 03:43:57 am »
Greetings,

I recently acquired an AD8302 module http://www.analog.com/media/en/technical-documentation/evaluation-documentation/AD8302.pdf which reads to signals and provides an analog reading showing the magnitude ratio. I want to convert this to complex form in order to create a touchstone file (.s1p) http://na.support.keysight.com/plts/help/WebHelp/FilePrint/SnP_File_Format.htm. What is the formula to convert a magnitude ratio (dB) to complex form? (x + iy)
 

Offline TheUnnamedNewbie

  • Frequent Contributor
  • **
  • Posts: 496
  • Country: be
  • Sending EM through plastic.
Re: Converting magnitude ratio to complex form
« Reply #1 on: April 11, 2018, 05:32:08 am »
Magnitude is just that - magnitude. Without any information of phase, you cannot turn this into a real-imaginary format.
The best part about magic is when it stops being magic and becomes science instead
 

Offline hagster

  • Regular Contributor
  • *
  • Posts: 205
Re: Converting magnitude ratio to complex form
« Reply #2 on: April 11, 2018, 06:45:37 am »
Thats an interesting chip. It measures both magnitude ratio and phase difference.

I do note that the pgase measurement has a 180degree ambiguity. Not sure if there is an easy way to resolve that.

I dont see the problem in taking those and writing to it a touchstone file.
 

Offline chamathkv

  • Newbie
  • Posts: 2
  • Country: lk
Re: Converting magnitude ratio to complex form
« Reply #3 on: April 11, 2018, 03:54:59 pm »
Sorry, I forgot to mention that the phase is also provided.
 

Offline hagster

  • Regular Contributor
  • *
  • Posts: 205
Re: Converting magnitude ratio to complex form
« Reply #4 on: April 11, 2018, 04:45:23 pm »
You only need to convert the polar notation to cartesian. Google will help you.

Or touchstone files can have log amplitude phase data.
« Last Edit: April 11, 2018, 05:11:59 pm by hagster »
 

Offline kerrsmith

  • Regular Contributor
  • *
  • Posts: 63
  • Country: 00
Re: Converting magnitude ratio to complex form
« Reply #5 on: April 16, 2018, 08:05:58 am »
I have been using this chip (AD8302) myself for the last week or so and have also been hunting for this kind of information. The most useful site I have found so far is the 'HF Arduino Vna' one:

https://hamprojects.wordpress.com/2016/02/21/hf-arduino-vna-english-version/

This site explains a lot about creating your own VNA but as far as equations go their Github page is really good:

https://github.com/f4goh/VnArduino

Take a look at the file 'VnArduino.ino' starting at line 549, just after this point there is a list of all the equations needed to calculate things such as reflection coefficient, return loss, SWR and the real and imaginary parts of the impedance.
« Last Edit: April 17, 2018, 11:41:06 pm by kerrsmith »
 

Offline Bud

  • Super Contributor
  • ***
  • Posts: 2308
  • Country: ca
Re: Converting magnitude ratio to complex form
« Reply #6 on: April 17, 2018, 04:49:57 am »
Sorry, I forgot to mention that the phase is also provided.

You can make a Touchstone file directly using mag(db) and phase, just make a right header for it, search for more information on Touchstone file format.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf