<?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 Animesh Sarkar on Medium]]></title>
        <description><![CDATA[Stories by Animesh Sarkar on Medium]]></description>
        <link>https://medium.com/@animeshsarkar_18504?source=rss-461633055ed9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*n0arSYskcTtNY6UU</url>
            <title>Stories by Animesh Sarkar on Medium</title>
            <link>https://medium.com/@animeshsarkar_18504?source=rss-461633055ed9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 22:06:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@animeshsarkar_18504/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[Functional Safety in Automotive Software: Mastering ISO 26262 Part 6 for Unit Design Implementation]]></title>
            <link>https://medium.com/@animeshsarkar_18504/functional-safety-in-automotive-software-mastering-iso-26262-part-6-for-unit-design-implementation-1208268eff?source=rss-461633055ed9------2</link>
            <guid isPermaLink="false">https://medium.com/p/1208268eff</guid>
            <category><![CDATA[functional-safety]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[adas-market]]></category>
            <dc:creator><![CDATA[Animesh Sarkar]]></dc:creator>
            <pubDate>Fri, 06 Oct 2023 02:48:41 GMT</pubDate>
            <atom:updated>2023-10-06T02:48:41.763Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_6p4Le8X2uGOov_pR9fbpQ.jpeg" /></figure><p>In the fast-evolving landscape of automotive software, prioritizing functional safety is non-negotiable. ISO 26262: Part 6 is the bedrock of software-level product development and provides the guiding principles around software development practices for safety-critical code.</p><p>In this article, my goal is to highlight some design principles recommended by Part 6 of ISO 26262 and how to go about implementing them in the software development process.</p><p>I’m referring to the section 8.4.5 as part of <a href="https://www.iso.org/standard/51362.html">ISO26262 Part 6</a>. This section particularly talks about properties that a safety-critical software component shall follow in order to comply with ISO 26262.</p><ol><li>Correct Order of Execution of Subprograms and Functions within the Software Units, Based on the Software Architectural Design:</li></ol><p>The order of execution of functions and sub-functions is critical to ensure that the unit components are executed in accordance with the architecture.</p><p>Failure to follow the execution order could lead to several issues some examples below describe the errors we can expect:</p><p>a. Race conditions: when multiple functions try to access shared resources concurrently leading to unpredictable behavior, data corruption and system crashes</p><p>b. Deadlocks: when 2 or more processes are waiting for execution but the other and incorrect order requires the output of one could cause both functions to stay dormant leading to a system failure.</p><p>c.Timing Constraints: In real-time systems, strict timing constraints must be met. Incorrect execution orders can cause tasks to miss deadlines.</p><p>d. Complex Debugging: Debugging problems related to incorrect execution order can be complex and time-consuming. Developers may need to trace the sequence of events and identify the specific conditions that led to the issue.</p><p>To ensure we avoid the above troubles software architects shall ensure a good algorithm flow is followed, with good practices of code structuring into function calls, classes, and modules. For model-based systems using schedulers and proper runnable parameters is one way to follow execution order.</p><p>2. Consistency of the Interfaces Between the Software Units:</p><p>A consistent interface ensures that data and commands are exchanged in a standardized manner, reducing the risk of misunderstandings or errors. To ensure interface consistency, software developers often define clear protocols and use standardized communication methods, such as application programming interfaces (APIs) or messaging formats like CAN (Controller Area Network).</p><p>3. Correctness of Data Flow and Control Flow Between and Within the Software Units:</p><p>Data flow refers to how information moves through the software, while control flow deals with the sequence of actions and decisions made within the code.</p><p>To maintain the correctness of data and control flow, developers use careful data validation, error handling mechanisms, and rigorous testing procedures to ensure that the software behaves as expected under various conditions.</p><p>Proper documentation such as interact analysis and activity diagram help in better implementation of software components.</p><p>4. Simplicity:</p><p>simplicity is a key principle in software design for functional safety. It emphasizes the importance of keeping the software as straightforward as possible. Complex code can be difficult to understand, prone to errors, and challenging to maintain.</p><p>To achieve simplicity, developers aim to write clear, concise, and modular code. They avoid unnecessary complexity, use meaningful variable names, and follow coding standards that prioritize simplicity and readability.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1208268eff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to auto-tune a PID controller using the Scipy Python library]]></title>
            <link>https://medium.com/@animeshsarkar_18504/how-to-auto-tune-a-pid-controller-using-the-scipy-python-library-6dbdff288e45?source=rss-461633055ed9------2</link>
            <guid isPermaLink="false">https://medium.com/p/6dbdff288e45</guid>
            <category><![CDATA[pid-controller]]></category>
            <category><![CDATA[control-system]]></category>
            <dc:creator><![CDATA[Animesh Sarkar]]></dc:creator>
            <pubDate>Sat, 16 Sep 2023 21:33:56 GMT</pubDate>
            <atom:updated>2023-09-16T21:33:56.812Z</atom:updated>
            <content:encoded><![CDATA[<p>In control systems, a PID (Proportional-Integral-Derivative) controller is a widely used feedback controller that adjusts its output based on the error between the desired setpoint and the measured process variable. Tuning the PID gains, i.e., the proportional, integral, and derivative coefficients, is crucial for achieving stable and optimal control performance</p><p>The following is a step-by-step guide to implementing a small project using PID controllers to design a typical application of longitudinal control (cruise control) system. In this tutorial, we will develop an optimal tuning algorithm using the Scipy Python function library as inspired by the following post.</p><h3>Introduction to PID</h3><p>Before we dive into the implementation let’s briefly review the PID control algorithm. PID control is a widely used feedback control algorithm that calculates the control output based on three terms:</p><ol><li>Proportional Term (P): It responds quickly to changes by considering the error between the setpoint and the measured variable.</li><li>Integral Term (I): It accumulates errors over time to eliminate steady-state errors and address residual errors.</li><li>Derivative Term (D): It predicts error trends by calculating the rate of change, enabling the controller to anticipate and counteract the system’s response.</li></ol><p>In the following implementation, we shall first implement the longitudinal vehicle dynamics model for a car in Python. followed by defining the PID function. We will then formulate an optimization problem that will help us reach the optimal PID gain values. The simulation that we will implement will also involve disturbance factors such as changing gradients and we will see how our auto-tuning algorithm performs in changing disturbances.</p><h3>Longitudinal vehicle dynamics</h3><p>The longitudinal dynamics of a car can be represented by the following equations</p><p>for this implementation example we shall use the data from a Tesla Model 3 to populate our variables.</p><p>we assume that the max force the powertrain can output is a function of velocity and that the maximum force is linearly proportional to velocity. with this assumption, we can determine the maximum force at 0mps velocity and at Vmax (72m/s)</p><p>based on the above information let’s define a class for the vehicle as follows.</p><p>we shall then define a function called step that will calculate the velocity of the vehicle for the corresponding applied force by the powertrain. we will assume a linear function for speed and maximum powertrain force to saturate the maximum force based on the velocity.</p><h3>Implementing PID and auto-tuning algorithm</h3><p>Let’s start by implementing the PID controller in Python. We’ll create a <strong>PID</strong> class that encapsulates the controller’s behavior. Here’s the code. we start by defining the init function</p><p>The equation for control force generated by a PID controller can be expressed as follows</p><p>to implement the step response of the PID the following implementation is done. By executing these steps, the PID controller adjusts the control command based on the error, integral term, derivative term, and the specified limits and rate of change, allowing it to regulate the process variable towards the desired setpoint.</p><h3>Auto-tuning optimization problem</h3><p>The idea for finding the optimal gain parameter is by developing a cost function and minimizing the cost function such that the best gain parameters are derived. We shall have 2 weight factors one to influence the control force and the other to influence the error.</p><h3>Simulation</h3><p>finally, to perform the simulation we assume a time horizon of 60sec. for the cruise control problem, we can achieve desired performance by using a PI controller with anti-windup gain.</p><h3>Results</h3><p>finally, we can now run our script with defined variables. The given code snippet demonstrates a simulation and optimization process for a car control problem. The code essentially performs the following steps: configuration setup, optimization using the <strong>minimize</strong> function, printing of optimization results, running simulations with optimized parameters, and running a simulation with manually tuned parameters for comparison.</p><p>By following this algorithm flow, the code allows for the optimization of PID gains and the evaluation of the resulting control performance through simulations.</p><pre>lize arrays for storing result t = np.zeros((length, len(We) + 1)) stp = np.zeros((length, len(We) + 1)) command = np.zeros((length, len(We) + 1)) theta = np.zeros((length, len(We) + 1)) v = np.zeros((length, len(We) + 1)) result = [] # Perform minimization for each couple of We and Wu weights for idx in range(0, len(We)): bounds = ((0, None), (0, None), (0, None)) r = minimize(Cost, [500, 3, 3], args=(time_step, end_time, m, b, F_max_0, F_max_max, v_max, We[idx], Wu[idx], uphill[idx]), bounds=bounds) result.append(r) # Print optimization results print(&quot;We = &quot; + &quot;{:.3g}&quot;.format(We[idx]) + &quot; Wu = &quot; + &quot;{:.3g}&quot;.format(Wu[idx]) + &quot; Uphill = &quot; + &quot;{:.0g}&quot;.format( uphill[idx]) + &quot; Kp = &quot; + &quot;{:.3g}&quot;.format(result[idx].x[0]) + &quot; Ki = &quot; + &quot;{:.3g}&quot;.format(result[idx].x[1]) + &quot; Kaw = &quot; + &quot;{:.3g}&quot;.format(result[idx].x[2])) print(&quot;Success: &quot; + str(r.success)) # Run simulation with optimized parameters (t[:, idx], stp[:, idx], v[:, idx], command[:, idx], theta[:, idx]) = Simulation(r.x, time_step, end_time, m, b, F_max_0, F_max_max, v_max, 1) # Run simulation with manual tuning x_man = [500, 3, 3] (t[:, idx + 1], stp[:, idx + 1], v[:, idx + 1], command[:, idx + 1], theta[:, idx + 1]) = Simulation(x_man, time_step, end_time, m, b, F_max_0, F_max_max, v_max, 1)s</pre><p>The following plots display the response of the PID controllers for the 3 scenarios. Without uphill disturbance, with disturbance and manual tuning.</p><p><em>Originally published at </em><a href="https://www.linkedin.com/pulse/how-auto-tune-pid-controller-using-scipy-python-library-sarkar/?trackingId=zGBWOET%2FQ46fct%2Fb%2FL4Eng%3D%3D"><em>https://www.linkedin.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6dbdff288e45" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A simple guide to navigating global standards for ADAS verification]]></title>
            <link>https://medium.com/@animeshsarkar_18504/a-simple-guide-to-navigating-global-standards-for-adas-verification-1740180b15d0?source=rss-461633055ed9------2</link>
            <guid isPermaLink="false">https://medium.com/p/1740180b15d0</guid>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[automotive]]></category>
            <category><![CDATA[ncap]]></category>
            <category><![CDATA[autonomous-cars]]></category>
            <category><![CDATA[adas-market]]></category>
            <dc:creator><![CDATA[Animesh Sarkar]]></dc:creator>
            <pubDate>Sun, 16 Jul 2023 12:11:47 GMT</pubDate>
            <atom:updated>2023-07-16T12:11:47.330Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*AVumxPajpe7AavbzdrdEKA.jpeg" /><figcaption><a href="https://commons.wikimedia.org/wiki/File:ADAS_testing_at_IDIADA_Proving_Ground.jpg">https://commons.wikimedia.org/wiki/File:ADAS_testing_at_IDIADA_Proving_Ground.jpg</a></figcaption></figure><p>ADAS systems are some of the most sophisticated interfaces of humans and machines and these systems have emerged as crucial value addition to modern automotive software products. However, the effectiveness and reliability of such systems heavily rely on rigorous testing and adherence to standards.</p><p>There are several global organizations that are continuously defining and developing standards around these technologies. In this article, my goal is to shed some light on some of these ADAS safety standards and raise awareness about these frameworks for my fellow ADAS colleagues who contribute to developing and implementing safer ADAS tech.</p><h3>Organizations across the globe</h3><ol><li>NHTSA (National Highway Traffic Safety Administration)</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*OHZU_DvknA_mohDwatXFaw.png" /><figcaption><a href="https://www.nhtsa.gov/">https://www.nhtsa.gov/</a></figcaption></figure><p>NHTSA is a U.S. government agency responsible for regulating and defining standards for motor vehicles in the United States. They play a crucial role in the development of requirements and testing standards for ADAS systems. As a federal organization, NHTSA keeps track of crash data across the U.S. and keeps a check on automotive companies and their ADAS development process.</p><p>NHTSA has been working with a variety of stakeholders, including automotive companies, standards organizations, and researchers, to update standards and requirements for ADAS testing. In 2020, NHTSA launched the AV-TEST (Automated Vehicle Transparency and Engagement for Safe Testing) initiative, which makes data on ADAS testing by companies public. This data can help researchers and policymakers to collaborate and make informed decisions about the development and regulation of ADAS.</p><p>The agency is constantly trying to adapt the existing Federal Motor Vehicle Safety Standards (FMVSS) standards and make them more suitable for automated driving technologies.</p><p>2. Euro-NCAP (European New Car Assessment Programme)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J0yB7WksfMEGN5x3mW03kA.png" /><figcaption><a href="https://www.euroncap.com/en">https://www.euroncap.com/en</a></figcaption></figure><p>Euro NCAP is an independent vehicle safety assessment program based in Brussels, Belgium. The organization assigns ratings out of 5 stars to each new vehicle program launched in the EU. The ratings are determined from a series of vehicle tests, designed and carried out by Eu-NCAP.</p><p>The star rating awarded by Euro NCAP signifies both the vehicle’s performance in these rigorous tests and the extent of safety features accessible to consumers in Europe. With regard to driver assistance technology, the assessments encompass four critical categories: safety for adult occupants, safety for child occupants, safety for vulnerable road users, and the availability of safety assist features.</p><p>Automakers endeavor to equip their vehicles with various features and functionalities aimed at excelling in these categories and amassing points for a higher rating. Consequently, the testing procedures and standards established by Euro NCAP assume a pivotal role in serving as a benchmark during ADAS testing.</p><p>By adhering to Euro NCAP’s testing protocols and striving to meet their stringent criteria, manufacturers can not only enhance their vehicles’ safety performance but also demonstrate their commitment to providing cutting-edge ADAS technologies to European consumers. The influence of Euro NCAP extends beyond their evaluation process, driving the advancement and continuous improvement of ADAS technologies worldwide.</p><p>3. UNECE (United Nations Economic Commission for Europe) aka GSR</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/1*sY6MiSwO_ko8e5zw52_RRg.jpeg" /></figure><p>UNECE-GSR (General Safety Regulations) represents a crucial set of mandatory regulations encompassing vehicle safety requirements.</p><p>For a new vehicle platform to be introduced in the European market, it must undergo an official homologation release, obtaining the necessary approval from UNECE. These tests and standards outlined by the GSR serve as guiding principles for the design, development, and testing of various ADAS features.</p><p>In recent updates, the GSR has made it mandatory for vehicles to incorporate specific ADAS functionalities, including blind spot assist, drive drowsiness and alertness detection, intelligent speed assist, and moving off information system (MOIS). These requirements set a minimum standard for the performance metrics of these ADAS features, ensuring that vehicles sold in Europe provide enhanced safety and assistive capabilities to drivers.</p><p>By enforcing the GSR regulations, UNECE acts as a key driver for the adoption and integration of ADAS technologies in vehicles. Compliance with these standards not only facilitates market access but also inspires automakers to develop innovative and effective ADAS systems that contribute to safer and more secure mobility.</p><p>4. Other regional assessment programs</p><p>C-NCAP: Chinese NCAP is a Chinese car safety assessment program. It was formed in 2006 by China Automotive Technology. The program is primarily modeled after safety standards established by Euro NCAP, however, there are some differences in the testing parameters, and have a regional focus on Chinese automakers.</p><p>Global NCAP: Global NCAP serves as a platform for cooperation among new car assessment programs worldwide and promotes the universal adoption of the United nation most important motor vehicle safety standards worldwide. Car manufacturers from India send their cars to Global NCAP assessments.</p><p>NTC (Australia): The Australian government’s Department of Infrastructure, Transport, Regional Development, and Communications administers the Australian Design Rules (ADRs), which are national standards of vehicle safety. All though their main focus is on crash safety and emissions, they have been modeling their standards closely to EU-NCAP.</p><h3>International standards</h3><ol><li>SAE International:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8tzFexlvN64CDMoXCqnoTw.png" /></figure><p>The Society of Automotive Engineers (SAE) is a professional organization that develops standards for a wide range of industries, including automotive. SAE’s ADAS standards cover topics such as functional safety, performance testing, and test methods.</p><p>SAE J3016 defines the taxonomy of automated driving systems also known as the 5 levels of autonomy. In addition, SAE has also defined ADAS testing standards in the following areas under the following publications of standards.</p><ul><li>Functional Safety for automotive electronics (SAE J2944)</li><li>Performance testing of Automated driving systems (SAE J3017)</li><li>Guidelines for Safe On-Road Testing of SAE Level 3, 4, and 5 Prototype Automated Driving Systems(SAE J3018)</li></ul><p>2. ISO 26262 ASIL</p><p>ISO 26262 standards for automotive functional safety defines a risk classification system known as ASIL (automotive safety integrity level) of road vehicles.ISO 26262 is a derivative of IEC 61508.</p><p>There are four ASILs (Automotive Safety Integrity Level) identified by ISO 26262―A, B, C, and D. ASIL A represents the lowest degree and ASIL D represents the highest degree of automotive hazard.</p><p>These standards play a crucial role in designing safety-critical ADAS features as well as the necessary checks and test procedures for both ASIL and QM-level scenarios.</p><h3>Key considerations for ADAS V&amp;V</h3><ul><li>Use a variety of test methods: It is important to use a variety of test methods to ensure that the ADAS system is thoroughly tested. This includes using both simulation and real-world testing.</li><li>Involve multiple stakeholders: It is important to involve multiple stakeholders in the ADAS testing process. This includes the system developers, the vehicle manufacturers, third-party test agencies, and the regulatory agencies.</li><li>Use a risk-based approach: The ADAS testing process should be risk-based. This means that the most critical functions of the system should be tested more thoroughly than the less critical functions.</li><li>Data-based approach: Test methods should focus on the most critical failures from the field. using a data-driven approach would help narrow the focus on critical test methods. Data from the above organization or real-time customer fleet data shall be leveraged to improve system performance</li></ul><p>I hope this article shed some light on the various resources available out there to design test methods for adas systems. Nevertheless, it is vital to recognize that ADAS testing should not be confined solely to these standards. As technology evolves and new challenges arise, these standards must adapt and improve. Therefore, while they provide a solid foundation, they should be viewed as a reference point rather than the ultimate endpoint for testing and development.</p><h3>References:</h3><ul><li><a href="https://dewesoft.com/blog/adas-standards-and-adas-safety-protocols">https://dewesoft.com/blog/adas-standards-and-adas-safety-protocols</a></li><li><a href="https://www.federalregister.gov/documents/2020/12/03/2020-25930/framework-for-automated-driving-system-safety">https://www.federalregister.gov/documents/2020/12/03/2020-25930/framework-for-automated-driving-system-safety</a></li><li><a href="https://www.nhtsa.gov/technology-innovation/automated-vehicles-safety#nhtsa-in-action">https://www.nhtsa.gov/technology-innovation/automated-vehicles-safety#nhtsa-in-action</a></li><li><a href="https://en.wikipedia.org/wiki/Global_NCAP">https://en.wikipedia.org/wiki/Global_NCAP</a></li><li><a href="https://www.euroncap.com/en">https://www.euroncap.com/en</a></li><li><a href="https://www.nhtsa.gov/equipment/driver-assistance-technologies">https://www.nhtsa.gov/equipment/driver-assistance-technologies</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1740180b15d0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ASIL (Automotive Safety integrity levels) ratings simplified]]></title>
            <link>https://medium.com/@animeshsarkar_18504/asil-automotive-safety-integrity-levels-ratings-simplified-1b5331c7a6b1?source=rss-461633055ed9------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b5331c7a6b1</guid>
            <category><![CDATA[asıl]]></category>
            <category><![CDATA[automotive]]></category>
            <category><![CDATA[iso-26262]]></category>
            <category><![CDATA[functional-safety]]></category>
            <dc:creator><![CDATA[Animesh Sarkar]]></dc:creator>
            <pubDate>Sun, 18 Jun 2023 14:03:31 GMT</pubDate>
            <atom:updated>2023-06-18T14:03:31.838Z</atom:updated>
            <content:encoded><![CDATA[<p>If you work in automotive functional safety there is a high chance you have heard the term ASIL ratings at some point in time. Today let’s try to simplify what ASIL ratings are and how they are determined as a part of ISO 26262. If you are just beginning your journey in functional safety then I recommend a quick read to this other article I wrote on <a href="https://www.linkedin.com/posts/animesh-sarkar_functionalsafety-iso26262-adas-activity-6916501591244050432-KHTZ?utm_source=linkedin_share&amp;utm_medium=member_desktop_web">automotive functional safety</a>.</p><h3>What is ASIL and why do we need them?</h3><p>Your normal workflow for functional safety concepts will look something like this as shown below. The item definition defines the system or the array of systems to implement a function that becomes an input for the HARA (Hazard Analysis and Risk Assessment). HARA is typically completed using the help of feature/system experts and safety officers by defining all the possible potential failures and hazards. Each risk assessment then needs to be classified based on severity.</p><p>ASIL ratings are the means by which this severity classification is achieved. ASIL which stands for Automotive safety integrity levels is a risk classification scheme defined under ISO 26262 (functional safety for road vehicles). Typically there are 4 classes. ASIL A, B, C , D. D dictates the highest integrity and A being the lowest. Based on the ASIL rating a corresponding safety goal is defined. A risk item with ASIL D classification is more hazardous and will need more stringent safety goals as compared to ASIL A. There is a fifth classification called QM (quality management), which means if a risk is not high enough to require a dedicated safety goal. If a feature is classified as QM and since there are no dedicated safety goals then it is assumed that the risks will be mitigated during the normal quality assessment for the feature functionality.</p><h3>How to determine ASIL ratings?</h3><p>A combination of 3 factors determines the ASIL requirement. Severity — how bad are the safety consequences should a hazard take place. Exposure — the probability of occurrence for the given hazard and Controllability — how likely is the driver able to control the hazard scenario.</p><p>ASIL = Severity x (Exposure x Controllability)</p><p>ISO 26262 provides us with the following table to determine the ASIL rating based on the above 3 factors. As you can see the hazard with the highest severity rating is S3, with exposure rating E4, and with the most difficult controllability, C3 gives us the highest possible ASIL rating ASIL D. There are various methods by which experts can come up with the S, E and C classification but the more engineering approach is by using a fault tree analysis or FTA. Fault tree analysis is used for determining what are the causes of a particular event. Once you have identified each root cause for an event a corresponding S, E, and C rating can be calculated using a probability approach.</p><p>Once the S, E , C rating is identified the following table can be used to determine the ASIL rating.</p><h3>How to look at ASIL rating from a feature development point of view?</h3><p>You may ask can an entire feature/software/hardware can be classified with one ASIL rating? Well, not necessarily. Since ASIL ratings are applied with respect to a particular risk, safety officers need to go down several layers to determine which interfaces result in the particular safety risk.</p><p>To give an example let’s take the Cruise control system. In a cruise control system, there is a software component that determines the control force input to the engine and then there is an actuator controller which indeed applies the control to the throttle which will lead to acceleration. In this case, if the risk is acceleration above a certain threshold then the signal from the software component for the control force will classify as QM and the input to the actuators will be classified as ASIL C.</p><p>Summary</p><p>The goal of ISO 26262 is to “prevent harm”. ASIL ratings help us achieve a goal-based approach to developing a safety system. With ASIL ratings managing and tracking safety requirements becomes easier and helps in prioritizing and organizing safety goals.</p><p>Reference:</p><ol><li><a href="https://www.synopsys.com/automotive/what-is-asil.html#:~:text=Definition,functional%20safety%20of%20road%20vehicles">https://www.synopsys.com/automotive/what-is-asil.html#:~:text=Definition,functional safety of road vehicles</a>.</li><li><a href="https://en.wikipedia.org/wiki/Automotive_Safety_Integrity_Level">https://en.wikipedia.org/wiki/Automotive_Safety_Integrity_Level</a></li><li>Safety Analysis of a Cooperative Adaptive Cruise Control System, Guido Loupias</li></ol><p><em>Originally published at </em><a href="https://www.linkedin.com/pulse/asil-automotive-safety-integrity-levels-ratings-animesh-sarkar/?trackingId=3plg4NECSWuwPeYCOV6grA%3D%3D"><em>https://www.linkedin.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b5331c7a6b1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Navigating the Road Ahead: An Engineer’s Personal Experience with Udacity’s Self-Driving Car…]]></title>
            <link>https://medium.com/@animeshsarkar_18504/navigating-the-road-ahead-an-engineers-personal-experience-with-udacity-s-self-driving-car-80b1991cd9ab?source=rss-461633055ed9------2</link>
            <guid isPermaLink="false">https://medium.com/p/80b1991cd9ab</guid>
            <category><![CDATA[review]]></category>
            <category><![CDATA[udacity-nanodegree]]></category>
            <category><![CDATA[self-dr]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[Animesh Sarkar]]></dc:creator>
            <pubDate>Sun, 18 Jun 2023 14:01:25 GMT</pubDate>
            <atom:updated>2023-06-18T14:01:25.391Z</atom:updated>
            <content:encoded><![CDATA[<h3>Navigating the Road Ahead: An Engineer’s Personal Experience with Udacity’s Self-Driving Car Nanodegree Program</h3><p>Recently, I dedicated a significant portion of my free time to completing Udacity’s Self-driving Car Engineer Nanodegree program. In this article, I want to share my experience and candid evaluation of the course, as well as offer a glimpse of what to expect for those considering taking it. As an individual who works in the autonomous technology industry, I hope to provide valuable insights that can assist you in making an informed decision about whether this program aligns with your professional goals and aspirations</p><p>This Udacity program has been around for some time, I heard about it during my Master’s in 2017. However, the content and the projects have seen significant changes as autonomous vehicle technology is evolving. The current course content today is more suited to current methods used in the industry compared to what was offered a few years ago. Currently, Udacity partners with Waymo and Mercedes Benz to design the material. Students will be using Waymo’s open-source data set to work on the projects. The course is broken down just like a typical autonomous vehicle software stack. We start with computer vision and sensor fusion, followed by localization and planning, And finally control.</p><h3>Computer Vision</h3><p>The computer vision module focuses on the application of convoluted neural networks to perform object detection. I think compared to earlier versions of this course this module has seen more changes in the scope of the subjects. It starts with a theoretical overview of machine learning workflow. They spend some time talking about camera sensors and also expose students to some calibration exercises, image manipulation, and pixel-level transformation. This knowledge later plays a role in performing exploratory data analysis of the given data. Even if you don’t work on machine learning this knowledge will be valuable in developing a robust data pipeline in data engineering/analyst roles in this area.</p><p>Diving into hardcore ML topics we start with learning about popular models like linear regression, Gradient descent, and Stochastic Gradient descent, before settling on convolutional neural networks. for new students like me on ML, I like Udacity’s way of progressing through the various models without doing a deep dive into each model. They do a good job of explaining the limitations of feedforward NNs over CNNs. Throughout the module, students are exposed to various CNN architectures through reading assignments on research papers. Finally, we apply principles of transfer learning to use a pre-trained model such as RESNET50 on our waymo data set for the project.</p><p>This module takes a more wider approach to educate the student enough to start pursuing their own projects and go deeper into neural nets. I also think the course lacked some fundamental explanations while covering the mechanism for each architecture. But students have access to several research papers to deep dive.</p><h3>Sensor Fusion</h3><p>This module focuses on the sensor fusion of Lidar data and camera data. Since we are working with Waymo’s open source data the course spends some time understanding the lidar point cloud data structure along with some hardware understanding about the sensor itself. Building on the knowledge from the previous module this time we use a complex YOLO to detect objects within the lidar point cloud system.</p><p>But the most important topic covered was the implementation of Kalman filters and extended Kalman filters. The portion for the Kalman filter was taught by Sebastian Thrun and it is probably the easiest explanation to understand this concept (FYI this part is free on youtube). Also, another great <a href="https://www.bzarg.com/p/how-a-kalman-filter-works-in-pictures/">blog</a> here explains Kalman filters in a very fun way. The key learning was breaking down the entire sensor fusion process and implementation.</p><p>We start with the process for track initialization and update mechanisms. Then load the various measurements in this case camera and lidar to perform the prediction step of EKF. Then we look at the measurement available for the respective sensor, which is further transformed into the relevant coordinate system to used for the measurement step. For the track update mechanism, we look at an association method called simple nearest neighbor (SNN) we further reduce the computation complexity by adding rules for gating.</p><p>I found this module very close to the framework followed in the industry. I think Udacity shows a very practical way to code the implementation of EKF method which is a great transferable experience to have in this field.</p><h3>Localization</h3><p>The end goal of this module is to understand the concepts of localization and attempt to localize a vehicle using a point cloud 3d map of an environment on the Carla simulator and the onboard lidar sensor available on the vehicle. This module was very math intensive as they dived into the concepts of Baye’s theorem or Baye’s filter which was further simplified using Markov’s theorem. Once a recursive structure of all the calculations is established then we have a set of formulas ready to be coded in C++.</p><p>We then develop a scan matching algorithm that will scan the 2 lidar points one from the on-board sensor and the other from the pre-mapped environment to determine the relative translation w.r.t the previous position. To do this we are shown two methods, Iterative closest point (ICP) and Normal distribution transform (NDT). Both the methods take different approaches and the corresponding advantages and disadvantages are proved with the project code.</p><p>The project was really fun as this is the first time we utilize the Carla simulator which is a very common tool to train and develop projects on autonomous tech. Also, I like that Udacity covers this module in C++ which is the commonly used tool for such projects and bring students closer to reality of production software development.</p><h3>Planning</h3><p>Path planning is a critical component in AV tech stack and it essentially determines how to best and safely manuever in a driving scenario. Path planning algorithms can be classified into 2 parts, reactive or deliberative. Reactive algorithm generates a path based on current sensor data and deliberative algorithm pre -defines a path based on certain environment. In this course students see a glimpse of both the methods to incorporate into the algorithm. We try to solve this problem using a finite state machine and a corresponding cost function.</p><p>In order to generate a trajectory we learn about algorithms such as A* and hybrid A*. A* is a good algorithm which can operate in an unstructured enviroment like a parking lot or an open warehouse (also this is what is built inside your robotic vaccum cleaner). However, for autonomous vehicles we need a structured environment so we learn about a polynomial generation technique based on principles of jerk minimization. With this method we can apply constraints around speed, steering angle and also road infrastructure laws like stop signs, lane lines etc.</p><p>The project was also another oppurtunity to work with Carla simulator to generate several trajectories and then choosing the trajectories based the minimum cost function. I think this a great module to get started on motion planning and path planning and the course sets you up with a good foundation to pursue.</p><h3>Control</h3><p>Finally, we come to the last step of AV stack that is vehicle control. My background is in controls so my personal opinion was that this module barely scratched the controls world. However, the key point was to learn PID controller and tune the controller in Carla simulator. PID is still quite popular and elegant solution applied in ADAS tech. However, the industry is bound to move to better controllers which use predictive or nonlinear methods for some of the complex applications. The one interesting topic covered was the twiddle algorithm which was new for me. Its a simple algorithm to find PID gains automatically.</p><h3>Key takeaway</h3><ul><li>The course has intensive exercises and help you gain first hand experience on code implemenation for industry standard datasets</li><li>As an ADAS engineer, taking this course has provided me with a deeper understanding of key concepts and technologies in the field, particularly in the areas of sensor fusion and localization. I would highly recommend this course to anyone working in the automotive or ADAS industry, as it not only helped me better understand my current role, but also opened up new opportunities for me to explore within the field.</li><li>While some of the information covered in this course can be found for free on the internet, the real value of the course lies in its structure and the support provided by Udacity. The course’s organization and timeline helped me to stay disciplined and motivated, and the feedback and guidance from the instructor and Udacity’s network of experts was invaluable. Additionally, the cost structure of the course, with a 15 week access, acted as a motivator for me to complete the course in a timely manner</li></ul><p>I hope my review of this course has been helpful in your decision-making process. Taking this course has been a valuable experience for me and I am confident that it will be for you too. If you decide to take the course, I would love to hear about your experience and how it has helped you in your goals towards building autonomous tech. Feel free to reach out to me via LinkedIn or leave a comment below. Let’s connect and continue the conversation.</p><p><em>Originally published at </em><a href="https://www.linkedin.com/pulse/navigating-road-ahead-engineers-personal-experience-udacitys-sarkar/?trackingId=NlqpxO6LQ5O0axvOYP3I0A%3D%3D"><em>https://www.linkedin.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=80b1991cd9ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beginner-friendly guide to Automotive Functional Safety]]></title>
            <link>https://medium.com/@animeshsarkar_18504/beginner-friendly-guide-to-automotive-functional-safety-d71e66ce16ff?source=rss-461633055ed9------2</link>
            <guid isPermaLink="false">https://medium.com/p/d71e66ce16ff</guid>
            <category><![CDATA[adas-market]]></category>
            <category><![CDATA[automated-driving]]></category>
            <category><![CDATA[automotive]]></category>
            <category><![CDATA[functional-safety]]></category>
            <dc:creator><![CDATA[Animesh Sarkar]]></dc:creator>
            <pubDate>Sat, 15 Apr 2023 16:16:00 GMT</pubDate>
            <atom:updated>2023-04-15T16:16:00.203Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/496/1*rf9sdIFeG01zZC5zixiJpQ.png" /></figure><p>I have spent close to 3 professional years in the ADAS world and there is one term we ADAS folks love to throw around FuSa (Functional safety). I always had a high-level knowledge of what it stood for but there was never an opportunity for me to deep dive into this topic. Until recently, when I changed jobs to become a function developer for ADAS systems, that’s when I realized how deeply FuSA governs how and what functionalities we can produce out of an ADAS feature. I wouldn’t call myself an expert yet but I think I understand enough to make decisions at the logical level when I’m writing code for my feature and understand the impact at the FuSa level. This is part 1 of a series of articles on Automotive functional safety that I hope to write so that I can personally improve my knowledge in this domain.</p><h3>What is functional safety and why do we care?</h3><p>Plain and simple our world is run by software and software can have bugs (or features on how you see it) that can cause physical harm or create a causal chain that can lead to something bad for the user or the environment of the system. When it comes to cars an average car has at least 15–20 ECUs and with the standardization of ADAS features the number has gone close to 3 digits. This means there are greater possibilities of malfunction at the hardware or software level.</p><p>Hence, we need functional safety, a set of guidelines that can help us create safer software and hardware. Functional safety helps us reduce the risks to a level where society finds it acceptable should something go wrong with the electronics or the software.</p><p>In the automotive world, this is done by the ISO26262 standard. ISO26262 (titled “Road Vehicles — Functional safety”) is an international safety standard for electrical and electronic systems that are installed in a production road vehicle.</p><h3>ISO 26262 at a glance</h3><p>ISO 26262 gives us a standard structure that consists of 12 parts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/299/1*ixMQluK2LPmwoajygG4Mfw.png" /><figcaption>ISO26262 at a glance</figcaption></figure><p>let’s briefly talk about each of these parts and the goal behind each part. For better understanding let’s take a product like the Cruise control system in a vehicle that will be our example subject of functional safety.</p><p>Part1: Vocabulary</p><p>Here we define a common language of the software product against which we want to develop our safety goals. Typically there is a glossary of terms and definitions. Example: Cruise control set speed- the desired speed set by the driver for the cruise control system to achieve and maintain.</p><p>We also establish the meaning of what constitutes fault, error, and failure. Example: Fault = incorrect measure of vehicle velocity. Error = incorrect speed error measured for the controller. Failure = unintended acceleration by the propulsion system.</p><h3>Part 2: Management of Functional safety</h3><p>In this part, the overall management of the functional safety of a product is defined. This is mainly done at 3 levels_ Organizational level, the project level, and the time after the production level. The main goal of this part is to establish a safety culture in a company. This is usually done by identifying the responsible teams and how they can contribute to the defined processes to achieve functional safety</p><p>The most important role is that of a safety officer whose job is to ensure the defined processes are being followed by all stakeholders and guide them at all the 3 levels.</p><p>Example: to give you a taste of this part using our Cruise control example let’s define a process for our safety goals. Let’s say there is an architecture change among the components that impact cruise control. In this case, an impact analysis needs to be done and shared with the safety officer who would then analyze the change impact on the various safety goals defined for Cruise control. this becomes part of the process.</p><h3>Part 3–7 Safety Life Cycle</h3><p>This part follows the framework of system engineering V. Starting from the concept phase and going all the way to production.</p><p>At the concept phase, an item definition that consists of high-level system requirements is established. For example, the cruise control system should always activate when the vehicle speed is above a certain defined speed.</p><p>A detailed hazard analysis also called HARA is established. Correspondingly a safety goal is defined for each hazard. The safety goals inherit the ASIL classification (see part 9).</p><p>There are specific details related to product development, hardware, and software development that fall under this safety life cycle. we shall cover them in future articles.</p><h3>Part 8: Supporting processes</h3><p>Once we know our safety goals then we look down upon what other processes can be used to ensure the safety goals are met. This is where a lot of supporting standards for automotive software development come into action. once such standard is the automotive SPICE process that ensures the quality of software when certain guidelines are followed.</p><h3>Part 9: Analysis</h3><p>In this part, we analyze all the possible hazards from the HARA and their corresponding safety goals. We try to map all the causes and effects that could occur during a possible hazard and develop mechanisms to safeguard them. For example: if there is a fault in the propulsion system interface then cruise control should stop operating and be denied for the rest of the drive cycle.</p><p>The findings of this analysis part are feedback to parts 5 and 6 during the product development.</p><p>One thing that helps us prioritize among the Hazards and safety goals is the ASIL rating (Automotive safety integrity levels). These levels are comprehensively defined by factoring in severity, exposure, and controllability of the hazard. The higher the rating (ASIL D) the higher the severity of harm.</p><h3>Part 10: Guidelines</h3><p>This includes any technical documentation for the underlying systems just for better information and understanding.</p><h3>Part 11: Semiconductors</h3><p>This part has specific guidelines for semiconductors and microcontrollers that are flashed with the automotive software in question.</p><h3>Part: 12 Motorcycles</h3><p>This part includes specific guidelines for motorcycles.</p><h3>Summary</h3><p>Functional safety provides a necessary structure for automotive developers to design systems so that they can minimize the harm to the driver and other road users caused due to malfunctioning electronics/software in the vehicle.</p><p>I hope the above high-level description has left you little more informed about automotive functional safety and will help you approach problems related to FuSa with a slightly better understanding.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d71e66ce16ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>