Maxxyyme
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Travaux pratiques d'électronique N°1 ## L'oscilloscope Numérique : outil de visualisation et d'acquisition de signaux # Géneration de signaux Le générateur permet l'émission de signaux de périodes distinctes, lorsque l'on essaye d'émettre un signal d'une période différente, on remarque que les signaux ne sont plus en phase. Pour la suite du TP, nous utiliserons un jeu de données fournis par un camarade qui a pu capturer un signal de type différentiel TTL en plus. # Visualisation et mesures ![](https://i.imgur.com/BD9w8c8.png) Le signal généré est de forme sinusoïdale, d'après les fonctions de mesures de l'oscilloscope ses caractéristiques sont les suivantes: * Période T = 1.2 ms * Valeur Moyenne = 2 V * Tension crête à crête = 10 V * Valeur efficace = 4 V Pour faire des mesures temporelles très précises il faudrait privilégier plusieurs périodes pour les signaux émis. # Analyse et interprétation Pour une fonction périodique, la valeur moyenne se calcule sur une période, ainsi on a : $<$e(t)$>$ = $\frac{1}{T}$$\int_0^T \mathrm{e(t)}\,\mathrm{d}t$ La tension crête à crête est définie comme différence entre sa crête positive et sa crête négative, ainsi on a : $Ucàc$ = $(Umax)-(Umin)$ La valeur efficace est la racine carrée de la moyenne du carré de cette grandeur, sur un intervalle de temps donné, donc ici sur une période, ainsi on a : $E_{effT}$ = $\sqrt{<e^2>}$ = $(\frac{1}{T}$$\int_0^T \mathrm{e(t)}^2\,\mathrm{d}t)^\frac{1}{2}$ # Traitement des données et exploitation via python Après avoir traité les données sous excel, nous avons commencé le traitement numérique sous python. Tout d'abord, nous avons importé les modules nécessaires a ce traitement: ```python import numpy as np import matplotlib.pyplot as plt import math ``` Ensuite, nous avons ouvert notre fichier sous la forme d'un tableau numérique via le module numpy. Puis nous avons effectué une vérification sur l'exploitabilité des données en lisant les 100 premiers caractères de notre fichier : ```python with open("data.csv") as f: data = f.read(100) print(data) ``` Grâce à cette vérification, nous avons pu observer un problème dans les deux premières lignes de nos données: <center> <img src="https://i.imgur.com/F1pXhdD.png"> </center> En effet, le fichier contient uniquement des valeurs numériques à l'exception de ces 2 lignes, représentant le nom des axes ,des courbes et des unités représentées sur l'oscilloscope. Pour pouvoir proceder a l'exploitation, nous allons nous debarasser de ces lignes grâce à l'instruction suivante: ```python= data = np.loadtxt("./data.csv", skiprows=2 , delimiter = ";", unpack = True) ``` # Représentation graphique ```python= t,x,y = data t_ms=t*1000 #Conversion du temps en seconde vers les milisecondes #Pour une meilleure lisibilité du graphique plt.title("Représentation graphique de la tension en fonction du temps") plt.plot(t_ms, x, color="green", label="Tension Voie 1") plt.plot(t_ms, y, color="red", label="Tension Voie 2") plt.xlabel("Temps en Milisecondes") plt.ylabel("Tension en Volts") plt.grid() plt.legend(loc="upper left") #Emplacement des legendes plt.gcf().set_size_inches(8, 6, forward=True) plt.gcf().set_dpi(100) plt.savefig("fig.jpg") plt.show() ``` ![](https://i.imgur.com/AahhL33.png) >Les courbres verte et rouge représentent respectivement la tension e(t) et la tension u(t). Après avoir obtenu cette représentation graphique, nous avons écrit et appliqué les fonctions suivantes à nos données afin d'obtenir différentes grandeurs statistique. ### Periode de e(t) ```python= dt = t[1]-t[0] def periode(entrée): moy = (np.max(entrée) + np.min(entrée))/2 compteur = -1 i = 0 t1= 0 while compteur != 1: if entrée[i] < moy < entrée[i+1]: compteur += 1 if compteur == 0: t1 = i i+=1 return (i-t1)*dt print(periode(x)) print(periode(y)) ``` ### Valeur moyenne ```python= def moyenne(entrée): T = periode(entrée) v = int(T/(dt)) somme = 0 for k in range(v-1): somme += dt * (entrée[k]+entrée[k+1])/2 return (1/T)*somme print(moyenne(x)) print(moyenne(y)) ``` Cela nous renvoie : * moyenne(x) = 1.8428731039561663 * moyenne(y) = 1.4871873096278492 ### Tension crête à crête ```python= def cac(entrée): return(np.amax(entrée)-np.amin(entrée)) print(cac(x)) print(cac(y)) ``` ### Valeur efficace ```python= def valeur_efficace(entrée): T = periode(entrée) v = int(T/dt) somme = 0 for k in range(v-1): somme += dt * ((entrée[k])**2+(entrée[k+1])**2)/2 return np.sqrt((1/T)*somme) print(valeur_efficace(x)) print(valeur_efficace(y)) ``` En l'appliquant à nos données, nous obtenons: * V_eff(x) = 4.012748197581136 * V_eff(y) = 2.129450875727477 En comparant les sorties de nos fonctions avec les valeurs réelles affichées des mesures de l'oscilloscope, on remarque que les valeurs sont en corrélation, la période est bien de 1.2 ms, la tension crête à crête est bien de 10 V, la tension moyenne (=1.8 V) est proche de celle attendue (2V)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully