<?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 Veejay Karthik on Medium]]></title>
        <description><![CDATA[Stories by Veejay Karthik on Medium]]></description>
        <link>https://medium.com/@vjkarthik1997?source=rss-2e121a4e2066------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*yPVQyqfNgJM_LbmgeDYJKQ.jpeg</url>
            <title>Stories by Veejay Karthik on Medium</title>
            <link>https://medium.com/@vjkarthik1997?source=rss-2e121a4e2066------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 20:36:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vjkarthik1997/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[Chess : A game of Space and Time]]></title>
            <link>https://vjkarthik1997.medium.com/chess-a-game-of-space-and-time-772f1a58684c?source=rss-2e121a4e2066------2</link>
            <guid isPermaLink="false">https://medium.com/p/772f1a58684c</guid>
            <category><![CDATA[board-games]]></category>
            <category><![CDATA[chess]]></category>
            <category><![CDATA[the-queens-gambit]]></category>
            <category><![CDATA[games]]></category>
            <category><![CDATA[sports]]></category>
            <dc:creator><![CDATA[Veejay Karthik]]></dc:creator>
            <pubDate>Mon, 28 Dec 2020 09:12:45 GMT</pubDate>
            <atom:updated>2020-12-28T15:27:50.469Z</atom:updated>
            <content:encoded><![CDATA[<h3>Chess : A game of Space and Time</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HSI_jd1WUncpzs1Lfsr9Jg.jpeg" /></figure><p>Chess, which is played by millions worldwide is one of the most followed sport globally. Set up over 64 squares with 32 pieces and 2 players, this game is a battle of ideas, tactics and strategies, with the ultimate objective of checkmating the opposite colored king.</p><p>Although it doesn’t seem really obvious in the first sight, the entire dynamics of the game can be broken down in the sense of space and time. At the very heart of every strategy that is devised, every move that is played, it is only these two aspects of the game that change. Therefore, understanding these are vital in order to gain a substantial understanding of the game.</p><p>To put things in a better perspective, let’s consider the act of performing a checkmate. We know that a checkmate implies, the opposite colored king has no safe square to move to. To simply put things into our context, a checkmate happens when a player maneuvers his pieces to positions such that he is able to alter the dynamics of the game to a state where the opposite colored king has no safe space around it to move to.</p><blockquote>Well, if the ultimate objective of the game- “checkmate” involves only the aspect of space, why is ‘time’ of the essence here?</blockquote><p>When we look closely, the game of chess, like most other board games is played between 2 players who make their moves in a sequential manner. To win the game, the player must not only alter the space around the opposite colored king, he must also be able to do this <strong>before his opponent</strong> does. This is where ‘time’ comes into the picture. The very necessity of wanting to occupy the space around the opposite colored king before the opponent does the same to your own makes ‘time’ a very essential aspect to win the game!</p><p>To understand this better, let’s look at the position below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/397/1*Csjb0NEZmHCtRcsJcnV_QQ.jpeg" /></figure><p>In the sense of ‘Space’, there are forced checkmate combinations in this position for both black and white. But, the outcome of the game is determined by whose turn it is to move. Therefore, time plays a crucial role in determining the outcome of this game! Its evident that whoever was able to reach this position first would have the opportunity to execute their checkmate sequence, thereby winning the game.</p><p>The stages in the game of chess can be broadly classified into the Opening, the Middlegame and the Endgame. In all these stages, the intent of almost every move that is played can be explained in the context of space and time. A good move gains space or time or both, while a bad move results in the loss of the same. The tactical ideas to win the game simply arise when the opponent has lost either too much time or too much space. Let’s cut to the chase and observe how these ideas look on a chess board.</p><p><strong>#1….The Outpost!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/396/1*CUxB4pEyVRmPEIG1Ubp7oQ.jpeg" /></figure><blockquote>‘The Outpost’ in chess is typically is square which cannot be attacked by a pawn of the opposite color. So why is this important?</blockquote><p>Any piece that is going to reside in this square is going to fetch us a permanent gain of space in the game. In the above position, the Knight on the square d5 (which is an outpost), helps white gain a <strong>permanent space advantage </strong>over the squares b4,b6,c7,e7,f6,f4,e3,c3 provided if white is able to protect the pawn on e4 which has created the outpost for the knight(And of course, if black tries to eliminate this knight with his rook, the game would continue with white having a material advantage). After a few favorable exchanges, white could launch an attack from any of the squares controlled by this knight to win the game!</p><p><strong>#2….Tempos!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/1*8JGzedTazSXH0lW5SjpCRw.jpeg" /></figure><blockquote>Tempos are typically the time gaining moves in chess!</blockquote><p>In the above position, if black captures the pawn on g7, then white recaptures it with his bishop. Although white would be down by two pawns, he gains a tempo(Time!) when he recaptures with his bishop. The consequence of this is that white would have more development of his pieces and attacking possibilities on the h7-b1 diagonal and the a1-b8 diagonal.</p><blockquote>So why do I call it as a time gaining move?</blockquote><p>If we observe closely, for black to survive in this position, the subsequent moves that black plays should be focused on securing the squares on his kingside. In the meanwhile, white could get his time to move his other pieces in gaining decisive space advantages without facing much threats from black as it would be busy securing its kingside squares.</p><p><strong>#3….Discovered Attack!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*z8wV4UTbFd-qUUFvx7xAIQ.jpeg" /></figure><blockquote>Discovered Attacks are one of the most powerful moves that could be played in the game of chess to gain a decisive advantage. These are very powerful because such moves help us in gaining both space and time in a single move.</blockquote><p>In the above position, the black queen resides in d4 and this square is protected only by the black queen. If we are able to gain that space on d4 as well as exploit the same without giving black the time to protect it further, we would simply win the black queen. A discovered attack in this position achieves the same. The move Bb5 attacks the black king and this leaves black with no opportunity to protect d4 further ,as it also comes under the attack of the white queen simultaneously. This gain of space and time with just one move of white, gives it a decisive advantage to win the game!</p><blockquote>In a game of chess ,white is at an advantage with respect to time at the beginning of the game as it gets to make the first move!</blockquote><p>Almost all openings in chess also revolve around this idea of space and time. In one of the most famous openings in chess ,“The Nimzo Indian Defense”, these two aspects can be evidently seen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/438/1*LsPM7xoFAxMHbWe1zjUFrg.jpeg" /></figure><p>One of the key ideas in the strategy of black in this opening is to <strong>exchange its black bishop for the white’s knight</strong> and the above picture shows the typical moves that black intends to play out of the opening. If we look closely, almost these moves are towards gaining a space advantage over the black squares in order to restrict the mobility of the black bishop of white thereby leaving it paralyzed! Then black tries to slowly use this to neutralize the initial time advantage of white as the game progresses and push for a win towards the end.</p><p>The game of chess has also been a subject of the cinematic universe with movies such as “Pawn Sacrifice” and one of the recent worldwide hit TV series “Queen’s Gambit”. With sixty four pieces and a over a trillion combinations of possible positions, chess truly is a beautiful game indeed!</p><p><em>I hope this article was informative! Cheers!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=772f1a58684c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Obsessive Control of DC Motors (OCD)]]></title>
            <link>https://medium.com/spidernitt/obsessive-control-of-dc-motors-ocd-23dbdc37ba93?source=rss-2e121a4e2066------2</link>
            <guid isPermaLink="false">https://medium.com/p/23dbdc37ba93</guid>
            <category><![CDATA[control-system]]></category>
            <category><![CDATA[hardware]]></category>
            <category><![CDATA[position-control]]></category>
            <category><![CDATA[spiders]]></category>
            <category><![CDATA[dc-motor]]></category>
            <dc:creator><![CDATA[Veejay Karthik]]></dc:creator>
            <pubDate>Thu, 09 Jul 2020 11:30:47 GMT</pubDate>
            <atom:updated>2020-07-09T11:30:47.412Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/346/1*b6yYakreoJGk8BMH0_wtZw.jpeg" /></figure><p>The first patent of an electric motor was filed by the American inventor Thomas Davenport in the early 19th century, in whose time, its primary applications were in printing presses and power machinery tools. Rolling forward a couple of centuries, we have them everywhere from the vibration of mobile phones in our pockets, the ceiling fans in households to robotic manipulators.</p><p>These motors, based on their applications, need to be controlled in such a manner to achieve the objective of the task intended. For example, electric vehicles require variable speed control while robotic manipulators often require position control of the actuators which are powered by motors. In this article, I aim to elaborate on how Angle(Position) control could be achieved from a typical DC Motor and a discussion of a few modern methods to improve the performance of the same.</p><h3>How do we achieve this?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RxkcGEJCitiZ8paXXDlSCQ.jpeg" /><figcaption>Typical Block Diagram of a Position Control System(Servo)</figcaption></figure><p>Almost every Position Control System can be disintegrated down to the constituents of the block diagram shown above. The most vital aspect of the above system is the controller that achieves the position control objective. Therefore, improving the performance of the controller leads to the enhancement of the performance of the position control system as a whole.</p><h4>Uncertainties:</h4><p>In practical systems, disturbances are inevitable and they are present throughout the operation. They are typically modeled as D(x) and D(y) as shown. These disturbances could be both internal as well as external. Internal disturbances include the variation in the resistance of the motor coils due to heating during prolonged operations while external ones include those such as varying atmospheric conditions like pressure, wind, etc. which could adversely affect the operation. The effect of these types of disturbances has to be often neutralized by making the controller robust enough so the required performance criteria could be satisfied.</p><p>Also, since the above system is of negative-feedback type, the output measurements need to be reliable so that the controller would be able to perform its task seamlessly. To minimize the errors creeping into the output measurements due to sensor noise, more than one means of measurement could be employed and techniques such as <a href="https://www.bzarg.com/p/how-a-kalman-filter-works-in-pictures/">Kalman filters</a> are used to better estimate the present position.</p><h4>Primary Aspects:</h4><p>In modern times, the controllers are often digital, so in the feedback loop, an ADC (Analog/Digital Converter — Typically embedded into sensor modules) is used to convert the real-time analog signals to digital signals. The most important factor that is considered here is the resolution of the ADC module that is incorporated. Ideally, we would like to have a high-resolution ADC so that the loss of data is minimal and the time required to convert the analog to digital values should be made small enough so that we don’t create time lags in our system, which is highly dangerous for the controller operation.</p><p>To understand, how a DC Motor is mathematically modeled, you can check this <a href="https://www.precisionmicrodrives.com/content/dc-motor-speed-voltage-and-torque-relationships/">link</a>. The key underlying principles that we need to know about DC motors so that we would be able to develop an intuitive understanding of their operation are that, for a fixed load, the speed of the motor directly depends on the applied voltage. Under this condition, <strong>an</strong> <strong>i<em>ncrease in voltage results increase in speed </em></strong>and<strong><em> </em></strong>for a fixed voltage, the speed of the motor is inversely affected by the load, in this case, <strong>an increase<em> in load torque results decrease in speed.</em></strong></p><p>On a very basic level, a very common method that is employed to tackle the controller design is by using a PID based controller. This controller is quite simple, yet disproportionately powerful on the scale of the simplicity by which it could be implemented. Therefore it ends up being a popular choice for several applications. However, it has its shortcomings when it comes to high frequency and very high precision applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/529/1*ppHEwAvffvAfVvKct3sqBA.png" /><figcaption>PID Block Diagram</figcaption></figure><p>In the PID block diagram, e(t) simply means the error which is the difference between the reference value and the present value of the state that is being measured. Kp, Ki, and Kd are the control parameters that are typically set based on the performance objectives that are needed to be satisfied. For starters, these parameters can be obtained with methods such as <a href="http://www.mstarlabs.com/control/znrule.html">Ziegler Nichols Method</a> of tuning PID parameters.</p><blockquote>So far I have been mentioning terms such as “Performance Criteria” and “Performance Objectives”.What do I actually mean by them?</blockquote><h4>Performance Criteria and Performance Objectives :</h4><p>In simple terms, just as how a “good” refrigerator needs to precisely maintain its temperature and humidity within the bounds set by the user, to justify that it is performing well, in case of position control systems, the performance is often defined by criteria such as, is my system reaching its set point within the stipulated time or is my system oscillating too much, or is my system being unresponsive to high-frequency inputs, within the defined conditions of operation.</p><p>The individual elements of our system and the algorithms that need to be implemented are chosen and determined solely by the performance objectives that we set. Therefore it is very much essential that we work out these requirements in advance before we start building our position control system.</p><blockquote>For example , the data related to the performance of Servo Motors which are typically position control systems are given as “ Average Speed: 60 degrees in 0.20 sec (@ 4.8 V), 60 degrees in 0.16 sec (@ 6.0 V). Torque: At 4.8 V: 8.5 kg-cm and at 6 V: 10 kg-cm”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bk0prCwB7HO20XitJlE4kA.jpeg" /><figcaption>Basic Angle Control System</figcaption></figure><p>The above figure shows an attempt to build a very basic Angle Control System from scratch. It runs on a basic PID controller and utilizes a potentiometer as a voltage divider(typically, sensing!) to determine the angle the motor has swept through.</p><p>So now, if I set my performance objective to something trivial like, only to demonstrate if it reaches a constant set point in a substantial amount of time, say, in an order of few seconds, then I could very well conclude that my system is performing well. But, in practical applications where set-points keep changing consistently with time and when there is a need to reach those points before the subsequent setpoint commands are received, then this is not a very good system to work with!</p><blockquote>So , what are the issues with conventional PID that leads us to consider more advanced controllers for high frequency and high precision applications?</blockquote><p>The primary concern for conventional PID is based on robustness and performance issues when subjected to various conditions of operation such as variable loads and high-frequency inputs. As a result of this, the control gains often have to be adjusted to minimize degradation in performance. Often control engineers solve this drawback with methods such as gain scheduling which aids in fine-tuning the control of the motor.</p><blockquote>The Fractional PID Controllers!</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*n41PVvYgKU17WsKSYOo3_Q.png" /><figcaption>Fractional PID Block Diagram</figcaption></figure><p><a href="https://en.wikipedia.org/wiki/Riemann%E2%80%93Liouville_integral">Fractional Derivatives and Integrals</a> are abstract mathematical concepts that allow us to evaluate the differentials and integrals of fractional orders. Though their math seems to be a bit complex(I would personally recommend you to try solving them by yourself, to understand them better), there are toolboxes available in MATLAB through which they could be implemented.</p><p>This is an enhancement to the conventional PID controllers as we get to tweak around with five different parameters(Including the order of the integral and the differential) unlike the usual three in the case of conventional PID controllers. This provides us with a lot of flexibility in improving the performance in a mathematically elegant fashion, by which we could simultaneously satisfy up to five different controller design specifications so that our controller becomes more robust and its range of operation could be improved substantially without much degradation in performance.</p><p>The fractional calculus toolbox: <a href="https://fomcon.net/fomcon-toolbox/overview/">https://fomcon.net/fomcon-toolbox/overview/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IYtQlrYlgKwkUMo0N-VAVg.png" /></figure><p>The flexibility offered by the Fractional PID (F-PID) based controllers when compared to the conventional type can be visualized as shown. The operating points of conventional PID are represented by the four dots, while the F-PID has its operating zone within the entire shaded region!. So, one could imagine the amount of flexibility offered by F-PID. The basic underlying principle of PID remaining the same, this enhancement has been widely used in position control systems(example, Servos) to obtain better performance.</p><p>Despite providing us with improvement in performance, the major hurdle that occurs in the implementation is the tuning of the controller gains and the order of differential and the integral to obtain the desired performance, which needs constrained non-linear optimization techniques. For this reason, the MATLAB optimization toolbox has often been used to find the best solution with minimum error. The function used for this purpose is called <a href="https://in.mathworks.com/help/optim/ug/fmincon.html">fmincon()</a>, which finds the constrained minimum of a function of several variables. So, in case you are implementing this controller shortly for any purpose, make sure to check this out.</p><p>I hope this article was informative. Cheers!</p><p><em>This article is published as a part of the </em><strong><em>‘Hardware Series’</em></strong><em> under </em><a href="https://medium.com/spidernitt"><em>Spider Research and Development Club, NIT Trichy</em></a><em> on a Tronix Thursday!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=23dbdc37ba93" width="1" height="1" alt=""><hr><p><a href="https://medium.com/spidernitt/obsessive-control-of-dc-motors-ocd-23dbdc37ba93">Obsessive Control of DC Motors (OCD)</a> was originally published in <a href="https://medium.com/spidernitt">Spider R&amp;D</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>