搜索
bottom↓
回复: 68

Software-based LCR meter

  [复制链接]

出0入0汤圆

发表于 2013-1-20 10:17:28 | 显示全部楼层 |阅读模式
In a separate thread, I proposed a impedance meter that relies primarily on software to detect phase shifts, in order to greatly simplify the design.

I have since do some simulation and intend to build a prototype to see how it actually works.

So this thread is just to document the process.

阿莫论坛20周年了!感谢大家的支持与爱护!!

一只鸟敢站在脆弱的枝条上歇脚,它依仗的不是枝条不会断,而是自己有翅膀,会飞。

出0入0汤圆

 楼主| 发表于 2013-1-20 10:20:34 | 显示全部楼层
Overview:

A typical autobalancing bridge requires sampling both the voltage signal (that energizes the dut, Zx) and an out-of-phase voltage drop on the measurement resistor, Rm, that is proportional to the current going through Zx.

The measurement system should be able to detect both amplitude of the two signals, as well as their relative phase shifts.

The typical solution is primarily hardware driven and fairly complicated.

出0入0汤圆

 楼主| 发表于 2013-1-20 10:23:58 | 显示全部楼层
Concept:

The original concept comes from a Circuit Cellar design where the authors tried to measure the voltage / curreng signals and then detect the zero crossing and interpolating the phase shifts. The amplitude detection is based on the maximum signal sampled.

Given that the frequency of the energizing signal is known (as it is produced by the mcu), we could easily sample the voltage / current signals and then fit them to a sine / cosine curve to find out both their amplitude and their relative phase shifts.

出0入0汤圆

 楼主| 发表于 2013-1-20 10:26:09 | 显示全部楼层
Curve fitting:

There are many ways to fit a sine/cosine series of sampled data to a sine/cosine equation. I mentioned FFT (most accurate but most computationally intense), or detection of zero crossing (simple but not very accurate, and prone to measurement errors).

Here, I am going to try ieee-std-1057.

出0入0汤圆

 楼主| 发表于 2013-1-20 10:34:12 | 显示全部楼层
IEEE-STD-1057:

IEEE-std-1057 ("ieee1057") is a standardized procedure for digital recorders to decompose a sine signal into amplitude, frequency, phase shifts, and offset.

(1) y(t) = A * cosine(2 * pi * f * t) + B * sine(2 * pi * f * t) + C + error(t);

where y(t) is the sampled data, f is the frequency, A/B/C are the amplitude and error() is the measurement error with 0 mean.

Alternatively, equation (1) can be rewritten as:

(2) y(t) = A0 * cosine(2 * pi * f * t + theta) + C + error(t);

where A0 is the amplitude and theta is the phase shift.

In our case, f (frequency of the energyzing signal is known) so we simply need to solve for A, B, C based on y(t), cosine(2 * pi * f * t) and sine(2 * pi * f * t): those are linear equations with 3 unknowns.

The ieee1057 algorithm is laid out in the following document:



The one we care about is section 4.1.3.2 (p19).

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x

出0入0汤圆

 楼主| 发表于 2013-1-20 10:40:21 | 显示全部楼层
Implementation of IEEE1057:

Here is the code for ieee1057:

  1. //ieee-std-1057, non-matrix 3 parameter sine curve fitting
  2. //ieee-std-1057 1994, P19
  3. void ieee1057_3(unsigned short length,                //sample data length
  4.                 unsigned short * buffer,        //input sample data buffer
  5.                 FITTED_COSINE_T * output        //vector data output
  6.                ) {
  7.     unsigned short n;                                                //index
  8.     double alphan, betan;                                        //sine / cosine terms
  9.     double sum_yn=0, sum_alphan=0, sum_betan=0;        //define the sums, on P19
  10.     double sum_alphanxbetan=0, sum_alphan2=0, sum_betan2=0;        //define the sums, on P19
  11.     double sum_ynxalphan=0, sum_ynxbetan=0, sum_yn2=0;        //define the sums, on P19
  12.     double Xn, Xd;                                                                //temp variables used in calculation

  13.     //calculate signal sums
  14.     for (n=0; n<length; n++) {
  15.         //calculate alpha / beta
  16.         alphan=cos(_2PI * f_osc * n / N);
  17.         betan=sin(_2PI * f_osc * n / N);

  18.         //caulate the sums
  19.         sum_yn += buffer[n];
  20.         sum_alphan += alphan;
  21.         sum_betan += betan;
  22.         sum_alphanxbetan += alphan * betan;
  23.         sum_alphan2 += alphan * alphan;
  24.         sum_betan2 += betan * betan;
  25.         sum_ynxalphan += buffer[n] * alphan;
  26.         sum_ynxbetan += buffer[n] * betan;
  27.         sum_yn2 += ((double)buffer[n]) * buffer[n];        //to avoid overflow
  28.     }

  29.     //calculate An/Ad
  30.     Xn =         (sum_ynxalphan - sum_alphan * sum_yn / M) / (sum_alphanxbetan - sum_alphan * sum_betan / M) -
  31.             (sum_ynxbetan - sum_betan * sum_yn / M) / (sum_betan2 - sum_betan * sum_betan / M);
  32.     Xd =        (sum_alphan2 - sum_alphan * sum_alphan / M) / (sum_alphanxbetan - sum_alphan * sum_betan / M) -
  33.             (sum_alphanxbetan - sum_betan * sum_alphan / M) / (sum_betan2 - sum_betan * sum_betan / M);
  34.     output->A = Xn / Xd;
  35.     Xn =        (sum_ynxalphan - sum_alphan * sum_yn / M) / (sum_alphan2 - sum_alphan * sum_alphan / M) -
  36.             (sum_ynxbetan - sum_betan * sum_yn / M) / (sum_alphanxbetan - sum_betan * sum_alphan / M);
  37.     Xd =        (sum_alphanxbetan - sum_alphan * sum_betan / M) / (sum_alphan2 - sum_alphan * sum_alphan / M) -
  38.             (sum_betan2 - sum_betan * sum_betan / M) / (sum_alphanxbetan - sum_betan * sum_alphan / M);
  39.     output->B = Xn / Xd;
  40.     output->C = sum_yn / M - output->A * sum_alphan / M - output->B * sum_betan / M;

  41.     //alternative output
  42.     output->A0 = sqrt(output->A * output->A + output->B * output->B);
  43.     output->theta = atan(-output->B / output->A);
  44.     //output->theta += (output->A < 0)? PI: 0;
  45. }
复制代码
The code is a carbon-copy of the IEEE paper, down to the notation used.

It takes three parameters:

1) unsigned short length: this sets the number of data samples supplied to the ieee1057 routine.
2) unsigned short *buffer: this is the actually data from our adc routine, for either the voltage or current signal.
3) FITTED_COSINE_T * output: this is the output of the ieee1057 curve fitting.

FITTED_COSINE_T is defined as such:

  1. typedef struct {
  2.     double A, B, C;                        //fitted cosine wave: yn = A * cosine(wt) + B * sine(wt) + C
  3.     double A0, theta;                //fitted cosine wave: yn = A0 * cosine(wt + theta) + C
  4. } FITTED_COSINE_T;
复制代码
It contains two sets of quantification:

1) A/B/C, corresponding to equation (1) above;
2) A0/theta, corresponding to equation (2) above.

出0入0汤圆

 楼主| 发表于 2013-1-20 10:43:15 | 显示全部楼层
Work flow:

Essentially, we will perform adc on the voltage / current signal, fit them to the ieee1057 routine. From that, we obtain both the amplitude and phase information about the voltage / current through our dut, which allows us to calculate its impedance (decomposed to Zr/Zi, or Z/theta).

Since we don't have the hardware implemented, we will have to simulate the sample data, aka generate it ourselves.

出0入0汤圆

 楼主| 发表于 2013-1-20 10:47:58 | 显示全部楼层
Data generation:

To test our ieee1057 routine, we want to generate a known sine/cosine data series and see if it can be decomposed back to A/B/C, or A0/theta that conforms to the parameters we used to generate that sine/cosine data series.

That's fairly simple:

  1. //generate adc data
  2. void data_gen(        unsigned short length,                 //length of data
  3.                 unsigned short *buffer,                //output data buffer
  4.                 double A,                                        //gain for the sine term
  5.                 double B,                                        //gain for the cosine term
  6.                 double C,                                        //constant
  7.                 double error_gain                        //gain for the error term
  8.              ) {
  9.     unsigned short n;                                                //loop index

  10.     //srand(1235);                                                        //seed the random number generator
  11.     for (n=0; n<length; n++) buffer[n]=        A * cos(_2PI * f_osc * n / N) +                //sine term
  12.                                                                                 B * sin(_2PI * f_osc * n / N) +                //cosine term
  13.                                         C +                                                                //constant
  14.                                         error_gain * (rand() / 32768.0 - 0.5);        //error term, mean = 0.0
  15.     //return;
  16. }
复制代码
data_gen() takes a series of parameters, and produce a data array (in *buffer) of a length specified by the user. The user also specify A/B/C and error_gain: error_gain controls how much noise you want to introduce to the system. High noise means less accurate measurements. I typically use 1% of sqrt (A^2 + B^2), to simulate the general inaccuracy of a typical 10-bit adc module in a mcu.

出0入0汤圆

发表于 2013-1-20 10:57:56 | 显示全部楼层
millwood0 发表于 2013-1-20 10:47
Data generation:

To test our ieee1057 routine, we want to generate a known sine/cosine data series  ...

HIFIDIY论坛测试喇叭单元的自由阻抗曲线用的是类似的方法,发一个SINC函数,然后做FFT计算。十分快速高效的方法。

出0入0汤圆

 楼主| 发表于 2013-1-20 10:58:01 | 显示全部楼层
First test:

Here is how we will pull it together:

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <math.h>

  4. #define PI                                        3.14159265359        //pi
  5. #define _2PI                                (2*PI)                //2 * pi

  6. typedef struct {
  7.     double A, B, C;                        //fitted cosine wave: yn = A * cosine(wt) + B * sine(wt) + C
  8.     double A0, theta;                //fitted cosine wave: yn = A0 * cosine(wt + theta) + C
  9. } FITTED_COSINE_T;

  10. #define M                200                                                //number of data samples, unsigned short
  11. #define N                 (M * f_osc / 10)                                //sample per period
  12. unsigned short voltn[M], curtn[M];                                //data samples
  13. FITTED_COSINE_T volt, curt;                        //voltage / current vectors
  14. double f_osc=10000.0;                                        //sample frequency, in hz

  15. //generate adc data
  16. void data_gen(        unsigned short length,                 //length of data
  17.                 unsigned short *buffer,                //output data buffer
  18.                 double A,                                        //gain for the sine term
  19.                 double B,                                        //gain for the cosine term
  20.                 double C,                                        //constant
  21.                 double error_gain                        //gain for the error term
  22.              ) {
  23.     unsigned short n;                                                //loop index

  24.     //srand(1235);                                                        //seed the random number generator
  25.     for (n=0; n<length; n++) buffer[n]=        A * cos(_2PI * f_osc * n / N) +                //sine term
  26.                                                                                 B * sin(_2PI * f_osc * n / N) +                //cosine term
  27.                                         C +                                                                //constant
  28.                                         error_gain * (rand() / 32768.0 - 0.5);        //error term, mean = 0.0
  29.     //return;
  30. }

  31. //print buffer
  32. void data_prt(unsigned short length, unsigned short * buffer) {
  33.     unsigned short i;                                        //loop index
  34.     printf("simulated data\n");                        //simulated data to be printed
  35.     //for (i=0; i<length; i++) printf("buffer[%4d]=%5d\n", i, buffer[i]);
  36.     for (i=0; i<length; i++) printf("%5d\n", buffer[i]);

  37. }

  38. //ieee-std-1057, non-matrix 3 parameter sine curve fitting
  39. //ieee-std-1057 1994, P19
  40. void ieee1057_3(unsigned short length,                //sample data length
  41.                 unsigned short * buffer,        //input sample data buffer
  42.                 FITTED_COSINE_T * output        //vector data output
  43.                ) {
  44.     unsigned short n;                                                //index
  45.     double alphan, betan;                                        //sine / cosine terms
  46.     double sum_yn=0, sum_alphan=0, sum_betan=0;        //define the sums, on P19
  47.     double sum_alphanxbetan=0, sum_alphan2=0, sum_betan2=0;        //define the sums, on P19
  48.     double sum_ynxalphan=0, sum_ynxbetan=0, sum_yn2=0;        //define the sums, on P19
  49.     double Xn, Xd;                                                                //temp variables used in calculation

  50.     //calculate signal sums
  51.     for (n=0; n<length; n++) {
  52.         //calculate alpha / beta
  53.         alphan=cos(_2PI * f_osc * n / N);
  54.         betan=sin(_2PI * f_osc * n / N);

  55.         //caulate the sums
  56.         sum_yn += buffer[n];
  57.         sum_alphan += alphan;
  58.         sum_betan += betan;
  59.         sum_alphanxbetan += alphan * betan;
  60.         sum_alphan2 += alphan * alphan;
  61.         sum_betan2 += betan * betan;
  62.         sum_ynxalphan += buffer[n] * alphan;
  63.         sum_ynxbetan += buffer[n] * betan;
  64.         sum_yn2 += ((double)buffer[n]) * buffer[n];        //to avoid overflow
  65.     }

  66.     //calculate An/Ad
  67.     Xn =         (sum_ynxalphan - sum_alphan * sum_yn / M) / (sum_alphanxbetan - sum_alphan * sum_betan / M) -
  68.             (sum_ynxbetan - sum_betan * sum_yn / M) / (sum_betan2 - sum_betan * sum_betan / M);
  69.     Xd =        (sum_alphan2 - sum_alphan * sum_alphan / M) / (sum_alphanxbetan - sum_alphan * sum_betan / M) -
  70.             (sum_alphanxbetan - sum_betan * sum_alphan / M) / (sum_betan2 - sum_betan * sum_betan / M);
  71.     output->A = Xn / Xd;
  72.     Xn =        (sum_ynxalphan - sum_alphan * sum_yn / M) / (sum_alphan2 - sum_alphan * sum_alphan / M) -
  73.             (sum_ynxbetan - sum_betan * sum_yn / M) / (sum_alphanxbetan - sum_betan * sum_alphan / M);
  74.     Xd =        (sum_alphanxbetan - sum_alphan * sum_betan / M) / (sum_alphan2 - sum_alphan * sum_alphan / M) -
  75.             (sum_betan2 - sum_betan * sum_betan / M) / (sum_alphanxbetan - sum_betan * sum_alphan / M);
  76.     output->B = Xn / Xd;
  77.     output->C = sum_yn / M - output->A * sum_alphan / M - output->B * sum_betan / M;

  78.     //alternative output
  79.     output->A0 = sqrt(output->A * output->A + output->B * output->B);
  80.     output->theta = atan(-output->B / output->A);
  81.     //output->theta += (output->A < 0)? PI: 0;
  82. }

  83. int main(void) {
  84.     //generate simulated data
  85.     data_gen(M, voltn, 500, 100, 1000, 10);        //voltage signal
  86.     //data_prt(M, voltn);                                        //print out data
  87.     //data_gen(M, curtn, 100, 200, 2000, 10);        //current signal
  88.     //data_prt(M, currentn);

  89.         //simulated data generation
  90.         //data_gen1(M, voltn, curtn);                                //load specification in data_gen1()

  91.     //calculate the voltage signal
  92.     ieee1057_3(M, voltn, &volt);
  93.     printf("volt.A = %10.2f, volt.B = %10.2f, volt.C = %10.2f\n", volt.A, volt.B, volt.C);
  94.     printf("volt.A0 = %10.2f, volt.theta = %10.2f\n", volt.A0, volt.theta);

  95.     return 0;
  96. }
复制代码
The voltn[] series is geneated with A = 500, B = 100, C = 1000, we should expect our ieee1057 to return parameters in that neighborhood.

Here is the output:

  1. volt.A =     499.99, volt.B =     100.23, volt.C =     999.64
  2. volt.A0 =     509.93, volt.theta =      -0.20
复制代码
So A is 499.99 vs. 500.00, B is 100.23 vs. 100.00, C is 999.64 vs. 1000.00, pretty accurate.

The A0 / theta parameters are similarly accurate - you can do the math.

note: for some reason, theta is out of phase. That doesn't matter for now, as we will reverse it later.

So our ieee1057() routine is accurate, reasonably so.

You can play with the various parameters to get a sense of how the parameters impact each other. A word of caution: as we use unsigned short for the sampled data (they come from a 10-bit adc), you need to make sure that the C parameter is sufficiently large to avoid going negative (a negative number translates into a large positive number, due to 2's compliments).

出0入0汤圆

 楼主| 发表于 2013-1-20 11:04:24 | 显示全部楼层
Two observations:
1) because of the least-mean-square approach, the ieee1057 routine is incredibly resistant to noises, particularly when sample size is large (> 400 points or so). I think on larger mcus, you can probably set M to 2000 (-> 4KB for each signal and 8KB total). This allows you to easily get to <0.1% accuracy.
2) you will also find that you can feed the routine with data sampled across a partial cycle and the routine will still be able to decompose to the right parameters. However, undersampling is more preferred than oversampling.

The ieee1057 routine presented here is pretty crude, given its being public domain. It operates in batch mode and is very space hungary. There are iterative / adaptive ieee1057 algorithms out there but they are typically proprietary. If you have a sufficiently fast mcu / processor (fpga for example), you can lay a Kalman filter on top of this and produce some pretty fancy impedance meters.

出0入0汤圆

 楼主| 发表于 2013-1-20 11:13:42 | 显示全部楼层
Impedance calculation:

The ieee1057 is the hard part.

Once we have obtained the amplitude / phase information about the voltage / current signal through the dut, we can calculate its impedance easily: pure math:

  1. /calculate impedance (Zdut)
  2. //measurement approach: autobalancing bridge
  3. //connection:
  4. //
  5. //            - volt (sampling point)                - curt (sampling point)
  6. //            |                                      |
  7. //            |                                      |
  8. //            |    ------               ------       |
  9. // Vosc---------- | Zdut |-------------|  Rm  |-------
  10. // (freq=f_osc)    ------      |        ------       |
  11. //                             |                     |
  12. //                             |       |------|      |
  13. //                             |-------|-     |      |
  14. //                                     |Amp  O|------|
  15. //                             |-------|+     |
  16. //                             |       |------|
  17. //                           Vbias
  18. //                             |
  19. //                             |
  20. //                            --- (GND)
  21. //                             -
  22. //
  23. void impedance(FITTED_COSINE_T * voltage, FITTED_COSINE_T * current, IMPEDANCE_T * dut) {
  24.     //double tmp;                                                                //temperary variable

  25.     //calculate current through Rm
  26.     //tmp = current.A0 / Rm;
  27.     dut->Z = voltage->A0 * Rm / current->A0;                // tmp;
  28.     dut->theta = /*-*/(current->theta - voltage->theta);        //eliminate '-' as the current signal is out of phase.
  29.     dut->Zi= dut->Z * sin(dut->theta);
  30.     dut->Zr= dut->Z * cos(dut->theta);

  31.     //calculate L or C
  32.     if (dut->theta > 0) {                                        //capacitive load
  33.         dut->LC = 1.0 / (dut->Zi * _2PI * f_osc);        //calculate C, in f
  34.     } else {
  35.         dut->LC = -dut->Zi / (_2PI * f_osc);        //calculate L, in H
  36.     }
  37. }
复制代码
That's the basic math that any EE will know how to do, with his/her eyes blindfolded.

IMPEDANCE_T is defined as such:

  1. typedef struct {
  2.     double Z;                                //parallel / serial impedance
  3.     double Zr, Zi;                        //parallel/serial impmedance, real and imaginary
  4.     //double Sr, Si;                //serial impedance, real and imaginary
  5.     double theta;                        //angles
  6.     double Q;                                //Q factor
  7.     double LC;                                //dut's resistance, L(uh) or C(ph)
  8. } IMPEDANCE_T;
复制代码
Z is the impedance, Zr/Zi being its real / imaginary part, respectively.

We also allow the potential to calculate Q (=tan(90 degree - theta)), and we allow decomposing that to an inductance or a capacitance figure, LC (in uh/pf), based on the sign of Zi, or if we are calculating parallel / serial parameters.

出0入0汤圆

 楼主| 发表于 2013-1-20 11:17:38 | 显示全部楼层
Copyright:

I don't wish to claim any copyright, or credit for the code posted in this thread. You can do whatever you want with it, including personal or commercial uses.

I also take no responsibilities whatsoever for your use of this code.

出0入0汤圆

 楼主| 发表于 2013-1-20 11:18:43 | 显示全部楼层
Tomorrow:

when I return tomorrow, I will provide additional code that ties all of this together, that takes adc data and estimates impedance from that.

Enjoy.

出0入0汤圆

 楼主| 发表于 2013-1-20 11:20:16 | 显示全部楼层
Compiler/portability:

the code posted so far is entirely in C, so it should have no problem being compiled under any reasonably good C compiler. I personally used BC5.5 + CB for my testing but there is no reason that it shouldn't work on other compilers / ide.

出0入0汤圆

发表于 2013-1-20 11:35:22 来自手机 | 显示全部楼层
什么玩意…?

出0入0汤圆

发表于 2013-1-20 12:49:06 | 显示全部楼层
good job,this is a new idea to take advantage of the capability of the computer

出0入0汤圆

发表于 2013-1-20 13:29:04 | 显示全部楼层
呵呵,想必楼主受过英语背景教育吧?英文写的很地道,极其羡慕中!

出0入0汤圆

发表于 2013-1-20 14:02:17 | 显示全部楼层
fickle 发表于 2013-1-20 13:29
呵呵,想必楼主受过英语背景教育吧?英文写的很地道,极其羡慕中!

樓主就是個地道的外國人。

出0入0汤圆

发表于 2013-1-20 15:23:40 | 显示全部楼层
fickle 发表于 2013-1-20 13:29
呵呵,想必楼主受过英语背景教育吧?英文写的很地道,极其羡慕中!

楼主从未用中文写过帖子,所以你认为了!嘿嘿!

出0入0汤圆

发表于 2013-1-20 17:20:24 | 显示全部楼层
搬凳子学习..

出675入8汤圆

发表于 2013-1-20 18:09:29 来自手机 | 显示全部楼层
标记一下
来自:amoBBS 阿莫电子论坛 Android客户端

出0入0汤圆

发表于 2013-1-20 21:23:07 | 显示全部楼层
mark software-based LCR meter

出0入0汤圆

发表于 2013-1-20 21:26:39 来自手机 | 显示全部楼层
Could you write the document in a PDF file?

出0入0汤圆

发表于 2013-1-20 22:34:57 | 显示全部楼层
jlhgold 发表于 2013-1-20 15:23
楼主从未用中文写过帖子,所以你认为了!嘿嘿!

能看懂中文,即使是技术论坛,这个不稀奇;英文已经达到英文思考水平,这个也不稀奇;问题是,2个不稀奇放在一起,称作稀奇,不叫稀奇吧?呵呵

----------------------------------------------------------------------

本来是想表达对这种算法的实用性怀疑意思。想到楼主毕竟辛苦写了这么多,表示异议,呵呵,也太不厚道。也许,换个角度,建议的角度。

lcr制作的水平,我想划分一下范围:

1、0.1 - 1M 欧姆;这个范围由于信噪比很高,使用什么算法意义不大。

2、1 - 100毫欧姆或者1M - 10M范围内;一般商业手持式lcr测量水平5%,如果使用这个算法测量得到更高精度,那么算法才有实用性。

----------------------------------------------------------------------

从楼主列出的技术原理公式看,猜测是自适应lms算法?而这个算法,就连自适应的老祖宗bernard都认为,这种算法在微弱信号测量领域只是傅立叶变换的跟随者(competitor)。

总之,如果有可能使用这种算法测量10M电阻的话,看看其精度如何?那么,这种算法实用性便一目了然。



出0入0汤圆

发表于 2013-1-21 00:15:56 | 显示全部楼层
半个凳子看看。

出0入0汤圆

发表于 2013-1-21 00:48:26 | 显示全部楼层
期待已久,好好学习.

出0入0汤圆

发表于 2013-1-21 07:01:00 | 显示全部楼层
fickle 发表于 2013-1-20 22:34
能看懂中文,即使是技术论坛,这个不稀奇;英文已经达到英文思考水平,这个也不稀奇;问题是,2个不稀奇 ...

只知道大概原理,不知道算法的飘过!哈哈!

出0入0汤圆

发表于 2013-1-21 10:09:47 | 显示全部楼层
提高吸引大家这个科目的兴趣,上传葡萄牙硕士生的阻抗测量系统的论文.
也是使用正弦拟合算法.

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x

出0入0汤圆

发表于 2013-1-21 13:10:48 | 显示全部楼层
看晕了.................

出0入0汤圆

发表于 2013-1-21 13:20:30 | 显示全部楼层
fickle 发表于 2013-1-20 13:29
呵呵,想必楼主受过英语背景教育吧?英文写的很地道,极其羡慕中!

俺不这么认为……

出0入0汤圆

 楼主| 发表于 2013-1-22 05:22:20 | 显示全部楼层
提高吸引大家这个科目的兴趣,上传葡萄牙硕士生的阻抗测量系统的论文.


Wow! that's an excellent article.

Our approaches are almost identical: his is a 7-parameter estimation (which is actually FFT + 2 ieee1057 3-parameter estimates).

I also looked through other references listed in that article. there seems to be an explosion of research in this year, over the last 5 years or so.

A paper by Pedro Ramos compared the 7-parameter, sinc fit, and ellipse fit and found the 7-parameter approach can get down to 0.01% (2000 samples per channel).

出0入0汤圆

 楼主| 发表于 2013-1-22 05:23:12 | 显示全部楼层
the referernced article above got me thinking. I may be able to jointly estimate the A/B/C parameters of the voltage and current signals. That would create a 6-parameter variant.

出0入0汤圆

 楼主| 发表于 2013-1-22 05:40:36 | 显示全部楼层
本帖最后由 millwood0 于 2013-1-22 05:55 编辑

IEEE1057 3-parameter implementation:

as promised, here is the (more) wholesome implementation of the IEEE1057 3-parameter approach:

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <math.h>

  4. #define PI                                        3.14159265359        //pi
  5. #define _2PI                                (2*PI)                //2 * pi

  6. typedef struct {
  7.     double A, B, C;                        //fitted cosine wave: yn = A * cosine(wt) + B * sine(wt) + C
  8.     double A0, theta;                //fitted cosine wave: yn = A0 * cosine(wt + theta) + C
  9. } FITTED_COSINE_T;

  10. typedef struct {
  11.     double Z;                                //parallel / serial impedance
  12.     double Zr, Zi;                        //parallel/serial impmedance, real and imaginary
  13.     //double Sr, Si;                //serial impedance, real and imaginary
  14.     double theta;                        //angles
  15.     double Q;                                //Q factor
  16.     double LC;                                //dut's resistance, L(uh) or C(ph)
  17. } IMPEDANCE_T;

  18. #define M                200                                                //number of data samples, unsigned short
  19. #define N                 (M * f_osc / 10)                                //sample per period
  20. unsigned short voltn[M], curtn[M];                                //data samples
  21. FITTED_COSINE_T volt, curt;                        //voltage / current vectors
  22. double f_osc=10000.0;                                        //sample frequency, in hz

  23. //impedance measurement
  24. double Rm=1000.0;                                        //measurement resistor, in ohm
  25. IMPEDANCE_T dut;                                        //device undertest

  26. //generate adc data
  27. void data_gen(        unsigned short length,                 //length of data
  28.                 unsigned short *buffer,                //output data buffer
  29.                 double A,                                        //gain for the sine term
  30.                 double B,                                        //gain for the cosine term
  31.                 double C,                                        //constant
  32.                 double error_gain                        //gain for the error term
  33.              ) {
  34.     unsigned short n;                                                //loop index

  35.     //srand(1235);                                                        //seed the random number generator
  36.     for (n=0; n<length; n++) buffer[n]=        A * cos(_2PI * f_osc * n / N) +                //sine term
  37.                                                                                 B * sin(_2PI * f_osc * n / N) +                //cosine term
  38.                                         C +                                                                //constant
  39.                                         error_gain * (rand() / 32768.0 - 0.5);        //error term, mean = 0.0
  40.     //return;
  41. }

  42. //generate adc data
  43. void data_gen1(        unsigned short length,                 //length of data
  44.                 unsigned short *buffer_v,        //output data buffer
  45.                 unsigned short *buffer_c        //output data buffer
  46.              ) {
  47.     unsigned short n;                                                //loop index
  48.         double amplitude = 100;                                        //osc amplitude
  49.         double theta_v = 10.0 / 360 * _2PI;                //voltage signal

  50.         //set up dut
  51.         dut.Z = 1000;                                                        //dut's impedance
  52.         dut.theta = -45.0 / 360 * _2PI;                        //theta. - for capacitance and + for inductance. converting from degrees to radius
  53.         dut.Zr = dut.Z * cos(dut.theta);
  54.         dut.Zi = dut.Z * sin(dut.theta);

  55.     //srand(1235);                                                        //seed the random number generator
  56.     for (n=0; n<length; n++) {
  57.             buffer_v[n]=        amplitude * cos(_2PI * f_osc * n / N + theta_v) +                //cosine term
  58.                     //B * sin(_2PI * f_osc * n / N) +                //sine term
  59.                     500 +                                                                //constant
  60.                     0.01 * amplitude * (rand() / 32768.0 - 0.5);        //error term, mean = 0.0
  61.             buffer_c[n]=        - 1* amplitude / dut.Z * Rm * cos(_2PI * f_osc * n / N + theta_v + dut.theta) +                //cosine term. negative due to the opamp being out of phase
  62.                     //B * sin(_2PI * f_osc * n / N) +                //sine term
  63.                     1000 +                                                                //constant
  64.                     0.01 * amplitude * (rand() / 32768.0 - 0.5);        //error term, mean = 0.0
  65.                 //printf("buffer_v[%4d] = %10d, buffer_c[%4d] = %10d\n", n, buffer_v[n], n, buffer_c[n]);
  66.     }
  67.     //return;
  68. }
  69. //print buffer
  70. void data_prt(unsigned short length, unsigned short * buffer) {
  71.     unsigned short i;                                        //loop index
  72.     printf("simulated data\n");                        //simulated data to be printed
  73.     //for (i=0; i<length; i++) printf("buffer[%4d]=%5d\n", i, buffer[i]);
  74.     for (i=0; i<length; i++) printf("%5d\n", buffer[i]);

  75. }

  76. //ieee-std-1057, non-matrix 3 parameter sine curve fitting
  77. //ieee-std-1057 1994, P19
  78. void ieee1057_3(unsigned short length,                //sample data length
  79.                 unsigned short * buffer,        //input sample data buffer
  80.                 FITTED_COSINE_T * output        //vector data output
  81.                ) {
  82.     unsigned short n;                                                //index
  83.     double alphan, betan;                                        //sine / cosine terms
  84.     double sum_yn=0, sum_alphan=0, sum_betan=0;        //define the sums, on P19
  85.     double sum_alphanxbetan=0, sum_alphan2=0, sum_betan2=0;        //define the sums, on P19
  86.     double sum_ynxalphan=0, sum_ynxbetan=0, sum_yn2=0;        //define the sums, on P19
  87.     double Xn, Xd;                                                                //temp variables used in calculation

  88.     //calculate signal sums
  89.     for (n=0; n<length; n++) {
  90.         //calculate alpha / beta
  91.         alphan=cos(_2PI * f_osc * n / N);
  92.         betan=sin(_2PI * f_osc * n / N);

  93.         //caulate the sums
  94.         sum_yn += buffer[n];
  95.         sum_alphan += alphan;
  96.         sum_betan += betan;
  97.         sum_alphanxbetan += alphan * betan;
  98.         sum_alphan2 += alphan * alphan;
  99.         sum_betan2 += betan * betan;
  100.         sum_ynxalphan += buffer[n] * alphan;
  101.         sum_ynxbetan += buffer[n] * betan;
  102.         sum_yn2 += ((double)buffer[n]) * buffer[n];        //to avoid overflow
  103.     }

  104.     //calculate An/Ad
  105.     Xn =         (sum_ynxalphan - sum_alphan * sum_yn / M) / (sum_alphanxbetan - sum_alphan * sum_betan / M) -
  106.             (sum_ynxbetan - sum_betan * sum_yn / M) / (sum_betan2 - sum_betan * sum_betan / M);
  107.     Xd =        (sum_alphan2 - sum_alphan * sum_alphan / M) / (sum_alphanxbetan - sum_alphan * sum_betan / M) -
  108.             (sum_alphanxbetan - sum_betan * sum_alphan / M) / (sum_betan2 - sum_betan * sum_betan / M);
  109.     output->A = Xn / Xd;
  110.     Xn =        (sum_ynxalphan - sum_alphan * sum_yn / M) / (sum_alphan2 - sum_alphan * sum_alphan / M) -
  111.             (sum_ynxbetan - sum_betan * sum_yn / M) / (sum_alphanxbetan - sum_betan * sum_alphan / M);
  112.     Xd =        (sum_alphanxbetan - sum_alphan * sum_betan / M) / (sum_alphan2 - sum_alphan * sum_alphan / M) -
  113.             (sum_betan2 - sum_betan * sum_betan / M) / (sum_alphanxbetan - sum_betan * sum_alphan / M);
  114.     output->B = Xn / Xd;
  115.     output->C = sum_yn / M - output->A * sum_alphan / M - output->B * sum_betan / M;

  116.     //alternative output
  117.     output->A0 = sqrt(output->A * output->A + output->B * output->B);
  118.     output->theta = atan(-output->B / output->A);
  119.     //output->theta += (output->A < 0)? PI: 0;
  120. }

  121. //calculate impedance (Zdut)
  122. //measurement approach: autobalancing bridge
  123. //connection:
  124. //
  125. //            - volt (sampling point)                - curt (sampling point)
  126. //            |                                      |
  127. //            |                                      |
  128. //            |    ------               ------       |
  129. // Vosc---------- | Zdut |-------------|  Rm  |-------
  130. // (freq=f_osc)    ------      |        ------       |
  131. //                             |                     |
  132. //                             |       |------|      |
  133. //                             |-------|-     |      |
  134. //                                     |Amp  O|------|
  135. //                             |-------|+     |
  136. //                             |       |------|
  137. //                           Vbias
  138. //                             |
  139. //                             |
  140. //                            --- (GND)
  141. //                             -
  142. //
  143. void impedance(FITTED_COSINE_T * voltage, FITTED_COSINE_T * current, IMPEDANCE_T * dut) {
  144.     //double tmp;                                                                //temperary variable

  145.     //calculate current through Rm
  146.     //tmp = current.A0 / Rm;
  147.     dut->Z = voltage->A0 * Rm / current->A0;                // tmp;
  148.     dut->theta = /*-*/(current->theta - voltage->theta);        //eliminate '-' as the current signal is out of phase.
  149.     dut->Zi= dut->Z * sin(dut->theta);
  150.     dut->Zr= dut->Z * cos(dut->theta);

  151.     //calculate L or C
  152.     if (dut->theta < 0) {                                        //capacitive load
  153.         dut->LC = -1.0 / (dut->Zi * _2PI * f_osc);        //calculate C, in f
  154.     } else {
  155.         dut->LC = dut->Zi / (_2PI * f_osc);        //calculate L, in H
  156.     }
  157. }

  158. //perform the calculation for dut's impedance / LCR parameters
  159. void Z_measure(        unsigned short length,                //length of data sample
  160.                                 unsigned short *voltage,        //voltage data array
  161.                                 unsigned short *current,        //current data array
  162.                                 IMPEDANCE_T *dut)                         //device data measurement. Output
  163.                                 {
  164.         //FITTED_COSINE_T volt, curt;                        //temp variables.
  165.         ieee1057_3(length, voltage, &volt);        //covert the voltage
  166.         ieee1057_3(length, current, &curt);                //covert the current
  167.         //curt.theta = - curt.theta;                                        //current signal measured 180 degrees opposite
  168.         impedance(&volt, &curt, dut);                                //calculate the impedance
  169. }

  170. int main(void) {
  171.     //generate simulated data
  172.     //data_gen(M, voltn, 500, 100, 1000, 10);        //voltage signal
  173.     //data_prt(M, voltn);                                        //print out data
  174.     //data_gen(M, curtn, 100, 200, 2000, 10);        //current signal
  175.     //data_prt(M, currentn);

  176.         //simulated data generation
  177.         data_gen1(M, voltn, curtn);                                //load specification in data_gen1()

  178.     //calculate the voltage signal
  179.     ieee1057_3(M, voltn, &volt);
  180.     printf("volt.A = %10.2f, volt.B = %10.2f, volt.C = %10.2f\n", volt.A, volt.B, volt.C);
  181.     printf("volt.A0 = %10.2f, volt.theta = %10.2f\n", volt.A0, volt.theta);

  182.     //calculate the current signal
  183.     ieee1057_3(M, curtn, &curt);
  184.     printf("curt.A = %10.2f, curt.B = %10.2f, curt.C = %10.2f\n", curt.A, curt.B, curt.C);
  185.     printf("curt.A0 = %10.2f, curt.theta = %10.2f\n", curt.A0, curt.theta);

  186.     //estimate dut's impedance parameters
  187.     impedance(&volt, &curt, &dut);

  188.         //alternatively, use the following call to convert the data
  189.         //Z_measure(M, voltn, curtn, &dut);
  190.     printf("dut.Z = %10.2fohm, dut.Zr = %10.2fohm, dut.Zi = %10.2fohm\n", dut.Z, dut.Zr, dut.Zi);
  191.     printf("dut.theta = %10.2f\n", dut.theta);
  192.     printf("dut.Zr = %10.2f, dut.Zi = %10.2f, dut.%1s = %10.2e(u%1s)\n", dut.Zr, dut.Zi, (dut.Zi < 0)?"C":"L", dut.LC*1e6, (dut.Zi < 0)?"f":"h");
  193.     return 0;
  194. }
复制代码
It is practically identical to the one I posted a couple days ago, with the following exception:

1) notational changes: I moved to a notation system identical to IEEE1057's.
2) implemented a data generation module: data_gen1() generates two vectors, based on a voltage signal (buffer_v[]), and a current signal (buffer_c[]). buffer_c[] is generated assuming that the voltage signal runs through a known impedance (specified as dut in the data_gen1() routine), then go through an inverting amplifier with Rm as its feedback resistor -> aka an autobalancing bridge.

In this particular case, we are assuming a dut with impedance of 1kohm, and -45 degrees of Rx (a capacitor of 22.5079n @ 10Khz). We expect that our code should estimate such parameters. Here is the output:

  1. volt.A =      98.52, volt.B =     -17.38, volt.C =     499.45
  2. volt.A0 =     100.04, volt.theta =       0.17
  3. curt.A =     -81.92, curt.B =     -57.35, curt.C =     999.49
  4. curt.A0 =     100.00, curt.theta =      -0.61
  5. dut.Z =    1000.42ohm, dut.Zr =     707.40ohm, dut.Zi =    -707.41ohm
  6. dut.theta =      -0.79
  7. dut.Zr =     707.40, dut.Zi =    -707.41, dut.C =   2.25e-02(uf)

复制代码
So we have Z = 1000.42ohm vs. 1000ohm, C of 22.4983n vs. 22.5079n.

That's pretty good.

3) one small note: for convenience purposes, I introduced a new routine, Z_measure(), which essentially estimates dut's parameters from the sampled data series. You can obtain the same results via calling ieee1057_3() or impedance(), as I did in the code above.

出0入0汤圆

 楼主| 发表于 2013-1-22 05:48:16 | 显示全部楼层
To do:

Two things:

1) we will need to implement this on a mcu to get a real-life sense as to its accuracy / performance.
2) we will need to deal with a sampling delay. The code above assumes that the voltage + current signals are sampled at exactly the same time. The article jt6245 quoted above achieved that via the use of two independent adcs, one for the voltage and another for the current signal. I think that's an overkill. You can solve that via a software correct, as long as the delay is known - which is the case here.

When I come back, I will implement a software DDS to produce a sine wave with known frequency. Buffer that and then drive our dut.

Stay tuned.

出0入0汤圆

 楼主| 发表于 2013-1-22 05:50:53 | 显示全部楼层
Target MCU:

The system will be fairly demanding on the adc module - to perform adc fast enough. The demand for space is dependent on the length specified by the user (M). I think 1000 - 2000 samples (per channel) should be sufficient. That means a mcu with 4 - 8k of ram, minimum.

To start, I will pick a pic24f. But others should work as well.

出0入0汤圆

 楼主| 发表于 2013-1-22 06:45:26 | 显示全部楼层
Very 1st showing:

Here is the very first run of this code on a pic24f, simulated.



I ran the code posted above, other than changing the dut.theta to +45 degrees to accomodate my particular ultoa code.

Good news:
1) It definitely worked, without any modification to the underlying ieee1057 code.
2) code is fairly efficient. My flash usage is only 9KB and my ram usage is 4KB (almost exclusively due to the sample). So implementing this on a smaller mcu is definitely doable.

Bad news: It took about 2.8 seconds to process 2000 pairs of data on a 16Mhz pic24f. I haven't tweak the compiler settings yet but that sounds like too long to be true. I will study that later.

For your reference, here is the main.c:

  1. #include <pic24.h>                                                //we use pic24f
  2. #include <string.h>                                                //we use strcpy
  3. #include "config.h"                                                //configuration words
  4. #include "gpio.h"
  5. #include "delay.h"                                                //we use software delay
  6. #include "misc.h"                                                //we use ultoa
  7. #include "lcd_3wi.h"                                        //we use lcd_3wi
  8. #include "ieee1057.h"                                        //we use ieee1057 3-parameter routines

  9. //hardware configuration
  10. #define OUT_PORT                PORTB
  11. #define OUT_DDR                        TRISB
  12. #define OUT_PIN                        (1<<0)
  13. //end hardware configuration

  14. const unsigned char str0[]="PIC24F LCR v1.00";
  15. const unsigned char str1[]="Zr=     Zi=     ";
  16. unsigned char vRAM[17];                                        //display buffer

  17. void lcr_init(void) {
  18.         strcpy(vRAM, str0); lcd_display(LCD_Line0, vRAM); delay_ms(100);        //display signon message
  19. }

  20. void mcu_init(void) {
  21.         //turn off all peripherals
  22.         PMD1=0xffff;
  23.         PMD2=0xffff;
  24.         PMD3=0xffff;
  25. #if defined(PMD4)
  26.         PMD4=0xffff;
  27. #endif

  28.         //all pins digital
  29.         AD1PCFG = 0xffff;                                        //all pins digital

  30.         //initialize out_pin
  31.         IO_CLR(OUT_PORT, OUT_PIN);
  32.         IO_OUT(OUT_DDR, OUT_PIN);
  33. }

  34. int main(void) {
  35.         mcu_init();                                                        //reset the mcu
  36.         lcd_init();                                                        //initialize the lcd module
  37.         lcr_init();                                                        //initialize the lcr module
  38.         while (1) {
  39.                 //display the estimation
  40.                 strcpy(vRAM, str1);
  41.                 ultoa(&vRAM[3], dut.Z, 5); ultoa(&vRAM[11], dut.Zi, 5);
  42.                 lcd_display(LCD_Line1, vRAM);

  43.                 //simulate adc data
  44.                 data_gen1(M, voltn, curtn);
  45.                 //start timing
  46.                 IO_SET(OUT_PORT, OUT_PIN);
  47.                 //estimate the impedance
  48.                 Z_measure(M, voltn, curtn, &dut);
  49.                 //flip out_pin
  50.                 IO_CLR(OUT_PORT, OUT_PIN);
  51.                 delay_ms(100);
  52.         }
  53. }

复制代码

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x

出0入0汤圆

发表于 2013-1-22 08:20:05 | 显示全部楼层
Standard for Digitizing Wave

出0入0汤圆

 楼主| 发表于 2013-1-31 21:16:36 | 显示全部楼层
Quick update, 1/31/2013:

1) I wrote the display routine. It now shows two formats, one for ESR and another for lcr parameters.

Displaying ESR:


Displaying LCR:


2) I also wrote routine to generate 10khz square wave, utilizing the pic24f's pwm module.

Here is the new code base:

  1. #include <pic24.h>                                                //we use pic24f
  2. #include <string.h>                                                //we use strcpy
  3. #include "config.h"                                                //configuration words
  4. #include "gpio.h"
  5. #include "delay.h"                                                //we use software delay
  6. #include "misc.h"                                                //we use ultoa
  7. #include "lcd_3wi.h"                                        //we use lcd_3wi
  8. #include "ieee1057.h"                                        //we use ieee1057 3-parameter routines
  9. #include "pwm1.h"                                                //we use pwm to generate square wave
  10. #include "pwm5.h"

  11. //hardware configuration
  12. #define OUT_PORT                PORTB
  13. #define OUT_DDR                        TRISB
  14. #define OUT_PIN                        (1<<0)
  15. //end hardware configuration

  16. #define LCR_DISPLAYESR        0                                //display esr
  17. #define LCR_DISPLAYLC        1                                //display lc

  18. const unsigned char str0[]="PIC24F LCR v1.00";                        //sign-on message
  19. const unsigned char str1[]="R=      k\002 v1.00";                //showing real part of the impedance
  20. const unsigned char str2[]="\001=+     k\002 Q=   ";        //showing ESR / imaginary part of the impedance
  21. const unsigned char str2l[]="L=      uh Q=   ";                        //showing inductance + Q
  22. const unsigned char str2c[]="C=      pf Q=   ";                        //showing capacitance + Q
  23. //esr char
  24. const unsigned char font_ESR[]={
  25.         0x1f,
  26.         0x10,
  27.         0x1b,
  28.         0x12,
  29.         0x1b,
  30.         0x01,
  31.         0x1f,
  32.         0x00};
  33. //ohm char
  34. const unsigned char font_Ohm[]={
  35.         0x0e,
  36.         0x11,
  37.         0x11,
  38.         0x11,
  39.         0x0a,
  40.         0x0a,
  41.         0x1b,
  42.         0x00};

  43. const unsigned char range_resistor[]={'m', ' ', 'k', 'M'};
  44. const unsigned char range_capacitor[]={'p', 'n', 'u', 'm'};
  45. const unsigned char range_inductor[]={'n', 'u', 'm', ' '};

  46. unsigned char vRAM[17];                                        //display buffer

  47. //initialize the lcr module
  48. void lcr_init(void) {
  49.         strcpy(vRAM, str0); lcd_display(LCD_Line0, vRAM); delay_ms(100);        //display signon message
  50.         //load special characters
  51.         lcd_cgram(1, font_ESR);
  52.         lcd_cgram(2, font_Ohm);
  53. }

  54. //void display dut parameters
  55. //display_lc: 1: display l/c parameters; 0: display ESR/imaginary data
  56. //with expotential smoothing controlled by weight
  57. void lcr_display(IMPEDANCE_T * dut,  unsigned char display_lc) {
  58.         static double tmp_Zr=0, tmp_Zi=0, tmp_L=0, tmp_C=0;                                                                //temporary variable
  59.         double tmp;
  60.         const double weight=0.5;                                //controls weighing. higher "weight" causes faster / volatile changes
  61.         //for line0
  62.         //display dut.Zr
  63.         //provides some ranging
  64.         strcpy(vRAM, str1);
  65.         tmp_Zr+=weight* (dut->Zr - tmp_Zr); tmp = tmp_Zr;
  66.         if (tmp > 99999e3) {ultoa(&vRAM[3], tmp / 1e6, 5); vRAM[8]=range_resistor[3];}        //potentially out of range
  67.         else if (tmp > 99999) {ultoa(&vRAM[3], tmp / 1e3, 5); vRAM[8]=range_resistor[2];}
  68.         else if (tmp > 99.999) {ultoa(&vRAM[3], tmp, 5); vRAM[8]=range_resistor[1];}
  69.         else {ultoa(&vRAM[3], tmp * 1e3, 5); vRAM[8]=range_resistor[0];}
  70.         lcd_display(LCD_Line0, vRAM);

  71.         //for line1
  72.         //display dut.Zi
  73.         //provides some ranging
  74.         if (display_lc==LCR_DISPLAYESR) {
  75.                 strcpy(vRAM, str2);
  76.                 tmp_Zi+=weight * (dut->Zi - tmp_Zi); tmp = tmp_Zi;
  77.                 if (tmp < 0) {vRAM[2]='-'; tmp = - tmp;}        //reverse the signedness
  78.                 if (tmp > 99999e3) {ultoa(&vRAM[3], tmp / 1e6, 5); vRAM[8]=range_resistor[3];}        //potentially out of range
  79.                 else if (tmp > 99999) {ultoa(&vRAM[3], tmp / 1e3, 5); vRAM[8]=range_resistor[2];}
  80.                 else if (tmp > 99.999) {ultoa(&vRAM[3], tmp, 5); vRAM[8]=range_resistor[1];}
  81.                 else {ultoa(&vRAM[3], tmp * 1e3, 5); vRAM[8]=range_resistor[0];}
  82.         } else {
  83.                 if (dut->Zi > 0) {                                                        //inductance, in Henry
  84.                         strcpy(vRAM, str2l);
  85.                         tmp_L+=weight * (dut->LC - tmp_L); tmp = tmp_L;
  86.                         if (tmp > 99999e-3) {ultoa(&vRAM[3], tmp, 5); vRAM[8]=range_inductor[3];}        //potentially out of range
  87.                         else if (tmp > 99999e-6) {ultoa(&vRAM[3], tmp * 1e3, 5); vRAM[8]=range_inductor[2];}
  88.                         else if (tmp > 99999e-9) {ultoa(&vRAM[3], tmp * 1e6, 5); vRAM[8]=range_inductor[1];}
  89.                         else {ultoa(&vRAM[3], tmp * 1e9, 5); vRAM[8]=range_inductor[0];}
  90.                 } else {                                                                        //capacitance, in Farady
  91.                         strcpy(vRAM, str2c);
  92.                         tmp_C+=weight * (dut->LC - tmp_C); tmp = tmp_C;                                                        //C in farady
  93.                         if (tmp > 99999e-6) {ultoa(&vRAM[3], tmp * 1e3, 5); vRAM[8]=range_capacitor[3];}        //potentially out of range
  94.                         else if (tmp > 99999e-9) {ultoa(&vRAM[3], tmp * 1e6, 5); vRAM[8]=range_capacitor[2];}
  95.                         else if (tmp > 99999e-12) {ultoa(&vRAM[3], tmp * 1e9, 5); vRAM[8]=range_capacitor[1];}
  96.                         else {ultoa(&vRAM[3], tmp * 1e12, 5); vRAM[8]=range_capacitor[0];}
  97.                 }
  98.         }
  99.         //display Q
  100.         ultoa(&vRAM[13], (dut->Q > 999)?999:dut->Q, 3);                //3 digit display. max out at 999

  101.         //display line1
  102.         lcd_display(LCD_Line1, vRAM);
  103. }

  104. void mcu_init(void) {
  105.         //turn off all peripherals
  106.         PMD1=0xffff;
  107.         PMD2=0xffff;
  108.         PMD3=0xffff;
  109. #if defined(PMD4)
  110.         PMD4=0xffff;
  111. #endif

  112.         //all pins digital
  113.         AD1PCFG = 0xffff;                                        //all pins digital

  114.         //initialize out_pin
  115.         IO_CLR(OUT_PORT, OUT_PIN);
  116.         IO_OUT(OUT_DDR, OUT_PIN);
  117. }

  118. int main(void) {
  119.         mcu_init();                                                        //reset the mcu
  120.         lcd_init();                                                        //initialize the lcd module
  121.         lcr_init();                                                        //initialize the lcr module
  122.         //generate a waveform of F_LCR
  123.         pwm1_init();                                                        //initialize the pwm module
  124.         pwm1_set(F_CPU / F_LCR - 1, F_CPU / F_LCR / 2);                                //set frequency / duty cycle
  125.         while (1) {
  126.                 //simulate adc data
  127.                 data_gen1(M, voltn, curtn);

  128.                 //start timing
  129.                 IO_SET(OUT_PORT, OUT_PIN);
  130.                 //estimate the impedance
  131.                 Z_measure(M, voltn, curtn, &dut);
  132.                 //flip out_pin
  133.                 IO_CLR(OUT_PORT, OUT_PIN);

  134.                 //display the estimation
  135.                 lcr_display(&dut, LCR_DISPLAYESR);                //display esr or lc

  136.                 //delay_ms(100);
  137.         }
  138. }

复制代码
Next:

1) design a filter that converts the square wave to sine wave;
2) design the adc module.

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x

出0入0汤圆

发表于 2013-1-31 21:45:40 | 显示全部楼层
Mark ieee1057

出0入0汤圆

发表于 2013-1-31 22:54:35 | 显示全部楼层
楼主很牛!这个不说法不稀奇吧???

出0入618汤圆

发表于 2013-1-31 23:22:13 | 显示全部楼层
fickle 发表于 2013-1-20 22:34
能看懂中文,即使是技术论坛,这个不稀奇;英文已经达到英文思考水平,这个也不稀奇;问题是,2个不稀奇 ...

DFT对输入的周期信号有平均作用,因此对于低SNR条件下的白噪声有更好的抑制效果,再者DFT还能分辨非线性误差,所以我相信DFT的效果是其它算法很难超越的。
对于现在STM32级别的MCU来说,FFT已经不算很高的门槛,难点其实还是在模拟部分的测量动态范围上。如你所说,<100mOhm和>1MOhm或者说<10pF / 10uH @ 10kHz范围的测量精度,尤其是相位精度如何保证,还是得在模拟部分下功夫。

出0入0汤圆

 楼主| 发表于 2013-2-1 03:13:56 | 显示全部楼层
LMS can equal out noises too, thus its ability to achieve more precision than the adc uncertainty may suggest.

One big issue with this particular approach is

1) the realignment of V/I sampling results - as we are using one adc and unable to delivery truly concurrent v/i sampling;
2) and the range. Getting past 100moh or 1Mohm isn't difficult. However, getting past 10mohm or 10Mohm, without doing some trickery on the AFE will be very difficult.

We will see.

出0入0汤圆

发表于 2013-2-1 08:31:23 | 显示全部楼层
What does AFE stand for?
I think both FFT and least square fitting  can get good result ,and the difficulty is the calibration to optimal the result(especially in phase measurement).
LMS and LS are different. IEEE1057  is using least square fitting.
LMS do not need sine or cos functon calculation at all when applied in impedance measurement.
So LMS is the most simplest algorithm among FFT ,LS and LMS.

出0入0汤圆

发表于 2013-2-1 22:23:03 | 显示全部楼层
gzhuli 发表于 2013-1-31 23:22
DFT对输入的周期信号有平均作用,因此对于低SNR条件下的白噪声有更好的抑制效果,再者DFT还能分辨非线性 ...

呵呵,神了。你也在鼓捣这个东东,否则知道这么深?

出0入0汤圆

发表于 2013-2-1 22:29:50 | 显示全部楼层
“Getting past 100moh or 1Mohm isn't difficult.”

--- 测量 这2个电阻当然没有问题。

--- 一般实际测量是分量程的,因此应该是个量程的概念。

afe -- 模拟前端?analog front ?,后面那个词忘了。

出0入618汤圆

发表于 2013-2-1 22:30:36 | 显示全部楼层
fickle 发表于 2013-2-1 22:23
呵呵,神了。你也在鼓捣这个东东,否则知道这么深?

木有,声卡LCR对于我来说已经足够,就懒得折腾了。

出0入0汤圆

发表于 2013-2-2 01:50:07 | 显示全部楼层
I got it AFE  ---analog front end.
声卡LCR喜欢VA 和QEX steber's an LMS impedance bridge.
Steber's LMS能测量到1PF.  VA 's FFT 很好的相位测量.
因此FFT和LMS偕很不错.
2 pounds lcr meter 只有一个range,无校准,有没有NLMS.----没有用的.

出0入0汤圆

 楼主| 发表于 2013-2-2 05:01:51 | 显示全部楼层
I just downloaded the paper by Alfredo Accattatis, Giovanni Saggio, Franco Giannini, "A real time FFT-based impedance meter with bias compensation".

I am going to take a crack at it this weekend.

出0入0汤圆

发表于 2013-2-2 09:34:11 | 显示全部楼层
FFT测量相位非常精确!目前已经有非常好的非证周期采样造成频谱泄漏的校正算法!
给大家推荐个相位计用的就是FFT算法
http://www.clarke-hess.com/6000A.html

出0入0汤圆

发表于 2013-2-7 22:34:36 | 显示全部楼层
完成在噪声环境下模拟小二乘三参数正弦波拟合
结果:creating sinusoid wave with
        - clock jitter
        - phase noise
        - additive noise and
        - harmonics
        Time elapsed:0.0620 seconds
        RMS-ERR: 0.100638
                original sinusoid         noisy sinusoid fit
Ampl:                          1.0000                1.0138
Phase:[rad]                       -0.1667*pi                -0.1652*pi
Offset:                          1.2500                1.2519
program:
//3-parameter sine-fitting algorithm under noise environment
//Scilab program --jt6245 FEB,2013.
clear;
close;
clc;
printf('\creating sinusoid wave with\n \t- clock jitter\n');
printf('\t- phase noise\n\t- additive noise and \n\t- harmonics\n\n ')
N = 2 .^11; //vector length
fs = %pi*1000; //sampling freq
ts = 1/fs; //sampling interval
fre = ((N/128-1)*fs)/N; //freq (Hz)
phase = -%pi*30/180; //phase (rad)
offset = 1.25; //offset (i.e mean)
amplitude = 1; //amplitude
t0 = (0:N-1)*ts; //time vector
std_jitter = 0.01; //standard deviation of jitter noise
std_addnoi = 0.1; //standard deviation of  noise added to signal
std_phase = 0.01; //standard deviation of phase noise
noise = rand(1,N,"normal");
std1_noise = noise/stdev(noise); // random vector with stdev = 1
jit_noise = std_jitter*std1_noise;
phase_noise = std_phase*std1_noise;
add_noise = std_addnoi*std1_noise;
w = (2*%pi)*fre;
t = t0+ts*jit_noise; // add clock jitter
A2 = amplitude*0.01; // 2. harmonic ampl
A3 = amplitude*0.02; // 3. harmonic ampl
yin = cos(w*t+phase+phase_noise); // sinusoid with phase noise
// yin = cos(w*t+phase);
//add offset, noise & harmonics
yin = offset+amplitude*yin+A2*yin.*yin+A3*yin.*yin.*yin+add_noise;
//yin = offset+amplitude*yin;
plot2d(t0,yin);
tic;
yin=yin(:); //tranpose of yin
t = t(:);
onevec = ones(N,1);
function rmsout=rms_sci(ry,rN);//for RMSERR use
    s=0;
    for t=(1:1:rN);
        s=s+ry(t)^2;
    end;
    rmsout=sqrt(s/N);
endfunction
function [x0] = sinefit3par(yin,wt,onevec)
x0=[];
cosvec = cos(wt);
sinvec = sin(wt);
D0 = [cosvec,sinvec,onevec];
[Q,R] = qr(D0,"e");
x0 = R\((Q.')*yin);
endfunction
[x0] = sinefit3par(yin,w*t,onevec);
//prep the output parameters
A0 = x0(1);B0 = x0(2);C0 = x0(3);
A = sqrt(A0*A0+B0*B0);
phi = atan(-B0/A0);
if A0<0 then
  phi = phi+%pi;
end;
yest = A0*cos(w.*t)+B0*sin(w.*t)+C0;
  yres = yin-yest;
rmserr = rms_sci(yres,N);//Root mean square of the residual
t_elapsed = toc();
printf('\tTime elapsed:%2.4f seconds\n',t_elapsed);
printf('\n\tRMS-ERR: %3.6f\n',rmserr);
printf('\n\t\toriginal sinusoid\tnoisy sinusoid fit');
printf('\nAmpl:   \t%3.4f\t\t\t%3.4f',amplitude,A);
printf('\nPhase:[rad]\t%3.4f*pi\t\t%3.4f*pi ',phase/%pi,phi/%pi);
printf('\nOffset:   \t%3.4f\t\t\t%3.4f\n',offset,C0);
  嘈杂的正弦波:
attach://89935.jpg

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x

出0入0汤圆

发表于 2013-2-8 03:52:37 | 显示全部楼层
呵呵,我这里有数据。

ac01 d900 ac0e 8e00 b494 d800 b495 d200 bef0 b800 bee0 5300 ca16 6400 ca03 6700 d5dc 8a00 d5c2 bd00 e2ff ff00 e2dc 7c00 f04f a700 f024 4200 fd7c 3e00 fd4a 9a00 0b6e 9d00 0b32 ec00 18e4 c400 18a3 a600 2581 3b00 253f 5f00 322a e600 31e2 7900 3dbc 3500 3d6e 4e00 47d4 4100 4787 c200 513a c600 50ec e700 5921 a800 58d5 d000 5f35 cd00 5eef 3400 63f6 ad00 63b2 5f00 6705 2b00 66c8 5800 682b b000 67f1 e300 6789 f400 6759 e800 6543 1200 651a 0400 6141 ee00 611f 8e00 5b4f b400 5b3a a300 540d 6100 53fe 5d00 4b85 7500 4b81 0100 4132 2a00 413a 3700 3610 f800 3622 b000 2a48 0700 2a61 6b00 1d1d 3500 1d43 7a00 0fca 3a00 0ff9 3100 0299 0900 02cc fc00 f4a2 5d00 f4e1 3700 e72a af00 e770 4c00 da8f 5a00 dad5 2100 cde2 c600 ce30 d000 c24b b900 c299 fe00 b825 f500 b872 a600 aeb2 3700 af03 b200 a6c5 4300 a711 2d00 a0a8 8200 a0ef eb00 9be1 c200 9c26 a700 98d4 c400 9910 a100 97b2 9700 97e7 4500 9857 8000 9886 ea00 9aa3 cf00 9acb 6f00 9ead 4f00 9ecb 2e00 a4a7 7c00 a4bb 0700 abf5 5300 ac00 ea00 b488 8800 b48b bd00 bee7 6d00 bee1 2600 ca13 0800 ca02 ff00 d5da 9300 d5c2 9100 e301 8e00 e2dd 7a00 f04f 9c00 f027 1f00 fd80 0100 fd4e 3300 0b72 1000 0b38 6000 18e7 2f00 18a7 8500 2585 c300 2543 a900 322d 7800 31e3 b600 3dbc 6a00 3d6f e800 47d6 9e00 4789 cd00 513b 8800 50ee 6a00 5923 c000 58d7 f500 5f39 6200 5ef0 ce00 63fb 0500 63b4 c100 6708 ec00 66c8 1a00 682b 2d00 67f1 6900 678a 7100 6757 9d00 6541 8a00 6519 cc00 6141 3a00 6121 3100 5b50 a900 5b3a 9d00 540d 0f00 5400 7900 4b86 c800 4b82 a600 4133 3d00 413a 8700 3610 ba00 3621 7200 2a49 dc00 2a61 dc00 1d1f 5500 1d43 e200 0fca 2a00 0ff8 2200 0298 ab00 02cc ea00 f4a3 9f00 f4e1 4400 e72b 6d00 e76d fe00 da8c c500 dad3 ca00 cde3 b600 ce2f 9200 c24b a700 c29c 2c00 b826 5a00 b872 e000 aeb2 7100 af01 ab00 a6c3 9500 a710 8900 a0a6 9500 a0ee 8f00 9be2 b600 9c26 6f00 98d3 7300 9911 b900 97b2 0b00 97e8 4900 9856 8400 9886 8600 9aa2 9b00 9ac9 1800 9ead 1800 9ecb 2800 a4a7 9a00 a4bb 2600 abf5 7200 ac00 d200 b488 4000 b48c 7800 bee6 ce00 bee0 1300 ca12 3100 ca02 6d00 d5da 7900 d5c2 3e00 e302 6f00 e2dd c200 f052 9400 f027 a900 fd7d e900 fd4d fe00 0b72 7b00 0b37 3600 18e6 9e00 18a6 8300 2585 0d00 2540 3200 322d 7000 31e2 2800 3dbd 9600 3d70 6300 47d5 b400 478a aa00 513c 3200 50ee 8700 5922 ea00 58d6 8f00 5f38 9100 5ef0 ad00 63fa d400 63b4 2900 670a da00 66c9 3b00 682b 7d00 67f2 cf00 678a 4a00 6759 2100 6544 2800 651a c000 6141 1900 6120 ed00 5b50 0200 5b3b 7d00 540c 6c00 5400 2100 4b85 5400 4b81 7a00 4133 3300 413b 3200 360f 1300 3621 5700 2a48 8e00 2a60 6200 1d1e fa00 1d43 ea00 0fca d100 0ff8 6d00 0299 f900 02cc d200 f4a4 9f00 f4e0 a200 e72c 3d00 e76e ba00 da8f 7100 dad4 8d00 cde1 e100 ce2e 4000 c24b 8500 c299 4800 b825 a900 b873 6d00 aeb1 8600 af02 f300 a6c2 5800 a711 0a00 a0a6 0e00 a0ef 6c00 9be1 f000 9c26 2700 98d2 ea00 9911 9f00 97b2 6d00 97e8 6d00 9857 7f00 9886 5700 9aa4 1700 9aca 8100 9ead 9f00 9ecc 5b00 a4a7 f000 a4bb 9a00 abf3 e600 ac00 1200 b489 1800 b48b 9c00 bee8 6a00 bedf d200 ca12 f300 ca02 d200 d5da b700 d5c2 7500 e302 4a00 e2dc 1200 f052 ce00 f026 7f00 fd7f 4200 fd4e 9900 0b72 8300 0b36 7300 18e7 bc00 18a7 9b00 2585 4800 2542 1600 322f 2500 31e4 af00 3dbd 9000 3d70 3f00 47d7 e700 478a a000 513e ee00 50f0 4000 5924 b300 58d7 5a00 5f39 fd00 5ef0 6000 63fb 3c00 63b4 f100 6708 8e00 66c9 f500 682b e500 67f3 2c00 6789 b600 675a 1800 6541 dd00 6519 1500 6141 8f00 6120 cf00 5b50 6000 5b3a 4800 540c c600 5400 3800 4b85 8a00 4b80 b800 4131 9e00 413c aa00 360e c700 3620 ab00 2a46 5600 2a60 ba00 1d1c 3500 1d43 5f00 0fcb 3600 0ff9 0600 0297 0900 02ca cf00 f4a0 ed00 f4de cd00 e72c 4d00 e76f aa00 da8d 2d00 dad3 1300 cde2 cb00 ce2e db00 c24b 4200 c299 3d00 b825 8a00 b871 7700 aeb0 8e00 aeff 6600 a6c4 4000 a710 8500 a0a8 0500 a0ef 0400 9be1 8e00 9c24 8400 98d1 f400 9911 7000 97b2 7d00 97e8 7300 9858 1500 9885 f100 9aa3 c800 9acb 6200 9eae 1e00 9eca a300 a4a7 e900 a4bb 8200 abf5 9e00 ac01 3e00 b489 9900 b48b 4600 bee9 0e00 bedf 1000 ca14 2f00 ca02 2900 d5d9 f400 d5c1 ab00 e300 4100 e2dc f200 f051 2400 f026 4900 fd7c b500 fd4c f300 0b70 da00 0b36 4e00 18e6 f800 18a5 cf00 2584 8a00 2540 3a00 322e 4600 31e2 3600 3dbe 4200 3d70 fa00 47d8 5a00 478b 9900 513c b300 50ee 1500 5923 ba00 58d7 7800 5f39 1d00 5ef0 7e00 63f9 8700 63b4 9100 6708 6d00 66c8 6800 682d a800 67f3 f600 678b 1e00 6758 7c00 6543 8400 6519 0800 6141 6500 6120 3a00 5b4f 1300 5b3a 2400 540c e600 5400 4700 4b84 c500 4b80 af00 4131 6e00 413b 5b00 3610 0c00 3621 4500 2a49 0b00 2a61 5b00 1d1c 8f00 1d44 9900 0fcb bd00 0ff7 4900 0297 f600 02cb ce00 f4a1 cc00 f4e0 6700 e72b f300 e76d f500 da8e 6900 dad3 bd00 cde0 fb00 ce30 6f00 c24b f800 c299 3300 b825 9d00 b873 9d00 aeb1 3d00 af02 2400 a6c0 dc00 a70f aa00 a0a6 ff00 a0ee b200 9be1 4200 9c25 3b00 98d1 6c00 9911 ba00 97b0 c400 97e7 fb00 9857 1200 9887 1800 9aa3 f700 9ac9 fc00 9eac ac00 9eca 8600 a4a5 4600 a4b9 ac00 abf5 ad00 ac00 4200 b488 b600 b48c 5100 bee9 7c00 bedf 6700 ca14 ab00 ca03 5e00 d5da 1500 d5c1 bc00 e302 a600 e2dc ab00 f051 5800 f027 2400 fd7f 1e00 fd50 1000 0b71 b300 0b38 0900 18e8 bd00 18a7 8700 2584 9500 253f 6900 3230 8f00 31e3 4800 3dbf bf00 3d70 c600 47d9 bb00 478b e700 5140 9500 50f1 b900 5925 3900 58d6 0e00 5f3a 8700 5ef0 ce00 63fc ce00 63b4 fb00 670b d600 66c8 3700 682b 7c00 67f1 b500 678b 9c00 6758 9b00 6545 4900 6517 f000 6141 eb00 611f 6600 5b4f 9400 5b39 6800 540d 7900 53fe 9600 4b85 af00 4b81 4900 4133 3b00 413a 7900 360f 9200 3620 1400 2a48 7800 2a60 c000 1d1e aa00 1d42 8300 0fca 9d00 0ff7 ed00 0297 8000 02cb ac00 f4a2 a100 f4df 6d00 e72a 4a00 e76e bd00 da8e 4b00 dad4 2100 cde2 4f00 ce2f 0e00 c24a 7500 c29a ec00 b825 2700 b872 3e00 aeb2 c500 af03 9d00 a6c2 7100 a710 4c00 a0a6 7900 a0ef 3200 9be2 7600 9c25 6800 98d3 b400 9910 e000 97b1 6000 97e6 bc00 9858 4900 9885 5400 9aa2 8b00 9ac9 bf00 9eac 7600 9eca 7f00 a4a7 ed00 a4bb 4c00 abf5 5d00 ac00 f300 b488 a000 b48c 5300 bee9 3400 bede 0400 ca12 6700 ca01 8f00 d5db 7800 d5c0 e600 e302 f700 e2dd 6b00 f051 d000 f026 5900 fd7e f400 fd4e ba00 0b71 0400 0b37 2900 18e8 d300 18a8 2500 2586 2b00 2542 7d00 322f 6d00 31e4 4200 3dbe dc00 3d72 7200 47d6 ea00 478e 0e00 513e b400 50ef 9000 5925 3900 58d8 1700 5f39 b300 5ef0 fa00 63fa 7f00 63b4 6d00 6708 bf00 66c7 d300 682d 1c00 67f3 5500 678c 6100 675a 6f00 6545 4000 651b 9e00 6142 5100 6120 2500 5b50 6c00 5b3a 7b00 540e 3500 5400 a500 4b84 c900 4b7f fc00 4132 5e00 413a 6000 3610 fe00 3620 b200 2a49 d900 2a61 dd00 1d1d f200 1d42 5200 0fc7 e000 0ff7 6100 0298 7f00 02c9 a400 f4a0 8f00 f4de 1600 e72a 6a00 e76d bc00 da8e e900 dad3 ac00 cde2 bd00 ce2f 5b00 c24b dd00 c299 bb00 b825 c400 b873 8800 aeb3 cd00 af01 2100 a6c3 7f00 a70f fe00 a0a7 6b00 a0ef 1800 9be2 a700 9c26 6f00 98d4 3600 990f d500 97b1 3700 97e6 f200 9857 b000 9884 7d00 9aa2 1d00 9ac9 e600 9ead 4400 9ecb 8800 a4a7 7200 a4bd 6300 abf5 a600 ac01 3100 b488 a300 b48c e000 bee7 ca00 bedd 5d00 ca12 bf00 ca01 7000 d5da 0000 d5c2 8700 e300 c600 e2de 3a00 f052 3600 f026 f100 fd7f 3700 fd4e 8500 0b71 4c00 0b36 6300 18e6 4700 18a5 f800 2585 a900 2543 5700 322f 9a00 31e5 4800 3dbd 9300 3d71 c600 47d7 d600 478b 9d00 513d 6100 50ef 3000 5923 4500 58d7 bb00 5f3a 4900 5ef1 ad00 63fb 4700 63b5 4300 6709 1500 66c8 f300 682b fa00 67f3 3000 6789 ee00 6758 f300 6544 0600 651a 6000 6142 4900 6121 2f00 5b52 9400 5b3c 0700 540e 6e00 5401 1c00 4b86 ae00 4b81 9d00 4131 0e00 413a 6e00 3610 b700 3621 6100 2a47 f600 2a61 2300 1d1d 2200 1d45 ad00 0fc8 5b00 0ff9 2600 0296 f900 02ca d100 f4a0 f600 f4df 6000 e729 a000 e76c b900 da8c a900 dad3 3b00 cde2 9100 ce2e a500 c24b 9800 c298 f800 b824 ff00 b871 da00 aeb1 d400 af00 0300 a6c2 8300 a70f 1600 a0a4 d200 a0ed 5d00 9be2 3200 9c26 7900 98d2 f600 990f 9100 97b0 9800 97e7 1700 9856 7f00 9884 2d00 9aa3 4200 9ac9 7300 9eab bc00 9eca ba00 a4a7 7400 a4bb 1000 abf4 9100 abfe ef00 b488 2e00 b48b 7000 bee7 8400 bedd 5d00 ca12 8e00 ca01 3900 d5d9 c300 d5c2 7a00 e302 8f00 e2dc b300 f050 bf00 f026 a400 fd80 5000 fd4f 8300 0b72 2900 0b35 1500 18e7 d900 18a6 1100 2585 4800 2542 9900 3230 5700 31e4 4600 3dbf 8c00 3d72 3100 47d8 0a00 478d 0300 513e 7200 50f0 7f00 5924 1700 58d7 9e00 5f39 3600 5ef0 d100 63fa 5d00 63b3 d900 670a 2400 66c8 ae00 682c 9100 67f2 4c00 678a 2e00 675a 4700 6545 5600 6519 bd00 6143 e300 6120 2000 5b52 0500 5b39 f800 540e 2300 53ff 3b00 4b86 9100 4b80 d200 4132 a100 413b 6400 360f 4000 3620 4800 2a47 b200 2a61 1500 1d1d 4000 1d43 2300 0fc9 8900 0ff8 3b00 0299 7500 02cb eb00 f4a3 2600 f4e1 0600 e72b 5e00 e76e 4000 da8c b500 dad2 7000 cde1 ef00 ce2d c800 c24b 1800 c299 b100 b825 9100 b872 e700 aeb1 d300 af01 4500 a6c2 1e00 a70f 9c00 a0a6 9a00 a0ed 9500 9be0 ef00 9c24 0a00 98d2 1800 9910 b700 97b1 3200 97e6 e400 9856 3400 9884 9400 9aa3 2200 9ac9 7a00 9eac e800 9eca a100 a4a6 8900 a4ba 6b00 abf4 7d00 ac00 8e00 b487 4300 b48a 1200 bee6 0d00 bedf 3000 ca12 6d00 ca03 3500 d5da 9d00 d5c2 ca00 e301 ce00 e2dd 9000 f051 5a00 f027 8c00 fd7d 5300 fd4d d400 0b71 5700 0b37 2400 18e7 e600 18a8 3200 2586 cb00 2542 bb00 322f 6b00 31e4 ff00 3dc0 2600 3d73 ce00 47d8 c500 478d c400 513e 7500 50f0 af00 5924 5d00 58d6 bf00 5f3a 9d00 5ef1 8c00 63fd 6e00 63b8 bb00 670b a200 66c9 4f00 682b d400 67f2 1f00 6789 e100 6756 9900 6543 8b00 6518 4400 6141 dd00 611f 8800 5b51 cc00 5b39 2c00 540e 2a00 53ff 2000 4b85 3200 4b80 ad00 4132 6d00 413a ac00 360e aa00 3620 3d00 2a48 8000 2a60 e100 1d1d 0100 1d42 ad00 0fc8 8a00 0ff7 2900 0297 a700 02cb 4a00 f4a2 da00 f4e0 2300 e72b 4700 e76e 6d00 da8c ca00 dad2 8700 cde0 e900 ce2e 9a00 c249 8d00 c29a 2700 b825 4400 b871 c200 aeb1 4c00 af01 bf00 a6c2 5600 a710 2600 a0a7 4c00 a0ef f000 9be1 b700 9c26 1100 98d3 5d00 990f 3300 97b0 4200 97e7 5500 9857 bd00 9886 6600 9aa3 cc00 9ac9 ba00 9ead 2500 9eca 9400 a4a6 bb00 a4ba 5e00 abf5 1200 ac00 7000 b487 9200 b489 f800 bee7 8700 bedd fe00 ca12 d900 ca02 4000 d5d9 be00 d5c1 e400 e302 4e00 e2dc 7c00 f050 a400 f026 1200 fd7e ac00 fd4c d000 0b71 1900 0b35 8500 18e9 4400 18a6 ce00 2584 7d00 2542 2c00 322f 2500 31e3 1a00 3dbe 2700 3d6f 3200 47d7 5b00 478a 9a00 513d cb00 50ef 3700 5924 6f00 58d6 3300 5f3b d200 5ef1 8f00 63fc 6500 63b6 ae00 6709 5e00 66c7 8900 682a a400 67f1 1000 678a 4800 6757 ad00 6543 f800 6518 7200 6141 0300 6120 4600 5b50 fd00 5b3a 7900 540e 2200 5401 2100 4b84 fd00 4b7f ec00 4131 de00 4139 1f00 3610 7c00 3621 1900 2a47 e600 2a60 e000 1d1c b800 1d42 2300 0fc7 d800 0ff5 b200 0298 b600 02c9 3700 f4a0 c600 f4de 5e00 e72a 9a00 e76c 5200 da8e 7400 dad2 eb00 cde1 9d00 ce2e 4a00 c24b cc00 c29b 5000 b822 ee00 b870 3500 aeb0 7b00 af00 b200 a6c2 af00 a70f ff00 a0a6 a800 a0ef 6000 9be0 7100 9c26 0c00 98d2 c700 9910 1b00 97af fd00 97e6 7400 9855 4e00 9883 7e00 9aa3 1100 9ac9 6900 9eab e400 9eca 5a00 a4a7 0100 a4ba 4000 abf5 2b00 ac00 4300 b488 ea00 b48b 1700 bee6 1100 bedf 3800 ca13 5c00 ca02 6000 d5d9 fe00 d5c0 a300 e301 6500 e2de 9f00 f053 5c00 f027 6800 fd80 1c00 fd4f 8800 0b72 d500 0b36 3900 18e7 0c00 18a7 1f00 2584 b500 2542 6300 322e 7100 31e3 b100 3dbe 5b00 3d71 1900 47d8 ed00 478a b700 513f 1400 50f0 c800 5925 6900 58d7 e900 5f3b 2300 5ef1 7c00 63fc 0100 63b5 1000 670a 8d00 66c9 4600 682d 5400 67f0 db00 6789 e600 6756 ce00 6543 4800 6519 ca00 6141 aa00 6121 b400 5b51 3b00 5b3b a500 540f 1100 5400 1100 4b84 c100 4b81 ba00 4132 2900 413a 0300 360e cb00 3620 5e00 2a47 fa00 2a5f bb00 1d1c c300 1d43 0000 0fca f100 0ff9 b300 0297 a200 02cc 5e00 f4a0 5f00 f4df 0700 e72b 3200 e76d e200 da8c 1e00 dad4 8900 cde1 b000 ce2d ff00 c249 6400 c298 b900 b824 1e00 b871 a300 aeb0 a600 aeff ec00 a6c1 fd00 a70f 7400 a0a6 4d00 a0ee ab00 9be1 8000 9c25 d300 98d1 1400 9911 dd00 97b2 3300 97e7 3a00 9857 4e00 9884 ae00 9aa1 a200 9aca 8000 9eac 6100 9eca e000 a4a7 3a00 a4bb 1300 abf4 8e00 ac01 7300 b489 6b00 b48c c200 bee7 ee00 bedf 9e00 ca13 f900 ca03 8b00 d5da a400 d5c3 0200 e300 ef00 e2de d100 f053 3800 f026 cd00 fd7e f500 fd4f 9e00 0b70 ff00 0b38 4f00 18e8 5e00 18a6 7d00 2586 a000 2541 4600 322f dd00 31e4 4000 3dbf cb00 3d71 8b00 47d9 c700 478b ec00 513e 1700 50ef 4400 5924 bb00 58d5 ca00 5f39 0e00 5eee f400 63fb ac00 63b3 5d00 670b 1c00 66c8 7a00 682e 9000 67f3 8600 678b e600 6759 7e00 6544 c500 6519 7200 6141 d800 6120 2000 5b51 da00 5b3a 3900 540d 6400 53ff 6f00 4b86 ee00 4b80 9600 4132 3c00 4139 8400 360f 3b00 361f e000 2a49 d800 2a60 6600 1d1a a800 1d42 2500 0fca 9300 0ff7 af00 0298 8300 02ca a300 f4a1 6c00 f4e0 c800 e72c 7f00 e76d 5700 da8b 4b00 dad2 5f00 cde1 fe00 ce2e 7900 c24a 6400 c29a 8200 b825 b500 b872 8700 aeb2 ad00 af02 c300 a6c2 a300 a710 3500 a0a6 7000 a0ee b100 9be2 8400 9c26 f500 98d2 bd00 9910 6100 97b1 a200 97e7 4100 9857 5500 9885 2000 9aa3 1100 9aca 6a00 9eac 1d00 9eca bf00 a4a5 a400 a4bb 0600 abf3 5c00 abff 9100 b486 b900 b48a 4300 bee7 c900 bedf c200 ca11 7400 ca02 6800 d5d9 c100 d5c1 0800 e303 4500 e2dc f400 f053 0100 f027 c400 fd7d 6500 fd4e b800 0b71 f700 0b37 1f00 18e7 3a00 18a8 9c00 2585 df00 2542 0500 322f 6b00 31e4 7100 3dbc 8b00 3d70 1400 47d6 9200 478b 1d00 513d cc00 50f1 a500 5925 6500 58d9 2200 5f39 bd00 5ef2 5100 63f9 4900 63b5 5800 6708 5400 66c8 3200 682a f100 67f0 bc00 6788 df00 6759 2000 6544 4100 6518 f700 6141 fd00 6120 d800 5b51 f500 5b3b fa00 540f 4a00 5401 5c00 4b86 7c00 4b81 cc00 4132 5300 4139 7d00 360f 0e00 361f 7f00 2a48 b000 2a61 e300 1d1b 3400 1d43 0100 0fca 2100 0ff7 e300 0296 7f00 02cc 8800 f49f f000 f4de d100 e72a 0800 e76c 7a00 da8a 1b00 dad4 1300 cde1 e100 ce2f 7200 c24b 8300 c299 6200 b823 d500 b871 e700 aeb1 8900 af00 af00 a6c2 0f00 a70f 4600 a0a6 7100 a0ee e900 9be1 7400 9c24 a800 98d2 e400 9912 3900 97b0 6d00 97e6 db00 9856 ad00 9885 1200 9aa2 fa00 9aca 2300 9ead 9600 9ecc 5400 a4a7 d800 a4bb f800 abf5 ac00 ac02 5800 b487 9400 b48b 7600 bee8 a600 bede ac00 ca13 1700 ca01 b300 d5d9 e400 d5c1 af00 e302 5500 e2dd 8500 f053 9900 f028 6200 fd80 0000 fd4e c000 0b73 9a00 0b36 7f00 18e8 3c00 18a5 ca00 2585 b900 2541 7100 322f 9100 31e4 1e00 3dc0 0500 3d72 c100 47d9 c200 478d 3a00 513e ae00 50f1 4a00 5925 2d00 58d8 cf00 5f3a 7e00 5ef0 f600 63fa a900 63b5 8e00 670a 9800 66c8 af00 682d 4200 67f2 0e00 678d 1c00 6759 4800 6544 8a00 651a e000 6143 b200 6122 3800 5b52 cf00 5b3b 4600 540d d400 5400 d800 4b86 2d00 4b81 a400 4133 5100 413b 2100 3610 3300 3620 b800 2a48 f600 2a61 ba00 1d1f 1c00 1d43 6600 0fc9 1700 0ff8 6d00 0297 a800 02ca f400 f4a1 d400 f4dd e000 e72b 2400 e76d e000 da8c 3200 dad3 4400 cde3 7e00 ce2e c200 c24b bb00 c299 9700 b824 2400 b871 5200 aeb1 d300 af01 1900 a6c4 0800 a70f 1700 a0a7 3700 a0ef 2600 9be2 3b00 9c26 2600 98d2 1500 9911 d500 97b1 4a00 97e8 0e00 9856 4700 9885 0d00 9aa3 0c00 9aca 0500 9ead 5f00 9ecb e100 a4a7 0b00 a4bc 0300 abf3 d000 ac00 d400 b488 0000 b48c 8600 bee7 4a00 bedf c700 ca14 3d00 ca01 b200 d5da 4900 d5c3 0d00 e301 f500 e2dd 7400 f054 4800 f028 d400 fd80 2200 fd4f ba00 0b72 d800 0b37 ca00 18e8 a100 18a7 d700 2584 c200 2542 7d00 322f 0300 31e3 7c00 3dbc 3000 3d6f e100 47d6 5900 478b c300 513d a200 50f0 5d00 5925 4800 58d7 c800 5f39 e000 5ef0 9a00 63f9 b800 63b5 6e00 6709 dd00 66c7 2600 682a e600 67ef 9b00 678a 1f00 6756 3500 6543 cf00 6518 bb00 6141 2d00 611e c900 5b50 c700 5b3a 2800 540c 7300 53ff 6d00 4b83 e800 4b7f aa00 4132 ae00 4138 d100 3610 2300 3620 d400 2a49 2000 2a62 4200 1d1e 0600 1d43 5000 0fca 1c00 0ff7 bc00 0297 5700 02ca c500 f49f 5500 f4df a500 e72b 2900 e76e e100 da8e 2d00 dad3 3f00 cde0 d600 ce2e 6e00 c249 4d00 c297 b500 b825 2f00 b872 9c00 aeb1 b500 af00 ac00 a6c3 2e00 a70f 7e00 a0a6 1600 a0ee 6200 9be1 5f00 9c27 7800 98d2 a500 9911 1e00 97b1 5e00 97e7 c300 9856 1900 9886 8900 9aa2 0f00 9ac9 8600 9eab 2900 9ec9 e400 a4a6 9300 a4bc 0000 abf5 7800 ac02 7000 b488 4700 b48d 7100 bee6 f700 bedf 3100 ca13 dd00 ca00 ff00 d5db b300 d5c3 5b00 e303 9500 e2dd 7d00 f052 a000 f028 8f00 fd7f a300 fd4f e800 0b73 5600 0b38 6400 18e7 bc00 18a8 7400 2586 d100 2542 2800 322f 8a00 31e3 a800 3dbd 9300 3d70 3a00 47d8 9b00 478b 8f00 513f 9500 50f2 3f00 5924 e600 58d7 1e00 5f3b 0300 5ef1 3600 63fb aa00 63b5 6600 670a 3100 66c8 1c00 682c 5500 67f2 0f00 678b 0500 6758 1300 6545 1000 6518 9500 6144 4800 6121 0e00 5b51 1600 5b3a 2000 540d 3f00 53ff d400 4b84 7700 4b80 1f00 4131 5400 413a fc00 360f 2000 3620 8100 2a49 c800 2a62 4800 1d1d e900 1d43 6a00 0fc9 8600 0ff7 4a00 0296 2300 02cb 8200 f4a1 a700 f4e0 8600 e72a 6d00 e76d ab00 da8d e700 dad1 6400 cde0 f700 ce2e a500 c24a 5900 c297 f100 b823 8f00 b871 5a00 aeb0 4200 aeff bf00 a6c2 0400 a70e 0000 a0a5 6000 a0ee 5600 9be0 b900 9c24 f900 98d3 1b00 9911 fe00 97b0 4700 97e6 de00 9856 0c00 9884 c900 9aa2 4b00 9ac9 2c00 9eab c500 9ec9 ca00 a4a6 2b00 a4bb cf00 abf4 2900 ac01 a400 b488 8500 b48d 2100 bee7 f800 bede 9f00 ca12 2f00 ca01 fb00 d5db 1000 d5c2 4b00 e300 8900 e2dd 9900 f053 5200 f028 2a00 fd7e 4d00 fd4e 1000 0b71 2600 0b36 cd00 18e7 0100 18a7 f900 2584 e600 2542 b500 322f fe00 31e4 7000 3dbe e400 3d71 a100 47d7 a200 478a e200 513e 3c00 50ef 8000 5924 ae00 58d6 9600 5f39 3500 5eef 3d00 63fa ab00 63b6 b700 6709 9400 66c9 3700 682c 2a00 67f3 1200 678a 7900 6759 0500 6543 5b00 6519 b700 6142 b500 6121 e200 5b50 2000 5b3a 1500 540d 2a00 53ff e500 4b86 1c00 4b80 7900 4133 2200 4138 a000 360f a000 361f 0e00 2a47 ed00 2a5f 4300 1d1c 8b00 1d43 1000 0fc9 df00 0ff6 7600 0296 9600 02ca 7e00 f4a1 a100 f4e0 0900 e72a 8700 e76c e500 da8c 8400 da91 0e00 cd86 5000 cdda 9d00 c1e0 8500 c236 e600 b7ad 0400 b803 e000 ae2f 0d00 ae87 e800 a636 1b00 a68f 0200 a013 d600 a067 1d00 9b49 d700 9b99 6a00 9837 fe00 9882 b300 971a 1500 975b e700 97c1 d100 97fc 0d00 9a13 4100 9a45 0c00 9e25 8b00 9e4e 8800 a42b b900 a448 6c00 ab83 5300 ab97 5700 b426 5200 b430 d100 be97 0e00 be93 7f00 c9d2 e900 c9c6 3b00 d5ab a200 d596 d000 e2e8 d600 e2c5 bd00 f04b 9300 f021 1d00 fd8e 3200 fd5b cb00 0b97 0b00 0b58 7800 191d 7f00 18d8 0b00 25ce 1c00 2584 5e00 328a 9a00 3237 9e00 3e27 c900 3dd3 3400 484e e800 47fa 5200 51c3 6200 5167 bf00 59b1 d100 5957 cb00 5fcd 5d00 5f76 3000 6491 4f00 643d 4600 67a1 0b00 6753 ad00 68c2 5500 687c 5200 681c fd00 67e0 7500 65d0 d700 659b fa00 61c7 2400 619c 0700 5bcb 6a00 5bac 9400 547c 7700 5467 2900 4be7 2200 4bdb 9a00 4183 b800 4185 3e00 3650 8800 365e cf00 2a75 3a00 2a8c f700 1d36 7d00 1d5c 7700 0fd1 4a00 0fff 6300 028a 1a00 02bf 8200 f480 b000 f4c0 5900 e6f6 0100 e73d 5900 da44 c700 da91 b400 cd89 0a00 cddd 5100 c1e2 c900 c238 5a00 b7ae 1b00 b805 6300 ae2f 5900 ae89 9c00 a637 fb00 a690 c900 a014 8800 a068 0400 9b4a 8900 9b99 d900 983b f400 9882 b700 9719 ba00 975b 1900 97c3 8a00 97fc 3000 9a16 9c00 9a47 fd00 9e27 3c00 9e4f a900 a42c ee00 a44a e200 ab85 7700 ab99 0100 b427 ef00 b431 f400 be97 0a00 be92 b200 c9d3 c100 c9c5 0f00 d5ad 2600 d597 d000 e2e8 a200 e2c6 9100 f04b 6b00 f020 9300 fd8c 3500 fd59 4800 0b94 9b00 0b54 ca00 191d 7100 18d8 4300 25cb 8700 2582 ad00 3288 4f00 3236 0500 3e24 ef00 3dd1 1600 484c a600 47f7 dc00 51c0 2600 5166 8900 59ae f700 5956 9d00 5fca 9d00 5f76 fb00 6490 6400 643c 5a00 679f 8a00 6752 aa00 68bf b500 687b a900 681b a800 67de b000 65d0 8400 659a d400 61c6 0600 619b 4a00 5bcc 6000 5bab 9f00 547b bf00 5465 d600 4be5 7300 4bdb 5d00 4182 de00 4185 8900 364f 9700 365e 1100 2a78 3800 2a8c 3600 1d37 f100 1d5d 3e00 0fd3 5e00 1002 0c00 028c e100 02c3 4c00 f480 2500 f4c3 b800 e6f7 9400 e73f d200 da48 e700 da93 a500 cd8b 8600 cdde 3200 c1e5 ff00 c23a d600 b7b1 1c00 b805 f800 ae33 0c00 ae89 1e00 a63b 7600 a68e e300 a019 8c00 a069 5200 9b4d dd00 9b9b b000 983e 4300 9884 b500 971c 7000 975b 4800 97c5 4600 97fc 3200 9a18 9400 9a47 4b00 9e28 c300 9e4f 6800 a42c b500 a447 f700

出0入0汤圆

发表于 2013-2-8 03:54:16 | 显示全部楼层
fickle 发表于 2013-2-8 03:52
呵呵,我这里有数据。

ac01 d900 ac0e 8e00 b494 d800 b495 d200 bef0 b800 bee0 5300 ca16 6400 ca03 670 ...

每四个数据是一组。前2个是电压数据,后2个是电流数据。

出0入0汤圆

发表于 2013-2-15 10:46:29 | 显示全部楼层
以下是测量1pf@1kHz时的数据,

aa78 ec00 001c 9600 b334 d800 002c de00 bdc8 2500 0037 7800 c928 6a00 002a c400 d524 8800 002c 2900 e28b ab00 002e 3a00 f01c 9b00 0035 2300 fd82 4b00 003f f200 0bba 7900 004c 4f00 196e 5000 0048 f100 2644 2300 0037 9e00 3328 3300 0032 0a00 3ee8 0000 0028 a600 492e 1b00 002b 4500 52bf 1f00 002e 7a00 5ac6 3f00 002b fb00 60f4 f000 0029 8300 65c8 1100 0011 2a00 68e0 f900 0004 e600 6a05 e900 fff8 2100 6960 4000 fff5 e100 670f 3a00 fff6 1200 62f9 c800 fff3 9c00 5ced 2300 fff2 6300 5587 1a00 ffdf 6400 4cd7 f300 ffcf 9600 4253 0200 ffc4 3900 36fe 9800 ffc6 ec00 2b04 4500 ffca 1700 1d97 4e00 ffc8 b700 1004 ba00 ffd1 d200 0298 8a00 ffc4 4700 f45d f400 ffb3 9800 e6a9 3400 ffb5 b800 d9d1 1700 ffb5 b200 ccea de00 ffc1 5000 c11e cb00 ffca 0b00 b6cc 5500 ffd7 7f00 ad2b f500 ffd0 9900 a519 9a00 ffca c200 9ee7 1000 ffcf a100 9a0c d100 ffd4 fc00 96f3 4b00 ffe7 db00 95d0 fe00 fff5 f600 967a 0d00 0009 0800 98d3 8e00 000c 0400 9cf2 1a00 0008 f000 a309 9f00 000e a900 aa78 a200 0014 6700 b335 0b00 0025 8f00 bdc7 b100 0032 3f00 c927 9b00 0040 e100 d525 f400 0040 7900 e28d 5200 0037 9800 f01c 6a00 0036 2c00 fd83 6e00 0034 ac00 0bba a900 003f 5000 196d 1600 0043 1200 2645 5a00 0049 dd00 3329 1100 0046 4600 3ee9 cf00 0030 cf00 492d 7100 002b 3100 52be b100 0025 8200 5ac6 d100 0025 1400 60f5 1c00 0024 ce00 65c9 4500 0024 8900 68e2 2600 001b e500 6a07 8d00 0007 8d00 6961 ff00 fffa b900 670f 4c00 ffee 5a00 62f9 0e00 ffee 4e00 5cea c500 ffe8 8600 5588 fe00 ffed b700 4cd9 ba00 ffe7 8500 4253 d200 ffce 5900 36fe d200 ffc7 2400 2b03 0400 ffbe ca00 1d97 8900 ffc1 5a00 1003 ec00 ffc6 e600 0297 b900 ffcb af00 f45c f600 ffca a300 e6a9 dc00 ffc1 8f00 d9d2 4000 ffc0 fc00 ccea 8900 ffbb 3d00 c11f 8400 ffc5 bb00 b6cb a600 ffd2 6f00 ad2c ef00 ffda 5700 a51c 3800 ffe7 5400 9ee7 df00 ffe2 7000 9a0f 5200 ffe2 d500 96f3 d900 ffe7 8c00 95d0 b400 fff2 e200 967a 7100 0004 7400 98d4 8700 0015 3000 9cf2 e900 0023 6c00 a30a 0900 0020 7500 aa7a af00 001d 9b00 b335 a700 0021 c800 bdc7 3200 002e 0200 c928 fb00 0038 f300 d526 5d00 0046 b200 e28d fd00 0051 5400 f01d 0e00 0045 c500 fd86 0300 003b 9500 0bb9 c000 003e 5600 196d 5e00 003d f300 2644 a000 0043 5600 3328 f100 0047 5b00 3eea b200 004a a800 492e 4700 003a b500 52bf 8a00 002d 6900 5ac7 4500 0023 a300 60f4 d500 001c 3300 65ca 3100 0020 9e00 68e4 3700 001a 7a00 6a06 e800 001a 8000 6962 c600 0007 c100 670f af00 fff5 e300 62f9 db00 ffe9 7000 5ceb 4a00 ffe1 e200 5587 3c00 ffe4 c200 4cd8 fb00 ffe0 3600 4255 5e00 ffe3 9000 36fe bf00 ffd6 5b00 2b02 1000 ffc4 d800 1d98 5800 ffbb 6200 1005 4700 ffbd 9100 0297 8200 ffc3 e000 f45f 3d00 ffc4 c000 e6aa 9500 ffd4 7800 d9d3 2700 ffce 8900 ccea 8e00 ffc0 e600 c11d 9a00 ffc5 1c00 b6cb e300 ffc6 d400 ad2f 1600 ffd4 a400 a51e 4500 ffe2 ed00 9ee9 6600 ffef d000 9a11 3200 fff5 7e00 96f5 2300 ffef 2500 95d1 1500 fff3 2000 967b e200 fff9 1700 98d3 0000 0009 a300 9cf1 e300 001c c900 a30a ad00 002e c700 aa79 7700 0030 f300 b335 4e00 0028 ce00 bdc8 2500 0030 2400 c927 1100 002f f500 d525 ef00 0047 7800 e28c da00 0053 a400 f01b af00 0042 ae00 fd84 a500 0041 a700 0bba 0e00 003e a300 196c 7600 0042 c700 2644 2d00 0047 8100 3329 1b00 004a bc00 3eea 2300 004c 8000 492e 1200 003a 4c00 52c1 9900 002e bc00 5ac6 6d00 0024 d900 60f4 6a00 0020 2e00 65c9 e200 0022 6400 68e2 5200 001c aa00 6a08 c600 001b f800 6962 8c00 0008 ca00 670f bc00 fff6 0600 62fa 4000 ffe9 4100 5ceb 5400 ffe1 e500 5587 5500 ffe6 7e00 4cd8 ca00 ffe1 1300 4254 c900 ffe4 a000 36fe a400 ffd6 cd00 2b04 a500 ffc4 ec00 1d99 2900 ffbc 6100 1003 8200 ffbd d100 0298 a100 ffc8 3400 f45f 2b00 ffc9 3a00 e6a6 d600 ffd3 6c00 d9d2 8c00 ffce ff00 ccea de00 ffc0 4300 c11e d000 ffc4 5600 b6cd 5a00 ffc9 0900 ad2d bb00 ffd5 5f00 a51d 4000 ffe2 6c00 9ee8 c400 fff5 5400 9a0e 8200 fff7 3100 96f4 dd00 fff2 0900 95ce af00 fff4 5c00 967a 2300 fffa 7800 98d2 e200 000d e200 9cf1 0b00 001d 4400 a30a 3a00 002e 7a00 aa7a 5d00 002e fb00 b335 a200 0029 dd00 bdc7 9400 002d 8c00 c925 4000 002c 3300 d525 2400 003e 2700 e28d 1f00 004a 6100 f019 5900 004f a300 fd82 9800 0052 a400 0bb7 a600 0044 ca00 196c a900 003d e300 2644 3200 0037 fa00 3328 8f00 003f bd00 3ee9 7000 0040 0d00 492e 9100 0043 a300 52be 7100 0043 3000 5ac4 f100 0028 8a00 60f3 d700 001d b100 65c8 4500 0013 e500 68e2 9b00 0012 bb00 6a07 3a00 0012 6800 6960 f100 000f 9b00 670e 9d00 000a ae00 62fa 4400 fff0 9d00 5cea df00 ffe1 9b00 5587 2700 ffd8 2100 4cd6 ff00 ffd5 e400 4254 8700 ffd9 1000 36ff 5800 ffdb 2600 2b03 3d00 ffda b800 1d96 7d00 ffc8 6600 1004 a500 ffbd f200 0295 a900 ffba 8c00 f45b cc00 ffbb 7500 e6a8 9300 ffc7 bb00 d9d2 0e00 ffcf e300 ccea b700 ffd8 6600 c11d 3e00 ffd1 7e00 b6cc 6f00 ffcb bb00 ad2d d600 ffcd a800 a51b d100 ffd8 5900 9ee7 fd00 ffe7 6200 9a0e 0700 fff3 1d00 96f3 1100 0006 f900 95d0 5b00 0003 9a00 9679 fe00 ffff f300 98d2 5f00 0001 9e00 9cf1 4e00 000e 7000 a30a 1800 0022 3200 aa79 b500 002b 4900 b337 fa00 0042 1400 bdc8 4800 003e 1200 c928 1000 002f fe00 d524 7000 0033 be00 e28c b100 0039 7000 f01b c100 0045 7700 fd83 ac00 004d df00 0bbb a500 005b c300 196c c500 004d e500 2642 7d00 003b 1200 3327 9f00 0039 5000 3ee9 3c00 0030 ae00 492d d800 0037 8700 52be 6200 003d 4800 5ac6 ee00 003d ff00 60f4 bb00 0030 6f00 65c9 9700 001c 5a00 68e4 4400 0011 3400 6a07 3100 0005 4f00 6961 f400 0007 e200 6710 c000 0003 6100 62fa 9e00 0004 7300 5cec a900 fffb ea00 5586 cf00 ffe1 e700 4cd8 8500 ffd8 3d00 4251 8000 ffcd 4600 36fe eb00 ffd4 8800 2b01 1600 ffd1 c600 1d97 0200 ffd6 0f00 1005 3100 ffdb da00 0297 1600 ffc6 e000 f45b f500 ffbc 5f00 e6a6 d800 ffbf 6700 d9d2 4300 ffc9 4a00 cceb 0b00 ffd0 9f00 c120 2e00 ffe1 0200 b6cb 8300 ffe6 b300 ad2d 4200 ffda 1700 a51b 5800 ffdb 8800 9ee7 9200 ffdf 8e00 9a0d 5900 ffee da00 96f3 9000 ffff bf00 95cf 3c00 0010 1600 967a 4a00 001c 4000 98d2 d500 0015 4a00 9cf0 6d00 0014 cd00 a308 e600 001a 8400 aa79 9a00 0027 8500 b337 3e00 0039 0d00 bdc7 6400 0043 9100 c927 2900 004c 3b00 d524 2500 0042 c000 e28d 5800 0042 ff00 f01a cd00 003c 8a00 fd84 d200 0044 d600 0bb9 fd00 004e 3600 1970 1300 004e c100 2644 0d00 0056 3700 3327 e200 0046 3f00 3eea 9100 0037 ec00 492e 4800 0030 7500 52be de00 0033 8f00 5ac5 dc00 002f 6a00 60f4 d600 002f 8e00 65c8 8900 0031 4f00 68e2 1000 001e 9300 6a09 4000 000c 2400 6961 cd00 fffb b500 670e 6600 fff7 1100 62fb 9d00 fff6 ce00 5ced 9400 fff1 3300 5587 6c00 fff5 1d00 4cd8 2000 ffe6 9700 4253 cc00 ffd1 0400 36fe 0700 ffc8 2800 2b01 ad00 ffc4 5b00 1d98 3500 ffcb 5d00 1003 e500 ffcd d300 0295 3100 ffd6 3900 f45e a900 ffcc 6d00 e6a9 5300 ffc3 e800 d9d0 d800 ffbf 3800 cce9 0700 ffc3 4c00 c11e 5800 ffd2 8f00 b6cd 7e00 ffdb a600 ad2f 0f00 ffe8 f600 a51d ff00 ffed f700 9ee7 e000 ffe6 bc00 9a0f 1200 ffec ea00 96f4 d300 fff4 ba00 95d0 bf00 0004 da00 967b 0000 000e a400 98d3 ca00 0021 d500 9cf0 f500 0029 ad00 a309 0100 0023 9f00 aa78 e700 0023 c700 b335 be00 002a 4200 bdc8 8100 003e b000 c928 f400 004a ae00 d526 b500 0055 6300 e28d 6700 0054 2d00 f01b de00 0045 d500 fd84 0900 0043 cf00 0bb9 e600 0042 8500 196d e200 0048 9800 2645 a600 004e 0a00 3329 8e00 0054 de00 3eea c200 004e 7600 492d cb00 0039 8500 52bc c300 0030 1c00 5ac5 6c00 0029 e700 60f4 bd00 0028 1000 65cb 2d00 002a 3800 68e3 1a00 0028 bb00 6a08 6700 0021 8d00 6962 1b00 000a c600 670e e100 fffc b900 62f9 5a00 fff0 7a00 5cec 2000 ffea ce00 5587 0100 ffed 7100 4cd8 2f00 ffee 7400 4252 f500 ffec 4100 36fe 4a00 ffd9 fd00 2b02 6500 ffcf cc00 1d96 1c00 ffc3 7d00 1006 2700 ffcb 2500 0296 5a00 ffcf 7600 f45e af00 ffd3 9100 e6ab 4600 ffe0 9600 d9d2 4e00 ffd0 ce00 cceb 0800 ffc9 8100 c11f 6a00 ffce 3500 b6ce 1700 ffd6 2d00 ad2f 4400 ffe1 9b00 a51d 3f00 fff0 f200 9ee9 5c00 ffff e800 9a0f 4e00 fffa 7b00 96f4 3e00 fff9 fc00 95cf f600 fffc 9900 967a e800 0009 e500 98d3 f700 001a 2700 9cf2 7800 0027 bc00 a309 5200 0037 b400 aa78 7600 0033 a300 b336 7200 0031 0400 bdc6 fa00 0035 1d00 c927 2400 0035 0c00 d525 f500 0046 5800 e28b bb00 0051 2200 f01d 1c00 0058 9b00 fd85 7200 0056 1f00 0bba 4a00 0048 0b00 196a f900 0042 0f00 2644 cd00 0041 5400 3328 fd00 004c 0800 3ee9 5600 004a 4f00 492e da00 0052 e100 52c0 c700 0047 3e00 5ac6 2100 0030 9f00 60f5 8d00 0025 ef00 65c8 dd00 001c ba00 68e3 a200 001f a100 6a0a 0400 0019 df00 6961 a000 0019 2b00 670f 9d00 000d 8300 62f9 aa00 fff6 c600 5ceb 8000 ffe5 a900 5588 8000 ffdc 7c00 4cd9 f200 ffdf 1800 4254 8100 ffdb 7600 36ff da00 ffe0 f000 2b03 4b00 ffda 3a00 1d97 6f00 ffc5 1900 1008 3000 ffc1 5900 029a 3500 ffb9 9600 f45f c100 ffbf c000 e6a9 da00 ffc9 0e00 d9d3 5c00 ffd2 ac00 ccec b300 ffd5 3f00 c11e d000 ffce a800 b6cc 2e00 ffcd 2a00 ad2d 8900 ffcf 3000 a51c 9600 ffe0 4500 9ee7 7f00 ffea 7800 9a0f 4600 fffb 3600 96f4 7200 0006 4a00 95cf 8300 fffe 8800 967b 3900 0002 3800 98d4 6f00 0005 fc00 9cf2 6100 0014 d500 a30a 3e00 0023 8700 aa7b 5b00 0031 e600 b335 f000 003e b400 bdc7 a900 0038 5b00 c927 f600 0033 fa00 d525 5000 0035 7200 e28e 1600 0042 b200 f01c d500 0049 f500 fd85 0200 0052 5800 0bbb 8600 005a 0d00 196e c200 0049 8100 2644 0e00 0042 1f00 3327 7a00 003c f500 3ee9 5500 003a 8a00 492e a800 003f e100 52c0 f400 0042 3d00 5ac8 4200 0042 3700 60f5 e500 002f 1700 65c8 fd00 001f 4f00 68e3 3c00 0014 7f00 6a09 7d00 000b 1200 6961 5700 000c 2b00 670f a200 000b 7f00 62fb 6000 0006 2100 5ced 6500 fff1 a900 5585 9c00 ffdf e500 4cd8 7400 ffd6 6f00 4254 5600 ffcc 0400 36fc dd00 ffd1 bc00 2b02 4200 ffd1 3500 1d98 b100 ffd6 9400 1005 1900 ffcb a600 0296 fe00 ffbd 6200 f45e 4200 ffb5 6e00 e6a9 2b00 ffba 5000 d9d3 e100 ffc8 1d00 cce9 8a00 ffcd 3c00 c11e a700 ffdf 3f00 b6cb e600 ffd9 9800 ad2e 9f00 ffd0 9100 a51d 9800 ffd5 2100 9ee7 1100 ffde d000 9a0f 5d00 ffee 8b00 96f3 3b00 fffa f100 95d0 3f00 000e 9d00 967c d200 0010 3d00 98d3 7f00 000b ec00 9cf1 2700 0010 f200 a30a 3400 0018 8300 aa79 c400 0025 b900 b335 8200 0034 b400 bdc9 ca00 0045 e300 c928 d400 0044 5600 d527 9900 003c bd00 e28d 8500 0039 b700 f01d 1400 003a 6200 fd85 6a00 0046 3500 0bba 8300 004d c500 196f 2000 0053 9000 2644 d300 0050 9800 3329 7000 0044 5200 3ee8 8000 0039 bb00 492d 8d00 0035 1c00 52bf eb00 0037 a200 5ac6 bd00 0037 5300 60f4 a800 0039 7c00 65c9 5c00 0030 6200 68e3 0e00 0019 f000 6a07 fb00 000c 7900 6961 2d00 ffff 8400 6710 8200 fffc c600 62f9 ee00 fff1 cc00 5cec 9d00 fff0 7800 5585 ee00 ffef 6900 4cd7 ab00 ffd3 6000 4254 2500 ffc6 e000 36fe 3d00 ffc0 4800 2b02 2800 ffbb fe00 1d95 2500 ffc1 fb00 1004 5500 ffc9 4c00 0297 0e00 ffc8 3900 f45d 1e00 ffb7 ec00 e6a9 e400 ffb5 7700 d9d1 f800 ffb1 ba00 ccec 0200 ffc4 3200 c11f 5600 ffd6 7d00 b6cc b600 ffd2 3500 ad2e 6800 ffcd d400 a51d e500 ffd3 2700 9ee7 6000 ffd8 bd00 9a0d 9100 ffe8 f000 96f3 5700 fff6 1400 95cf bc00 000d a400 967a bf00 000e 6100 98d3 0d00 0007 da00 9cf1 d500 000e b500 a308 db00 0015 0400 aa78 f600 0021 7e00 b335 c400 002f 5400 bdc8 7b00 0042 b200 c928 8700 0041 c000 d525 1000 0038 b400 e28c 6a00 003a 7c00 f01a b100 0039 1c00 fd83 9f00 0041 0c00 0bbb f900 0049 1400 196d e200 0051 3c00 2644 a800 004d 2d00 3328 be00 003d a800 3ee9 c000 0035 9c00 492f c500 002c 9800 52c0 6d00 0031 cf00 5ac9 0400 0030 4b00 60f6 0900 0032 4800 65ca 0600 002b 8b00 68e3 1600 0010 9a00 6a08 5b00 0001 8d00 6961 2600 fffa 8700 670f d200 fff8 4f00 62f9 9f00 ffef 7700 5ced 4900 ffec 1a00 5587 e400 ffea 7c00 4cd9 6200 ffd5 4b00 4252 3600 ffc5 4400 36fe 1f00 ffbf ae00 2b01 5200 ffbd 6b00 1d97 8000 ffbf 9900 1007 3500 ffc6 d300 0296 e500 ffc8 2300 f45d 2e00 ffb6 0300 e6a7 f000 ffb3 7300 d9d1 1b00 ffb5 c500 cce9 bf00 ffb8 1100 c11f 4f00 ffc6 5d00 b6cc cf00 ffcf 6000 ad2e cc00 ffd8 4e00 a51d be00 ffd7 b800 9ee5 c100 ffd7 0f00 9a0d 3f00 ffd7 0d00 96f5 0700 ffe4 5700 95d1 8600 fff6 b100 967a 8400 0004 c700 98d3 9d00 0012 5900 9cf0 1500 000e b100 a30a 3200 0011 7e00 aa78 f700 0012 2a00 b336 8f00 001c 7f00 bdc8 da00 002d be00 c927 8900 0033 8200 d525 8a00 0043 3100 e28c ea00 003e 7c00 f01b 8400 0033 f900 fd84 a800 0033 d600 0bbd 5800 0038 c600 196f 7700 003c 9900 2644 3100 0040 2700 3329 2d00 0049 2a00 3ee7 cb00 0038 a900 492d 5b00 002a 4d00 52be b800 0026 5a00 5ac5 b200 001b a600 60f5 0000 0020 b900 65c9 4400 0019 af00 68e5 9100 001a bb00 6a08 4c00 000d f400 6960 bc00 fff6 4400 670e 7700 ffed 8500 62f9 e600 ffe0 2f00 5cec 7f00 ffe0 5e00 5587 b400 ffdf 2800 4cd9 7300 ffe0 7300 4253 c000 ffd3 5700 36fe c000 ffc0 8b00 2b03 d000 ffb9 9300 1d98 5700 ffb1 6600 1006 6d00 ffb9 7300 0298 0700 ffba 8900 f45d 7e00 ffbf cc00 e6a8 e800 ffc4 a700 d9d1 3d00 ffb6 2900 cceb 9e00 ffb6 0300 c11e 7800 ffb7 c900 b6cc 8f00 ffc4 d500 ad2e c200 ffce 6c00 a51d 1300 ffdf ed00 9ee7 b000 ffea 0800 9a0d f600 ffdf df00 96f2 d800 ffe3 d000 95cf 6600 ffea 9d00 967b 3b00 fff9 3800 98d2 7900 0007 9c00 9cf1 e600 0018 b900 a309 7e00 0022 cc00 aa77 ff00 0018 c900 b335 5e00 001d 9200 bdc8 c900 0020 d600 c928 b800 0029 fa00 d526 8400 0036 cc00 e28d 4400 0042 2d00 f01c 4500 0047 eb00 fd84 2000 0037 f200 0bba 8400 0035 2d00 196f 6400 002e 3600 2644 bd00 0033 bb00 3328 5e00 003b 9d00 3eeb 5700 003b 0200 492f c100 003d 7400 52c1 6500 002d 1e00 5ac5 e900 001b d200 60f5 4f00 0013 5100 65c9 b200 000d 8800 68e3 8000 0010 6700 6a08 8000 000a 9a00 6960 e300 000c 4600 670e 0c00 fff5 a300 62f8 4b00 ffe2 ab00 5cea e300 ffd4 be00 5586 1600 ffcd e100 4cd8 a200 ffd3 4900 4255 7900 ffce 1b00 36ff e000 ffd4 c700 2b03 4200 ffc3 c700 1d97 0000 ffb2 e200 1005 db00 ffb2 7f00 0298 9500 ffae 6300 f45c 2900 ffb3 7700 e6a8 2900 ffbf 2700 d9d3 5300 ffcc 2400 ccea 7300 ffc3 b400 c11e 2800 ffbd d000 b6cc f400 ffbe e000 ad2d 1d00 ffc0 d600 a51e 5500 ffd3 a200 9ee9 1500 ffde a500 9a0e 6b00 fff2 e900 96f3 a800 fff5 bc00 95d0 1700 ffed 8700 967b d100 fff2 d900 98d2 a700 fff8 3b00 9cf1 f100 000d 1600 a30a 2800 0018 b700 aa7a 7c00 002a 5000 b336 7600 002e 0e00 bdc6 fd00 0026 af00 c927 6300 0022 fa00 d525 1400 0024 7500 e28b 4b00 0039 1300 f01b f400 003c 8b00 fd85 e100 0048 8400 0bbb 1e00 004b 0200 196e 1500 0037 4900 2643 db00 002f 1900 3327 9800 002f 0600 3eea f600 002e f300 4930 1e00 0032 6900 52c1 6c00 0036 ec00 5ac7 e600 002f 2000 60f3 ef00 0018 eb00 65c8 6e00 000b c200 68e2 9500 fffe ff00 6a08 4100 ffff 4500 6962 9c00 fffc 3700 670f bb00 fffc a700 62f9 fa00 fff7 6600 5cec d500 ffdd 4600 5588 7d00 ffd1 f900 4cd9 4200 ffc4 5400 4252 d900 ffc3 b300 36fe 3f00 ffca 7700 2b03 3400 ffca 5b00 1d98 2c00 ffcb 5700 1007 fb00 ffbb 6200 0299 1b00 ffb0 8700 f45e 4600 ffab 6400 e6a9 4700 ffb2 4800 d9d2 e900 ffbd 4600 cceb fc00 ffc6 6c00 c120 0400 ffd3 8b00 b6cd 1f00 ffca 1b00 ad2d ab00 ffc3 f000 a51b 5700 ffca 0900 9ee7 7800 ffd3 a500 9a0d ca00 ffe5 0500 96f3 4b00 fff2 ed00 95d1 0200 0007 c400 967c 1f00 ffff ca00 98d3 8600 fffe 1000 9cf1 ce00 0003 6d00 a30a f000 000b 9700 aa7a 7f00 001a 1100 b337 6600 002c 6a00 bdc7 f000 003c 7a00 c926 e900 0031 2d00 d526 c900 002d 8000 e28e 2800 002c b900 f01a 9600 002e 0400 fd84 a600 003e 9b00 0bbb fc00 0042 0500 1970 3800 0049 3300 2645 fb00 003c 4d00 3328 1b00 002d f300 3eea 9200 0025 d400 492e 9a00 001e e700 52c0 e000 0026 c100 5ac6 e500 0026 3100 60f6 7500 0026 ca00 65ca fe00 0018 4a00 68e4 0300 ffff fa00 6a07 f400 fff5 5600 6960 6900 ffec 1d00 6710 9100 ffec 8100 62fa f600 ffe7 c300 5cee 7100 ffe8 7b00 5589 4100 ffdc e600 4cd8 1700 ffc6 e800 4254 dd00 ffb6 5f00 36ff df00 ffb3 ef00 2b04 2d00 ffb9 ad00 1d99 8f00 ffb8 5000 1004 a800 ffc0 d800 0297 dc00 ffbc 6600 f45e 4000 ffaa d800 e6a9 1100 ffaa 8900 d9d2 4900 ffa8 2600 cceb 5400 ffb4 fd00 c11f b200 ffc3 e900 b6cd b300 ffcd bd00 ad2e be00 ffd1 7700 a51c 1100 ffca d400 9ee6 3d00 ffcb 3900 9a0c c800 ffcb 5400 96f2 be00 ffe2 8600 95d0 be00 fff1 0300 967b 4200 0000 1400 98d4 3a00 000c 5c00 9cf2 b100 0008 c100 a308 9900 0009 b400 aa79 0b00 0005 dc00 b335 7600 001a 8b00 bdc7 fd00 002b 8900 c929 4c00 0032 8f00 d527 9600 003e 8f00 e28e ff00 0037 8300 f01c 6e00 002c 1000 fd84 d300 002a 8600 0bbc 5600 0035 3200 196f d100 0038 2100 2646 7000 003e 6100 3328 e200 0043 c100 3eea 6100 0032 a200 492d d600 0011 5400 52bf 2d00 0012 7e00 5ac7 7300 001c 8600 60f5 4e00 001a cd00 65c9 3100 0019 7800 68e4 a500 0015 a000 6a0a 9800 0004 1f00 6963 5800 ffef 8b00 6710 8600 ffe4 bd00 62fa ba00 ffde 4000 5cec 3100 ffdf 3800 5587 5a00 ffdc 8e00 4cd9 d800 ffde 9d00 4255 3900 ffcb 0000 36fd d200 ffbc 9e00 2b02 7d00 ffb5 4f00 1d96 5700 ffae 6400 1005 e400 ffbc 3500 0297 1b00 ffbb a400 f45d 4b00 ffbe 9800 e6a9 7900 ffbb a400 d9d0 d300 ffb1 ac00 cce9 8a00 ffae 8e00 c11d 6100 ffb6 1300 b6cb 5400 ffc3 4c00 ad2c 5300 ffc8 b500 a51c ba00 ffda 7f00 9ee8 2e00 ffdb 8e00 9a0d 3e00 ffd3 f500 96f3 a600 ffd6 ad00 95cf 6700 ffe0 2a00 9679 5700 fff2 8f00 98d3 3900 ffff 5e00 9cf1 8a00 0011 9700 a309 9e00 0018 e500 aa79 7a00 000d 5600 b335 d500 0015 6d00 bdc7 2500 001b 6b00 c927 9100 0026 d200 d527 4300 002d 3d00 e28d c700 003f 5500 f01c 9300 0040 0100 fd83 ee00 0030 8200 0bba e200 0031 4d00 196b 3300 002c b600 2643 2900 0034 f300 3329 5300 0037 3400 3eea 9500 003b 3d00 4930 1300 0036 4200 52c0 7600 0023 9e00 5ac8 0300 0014 2f00 60f4 2e00 000c 5a00 65ca 9a00 000d e200 68e3 ab00 0007 8e00 6a09 8a00 0008 0000 6964 2900 ffff e800 6710 b700 ffe9 e900 62f9 9200 ffdc 8d00 5cee 2f00 ffcd 9700 5589 2d00 ffce 3a00 4cd9 f800 ffcc 4000 4255 4300 ffca 9800 36ff bf00 ffca c900 2b03 dd00 ffb8 7a00 1d98 3700 ffa9 e000 1004 e400 ffa8 de00 0297 6a00 ffab cb00 f45c a400 ffaf 1100 e6aa 0700 ffb7 9d00 d9d3 8800 ffbd e200 cce9 e200 ffac 6800 c11e 0b00 ffac 3e00 b6cc 4900 ffad 7700 ad2c 6700 ffb6 4800 a51c 5100 ffc4 6e00 9ee8 5e00 ffd0 bf00 9a0e e100 ffe1 9700 96f3 2f00 ffdd 6b00 95d0 6f00 ffde 6100 967a 2600 ffe2 0600 98d2 fe00 fff0 d800 9cf0 c300 0006 5300 a309 e200 0012 b800 aa79 e500 0021 ad00 b335 f600 001e 6200 bdc7 9400 001e 9900 c925 e300 001e 6c00 d525 7300 0028 0f00 e28d 9200 0035 d200 f01d 3c00 0038 b200 fd85 6100 0044 5f00 0bb9 b600 003e 8100 196d ee00 0031 1f00 2643 9600 002d 2c00 3328 b900 002e b600 3ee8 fe00 0031 d500 492e 8000 0032 f000 52bf da00 0038 4700 5ac8 5900 0025 ce00 60f4 d100 0011 3500 65c9 3300 0009 6500 68e3 8100 0001 6000 6a06 f300 0002 8600 6962 e900 fffd d600 6710 7200 ffea 3200 62f8 6200 ffdd 6700 5ceb 5200 ffd1 8000 5587 b300 ffd6 7200 4cd8 0100 ffd3 6f00 4255 1600 ffd3 e900 36fe f900 ffd0 6500 2b03 a500 ffb8 a800 1d97 9500 ffb2 db00 1004 8200 ffae bb00 0295 cc00 ffb1 4b00 f45d 7f00 ffb4 1200 e6a9 b900 ffbe bd00 d9d1 bf00 ffc1 3400 cce9 0d00 ffb3 7a00 c11e 2c00 ffb1 a400 b6cb fe00 ffaf e700 ad2d 8200 ffba 2200 a51b f500 ffc6 5000 9ee8 9a00 ffd8 c600 9a0f 2a00 ffe7 b600 96f3 5300 ffde 3b00 95cf 5500 ffe2 1800 967a 8f00 ffe6 2e00 98d3 3200 fff8 d900 9cf0 c600 000a 2600 a308 d000 0017 5900 aa79 6f00 0027 0200 b335 a300 0020 2300 bdc6 fb00 0021 7300 c927 5f00 0020 0b00 d525 3d00 002a da00 e28d f900 003a d000 f01b 3100 003f ae00 fd84 9700 0047 0d00 0bb8 cc00 003c be00 196c d700 0031 d800 2644 e800 002d fe00 3327 7800 002e 0d00 3eea 5c00 0031 e300 492f 8f00 0033 e500 52c0 d100 0038 d500 5ac7 af00 0021 6e00 60f4 8000 0013 8400 65c9 1200 0007 5700 68e2 c400 0002 c700 6a07 ba00 0000 0e00 6962 f800 fffe 0500 670f e600 0001 8c00 62fb b500 ffec bc00 5ced 1e00 ffdb 0800 5588 4500 ffd1 8c00 4cd8 6600 ffc8 4700 4253 ce00 ffca 1f00 36fd 4b00 ffd2 0a00 2b01 ba00 ffd2 2e00 1d98 be00 ffd7 4700 1004 1e00 ffc9 1a00 0297 4c00 ffbb 7300 f45e b700 ffb6 ef00 e6a8 9500 ffba 6b00 d9d3 3200 ffc6 a100 cceb 8300 ffcb 2c00 c121 5e00 ffdb 2900 b6cd 7700 ffd5 2100 ad2f 2300 ffcc 4200 a51f 0b00 ffd0 fd00 9eeb 2900 ffd6 ae00 9a10 6e00 ffe8 9800 96f7 3f00 fff6 1a00 95d2 aa00 0007 fe00 967d 0000 000b 9200 98d6 e300 0007 6700 9cf5 0900 000e e200 a30b ed00 0012 a900

出0入0汤圆

发表于 2013-2-15 10:49:58 | 显示全部楼层
“aa78 ec00 001c 9600”  -- 4个数为一组,分别是电压和电流数据,即aa78ec00和001c9600(int32_t类型)

millwood0有空可否使用你的算法计算一下?我测量的读数是0.0010nf。

出0入0汤圆

发表于 2013-2-15 23:15:20 | 显示全部楼层
请大家帮忙如何像LZ显示程式?
另外--没有校准肯定无法测量1PF.因为高阻抗,噪声,和测试探针充当天线使读数改变.
解决方案是良好的PCB设计
1,直接连接(不使用接线)
2,使用屏蔽接线

出0入0汤圆

发表于 2013-2-15 23:25:03 | 显示全部楼层
“另外--没有校准肯定无法测量1PF”

--- 昨天晚上鼓捣的,测量1pf没有问题,而且在1kHz下测试的。但是,

--- 这个电容准不准,不知道。

--- 想再找些类似的电容,比如1.1p,1.2p之类。如果能够准确分辨这些,测量1pf电容还可以。

出0入0汤圆

发表于 2013-2-15 23:28:00 | 显示全部楼层
“另外--没有校准肯定无法测量1PF.因为高阻抗,噪声,和测试探针充当天线使读数改变.”

--- 以上就是算法的重要性的。

--如果楼主提出的算法能解决这个问题,确实是好算法。呵呵,不知楼主可否有空,算算54楼数据?

出0入0汤圆

发表于 2013-2-16 00:30:46 | 显示全部楼层
jt6245 发表于 2013-2-7 22:34
完成在噪声环境下模拟小二乘三参数正弦波拟合
结果:creating sinusoid wave with
        - clock jitter

matlab很熟呀,想把54楼数据搞成图形的,可是matlab太大了,懒得安装了(呵呵,其实即使安装上可能也不会用,好想看看1pf下波形是什么样?)。

开始使用excel鼓捣的,在把16进制数转换成10进制数时,excel老换成浮点数,郁闷,放弃了。

出0入0汤圆

发表于 2013-2-16 03:59:20 | 显示全部楼层
太多的浮点运算,而且double的,没忍住,试了试,唉!

出0入0汤圆

发表于 2013-2-18 21:34:52 | 显示全部楼层
直接比较DFT和三参数正弦波拟合. 当然是整数周期采样(为DFT优化).
基于测试结果两种方法都没有不同的答.
(通过Scilab实验在不同条件下都有相同的结果)
DFT 简单,三参数正弦波拟合较灵活,何用不规则的采样时间.

结果:
Comparation between 3-parameter sine-fitting and DFT
                     original sinusoid         3-parameter                 DFT
Ampl:                1.000                         1.015                        1.015
Phase:[degree]   -89.000                 -88.865                        -88.861
Offset:          1.2500                         1.2626

程式:
//comparation between dft and 3-parameter sine-fitting under noise environment
//Scilab program  FEB,2013.
clear;
close;
clc;
N = 250; //vector length
fs = 50000; //sampling freq
ts = 1/fs; //sampling interval
fre=1000;
phase = -%pi*89/180; //phase (rad)
offset = 1.25; //offset (i.e mean)
amplitude = 1;//amplitude
t0 = (0:N-1)*ts; //time vector
std_jitter = 0.01; //standard deviation of jitter noise
std_addnoi = 0.1; //standard deviation of  noise added to signal
std_phase = 0.01; //standard deviation of phase noise
noise = rand(1,N,"normal");
std1_noise = noise/stdev(noise); // random vector with stdev = 1
jit_noise = std_jitter*std1_noise;
phase_noise = std_phase*std1_noise;
add_noise = std_addnoi*std1_noise;
w = (2*%pi)*fre;
t = t0+ts*jit_noise; // add clock jitter
A2 = amplitude*0.01; // 2. harmonic ampl
A3 = amplitude*0.02; // 3. harmonic ampl
yin = cos(w*t+phase+phase_noise); // sinusoid with phase noise
//yin = cos(w*t+phase);
//add offset, noise & harmonics
yin = offset+amplitude*yin+A2*yin.*yin+A3*yin.*yin.*yin+add_noise;
//yin = offset+amplitude*yin;
plot2d(t0,yin);
//****************************************
// dft algorithm
//***************************************
x=(2/N)*sum(yin.*cos(w*t0));//calculating real part
y=(2/N)*sum(yin.*sin(w*t0));//calculating imagine part
value_x=sqrt(x*x+y*y);
angle_x=atan(-y/x);
if x<0 then
  if y<0 then
      angle_x = angle_x+%pi;
     else
       angle_x=angle_x-%pi;
   end;   
end;
//****************************************
//3-parameter sine-fitting
//****************************************
yin=yin(:); //tranpose of yin
t = t(:);
onevec = ones(N,1);
function [x0] = sinefit3par(yin,wt,onevec)
x0=[];
cosvec = cos(wt);
sinvec = sin(wt);
D0 = [cosvec,sinvec,onevec];
[Q,R] = qr(D0,"e");
x0 = R\((Q.')*yin);
endfunction
[x0] = sinefit3par(yin,w*t,onevec);
//prep the output parameters
A0 = x0(1);B0 = x0(2);C0 = x0(3);
A = sqrt(A0*A0+B0*B0);
phi = atan(-B0/A0);
if A0<0 then
  if B0<0 then
      phi = phi+%pi;
     else
       phi=phi-%pi;
   end;   
end;
printf('\tComparation between 3-parameter sine-fitting and DFT');
printf('\n\t\toriginal sinusoid\t3-parameter \t\tDFT');
printf('\nAmpl:   \t%3.3f\t\t\t%3.3f\t\t\t%3.3f',amplitude,A,value_x);
printf('\nPhase:[degree]\t%3.3f\t\t\t%3.3f\t\t\t%3.3f ',180*phase/%pi,180*phi/%pi,180*angle_x/%pi);
printf('\nOffset:   \t%3.4f\t\t\t%3.4f\n',offset,C0);
  

出0入0汤圆

发表于 2013-2-20 22:03:36 | 显示全部楼层
millwood0 发表于 2013-2-1 03:13
LMS can equal out noises too, thus its ability to achieve more precision than the adc uncertainty ma ...

下面链接的文章解释,在整数周期采样和不变的采样时间情况下.
DFT和LS是没有什么不同的.
已被证明于楼上
它是不错的简短文章.
Comparison of FFT and LMS applied

出0入42汤圆

发表于 2015-12-21 10:38:40 | 显示全部楼层
本帖最后由 ahfong2006 于 2015-12-21 10:40 编辑
millwood0 发表于 2013-1-22 05:40
IEEE1057 3-parameter implementation:

as promised, here is the (more) wholesome implementation of th ...


在Linux上编译运行了一下,结果是这样的

在OS X上:
volt.A =   -2138.12, volt.B =   -2602.54, volt.C =   32583.91
volt.A0 =    3368.20, volt.theta =      -0.88
curt.A =      43.51, curt.B =   -1152.83, curt.C =   33830.06
curt.A0 =    1153.65, curt.theta =       1.53
dut.Z =    2919.60ohm, dut.Zr =   -2184.41ohm, dut.Zi =    1937.12ohm
dut.theta =       2.42
dut.Zr =   -2184.41, dut.Zi =    1937.12, dut.L =   3.08e+04(uh)

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x

出0入0汤圆

发表于 2015-12-21 11:23:48 | 显示全部楼层
楼上挖出了篇好文章,话说好久没看到millwood兄了

出0入0汤圆

发表于 2015-12-21 13:34:24 | 显示全部楼层
的确好文章

出0入0汤圆

发表于 2015-12-22 15:42:41 | 显示全部楼层
高深莫测。

出0入0汤圆

发表于 2016-3-30 16:14:10 | 显示全部楼层
非常有用,记录一下

出0入0汤圆

发表于 2017-8-8 00:36:54 | 显示全部楼层
留标记,好贴

出10入95汤圆

发表于 2018-1-19 23:17:52 | 显示全部楼层
again 发表于 2013-2-2 09:34
FFT测量相位非常精确!目前已经有非常好的非证周期采样造成频谱泄漏的校正算法!
给大家推荐个相位计用的就 ...

FFT测相位,好牛!
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-3-29 08:28

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

快速回复 返回顶部 返回列表