Commit 3d0de4d5 authored by DEMAILLY Nicolas's avatar DEMAILLY Nicolas
Browse files

Initial commit

parents
.DS_Store
__pycache__/
.ipynb_checkpoints
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
MANIFEST
build
dist
_build
docs/man/*.gz
docs/source/api/generated
docs/source/config.rst
docs/gh-pages
notebook/i18n/*/LC_MESSAGES/*.mo
notebook/i18n/*/LC_MESSAGES/nbjs.json
notebook/static/components
notebook/static/style/*.min.css*
notebook/static/*/js/built/
notebook/static/*/built/
notebook/static/built/
notebook/static/*/js/main.min.js*
notebook/static/lab/*bundle.js
node_modules
*.py[co]
__pycache__
*.egg-info
*~
*.bak
.ipynb_checkpoints
.tox
.DS_Store
\#*#
.#*
.coverage
.pytest_cache
src
*.swp
*.map
.idea/
Read the Docs
config.rst
*.iml
/.project
/.pydevproject
package-lock.json
geckodriver.log
*.iml
# jetbrains IDE stuff
*.iml
.idea/
# ms IDE stuff
*.code-workspace
.history
.vscode
\ No newline at end of file
all:
git add .
git commit -m "modif"
git push -u origin master
\ No newline at end of file
# Second Order Analog Filters
This repo contains some empty jupyter notebooks for students.
Each notebook describes a particular analog second order filter (RC-RC, RLC, Rauch, Sallen-Key). Then, the objective is to create two python functions :
* compute_parameters : this function compute the filter specifications from the filter components
* select_components : this function select the filter components from some filter specifications
## Getting started
#### Starting the project
1. Fork the repo (click on the fork button then on the select button)
2. Download the forked repo onto your machine
3. Make the necessary changes to your project in your local files (create the functions on jupyter etc...)
#### Submitting the project
4. Once you are ready to submit the assignment, open the Anaconda prompt (type "cmd" on your computer search bar and the option should appear)
5. Type `git` into the command line then press enter
6. If you do not have git installed on Anaconda, type `conda install -c anaconda git` into the command line then press enter
7. Once you have installed git on Anaconda, click on the clone button and retrieve the https url
8. On the command line, change the directory to the folder you want to submit (use `cd folder_path_name` to do so and use `dir` (or `ls` for Mac and Linux users) to make sure you see the right files inside the folder)
9. On the command line, type `git clone {https_url_you_copied}` then press enter. It will ask you for your ENT username then for your ENT password. Make sure there is no error before proceeding to the next step
10. On the commande line, type `git add .` then press enter. If everything went smoothly, if you type in `git status`, you should have some new files to commit.
11. On the command line, type the lines of code below. All the changes made on your local machine should now be transfered onto the forked repo
```
git commit -m "ma version"
git push -u origin master
```
## How to make a pull request
* https://docs.gitlab.com/ee/user/project/repository/forking_workflow.html
\ No newline at end of file
%% Cell type:markdown id: tags:
# Rauch Bandpass Filter
%% Cell type:code id: tags:
``` python
from numpy import *
```
%% Cell type:markdown id: tags:
## Electronic Circuit
<img src="./img/MFB_BP.svg" width="300px">
%% Cell type:markdown id: tags:
* LT Spice (should be modified): [Rauch_BP.asc](./asc/Rauch_BP.asc)
* Transfer Function :
$$H(p)=?$$
%% Cell type:markdown id: tags:
## Parameter Identification
The function `compute_parameters` evaluates the filter parameters from the filter components.
%% Cell type:code id: tags:
``` python
def compute_parameters(R1,R2,R3,C1,C2):
# compute your parameter here
w0 = 0
f0 = 0
m = 0
Ti = 0
Tmax = 0
BP = 0
return {"w0":w0,"f0":f0,"m":m,"Ti":Ti,"Tmax":Tmax,"BP":BP}
# example
R1, R2, R3, C1, C2 = 10000, 20000, 10000, 10**-8, 3.3*(10**-9)
parameters = compute_parameters(R1,R2,R3,C1,C2)
print(parameters)
```
%% Output
{'w0': 0, 'f0': 0, 'm': 0, 'Ti': 0, 'Tmax': 0, 'BP': 0}
%% Cell type:markdown id: tags:
## Component Selection
The function `compute_component` compute the filter components from some filter specification.
%% Cell type:code id: tags:
``` python
def compute_component(f0,m,Tmax):
# compute your component here
R1 = 0
R2 = 0
R3 = 0
C1 = 0
C2 = 0
return {"R1":R1,"R2":R2,"R3":R3,"C1":C1,"C2":C2}
# example
f0, m, Tmax = 2000, 1, -1.2
components = compute_component(f0,m,Tmax)
print(components)
```
%% Output
{'R1': 0, 'R2': 0, 'R3': 0, 'C1': 0, 'C2': 0}
%% Cell type:markdown id: tags:
# Rauch High Pass Filter
%% Cell type:code id: tags:
``` python
from numpy import *
```
%% Cell type:markdown id: tags:
## Electronic Circuit
<img src="./img/MFB_HP.svg" width="300px">
%% Cell type:markdown id: tags:
* LT Spice (should be modified): [Rauch_HP.asc](./asc/Rauch_HP.asc)
* Transfer Function :
$$H(p)=?$$
%% Cell type:markdown id: tags:
## Parameter Identification
The function `compute_parameters` evaluates the filter parameters from the filter components.
%% Cell type:code id: tags:
``` python
def compute_parameters(R1,R2,C1,C2,C3):
# compute your parameter here
w0 = 0
f0 = 0
m = 0
Too = 0
Tw0 = 0
return {"w0":w0,"f0":f0,"m":m,"Too":Too,"Tw0":Tw0}
# example
R1, R2, C1, C2, C3 = 1000, 5000, 10**-9, 2.2*(10**-8), 3.3*(10**-9)
parameters = compute_parameters(R1,R2,C1,C2,C3)
print(parameters)
```
%% Output
{'w0': 0, 'f0': 0, 'm': 0, 'Too': 0, 'Tw0': 0}
%% Cell type:markdown id: tags:
## Component Selection
The function `compute_component` compute the filter components from some filter specification.
%% Cell type:code id: tags:
``` python
def compute_component(f0,m,Too):
# compute your component here
R1 = 0
R2 = 0
C1 = 0
C2 = 0
C3 = 0
return {"R1":R1,"R2":R2,"C1":C1,"C2":C2,"C3":C3}
# example
f0, m, Too = 0, 0, 0
components = compute_component(f0,m,Too)
print(components)
```
%% Output
{'R1': 0, 'R2': 0, 'C1': 0, 'C2': 0, 'C3': 0}