You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/pages/Week4.jsx
+69-6Lines changed: 69 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,15 @@ import React from 'react'
2
2
importNavbarfrom'../Navbar'
3
3
importAnchorsfrom'../assets/Anchors'
4
4
import{Divider,Typography}from'antd';
5
-
const{ Title, Paragraph, Text, Link }=Typography;
5
+
importFooterfrom'../assets/Footer';
6
+
import{FaCodePullRequest}from'react-icons/fa6';
7
+
import'katex/dist/katex.min.css';
8
+
import{InlineMath,BlockMath}from'react-katex';
9
+
const{ Title, Paragraph}=Typography;
6
10
7
11
constWeek4=()=>{
12
+
conststateEquation=`\\dot{x}(t) = A x(t) + B u(t)`;
13
+
constoutputEquation=`y(t) = C x(t) + D u(t)`;
8
14
return(
9
15
<>
10
16
<Navbar/>
@@ -13,20 +19,77 @@ const Week4 = () => {
13
19
<Anchors/>
14
20
</div>
15
21
<divclassName="col m-2">
16
-
<divclassName="m-2 border rounded p-2">
22
+
<divclassName="m-2 border rounded p-4">
17
23
<Typography>
18
24
<Title>
19
-
This is the title !
25
+
Week 3 : Adding support of symbolic matrices to <code>dsolve()</code> in StateSpace.
20
26
</Title>
21
27
<ParagraphclassName='par'>
22
-
This is par
28
+
During the fourth week of my Google Summer of Code (GSOC) journey, In this week I worked on finding symbolic solutions of StateSpace equations.
29
+
<p>State Equation:</p>
30
+
<BlockMathmath={stateEquation}/>
31
+
<p>Output Equation:</p>
32
+
<BlockMathmath={outputEquation}/>
33
+
</Paragraph>
34
+
<Title>
35
+
Implementation
36
+
</Title>
37
+
<ParagraphclassName='par'>
38
+
<h2>Solving State Space Equations in SymPy</h2>
39
+
<p>The <code>dsolve</code> method in SymPy solves state space equations of the form:</p>
40
+
41
+
<BlockMathmath={outputEquation}/>
42
+
<p>Here's a step-by-step breakdown of the <code>dsolve</code> method:</p>
43
+
<ul>
44
+
<li>
45
+
<strong>Validate Input Parameters:</strong>
46
+
<ul>
47
+
<li>Check if <code>var</code> is a Symbol.</li>
48
+
<li>Set default <code>initial_conditions</code> and <code>input_vector</code> if not provided.</li>
49
+
<li>Validate the dimensions of <code>initial_conditions</code> and <code>input_vector</code>.</li>
50
+
</ul>
51
+
</li>
52
+
<li>
53
+
<strong>Solve the State Equation:</strong>
54
+
<ul>
55
+
<li>Use <code>linodesolve</code> to solve the state equation <InlineMathmath={outputEquation}/>.</li>
56
+
<li>Convert the solution to a matrix form.</li>
57
+
</ul>
58
+
</li>
59
+
<li>
60
+
<strong>Apply Initial Conditions:</strong>
61
+
<ul>
62
+
<li>Evaluate the solution at <code>t = 0</code>.</li>
63
+
<li>Identify and solve for the dummy symbols representing initial conditions.</li>
64
+
<li>Replace dummy symbols in the solution with solved values.</li>
65
+
</ul>
66
+
</li>
67
+
<li>
68
+
<strong>Compute Output Vector:</strong>
69
+
<ul>
70
+
<li>Compute the output vector <code>y</code> using the state vector solution and the input vector.</li>
71
+
</ul>
72
+
</li>
73
+
</ul>
74
+
<p>This method ensures accurate solutions to state space problems, handling symbolic matrices efficiently.</p>
75
+
</Paragraph>
76
+
<Title>
77
+
Pull Requests
78
+
</Title>
79
+
<ParagraphclassName='par'>
80
+
<ahref='https://github.com/sympy/sympy/pull/26736'className='text-success'><FaCodePullRequest/> (Open) Changed the output_vector to dsolve and added support of symbolic matrices..</a>
0 commit comments