《误差理论》——线性测量的参数最小二乘法处理

线性测量的参数最小二乘法处理

1、最小二乘原理

两种方法——代数法矩阵法。最小二乘原理需满足测量误差无偏正态分布相对独立三个基本原则

(1) 代数法

设直接量 Y 1 , Y 2 , . . . , Y n Y_1,Y_2,...,Y_n Y1,Y2,...,Yn的估计量分别为 y 1 , y 2 , . . . , y n y_1,y_2,...,y_n y1,y2,...,yn: { y 1 = f 1 ( x 1 , x 2 , . . . , x t ) y 2 = f 2 ( x 1 , x 2 , . . . , x t ) . . . y n = f n ( x 1 , x 2 , . . . , x t ) \left\{ \begin{array}{lr} y_1=f_1(x_1,x_2,...,x_t)& \\ y_2=f_2(x_1,x_2,...,x_t)\\ ...\\ y_n=f_n(x_1,x_2,...,x_t)& \end{array} \right. y1=f1(x1,x2,...,xt)y2=f2(x1,x2,...,xt)...yn=fn(x1,x2,...,xt)测量数据 l 1 , l 2 , . . . , l n l_1,l_2,...,l_n l1,l2,...,ln的残余误差为 { v 1 = l 1 − y 1 = l 1 − f 1 ( x 1 , x 2 , . . . , x t ) v 2 = l 2 − y 2 = l 2 − f 2 ( x 1 , x 2 , . . . , x t ) . . . v n = l n − y n = l n − f n ( x 1 , x 2 , . . . , x t ) \left\{ \begin{array}{lr} v_1=l_1-y_1=l_1-f_1(x_1,x_2,...,x_t)& \\ v_2=l_2-y_2=l_2-f_2(x_1,x_2,...,x_t)\\ ...\\ v_n=l_n-y_n=l_n-f_n(x_1,x_2,...,x_t)& \end{array} \right. v1=l1y1=l1f1(x1,x2,...,xt)v2=l2y2=l2f2(x1,x2,...,xt)...vn=lnyn=lnfn(x1,x2,...,xt)使 v 1 2 σ 1 2 + v 2 2 σ 2 2 + . . . + v n 2 σ n 2 = 最小(核心思想) \frac{v_1^2}{\sigma_1^2}+\frac{v_2^2}{\sigma_2^2}+...+\frac{v_n^2}{\sigma_n^2}=最小(核心思想) σ12v12+σ22v22+...+σn2vn2=最小(核心思想)引入权重( P 1 : P 2 : . . . : P n = 1 σ 1 2 : 1 σ 2 2 : . . . : 1 σ n 2 P_1:P_2:...:P_n=\frac{1}{\sigma_1^2}:\frac{1}{\sigma_2^2}:...:\frac{1}{\sigma_n^2} P1:P2:...:Pn=σ121:σ221:...:σn21)可得: P 1 v 1 2 + P 2 v 2 2 + . . . + P n v n 2 = ∑ i = 1 n P i v i 2 = 最小 P_1v_1^2+P_2v_2^2+...+P_nv_n^2=\sum_{i=1}^{n}P_iv_i^2=最小 P1v12+P2v22+...+Pnvn2=i=1nPivi2=最小等精度测量中: v 1 2 + v 2 2 + . . . + v n 2 = ∑ i = 1 n v i 2 = 最小 v_1^2+v_2^2+...+v_n^2=\sum_{i=1}^{n}v_i^2=最小 v12+v22+...+vn2=i=1nvi2=最小

(2) 矩阵法

L = ( l 1 l 2 . . . l n ) L=\left( \begin{matrix} l_1 \\ l_2 \\ ... \\ l_n \\ \end{matrix} \right) L= l1l2...ln x ^ = ( x 1 x 2 . . . x t ) \hat{x}=\left( \begin{matrix} x_1 \\ x_2 \\ ... \\ x_t \\ \end{matrix} \right) x^= x1x2...xt V = ( v 1 v 2 . . . v n ) V=\left( \begin{matrix} v_1 \\ v_2 \\ ... \\ v_n \\ \end{matrix} \right) V= v1v2...vn A = ( a 11 a 12 . . . a 1 t a 21 a 22 . . . a 2 t ⋮ a n 1 a n 2 . . . a n t ) A=\left( \begin{matrix} a_{11} & a_{12} & ... & a_{1t} \\ a_{21} & a_{22} & ... & a_{2t} \\ & &\vdots \\ a_{n1} & a_{n2} & ... & a_{nt}\\ \end{matrix} \right) A= a11a21an1a12a22an2.........a1ta2tant 其中, L L L n n n个直接测量结果(测量数据); x ^ \hat{x} x^ t t t个代求的被测量的估计值; V V V n n n个直接测量结果的残差; A A A n n n个误差方程的 n × t n\times t n×t个系数。
误差方差: V = L − A x ^ V=L-A\hat{x} V=LAx^a.等精度测量中
要使 V T V = 最小 V^TV=最小 VTV=最小 ( L − A x ^ ) T ( L − A x ^ ) = 最小 (L-A\hat{x})^T(L-A\hat{x})=最小 (LAx^)T(LAx^)=最小b.不等精度测量中
要使 V T P V = 最小 V^TPV=最小 VTPV=最小 ( L − A x ^ ) T P ( L − A x ^ ) = 最小 (L-A\hat{x})^TP(L-A\hat{x})=最小 (LAx^)TP(LAx^)=最小其中 P P P n × n n\times n n×n的对角矩阵

2、正规方程

待求参数最小二乘法处理的基本环节

(1) 等精度测量

A T V = 0 A^TV=0 ATV=0有因为 V = L − x ^ V=L-\hat{x} V=Lx^ A T L − A T A x ^ = 0 A^TL-A^TA\hat{x}=0 ATLATAx^=0 ( A T A ) x ^ = A T L (A^TA)\hat{x}=A^TL (ATA)x^=ATL c = A T A c=A^TA c=ATA,则正规方程可写为 c x ^ = A T L c\hat{x}=A^TL cx^=ATL x ^ = c − 1 A T L \hat{x}=c^{-1}A^TL x^=c1ATL x ^ \hat{x} x^的数学期望为: E [ x ^ ] = E ( c − 1 A T L ) = c − 1 A T E ( L ) = c − 1 A T Y = c − 1 A T A x = X E[\hat{x}]=E(c^{-1}A^TL)=c^{-1}A^TE(L)=c^{-1}A^TY=c^{-1}A^TAx=X E[x^]=E(c1ATL)=c1ATE(L)=c1ATY=c1ATAx=X其中 Y = ( Y 1 Y 2 . . . Y n ) , X = ( X 1 X 2 . . . X n ) Y=\left( \begin{matrix} Y_1 \\ Y_2 \\ ... \\ Y_n \\ \end{matrix} \right), X=\left( \begin{matrix} X_1 \\ X_2 \\ ... \\ X_n \\ \end{matrix} \right) Y= Y1Y2...Yn ,X= X1X2...Xn x ^ \hat{x} x^ X X X的无偏估计

(2) 不等精度测量

A T P V = 0 A^TPV=0 ATPV=0因为 V = L − A x ^ V=L-A\hat{x} V=LAx^,所以 A T P ( l − A x ^ ) = 0 A^TP(l-A\hat{x})=0 ATP(lAx^)=0又因为 A T P A = A T P L A^TPA=A^TPL ATPA=ATPL,所以参数的最小二乘解为: x ^ = ( A T P A ) − 1 A T P L \hat{x}=(A^TPA)^{-1}A^TPL x^=(ATPA)1ATPL c ∗ = A ∗ T A ∗ = A T P A c*=A*^TA*=A^TPA c=ATA=ATPA x ^ = c ∗ − 1 A T P L \hat{x}=c*^{-1}A^TPL x^=c1ATPL x ^ \hat{x} x^的数学期望: E [ x ^ ] = E ( c − 1 A T L ) = c − 1 A T E ( L ) = c − 1 A T Y = c − 1 A T A x = X E[\hat{x}]=E(c^{-1}A^TL)=c^{-1}A^TE(L)=c^{-1}A^TY=c^{-1}A^TAx=X E[x^]=E(c1ATL)=c1ATE(L)=c1ATY=c1ATAx=X正规方程的重要过程:
V = L − A x ^ V=L-A\hat{x} V=LAx^ c ∗ = A T P A c*=A^TPA c=ATPA x ^ = c ∗ − 1 A T P L \hat{x}=c*^{-1}A^TPL x^=c1ATPL

3、精度估计

(1) 等精度测量数据的精度估计

σ = ∑ i = 1 n v i 2 n − t \sigma=\sqrt{\frac{\sum_{i=1}^{n}v_i^2}{n-t}} σ=nti=1nvi2 其中 t t t为变量个数, n n n为测量次数

(2) bu 等精度测量数据的精度估计

σ = ∑ i = 1 n P i v i 2 n − t \sigma=\sqrt{\frac{\sum_{i=1}^{n}P_iv_i^2}{n-t}} σ=nti=1nPivi2

4、最小二乘估计量的精度估计

{ σ x 1 = σ d 11 σ x 2 = σ d 22 . . . σ x t = σ d t t \left\{ \begin{array}{lr} \sigma_{x1}=\sigma \sqrt{d_{11}} \\ \sigma_{x2}=\sigma \sqrt{d_{22}}\\ ...\\ \sigma_{xt}=\sigma \sqrt{d_{tt}} \end{array} \right. σx1=σd11 σx2=σd22 ...σxt=σdtt 其中 c − 1 = ( A T P A ) − 1 = ( d 11 d 12 . . . d 1 t d 21 d 22 . . . d 2 t ⋮ d t 1 d t 2 . . . d t t ) c^{-1}=(A^TPA)^{-1}=\left( \begin{matrix} d_{11} & d_{12} & ... & d_{1t} \\ d_{21} & d_{22} & ... & d_{2t} \\ & &\vdots \\ d_{t1} & d_{t2} & ... &d_{tt}\\ \end{matrix} \right) c1=(ATPA)1= d11d21dt1d12d22dt2.........d1td2tdtt

5、总结(线性测量*)

字母名称
V残差
L测量数据
A未知量系数
X未知量
P权重

V = ( v 1 v 2 . . . v n ) V=\left( \begin{matrix} v_1 \\ v_2 \\ ... \\ v_n \\ \end{matrix} \right) V= v1v2...vn L = ( l 1 l 2 . . . l n ) L=\left( \begin{matrix} l_1 \\ l_2 \\ ... \\ l_n \\ \end{matrix} \right) L= l1l2...ln A = ( a 11 a 12 . . . a 1 t a 21 a 22 . . . a 2 t ⋮ a n 1 a n 2 . . . a n t ) A=\left( \begin{matrix} a_{11} & a_{12} & ... & a_{1t} \\ a_{21} & a_{22} & ... & a_{2t} \\ & &\vdots \\ a_{n1} & a_{n2} & ... & a_{nt}\\ \end{matrix} \right) A= a11a21an1a12a22an2.........a1ta2tant x ^ = ( x 1 x 2 . . . x t ) \hat{x}=\left( \begin{matrix} x_1 \\ x_2 \\ ... \\ x_t \\ \end{matrix} \right) x^= x1x2...xt P = ( P 1 P 2 ⋱ P n ) P=\left( \begin{matrix} P_1 & & & \\ & P_2 & & \\ & &\ddots\\ & & &P_n \\ \end{matrix} \right) P= P1P2Pn x ^ = c − 1 A T P L \hat{x}=c^{-1}A^TPL x^=c1ATPL,其中 c − 1 = ( A T P A ) − 1 c^{-1}=(A^TPA)^{-1} c1=(ATPA)1 V = L − A x ^ V=L-A\hat{x} V=LAx^
标准差 σ = ∑ i = 1 n v i 2 n − t \sigma=\sqrt{\frac{\sum_{i=1}^{n}v_i^2}{n-t}} σ=nti=1nvi2 ,则 x 1 , x 2 , . . . , x t x_1,x_2,...,x_t x1,x2,...,xt的标准差为: σ 1 = σ d 11 , σ 2 = σ d 22 , . . . , σ 1 = σ d t t \sigma_1=\sigma\sqrt{d_{11}},\sigma_2=\sigma\sqrt{d_{22}},...,\sigma_1=\sigma\sqrt{d_{tt}} σ1=σd11 ,σ2=σd22 ,...,σ1=σdtt 其中 c − 1 = ( d 11 d 12 . . . d 1 t d 21 d 22 . . . d 2 t ⋮ d t 1 d t 2 . . . d t t ) c^{-1}=\left( \begin{matrix} d_{11} & d_{12} & ... & d_{1t} \\ d_{21} & d_{22} & ... & d_{2t} \\ & &\vdots \\ d_{t1} & d_{t2} & ... &d_{tt}\\ \end{matrix} \right) c1= d11d21dt1d12d22dt2.........d1td2tdtt
例题: x − 3 y = − 5.6 , P 1 = 1 ; x-3y=-5.6,P_1=1; x3y=5.6,P1=1; 4 x + y = 8.1 , P 2 = 2 ; 4x+y=8.1, P_2=2; 4x+y=8.1,P2=2; 2 x − y = 0.5 , P 3 = 3 2x-y=0.5, P_3=3 2xy=0.5,P3=3解: L = ( − 5.6 8.1 0.5 ) ; A = ( 1 − 1 4 1 2 − 1 ) ; x ^ = ( x y ) ; P = ( 1 2 3 ) L=\left( \begin{matrix} -5.6 \\ 8.1 \\ 0.5 \\ \end{matrix} \right);A=\left( \begin{matrix} 1 & -1 \\ 4 &1 \\ 2 & -1 \\ \end{matrix} \right);\hat{x}=\left( \begin{matrix} x \\ y \\ \end{matrix} \right);P=\left( \begin{matrix} 1 & & \\ & 2 & \\ & & 3 \\ \end{matrix} \right) L= 5.68.10.5 ;A= 142111 ;x^=(xy);P= 123 又因为 x ^ = c − 1 A T P L \hat{x}=c^{-1}A^TPL x^=c1ATPL c − 1 = ( A T P A ) − 1 = ( 0.0223 0.0016 0.0016 0.0715 ) c^{-1}=(A^TPA)^{-1}=\left( \begin{matrix} 0.0223 & 0.0016 \\ 0.0016 &0.0715 \\ \end{matrix} \right) c1=(ATPA)1=(0.02230.00160.00160.0715)所以 d 11 = 0.0223 , d 22 = 0.0715 d_{11}=0.0223,d_{22}=0.0715 d11=0.0223,d22=0.0715。因为 x ^ = c − 1 A T P L = ( 1 , 4345 2.3525 ) \hat{x}=c^{-1}A^TPL=\left( \begin{matrix} 1,4345 \\ 2.3525 \\ \end{matrix} \right) x^=c1ATPL=(1,43452.3525)所以 x = 1.4345 , y = 2.352 x=1.4345, y=2.352 x=1.4345,y=2.352。又因为 V = L − A x ^ = ( 0.0229 0.0095 − 0.0165 ) V=L-A\hat{x}=\left( \begin{matrix} 0.0229\\ 0.0095\\ -0.0165\\ \end{matrix} \right) V=LAx^= 0.02290.00950.0165 所以 σ = ∑ i = 1 n p i v i 2 3 − 2 = 0.039 \sigma=\sqrt{\frac{\sum_{i=1}^{n}p_iv_i^2}{3-2}}=0.039 σ=32i=1npivi2 =0.039 σ x = σ d 11 = 0.006 , σ y = σ d 22 = 0.010 \sigma_x=\sigma\sqrt{d_{11}}=0.006,\sigma_y=\sigma\sqrt{d_{22}}=0.010 σx=σd11 =0.006,σy=σd22 =0.010

6、非线性测量

函数 y i = f i ( x 1 , x 2 , . . . , x t ) , i = 1 , 2 , . . . , n y_i=f_i(x_1,x_2,...,x_t),i=1,2,...,n yi=fi(x1,x2,...,xt),i=1,2,...,n,令 { x 1 = x 10 + δ 1 x 2 = x 20 + δ 2 . . . x t = x t 0 + δ t \left\{ \begin{array}{lr} x_1=x_{10}+\delta_1 \\ x_2=x_{20}+\delta_2\\ ...\\ x_t=x_{t0}+\delta_t \end{array} \right. x1=x10+δ1x2=x20+δ2...xt=xt0+δt 其中 δ i \delta_i δi为近似值的偏差
现将函数在 x 10 , x 20 , . . . , x t 0 x_{10},x_{20},...,x_{t0} x10,x20,...,xt0处展开,取一次项,则有 f i ( x 1 , x 2 , . . . , x t ) = f i ( x 10 , x 20 , . . . , x t 0 ) + ( ∂ f i ∂ x 1 ) o δ 1 + ( ∂ f i ∂ x 2 ) o δ 2 + . . . + ( ∂ f i ∂ x t ) o δ t , ( i = 1 , 2 , . . . , n ) f_i(x_1,x_2,...,x_t)=f_i(x_{10},x_{20},...,x_{t0})+(\frac{\partial f_i}{\partial x_1})_o\delta_1+(\frac{\partial f_i}{\partial x_2})_o\delta_2+...+(\frac{\partial f_i}{\partial x_t})_o\delta_t,(i=1,2,...,n) fi(x1,x2,...,xt)=fi(x10,x20,...,xt0)+(x1fi)oδ1+(x2fi)oδ2+...+(xtfi)oδt,(i=1,2,...,n)其中 ( ∂ f i ∂ x r ) o (\frac{\partial f_i}{\partial x_r})_o (xrfi)o为函数 f i f_i fi x r x_r xr的偏导数在 x 10 , x 20 , . . . , x t 0 x_{10},x_{20},...,x_{t0} x10,x20,...,xt0处的取值,令 l i ′ = l i − f i ( x 10 , x 20 , . . . , x t 0 ) l'_i=l_i-f_i(x_{10},x_{20},...,x_{t0}) li=lifi(x10,x20,...,xt0) a i 1 = ( ∂ f i ∂ x 1 ) o ; a i 2 = ( ∂ f i ∂ x 2 ) o ; . . . ; a i t = ( ∂ f i ∂ x t ) o ; a_{i1}=(\frac{\partial f_i}{\partial x_1})_o;a_{i2}=(\frac{\partial f_i}{\partial x_2})_o;...;a_{it}=(\frac{\partial f_i}{\partial x_t})_o; ai1=(x1fi)o;ai2=(x2fi)o;...;ait=(xtfi)o;则误差方程代成线性方程组: { v 1 = l 1 ′ − ( a 11 δ 1 + a 12 δ 2 + . . . + a 1 t δ t ) v 2 = l 2 ′ − ( a 21 δ 1 + a 22 δ 2 + . . . + a 2 t δ t ) . . . v n = l n ′ − ( a 11 δ 1 + a n 2 δ 2 + . . . + a n t δ t ) \left\{ \begin{array}{lr} v_1=l'_1-(a_{11}\delta_1+a_{12}\delta_2+...+a_{1t}\delta_t) \\ v_2=l'_2-(a_{21}\delta_1+a_{22}\delta_2+...+a_{2t}\delta_t)\\ ...\\ v_n=l'_n-(a_{11}\delta_1+a_{n2}\delta_2+...+a_{nt}\delta_t) \end{array} \right. v1=l1(a11δ1+a12δ2+...+a1tδt)v2=l2(a21δ1+a22δ2+...+a2tδt)...vn=ln(a11δ1+an2δ2+...+antδt)
例题: c 1 = 0.2071 , c 2 = 0.2056 , c 1 + c 2 = 0.4111 , c 1 c 2 c 1 + c 2 = 0.1035 c_1=0.2071,c_2=0.2056,c_1+c_2=0.4111,\frac{c_1c_2}{c_1+c_2}=0.1035 c1=0.2071,c2=0.2056,c1+c2=0.4111,c1+c2c1c2=0.1035
解: v 1 = 0.2071 − c 1 v_1=0.2071-c_1 v1=0.2071c1 v 2 = 0.2056 − c 2 v_2=0.2056-c_2 v2=0.2056c2 v 3 = 0.4111 − ( c 1 + c 2 ) v_3=0.4111-(c_1+c_2) v3=0.4111(c1+c2) v 4 = 0.1035 − c 1 c 2 c 1 + c 2 v_4=0.1035-\frac{c_1c_2}{c_1+c_2} v4=0.1035c1+c2c1c2 v 1 = v 2 = 0 v_1=v_2=0 v1=v2=0,则 c 10 = 0.2071 , c 20 = 0.2056 c_{10}=0.2071,c_{20}=0.2056 c10=0.2071,c20=0.2056。则 f 4 ( c 1 , c 2 ) = f 4 ( c 10 , c 20 ) + ∂ f 4 ∂ c 1 ( c 1 − c 10 ) + ∂ f 4 ∂ c 2 ( c 2 − c 20 ) f_4(c_1,c_2)=f_4(c_{10},c_{20})+\frac{\partial f_4}{\partial c_{1}}(c_1-c_{10})+\frac{\partial f_4}{\partial c_{2}}(c_2-c_{20}) f4(c1,c2)=f4(c10,c20)+c1f4(c1c10)+c2f4(c2c20) = 0.1034 + 0.2482 ( c 1 − 0.2071 ) + 0.2518 ( c 2 − 0.2056 ) =0.1034+0.2482(c_1-0.2071)+0.2518(c_2-0.2056) =0.1034+0.2482(c10.2071)+0.2518(c20.2056) = 0.2482 c 1 + 0.2518 c 2 + 0.0002277 =0.2482c_1+0.2518c_2+0.0002277 =0.2482c1+0.2518c2+0.0002277此时 L = ( 0.2071 0.2056 0.4111 0.1035 ) , A = ( 1 0 0 1 1 1 0.2482 0.2518 ) L=\left( \begin{matrix} 0.2071 \\ 0.2056 \\ 0.4111 \\ 0.1035\\ \end{matrix} \right),A=\left( \begin{matrix} 1 & 0 \\ 0 & 1 \\ 1 & 1 \\ 0.2482 & 0.2518 \\ \end{matrix} \right) L= 0.20710.20560.41110.1035 ,A= 1010.24820110.2518 c − 1 = ( A T A ) − 1 = ( 0.6603 − 0.3400 − 0.3400 0.6597 ) c^{-1}=(A^TA)^{-1}=\left( \begin{matrix} 0.6603 & -0.3400 \\ -0.3400 & 0.6597 \\ \end{matrix} \right) c1=(ATA)1=(0.66030.34000.34000.6597)所以 d 11 = 0.6603 , d 22 = 0.6597 d_{11}=0.6603,d_{22}=0.6597 d11=0.6603,d22=0.6597 x ^ = c − 1 A T L = ( 0.1904 0.1882 ) \hat{x}=c^{-1}A^TL=\left( \begin{matrix} 0.1904\\ 0.1882\\ \end{matrix} \right) x^=c1ATL=(0.19040.1882)可得 c 1 = 0.1904 , c 2 = 0.1882 c_1=0.1904,c_2=0.1882 c1=0.1904,c2=0.1882。此时 V = L − A x ^ , σ = ∑ i = 1 4 v i 2 4 − 2 V=L-A\hat{x},\sigma=\sqrt{\frac{\sum_{i=1}^{4}v_i^2}{4-2}} V=LAx^,σ=42i=14vi2 σ c 1 = σ d 11 , σ c 2 = σ d 22 \sigma_{c1}=\sigma\sqrt{d_{11}},\sigma_{c2}=\sigma\sqrt{d_{22}} σc1=σd11 ,σc2=σd22

  • 23
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

三天后的承诺

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值