This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/IWR1642: question about gtrack

Part Number: IWR1642

Tool/software: TI C/C++ Compiler

Hi,

I am learning people counting's gtrack.I have the following  questions:

1.In the prediction step of EKF,

Q is the process noise covariance matrix.And we consider piecewise white noise model  for the noise.

We define maxAcceleration 5m/s according to your demo.What is the basis for setting the value?
In gtrackUnitPredict function,obj.P_apriori(1:mSize,1:mSize) = obj.F(1:mSize,1:mSize) * obj.P(1:mSize,1:mSize) * obj.F(1:mSize,1:mSize)' + obj.Q(1:mSize,1:mSize)*obj.processVariance

processVariance = (0.5f*maxAcceleration)*(0.5f*maxAcceleration).Why is maxAcceleration multiplied by 0.5?

2.In gtrackUnitScore function,we compute the Mahalanobis distance between all measurements of cloud point and different tracks.

1)We build a gate using gtrack_gateCreateLim function.

gC_inv (EC) is the inverse of group covariance matrix(gC).Sometimes,the main diagonal of the matrix(gC_inv) is negative (gC's is positive).Is it right?Can the gate be negative?

2)

We use gtrack_computeMahalanobis3 function to compute mahalanobis distance.Still,the main diagonal of the matrix(gC_inv) is sometimes negative.

Can the mahalanobis distance be negative?

Thanks,

Hanna

  • Hi, Hanna:

    Please refer the gtracker tuning guide.

    dev.ti.com/.../

    Inside, it has a link to the gtracker documentation "Tracking_radar_targets_with_multiple_reflection_points.pdf"

    Best,
    Zigang
  • Hi Zigang,

    I have read what you provide.Then I still have these question.And only the reference cannot resolve my question.Could you give me some help?

    Regards,
    Hanna
  • By the way,my questions and these attached images are from the gtracker documentation "Tracking_radar_targets_with_multiple_reflection_points.pdf".
  • Hana,

    To your first question on maxAcceleration value. Below is from chapter 2.3.2 of the document:

    A good rule of thumb is to set sigma somewhere from 1/2 delta_acc to delta_acc, where delta_acc is the maximum amount that the acceleration will change between sample periods. In practice we pick a number, run simulations on data, and choose a value that works well.

    Therefore, the sigma^2 can be calculated as (1/2*maxAcc)^2.

    Second question on whether gain can be negative. First, you seams to be using rather old code base. You should take a look at more recent tracker library sources, and more recent version of the document, released in TI mmwSDK. I decided to move away from the constant volume model. Instead, the gating function is based on constant gain with limiters. Second, to answer to your question: the covariance matrix must be positive.

    Michael

  • Hi Michael,

    Your answer has solved my problem.I have another two questions.

    1.

    trackingCfg 1 2 250 20 200 50 90.This means deltaT is 50ms.We use it to compute transition matrix F.

    frameCfg 0 1 128 0 100 1 0.100ms is framePeriodicity.Every frame we execute gtrack_moduleStep function to process the frame's data.

    Is there a relationship between the frame rate(1/framePeriodicity) and the deltaT ?For every 100ms(framePeriodicity),we predict and updata tracks.However the corresponding time interval for state transition is 50ms(deltaT).Is this correct?

    2.

    I am feeling confused how do we figure out the volume is 16 in this example.Can you give a hint?

    Thanks,

    Hanna

  • Hanna,

    Q1: The deltaT configuration parameter provided to GTRACK shall match chirp configuration frame rate. So, in your case, you should set the deltaT to 100ms.

    Q2: As described in the document, the volume can be computed V=4*pi/3*a*b*c=4*pi/3*8*6*pi/180*4=14. For that test we chose V=16. Please, note that the latest algorithm doesn't use volume. It uses gain and limits: 

    Gating Parameters

    Gating parameters set is used in association process to provide a boundary for the points that can be associated with a given track. These parameters are target-specific.

     

    Table 6. Gating Function Parameters

    Parameter

    TM

    PC

    Dim

    Description

    Gain

    4.f

    2.f

     

    Gating constant Gain

    DepthLimit

    12.f

    2.f

    m

    Gating Limit in depth

    WidthLimit

    6.f

    2.f

    m

    Gating Limit in width

    HeightLimit

    4.f

    2.f

    m

    Gating Limit in height (Ignored for 2D)

    VelocityLimit

    0.f

    12.f

    m/s

    Gating Limit in velocity (0 – no limit)

     

  • Hi Michael,

    I have seen your configuration files(.cfg).They have difference between deltaT and the time corresponding to chirp configuration frame rate.By the way,when they don't match,in my case deltaT is 50ms and framePeriodicity is 100ms.The tracking works well.Or it mistakes one object for two.
    Could you provide me a link ralated to the reference file of latest algorithm .

    Thanks,
    Hanna
  • Hanna,
    If our configuration files have deltaT value different from chirp frame rate, then there is an error in configuration file. Please make sure that tracker library is initialized (meaning gtrack_create function is called with config->deltaT = 100ms) with correct value, such that each point cloud data is deltaT(ms) apart from each other.
    The latest tracker SW is released with mmwaveSDK, www.ti.com/.../mmwave-sdk
    Once installed, the documentation and sources of GTRACK are in mmwave_sdk\ti\alg\gtrack folder.
    Michael
  • Hi Michael,

    I get it.Then I have to  solve the problem.When deltaT and framePeriodicity are matching, the track algorithm mistakes one object for two.Maybe it is the association step causes this problem.

    In the association step, we execute the scoring function.We compute the likelihood  function.

    I derived the formula as follow.

    M(>=1) is chi-square distribution's degree of freedom.Then part 2 is positive.I suppose

    1.The likelihood function 0<g(ij)<1

    2.Then,In[g(ij)]<0.Maximizing the g(ij) means g(ij) approaches 1?

    [D(ij)]^2 must be a positve number?In my case,it is often a negative number.

    Are they right?

    Thanks,

    Hanna

  • Hanna,

    The scoring criteria is a sum of two factors:

    a) distance between a point j and distribution i (dij) is Mahalanobis distance, measured in standard deviations and is always positive. The smaller the distance, the more likely the point belongs to the distribution.

    b) the term ln(mod(Ci)) is the distribution "density". Numerically it is a negative number. The smaller the number (closer to zero), the denser the distribution and it is more likely that it "attracts" the point.

    Therefore, when making an association decision to which distribution the point belongs, we are choosing the minimal scoring. We also making a claim that this decision is maximum likelihood based.

    FYI, for the root cause of having two targets instead of one you probably need to look into your gating function: the gate was not large enough to include all points to the same target.

    Michael   

  • Hi Michael,
    You're so nice.I had considered whether I should change the GatingParams.gatingCfg 4 3 2 0.It still uses volume and limits. By contrast, the objects tested, such as people, are small enough.Because velocity limit is 0,I don't know how to compute V=4*pi/3*a*b*c.But the volume (4) is definitely enough according to your reference file for PC(your volume is 2).

    Back to scoring function ,from my understanding,the term  ln(mod(Ci)) is negative and its absolute value must be smaller than the part of Mahalanobis distance  in your case.Say, track1's ln(mod(Ci)) is -3 and track2's is -2.The distance from one point to two targets is the same,such as 1.Because when  the term ln(mod(Ci)) is closer to zero it's more likely to attract points.Then track2 should be more likely to 'attract' this point.But,-3+1<-2+1,according to the algorithm the point should go to track1.Is it right?
    [D(ij)]^2 can be a positive number or a negative number.Say,track1's ln(mod(Ci)) is -3 and track2's is -2.The distance from one point to two targets is the same,such as 4.Then -3+4<-2+4,the point will still go to track1.The numerical value is only used for illustration, which is not rigorous enough.Could your give me a hint?
    By the way,M(>=1) is chi-square distribution's degree of freedom.How to  determine this value in my case?
    Thanks,
    Hanna
  • Hanna,

    I suggest you focus on the frame where you have second target allocated, and understand the reasons. Your understanding of scoring function and numerical example is correct. M is number of measurement dimensions. Not sure why would you need it. In the end, whether we associate particular point to one or another target that are very close or even overlap is not that important. I.e. if one's hand overlaps another target's shoulder => no big deal if we associate reflection point one way or another.Errors will be made. Ideally, those errors should not lead to system errors.

    Michael

  • Hi Michael,.

    I still feel a little confused.when  the term ln(mod(Ci)) is closer to zero it's more likely to attract points.Then in my example, it should be reversed.track1's ln(mod(Ci)) is -3 and track2's is -2.The distance from one point to two targets is the same,such as 1.Because when  the term ln(mod(Ci)) is closer to zero it's more likely to attract points.Then track2 should be more likely to 'attract' this point.That is, when the term ln(mod(Ci)) is a small negative number(far away from zero),it's more likely to attract points.Is it right?

    Thank you for your reply.

    Thanks,

    Hanna

  • Hanna,

    I am sorry if I had confused you. To make it clear: the smaller the term ln(mod(Ci)) the more likely the point will be used assigned to that distribution. (-3) is obviously smaller than (-2). Same applies to the distance: the smaller the distance, the more likely the assignment. So, in your example, (-3)+1<(-2)+2, hence the point shall be assigned to the first track. Note, "smaller", not "closer to zero". This is how likelihood was derived (at least based on chi-square distribution assumption).

    Michael

  • Michael,
    Thank you for your help.
    Hanna