Hello,
Can someone advise me what changes are required in the application,Matlab script and configuration files to make the number of occupancy zones into 4.
Regards,
Abit
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.
Hello,
Can someone advise me what changes are required in the application,Matlab script and configuration files to make the number of occupancy zones into 4.
Regards,
Abit
Hi Abit,
As I mentioned on the phone, this will require running the "feature" and "decision" algorithms over pairs of zones, since they were designed to run on a pair of zones. I have made most of the software changes for to create 3 pairs of zones, and have it running in the GUI. The only thing remaining is to expand the CLI interface to accept 3 sets of coefficients, then do the training required for the new zones. Currently all 3 zone pairs are running with the same coefficients, so they aren't quite as reliable yet as the first two zones.
I should be able to get this to you in a few days. You will need to do your own training, because I probably won't be able to get to that for a while. The 6 zones I have defined look like this:
The corresponding zone definition is this:
zoneDef 6 16 16 8 15 16 16 26 15 37 15 6 11 37 15 31 11 37 15 19 10 55 4 6 36
In the meantime, if you wanted to try doing training, follow the procedure listed in the user guide using the following two sets of zones. Of course, you may want adjust the zone placement first, this is a generic configuration. Unless you change the first two zones, you shouldn't have to re-train them, though it is not a bad idea when running in a new environment (ie. a different car).
zoneDef 2 37 15 6 11 37 15 31 11 (2nd zone pair - 1st and 3rd zones on the second row)
zoneDef 2 37 15 19 10 55 4 6 36 (3rd zone pair - middle zone on second row and third row zone)
-dave
Hi Dave,
Thank you. I got the zip file from Chris.
It seems not working on the board as the board that we have is ES1.0.
Can you please advise on how can I make it compatible with ES1.0?
Regards,
Abit
Hi Abit,
>Can you please advise on how can I make it compatible with ES1.0?
The mmWave SDK for 2.0 has different APIs, so you can't just recompile with it unfortunately. The easiest way would be to compare the demo project source for the 1.0 2-zone demo and the one that I provided, and copy the changes related to 6 zones into the 1.0 demo.
A better solution is to get a 2.0 EVM if at all possible.
-dave
Hi Dave,
Thank you.
Does Matlab GUI has SDK dependency? Can I use the same Matlab GUI script for ES1.0 and ES 2.0?
Regards,
Abit
Hi Abit,
No, there is no dependency of the GUI on the SDK. There is a simple profile change though. The second parameter of the lowPower command should be 1 for ES 2, and 0 for ES 1.
-dave
Hi Dave,
Thank you so much for your help.
I compared and updated the code in Automotive toolbox 1_2 for ES01 and it is working.
However, I'm getting the following error in Matlab, when Decision Source is selected as Matlab:
Matrix dimensions must agree.
Error in od_demo>zone_occupDetect (line 1102)
featureVec = (featureVec - meanVector) ./ stdVector;
Error in od_demo (line 373)
[decisionValue, featureVec] = zone_occupDetect(rangeAzimuth, coeffMatrix, meanVector,...
Could you please advise ?
Regards,
Abit
Hi Abit,
That part of the code hasn't been updated yet. The "per zone" commands are now prefaced with a "zone pair" parameter, and saved in the parseCfg function like this:
Which means that the following code needs to run inside a loop over the zone pairs:
% features: power ratio in dB
pwrRatio = avgPwr / sum(avgPwr);
pwrRatiodB = 10*log10(pwrRatio);
% features: correlation coefficient between pairs
corrCoeff = corrcoef(zonePwrdB(winIdx, :));
xcorrCoeff = corrCoeff(1, 2);
% form the feature vector
featureVec = [avgPwrdB, pwrRatiodB, xcorrCoeff]; % 1 x 5 for two zones
% normalize and add one
featureVec = (featureVec - meanVector) ./ stdVector;
featureVec_ = [1, featureVec].'; % now column vector
% occupancy detection
prob = sigmoid(coeffMatrix * featureVec_);
[~, class_predict] = max(prob);
class_predict = class_predict - 1;
occupVec = de2bi(class_predict, numZones);
I will get to this in the next week or so.
-dave