danyDCane
    • 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
    # <center>通訊實驗期末報告</center> * 1.[ GNU Radio](#title1) * 2.[ QT Desinger](#title2) * 3.[ Coding](#title3) * 4.[系統操作](#title4) * 5.[心得](#title5) * 6.[參考資料](#title6) ## <center id="title1">GNU Radio</center> ### <center>FM 頻率調變</center> 調頻(Frequency Modulation, FM)是一種以載波的瞬時頻率變化來表示資訊的調變方式。調頻技術通常運用在甚高頻段(VHF無線電波段)上的高傳真音樂和語音的無線電廣播。普通的(類比)電視的音訊訊號也是透過調頻方式傳遞。 窄帶形式的調頻廣播(NBFM, N-FM)限於商業上的聲音通訊和業餘無線電領域,廣播中使用的調頻技術則一般稱為寬帶調頻(WBFM, W-FM)。 ### <center>方塊圖</center> ![](https://hackmd.io/_uploads/rJCQ6nB83.png) <center> <img src="https://hackmd.io/_uploads/rkedhhrLn.png" width = "300" height = "400"> </center> 1. samp_rate: 8e6,這是信號的抽樣速度 2. Ch0:Frequency(HZ): 設定接收的中心頻率 3. Ch0:RF Gain(dB):14 「射頻放大器」負責將弱信號功率提高。用戶指定的增益值是以「分貝」為單位,表示為「dB」,「射頻放大器」所控制的是在沒有增益的前提下放大的數量,因為可能接收不到太弱的信號。但太多的增益也會扭曲信號,就像將一個音響的音量開得太大了,一些聲音會發生變形一樣。還有一些無線是通過增益的多個階段獲得的。 4. Ch0:IF Gain(dB):32 IF Gain控制的是中頻段的增益。在接收訊號經過射頻前端後,會經過混頻器轉換成中頻信號。IF Gain的調整可以影響中頻段的信號強度。當接收到的訊號較強時,可以降低IF Gain以避免信號過載,從而保護後續處理模塊免受過高的信號干擾。相反,當訊號較弱時,增加IF Gain可以提升中頻段的信號強度,以確保後續處理模塊可以正確解碼和處理信號。 5. Ch0:BB Gain(dB):30 Baseband Gain則是調整基頻信號的增益。基頻信號是指已經解調或解碼後的低頻信號,通常用於音頻或數據的傳輸。通過調整Baseband Gain,可以控制基頻信號的強度,以確保它位於適當的範圍內。過高的Baseband Gain可能導致信號失真或饋返問題,而過低的Baseband Gain則可能導致信號過於模糊或不可辨識。 <center> <img src="https://hackmd.io/_uploads/SJcQXprUn.png" width = 300 height = 270 > </center> 1. Decimation: 25 將原有的採樣率降低25倍,使得每秒採樣率變為 8M/25 = 320K 2. Cutoff Freq: 200e3 Cutoff Freq(截止頻率)指的是低通濾波器開始將訊號進行減弱的頻率。在這個頻率之上的信號成分將被濾波器擋掉或減弱到可接受的程度。 3. Transition Width: 40e3 指截止頻率與低通濾波器實際開始減弱的頻率之間的頻率範圍。在過渡帶寬內,濾波器會逐漸將訊號減弱,使其能夠平滑過渡到截止頻率。從截止頻率200 kHz到低通濾波器實際開始減弱的160 kHz範圍內,訊號會逐漸減弱。 <center> <img src="https://hackmd.io/_uploads/ByO-5TB8h.png" width = 300 height = 250 > </center> 1. Quadrature Rate: 320e3 接收器使用的樣本採樣率。在WBFM接收過程中,接收器通常使用正交取樣技術來解調信號。正交取樣是通過同時採集實部(In-phase)和虛部(Quadrature)信號來捕獲完整的調幅訊號,以方便後續的信號處理和解碼。 WBFM解調技術的基本原理: 1. 接收信號:首先,接收器接收到WBFM廣播信號。該信號包含了廣播電台傳輸的音訊信息,並且已經經過頻率調制。 2. 頻率降轉:為了解調信號,接收器需要將接收到的信號進行頻率降轉。這是通過混頻器和本地振盪器(LO)的組合來實現的。混頻器將接收到的信號與本地振盪器的信號相乘,從而將信號的頻率降低到基頻範圍。 3. 正交取樣:接著,在降頻後的信號上進行正交取樣。正交取樣是通過同時檢測信號的實部(In-phase)和虛部(Quadrature)來捕獲完整的調幅訊號。這可以通過使用兩個相位相差90度的本地振盪器來實現。 4. 頻率解調:在正交取樣後,可以使用相位差解調技術來解調信號。通過計算正交取樣信號的相位差,可以推導出原始訊號的頻率變化情況。這可以透過數學運算或使用相位鎖定迴路(PLL)等解調技術來實現。 3. Audio Decimation: 10 從接收到的信號中提取出最終的音頻訊號的過程。在WBFM接收中,原始訊號的樣本率通常非常高,因此進行音頻降取樣可以減少數據處理的負擔並提高效能。通常,音頻降取樣是通過選擇一個較小的樣本率,然後在數字信號處理中將高頻訊號濾除來實現的。音頻降取樣將原始信號的樣本率降低到原來的1/10,以獲得較低的音頻訊號 320K/10 = 32K ## <center id="title2">QT Desinger</center> ### <center>架構圖</center> <center> <img src="https://hackmd.io/_uploads/HkCqmxjU3.png" width = 300 height = 250> </center> 1. QLCDNumber 2. QPushBotton (next、previous、love、remove) 3. QListWidget (my favorite) ## <center id="title3">Coding</center> ### <center>引入QT Designer</center> 1. 引入套件 <center> <img src="https://hackmd.io/_uploads/HkJibwwL2.png" > </center> 2. Example (注意名稱) * QPushBotton('next') * connect(self.addToFavorites) 對應到下方的定義值 * 將我的最愛列表設為空集合 <center> <img src="https://hackmd.io/_uploads/H1Uqwpt83.png"> </center> 3. self.idx = (self.idx + 1) % len(self.freqs) 看餘數 4. self.my_lcd.display(f'{self.freqs[self.idx]/1e6:.2f}'): 使用self.idx從頻率列表中獲取當前頻率,並將其除以10e6,最後顯示在QLCDNumber小部件上。格式.2f表示只保留兩位小數。 --- 5. favorite_channel 1 ==> self.my_list.addItem(favorite_channel) 顯示在我的最愛 6. favorite_channel 2 ==> self.favorite_channels.append(favorite_channe2) 另存到一個陣列給電腦看到 --- 7.text = self.my_list.currentItem().text() ==> self.my_lcd.display(text) 顯示頻道 8. num = self.my_list.currentIndex().row() ==>self.set_freq(float(self.favorite_channels[num])) 從append(favorite_channe2)取出第num個頻道 9. selected_item = self.my_list.currentItem() 獲取當前被選中的項目,並將其存儲在selected_item。 10. if selected_item: 檢查是否存在於選中的項目。如果存在於選中的項目,則程序會執行操作 11. row = self.my_list.row(selected_item) 獲取取選中項在列表中的行號,並將其存儲在row 12. self.my_list.takeItem(row) 使用takeItem(row)從列表中移去選擇中項所在的行 <center> <img src="https://hackmd.io/_uploads/S1xoj-FLh.png"> </center> --- ### <center>美化視窗</center> 1. self.setWindowTitle("收音機") 將視窗名稱改為"收音機"。 2. self.top_scroll.setStyleSheet("border: 1px solid gray; border-radius: 10px; background-color: #ADD8E6;") (設置邊框的樣式為1像素的灰色實線;設置邊框的圓角半徑為10像素。使邊框的角變得圓潤;設置背景顏色為淡藍色#ADD8E6。這裡使用的是十六進制顏色碼。) 2-1.當設置顏色時,可以用英文名稱表示一些常見的顏色。例如,“red”表示紅色,六進制顏色代碼提供了一種更準確和準確的方式來顯示顏色,可以適用於各種應用程序和平台,並並且可以顯示幾乎所有可能的顏色。 <center> <img src="https://hackmd.io/_uploads/HydqlWFIn.png"> </center> 3. self._gain_win.setStyleSheet("QSlider::handle:horizontal { background-color: blue; }") 將水平滑鈕的背景顏色設置為藍色 <center> <img src="https://hackmd.io/_uploads/H1n2_gjLn.png" > </center> 4. self.my_next.setSizePolicy(Qt.QSizePolicy.Expanding, Qt.QSizePolicy.Expanding) 為在水平和垂直方向上都盡可能擴展以充填可用的空間。 5. self.my_list.setMaximumSize(QtCore.QSize(500, 500)) "my_list" 部分的大小將受到到最大尺寸的限制,不會超過 (500, 500) 的尺寸 6. self.setFixedSize(700, 350) 設置視窗的長度和寬度 7. self.my_lcd.setStyleSheet("color: black;") 把lcd_number的字體顏色改為黑色 8. self.my_next.setStyleSheet("color: #000080;")把next改為深藍色 <center> <img src="https://hackmd.io/_uploads/rk1w_eo8n.png " > </center> --- ## <center id="title4">系統操作</center> --- {%youtube F9jLjUKX6Qw %} <center> <img src="https://hackmd.io/_uploads/SkswtPq8h.png"> </center> * 在Conda中創建一個名為"radioconda"的新環境,並安裝該環境所需的資料庫,這個資料庫有提供GNU Radio的相關套件。 ## <center id="title5">心得</center> * 陳宥均: 因為對於程式一竅不通,所以再融入qtdesigner的部份時,想了很久都不知道怎麼改進,主要也是因為自己找不出問題,好在李定霖同學活用它對python的豐富知識來協助我改善程式,也仔細地教我程式是如何改動的。最後同樣感謝老師和助教適時的給予協助,讓我們最後能順利完成。 * 李定霖: 剛開始做專題的時候,因為還不太熟悉用python去更改UI介面,也搞不太懂程式跟檔案的路徑與編譯環境,所以在一開始要從cmd啟動程式時,就處處碰壁,但是與組員一起重新討論過,發現是我把程式碼想得太複雜了,想法搞通了之後,進度就推進的很快,最後謝謝老師與助教的提點,使我們順利完成此專題。 * 林俊佑: 一開始我對於python的語法還不太熟悉,所以在修改程式碼的時候遇到很多障礙,但還是透過與組員的討論來一一修改,在沒人可以幫忙的時候,也透過chatGPT來解惑,也感謝助教和老師的幫忙讓我們能夠順利完成。 * 陳乙銓: 由於只有學過C語言,語法不太熟悉,因此常常需要藉助CHATGPT來幫忙,也謝謝同組員以及老師還有助教。 ## <center id="title6">參考資料</center> 1. <a href="https://reurl.cc/QXj785">LimeSDR WBFM广播发射与接收 https://reurl.cc/QXj785</a> 2. <a href="https://reurl.cc/zYMe8e">HackRF WBFM发射 https://reurl.cc/zYMe8e</a> 3. <a href="https://reurl.cc/kX7Z0q">無線攻擊工具:SDR設備 https://reurl.cc/kX7Z0q</a> 4. <a href="https://reurl.cc/QXj930">如何实现FM广播回放? https://reurl.cc/QXj930</a> 5. <a href="https://reurl.cc/012jDM">HackRF One—收音机例子_hackrf收音机_失落的熊熊的博客-CSDN博客 https://reurl.cc/012jDM</a> 6. <a href="https://reurl.cc/GAomop">QListWidget 列表選擇框 - PyQt5 教學 | STEAM 教育學習網 https://reurl.cc/GAomop</a> 7. <a href="https://reurl.cc/VLjEEN">使用 SDR 接收音頻 https://reurl.cc/VLjEEN</a>

    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