TW202335440A - Dynamic sampling rate tuning system - Google Patents

Dynamic sampling rate tuning system Download PDF

Info

Publication number
TW202335440A
TW202335440A TW111106519A TW111106519A TW202335440A TW 202335440 A TW202335440 A TW 202335440A TW 111106519 A TW111106519 A TW 111106519A TW 111106519 A TW111106519 A TW 111106519A TW 202335440 A TW202335440 A TW 202335440A
Authority
TW
Taiwan
Prior art keywords
frequency
signal
sampling
module
sampling frequency
Prior art date
Application number
TW111106519A
Other languages
Chinese (zh)
Other versions
TWI805238B (en
Inventor
陳浩銘
劉如傑
Original Assignee
律芯科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 律芯科技股份有限公司 filed Critical 律芯科技股份有限公司
Priority to TW111106519A priority Critical patent/TWI805238B/en
Application granted granted Critical
Publication of TWI805238B publication Critical patent/TWI805238B/en
Publication of TW202335440A publication Critical patent/TW202335440A/en

Links

Images

Landscapes

  • Other Investigation Or Analysis Of Materials By Electrical Means (AREA)
  • Transmission Systems Not Characterized By The Medium Used For Transmission (AREA)
  • Medicines Containing Antibodies Or Antigens For Use As Internal Diagnostic Agents (AREA)
  • Feedback Control In General (AREA)

Abstract

The present invention provides a dynamic sampling rate adjustment system, which is set in coordination with a sampling frequency device. The sampling frequency device outputs a sampling frequency signal according to the sampling frequency. The dynamic sampling rate adjustment system includes a control device, a frequency adjustment device, and a sampling device. The input ends of the frequency adjustment device are respectively connected to the sampling frequency analysis device and the control device. The frequency adjustment device includes a comparison decision module, a noise adjustment module, a mapping module, and a frequency adjustment module. The frequency adjustment device starts a takeover mode when it detects that the sampling frequency of the sampling frequency signal exceeds the expected frequency range, updates the sampling frequency and outputs a sampling frequency stable signal. The sampling device samples the target signal according to the updated sampling frequency stable signal.

Description

動態採樣率調整系統Dynamic sampling rate adjustment system

本發明提供一種動態採樣率調整系統,尤其是一種可有效降低抖動雜訊的動態採樣率調整系統。The present invention provides a dynamic sampling rate adjustment system, especially a dynamic sampling rate adjustment system that can effectively reduce jitter noise.

在訊號處理領域,採樣是將訊號從連續時間域上的類比訊號轉換到離散時間域上的離散訊號的過程。類比訊號先由採樣迴路按照一定時間間隔採樣獲得時間上離散的訊號,再經類比數位轉換器(ADC)在數值上也進行離散化,從而得到數值和時間上都離散的數位訊號。In the field of signal processing, sampling is the process of converting signals from analog signals in the continuous time domain to discrete signals in the discrete time domain. The analog signal is first sampled by the sampling circuit at certain time intervals to obtain a time-discrete signal, and then is numerically discretized by an analog-to-digital converter (ADC), thereby obtaining a digital signal that is both numerically and time-discrete.

這樣得到的訊號的離散形式常常給數據帶來一些誤差,而誤差主要來自於兩個方面,與連續類比訊號頻譜有關的採樣率,以及量化時所用的字長。採樣率指的是對連續訊號採樣的頻度。它代表了離散訊號在時域和空間域上的精確度。字長(位元的數量)用來表示離散訊號的值,它體現了訊號的大小的精確性。The discrete form of the signal thus obtained often brings some errors to the data, and the errors mainly come from two aspects, the sampling rate related to the spectrum of the continuous analog signal, and the word length used in quantization. Sampling rate refers to the frequency with which continuous signals are sampled. It represents the accuracy of discrete signals in the time and space domains. The word length (the number of bits) is used to represent the value of a discrete signal, which reflects the accuracy of the signal size.

所述的採樣率(也稱為採樣速度或者採樣頻率)定義了每秒從連續訊號中提取並組成離散訊號的採樣個數,它用赫茲(Hz)來表示。但是,常用採樣迴路的採樣率係藉由輸入的頻率來進行採樣,當輸入的頻率不準確時會造成採樣率不準,而當採樣率不準時,會使輸入緩衝區溢位,造成系統異常。The sampling rate (also called sampling speed or sampling frequency) defines the number of samples extracted from a continuous signal and composed into a discrete signal per second, which is expressed in Hertz (Hz). However, the sampling rate of commonly used sampling loops is sampled based on the input frequency. When the input frequency is inaccurate, the sampling rate will be inaccurate. When the sampling rate is inaccurate, the input buffer will overflow, causing system abnormalities. .

為解決上述問題,本發明提供一種動態採樣率調整系統,係配合採樣頻率裝置設置,該採樣頻率裝置依據採樣頻率輸出採樣頻率訊號。該動態採樣率調整系統包括控制裝置、頻率調整裝置、採樣裝置。該控制裝置輸出控制訊號,該控制訊號附帶預期頻率範圍的資訊。該頻率調整裝置輸入端分別連接至該採樣頻率裝置與該控制裝置。該頻率調整裝置包括比較決策模組、設置於該比較決策模組輸出的雜訊調整模組、一設置於該雜訊調整模組輸出的映射模組、以及設置於該映射模組輸出的頻率調整模組。該比較決策模組的輸入端分別連接至該採樣頻率裝置、該頻率調整模組與該控制裝置的輸出端。該比較決策模組於偵測到該採樣頻率訊號的該採樣頻率超出該預期頻率範圍啟動一接管模式,於該接管模式下該比較決策模組根據該採樣頻率是否超出該預期頻率範圍決定輸出虛擬升降波訊號。該雜訊調整模組依據該虛擬升降波訊號產生輸出代碼。該映射模組係依據該輸出代碼映射輸出調頻訊號。該頻率調整模組依據該調頻訊號更新該採樣頻率並輸出採樣頻率穩定訊號,並將更新後的該採樣頻率回授至該比較決策模組以構成循環迴路。該採樣裝置輸入端連接至該頻率調整裝置,該採樣裝置依據更新後的該採樣頻率穩定訊號對目標訊號進行採樣。In order to solve the above problems, the present invention provides a dynamic sampling rate adjustment system, which is configured in conjunction with a sampling frequency device. The sampling frequency device outputs a sampling frequency signal according to the sampling frequency. The dynamic sampling rate adjustment system includes a control device, a frequency adjustment device and a sampling device. The control device outputs a control signal carrying information of an expected frequency range. The input end of the frequency adjustment device is connected to the sampling frequency device and the control device respectively. The frequency adjustment device includes a comparison decision-making module, a noise adjustment module set at the output of the comparison decision-making module, a mapping module set at the output of the noise adjustment module, and a frequency set at the output of the mapping module. Adjust the module. The input end of the comparison decision module is respectively connected to the output end of the sampling frequency device, the frequency adjustment module and the control device. The comparison decision-making module activates a takeover mode when detecting that the sampling frequency of the sampling frequency signal exceeds the expected frequency range. In the takeover mode, the comparison decision-making module determines to output a virtual virtual signal based on whether the sampling frequency exceeds the expected frequency range. Up and down wave signals. The noise adjustment module generates output codes based on the virtual up and down wave signals. The mapping module maps the output FM signal according to the output code. The frequency adjustment module updates the sampling frequency according to the frequency modulation signal and outputs a stable sampling frequency signal, and feeds back the updated sampling frequency to the comparison decision-making module to form a loop. The input end of the sampling device is connected to the frequency adjustment device, and the sampling device samples the target signal according to the updated sampling frequency stable signal.

是以,比起習知技術,本發明能使採樣率的輸入頻率穩定,並且能避免輸入緩衝區溢位,解決因緩衝區溢位而造成系統異常的問題。Therefore, compared with the conventional technology, the present invention can stabilize the input frequency of the sampling rate, avoid input buffer overflow, and solve the problem of system abnormality caused by buffer overflow.

有關本發明之詳細說明及技術內容,現就配合圖式說明如下。The detailed description and technical content of the present invention are described below with reference to the drawings.

以下針對本發明的其中一較佳實施例進行說明,請參閱「圖1」、「圖2」及「圖3」,分別為本發明動態採樣率調整系統的方塊示意圖(一)、方塊示意圖(二)以及方塊示意圖(三),如圖所示:The following is a description of one of the preferred embodiments of the present invention. Please refer to "Figure 1", "Figure 2" and "Figure 3", which are block diagrams (1) and (1) of the dynamic sampling rate adjustment system of the present invention respectively. 2) and block diagram (3), as shown in the figure:

請參酌「圖1」,本實施例係揭示動態採樣率調整系統100,主要包括採樣頻率裝置10、控制裝置20、輸入端分別連接至採樣頻率裝置10與控制裝置20的頻率調整裝置30、以及輸入端連接至頻率調整裝置30的採樣裝置40。Please refer to "Figure 1". This embodiment discloses a dynamic sampling rate adjustment system 100, which mainly includes a sampling frequency device 10, a control device 20, a frequency adjustment device 30 whose input ends are respectively connected to the sampling frequency device 10 and the control device 20, and The input is connected to the sampling device 40 of the frequency adjustment device 30 .

本發明動態採樣率調整系統100中所述的裝置、模組、迴路或單元的組合及其對應執行的功能,可以由單一晶片或複數個晶片的組合協同執行,該等晶片配置的數量非屬本發明所欲限定的範圍。此外,所述的晶片可以包括但不限定於處理器(Processor)、中央處理器(Central Processing Unit, CPU)、微處理器(Microprocessor)、數位訊號處理器(Digital Signal Processor, DSP)、特殊應用積體電路(Application Specific Integrated Circuits, ASIC) 、可程式化邏輯裝置(Programmable Logic Device, PLD)等可將資訊或訊號做處理、轉換用途或特殊用途的其他類似裝置或這些裝置的組合,於本發明中不予以限制。The combination of devices, modules, circuits or units and their corresponding functions in the dynamic sampling rate adjustment system 100 of the present invention can be executed collaboratively by a single chip or a combination of multiple chips. The number of these chips is not limited to The scope of the present invention is intended to be limited. In addition, the chip may include, but is not limited to, a processor (Processor), a Central Processing Unit (CPU), a microprocessor (Microprocessor), a Digital Signal Processor (DSP), special application Application Specific Integrated Circuits (ASIC), Programmable Logic Device (PLD) and other similar devices or combinations of these devices that can process information or signals, convert them for special purposes, are used here. No limitations are imposed on the invention.

所述的採樣頻率裝置10依據採樣頻率輸出採樣頻率訊號。具體而言,該採樣頻率裝置10係配合震盪器設置,用於決定固定時間範圍內對連續時間訊號的取樣次數。於一實施例中,該採樣頻率訊號例如可以是由0與1構成的方波,例如以非同步採樣速率轉換器(Asynchronous Sample Rate Converter, ASRC)為例,當採樣頻率訊號於升頻段的位元串值為1時取出訊號當下的值,位元串值為0時保留訊號當下的值;當採樣頻率訊號於降頻段的位元串值為1時取出訊號當下的值,位元串值為0時則不取值。該採樣頻率裝置10可以包括但不限定於數位訊號處理器(digital signal processor,DSP)、函數訊號產生器(function generator)、任意波形產生器(Arbitrary waveform generators, AWG)、訊號產生器(Signal generator)等可產生訊號的裝置,於本發明中不予以限制。The sampling frequency device 10 outputs a sampling frequency signal according to the sampling frequency. Specifically, the sampling frequency device 10 is configured with an oscillator and is used to determine the number of sampling times of the continuous time signal within a fixed time range. In one embodiment, the sampling frequency signal can be, for example, a square wave composed of 0s and 1s. For example, taking an asynchronous sample rate converter (ASRC) as an example, when the sampling frequency signal is in the up-frequency band, When the bit string value is 1, the current value of the signal is obtained. When the bit string value is 0, the current value of the signal is retained. When the bit string value of the sampling frequency signal in the down-frequency band is 1, the current value of the signal is obtained. The bit string value When it is 0, it takes no value. The sampling frequency device 10 may include, but is not limited to, a digital signal processor (DSP), a function generator (function generator), an arbitrary waveform generator (AWG), a signal generator (Signal generator) ) and other devices that can generate signals are not limited in the present invention.

所述的控制裝置20輸出控制訊號,該控制訊號附帶預期頻率範圍的資訊。於一實施例中,控制裝置20為一處理器,前述的處理器並不限制單個,於必要時亦可以經由複數個處理器協同執行程式並完成工作。於一實施態樣中,所述的處理器例如是中央處理器(Central Processing Unit, CPU),或是其他可程式化之一般用途或特殊用途的微處理器(Microprocessor)、數位訊號處理器(Digital Signal Processor, DSP)、可程式化控制器、特殊應用積體電路(Application Specific Integrated Circuits, ASIC)、可程式化邏輯裝置(Programmable Logic Device, PLD)或其他類似裝置或這些裝置的組合,於本發明中不予以限制。The control device 20 outputs a control signal, and the control signal carries information of the expected frequency range. In one embodiment, the control device 20 is a processor. The aforementioned processor is not limited to a single one. When necessary, a plurality of processors can also be used to jointly execute the program and complete the work. In one implementation, the processor is, for example, a central processing unit (CPU), or other programmable general-purpose or special-purpose microprocessor (Microprocessor), digital signal processor ( Digital Signal Processor (DSP), programmable controller, Application Specific Integrated Circuits (ASIC), Programmable Logic Device (PLD) or other similar devices or combinations of these devices, in There is no limitation in the present invention.

所述的頻率調整裝置30包括二輸入端分別連接至採樣頻率裝置10與控制裝置20,於偵測到採樣頻率訊號的採樣頻率超出預期頻率範圍時,切換至接管模式,於接管模式下取代該採樣頻率裝置10。請一併參酌「圖2」,頻率調整裝置30包括比較決策模組32、設置於比較決策模組32輸出的雜訊調整模組34、設置於雜訊調整模組34輸出的映射模組36、以及設置於映射模組36輸出的頻率調整模組38。前述的比較決策模組32的輸入端分別連接至該採樣頻率裝置10、該頻率調整模組38與該控制裝置20的輸出端。該比較決策模組32於初始情況下係啟動休眠模式,於休眠模式下該比較決策模組32直接輸出採樣頻率裝置10的採樣頻率訊號;該比較決策模組32於偵測到該採樣頻率訊號的該採樣頻率超出該預期頻率範圍時啟動該接管模式,以接管該採樣頻率裝置10。於該接管模式下,該比較決策模組32根據該採樣頻率是否超出該預期頻率範圍決定輸出該虛擬升降波訊號並根據該採樣頻率是否超出該預期頻率範圍決定輸出虛擬升降波訊號,其中前面所述的採樣頻率初次為採樣頻率裝置10採樣頻率訊號的採樣頻率,第二次開始則為該頻率調整模組38採樣頻率穩定訊號的更新後採樣頻率;於一實施例中,所述的虛擬升降波可以是三角波、亦可以是弦波等,於本發明中不予以限制;於一實施例中,虛擬升降波的峰值及峰谷係介於0與1之間。比較決策模組32包含至少一信號分析器(Signal Analyzer),用於將離散訊號轉成數值,所述的信號分析器可以包括但不限定是頻譜分析儀或其他能作為訊號轉換功能的其他裝置,於本發明中不予以限制。The frequency adjustment device 30 includes two input terminals respectively connected to the sampling frequency device 10 and the control device 20. When detecting that the sampling frequency of the sampling frequency signal exceeds the expected frequency range, it switches to the takeover mode and replaces the sampling frequency signal in the takeover mode. Sampling frequency device 10. Please refer to "Figure 2" together. The frequency adjustment device 30 includes a comparison decision module 32, a noise adjustment module 34 provided at the output of the comparison decision module 32, and a mapping module 36 provided at the output of the noise adjustment module 34. , and the frequency adjustment module 38 provided at the output of the mapping module 36. The input terminals of the aforementioned comparison decision module 32 are respectively connected to the output terminals of the sampling frequency device 10 , the frequency adjustment module 38 and the control device 20 . The comparison decision-making module 32 initially activates the sleep mode. In the sleep mode, the comparison decision-making module 32 directly outputs the sampling frequency signal of the sampling frequency device 10; the comparison decision-making module 32 detects the sampling frequency signal. When the sampling frequency exceeds the expected frequency range, the takeover mode is activated to take over the sampling frequency device 10 . In the takeover mode, the comparison decision module 32 determines to output the virtual up and down wave signals according to whether the sampling frequency exceeds the expected frequency range and determines to output the virtual up and down wave signals according to whether the sampling frequency exceeds the expected frequency range, wherein the above The above-mentioned sampling frequency is the sampling frequency of the sampling frequency signal of the sampling frequency device 10 for the first time, and the updated sampling frequency of the sampling frequency stable signal of the frequency adjustment module 38 from the second time; in one embodiment, the virtual rise and fall The wave can be a triangular wave, a sine wave, etc., which is not limited in the present invention; in one embodiment, the peak value and peak trough of the virtual rising and falling wave are between 0 and 1. The comparison decision module 32 includes at least one signal analyzer (Signal Analyzer) for converting discrete signals into numerical values. The signal analyzer may include but is not limited to a spectrum analyzer or other devices that can serve as signal conversion functions. , is not limited in the present invention.

請一併參酌「圖3」,雜訊調整模組34依據該比較決策模組32輸出的虛擬升降波訊號(虛擬上升波或虛擬下降波)輸出一輸出代碼。於一實施例中,雜訊調整模組34包括第一加法器A1、第二加法器A2、第一延遲器D1、第二延遲器D2、第三延遲器D3、第一乘法器M1、第二乘法器M2、以及多位階量化器NQ。該第一加法器A1的輸入端連接至音量控制裝置10的輸出、第一乘法器M1的輸出、第二乘法器M2的輸出、以及第三延遲器D3的輸出;該第二加法器A2的輸入端連接至該第一加法器A1的輸出、以及該多位階量化器NQ的輸出,其中該第二加法器A2的輸入端與該第一加法器A1的輸出之間進一步包括有一反向器(圖未示)以構成減法迴路;該第一延遲器D1的輸入端連接至該第二加法器A2的輸出,該第一乘法器M1的輸入連接至該第一延遲器D1的輸出以構成一階延遲回授迴路;該第二延遲器D2的輸入端連接至該第一延遲器D1的輸出,該第二乘法器M2的輸入連接至該第二延遲器D2的輸出以構成二階延遲迴路,其中該第二乘法器M2的輸出與該第一加法器A1進一步包括一反向器(圖未示)以構成減法迴路;該第三延遲器D3的輸入端連接至該第二延遲器D2的輸出以構成三階延遲迴路;該多位階量化器NQ的輸入端連接至該第一加法器A1的輸出,藉以將第一加法器A1的輸出(例如w[n])轉換為量化代碼。Please also refer to "Figure 3". The noise adjustment module 34 outputs an output code based on the virtual up and down wave signal (virtual up wave or virtual down wave) output by the comparison decision module 32. In one embodiment, the noise adjustment module 34 includes a first adder A1, a second adder A2, a first delayer D1, a second delayer D2, a third delayer D3, a first multiplier M1, and a third delayer D3. A square multiplier M2, and a multi-level quantizer NQ. The input terminal of the first adder A1 is connected to the output of the volume control device 10, the output of the first multiplier M1, the output of the second multiplier M2, and the output of the third delayer D3; the output of the second adder A2 The input terminal is connected to the output of the first adder A1 and the output of the multi-level quantizer NQ, wherein an inverter is further included between the input terminal of the second adder A2 and the output of the first adder A1 (not shown) to form a subtraction loop; the input end of the first delayer D1 is connected to the output of the second adder A2, and the input of the first multiplier M1 is connected to the output of the first delayer D1 to form First-order delay feedback loop; the input end of the second delayer D2 is connected to the output of the first delayer D1, and the input of the second multiplier M2 is connected to the output of the second delayer D2 to form a second-order delay loop. , wherein the output of the second multiplier M2 and the first adder A1 further include an inverter (not shown) to form a subtraction loop; the input end of the third delayer D3 is connected to the second delayer D2 The output of the multi-level quantizer NQ forms a third-order delay loop; the input terminal of the multi-level quantizer NQ is connected to the output of the first adder A1, thereby converting the output of the first adder A1 (such as w[n]) into a quantization code.

所述的第一加法器A1、第二加法器A2可以包括但不限定於加法器(Adder)、半加器(Half Adder)、全加器(Full adder)、波紋進位加法器、超前進位加法器實現、或其它用於執行加法運算的數位電路、邏輯閘或其組合,於本發明中不予以限制。The first adder A1 and the second adder A2 may include, but are not limited to, an adder, a half adder, a full adder, a ripple carry adder, and a carry-ahead. Adder implementation, or other digital circuits, logic gates, or combinations thereof for performing addition operations are not limited in the present invention.

所述的第一延遲器D1、第二延遲器D2、第三延遲器D3可以包括但不限定於積分器(Integrator)、計數器(Counter)等可以做為訊號延遲或積分用途之電路或其組合,於本發明中不予以限制。The first delayer D1, the second delayer D2, and the third delayer D3 may include but are not limited to integrators, counters, and other circuits that can be used for signal delay or integration, or a combination thereof. , is not limited in the present invention.

所述的第一乘法器M1、第二乘法器M2可以包括但不限定於運算放大器(op amp) 、或由複數個加法器所構成的電路、或其他類似的裝置,於本發明中不予以限制。The first multiplier M1 and the second multiplier M2 may include but are not limited to operational amplifiers (op amps), or circuits composed of a plurality of adders, or other similar devices, which are not included in the present invention. limit.

所述的映射模組36係依據該輸出代碼映射輸出一調頻訊號,所述的映射模組36可以包括具有關聯陣列查找功能(查找表)的處理器或算術邏輯單元(Arithmetic Logic Unit, ALU),於本發明中不予以限制。The mapping module 36 maps and outputs an FM signal based on the output code. The mapping module 36 may include a processor or an Arithmetic Logic Unit (ALU) with an associative array lookup function (lookup table). , is not limited in the present invention.

所述的頻率調整模組38依據該調頻訊號更新該採樣頻率並輸出採樣頻率穩定訊號至該採樣裝置40,並將更新後的該採樣頻率穩定訊號一併回授至該比較決策模組32以構成循環迴路。於一較佳實施例中,頻率調整模組38可以包括但不限定於壓控振盪器(Voltage-Controlled Oscillator)或其他可作為頻率調整用途的其他裝置,於本發明中不予以限制。The frequency adjustment module 38 updates the sampling frequency according to the frequency modulation signal and outputs a stable sampling frequency signal to the sampling device 40, and feeds back the updated stable sampling frequency signal to the comparison decision module 32. Form a cyclical loop. In a preferred embodiment, the frequency adjustment module 38 may include but is not limited to a voltage-controlled oscillator (Voltage-Controlled Oscillator) or other other devices that can be used for frequency adjustment, which are not limited in the present invention.

所述的採樣裝置40的輸入端連接至頻率調整裝置30,依據更新後的該採樣頻率穩定訊號對目標訊號進行採樣。前述的採樣裝置40為一採樣迴路,該採樣迴路為能在一定時間間隔採樣獲得時間上離散訊號的裝置或電路,於本發明中不予以限制。The input end of the sampling device 40 is connected to the frequency adjustment device 30, and the target signal is sampled according to the updated sampling frequency stable signal. The aforementioned sampling device 40 is a sampling loop, which is a device or circuit that can sample and obtain time-discrete signals at certain time intervals, and is not limited in the present invention.

以上針對本發明硬體架構的一具體實施例進行說明,有關於本發明的工作方式將於下面進行更進一步的說明,請一併參閱「圖4」,為本發明動態採樣率調整系統的工作流程示意圖:The above describes a specific embodiment of the hardware architecture of the present invention. The working method of the present invention will be further described below. Please refer to "Figure 4" for the working of the dynamic sampling rate adjustment system of the present invention. Process diagram:

於本實施例中所述的採樣頻率訊號與採樣頻率穩定訊號為由0與1構成的方波。於其他的實施例中,所述的採樣頻率訊號與採樣頻率穩定訊號可以為其他波形,並且該波形的峰值並非本發明所欲限定的範疇,先行敘明於此。The sampling frequency signal and the sampling frequency stable signal described in this embodiment are square waves composed of 0s and 1s. In other embodiments, the sampling frequency signal and the sampling frequency stabilization signal can be other waveforms, and the peak value of the waveform is not limited to the scope of the present invention, as will be explained here.

首先,控制裝置20根據用戶設定或出廠設定儲存預期頻率範圍,並依據該預期頻率範圍輸出控制訊號至頻率調整裝置30;採樣頻率裝置10輸出採樣頻率訊號至頻率調整裝置30(步驟S201)。First, the control device 20 stores the expected frequency range according to user settings or factory settings, and outputs a control signal to the frequency adjustment device 30 according to the expected frequency range; the sampling frequency device 10 outputs the sampling frequency signal to the frequency adjustment device 30 (step S201).

於一實施例中,前述的預期頻率範圍可以是用戶設定或是出廠時的既有設定數值;於另一實施例中,該控制裝置20由期望頻率與閾值範圍取得該預期頻率範圍,該預期頻率範圍的上限值為該期望頻率加上該閾值範圍,該預期頻率範圍的下限值為該期望頻率減去該閾值範圍。In one embodiment, the aforementioned expected frequency range may be a user setting or an existing factory setting value; in another embodiment, the control device 20 obtains the expected frequency range from the expected frequency and the threshold range, and the expected frequency range is The upper limit of the frequency range is the desired frequency plus the threshold range, and the lower limit of the desired frequency range is the desired frequency minus the threshold range.

接續,頻率調整裝置30的比較決策模組32持續偵測採樣頻率裝置10輸出的採樣頻率訊號,並由該採樣頻率訊號獲取採樣頻率,確認採樣頻率是否超出該預期頻率範圍(步驟S202);若否,則重複執行步驟S202持續偵測,或是設定延時,經一段時間後再次進行確認、又或是設定觸發條件,在觸發條件滿足時(例如超過一定數據量、又或是偵測到雜訊、訊號丟失情況)再次進行偵測;若偵測到該採樣頻率訊號的該採樣頻率超出該預期頻率範圍時,啟動一接管模式(步驟S203),並繼續後方的程序;於啟動接管模式後,該比較決策模組32根據該採樣頻率是否超出該預期頻率範圍以決定是否輸出虛擬升降波訊號(步驟S204)。若是的話繼續執行步驟205,當該比較決策模組32於偵測到回授的該採樣頻率達到一落於該預期頻率範圍內的預期值時(若否的情況),係輸出一頻率鎖定訊號至該頻率調整模組32並停止更新該採樣頻率(步驟S210)。Next, the comparison decision module 32 of the frequency adjustment device 30 continues to detect the sampling frequency signal output by the sampling frequency device 10, and obtains the sampling frequency from the sampling frequency signal to confirm whether the sampling frequency exceeds the expected frequency range (step S202); if If not, repeat step S202 to continue detection, or set a delay and confirm again after a period of time, or set a trigger condition. signal, signal loss), perform detection again; if it is detected that the sampling frequency of the sampling frequency signal exceeds the expected frequency range, start a takeover mode (step S203), and continue the subsequent procedures; after starting the takeover mode , the comparison decision module 32 determines whether to output a virtual up and down wave signal based on whether the sampling frequency exceeds the expected frequency range (step S204). If so, continue to step 205. When the comparison decision module 32 detects that the sampling frequency of the feedback reaches an expected value within the expected frequency range (if not), it outputs a frequency lock signal. to the frequency adjustment module 32 and stop updating the sampling frequency (step S210).

於本實施例中,當比較決策模組32接收到採樣頻率訊號(或者在第二次以上迴圈時所接收到的採樣頻率穩定訊號)高於預期頻率範圍的上限值時輸出一虛擬下降波訊號;當比較決策模組32接收到採樣頻率訊號(採樣頻率穩定訊號)低於預期頻率範圍的下限值時輸出一虛擬上升波訊號。In this embodiment, when the comparison decision module 32 receives the sampling frequency signal (or the sampling frequency stable signal received during the second or more loops) is higher than the upper limit of the expected frequency range, it outputs a virtual drop. wave signal; when the comparison decision module 32 receives that the sampling frequency signal (sampling frequency stable signal) is lower than the lower limit of the expected frequency range, it outputs a virtual rising wave signal.

接續,該雜訊調整模組34依據該虛擬升降波訊號產生輸出代碼至映射模組36(步驟S205)。Next, the noise adjustment module 34 generates and outputs codes to the mapping module 36 according to the virtual up and down wave signals (step S205).

於本實施例中,該雜訊調整模組34係依據下面的關係式輸出該輸出代碼: ; 其中, 為該虛擬升降波訊號於n階時的數值, 為n階時的輸出代碼, 階時的輸出代碼, 階時的輸出代碼, 階時的輸出代碼, 中間的轉移函數, 中間的轉移函數, 中間的轉移函數, 中間的轉移函數。 In this embodiment, the noise adjustment module 34 outputs the output code according to the following relationship: ; ; in, is the value of the virtual rising and falling wave signal at nth order, is the output code at nth order, for The output code of the order, for The output code of the order, for The output code of the order, for and The intermediate transfer function, for and The intermediate transfer function, for and The intermediate transfer function, for and intermediate transfer function.

其中,該 的函式如下: ; 其中,M為該多位階量化器預設的位階數值,floor()為一floor函數。 Among them, the The function is as follows: ; Among them, M is the preset level value of the multi-level quantizer, and floor() is a floor function.

接續,映射模組36依據接收到的輸出代碼映射輸出一調頻訊號至頻率調整模組38(步驟S206)。Next, the mapping module 36 maps and outputs a frequency modulation signal to the frequency adjustment module 38 according to the received output code (step S206).

於本實施例中,映射模組36依據下面的關係式映射輸出該調頻訊號: ; 其中, 為第 階段輸入至映射模組36的該輸出代碼, 為第 階段映射輸出的該調頻訊號,Z為正整數, 為百萬分率(Parts Per Million, PPM)。 In this embodiment, the mapping module 36 maps and outputs the FM signal according to the following relationship: ; ; in, for the first This output code is staged into the mapping module 36, for the first The FM signal output by stage mapping, Z is a positive integer, It is Parts Per Million (PPM).

接續,頻率調整模組38接收調頻訊號與採樣頻率裝置10的採樣頻率訊號,頻率調整模組38依據該調頻訊號更新該採樣頻率並輸出採樣頻率穩定訊號至採樣裝置40(步驟S207)。Next, the frequency adjustment module 38 receives the frequency modulation signal and the sampling frequency signal of the sampling frequency device 10 . The frequency adjustment module 38 updates the sampling frequency according to the frequency modulation signal and outputs a stable sampling frequency signal to the sampling device 40 (step S207 ).

於本實施例中,頻率調整模組38係依據下面的關係式輸出該採樣頻率穩定訊號: ; 其中, 為第 階段輸入至該頻率調整模組38的該調頻訊號, 為第 階段輸入至該頻率調整模組38的採樣頻率(初次為該採樣頻率訊號的採樣頻率,第二次後為該採樣頻率穩定訊號的採樣頻率), 為該頻率調整模組38第 階段輸出的該採樣頻率。 In this embodiment, the frequency adjustment module 38 outputs the sampling frequency stable signal according to the following relationship: ; in, for the first The FM signal input to the frequency adjustment module 38 in one stage, for the first The sampling frequency input to the frequency adjustment module 38 in each stage (the sampling frequency of the sampling frequency signal for the first time, and the sampling frequency of the stable sampling frequency signal after the second time), For the frequency adjustment module 38th The sampling frequency of the stage output.

頻率調整模組38於獲得採樣頻率 後,係經由採樣頻率 生成該採樣頻率穩定訊號。 The frequency adjustment module 38 is used to obtain the sampling frequency After that, the sampling frequency is Generate a stable signal with the sampling frequency.

最後,採樣裝置40接收頻率調整裝置30的採樣頻率穩定訊號並依據該採樣頻率穩定訊號對目標訊號進行採樣(步驟S208)。Finally, the sampling device 40 receives the sampling frequency stable signal from the frequency adjustment device 30 and samples the target signal according to the sampling frequency stable signal (step S208).

於此同時,更新後的採樣頻率將回傳至該比較決策模組32(步驟S209),並回到步驟S204重新執行後續的迴圈直至達成步驟S210的條件。At the same time, the updated sampling frequency will be sent back to the comparison decision module 32 (step S209), and the process will return to step S204 to re-execute subsequent loops until the conditions of step S210 are met.

綜上所述,比起習知技術,本發明能使採樣率的輸入頻率穩定,並且能避免輸入緩衝區溢位,造成系統異常的問題。To sum up, compared with the conventional technology, the present invention can stabilize the input frequency of the sampling rate and avoid the problem of system abnormality caused by input buffer overflow.

以上已將本發明做一詳細說明,惟,以上所述者,僅為本發明之一較佳實施例而已,當不能以此限定本發明實施之範圍,即凡依本發明申請專利範圍所作之均等變化與修飾,皆應仍屬本發明之專利涵蓋範圍內。The present invention has been described in detail above. However, what is described above is only one of the preferred embodiments of the present invention. It should not be used to limit the scope of the present invention. That is, anything based on the patent scope of the present invention is made. Equal changes and modifications should still fall within the scope of the patent of the present invention.

100:動態採樣率調整系統 10:採樣頻率裝置 20:控制裝置 30:頻率調整裝置 32:比較決策模組 34:雜訊調整模組 A1:第一加法器 A2:第二加法器 D1:第一延遲器 D2:第二延遲器 D3:第三延遲器 M1:第一乘法器 M2:第二乘法器 NQ:多位階量化器 36:映射模組 38:頻率調整模組 40:採樣裝置 S201-210:步驟 100:Dynamic sampling rate adjustment system 10: Sampling frequency device 20:Control device 30: Frequency adjustment device 32: Comparative Decision Module 34:Noise adjustment module A1: First adder A2: Second adder D1: first delayer D2: Second delayer D3: The third delayer M1: first multiplier M2: Second multiplier NQ: multi-level quantizer 36: Mapping module 38: Frequency adjustment module 40: Sampling device S201-210: Steps

圖1,本發明動態採樣率調整系統的方塊示意圖(一)。Figure 1 is a block diagram (1) of the dynamic sampling rate adjustment system of the present invention.

圖2,本發明動態採樣率調整系統的方塊示意圖(二)。Figure 2 is a block diagram (2) of the dynamic sampling rate adjustment system of the present invention.

圖3,本發明動態採樣率調整系統的方塊示意圖(三)。Figure 3 is a block diagram (3) of the dynamic sampling rate adjustment system of the present invention.

圖4,本發明動態採樣率調整系統的工作流程示意圖。Figure 4 is a schematic diagram of the work flow of the dynamic sampling rate adjustment system of the present invention.

100:動態採樣率調整系統 100:Dynamic sampling rate adjustment system

10:採樣頻率裝置 10: Sampling frequency device

20:控制裝置 20:Control device

30:頻率調整裝置 30: Frequency adjustment device

40:採樣裝置 40: Sampling device

Claims (10)

一種動態採樣率調整系統,係配合採樣頻率裝置設置,該採樣頻率裝置依據採樣頻率輸出採樣頻率訊號,該動態採樣率調整系統包括: 一控制裝置,輸出控制訊號,該控制訊號附帶預期頻率範圍的資訊; 一頻率調整裝置,其輸入端分別連接至該採樣頻率裝置與該控制裝置,該頻率調整裝置包括一比較決策模組、一設置於該比較決策模組輸出的雜訊調整模組、一設置於該雜訊調整模組輸出的映射模組、以及一設置於該映射模組輸出的頻率調整模組,該比較決策模組的輸入端分別連接至該採樣頻率裝置、該頻率調整模組與該控制裝置的輸出端,該比較決策模組於偵測到該採樣頻率訊號的該採樣頻率超出該預期頻率範圍啟動一接管模式,於該接管模式下該比較決策模組根據該採樣頻率是否超出該預期頻率範圍決定輸出虛擬升降波訊號,該雜訊調整模組依據該虛擬升降波訊號產生輸出代碼,該映射模組係依據該輸出代碼映射輸出調頻訊號,該頻率調整模組依據該調頻訊號更新該採樣頻率並輸出採樣頻率穩定訊號,並將更新後的該採樣頻率穩定訊號回授至該比較決策模組以構成循環迴路;以及 一採樣裝置,其輸入端連接至該頻率調整裝置,該採樣裝置依據更新後的該採樣頻率穩定訊號對目標訊號進行採樣。 A dynamic sampling rate adjustment system is configured in conjunction with a sampling frequency device. The sampling frequency device outputs a sampling frequency signal based on the sampling frequency. The dynamic sampling rate adjustment system includes: A control device outputs a control signal, and the control signal carries information in the expected frequency range; A frequency adjustment device, the input ends of which are respectively connected to the sampling frequency device and the control device. The frequency adjustment device includes a comparison decision-making module, a noise adjustment module set at the output of the comparison decision-making module, and a noise adjustment module set at the output of the comparison decision-making module. The noise adjustment module outputs a mapping module and a frequency adjustment module provided at the output of the mapping module. The input end of the comparison decision module is respectively connected to the sampling frequency device, the frequency adjustment module and the At the output end of the control device, the comparison decision-making module activates a takeover mode when detecting that the sampling frequency of the sampling frequency signal exceeds the expected frequency range. In the takeover mode, the comparison decision-making module determines whether the sampling frequency exceeds the expected frequency range. The expected frequency range determines the output of a virtual up and down wave signal. The noise adjustment module generates an output code based on the virtual up and down wave signal. The mapping module maps and outputs an FM signal based on the output code. The frequency adjustment module updates based on the FM signal. The sampling frequency is used to output a stable sampling frequency signal, and the updated stable sampling frequency signal is fed back to the comparison decision module to form a loop; and A sampling device, the input end of which is connected to the frequency adjustment device, the sampling device samples the target signal according to the updated sampling frequency stable signal. 如請求項1所述的動態採樣率調整系統,其中,該雜訊調整模組的輸入及輸出係符合以下算式: ; 其中, 為該虛擬升降波訊號於n階時的數值, 為n階時的該輸出代碼, 中間的轉移函數, 為多位階量化器的函式。 The dynamic sampling rate adjustment system as described in claim 1, wherein the input and output of the noise adjustment module comply with the following formula: ; ; in, is the value of the virtual rising and falling wave signal at nth order, is the output code at nth order, for and The intermediate transfer function, is a function of multi-level quantizer. 如請求項2所述的動態採樣率調整系統,其中,該比較決策模組於偵測到回授的該採樣頻率達到一落於該預期頻率範圍內的預期值時,係輸出一頻率鎖定訊號至該頻率調整模組並停止更新該採樣頻率。The dynamic sampling rate adjustment system as described in claim 2, wherein the comparison decision-making module outputs a frequency locking signal when detecting that the sampling frequency of the feedback reaches an expected value within the expected frequency range. to the frequency adjustment module and stop updating the sampling frequency. 如請求項2所述的動態採樣率調整系統,其中,該 的函式如下: ; 其中,M為多位階量化器預設的位階數值,floor()為一floor函數。 The dynamic sampling rate adjustment system as described in claim 2, wherein the The function is as follows: ; Among them, M is the preset level value of the multi-level quantizer, and floor() is a floor function. 如請求項2所述的動態採樣率調整系統,其中,該比較決策模組接收到該採樣頻率穩定訊號高於該預期頻率範圍的上限值時輸出虛擬下降波訊號;該比較決策模組接收到該採樣頻率穩定訊號低於該預期頻率範圍的下限值時輸出虛擬上升波訊號。The dynamic sampling rate adjustment system as described in claim 2, wherein the comparison decision-making module outputs a virtual downwave signal when it receives that the sampling frequency stable signal is higher than the upper limit of the expected frequency range; the comparison decision-making module receives When the stable sampling frequency signal is lower than the lower limit of the expected frequency range, a virtual rising wave signal is output. 如請求項2所述的動態採樣率調整系統,其中,該控制裝置由期望頻率與閾值範圍取得該預期頻率範圍,該預期頻率範圍的上限值為該期望頻率加上該閾值範圍,該預期頻率範圍的下限值為該期望頻率減去該閾值範圍。The dynamic sampling rate adjustment system as described in claim 2, wherein the control device obtains the expected frequency range from the expected frequency and the threshold range, and the upper limit of the expected frequency range is the expected frequency plus the threshold range. The lower limit of the frequency range is the desired frequency minus the threshold range. 如請求項6所述的動態採樣率調整系統,其中,該比較決策模組接收到該採樣頻率穩定訊號高於該預期頻率範圍的上限值時輸出虛擬下降波訊號;該比較決策模組接收到該採樣頻率穩定訊號低於該預期頻率範圍的下限值時輸出虛擬上升波訊號。The dynamic sampling rate adjustment system as described in claim 6, wherein the comparison decision-making module outputs a virtual downwave signal when it receives that the sampling frequency stable signal is higher than the upper limit of the expected frequency range; the comparison decision-making module receives When the stable sampling frequency signal is lower than the lower limit of the expected frequency range, a virtual rising wave signal is output. 如請求項2所述的動態採樣率調整系統,其中,該映射模組係依據下面的關係式映射輸出該調頻訊號: ; 其中, 為第 階段輸入至該映射模組的該輸出代碼, 為第 階段映射輸出的該調頻訊號,Z為正整數, 為百萬分率(Parts Per Million, PPM)。 The dynamic sampling rate adjustment system as described in claim 2, wherein the mapping module maps and outputs the frequency modulation signal according to the following relationship: ; ; in, for the first stage input to the output code of the mapping module, for the first The FM signal output by stage mapping, Z is a positive integer, It is Parts Per Million (PPM). 如請求項8所述的動態採樣率調整系統,其中,該頻率調整模組的輸入及輸出係符合以下算式: ; 其中, 為第 階段輸入至該頻率調整模組的該調頻訊號, 為第 階段輸入至該頻率調整模組的該採樣頻率, 為頻率調整模組第 階段輸出的該採樣頻率。 The dynamic sampling rate adjustment system as described in claim 8, wherein the input and output of the frequency adjustment module comply with the following formula: ; in, for the first The FM signal input to the frequency adjustment module in one stage, for the first The sampling frequency input to the frequency adjustment module at the stage, For the frequency adjustment module No. The sampling frequency of the stage output. 如請求項1至9中任一項所述的動態採樣率調整系統,其中,該採樣頻率訊號與該採樣頻率穩定訊號為一由0與1構成的方波。The dynamic sampling rate adjustment system as described in any one of claims 1 to 9, wherein the sampling frequency signal and the sampling frequency stable signal are a square wave composed of 0s and 1s.
TW111106519A 2022-02-23 2022-02-23 Dynamic sampling rate tuning system TWI805238B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW111106519A TWI805238B (en) 2022-02-23 2022-02-23 Dynamic sampling rate tuning system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW111106519A TWI805238B (en) 2022-02-23 2022-02-23 Dynamic sampling rate tuning system

Publications (2)

Publication Number Publication Date
TWI805238B TWI805238B (en) 2023-06-11
TW202335440A true TW202335440A (en) 2023-09-01

Family

ID=87802940

Family Applications (1)

Application Number Title Priority Date Filing Date
TW111106519A TWI805238B (en) 2022-02-23 2022-02-23 Dynamic sampling rate tuning system

Country Status (1)

Country Link
TW (1) TWI805238B (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3311889B2 (en) * 1995-02-10 2002-08-05 株式会社日立国際電気 Sampling signal generation circuit
DE10203596C1 (en) * 2002-01-30 2003-08-14 Infineon Technologies Ag Procedure for sampling phase control
US9634624B2 (en) * 2014-12-24 2017-04-25 Stmicroelectronics S.R.L. Method of operating digital-to-analog processing chains, corresponding device, apparatus and computer program product
CN106537786B (en) * 2016-05-05 2019-03-19 香港应用科技研究院有限公司 Asynchronous successive approximation register analog-digital converter (SAR ADC) in synchronization system

Also Published As

Publication number Publication date
TWI805238B (en) 2023-06-11

Similar Documents

Publication Publication Date Title
JP6085523B2 (en) Semiconductor device and method of operating semiconductor device
WO2017004869A1 (en) Device and method for error estimation and correction of analog-to-digital converter
US9824673B2 (en) Apparatus for tracking the fundamental frequency of a signal with harmonic components stronger than the fundamental
CN108168680B (en) Dynamic weighing filtering method and system
US11469670B2 (en) Methods and apparatus to improve power converter on-time generation
JP2004507916A (en) Noise shaping and digital frequency synthesis
CN112311391A (en) Time-to-digital converter, phase-locked loop and electronic equipment
WO2017053640A1 (en) Fast-locking frequency synthesizer
TW202335440A (en) Dynamic sampling rate tuning system
CN107436619B (en) High-precision low-cost digital sine wave generating device
CN115705020A (en) Sampling rate micro-control system
US6842131B1 (en) Delta-sigma modulator
CN109857188B (en) Pulse wave generation method, device and system based on DDS
CN103873025B (en) A kind of triangular signal production method and triangular-wave generator
CN107809238B (en) Phase-locked loop locking detection method based on MCU and MCU
TWI429203B (en) Phase digitizing apparatus and method thereof
TW202205813A (en) Sampling rate fine tuning system
CN115967398A (en) Method, system and equipment for updating conversion coefficient of time-to-digital converter
JP6478896B2 (en) Amplifier circuit, pipeline ADC, and wireless communication device
CN113346903A (en) Online self-adaptive direct current loss adjustment and correction circuit and receiver
JP5883705B2 (en) Signal generator
RU127557U1 (en) SOLID SOLID FORMING DEVICE WITH DIRECT DIGITAL FREQUENCY SYNTHESIS
US8339160B2 (en) Clock generating device and jitter reducing method in the clock generating device
CN104753530A (en) Phase correction and nonuniform phase amplitude conversion method and device in DDS
TWI774485B (en) All-digital phase-locked loop and calibration method thereof