<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mohammad Rezwan Khan</title>
    <description>The latest articles on DEV Community by Mohammad Rezwan Khan (@mohammadrezwankhan).</description>
    <link>https://dev.to/mohammadrezwankhan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4071909%2F0943d6cd-9b0c-4753-a2a0-c1fa6c413b4d.png</url>
      <title>DEV Community: Mohammad Rezwan Khan</title>
      <link>https://dev.to/mohammadrezwankhan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mohammadrezwankhan"/>
    <language>en</language>
    <item>
      <title>What a 5 MWh battery buys a 50 MW load: a reproducible outage example</title>
      <dc:creator>Mohammad Rezwan Khan</dc:creator>
      <pubDate>Wed, 23 Sep 2026 08:55:00 +0000</pubDate>
      <link>https://dev.to/mohammadrezwankhan/what-a-5-mwh-battery-buys-a-50-mw-load-a-reproducible-outage-example-2jo0</link>
      <guid>https://dev.to/mohammadrezwankhan/what-a-5-mwh-battery-buys-a-50-mw-load-a-reproducible-outage-example-2jo0</guid>
      <description>&lt;p&gt;A 5 MWh battery sounds substantial. At a constant 50 MW electrical load, however, the useful question is: &lt;strong&gt;how many seconds can it bridge after the utility disappears?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here is a reproducible example from Datacenter Twin Lab, an early-alpha power-continuity simulator I maintain with Codex assistance. The example makes the energy accounting visible before adding more complicated failure scenarios.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with the result
&lt;/h2&gt;

&lt;p&gt;Assume 5,000 kWh of stored battery energy, a 50,000 kW aggregate IT load, 0.90 discharge efficiency, and 0.95 distribution efficiency. The generator cannot start.&lt;/p&gt;

&lt;p&gt;the energy delivered to IT = 5,000 × 0.90 × 0.95 = 4,275 kWh&lt;/p&gt;

&lt;p&gt;ride-through = 4,275 / 50,000 × 3,600 = &lt;strong&gt;307.8 seconds&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Utility supply fails at 300 seconds elapsed. The battery therefore depletes at &lt;strong&gt;607.8 seconds elapsed&lt;/strong&gt;, not 307.8 seconds elapsed. Utility restoration at 900 seconds leaves a &lt;strong&gt;292.2-second service gap&lt;/strong&gt; in this simplified case.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Quantity&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Stored reserve&lt;/td&gt;
&lt;td&gt;5,000 kWh&lt;/td&gt;
&lt;td&gt;Energy before conversion losses&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Energy delivered to IT&lt;/td&gt;
&lt;td&gt;4,275 kWh&lt;/td&gt;
&lt;td&gt;Stored reserve multiplied by both efficiencies&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ride-through&lt;/td&gt;
&lt;td&gt;307.8 s&lt;/td&gt;
&lt;td&gt;Time supported after the outage&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Depletion timestamp&lt;/td&gt;
&lt;td&gt;607.8 s&lt;/td&gt;
&lt;td&gt;Time measured from the simulation start&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Unserved IT energy&lt;/td&gt;
&lt;td&gt;4,058.33… kWh&lt;/td&gt;
&lt;td&gt;50,000 × 292.2 / 3,600&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This is an aggregate electrical-load example. It does not predict whether a GPU job finishes or whether a regional grid can support a new datacenter.&lt;/p&gt;

&lt;h2&gt;
  
  
  Inspect the model, not just the number
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3e5hlh0kjcs5phw7tmwk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3e5hlh0kjcs5phw7tmwk.png" alt="Actual Datacenter Twin Lab dashboard showing the 1 MW generator-failure reference case, supply paths, and depletion at 607.8 seconds" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Actual screenshot of the preserved 0.3.0a0 interface and its 1 MW / 100 kWh reference fixture. It predates the current browser entry. The 50 MW / 5 MWh example scales demand and reserve by 50, preserving the same ride-through duration. The cover is conceptual project artwork, not a facility photograph or engineering single-line diagram.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A small continuity model needs more than energy divided by power. It needs to track &lt;strong&gt;when&lt;/strong&gt; sources fail, whether the generator becomes available, which electrical paths survive, conversion losses, and the point where stored energy runs out. The useful output is a timeline plus an energy ledger whose inputs can be inspected.&lt;/p&gt;

&lt;p&gt;For example, a surviving path rated at 700 kW gross delivers only 665 kW after a 0.95 distribution efficiency. Against a 1,000 kW IT request, that leaves a 335 kW shortfall. Over ten minutes, the corresponding unserved energy is 55.8333… kWh. Power and energy answer different questions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reproduce a smaller case
&lt;/h2&gt;

&lt;p&gt;With Git and Python 3.12 or later, this source revision provides a fixed reference:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/mohammadrezwankhan/datacenter-twin-lab.git
&lt;span class="nb"&gt;cd &lt;/span&gt;datacenter-twin-lab
git checkout d4b736e4d930043c5edae988a8e8b1f4b7d40a53
python &lt;span class="nt"&gt;-m&lt;/span&gt; datacenter_twin simulate &lt;span class="nt"&gt;--preset&lt;/span&gt; generator_failure
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command runs the 1 MW / 100 kWh reference case. Expected depletion is 607.8 seconds elapsed. It uses the standard-library core from the checkout; the optional local API and dashboard have additional dependencies documented in the repository.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://mohammadrezwankhan.github.io/datacenter-twin-lab/?lesson=ride-through" rel="noopener noreferrer"&gt;browser version&lt;/a&gt; starts with JavaScript arithmetic. &lt;strong&gt;Verify against Python&lt;/strong&gt; loads the reference engine on demand. Browser/native equality checks test software consistency; they are not proof of physical calibration.&lt;/p&gt;

&lt;h2&gt;
  
  
  One input distinction that matters
&lt;/h2&gt;

&lt;p&gt;Lesson 3 disables charging in both its 100 and 50 kWh cases. Halving stored energy halves ride-through from 307.8 to 153.9 seconds. The elapsed depletion timestamp moves from 607.8 to 453.9 seconds; that timestamp does not halve because both outages begin at 300 seconds.&lt;/p&gt;

&lt;p&gt;The CLI generator-failure preset permits charging before the outage. If its initial reserve is reduced to 50 kWh, pre-outage charging changes the energy available at outage onset. Comparing that run with the charging-disabled lesson without checking inputs would produce a misleading disagreement.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this approach helps—and where it stops
&lt;/h2&gt;

&lt;p&gt;The current model covers utility loss and restoration, generator delay or failure, finite storage, electrical path capacity, and shared failure domains. Deterministic JSON results and Markdown/HTML reports make a run inspectable.&lt;/p&gt;

&lt;p&gt;These are synthetic teaching fixtures. The project does not model cooling transients, network congestion, workload scheduling, live telemetry, protection coordination, AC transients, or facility-certified uptime. A real equipment-sizing or safety decision needs a different validation process and site evidence.&lt;/p&gt;

&lt;p&gt;The source and assumptions are available in the &lt;a href="https://github.com/mohammadrezwankhan/datacenter-twin-lab" rel="noopener noreferrer"&gt;repository&lt;/a&gt;. Independent external technical review has not yet been obtained. A useful review starts with one reconstructed calculation and a precise description of any mismatch—not a broad claim that the entire model is validated.&lt;/p&gt;

</description>
      <category>python</category>
    </item>
    <item>
      <title>When does a second RC branch earn its place in a battery model?</title>
      <dc:creator>Mohammad Rezwan Khan</dc:creator>
      <pubDate>Mon, 10 Aug 2026 20:17:25 +0000</pubDate>
      <link>https://dev.to/mohammadrezwankhan/when-does-a-second-rc-branch-earn-its-place-in-a-battery-model-5f3e</link>
      <guid>https://dev.to/mohammadrezwankhan/when-does-a-second-rc-branch-earn-its-place-in-a-battery-model-5f3e</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftd9mimy6m3omys5mmf5e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftd9mimy6m3omys5mmf5e.png" alt="MATLAB two-RC battery identification response" width="800" height="603"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Adding states to a model is easy. Showing that they explain repeatable behavior outside the calibration record is harder—and much more useful.&lt;/p&gt;

&lt;p&gt;A one-RC equivalent-circuit battery model represents polarization with one dynamic voltage state. A two-RC model separates that response into fast and slow branches:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dV_fast/dt = -V_fast/(R_fast C_fast) + I/C_fast
dV_slow/dt = -V_slow/(R_slow C_slow) + I/C_slow
V_terminal = OCV(SOC) - I R0 - V_fast - V_slow
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That extra branch is not automatically an improvement. It introduces another resistance, capacitance, and state, which can increase parameter correlation and make identification fragile. The second branch earns its place only when the data expose two distinct recovery scales and the fitted behavior survives a waveform that was not used for calibration.&lt;/p&gt;

&lt;h2&gt;
  
  
  A small held-out test
&lt;/h2&gt;

&lt;p&gt;I maintain an open MATLAB example that fits positive two-RC parameters to a synthetic voltage record, then evaluates the fitted model on a separate pulse profile.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Quantity&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Calibration RMSE&lt;/td&gt;
&lt;td&gt;0.401 mV&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Held-out RMSE&lt;/td&gt;
&lt;td&gt;0.440 mV&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Estimated fast time constant&lt;/td&gt;
&lt;td&gt;2.01 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Estimated slow time constant&lt;/td&gt;
&lt;td&gt;33.88 s&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The close errors suggest that the two fitted recovery scales are not limited to the calibration waveform in this synthetic benchmark. They do &lt;strong&gt;not&lt;/strong&gt; establish that the parameters describe a physical commercial cell.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the split matters
&lt;/h2&gt;

&lt;p&gt;A low calibration error can hide several failure modes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the optimizer may have learned one particular current waveform;&lt;/li&gt;
&lt;li&gt;two parameter combinations may produce nearly identical calibration voltage;&lt;/li&gt;
&lt;li&gt;the OCV-SOC curve may absorb error that belongs to polarization dynamics;&lt;/li&gt;
&lt;li&gt;the pulse duration may be too short to identify the slow branch;&lt;/li&gt;
&lt;li&gt;sensor noise or preprocessing may dominate millivolt-scale differences.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A held-out pulse does not solve every identification problem, but it asks a better question: does the fitted structure retain useful predictive behavior when the excitation changes?&lt;/p&gt;

&lt;h2&gt;
  
  
  Reproduce the check
&lt;/h2&gt;

&lt;p&gt;The example is deliberately small and inspectable. From the repository root:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight matlab"&gt;&lt;code&gt;&lt;span class="nb"&gt;addpath&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'examples'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;check_battery_2rc_fit&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The runnable files, assumptions, and expected output are in the &lt;a href="https://github.com/mohammadrezwankhan/matlab-simulink-energy-lab/tree/main/examples/battery-2rc-model?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=starstruck&amp;amp;utm_content=devto_battery_2rc_holdout" rel="noopener noreferrer"&gt;MATLAB two-RC model and identification example&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The implementation keeps resistance and capacitance positive, reports the two time constants explicitly, and separates calibration from validation output. A no-plot check makes the numerical behavior reproducible in a terminal or CI job.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I would require for measured-cell use
&lt;/h2&gt;

&lt;p&gt;Replacing the synthetic record is more than swapping a CSV file. A defensible measured workflow should document:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;cell chemistry, capacity, temperature, age, and initial SOC;&lt;/li&gt;
&lt;li&gt;current sign convention, sampling, synchronization, and sensor uncertainty;&lt;/li&gt;
&lt;li&gt;an independently estimated OCV-SOC relationship;&lt;/li&gt;
&lt;li&gt;separate calibration and held-out current profiles;&lt;/li&gt;
&lt;li&gt;parameter sensitivity or confidence information;&lt;/li&gt;
&lt;li&gt;residuals across SOC and temperature, not only one aggregate RMSE;&lt;/li&gt;
&lt;li&gt;a same-data comparison against the simpler one-RC baseline.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The decision rule should be practical: retain the second branch only if its held-out residual improvement matters for the intended estimator, controller, or teaching objective and its parameters remain stable enough to interpret.&lt;/p&gt;

&lt;h2&gt;
  
  
  The useful question
&lt;/h2&gt;

&lt;p&gt;For people who identify equivalent-circuit models from pulse tests: how do you choose pulse and rest durations that expose a slow branch without making the fit ill-conditioned?&lt;/p&gt;

&lt;p&gt;Disclosure: I maintain the linked repository. This article was prepared with AI assistance and reviewed against the repository's documented equations, outputs, and limitations.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>tutorial</category>
      <category>github</category>
      <category>science</category>
    </item>
    <item>
      <title>Hello DEV: Building Safer, Smarter Battery Systems</title>
      <dc:creator>Mohammad Rezwan Khan</dc:creator>
      <pubDate>Mon, 10 Aug 2026 19:29:28 +0000</pubDate>
      <link>https://dev.to/mohammadrezwankhan/hello-dev-building-safer-smarter-battery-systems-b73</link>
      <guid>https://dev.to/mohammadrezwankhan/hello-dev-building-safer-smarter-battery-systems-b73</guid>
      <description>&lt;p&gt;Hello DEV Community! 👋&lt;/p&gt;

&lt;p&gt;I’m Mohammad Rezwan Khan, an Electrical R&amp;amp;D Engineer and PhD focused on battery thermal management systems (BTMS), lithium-ion battery safety and efficiency, and battery energy storage systems (BESS).&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I joined
&lt;/h2&gt;

&lt;p&gt;Engineering gets better when ideas move between disciplines. Battery challenges sit at the intersection of electrical engineering, thermal science, controls, data, and software. I joined DEV to share practical lessons from that intersection and learn from builders working across the stack.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I care about
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Safer lithium-ion systems&lt;/li&gt;
&lt;li&gt;Smarter thermal management&lt;/li&gt;
&lt;li&gt;Reliable, efficient energy storage&lt;/li&gt;
&lt;li&gt;Clear engineering models and workflows&lt;/li&gt;
&lt;li&gt;AI-assisted tools that help engineers reason and build faster&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I’m especially interested in how simulation, data analysis, and automation can shorten the path from an engineering question to a trustworthy answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I hope to share
&lt;/h2&gt;

&lt;p&gt;I plan to write about battery-system engineering, BTMS, safety, BESS, modeling, and the tools that make technical R&amp;amp;D more effective. My goal is to keep posts practical, understandable, and useful to both specialists and curious developers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let’s connect
&lt;/h2&gt;

&lt;p&gt;If you work on batteries, energy storage, embedded systems, modeling, AI-assisted engineering, or adjacent fields, say hello. I’d love to learn what you’re building.&lt;/p&gt;

&lt;p&gt;What is one engineering challenge you’re excited to solve right now?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>career</category>
      <category>productivity</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
