<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mukut Mukherjee on Medium]]></title>
        <description><![CDATA[Stories by Mukut Mukherjee on Medium]]></description>
        <link>https://medium.com/@mukutm?source=rss-5de60fd22bb8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*eJbMWny2rP643qsNq1JlKQ.jpeg</url>
            <title>Stories by Mukut Mukherjee on Medium</title>
            <link>https://medium.com/@mukutm?source=rss-5de60fd22bb8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 07:41:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mukutm/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[ESG-BERT: NLP meets Sustainable Investing]]></title>
            <link>https://medium.com/data-science/nlp-meets-sustainable-investing-d0542b3c264b?source=rss-5de60fd22bb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/d0542b3c264b</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[sustainability]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[invest]]></category>
            <dc:creator><![CDATA[Mukut Mukherjee]]></dc:creator>
            <pubDate>Thu, 10 Sep 2020 21:14:08 GMT</pubDate>
            <atom:updated>2025-07-01T18:43:05.051Z</atom:updated>
            <content:encoded><![CDATA[<h4>At <a href="http://parabole.ai/">Parabole</a>.ai, <a href="https://www.linkedin.com/in/sree-charan-pothireddi/">Sree Charan Pothireddi</a> and I explored how Natural Language Processing can be applied to Sustainability analysis. This article outlines our findings.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mEB71rl_G9X3Lzsy" /><figcaption>Photo by <a href="https://unsplash.com/@nathaliarosa?utm_source=medium&amp;utm_medium=referral">Nathália Rosa</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><em>Sustainable Investing is a growing investment strategy that seeks strong financial returns while also making the world a better place. However, it is often a challenging investment strategy for many investors. Luckily, Natural Language Processing can help, here’s how —</em></p><h3>What is Sustainable Investing?</h3><p>Sustainable, responsible, and impact investing (SRI) is an investment discipline that considers environmental, social, and corporate governance (ESG) criteria to generate long-term competitive financial returns and positive societal impact.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*TTJOh6nFnhzUTHDa-zEotQ.png" /><figcaption>Image by author</figcaption></figure><p>There are several motivations for sustainable investing, including personal values and goals, institutional mission, and the demands of clients, constituents, or plan participants.</p><p>Sustainable investors aim for strong financial performance, but also believe that these investments should be used to contribute to advancements in social, environmental, and governance practices. [6]</p><p>They may actively seek out investments — such as community development loan funds or clean tech portfolios — that are likely to provide important societal or environmental benefits.</p><p>Some investors embrace sustainable investing strategies to manage risk and fulfill fiduciary duties; they review ESG criteria to assess the quality of management and the likely resilience of their portfolio companies in dealing with future challenges. Some are seeking financial outperformance over the long term; a growing body of <a href="https://www.ussif.org/performance">academic research</a> shows a strong link between ESG and financial performance. [1]</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*Ui7z0SbUTqaorZxqUM4_sA.png" /><figcaption>Global growth in sustainable investments (USD$ Trillion) — Image by author</figcaption></figure><p>Investments marketed as sustainable — meaning they focus on companies that incorporate environmental and social corporate-governance practices into long-term corporate strategies — are experiencing explosive growth.</p><p>Although sustainable investing emerged in the 1970s, the movement has gained impressive traction in the last few years.</p><p>Since 2012, total assets in sustainable investing have more than doubled. [2]</p><p>As sustainable investing goes mainstream, it won’t simply act as a niche in a broader strategy — instead, it’ll be naturally integrated throughout a portfolio.</p><blockquote>“With the impact of sustainability on investment returns increasing, we believe that sustainable investing is the strongest foundation for client portfolios going forward.”</blockquote><p><em>— Larry Fink, BlackRock Chairman, and CEO</em></p><p>Sustainability is a global force that will continue to factor into everyday decisions.</p><h3>Sustainable Investing — Challenges</h3><p>The current pool of data around sustainability relies too much on voluntary corporate disclosures, such as annual sustainability reports and company questionnaires put together by institutional investors — many of which ask different questions. [3]</p><blockquote>“Individual investors are quite challenged to obtain this type of information in a way that is easily available and informs investment decisions”</blockquote><p><em>— Jean Rogers, CEO, and Founder of the nonprofit Sustainability Accounting Standards Board</em></p><p>It’s challenging for investors to make sustainable investment choices while relying solely on annual sustainability reports and such. They are often hundreds of pages long and take up huge amounts of human resources to analyze. This problem compounds itself over time as the number of sustainable assets increases. These reports are also never completely transparent. Companies may choose to leave certain things out of their annual reports.</p><p>Annual sustainability reports and such are also very static. They do not reflect changes in the company in real-time, they only reflect an accumulation of changes over a fixed period. This approach misses out on all the changes happening in real-time that may be reflected in news articles.</p><p>A more dynamic approach to sustainable investing would take real-time changes into account while also reducing the complexity of analyzing annual sustainability reports. This would make Sustainable Investing more scalable, increasing efficiency while reducing human prone errors.</p><h3>How NLP can help</h3><p>Natural Language Processing can be used to analyze sustainability reports and news articles extracting out important ESG centric insights. This reduces the complexity of analyzing reports manually, while also making the approach more dynamic by also looking at real-time changes in news articles.</p><p>Let’s take a look at an example:</p><blockquote>We are proud to have reached 100 percent renewable electricity for Apple facilities, and carbon neutrality for Apple’s corporate emissions, including business travel and employee commute. We are embarking on a new goal to become carbon neutral for our entire carbon footprint by 2030.</blockquote><p><em>—An excerpt from the 2020 Apple Sustainability Report [4]</em></p><p>Rather than manually reading the report and analyzing it, an NLP model could perform downstream NLP tasks such as <strong>text classification</strong> and <strong>sentiment analysis</strong> on the report, reducing the complexity of analyzing a report and making the whole process more time and resource-efficient. In this case, the NLP model would classify the excerpt as relating to “Climate Change” with a sentiment value of “positive”.</p><p>NLP empowers the investor to make a better and more efficient analysis of reports and articles, leading to a much more informed Sustainable Investment decision.</p><p><strong>At my internship at </strong><a href="http://parabole.ai/"><strong>Parabole.ai</strong></a><strong>, I was able to develop ESG-BERT by further pre-training Google’s “</strong><a href="https://github.com/google-research/bert"><strong>BERT</strong></a><strong>” language model on large unstructured Sustainability text corpora.</strong></p><p>I had tried approaching this problem using ‘<em>sci-kit learn</em>’ models and ‘<em>count-vectorizers</em>’. Given the nature of this domain and its unique vocabulary, traditional ML models did not yield satisfactory results. Deep Learning models, on the other hand, required large amounts of <strong>structured</strong> text data, which we were lacking in this case. There was an abundance of <strong>unstructured</strong> text data, but <strong>structured</strong> data was scarce.</p><p>Having tried these approaches, I turned towards Google’s BERT which is pre-trained on large unstructured text corpora and hence requires much less structured data for downstream NLP tasks, such as <strong>text classification</strong>. This seemed to fit our case quite perfectly. [5]</p><p><strong>BERT (Bidirectional Encoder Representations from Transformers)</strong> is a technique developed by Google for pre-training of Natural Language Processing models. The official BERT <a href="https://github.com/google-research/bert">repo</a> contains different pre-trained models that can be trained on downstream NLP tasks with an added output layer. These models, however, are pre-trained on general English text corpora, and they are not capable of understanding domain-specific vocabulary. [5]</p><p>Sustainable Investing as a domain has a unique vocabulary that <strong>ESG-BERT</strong> is capable of understanding. <strong>ESG-BERT</strong> was further trained on unstructured text data with accuracies of <strong>100%</strong> and <strong>98%</strong> for Next Sentence Prediction and Masked Language Modelling tasks. Fine-tuning <strong>ESG-BERT</strong> for text classification yielded an F-1 score of <strong>0.90</strong>. For comparison, the general BERT (BERT-base) model scored <strong>0.79</strong> after fine-tuning, and the sci-kit learn approach scored <strong>0.67</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SzlXxSR5iBvA6uhyM3mqGw.png" /><figcaption>Image by author</figcaption></figure><p>The applications of <strong>ESG-BERT</strong> can be expanded way beyond just text classification. It can be fine-tuned to perform various other downstream NLP tasks in the domain of Sustainable Investing.</p><h3>How to use ESG-BERT?</h3><p>The pre-trained domain-specific <strong>ESG-BERT</strong> model can be downloaded from the GitHub repository <a href="https://github.com/mukut03/ESG-BERT">here</a>. It can be fine-tuned to perform downstream NLP tasks such as sentiment analysis, etc.</p><p>ESG-BERT was also fine-tuned to perform text classification on Sustainable Investing text data. The fine-tuned model can be downloaded and served, as explained in the <a href="https://github.com/mukut03/ESG-BERT/blob/master/README.md">readme section of the GitHub repo</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*op9nL5yAI0IDMw3H" /><figcaption>Photo by <a href="https://unsplash.com/@noahbuscher?utm_source=medium&amp;utm_medium=referral">Noah Buscher</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Conclusion</h3><p>This is a substantial step towards text mining in Sustainable Investing.</p><p><strong>ESG-BERT</strong> can be used to make Sustainable Investing more accessible to investors. It makes Sustainability as a goal more attainable by bridging the gap between complex Sustainability data and investors. Its impacts, however, transcend just text mining. Sustainability Reports are often hundreds of pages long and filled with ESG jargon that most people would not understand. This tool makes these Sustainability reports more readable and accessible to everyone and therefore increasing the impact of Sustainable Investing. This moves us one step closer to a greener, safer, and more sustainable future.</p><p>In the near future, I will be publishing tutorials on how I further pre-trained BERT to create ESG-BERT, how I Fine-Tuned BERT using PyTorch, and talk about the other NLP approaches using “count-vectorizers”, and “bag of word” models.</p><h3>References</h3><p>[1] — <a href="https://www.ussif.org/sribasics">Sustainable Investing Basics</a>, US SIF: The Forum for Sustainable and Responsible Investment</p><p>[2] — <a href="https://www.visualcapitalist.com/rise-of-sustainable-investing/">I</a>man Ghosh, <a href="https://www.visualcapitalist.com/rise-of-sustainable-investing/">Visualizing the Global Rise of Sustainable Investing (2020)</a>, Visual Capitalist</p><p>[3] — Alex Davidson, <a href="https://www.wsj.com/articles/a-guide-to-sustainable-investing-1447038115">A Guide to Sustainable Investing (2015)</a>, The Wall Street Journal</p><p>[4] — <a href="https://www.apple.com/environment/pdf/Apple_Environmental_Progress_Report_2020.pdf">Environmental Progress Report (2020)</a>, Apple</p><p>[5] —Jacob Devlin and Ming-Wei Chang, <a href="http://ai.googleblog.com/2018/11/open-sourcing-bert-state-of-art-pre.html">Open Sourcing BERT: State-of-the-Art Pre-training for Natural Language Processing</a> (2018), Google AI Blog</p><p>[6] — Karen Wallace, <a href="https://www.morningstar.com/articles/962827/interested-in-sustainable-investing-heres-what-you-need-to-know-about-sustainable-funds">Interested in Sustainable Investing? Here’s What You Need to Know About Sustainable Funds</a> (2020), Morningstar</p><p><em>Feel free to connect with me on LinkedIn and shoot me a message </em><a href="https://www.linkedin.com/in/mukut-mukherjee-5a2049178/"><em>here</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d0542b3c264b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/nlp-meets-sustainable-investing-d0542b3c264b">ESG-BERT: NLP meets Sustainable Investing</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Do Things Fall?]]></title>
            <link>https://medium.com/discourse/why-do-things-fall-2ae1800e104d?source=rss-5de60fd22bb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ae1800e104d</guid>
            <category><![CDATA[science]]></category>
            <category><![CDATA[gravity]]></category>
            <category><![CDATA[physics]]></category>
            <category><![CDATA[astrophysics]]></category>
            <category><![CDATA[general-relativity]]></category>
            <dc:creator><![CDATA[Mukut Mukherjee]]></dc:creator>
            <pubDate>Sat, 22 Dec 2018 05:30:21 GMT</pubDate>
            <atom:updated>2019-01-08T03:06:17.146Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why do things fall?</h3><p>Why do rocks from a mountain fall to the ground? Why does anything fall? Well, we have been told that the elusive force of gravity is to blame. So there we have it, things fall because they are attracted to the center of the earth.</p><p>Well, not really. See what I did there? The seeming solution was nothing but a mere transposition of the previous problem. Why would anything be attracted towards the center of the earth in the first place? Except, they are not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/0*BZaURwivab4PHbyD" /><figcaption>Einstein formulated his General theory at the age of 36</figcaption></figure><p>Welcome to Einstein’s principle of General Relativity. Things fall not because they are attracted to something, but because they are not.</p><p>This bizarre thought, only possible by the wildest stretches of the imagination, that perplexes great minds till date, was visualized vividly by Einstein, a visualization that we struggle to create even today.</p><p>In this article, I will try to push our understandings further, towards perhaps what Einstein had dreamt of. As he once said, <em>“Any fool can know. The point is to understand”.</em></p><h3>Space and Time</h3><p>In discussing physics, or any science, a clear and working conception of the two most fundamental ingredients of the universe is required. Einstein’s theory of Special Relativity, which was published approximately 10 years before General Relativity, was extremely simple, and yet revolutionary. Why? Because it completely overturned the concepts of space and time.</p><p>Pardon the context, which might seem boring, but be assured that it is crucial in gaining an understanding of what gravity is.</p><p>Space and time, before Einstein’s relativity, was thought to be <em>absolute.</em> Implying that two moving clocks, that were started at the same time, would measure same lengths and time. In other words, there would be complete agreement on what distance was traveled, and how much time had passed.</p><p>Einstein proved this concept wrong. Space and time are not absolute, they are relative. He incorporated Minkowski’s theory of 4-dimensional space-time into his theory of special relativity. Space and time were hence, no longer separate. It was <em>space-time</em> that existed. Any changes in an object&#39;s movement in space directly interfered with its experience of time.</p><p>I won’t go on explaining Special Relativity here. It deserves an article of its own. But the takeaway from here is critical in grasping gravity. So, to recap, space and time exist as one <em>space-time</em> continuum, and it is not absolute, it is relative to the observer and the motion observed.</p><h3>Lines, curved and straight</h3><p>Understanding straight lines hold the key to gravity. What is a straight line? What is the distinctive feature of a straight line that separates it from non-straight lines? The question might seem silly and obvious at first, but let me warn you, it is not.</p><p>Imagine two straight, parallel lines that never meet. Now imagine a curved line. We certainly know that the straight line is completely different than the curved one, but not always.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/0*L8-yAZVZRO_fcqNo" /><figcaption>A spherical globe</figcaption></figure><p>Look closely at something spherical, something curved, a globe for example. Take a minute and look at the picture. Which lines look straight? The latitudes or the longitudes? Even though the latitudinal lines may seem straight, they are not. Why? Because they turn, and straight lines, by their very definition, do not turn.</p><p>So then, straight lines on a plane are not <em>exactly</em> the same on a sphere or curved surface.</p><p>It is important to create this mental distinction of straight lines on surfaces of differing geometry.</p><p>With the previous observation in mind, let&#39;s try to imagine a straight line on a curved surface. For simplicity, let’s use a cone as our curved surface. Keep in mind that the line should never turn. Got a picture in your head? Most probably you did not. Rather get a piece of paper with a straight line drawn on it and fold the paper into a cone. It should roughly look like the one in the picture below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/0*zqN9qjYLbGehd5ZA.jpg" /><figcaption>Cone Geodesics, Source: Wolfram</figcaption></figure><p>See it now? What does our straight line look like now? We had a straight line on the coordinate plane, but on the cone, there is no straight line. Well, the straight line obviously is on the cone since all we did was just fold the paper, but once folded into a cone, it no longer resembles a straight line.</p><p>Let me introduce you to Geodesics. A straight line on a curved surface is a geodesic. This means that any straight line when plotted on a curved surface, remains <em>straight </em>but does not look<em> straight.</em></p><h3>Space-time geodesics</h3><p>Now that we understand the concept of space-time and geodesics, understanding gravity is within our reach. We start by visualizing some graphs. Imagine a graph of space vs time, much like the graph on the picture above. Now think about what the straight line on the space-time graph represents. It represents an object’s motion over time. The line represents the sum of all individual events in space and in time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/0*x6ahoqR4_PJ7VBy3" /><figcaption>Space vs Time graph</figcaption></figure><p>In this graph, let the y coordinate depict changes through space and the x coordinate represent changes in time. This graph then serves as a space-time diagram for a stationary object.</p><p>Now, what would happen if you were to take this graph and fold it into a cone?</p><p>The result, as expected, would be extremely similar to our previous cone observation.</p><p>So, what does this imply?</p><p>If we look at the line on the cone, we see that the space-time events have been altered. We see the line gradually dropping <strong><em>down</em></strong>. A static object in <em>flat </em>space-time retains its spatial position through time, as seen on the unfolded graph. But as seen on the graph folded into a cone, a static object in <em>curved</em> space-time falls <strong><em>down</em></strong> through space, over time. See the point? The object and the scenario is one and the same in both the cases, all that has changed is the geometry of space-time, its shape, its curvature. The latter observation is a symptom of what we call <strong>gravity</strong>.</p><p>Hence, there is a possibility that gravity is no mysterious force, but just curved space-time continuum. This would explain how and why things fall, without assuming the existence of any force, a push, or a pull.</p><p>An object, static or moving, is seemingly attracted to some other object not because there is a force called gravity, but because those objects simply follow their space-time geodesic. Straight lines in curved space-time.</p><h3>Conclusion</h3><p>All that I discussed in the article so far was but a mere thought experiment for Einstein. This made him realize that the apple fell on Newton, not because it was being pulled by the earth, but because it was always following its space-time geodesic.</p><p>This raises another question though. How and why is space curved? Einstein came up with the theory that <em>mass </em>bends space-time<em>. </em>Described in probably the most elegant equation, known as the Field Equation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/0*PBgp4c7A2mswdlnt" /><figcaption>Einstein’s Field Equation</figcaption></figure><p>This is how General Relativity was born and it has passed every single test till date. Einstein correctly redefined gravity, which, throughout all of human history had puzzled scientists.</p><p>Realize, that in flat space-time, things would not <em>fall</em>, there would be no <em>time.</em> But due to the sun and the earth, and everything else in the universe, space-time is <em>curved</em>, giving rise to what we see as <em>gravity</em> and experience as <em>time</em>.</p><p>Gravity is not a force, it is space-time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ae1800e104d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/discourse/why-do-things-fall-2ae1800e104d">Why Do Things Fall?</a> was originally published in <a href="https://medium.com/discourse">Dialogue &amp; Discourse</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Towards autonomous drones under $200]]></title>
            <link>https://medium.com/@mukutm/towards-autonomous-drones-under-150-73e1c024b87f?source=rss-5de60fd22bb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/73e1c024b87f</guid>
            <category><![CDATA[opencv]]></category>
            <category><![CDATA[autonomous-vehicles]]></category>
            <category><![CDATA[drones]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <dc:creator><![CDATA[Mukut Mukherjee]]></dc:creator>
            <pubDate>Thu, 13 Dec 2018 00:23:49 GMT</pubDate>
            <atom:updated>2019-01-07T22:50:25.654Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WM6_4TmSuGEDLuap" /></figure><p>From mythical flying horses to Wright brothers, there has always been a special place for flying objects, identified and unidentified alike, in the human heart and mind. Thanks to science and technology, our fascination with angels have been replaced with that of autonomous drones, machines that are capable of flying by themselves.</p><p>Building autonomous drone, or even understanding them could be extremely taunting. So let’s break this down.</p><h3>The Drone</h3><p>We would first need to build a standard radio controlled drone. Starting with the frame, the <a href="https://www.amazon.com/Flame-Wheel-Basic-Quadcopter-Drone/dp/B00HNMVQHY/ref=sr_1_3?ie=UTF8&amp;qid=1544377268&amp;sr=8-3&amp;keywords=dji+f450">f450 frame</a> by DJI seems to be the most reliable. The DJI frame on my drone survived a 300 feet free fall, so it is quite durable. We would then need motors and some electronic speed controllers. Since we will be using the f450 frame which has a payload of about 2 kilograms, we need to be using brushless motors that have a rating of at least <a href="https://www.amazon.com/RacerStar-BR2212-1000KV-Brushless-Propellers/dp/B07FGVH6Z7/ref=sr_1_3?ie=UTF8&amp;qid=1544386133&amp;sr=8-3&amp;keywords=1000kv+brushless+motors+with+prop">920kV with some 10-inch</a> propellers. Any<a href="https://www.amazon.com/Hobbypower-SimonK-Brushless-Controller-Quadcopter/dp/B00QRR7N32/ref=sr_1_5?ie=UTF8&amp;qid=1544385942&amp;sr=8-5&amp;keywords=simonk+30a+esc"> 30A ESCs</a> would suffice for this project. A <a href="https://www.amazon.com/Battery-11-1V-3000mah-Phantom-Quadcopter/dp/B01HZ4C5RY/ref=sr_1_9?ie=UTF8&amp;qid=1544386089&amp;sr=8-9&amp;keywords=f450+battery">30C lithium</a> polymer battery above 2300mAh would give the drone 10+ minutes of flight time. The most important part of this standard drone build is the flight controller. We could choose flight controllers that are made for autonomous missions, but that would defeat the very purpose of this post. Instead, we would be using some basic inexpensive flight controllers like the KK2.0 board or the <a href="https://www.amazon.com/OpenPilot-Flight-Controller-32-bit-Degree/dp/B077Z5WNMC/ref=sr_1_3?ie=UTF8&amp;qid=1544376831&amp;sr=8-3&amp;keywords=cc3d+flight+controller">CC3D</a> by OpenPilot. Next up, we need a 6-channel radio controller like this one from <a href="https://www.amazon.com/gp/product/B00PF160IK/ref=ox_sc_act_title_1?ie=UTF8&amp;psc=1&amp;smid=ATVPDKIKX0DER">FlySky</a> to complete our basic build. Even though we would only be using four channels out of the six, the extra two could help interface some other control, controlling a gimbal for example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*prila_Z_cYGvQrpF.png" /><figcaption>CC3D connection diagram. Source: OpenPilot Wiki</figcaption></figure><p>Once everything is <a href="https://www.youtube.com/watch?v=ZK7IkctChu8&amp;list=PLLbz0J-_liAEL5PA2w_dZVrQGL6mk5ftI">connected</a> and the flight controller is <a href="https://opwiki.readthedocs.io/en/latest/user_manual/cc3d/index.html">set-up</a>, we are ready for our first flight!</p><h3>Getting rid of the radio</h3><p>The first step towards the automation of our drone would be replacing the radio with an onboard computer. Speaking of onboard computers for the drone, I hope, that a Lenovo Thinkpad would not be the first thing that pops to mind. We can make good use of the Raspberry Pi here. Even an Arduino would perform in this situation, though it is not a computer, but a micro-controller. I have tried and tested both of them and the Pi, because of its greater computational power, would be best suited in this quest to make the drone autonomous. But, how does replacing the radio with the Pi help us achieve our goal? Well, with the Pi we can connect a wide range of external sensors and run different mapping, localization, and or image processing algorithms, do all the fun stuff basically. But first up, we need to mimic the radio transmitter signals that served as inputs for our flight controller.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*iEIBNCxn0jo-hB9ImTbLhw.jpeg" /></figure><p>In order to interface the Raspberry Pi with our flight controller, we need to use the PWM function of the gpIO pins on the Pi. Use the <a href="https://github.com/mukut03/-APM-raspi-drone-/blob/master/ESC_all_motors.py">code here</a> as a reference. Once done with the code, open up the latest LibrePilot (previously known as OpenPilot) <a href="https://opwiki.readthedocs.io/en/latest/user_manual/gcs_install.html">Ground Control Station</a> and configure the inputs from the Pi to different channels that correspond to throttle, pitch, yaw, and roll. Follow the normal Radio controller calibration procedure with the Pi. Once done, we should be all set to use our Pi for sending commands to the Flight Controller that controls the movement of our drone. The setup at hand could be expanded by using a mobile device that sends specific commands to our drone. I made this <a href="https://drive.google.com/drive/u/0/folders/1DMYUQjlSNe26pyXwPvZi05N-9fL6NnDA">android app</a> that sends specific commands to the drone, to take off, land, arm, disarm, etc. This enables the user to fly the drone in a more controlled and guided manner, increasing safety and stability. Documentation can be found along with the mobile application.</p><p>At this point, our drone can be controlled by a mobile application through Bluetooth and the onboard Raspberry Pi can now be used for all the “fun stuff”.</p><h3>The fun stuff</h3><p>In our model, the flight controller acts as a mere motor control unit that flies and balances the quadcopter. This means that the Raspberry Pi could be used as the brain of our drone, while the flight controller handles all the electronics. Using the Raspberry Pi, we can add a myriad of external sensors that aid our drone’s motion. A cheap ultrasonic sensor can be placed at the bottom of our drone to maintain a constant height at all times. With four more ultrasonic sensors at the front, back, and sides, our drone could avoid any obstacles in its way and even go over obstacles that are under its body, stairs for example.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FZ_zV532d5oQ%3Fstart%3D104%26feature%3Doembed%26start%3D104&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DZ_zV532d5oQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FZ_zV532d5oQ%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/1d09e216d236f1b449f9fac772f7fc06/href">https://medium.com/media/1d09e216d236f1b449f9fac772f7fc06/href</a></iframe><p>Like the one used in this video, a laser range finder could also be used instead of the ultrasonic sensors. The laser rangefinders might be costlier but are more accurate at the same time.</p><p>Advancing a step further from here, we could make good use of a webcam that is lying in our basements. Real-time image processing can be easily implemented on the Pi using <a href="https://www.pyimagesearch.com/2018/09/26/install-opencv-4-on-your-raspberry-pi/">OpenCV</a>. OpenCV is a powerful tool that can be used for image recognition, object tracking, etcetera. Hence our model can also be used for advanced applications, rescue, or search missions for example, where a specific target needs to be followed or found. This could be achieved using OpenCV.</p><p>The Raspberry Pi can also run ROS which is an environment specially made for robotics applications. ROS has many important libraries that mainly target and improve autonomous navigation. Using <strong>S</strong>imultaneous <strong>L</strong>ocalization <strong>A</strong>nd <strong>M</strong>apping, or SLAM, the drone could be made to navigate an unknown environment. This would require advanced LIDARs, which in principle are high-speed 360-degree laser scanners. Once equipped with the LIDARs, the drone could be used in any environment. Using SLAM algorithms, the Raspberry Pi would create a 2-D map of its environment and then navigate through it. This has huge applications in autonomous indoor flying where GPS data is not as precise.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/855/0*vS7RRsBNJ5GwBnGQ.png" /><figcaption>2-D map generated using rpiLidar and SLAM</figcaption></figure><p>Excluding the LIDAR, everything else costs well under $200, which is about the price of a PlayStation. This model provides a great learning experience with the possibility of implementing advanced applications in contrast to the costlier ready-to-fly drones.</p><p>With the Raspberry Pi in place of the radio, applications targeting automation become easier with more stabilized control and safer flights.</p><p>And, that is it! Towards autonomous drones under $200!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=73e1c024b87f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>