How to count consecutive errors?
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
How to count consecutive errors?

 
Post new topic   Reply to topic    CASTalk.com Forum Index -> DSP
Author Message
Jeff
Guest





Posted: Sat Jan 01, 2005 11:17 pm    Post subject: How to count consecutive errors? Reply with quote

Hi,
I have asked the question from this group and got the following
answer. But the result was not I want. Possibly I did not describe my
purpose clearly.

I have considered it for quite a while using sparse matrix and no
avail.
In the example from the reply, I want to get the following result.
(1,1) 0
(2,1) 2
(3,1) 1
(4,1) 0
(5,1) 0
(6,1) 0
(7,1) 0
(8,1) 0
(9,1) 0
(10,1) 0
(11,1) 0

I.e. I want to count the consecutive errors in a block.

Could you help me? Thanks in advance.




---------------Previous question
Hi,
I'm new to Matlab. I have the following question in communication
simulation. One block of symbols is transmitted. And one corrupted
symbol block is received.
Tr: 2 3 1 3 0 1 2 2 2
Rx: 2 1 3 2 0 1 1 1 2
x x x x x

There are 5 wrong symbols received. I want to record the number of the
consecutive wrong symbols. In the above example, there will be one 3
consecutive wrong symbol received, another wrong is 2. I construct a
vector ErrCont=zeros(1,9). And I shall record ErrCont(3)=ErrCont(3)+1;
ErrCont(2)=ErrCont(2)+1;

In fact, the block will be much larger than 9, although it has been
determined now. Are there some tricky methods? I hate to program it in
several loops. The first step would be to make a comparison to
generate a vector like:

0 1 1 1 0 0 1 1 0.



------The answer that I got
one of the many solutions:

% some data
clear all; % save old stuff!
t=[2 3 1 3 0 1 2 2 2 5 10];
r=[2 1 3 2 0 1 1 1 2 4 4];
e=sparse(0);
% the engine
ix=t~=r;
e=e+sparse(t(ix),1,1)

us

.......This is the result from the above code.
e =

(1,1) 1
(2,1) 2
(3,1) 2
(5,1) 1
(10,1) 1

.....I want to get the following result:
(1,1) 0
(2,1) 2
(3,1) 1
(4,1) 0
(5,1) 0
(6,1) 0
(7,1) 0
(8,1) 0
(9,1) 0
(10,1) 0
(11,1) 0
Back to top
Fred Marshall
Guest





Posted: Sun Jan 02, 2005 7:56 am    Post subject: Re: How to count consecutive errors? Reply with quote

"Jeff" <freelait2000@yahoo.com> wrote in message
news:6cdef69d.0501011017.2efbc8d9@posting.google.com...
...............
Quote:

....I want to get the following result:
(1,1) 0
(2,1) 2
(3,1) 1
(4,1) 0
(5,1) 0
(6,1) 0
(7,1) 0
(8,1) 0
(9,1) 0
(10,1) 0
(11,1) 0

The expression for ix gives flags for each error correctly:
ix = [0 1 1 1 0 0 1 1 0 1 1]

The expression for "e" has values of "t" - which makes no sense .....


It's not clear to me why you don't want the result: Counting all occurrences
of errors there are 7 single errors, 4 double errors and 1 triple error.
This seems a reasonable rule.

(1,1) 7
(2,1) 4
(3,1) 1
(4,1) 0
(5,1) 0
(6,1) 0
(7,1) 0
(8,1) 0
(9,1) 0
(10,1) 0
(11,1) 0

Since a triple error is also 2 double errors and three single errors, then
we might subtract 2 from the number of double errors and 3 from the number
of single errors for each triple error.

Since a double error is also 2 single errors then we might subtract 2 from
the number of single errors for each double error.

....Which seems to be the rule you want to use.......

Let's forget about the "sparse" and keep it simple:
ix is the important result.

xt11 ... xt3 xt2
(1) 7 (1) 4 (1) 0
(2) 4 (2) 2 (2) 2
(3) 1 (3) 1 (3) 1
(4) 0 (4) 0 (4) 0
(5) 0 (5) 0 (5) 0
(6) 0 (6) 0 (6) 0
(7) 0 (7) 0 (7) 0
(8) 0 (8) 0 (8) 0
(9) 0 (9) 0 (9) 0
(10) 0 (10) 0 (10) 0
(11) 0 ... (11) 0 (11) 0

where xt3 has had the singles and doubles that are inside the triples
removed
and xt2 has had the singles that are inside the remaining doubles removed.

Ignoring the cases where there are even more consecutive errors for now:

xt(2)=xt(2)-2*xt(3)
xt(1)=xt(1)-3*xt(3)
xt(1)=xt(2)-2*xt(2)
..
..
..

It's pretty easy to derive a matrix for reducing the number of embedded
error repetitions from the existence of the highest possible number of
contiguous errors - and then the next and the next.... If you work at this
for a while, you come up with a square nxn matrix that looks like this:

P= 1 -2 1 0 0 0 . . .
0 1 -2 1 0 0 . . .
0 0 1 -2 1 0 . . .
0 0 0 1 -2 1 . . .
0 0 0 0 1 -2 . . .
0 0 0 0 0 1 . . .
. . . . . 0 . . .
. . . . . 0 . . .
. . . . . 0 . . .
. . . . . . .

No doubt this has a name but I don't know what it might be....

Anyway: P*xtn=xt2 it seems.

Fred
Back to top
Guest






Posted: Sun Jan 02, 2005 6:27 pm    Post subject: Re: How to count consecutive errors? Reply with quote

Hi,
ix is converted from the received erroneous symbol sequences. I want to
count consecutive symbol errors which is a result of error propagation
in DFE. Right?

Thanks
Back to top
Fred Marshall
Guest





Posted: Sun Jan 02, 2005 9:50 pm    Post subject: Re: How to count consecutive errors? Reply with quote

<freelait2000@yahoo.com> wrote in message
news:1104672460.439892.280760@c13g2000cwb.googlegroups.com...
Quote:
Hi,
ix is converted from the received erroneous symbol sequences. I want to
count consecutive symbol errors which is a result of error propagation
in DFE. Right?

Yes, ix is.
DFE isn't in my expertise - so perhaps my repeat of this comment isn't
appropriate:

You can count erroneous symbol sequences two ways:
- count *all* the single errors, double errors, etc. even though they are
embedded in higher consecutive counts.
OR
- only count single errors if they are not inside a multiple error, only
count double errors if they are not inside triple or greater errors, etc.

Generating the former is pretty easy.
Generating the latter from the former was the purpose of the matrix I
provided.

So, it seems easy enough to generate either type of count and use the one
that meets your needs.

Fred
Back to top
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> DSP All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB