Interpolating Complex Numbers - Page 1
Forum section: electronics / projects

author: jaxbird
author_rank: Frequent Contributor
timestamp: January 18, 2015, 07:07:08 pm
content: Not sure if this is even the correct forum for such a question, but here we are.The problem is, when applying a calibration, I need to use complex numbers, meaning I build tables of these, indexed by frequency.But as the actual measurement frequency is likely to be between 2 recorded calibration points in my lookup table, interpolation is needed.Is there an easy/standard way to interpolate between 2 complex numbers? (just linear interpolation, no fancy spline needed)Must be a somewhat common problem, but quick google just seem to suggest everyone just use matcadI'm sure there is a simple way of doing it, and I'll figure it out eventually, but any hints much appreciated.Note: Repeat of a question in my Impedance Analyzer thread, but I hope this might get more exposure.Cheers

author: photon
author_rank: Frequent Contributor
timestamp: January 18, 2015, 07:10:11 pm
content: Just interpolate real and imaginary part.

author: Mechatrommer
author_rank: Super Contributor
timestamp: January 18, 2015, 07:16:39 pm
content: Treat i as x and j as y, visualize as in cartesian plane, things should become clearer and google will get many hits. unless there is application specific that you are aiming requiring fancy methods or splines prediction.

author: jaxbird
author_rank: Frequent Contributor
timestamp: January 18, 2015, 07:45:14 pm
content: Quote from: photon on January 18, 2015, 07:10:11 pmI don't believe that will work.Quote from: Mechatrommer on January 18, 2015, 07:16:39 pmThanks, I believe that is what I will need to figure out, as is based on angle between the vectors and the difference in magnitude.Linear interpolation is fine.

author: IanB
author_rank: Super Contributor
timestamp: January 18, 2015, 08:03:46 pm
content: Linear interpolation with complex numbers is the same as with real numbers.If z1 and z2 are two complex numbers and you want to find the number halfway between them, you simply compute:z = (z1 + z2) / 2More generally, if q is an interpolating fraction (0 <= q <= 1) you compute:z = q * z1 + (1-q) * z2Complex numbers are just numbers. You can do arithmetic with them.

author: jaxbird
author_rank: Frequent Contributor
timestamp: January 18, 2015, 08:18:38 pm
content: Quote from: IanB on January 18, 2015, 08:03:46 pmThanks Ian, that is very helpful (as I'm sure you can tell, complex numbers is not something I get to play with very often)It really simplifies everything to just keep the numbers complex instead of treating the real and imag parts individually.

author: electr_peter
author_rank: Unknown
timestamp: January 18, 2015, 08:20:22 pm
content: Most interpolation methods treat real and imaginary parts separately. As mentioned by others, you can use linear interpolation separately for real and imaginary parts and add them up.If you have very specific restrictions on the number in the first place (like having fixed magnitude), then use something more suitable.

author: jaxbird
author_rank: Frequent Contributor
timestamp: January 18, 2015, 08:31:40 pm
content: Quote from: electr_peter on January 18, 2015, 08:20:22 pmThat was my first attempt, but results were not successful (I'm sure the linear interpolation was working just fine) Results were very strange compared to using exact values not needing interpolation.Could be due to my use case only cares about the phase being between -180 and 180 degrees and not absolute.

author: IanB
author_rank: Super Contributor
timestamp: January 18, 2015, 08:38:08 pm
content: Quote from: jaxbird on January 18, 2015, 08:18:38 pmWell, you can keep the numbers complex when you do algebra with them, but to actually work out the values you will have to work with the real and imaginary parts (unless you have a computer or calculator that is doing the arithmetic for you).A complex number is a pair of numbers, the real part and the imaginary part. So we can say:z1 = (x1, y1)z2 = (x2, y2)In this notation x is the real part and y is the imaginary part (commonly written as z = x + iy).So if we want to compute the interpolationz = (z1 + z2) / 2we are going to havex = (x1 + x2) / 2y = (y1 + y2) / 2z = (x, y)So you can't really get away from looking at the real and imaginary parts, but you don't have to worry about it until you do the actual calculations.

author: dannyf
author_rank: Super Contributor
timestamp: January 18, 2015, 08:40:13 pm
content: QuoteThere really is no answer without knowing the relationship between frequency and the "variable", as expressed in complex numbers. Most of the time, it is likely that the relationship is modulus based but that may not always the case.

author: IanB
author_rank: Super Contributor
timestamp: January 18, 2015, 08:41:45 pm
content: Quote from: jaxbird on January 18, 2015, 08:31:40 pmIf your complex numbers are represented as a magnitude and phase angle (r,theta) rather than real and imaginary parts (x,y), then you will have to convert from polar coordinates to rectangular coordinates before you do the interpolation. You can't do linear interpolation on r and theta like you can do with x and y.

author: dannyf
author_rank: Super Contributor
timestamp: January 18, 2015, 08:46:31 pm
content: QuoteUsually people want the phase to be -90 to +90 degrees. there is a level of redundancy between -180 to +180 -> for example -180 is 0, and so is +180.To bound the phase to -90 and +90 is fair easy, if that's what you want.

author: IanB
author_rank: Super Contributor
timestamp: January 18, 2015, 08:49:27 pm
content: Quote from: dannyf on January 18, 2015, 08:46:31 pmWhy is -180° the same as 0°? I don't follow.

author: jaxbird
author_rank: Frequent Contributor
timestamp: January 18, 2015, 08:58:00 pm
content: Quote from: IanB on January 18, 2015, 08:38:08 pmUnderstand, but luckily I don't have to go that deep as I have available fully functional complex libraries/classes, so I don't have to worry about the inner implementation of complex algebra and have pretty much any common complex function available

author: jaxbird
author_rank: Frequent Contributor
timestamp: January 18, 2015, 09:05:12 pm
content: Quote from: dannyf on January 18, 2015, 08:46:31 pmI do want the full 360 degrees, but as in 200 degrees is actually -160 degrees, not a big deal though, easy to sort out.

author: Mechatrommer
author_rank: Super Contributor
timestamp: January 18, 2015, 10:47:50 pm
content: Quote from: jaxbird on January 18, 2015, 07:45:14 pmeverybody is trying to tell you the same thing,just different length of elaboration.

author: tggzzz
author_rank: Super Contributor
timestamp: January 19, 2015, 12:43:21 am
content: Quote from: IanB on January 18, 2015, 08:41:45 pmNo, you don't have to do that conversion. Whether or not you do that conversion depends on the meaning you are assigning to the numbers.For anoversimplifiedbut concrete example, consider an easterly wind for one hour followed by a westerly wind for one hour. What is the "average" wind? Clearly there are multiple equally correct answers.QuoteCorrect, but you are presuming a linear interpretation is the only valid thing to do; it isn't.I am not a mathematician, but I suspect they will start muttering phrases such as "inside a complex hull". Or not

author: IanB
author_rank: Super Contributor
timestamp: January 19, 2015, 01:55:10 am
content: Quote from: tggzzz on January 19, 2015, 12:43:21 amI don't think this is clear at all.QuoteI will have to disagree with you on this, unless you can provide a concrete counter-example.Let me use your wind example to illustrate.Suppose a boat drifts on the wind in a northeasterly direction for one hour traveling 3 miles, and then drifts in an easterly direction for one hour traveling 2 miles. What is the average drift speed and direction of the boat?If you tried to average this in polar coordinates you would say the drift speed is (3+2)/2 = 2.5 miles per hour, and the drift direction is, what? Do you average that by time or by distance, since direction is neither? Clearly this is not going to work out.In fact, polar coordinates are not additive (interpolation is adding with scale factors), and you can't do addition or subtraction with them in terms of magnitudes and angles and get a useful result.To solve the averaging problem you have to go via rectangular coordinates. You figure out where the boat ends up and then reference that back to the origin. The boat ends up 4.12 miles east of its original position and 2.12 miles north. The boat has therefore traveled 4.64 miles from the starting point in 2 hours, giving an average speed of 2.32 miles per hour. The direction of travel is arctan(4.12/2.12) = 62.8°.The average drift speed of the boat has therefore been 2.32 miles per hour on a bearing of 62.8°.

author: AlfBaz
author_rank: Super Contributor
timestamp: January 19, 2015, 02:18:01 am
content: Thanks Ian.I've only just began using complex math, so to recap what you are saying and to re-enforce the methods I have been using... If I have phase and magnitude I can leave them in that form for multiplication/division but to add/subtract it has to be converted to rectangular format. Is that about it?That's one of the many pitfalls of being self taught, it can take a very long time before you realise you have been doing something the wrong or long way

author: IanB
author_rank: Super Contributor
timestamp: January 19, 2015, 02:39:18 am
content: Quote from: AlfBaz on January 19, 2015, 02:18:01 amAbsolutely. Angle and magnitude are perfect for multiplication and division (multiply/divide the magnitudes, add/subtract the angles), but inconvenient for addition and subtraction. On the other hand rectangular coordinates are great for addition and subtraction, but ugly for multiplication and division.

author: tggzzz
author_rank: Super Contributor
timestamp: January 19, 2015, 03:04:44 am
content: Quote from: IanB on January 19, 2015, 01:55:10 amNo, it isn't clear, as a result of lost and improperly reinstated edits. Mea culpa.I meant consider an 5kt easterly wind for one hour followed by a 5kt westerly wind for one hour.Then, if you are a pilot the average affect on your groundspeed is zero. But if you are interested in the energy passing through a windmill, then the useful average value is 5kt.Yes, that is an oversimplified contrived example, buit it is sufficient to indicate that there can be other useful definitions of "average" depending on thepurpose and meaningof the averaging.Another point is that your average is the simple arithmetic mean. What's your definition for the other "averages" such as geometric, mode, median, etc?

author: IanB
author_rank: Super Contributor
timestamp: January 19, 2015, 06:46:54 am
content: Quote from: tggzzz on January 19, 2015, 03:04:44 amWe seem to be talking at crossed purposes. I don't deny that there are many different kinds of average, and that different averages are useful for different purposes.What I was saying before is that if you have a complex number expressed in polar form as (r,theta), then you can't simply take the average ofrand the average ofthetaand put the two back together again. Complex numbers don't work that way, for any kind of average. You have to treat the number as a whole and obey the rules of complex arithmetic.For other averages such as the geometric mean the definition with complex numbers is the same as with the reals:zmean= sqrt(z1*z2)Since there are two square roots of any complex number it is necessary to pick the preferred root for the answer. But I am not sure that the geometric mean of complex numbers is useful.For something like the median, you need to define what you want the median of, for example the median magnitude.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 19, 2015, 08:49:56 am
content: As said before, the standard linear interpolation form holds on the complex domain as well.It may not be the most suitable method however, as for example if your data points trace out curves on a Smith chart, you would want to use circular segments to interpolate. The suggestion of higher order interpolation methods (such as splines: quadratic or cubic curves, polynomial least-squares, etc.) will have similar results.Tim

author: AndyC_772
author_rank: Super Contributor
timestamp: January 19, 2015, 12:37:47 pm
content: Suppose the two numbers in question are 1 and i respectively.Taking a simple arithmetic mean of the two yields an interpolated result of 0.5 + 0.5i.This is indeed the point on the complex plane that's half way along a straight line joining the two - but the magnitude of this number is 1/SQRT(2), ie. less than the magnitudes of the two numbers we started with.Is this correct? Sure - though personally I find it an unintuitive result, and if you're using the magnitude of a complex number to represent something important, then it's probably not what you wanted.Perhaps what you really want is a number whose magnitude is halfway between that of the two numbers you started with, and a phase that's halfway between the two as well. In that case, you'd need to convert to polar coordinates before taking your average, and then back again. You'd end up with (1/SQRT(2)) + i(1/SQRT(2)), which has a different "correct" magnitude and phase.

author: tggzzz
author_rank: Super Contributor
timestamp: January 19, 2015, 01:13:50 pm
content: Quote from: AndyC_772 on January 19, 2015, 12:37:47 pmAs I implied, and as you spelled out, both procedures/answers are valid.Which is preferable depends on the significance/meaning/interpretation placed on those numbers in a specific application.

author: dannyf
author_rank: Super Contributor
timestamp: January 19, 2015, 01:24:19 pm
content: QuoteAll arithmetic operations can be done in either forms, or exponent form as well.

author: IanB
author_rank: Super Contributor
timestamp: January 19, 2015, 05:44:32 pm
content: Quote from: T3sl4co1l on January 19, 2015, 08:49:56 amQuote from: AndyC_772 on January 19, 2015, 12:37:47 pmQuote from: tggzzz on January 19, 2015, 01:13:50 pmTaking all these answers together and summarizing for people reading along, what it tells us is that interpolation is a path dependent process. If you want to know what value is "half way" between points A and B you need to know what path is followed in getting from A to B. You can then find the point that is half way along this path. The path may be a straight line, an elliptical arc, or some other path. (For instance, if you wanted to interpolate the intermediate position of a planet in orbit you would interpolate along an elliptical arc.)The arithmetic mean makes the assumption of a straight line path, but this is not always the actual or most meaningful path.

author: IanB
author_rank: Super Contributor
timestamp: January 19, 2015, 05:47:22 pm
content: Quote from: dannyf on January 19, 2015, 01:24:19 pmOf course, but "can be done" does not mean convenient.For instance, can you demonstrate to us how to compute the sum of (5 angle 30°) and (3 angle 170°) in polar coordinates?

author: AlfBaz
author_rank: Super Contributor
timestamp: January 19, 2015, 10:08:43 pm
content: Quote from: IanB on January 19, 2015, 02:39:18 amQuote from: dannyf on January 19, 2015, 01:24:19 pmQuote from: IanB on January 19, 2015, 05:47:22 pmIn IanB's first quote he states inconvenient not impossible. I did a quick search and couldn't find any examples so I too would be interested in seeing it. I imagine there'd be some trig involved

author: dannyf
author_rank: Super Contributor
timestamp: January 19, 2015, 10:12:52 pm
content: Quotedepending on your starting point.

author: tggzzz
author_rank: Super Contributor
timestamp: January 19, 2015, 11:36:13 pm
content: Quote from: IanB on January 19, 2015, 05:47:22 pmHalf the battle is choosing the best coordinate system which makes the subsequent maths easier - not original,merely a standard truism.One consideration in determining the best coordinate system is to avoid singularities and ambiguities. A good example is the parametric representation of a straight line, cf the traditional y=MX+c. See maths textbooks for examples.

author: AlfBaz
author_rank: Super Contributor
timestamp: January 24, 2015, 03:05:54 am
content: Quote from: AlfBaz on January 19, 2015, 10:08:43 pmIs this an example of it from Tek?Equation 2 derived from equation 1Add to that Equation 3 used to get the phase angle and it seems to be simply convoluting what would otherwise be a fairly simplistic solution using rectangular form.Is there any reason they have gone this way?

author: IanB
author_rank: Super Contributor
timestamp: January 24, 2015, 03:50:50 am
content: Quote from: AlfBaz on January 24, 2015, 03:05:54 amThat example does lead to a certain amount of painful arithmetic. I don't think it can be completely avoided, however.They want to work outZxfrom the equation below:Zx= VA2/ (VA1- VA2) * RrefThis involves both a subtraction and a division. The subtraction will be most convenient in rectangular coordinates and the division most convenient in polar coordinates. So in some ways it is a lose-lose situation. They have chosen to say, "It can be shown that..." then then presented pre-derived formulas. They are skipping over the hard part and just having the student plug in numbers. This is fine for a measurement lab, but would be short-changing the student in an analysis lesson.(Of course, if you had a good calculator and knew how to use it you could just plug the numbers into the calculator and let it take care of the complex arithmetic.)

author: IanB
author_rank: Super Contributor
timestamp: January 24, 2015, 04:44:58 am
content: To show the working step by step as it might be done with a scientific calculator:VA1= 1.929 V angle 0°VA2= 0.310 V angle -79.95°Rref= 1000 ohmsf= 100 HzFirst we plug inVA1giving (1.929, 0) in rectangular coordinates.Then we plug inVA2giving (0.0541, -0.3052) in rectangular coordinates.Then we subtract the second from the first giving (1.875, 0.3052) in rectangular coordinates, which is 1.900 V angle 9.247°Then we do the division, giving 0.1632 angle -89.20°.Lastly we multiply by 1000 to give 163.2 angle -89.20°, which is (2.287, -163.2) in rectangular coordinates.We therefore find that the resistance is:RESR= 2.287 ohmsand the reactance is:XC= -163.2 ohms (the negative sign makes it a capacitance)The capacitance is therefore:C= -1 / {2(pi)f Xc}C= -1 / {2(pi) * 100 * -163.2} = 9.75 µF

author: f5r5e5d
author_rank: Frequent Contributor
timestamp: January 24, 2015, 11:44:13 am
content: anybody remember the complex conjugate? division is a fine basic operation with complex numbers if you use the conjugate of the denominatorreally is basic to complex arithmeticsometime the polar view is good too - but not needed here for the calc

author: dannyf
author_rank: Super Contributor
timestamp: January 24, 2015, 01:31:54 pm
content: Most complex libraries do division via conjugate multification.The polar form's issue is with singularity.

author: AlfBaz
author_rank: Super Contributor
timestamp: January 24, 2015, 03:46:03 pm
content: Quote from: IanB on January 24, 2015, 04:44:58 amThanks for that Ian. That's exactly how I did it. As I'm teaching myself and seeing a lot of AC math in that "polar" form I was starting to think there may be a reason not to do it in rectangular.If the math in that Tek note is considered "complex" then it appears I was taught it as a first year electrical apprentice with a protractor and a ruler

author: AlfBaz
author_rank: Super Contributor
timestamp: January 24, 2015, 04:05:36 pm
content: Quote from: f5r5e5d on January 24, 2015, 11:44:13 amYeah that's how I was doing it until I progressed to learning about polar math. It's just more steps and more numbers to round down, loosing accuracy along the way by writing down intermediate value.My casio fx-180Pv has only 6 memory slots plus M+ and, unfortunately, only 38 steps for a program which isn't quite enough to get to the end solution if you want to do the calc several times.I've resorted to simple C/C++ console programs using complex.h and it certainly makes life easy, enter the numbers in what ever form you like/have do the calcs with "single" variables and spit them out in what ever form you like/need. I have a C/C++ compiler on my android tablet, input/ouput via the console. No need to waste bench space with PC/laptop. I have yet to find a decent app that is essentially a programmable calculator that does complex numbersandallows scientific notation for the absolute and argument parameters

author: Kalvin
author_rank: Super Contributor
timestamp: January 24, 2015, 04:10:35 pm
content: Quote from: AlfBaz on January 24, 2015, 04:05:36 pmIf you have an Android phone, there are some programmable scientific calculators and calculator emulators available, even for free.

author: AlfBaz
author_rank: Super Contributor
timestamp: January 24, 2015, 04:17:32 pm
content: Quote from: Kalvin on January 24, 2015, 04:10:35 pmThanks, I have started looking but so far the ones I have tried fall short of ideal. Any suggestions would be greatly appreciated

author: IanB
author_rank: Super Contributor
timestamp: January 24, 2015, 05:28:13 pm
content: Quote from: AlfBaz on January 24, 2015, 03:46:03 pmHa. When one says "complex arithmetic" one means, of course, arithmetic with complex numbers. Not so much "arithmetic that is complex" (though there might be a little of that too...)Quote from: AlfBaz on January 24, 2015, 04:05:36 pmAn HP calculator should be able to do that. I ran the above example through the HP-15C, for instance. Though I think your C/C++ programming approach is nice enough.

author: bson
author_rank: Unknown
timestamp: January 24, 2015, 10:20:55 pm
content: Quote from: IanB on January 19, 2015, 05:47:22 pmBut you can interpolate between them easily: (5+3)/2 angle (30°+170°)/2 mod 360° = 4 angle 100° for the halfpoint. If you plot them on a circle you'll see why this makes sense, and why there's no need to compute the vector sum in the first place. It'll come out to the same as a linear interpolation on the flat plane.Edit: just for clarification, the interpolation is along a line with a linearly growing magnitude that forms a spiral and any point along the spiral can easily be interpolated.

author: IanB
author_rank: Super Contributor
timestamp: January 24, 2015, 11:15:06 pm
content: Quote from: bson on January 24, 2015, 10:20:55 pmBut a linear interpolation on the flat plane (Euclidean geometry) is along a straight line between the two points, not a spiral. So it can't come out the same unless the two points are on a straight line passing through the origin.

author: tggzzz
author_rank: Super Contributor
timestamp: January 24, 2015, 11:38:58 pm
content: Quote from: IanB on January 24, 2015, 11:15:06 pmI refer you to your previous posting, with which I agree.https://www.eevblog.com/forum/projects/interpolating-complex-numbers/msg590375/#msg590375

author: miguelvp
author_rank: Super Contributor
timestamp: January 25, 2015, 12:19:41 am
content: From the math review of MITx 6.002x Circuits and ElectronicsPolar coordinates Part 1:Explains the basics of polar coordinates.Polar coordinates Part 2:shows the problem wherez = 1 - jandz = -1 + jAre different angles for Z<z = tan^-1(-1/1) = -Pi/4<z = tan^-1(1/-1) = 3Pi/4 (even if a calculator will give you -Pi/4) because tan^-1(y/z) is really a two argument function in the complex plane.Euler's formulae^(j*theta) = cos(theta) + j * sin(theta)This shows the relation between Euler's formula and complex numbers.z = x+j*y = r*cos(theta) + j*r*sin(theta) to obtain r & theta (polar coordinates)and that is = r*(cos(theta)+j*sin(theta)) which by Euler's formula is = r*e^(j*theta)So, complex to cartesian to polar:z = x+j*y = r*e^(j*theta)Now Inverse EulerNot really useful for complex conversion, but useful for finding integrals of sines and cosines.There are more before and after in the series, the class just started Jan 20th, maybe worth your while at least to get to the Math review section on Complex Numbers.https://www.edx.org/course/circuits-electronics-mitx-6-002x-0

author: IanB
author_rank: Super Contributor
timestamp: January 25, 2015, 02:25:55 am
content: Quote from: tggzzz on January 24, 2015, 11:38:58 pmThis discussion seems to be going round in spirals. The good thing about spirals is they do at least converge on a stationary point if you follow them in the right direction.

author: miguelvp
author_rank: Super Contributor
timestamp: January 25, 2015, 02:33:22 am
content: Quote from: IanB on January 25, 2015, 02:25:55 amWhich is ok if they are 2*n*Pi for any n that is a natural number negative or positiveWell, nobody mentioned Euler angles, and they are quite handy for going back and forth polar and complex.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 25, 2015, 06:15:34 am
content: Remember your coordinate system matters, too. Doing it on a Smith chart (impedance/reflectance, depending on which set of axes you pick) may be more practical. You generally get superpositions of circles, but the centers and rates of them all vary, so that picking a unique curve is probably better done with higher order interpolation (i.e., curve fitting rather than linear).Tim

author: jaxbird
author_rank: Frequent Contributor
timestamp: January 26, 2015, 11:44:54 am
content: Just a quick thanks to everyone for excellent explanations and discussions.Got the calibration interpolation working just fine now:

author: Kalvin
author_rank: Super Contributor
timestamp: January 26, 2015, 11:51:03 am
content: Quote from: jaxbird on January 26, 2015, 11:44:54 amWhat kind of algorithm you use for the complex number interpolation?Br,Kalvin

author: jaxbird
author_rank: Frequent Contributor
timestamp: January 26, 2015, 11:57:20 am
content: Quote from: Kalvin on January 26, 2015, 11:51:03 amBasic linear interpolation, but using polar coordinates and then converting back to complex.

author: Kalvin
author_rank: Super Contributor
timestamp: January 26, 2015, 12:04:22 pm
content: Quote from: jaxbird on January 26, 2015, 11:57:20 amEssentially doing linear interpolating for the real part and the imaginary parts separately?

author: jaxbird
author_rank: Frequent Contributor
timestamp: January 26, 2015, 12:13:13 pm
content: Quote from: Kalvin on January 26, 2015, 12:04:22 pmI'm interpolating the phase and magnitude separately and then back to complex.Some good explanations and examples by IanB and others a few pages back.

author: Kalvin
author_rank: Super Contributor
timestamp: January 26, 2015, 12:22:32 pm
content: Quote from: jaxbird on January 26, 2015, 12:13:13 pmMy bad. You actually stated using the polar form.

author: dannyf
author_rank: Super Contributor
timestamp: January 26, 2015, 01:48:42 pm
content: QuoteThe "right" way to interpolate will depend on the underlying relationship between the variables, in your case, frequency and this complex number.Your approach would be akin to taking the geometric average (not quite, however). The interpolating in the real / imaginary plane would be akin to the arithmetic average.Assuming that the relationship is sufficiently linear locally, the linear interpolation would be more "correct" and easier as well.If the complex number you are trying to interpolate is impedance (of the DUT for example), the linear interpolation would give you the correct answer for resistance and inductance (where the impedance is either frequency-invariant or linear to frequency).In the case of a capacitance, it is more complex as the relationship is concave (where geometric averages are a closer approximation).

author: jaxbird
author_rank: Frequent Contributor
timestamp: January 26, 2015, 02:26:10 pm
content: Quote from: dannyf on January 26, 2015, 01:48:42 pmJust to describe in more detail how I'm using the interpolation:Based on an Open/Short calibration, I use the result of the interpolated values (zOpen and zShorted) in the following formula to apply calibration:zDut = ((zShorted - zMeasured) / (zMeasured - zOpen)) * zOpen;All being complex numbers.This does remove a few instrument artifacts plus compensate for existing inductance, capacitance, impedance offset.The calibration can be e.g. 200 points between 1Hz and 20MHz.