Skip to main content
. 2015 Apr 30;15(5):10221–10254. doi: 10.3390/s150510221

Algorithm 1 Reconstruction algorithm using LFSR measurement matrix.

1: lfsr ← 44257 #Initialize LFSR seed
2: comp(vector); Sizeof Historytable;
3: #Create the measurement matrix by sampling n column LFSR vector:
4: for (i in 1 : len(comp(vector))) do
5: for (i in 1 : Sizeof Historytable) do
6:   #Generate the LFSR vector used for compression at the source nodes:
7:   bit := ((lfsr ≫ 0) ˆ (lfsr ≫ 2) ˆ (lfsr ≫ 3) ˆ (lfsr ≫ 5)) & 1;
8:   lfsr := (lfsr ≫ 1) (bit ≪ 15);
9:   matrix(i,j) := lfsr;
10: end for
11: end for
12: #Signal reconstruction using LFSR generated matrix:
13: CompA := matrix × comp (vector);
14: Brec := dctmtx(matrix) × len(comp(vector));
15: CoefBP := SolveBP(matrix × B′rec, CompA, len(comp(vector)));
16: Recon := (B′rec × CoefBP);