Skip to content

Commit

Permalink
Improved week 5 blog.
Browse files Browse the repository at this point in the history
  • Loading branch information
abhiphile committed Jul 9, 2024
1 parent af9c7fb commit 1f5a162
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 25 deletions.
Binary file added src/assets/pictures/pid-controller.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 15 additions & 17 deletions src/pages/Week5.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ import Anchors from '../assets/Anchors'
import { Divider, Typography } from 'antd';
import Footer from '../assets/Footer';
import { FaCodePullRequest } from 'react-icons/fa6';
import 'katex/dist/katex.min.css';
import { InlineMath, BlockMath } from 'react-katex';
const { Title, Paragraph } = Typography;

const Week4 = () => {
const Week5 = () => {
return (
<>
<Navbar />
Expand All @@ -32,19 +30,19 @@ const Week4 = () => {
<h2>Enhancing Test Coverage for State Space Methods</h2>
<p>The following <code>StateSpace</code> methods were tested using symbolic matrices:</p>
<ul>
<li><code>num_inputs</code></li>
<li><code>num_outputs</code></li>
<li><code>num_states</code></li>
<li><code>state_matrix</code></li>
<li><code>output_matrix</code></li>
<li><code>input_matrix</code></li>
<li><code>feedforward_matrix</code></li>
<li><code>observablity_matrix()</code></li>
<li><code>observable_subspace()</code></li>
<li><code>controllability_matrix()</code></li>
<li><code>controllable_subspace()</code></li>
<li><code>append()</code></li>
<li><code>_eval_rewrite_as_TransferFunction()</code></li>
<li><code>num_inputs</code></li>
<li><code>num_outputs</code></li>
<li><code>num_states</code></li>
<li><code>state_matrix</code></li>
<li><code>output_matrix</code></li>
<li><code>input_matrix</code></li>
<li><code>feedforward_matrix</code></li>
<li><code>observablity_matrix()</code></li>
<li><code>observable_subspace()</code></li>
<li><code>controllability_matrix()</code></li>
<li><code>controllable_subspace()</code></li>
<li><code>append()</code></li>
<li><code>_eval_rewrite_as_TransferFunction()</code></li>
</ul>
<p>These tests ensure that the <code>StateSpace</code> methods handle symbolic matrices accurately and efficiently, contributing to the robustness of the symbolic computation capabilities in SymPy.</p>
</Paragraph>
Expand All @@ -70,4 +68,4 @@ const Week4 = () => {
)
}

export default Week4
export default Week5
66 changes: 58 additions & 8 deletions src/pages/Week6.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import React from 'react'
import Navbar from '../Navbar'
import Anchors from '../assets/Anchors'
import { Divider, Typography } from 'antd';
const { Title, Paragraph, Text, Link } = Typography;
import { Divider, Image, Typography } from 'antd';
import Footer from '../assets/Footer';
import { FaCodePullRequest } from 'react-icons/fa6';
const { Title, Paragraph } = Typography;

const Week6 = () => {
const Week5 = () => {
return (
<>
<Navbar />
Expand All @@ -13,21 +15,69 @@ const Week6 = () => {
<Anchors />
</div>
<div className="col m-2">
<div className="m-2 border rounded p-2">
<div className="m-2 border rounded p-4">
<Typography>
<Title>
This is the title !
Week 5: Added PIDController class to control module and a method to calculate the bandwidth of <code>TransferFunction</code>.
</Title>
<Paragraph className='par'>
This is par
During the fifth week of my Google Summer of Code (GSoC) journey, I introduced significant enhancements to the control module in SymPy. This week’s work included the addition of a new class for PID controllers and a method to compute the bandwidth of transfer functions.
<p>PID Controller:</p>
<Image></Image>
<code>PIDController</code> is a class designed to facilitate the creation and manipulation of PID controllers, which are essential components in control systems. The parameters for the PID controller include:
<ul>
<li><code>kp</code>: Proportional gain (defaults to 0 if not provided).</li>
<li><code>ki</code>: Integral gain (defaults to 0 if not provided).</li>
<li><code>kd</code>: Derivative gain (defaults to 0 if not provided).</li>
<li><code>tf</code>: Derivative filter time constant (defaults to 0 if not provided).</li>
<li><code>var</code>: The complex frequency variable (defaults to <code>s</code> if not provided).</li>
</ul>
<p>Bandwidth Calculation:</p>
A new method, <code>bandwidth</code>, has been added to the <code>TransferFunction</code> class. This method calculates the bandwidth of a given transfer function, providing a valuable tool for analyzing the frequency response of control systems.
</Paragraph>
<Title>
Implementation
</Title>
<Paragraph className='par'>
<h2>Enhancements in the Control Module</h2>
<p>The following features were implemented and tested:</p>
<ul>
<li>
<strong>PIDController Class:</strong>
<ul>
<li>Introduced to allow for the creation of PID controllers with customizable parameters.</li>
<li>Supports proportional, integral, and derivative gains, as well as a derivative filter time constant.</li>
</ul>
</li>
<li>
<strong>Bandwidth Calculation:</strong>
<ul>
<li>Added <code>bandwidth</code> method to the <code>TransferFunction</code> class.</li>
<li>Enables the calculation of the bandwidth of transfer functions, aiding in the analysis of control systems.</li>
</ul>
</li>
</ul>
<p>These enhancements are aimed at improving the functionality and analysis capabilities of the control module in SymPy, making it more robust and user-friendly.</p>
</Paragraph>
<Title>
Pull Requests
</Title>
<Paragraph className='par'>
<a href='https://github.com/sympy/sympy/pull/26781' className='text-success'><FaCodePullRequest /> (Open) Added PIDController class to control module and a method to calculate the bandwidth of TransferFunction.</a>
<div className='gap-3'>
<Divider />
</div>
Abhishek Kumar
<br />
GSoC Contributor
</Paragraph>
</Typography>
</div>
</div>
<Footer />
</div>

</>
)
}

export default Week6
export default Week5

0 comments on commit 1f5a162

Please sign in to comment.