added readme and requirements for simulator
This commit is contained in:
7
MAGLEV_DIGITALTWIN_PYTHON/ReadMe.md
Normal file
7
MAGLEV_DIGITALTWIN_PYTHON/ReadMe.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# How To Use
|
||||
## Running the Simulation
|
||||
Run ```pip install -r requirements.txt``` followed by ```python topSimulate.py```. Or, if your environment is already set up, just run the python file.
|
||||
## Modifying the PID control algorithm
|
||||
Modify ```controller.py```. You will see constants related to heave, pitch, and roll controllers. Will update to include current control and will make simulation much more accurate soon.
|
||||
## Modifying pod parameters
|
||||
```parameters.py``` provides all necessary mechanical parameters. Yoke and sensor locations are matrices formed by putting together 4 column vectors of the form $\begin{bmatrix}x\\y\\z\end{bmatrix}$ relative to the center of mass. <br><br>```fmag2()``` within ```utils.py``` deals with the magnetic parameters.
|
||||
12
MAGLEV_DIGITALTWIN_PYTHON/requirements.txt
Normal file
12
MAGLEV_DIGITALTWIN_PYTHON/requirements.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
contourpy==1.3.3
|
||||
cycler==0.12.1
|
||||
fonttools==4.60.1
|
||||
kiwisolver==1.4.9
|
||||
matplotlib==3.10.7
|
||||
numpy==2.3.5
|
||||
packaging==25.0
|
||||
pillow==12.0.0
|
||||
pyparsing==3.2.5
|
||||
python-dateutil==2.9.0.post0
|
||||
scipy==1.16.3
|
||||
six==1.17.0
|
||||
@@ -5,7 +5,6 @@ Ported from topSimulate.m to Python
|
||||
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
from matplotlib.animation import FuncAnimation, PillowWriter
|
||||
from parameters import QuadParams, Constants
|
||||
from utils import euler2dcm, fmag2
|
||||
from simulate import simulate_maglev_control
|
||||
|
||||
@@ -5,7 +5,6 @@ Ported from visualizeQuad.m
|
||||
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
from mpl_toolkits.mplot3d import Axes3D
|
||||
from mpl_toolkits.mplot3d.art3d import Poly3DCollection
|
||||
from matplotlib.animation import FuncAnimation, PillowWriter
|
||||
from scipy.interpolate import interp1d
|
||||
|
||||
Reference in New Issue
Block a user