{
  "id": 341305,
  "title": "3rd Place Solution",
  "url": "/competitions/smartphone-decimeter-2022/writeups/uemu-3rd-place-solution",
  "author_name": "",
  "post_date": "2022-08-03T02:18:49.903Z",
  "votes": 24,
  "comment_count": 3,
  "views": 0,
  "content": "<p>First of all, thanks to hosts for organizing this competition.<br>\nThis competition is one of the most patient competitions I have ever participated in, as there was a lot of missing data and a lot of domain knowledge required. I respect all the participants who ran this competition.</p>\n<p>Here is my brief solution:</p>\n<h2>Summary</h2>\n<p>I think the key points to get gold medal in this competition are following two points.</p>\n<ul>\n<li>to estimate the velocity directly from ADR.</li>\n<li>to correct the pseudorange bias using the reference station observations.</li>\n</ul>\n<p>These are mentioned by <a href=\"https://www.kaggle.com/taroz1461\" target=\"_blank\">@taroz1461</a> in <a href=\"https://www.kaggle.com/competitions/smartphone-decimeter-2022/discussion/335842#1850158\" target=\"_blank\">this discussion</a>.<br>\nIn addition to these two points, my solution improved the score by ensemble the results calculated with various settings.</p>\n<p>The pipeline of my solution are following:</p>\n<ul>\n<li>Step1.Position estimation from GNSS Data using RTKLIB.</li>\n<li>Step2.Velocity estimation from ADR in GNSS Data using WLS.</li>\n<li>Step3.Position smoothing using Kalman smoothing and CostMinimization.</li>\n</ul>\n<p>My approach is based on some published notebook and is basic.</p>\n<h3>1.Position estimation from GNSS Data using RTKLib.</h3>\n<p>I used the published <a href=\"https://www.kaggle.com/code/timeverett/getting-started-with-rtklib\" target=\"_blank\">RTKLIB</a> and <a href=\"https://www.kaggle.com/code/timeverett/getting-started-with-rtklib-py\" target=\"_blank\">RTKLIB-py</a> to correct pseudorange by base station observations. <br>\n(I wanted to implement the code myself,but I did not have the knowledge and enough time. Please let me know the good literature or code for reference.)</p>\n<p>The output of RTKLIB has applied Kalmansmoothing, but the accuracy of velocity estimation seems to be lower than when using ADR in Step2. So I re-smoothed the RTKLIB output (that are corrected position by base station) with ADR velocity estimates in Step3.<br>\nAlso, I calculated position under several conditions such as thresh of satelite elevation angle and ensemble the results.<br>\nSince RTKlib and RTKLib-py use different satellite types, the results of both were used for the ensemble.</p>\n<h3>2.Velocity estimation from ADR Data using WLS.</h3>\n<p>Based on this published code (<a href=\"https://www.kaggle.com/code/taroz1461/carrier-smoothing-robust-wls-kalman-smoother\" target=\"_blank\">carrier-smoothing-robust-wls-kalman-smoother</a>), I estimate the velocity directly from ADR by weighted least squares method.<br>\nAs mentioned in the <a href=\"https://www.kaggle.com/competitions/google-smartphone-decimeter-challenge/discussion/262406#1455510\" target=\"_blank\">1st place soluition</a> of the previous competition, the accuracy was higher than the result from Doppler Shift. When ADR is missing, the velocity calculated from Doppler shift is used.</p>\n<p>The ADR data has many missing points. In particular, since the missing often occurs in the sudden acceleration and deceleration, it may be difficult to interpolate and occur the position errors around that point. So, I adjusted the parameters to reduce the missing as much as possible. For example, the threshold of elevation angle for satelite selection sets lower values. Also I ignored 'ADR State' to select satelite. These setting could be worsened score by multipaths or cycle slips, but my local validation score and LB score are improved.<br>\nAlthough not confirmed, tuning the parameters for velocity estimation, which is separate from position estimation, may also have improved the score.</p>\n<h3>3.Position smoothing using Kalman smoothing and CostMinimization.</h3>\n<p>Postion smoothing is calculated from the position and velocity estimated above by two approaches.<br>\nKalman smoothing is based on this published code (<a href=\"https://www.kaggle.com/code/taroz1461/carrier-smoothing-robust-wls-kalman-smoother\" target=\"_blank\">carrier-smoothing-robust-wls-kalman-smoother</a>).<br>\nCostMinimization is based on <a href=\"https://www.kaggle.com/code/saitodevel01/dsdc-unified-post-processing/notebook\" target=\"_blank\">5th placae solution in previous comp</a> .</p>\n<p>These approaches did not have a large difference in score, but ensemble of the results improved score.<br>\nAlso, in each part, the ensemble results are adopted by changing parameters such as the update conditions of the Kalman filter.</p>\n<h3>Acknowledge</h3>\n<p><a href=\"https://www.kaggle.com/taroz1461\" target=\"_blank\">@taroz1461</a>, <a href=\"https://www.kaggle.com/saitodevel01\" target=\"_blank\">@saitodevel01</a> , <a href=\"https://www.kaggle.com/timeverett\" target=\"_blank\">@timeverett</a><br>\nThank you for sharing your great ideas and code.</p>",
  "messages": [
    {
      "id": "1881119",
      "postDate": "08/02/2022 09:22:49",
      "content": "<p>First of all, thanks to hosts for organizing this competition.<br>\nThis competition is one of the most patient competitions I have ever participated in, as there was a lot of missing data and a lot of domain knowledge required. I respect all the participants who ran this competition.</p>\n<p>Here is my brief solution:</p>\n<h2>Summary</h2>\n<p>I think the key points to get gold medal in this competition are following two points.</p>\n<ul>\n<li>to estimate the velocity directly from ADR.</li>\n<li>to correct the pseudorange bias using the reference station observations.</li>\n</ul>\n<p>These are mentioned by <a href=\"https://www.kaggle.com/taroz1461\" target=\"_blank\">@taroz1461</a> in <a href=\"https://www.kaggle.com/competitions/smartphone-decimeter-2022/discussion/335842#1850158\" target=\"_blank\">this discussion</a>.<br>\nIn addition to these two points, my solution improved the score by ensemble the results calculated with various settings.</p>\n<p>The pipeline of my solution are following:</p>\n<ul>\n<li>Step1.Position estimation from GNSS Data using RTKLIB.</li>\n<li>Step2.Velocity estimation from ADR in GNSS Data using WLS.</li>\n<li>Step3.Position smoothing using Kalman smoothing and CostMinimization.</li>\n</ul>\n<p>My approach is based on some published notebook and is basic.</p>\n<h3>1.Position estimation from GNSS Data using RTKLib.</h3>\n<p>I used the published <a href=\"https://www.kaggle.com/code/timeverett/getting-started-with-rtklib\" target=\"_blank\">RTKLIB</a> and <a href=\"https://www.kaggle.com/code/timeverett/getting-started-with-rtklib-py\" target=\"_blank\">RTKLIB-py</a> to correct pseudorange by base station observations. <br>\n(I wanted to implement the code myself,but I did not have the knowledge and enough time. Please let me know the good literature or code for reference.)</p>\n<p>The output of RTKLIB has applied Kalmansmoothing, but the accuracy of velocity estimation seems to be lower than when using ADR in Step2. So I re-smoothed the RTKLIB output (that are corrected position by base station) with ADR velocity estimates in Step3.<br>\nAlso, I calculated position under several conditions such as thresh of satelite elevation angle and ensemble the results.<br>\nSince RTKlib and RTKLib-py use different satellite types, the results of both were used for the ensemble.</p>\n<h3>2.Velocity estimation from ADR Data using WLS.</h3>\n<p>Based on this published code (<a href=\"https://www.kaggle.com/code/taroz1461/carrier-smoothing-robust-wls-kalman-smoother\" target=\"_blank\">carrier-smoothing-robust-wls-kalman-smoother</a>), I estimate the velocity directly from ADR by weighted least squares method.<br>\nAs mentioned in the <a href=\"https://www.kaggle.com/competitions/google-smartphone-decimeter-challenge/discussion/262406#1455510\" target=\"_blank\">1st place soluition</a> of the previous competition, the accuracy was higher than the result from Doppler Shift. When ADR is missing, the velocity calculated from Doppler shift is used.</p>\n<p>The ADR data has many missing points. In particular, since the missing often occurs in the sudden acceleration and deceleration, it may be difficult to interpolate and occur the position errors around that point. So, I adjusted the parameters to reduce the missing as much as possible. For example, the threshold of elevation angle for satelite selection sets lower values. Also I ignored 'ADR State' to select satelite. These setting could be worsened score by multipaths or cycle slips, but my local validation score and LB score are improved.<br>\nAlthough not confirmed, tuning the parameters for velocity estimation, which is separate from position estimation, may also have improved the score.</p>\n<h3>3.Position smoothing using Kalman smoothing and CostMinimization.</h3>\n<p>Postion smoothing is calculated from the position and velocity estimated above by two approaches.<br>\nKalman smoothing is based on this published code (<a href=\"https://www.kaggle.com/code/taroz1461/carrier-smoothing-robust-wls-kalman-smoother\" target=\"_blank\">carrier-smoothing-robust-wls-kalman-smoother</a>).<br>\nCostMinimization is based on <a href=\"https://www.kaggle.com/code/saitodevel01/dsdc-unified-post-processing/notebook\" target=\"_blank\">5th placae solution in previous comp</a> .</p>\n<p>These approaches did not have a large difference in score, but ensemble of the results improved score.<br>\nAlso, in each part, the ensemble results are adopted by changing parameters such as the update conditions of the Kalman filter.</p>\n<h3>Acknowledge</h3>\n<p><a href=\"https://www.kaggle.com/taroz1461\" target=\"_blank\">@taroz1461</a>, <a href=\"https://www.kaggle.com/saitodevel01\" target=\"_blank\">@saitodevel01</a> , <a href=\"https://www.kaggle.com/timeverett\" target=\"_blank\">@timeverett</a><br>\nThank you for sharing your great ideas and code.</p>",
      "rawMarkdown": "First of all, thanks to hosts for organizing this competition.\nThis competition is one of the most patient competitions I have ever participated in, as there was a lot of missing data and a lot of domain knowledge required. I respect all the participants who ran this competition.\n\nHere is my brief solution:\n\n## Summary\nI think the key points to get gold medal in this competition are following two points.\n- to estimate the velocity directly from ADR.\n- to correct the pseudorange bias using the reference station observations.\n\nThese are mentioned by @taroz1461 in [this discussion](https://www.kaggle.com/competitions/smartphone-decimeter-2022/discussion/335842#1850158).\nIn addition to these two points, my solution improved the score by ensemble the results calculated with various settings.\n\nThe pipeline of my solution are following:\n- Step1.Position estimation from GNSS Data using RTKLIB.\n- Step2.Velocity estimation from ADR in GNSS Data using WLS.\n- Step3.Position smoothing using Kalman smoothing and CostMinimization.\n\nMy approach is based on some published notebook and is basic.\n\n\n### 1.Position estimation from GNSS Data using RTKLib.\nI used the published [RTKLIB](https://www.kaggle.com/code/timeverett/getting-started-with-rtklib) and [RTKLIB-py](https://www.kaggle.com/code/timeverett/getting-started-with-rtklib-py) to correct pseudorange by base station observations. \n(I wanted to implement the code myself,but I did not have the knowledge and enough time. Please let me know the good literature or code for reference.)\n\nThe output of RTKLIB has applied Kalmansmoothing, but the accuracy of velocity estimation seems to be lower than when using ADR in Step2. So I re-smoothed the RTKLIB output (that are corrected position by base station) with ADR velocity estimates in Step3.\nAlso, I calculated position under several conditions such as thresh of satelite elevation angle and ensemble the results.\nSince RTKlib and RTKLib-py use different satellite types, the results of both were used for the ensemble.\n\n### 2.Velocity estimation from ADR Data using WLS.\nBased on this published code ([carrier-smoothing-robust-wls-kalman-smoother](https://www.kaggle.com/code/taroz1461/carrier-smoothing-robust-wls-kalman-smoother)), I estimate the velocity directly from ADR by weighted least squares method.\nAs mentioned in the [1st place soluition](https://www.kaggle.com/competitions/google-smartphone-decimeter-challenge/discussion/262406#1455510) of the previous competition, the accuracy was higher than the result from Doppler Shift. When ADR is missing, the velocity calculated from Doppler shift is used.\n\nThe ADR data has many missing points. In particular, since the missing often occurs in the sudden acceleration and deceleration, it may be difficult to interpolate and occur the position errors around that point. So, I adjusted the parameters to reduce the missing as much as possible. For example, the threshold of elevation angle for satelite selection sets lower values. Also I ignored 'ADR State' to select satelite. These setting could be worsened score by multipaths or cycle slips, but my local validation score and LB score are improved.\nAlthough not confirmed, tuning the parameters for velocity estimation, which is separate from position estimation, may also have improved the score.\n\n### 3.Position smoothing using Kalman smoothing and CostMinimization.\nPostion smoothing is calculated from the position and velocity estimated above by two approaches.\nKalman smoothing is based on this published code ([carrier-smoothing-robust-wls-kalman-smoother](https://www.kaggle.com/code/taroz1461/carrier-smoothing-robust-wls-kalman-smoother)).\nCostMinimization is based on [5th placae solution in previous comp](https://www.kaggle.com/code/saitodevel01/dsdc-unified-post-processing/notebook) .\n\nThese approaches did not have a large difference in score, but ensemble of the results improved score.\nAlso, in each part, the ensemble results are adopted by changing parameters such as the update conditions of the Kalman filter.\n\n\n### Acknowledge\n@taroz1461, @saitodevel01 , @timeverett\nThank you for sharing your great ideas and code.",
      "votes": null
    },
    {
      "id": "1881166",
      "postDate": "08/02/2022 10:03:35",
      "content": "<p><a href=\"https://www.kaggle.com/UEMU\" target=\"_blank\">@UEMU</a>, impressive result! </p>\n<p>Was what the score difference if velocity was estimated by doppler in step 2?</p>",
      "rawMarkdown": "UEMU, impressive result! \n\nWas what the score difference if velocity was estimated by doppler in step 2?",
      "votes": null
    },
    {
      "id": "1881369",
      "postDate": "08/02/2022 13:12:21",
      "content": "<p>Thank you for your comment.</p>\n<p>In <a href=\"https://www.kaggle.com/code/taroz1461/carrier-smoothing-robust-wls-kalman-smoother\" target=\"_blank\">this notebook</a>, the score improved from 3.02 to 2.75  in Public LB by use velocity from ADR. <br>\nSince I did not tune any parameters in this case,  the exact effect is not known.</p>",
      "rawMarkdown": "Thank you for your comment.\n\nIn [this notebook](https://www.kaggle.com/code/taroz1461/carrier-smoothing-robust-wls-kalman-smoother), the score improved from 3.02 to 2.75  in Public LB by use velocity from ADR. \nSince I did not tune any parameters in this case,  the exact effect is not known.",
      "votes": null
    },
    {
      "id": "1881983",
      "postDate": "08/03/2022 01:47:00",
      "content": "<p>Congratulations on your success! Very impressive</p>",
      "rawMarkdown": "Congratulations on your success! Very impressive",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1881166,
      "author_name": "kruntuid",
      "author_url": "",
      "post_date": "08/02/2022 10:03:35",
      "content": "<p><a href=\"https://www.kaggle.com/UEMU\" target=\"_blank\">@UEMU</a>, impressive result! </p>\n<p>Was what the score difference if velocity was estimated by doppler in step 2?</p>",
      "votes": null,
      "replies": [
        {
          "id": 1881369,
          "author_name": "asaliquid1011",
          "author_url": "",
          "post_date": "08/02/2022 13:12:21",
          "content": "<p>Thank you for your comment.</p>\n<p>In <a href=\"https://www.kaggle.com/code/taroz1461/carrier-smoothing-robust-wls-kalman-smoother\" target=\"_blank\">this notebook</a>, the score improved from 3.02 to 2.75  in Public LB by use velocity from ADR. <br>\nSince I did not tune any parameters in this case,  the exact effect is not known.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1881983,
      "author_name": "willcramptonn",
      "author_url": "",
      "post_date": "08/03/2022 01:47:00",
      "content": "<p>Congratulations on your success! Very impressive</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1881119": "First of all, thanks to hosts for organizing this competition.\nThis competition is one of the most patient competitions I have ever participated in, as there was a lot of missing data and a lot of domain knowledge required. I respect all the participants who ran this competition.\n\nHere is my brief solution:\n\n## Summary\nI think the key points to get gold medal in this competition are following two points.\n- to estimate the velocity directly from ADR.\n- to correct the pseudorange bias using the reference station observations.\n\nThese are mentioned by @taroz1461 in [this discussion](https://www.kaggle.com/competitions/smartphone-decimeter-2022/discussion/335842#1850158).\nIn addition to these two points, my solution improved the score by ensemble the results calculated with various settings.\n\nThe pipeline of my solution are following:\n- Step1.Position estimation from GNSS Data using RTKLIB.\n- Step2.Velocity estimation from ADR in GNSS Data using WLS.\n- Step3.Position smoothing using Kalman smoothing and CostMinimization.\n\nMy approach is based on some published notebook and is basic.\n\n\n### 1.Position estimation from GNSS Data using RTKLib.\nI used the published [RTKLIB](https://www.kaggle.com/code/timeverett/getting-started-with-rtklib) and [RTKLIB-py](https://www.kaggle.com/code/timeverett/getting-started-with-rtklib-py) to correct pseudorange by base station observations. \n(I wanted to implement the code myself,but I did not have the knowledge and enough time. Please let me know the good literature or code for reference.)\n\nThe output of RTKLIB has applied Kalmansmoothing, but the accuracy of velocity estimation seems to be lower than when using ADR in Step2. So I re-smoothed the RTKLIB output (that are corrected position by base station) with ADR velocity estimates in Step3.\nAlso, I calculated position under several conditions such as thresh of satelite elevation angle and ensemble the results.\nSince RTKlib and RTKLib-py use different satellite types, the results of both were used for the ensemble.\n\n### 2.Velocity estimation from ADR Data using WLS.\nBased on this published code ([carrier-smoothing-robust-wls-kalman-smoother](https://www.kaggle.com/code/taroz1461/carrier-smoothing-robust-wls-kalman-smoother)), I estimate the velocity directly from ADR by weighted least squares method.\nAs mentioned in the [1st place soluition](https://www.kaggle.com/competitions/google-smartphone-decimeter-challenge/discussion/262406#1455510) of the previous competition, the accuracy was higher than the result from Doppler Shift. When ADR is missing, the velocity calculated from Doppler shift is used.\n\nThe ADR data has many missing points. In particular, since the missing often occurs in the sudden acceleration and deceleration, it may be difficult to interpolate and occur the position errors around that point. So, I adjusted the parameters to reduce the missing as much as possible. For example, the threshold of elevation angle for satelite selection sets lower values. Also I ignored 'ADR State' to select satelite. These setting could be worsened score by multipaths or cycle slips, but my local validation score and LB score are improved.\nAlthough not confirmed, tuning the parameters for velocity estimation, which is separate from position estimation, may also have improved the score.\n\n### 3.Position smoothing using Kalman smoothing and CostMinimization.\nPostion smoothing is calculated from the position and velocity estimated above by two approaches.\nKalman smoothing is based on this published code ([carrier-smoothing-robust-wls-kalman-smoother](https://www.kaggle.com/code/taroz1461/carrier-smoothing-robust-wls-kalman-smoother)).\nCostMinimization is based on [5th placae solution in previous comp](https://www.kaggle.com/code/saitodevel01/dsdc-unified-post-processing/notebook) .\n\nThese approaches did not have a large difference in score, but ensemble of the results improved score.\nAlso, in each part, the ensemble results are adopted by changing parameters such as the update conditions of the Kalman filter.\n\n\n### Acknowledge\n@taroz1461, @saitodevel01 , @timeverett\nThank you for sharing your great ideas and code.",
    "1881166": "UEMU, impressive result! \n\nWas what the score difference if velocity was estimated by doppler in step 2?",
    "1881369": "Thank you for your comment.\n\nIn [this notebook](https://www.kaggle.com/code/taroz1461/carrier-smoothing-robust-wls-kalman-smoother), the score improved from 3.02 to 2.75  in Public LB by use velocity from ADR. \nSince I did not tune any parameters in this case,  the exact effect is not known.",
    "1881983": "Congratulations on your success! Very impressive"
  },
  "source": "meta"
}