Cov txheej txheem:

Sampling Rate/Aliasing Qhia: 8 Kauj Ruam (nrog Duab)
Sampling Rate/Aliasing Qhia: 8 Kauj Ruam (nrog Duab)

Video: Sampling Rate/Aliasing Qhia: 8 Kauj Ruam (nrog Duab)

Video: Sampling Rate/Aliasing Qhia: 8 Kauj Ruam (nrog Duab)
Video: Aliasing and the Sampling Theorem 2024, Kaum ib hlis
Anonim
Sampling Rate/Aliasing Qhia
Sampling Rate/Aliasing Qhia

Kuv xav tsim txoj haujlwm kev kawm uas qhia txog kev tsis raug cai (thiab piv txwv tus nqi) thiab npaj siab yuav muab tso rau hauv lub vev xaib raws li cov peev txheej rau cov tub ntxhais kawm uas tab tom kawm txog kev tsis raug cai.

Kauj ruam 1: Ciruit Layout

Ciruit txheej txheem
Ciruit txheej txheem
Ciruit txheej txheem
Ciruit txheej txheem

Arduino

Arduino yog lub hauv paus ntawm kev sib txuas lus; txhawb nqa servo lub cev muaj zog (nrog lub log log nkag), thiab cov cuab yeej ua haujlwm nyob hauv tsev.

-Encoder log: Lub log log lub hom phiaj yog txhawm rau tshem tawm cov hlau nplaum uas tig mus rau hauv txoj kev ncig, hovering hla qhov chaw ua haujlwm zoo li lub sensor.

-Sensor teeb: Lub rooj sib tham ntawm cov neeg laus tau muab tso rau hauv qab txoj kev sib hloov ntawm cov hlau nplaum, nws lub hom phiaj yog txhawm rau taug qab qhov dhau ntawm cov hlau nplaum nrog ntau yam kev sib hloov nrawm thiab cov ntaub ntawv sau nqi.

---------------------------------------------------------------------------------------------------------

Cov Kauj Ruam:

  1. Tau txais cov ntaub ntawv:

    Arduino (+ lub rooj mov ci), cov xov hlau, lub log log, cov hlau nplaum, cov cuab yeej siv cuab yeej cuab tam, servo motor, Matlab daim ntawv thov, Arduino thov

  2. Txiav tawm lub log log, nce mus rau servo, thawb hauv hlau nplaum rau hauv qhov.
  3. Txuas cov cuab yeej ua haujlwm zoo li qub hauv qab txoj hauv kev ntawm cov hlau nplaum (yuav tsum tau xaim txuas ntxiv ntawm lub sensor).
  4. Tsim Circuit Court.

Kauj ruam 2: Arduino Code

Arduino Txoj Cai
Arduino Txoj Cai

Txoj kev sau cov ntaub ntawv

Tus lej Arduino siv [Kab 41] txhawm rau khaws cov ntaub ntawv, los ntawm qhov 'Analog In' A0 chaw nres nkoj, los ntawm cov cuab yeej cuam tshuam nrog lub cuab yeej

Txoj kev ntawm cov ntaub ntawv xa mus

  • [Kab 43] Qhia rau hauv qhov ntsuas saib qhov sib txawv 'timer' uas siv lub luag haujlwm 'millis ()' kom ua lub sijhawm ua haujlwm hauv milliseconds rau lub sijhawm ua haujlwm.
  • [Kab 45] Qhia rau hauv qhov ntsuas saib qhov sib txawv 'hallsensor' uas siv 'analogRead' kom tau txais cov ntaub ntawv los ntawm cov neeg ua haujlwm zoo li cov neeg laus raws li qhov haujlwm tau ua.

Lub hom phiaj ntawm ncua () qhov ntsuas

Lub hom phiaj ntawm kev ncua () qhov ntsuas yog txhawm rau hloov lub sijhawm teb ntawm cov ntaub ntawv khaws tseg uas tau txais los ntawm lub teeb pom kev zoo hauv chav

---------------------------------------------------------------------------------------------------------

Cov Kauj Ruam:

Tawm tswv yim Arduino code hauv Arduino daim ntawv thov

Kauj Ruam 3: Matlab Code (HallRT File)

Matlab Code (HallRT File)
Matlab Code (HallRT File)
Matlab Code (HallRT File)
Matlab Code (HallRT File)
Matlab Code (HallRT File)
Matlab Code (HallRT File)
Matlab Code (HallRT File)
Matlab Code (HallRT File)

-Txoj kev txais cov ntaub ntawv - [Daim duab 3: Kab 77]

Tau txais cov ntaub ntawv los ntawm ArduinoStep

---------------------------------------------------------------------------------------------------------

Cov Kauj Ruam:

Kev tawm tswv yim Matlab tus lej yog siab dua cov duab, khaws hauv HallRT cov ntaub ntawv

Kauj Ruam 4: Matlab Code (thresh_analyze)

Matlab Code (thresh_analyze)
Matlab Code (thresh_analyze)
Matlab Code (thresh_analyze)
Matlab Code (thresh_analyze)

Txoj kev suav peaks [Daim duab 2: Kab 45-53]

  • Kev siv tus chij hauv Matlab tus lej yog li ntawd ib zaug rau lub voj voos ntog mus rau 'aRval' uas loj dua qhov teeb tsa ua ntej 'pib' tus nqi suav yuav nce ntxiv los ntawm ib qho, lub ncov yuav raug cim los ntawm asterisks, thiab yog-nqe lus [Kab 45-50] yuav tawg vim hais tias tus chij = 1. Qhov thib ob yog-nqe lus nrog tus chij [Kab 51-53] qhia tias ib zaug lub ncov tau ntsib thiab qhov txiaj ntsig pib poob qis ib puag ncig, tom qab ntawd chij = 0 thiab rau lub voj txuas ntxiv mus nrhiav rau ntau qhov siab tshaj.
  • Parameters/Qhov Tsim Nyog Tseem Ceeb:

    • 'aRval': Cov ntaub ntawv sau los ntawm kev sim khiav.
    • 'thresh': Tus nqi raug xaiv los qhia txhua yam saum toj no hauv aRval ua qhov siab tshaj.

---------------------------------------------------------------------------------------------------------

Cov Kauj Ruam:

Tsim daim ntawv Matlab thib ob "thresh_analyze"

Kauj ruam 5: Sim 1: Tsis muaj Aliasing

Kev sim 1: Tsis muaj Aliasing
Kev sim 1: Tsis muaj Aliasing
Kev sim 1: Tsis muaj Aliasing
Kev sim 1: Tsis muaj Aliasing

Daim duab 1: Kev Tshawb Fawb Cov Ntaub Ntawv @ Ncua 200Figure 2: Thresh Analyzed Data

-Delay Parameter: 200

Peak:

Suav = 45

-Tus naj npawb ntawm Kev Tawm Tsam ib feeb:

45 Revolutions/feeb

---------------------------------------------------------------------------------------------------------

Cov Kauj Ruam:

  1. Txuas Arduino rau koj lub khoos phis tawj.

    Teem sijhawm ncua hauv Arduino code rau "200". Nias Upload (nyob rau sab saum toj sab laug ntawm daim ntawv thov)

  2. Mus rau koj cov ntaub ntawv Matlab HallRT [Kab 37] thiab hloov qhov sib txawv 'ncua sijhawm' rau 200.
  3. Khiav qhov program HallRT.
  4. Txuag Matlab cov ntawv hauv qab "delay_200". (Txuag Daim Duab)
  5. Thauj cov ntaub ntawv ncua_200.mat.
  6. Khiav qhov thresh_analyze program. (Txuag Daim Duab)

Kauj Ruam 6: Kev sim 2: Kev tsis zoo ntawm Sensor (i)

Kev sim 2: Aliasing ntawm Sensor (i)
Kev sim 2: Aliasing ntawm Sensor (i)
Kev sim 2: Kev tsis zoo ntawm Sensor (i)
Kev sim 2: Kev tsis zoo ntawm Sensor (i)

Daim duab 1: Kev Tshawb Fawb Cov Ntaub Ntawv @ Ncua Sijhawm 50

Daim duab 2: Thresh Analyzed Data

Delay Parameter: 50-Peaks:

Suav = 52

Tus naj npawb ntawm Kev Tawm Tsam ib feeb:

52 Revolutions/feeb

---------------------------------------------------------------------------------------------------------

Cov Kauj Ruam:

  1. Txuas Arduino rau koj lub khoos phis tawj.

    Teem sijhawm ncua hauv Arduino code rau "50". Nias Upload (nyob rau sab saum toj sab laug ntawm daim ntawv thov)

  2. Mus rau koj cov ntaub ntawv Matlab HallRT [Kab 37] thiab hloov qhov sib txawv 'ncua sijhawm' rau 50.
  3. Khiav qhov program HallRT.
  4. Txuag Matlab cov ntawv hauv qab "delay_50". (Txuag Daim Duab)
  5. Thauj cov ntawv qeeb_50.mat.
  6. Khiav qhov thresh_analyze program. (Txuag Daim Duab)

Kauj Ruam 7: Kuaj 3: Aliasing ntawm Sensor (ii)

Kev sim 3: Kev tsis zoo ntawm Sensor (ii)
Kev sim 3: Kev tsis zoo ntawm Sensor (ii)
Kev sim 3: Kev tsis zoo ntawm Sensor (ii)
Kev sim 3: Kev tsis zoo ntawm Sensor (ii)

Daim duab 1: Kev Txheeb Xyuas Cov Ntaub Ntawv @ Ncua 100Figure 2: Thresh Analyzed Data

Delay Parameter: 100-Peaks:

Suav = 54

Tus naj npawb ntawm Kev Hloov Kho ib feeb:

54 Revolutions/feeb

--------------------------------------------------------------------- ----------------------------------------------------------------------- ------- Cov Kauj Ruam Ntxiv:

  1. Txuas Arduino rau koj lub khoos phis tawj.

    Teem sijhawm ncua hauv Arduino code rau "100". Nias Upload (nyob rau saum kaum sab laug ntawm daim ntawv thov)

  2. Mus rau koj cov ntaub ntawv Matlab HallRT [Kab 37] thiab hloov qhov sib txawv 'ncua sijhawm' rau 100.
  3. Khiav qhov program HallRT.
  4. Txuag Matlab cov ntawv hauv qab "delay_100". (Txuag Daim Duab)
  5. Thauj cov ntawv qeeb_100.mat.
  6. Khiav qhov thresh_analyze program. (Txuag Daim Duab)

Kauj Ruam 8: Kuaj 4: Aliasing ntawm Sensor (iii)

Sim 4: Aliasing ntawm Sensor (iii)
Sim 4: Aliasing ntawm Sensor (iii)
Sim 4: Aliasing ntawm Sensor (iii)
Sim 4: Aliasing ntawm Sensor (iii)

Daim duab 1: Cov Ntaub Ntawv Soj Ntsuam @ Ncua 300Figure 2: Thresh Analyzed Data

-Delay Parameter: 300

Peak:

Suav = 32

Tus naj npawb ntawm Kev Hloov Kho ib feeb:

32 Revolutions/feeb

----------------------------------------------------------------------- ----------------------------------------------------------------------- ------- Cov Kauj Ruam Ntxiv:

  1. Txuas Arduino rau koj lub khoos phis tawj.

    Teem sijhawm ncua hauv Arduino code rau "300". Nias Upload (nyob rau sab saum toj sab laug ntawm daim ntawv thov)

  2. Mus rau koj cov ntaub ntawv Matlab HallRT [Kab 37] thiab hloov qhov sib txawv 'ncua sijhawm' rau 300.
  3. Khiav qhov program HallRT.
  4. Txuag Matlab cov ntawv hauv qab "delay_300". (Txuag Daim Duab)
  5. Thauj cov ntaub ntawv delay_300.mat.
  6. Khiav qhov thresh_analyze program. (Txuag Daim Duab)

Pom zoo: