rifidi and motion detection?
Moderators: Matt, kyle, Moderators
Re: rifidi and motion detection?
That is going to depend a lot on the tag you're using and what your environment is like. By far the most accurate method would be to collect RSSI values from the type of motion you're expecting, and then use this to derive your own algorithm.
I'm pretty sure the ALR-9900 also has a built-in speed filter you might be able to use.
I'm pretty sure the ALR-9900 also has a built-in speed filter you might be able to use.
Re: rifidi and motion detection?
What the relation ship between speed and RSSI?
Can i get RF Phase from rifidi?
I am thinking about collecting RSSI, RF phase, Doppler shift
Can i get RF Phase from rifidi?
I am thinking about collecting RSSI, RF phase, Doppler shift
Re: rifidi and motion detection?
I know RSSI is easy enough to get from an Alien reader, but RF phase and doppler shift I'm not so sure about. I don't believe either of these are available as native Alien functions, so you will need to figure out how to retrieve this data before considering what you might be able to do with it in Rifidi.
Re: rifidi and motion detection?
Finally, I found the Alientechnology's algorighm in their .NET sample code
ftp://ftp.alientechnology.com//pub/read ... 009-04.zip
In Alien dotNET SDK 2.3.0 2009-04/_NET/Alien Sample Apps (.NET 2)/Example 13 - ITR Singulation, here are their source code
The custom format
The source code
Currently, I do not Understand hown can they calculate the smoothSig, smoothVel, integVel, integVelSig.
I am researching with this document : https://tandmconsulting.wordpress.com/2 ... hase-data/
But I have no result.
Could you please help me to convert the logic to the math equations?
ftp://ftp.alientechnology.com//pub/read ... 009-04.zip
In Alien dotNET SDK 2.3.0 2009-04/_NET/Alien Sample Apps (.NET 2)/Example 13 - ITR Singulation, here are their source code
The custom format
Code: Select all
id:%k t:${MSEC2} TIME2:${TIME2} a:%a vel:${SPEED} sig:${RSSI} freq:${FREQ}
Code: Select all
void OnTagRead(string msg)
{
lock (moStreamMsgLock)
{
if (sbDisposing || !this.Created) return;
if (msg == null) return;
string[] tags = msg.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
string tag = msg.Trim();
DataPoint datapoint = null;
for (int i = 0; i < tags.Length; i++)
{
string id = extractField(tag, "id:");
if (string.IsNullOrEmpty(id))
return;
string sT = extractField(tag, "t:");
double t = 0;
if (!double.TryParse(sT, out t))
{
AlienLog.WriteLine(true, "Bad Time token '" + sT + "' in tag: " + tag);
return;
}
string sVel = extractField(tag, "vel:");
double vel = 0;
if (!double.TryParse(sVel, out vel))
{
AlienLog.WriteLine(true, "Bad Velocity token '" + sVel + "' in tag: " + tag);
return;
}
string sRSSI = extractField(tag, "sig:");
double rssi = 0;
if (!double.TryParse(sRSSI, out rssi))
{
AlienLog.WriteLine(true, "Bad Signal token '" + sRSSI + "' in tag: " + tag);
return;
}
string sFreq = extractField(tag, "freq:");
double freq = 0;
if (!double.TryParse(sFreq, out freq))
{
AlienLog.WriteLine(true, "Bad Frequency token '" + sFreq + "' in tag: " + tag);
return;
}
string sTime = extractField(tag, "TIME2:");
lock (moDataPointsLock)
{
if (!mdDataPoints.ContainsKey(id))
{
datapoint = new DataPoint();
datapoint.Color = mColors[miNextColor];
miNextColor++;
if (miNextColor > mColors.Length - 1)
miNextColor = 0;
}
else
datapoint = mdDataPoints[id];
if (!string.IsNullOrEmpty(sTime))
datapoint.sTime = sTime;
datapoint.id = id;
if (mStartTime == 0)
mStartTime = t;
datapoint.t = (t - mStartTime) / 1000;
datapoint.Vel = -vel;
datapoint.Freq = freq;
datapoint.Sig = rssi;
double filt = -5.0;
double dt = datapoint.t - datapoint.lastT;
datapoint.smoothVel = datapoint.smoothVel * Math.Exp(filt * dt) +
datapoint.Vel * (1 - Math.Exp(filt * dt));
datapoint.integVel = datapoint.integVel +
2 * datapoint.lastVel * dt * Math.Exp(filt * dt);
if (mbDiffusionCorrection)
datapoint.integVel = datapoint.integVel * Math.Exp(-0.15 * dt);
if (mbASCIIMode)
{
byte b = byte.Parse(id.Substring(id.Length - 2), System.Globalization.NumberStyles.HexNumber);
datapoint.Caption = Convert.ToChar(b).ToString();
}
updateGUI(datapoint);
datapoint.lastT = datapoint.t;
if (datapoint.Freq != datapoint.lastFreq)
datapoint.sigOffset += datapoint.Sig - datapoint.lastSig;
datapoint.smoothSig = datapoint.smoothSig * Math.Exp(filt * dt) + (datapoint.Sig - datapoint.sigOffset) * (1 - Math.Exp(filt * dt));
if (mbSmoothing)
datapoint.integVelSig = datapoint.integVel * datapoint.smoothSig;
else
datapoint.integVelSig = datapoint.integVel * (datapoint.Sig - datapoint.sigOffset);
if (datapoint.integVelSig > datapoint.integVelSigMax)
{
datapoint.integVelSigMax = datapoint.integVelSig;
datapoint.tintegVelSigMax = datapoint.t;
mbListRefreshNeeded = true;
}
datapoint.lastFreq = datapoint.Freq;
datapoint.lastSig = datapoint.Sig;
datapoint.lastVel = mbSmoothing ? datapoint.smoothVel : datapoint.Vel;
if (datapoint.integVel > datapoint.integVelMax)
{
datapoint.integVelMax = datapoint.integVel;
datapoint.tIntegVelMax = datapoint.t;
}
else
mbListRefreshNeeded = true;
if (!mdDataPoints.ContainsKey(id))
mdDataPoints.Add(id, datapoint);
else
mdDataPoints[id] = datapoint;
}
}
if (mbListRefreshNeeded)
refreshList();
}
}
I am researching with this document : https://tandmconsulting.wordpress.com/2 ... hase-data/
But I have no result.
Could you please help me to convert the logic to the math equations?
Re: rifidi and motion detection?
It looks like these are just operations done using the more granular tagread data, as specified in the custom format.
For example, datapoint.smoothVel uses the double dt, which comes from time datapoints. It also uses datapoint.Vel, which comes from the reader's built-in velocity calculation as parsed here:
Trace back each variable to where it gets parsed, they're all there.
For example, datapoint.smoothVel uses the double dt, which comes from time datapoints. It also uses datapoint.Vel, which comes from the reader's built-in velocity calculation as parsed here:
Code: Select all
string sVel = extractField(tag, "vel:");
double vel = 0;
if (!double.TryParse(sVel, out vel))
{
AlienLog.WriteLine(true, "Bad Velocity token '" + sVel + "' in tag: " + tag);
return;
}
Re: rifidi and motion detection?
Thank you
I know about how to get value from custom format.
Currently, I want to convert from below logic to the math equations in order to write it in to the research report.
Something like "Equations 3-10" in this image
So that I can implement the algorithm in other programing language
I know about how to get value from custom format.
Currently, I want to convert from below logic to the math equations in order to write it in to the research report.
Something like "Equations 3-10" in this image

So that I can implement the algorithm in other programing language
Code: Select all
double filt = -5.0;
double dt = datapoint.t - datapoint.lastT;
datapoint.smoothVel = datapoint.smoothVel * Math.Exp(filt * dt) +
datapoint.Vel * (1 - Math.Exp(filt * dt));
datapoint.integVel = datapoint.integVel +
2 * datapoint.lastVel * dt * Math.Exp(filt * dt);
if (mbDiffusionCorrection)
datapoint.integVel = datapoint.integVel * Math.Exp(-0.15 * dt);
if (mbASCIIMode)
{
byte b = byte.Parse(id.Substring(id.Length - 2), System.Globalization.NumberStyles.HexNumber);
datapoint.Caption = Convert.ToChar(b).ToString();
}
updateGUI(datapoint);
datapoint.lastT = datapoint.t;
if (datapoint.Freq != datapoint.lastFreq)
datapoint.sigOffset += datapoint.Sig - datapoint.lastSig;
datapoint.smoothSig = datapoint.smoothSig * Math.Exp(filt * dt) + (datapoint.Sig - datapoint.sigOffset) * (1 - Math.Exp(filt * dt));
Re: rifidi and motion detection?
Have you tried working backwards and substituting each component of the code? For example:
Trace back where each variable comes from and fill in the actual value or equation, and do the same with each mathematical operation. In this case, the variable filt can be replaced with the constant -5.0. Doing this for everything should leave you with the formula, or at least something close enough that you can adapt it to another language.
If you're looking for just one equation, then first identify the variable or output that is equal to what you would like to calculate, and then work from there.
Code: Select all
datapoint.smoothVel = datapoint.smoothVel * Math.Exp(filt * dt) + datapoint.Vel * (1 - Math.Exp(filt * dt));
If you're looking for just one equation, then first identify the variable or output that is equal to what you would like to calculate, and then work from there.
Who is online
Users browsing this forum: No registered users and 1 guest