JP2023034981A - Receiving device, communication system, and frame synchronization recovery method - Google Patents
Receiving device, communication system, and frame synchronization recovery method Download PDFInfo
- Publication number
- JP2023034981A JP2023034981A JP2021141533A JP2021141533A JP2023034981A JP 2023034981 A JP2023034981 A JP 2023034981A JP 2021141533 A JP2021141533 A JP 2021141533A JP 2021141533 A JP2021141533 A JP 2021141533A JP 2023034981 A JP2023034981 A JP 2023034981A
- Authority
- JP
- Japan
- Prior art keywords
- frame
- data
- synchronization word
- data loss
- synchronization
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title abstract description 23
- 238000004891 communication Methods 0.000 title abstract description 16
- 238000011084 recovery Methods 0.000 title abstract description 6
- 238000001514 detection method Methods 0.000 claims abstract description 37
- 238000012937 correction Methods 0.000 claims abstract description 19
- 238000000605 extraction Methods 0.000 claims abstract description 18
- 230000005540 biological transmission Effects 0.000 claims description 43
- 238000012790 confirmation Methods 0.000 claims description 12
- 238000012545 processing Methods 0.000 description 15
- 238000005070 sampling Methods 0.000 description 14
- 238000010586 diagram Methods 0.000 description 13
- 239000000284 extract Substances 0.000 description 7
- 230000001360 synchronised effect Effects 0.000 description 5
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 230000001629 suppression Effects 0.000 description 1
Images
Landscapes
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
Description
本発明は、受信装置、該受信装置を備える通信システム及びフレーム同期回復方法に関するものである。 TECHNICAL FIELD The present invention relates to a receiver, a communication system equipped with the receiver, and a frame synchronization recovery method.
従来、複数チャネルのデータを多重及びフレーム化して送信する送信装置と、フレームを受信し、チャネル毎にデータを識別及び抽出する受信装置とを備える通信システムが知られている。このような通信システムにおいて、送信装置は、例えばマイクなどから生成される複数チャネル分の音声データを含むフレームを生成し、受信装置に送信する。また、受信装置は、受信したフレームの同期を行ってチャネル毎にデータを識別及び抽出し、アプリケーションプログラムに音声データを提供する。受信装置におけるフレームの同期方法として、送信装置から同期ワードを含むフレームを送信し、受信装置において同期ワードを検出してフレームを同期することが知られている(例えば特許文献1)。 2. Description of the Related Art Conventionally, a communication system is known that includes a transmitting device that multiplexes and frames data of a plurality of channels and transmits it, and a receiving device that receives frames and identifies and extracts data for each channel. In such a communication system, a transmitting device generates a frame containing audio data for a plurality of channels generated from, for example, a microphone, and transmits the frame to a receiving device. The receiving device also synchronizes the received frames to identify and extract the data for each channel and provides the audio data to the application program. As a method for synchronizing frames in a receiving device, it is known to transmit a frame including a synchronization word from the transmitting device and detect the synchronization word in the receiving device to synchronize the frames (for example, Patent Document 1).
従来の通信システムでは、送信装置で生成されたフレームはバッファに書き込まれ、受信装置によって読み出される。フレームがバッファに書き込まれる周期と、読み出される周期とは非同期であり、受信装置がフレームを読み出す周期は一定ではない。そのため、受信装置によるフレームの読み出しに遅れが生じた場合、バッファがオーバフローし、読み出されたフレームのデータに一部喪失が生じることがある。また、バッファがフル状態の時に、新たなフレームの書き込みが生じた場合、新たなフレームをバッファに書き込むことができないため、該フレームのデータが喪失されてしまう。 In conventional communication systems, frames generated by a transmitting device are written into a buffer and read by a receiving device. The cycle in which frames are written to the buffer and the cycle in which frames are read out are asynchronous, and the cycle in which frames are read out by the receiving device is not constant. Therefore, if there is a delay in reading a frame by the receiving device, the buffer may overflow and some data in the read frame may be lost. Also, when a new frame is written while the buffer is full, the data of that frame is lost because the new frame cannot be written into the buffer.
また、通信異常又は受信装置内ソフトウェアの一時的な処理遅延などにより、送信装置が送信したフレームを受信装置が受信できなかった場合、フレーム内のデータが喪失される場合がある。 In addition, when the receiving device cannot receive the frame transmitted by the transmitting device due to a communication error or a temporary processing delay of the software in the receiving device, the data in the frame may be lost.
上記のようなデータの喪失が生じた場合、受信装置は、適切にフレームの同期を行うことができず、フレームの先頭から終了までのデータ位置が本来のデータ位置とずれたまま処理を継続することになる。その結果、アプリケーションプログラムに提供する音声データにおいて、データ喪失数に応じて隣り合うチャネルのビットが混在してしまい、音声データが正しくなくなるという問題があった。 When data loss occurs as described above, the receiving device cannot properly synchronize the frames, and the data position from the beginning to the end of the frame is deviated from the original data position, and processing continues. It will be. As a result, in the audio data provided to the application program, bits of adjacent channels are mixed according to the number of lost data, resulting in incorrect audio data.
本発明は、上記のような課題を背景としたものであり、データの喪失が生じた場合もフレームの同期を回復することができる受信装置、通信システム及びフレーム同期回復方法を提供することを目的とする。 SUMMARY OF THE INVENTION It is an object of the present invention to provide a receiving apparatus, a communication system, and a frame synchronization recovery method capable of recovering frame synchronization even when data loss occurs. and
本発明に係る受信装置は、データ及び同期ワードを含むフレームを受信する受信部と、同期ワードに基づいてフレームの同期を行うフレーム抽出部と、フレームにおいてデータの喪失が生じたか否かを判断するデータ喪失検出部と、データ喪失検出部において、フレームにおいてデータの喪失が生じたと判断された場合、疑似フレームを生成するフレーム修正部と、疑似フレームを出力する出力部と、を備える。 A receiver according to the present invention includes a receiver for receiving a frame including data and a synchronization word, a frame extractor for synchronizing the frame based on the synchronization word, and determining whether data loss has occurred in the frame. A data loss detection unit, a frame correction unit that generates a pseudo frame when the data loss detection unit determines that data loss has occurred in a frame, and an output unit that outputs the pseudo frame.
本発明に係る通信システムは、上記の受信装置と、送信装置と、を備え、送信装置は、データを生成する入力部と、同期ワードを生成する同期ワード生成部と、データ及び同期ワードを含むフレームを生成するフレーム生成部と、フレームを受信装置に送信する送信部と、を備える。 A communication system according to the present invention includes the receiving device and the transmitting device described above, and the transmitting device includes an input section for generating data, a synchronization word generation section for generating a synchronization word, and data and the synchronization word. A frame generator for generating a frame and a transmitter for transmitting the frame to a receiver are provided.
本発明に係るフレーム同期回復方法は、データ及び同期ワードを含むフレームを受信する工程と、同期ワードに基づいてフレームの同期を行う工程と、フレームにおいてデータの喪失が生じたか否かを判断する工程と、フレームにおいてデータの喪失が生じたと判断された場合、疑似フレームを生成する工程と、疑似フレームを出力する工程と、を含む。 A frame synchronization recovery method according to the present invention comprises the steps of receiving a frame containing data and a synchronization word, synchronizing the frame based on the synchronization word, and determining whether a loss of data has occurred in the frame. and generating a pseudo frame if it is determined that data loss has occurred in the frame; and outputting the pseudo frame.
本発明によれば、フレームにおいてデータの喪失が生じたと判断された場合は疑似フレームを生成して疑似フレームを出力することで、データの喪失が生じた場合もフレームの同期を回復し、データずれのないフレーを出力することができる。 According to the present invention, when it is determined that data loss has occurred in a frame, a pseudo frame is generated and the pseudo frame is output. It is possible to output frames without
実施の形態1.
図1は、実施の形態1に係る通信システム100の概略構成図である。通信システム100は、送信装置1と受信装置2とからなる。送信装置1及び受信装置2は、専用のハードウェア又はCPU及びメモリを備える一般的なPC、もしくはこれらの組み合わせで構成される。本実施の形態では、送信装置1が専用のハードウェアで構成され、受信装置2が一般的なPCで構成されるものとする。また、図1における実線矢印はデータの動きを示し、破線矢印は制御信号の動きを示す。
FIG. 1 is a schematic configuration diagram of a
送信装置1は、入力部11と、同期ワード生成部12と、フレーム生成部13と、送信バッファ部14と、送信部15とを備えている。送信装置1の各部は、専用の機器又は専用の回路により実現される。又は、送信装置1はCPUなどのプロセッサとメモリとを備え、プロセッサがメモリに記憶されるプログラムを実行することにより送信装置1の各部を実現してもよい。もしくは、送信装置1の各部を、専用の機器又は専用の回路と、ソフトウェアとの組み合わせにより実現してもよい。
The
入力部11は、複数のマイク111を備える。入力部11は、フレーム生成部13からのサンプリング周波数信号に基づき、各マイク111に入力される音声から音声データを生成し、フレーム生成部13に出力する。本実施の形態では、入力部11は31個のマイク111を備え、31チャネル分の音声データをフレーム生成部13に出力するものとする。また、入力部11により生成される音声データは、各マイク111につき16ビットとする。なお、入力部11が備えるマイク111の数及び音声データのビット数は、これらに限定されるものではない。
The
同期ワード生成部12は、フレーム生成部13からのサンプリング周波数信号に基づき、フレーム同期のための同期ワードを生成し、フレーム生成部13に出力する。図2は、実施の形態1に係る同期ワード生成部12で生成される同期ワードの一例を示す図である。図2に示すように、本実施の形態の同期ワードは、上位8ビットの繰り返し部と、下位8ビットのシーケンス番号とからなる。同期ワードの繰り返し部は、フレーム毎に「0x7F」と、「0x80」との2つの固定値を順に繰り返す。同期ワードのシーケンス番号は、「0x00」から始まりフレーム毎に1を加算した値であり、「0x00」から「0xFF」の範囲の値を繰り返す。
The
音声データが16ビットの場合、「0x7F」と「0x80」は最大音量と最小音量の音声データとなるため、これらがサンプリング周期毎に発生する事は異常な状態である。そのため、同期ワードの繰り返し部に「0x7F」と「0x80」を用いることで、音声データとは異なる値として扱うことができる。なお、図2に示す同期ワードは、誤同期を避けるために定義された一例であり、必ずしもこの値でなくてもよい。 When the audio data is 16 bits, "0x7F" and "0x80" are audio data with the maximum volume and the minimum volume, so it is an abnormal state for these to occur in each sampling cycle. Therefore, by using "0x7F" and "0x80" in the repetition part of the sync word, it can be handled as a value different from the voice data. Note that the synchronization word shown in FIG. 2 is an example defined to avoid erroneous synchronization, and does not necessarily have to be this value.
フレーム生成部13は、入力部11で生成された音声データと、同期ワード生成部12で生成された同期ワードとを多重してフレームを生成する。図3は、実施の形態1に係るフレーム生成部13で生成されるフレームの構成を示す図である。本実施の形態において、サンプリング周波数は15kHzであり、フレーム生成部13で生成される1フレームは64バイト(固定長)で構成される。サンプリング周波数とデータ数の根拠は以下の様に求められる。まず、入力部11では、各マイク111当たり、サンプリング周期毎に16ビット(2バイト)の音声データが生成される。これにより、入力部11におけるサンプリング周期毎の発生データ数は、2バイト×32(31チャネル+同期ワード)=64バイトとなる。図3では、1フレーム、64バイトのデータを8バイト毎にd0~d7に分割した状態を示している。
The
また、フレーム生成部13は、サンプリング周波数信号を生成し、入力部11と同期ワード生成部12とに出力する。サンプリング周波数信号は、具体的にはサンプリング周波数のクロックである。さらに、フレーム生成部13は、サンプリング周期でフレームを書き込むための書き込み信号を生成し、送信バッファ部14に出力する。
The
送信バッファ部14は、データを保存する送信バッファ141と、送信バッファ141へのデータの書き込み及び送信バッファ141からのデータの読み出しを制御するバッファ制御部142とを有する。送信バッファ141へのデータの書き込み及び送信バッファ141からのデータの読み出しは非同期に実施される。送信バッファ141は、送信装置1が備えるRAM、ROM又はフラッシュメモリなどのメモリである。バッファ制御部142は、フレーム生成部13にて生成されたフレームを、フレーム生成部13からの書き込み信号に基づき1バイトずつ送信バッファ141に書き込む。また、バッファ制御部142は、送信部15からの読み出し信号に基づき、送信バッファ141に記憶されるフレームを構成するデータを1バイトずつ読み出し、送信部15へ出力する。
The
送信部15は、受信装置2と通信規格に基づいた手順で通信を行う。本実施の形態では、送信部15は、USBインターフェース規格に基づいて受信装置2と通信を行う。送信部15は、受信装置2からUSBインターフェース経由で受信する送信バッファ141のデータ有無の問合せに応答する。また、送信部15は、受信装置2からの読み出し指示に基づき、送信バッファ141からフレームを読み出すための読み出し信号を、送信バッファ部14に出力する。そして、送信部15は、送信バッファ141から読み出したフレームを構成するデータをUSBインターフェースに適したUSBパケットに変換し、受信装置2に送信する。
The transmitting
受信装置2は、CPUなどのプロセッサを備え、プロセッサによってプログラムを実行することにより実現される機能部として、受信部21と、フレーム抽出部22と、データ喪失検出部23と、フレーム修正部24と、出力部25とを備える。また、受信装置2は、RAM、ROM又はフラッシュメモリなどのメモリを備え、該メモリは、受信バッファ211と、同期バッファ221と、出力バッファ241とを備える。
The receiving
受信部21は、送信装置1とUSBインターフェース規格に基づいた手順で通信を行い、送信装置1から音声データを含むUSBパケットを受信する。受信部21は、送信装置1の送信バッファ141にデータが保存されているか否かを確認し、送信バッファ141にデータが保存されている場合、送信部15にデータの読み出し指示を行う。また、受信部21は、送信装置1から受信したUSBパケットからフレームを構成するデータ本体を抽出し、受信バッファ211に出力する。受信バッファ211は、受信部21から出力されたデータを保存する。
The receiving
フレーム抽出部22は、受信バッファ211からデータを読み出し、同期ワードを検出してフレーム同期を捕獲する。具体的には、フレーム抽出部22は、フレーム内の連続したデータにおける同期ワードを検索し、検出した同期ワードの位置をフレームの切れ目と認識してフレームを抽出する。フレーム抽出部22は、連続したデータの中に「0x7F」又は「0x80」が存在する場合に、同期ワードを検出したと判断し、「0x7F」又は「0x80」及び下位8ビットを同期ワードと認識する。本実施の形態では、フレームの最後の16ビットに同期ワードが挿入されているため、フレーム抽出部22は、同期ワードの最後のビットの次のビットから同期ワードの最後のビットまでを1フレームとして抽出する。そして、フレーム抽出部22は、抽出したフレームを同期バッファ221に保存する。
The
また、フレーム抽出部22は、同期捕獲した際の同期ワードに基づき、次のフレームの同期ワード期待値を生成し、同期バッファ221に保存する。具体的には、同期捕獲したフレームの同期ワードの繰り返し部が「0x7F」の場合は、同期ワード期待値の繰り返し部を「0x80」とし、同期捕獲したフレームの同期ワードのシーケンス番号に1を加算した値を同期ワード期待値のシーケンス番号とする。なお、最初のフレームの同期ワード期待値はフレーム抽出部22で生成できないため、同期ワードの初期値を最初のフレームの同期ワード期待値として、予め同期バッファ221に保存しておく。
The
データ喪失検出部23は、同期バッファ221に保存されたフレームを読み出し、該フレームにおいてデータの喪失が生じたか否かを判断する。具体的には、データ喪失検出部23は、フレーム内の所定の位置に同期ワード期待値に一致するビット列が存在しない場合、データの喪失が生じたと判断する。また、データ喪失検出部23は、データ喪失数を求め、データ喪失数に応じてデータ喪失が生じているフレームを特定する。
The
フレーム修正部24は、データ喪失検出部23の検出結果に応じて同期バッファ221に保存されるフレームを修正し、出力バッファ241に保存する。具体的には、フレーム修正部24は、データ喪失検出部23により、同期バッファ221から読み出されたフレームにデータ喪失がないと判断された場合、同期バッファ221に保存されたフレームをそのまま出力バッファ241に保存する。また、フレーム修正部24は、データ喪失検出部23により、同期バッファ221から読み出されたフレームにデータ喪失が生じたと判断された場合、データ喪失が生じたフレームに対応する疑似フレームを生成し、出力バッファ241に保存する。
The frame corrector 24 corrects the frame stored in the
出力部25は、出力バッファ241に保存されているフレームを読み出し、フレーム内のチャネル毎のデータを識別及び抽出し、アプリケーションプログラム等での使用のために出力する。出力されるデータの形式又はインターフェース条件等の具体的な内容は、ソフトウェア設計に依存するものとする。
The
本実施の形態の送信装置1の動作について以下に説明する。図4は、実施の形態1に係る送信装置1の動作を示すフローチャートである。まず、入力部11によって、フレーム生成部13からのサンプリング周波数信号に基づき、複数のマイク111に入力された音声から音声データが生成される(S11)。また、同期ワード生成部12によって、フレーム生成部13からのサンプリング周波数信号に基づき、フレーム毎の同期ワードが生成される(S12)。生成された音声データ及び同期ワードは、フレーム生成部13に出力される。
The operation of the
そして、フレーム生成部13によって、サンプリング周波数信号に基づき、入力部11から出力された音声データと、同期ワード生成部12から出力された同期ワードとが多重化され、フレームが生成される(S13)。生成されたフレームは、バッファ制御部142によって、フレーム生成部13からの書き込み信号に基づき、送信バッファ141に書き込まれる(S14)。
Based on the sampling frequency signal, the
そして、送信部15において、受信装置2から読み出し指示を受信した場合(S15:YES)、バッファ制御部142によって、送信部15からの読み出し信号に基づき、送信バッファ141からデータが読み出される(S16)。読み出されたデータは、送信部15に出力され、送信部15によってUSBパケットに変換され、受信装置2に送信される(S17)。
Then, when the
次に本実施の形態の受信装置2の動作について以下に説明する。図5は、実施の形態1に係る受信装置2の動作を示すフローチャートである。まず、受信部21によって、送信装置1の送信バッファ141にデータが保存されているか否かの問い合わせが行われ、送信バッファ141にデータが保存されている場合(S21:YES)、送信装置1に対しデータの読み出し指示が行われる(S22)。そして、受信部21において、送信装置1からUSBパケットを受信すると、受信したパケットからフレームを構成するデータが抽出され、受信バッファ211に保存される(S23)。
Next, the operation of the receiving
続いて、フレーム抽出部22によるフレーム抽出処理が行われる(S24)。図6は、実施の形態1に係るフレーム抽出処理のフローチャートである。フレーム抽出処理では、まず、受信バッファ211からデータが読み出される(S241)。そして、読み出されたデータにおいて同期ワードが検索され、フレームの同期捕獲が行われる(S242)。そして、同期捕獲がなされたフレームが抽出され、同期バッファ221に保存される(S243)。そして、同期捕獲で検出された同期ワードから同期ワード期待値が生成される(S244)。その後、フレーム抽出処理を終了し、図5のフローチャートに戻る。 Subsequently, frame extraction processing is performed by the frame extraction unit 22 (S24). FIG. 6 is a flowchart of frame extraction processing according to the first embodiment. In the frame extraction process, first, data is read from the reception buffer 211 (S241). Synchronization words are searched for in the read data, and frame synchronization capture is performed (S242). Then, the synchronous captured frame is extracted and stored in the synchronous buffer 221 (S243). Then, a synchronous word expected value is generated from the synchronous word detected by the synchronous capture (S244). After that, the frame extraction process is terminated, and the process returns to the flowchart of FIG.
フレーム抽出処理が終了すると、データ喪失検出部23によるデータ喪失検出処理が行われる(S25)。図7は、実施の形態1に係るデータ喪失検出処理のフローチャートである。データ喪失検出処理では、まず、同期バッファ221に保存されたフレームと、該フレームに対応する同期ワード期待値とが読み出され、同期ワード確認位置のビット列と同期ワード期待値とが一致するか否かが判断される(S251)。
When the frame extraction process ends, the data loss detection process is performed by the data loss detection unit 23 (S25). FIG. 7 is a flowchart of data loss detection processing according to the first embodiment. In the data loss detection process, first, the frame stored in the
図8は、実施の形態1に係るデータ喪失検出処理を説明する図である。同期ワード確認位置は、フレームが正常な場合(データ喪失が無い場合)の同期ワードの位置であり、本実施の形態では、フレームの先頭位置から63~64バイト目の位置が同期ワード確認位置となる。フレームにデータ喪失が生じていない場合、すなわちフレームが64バイトのデータを含む場合は、図8(a)に示すように、同期ワード確認位置のビット列は同期ワードであり、同期ワード期待値と一致する。一方、フレームにデータ喪失が生じている場合、すなわちフレームが64バイト未満のデータを含む場合は、図8(b)及び図8(c)に示すように、同期ワード確認位置のビット列は、同期ワード期待値と一致しない。 FIG. 8 is a diagram for explaining data loss detection processing according to the first embodiment. The sync word confirmation position is the position of the sync word when the frame is normal (when there is no data loss). Become. If there is no data loss in the frame, that is, if the frame contains 64 bytes of data, the bit string at the sync word confirmation position is a sync word and matches the sync word expected value, as shown in FIG. 8(a). do. On the other hand, if there is data loss in the frame, i.e., if the frame contains less than 64 bytes of data, the bit string at the sync word confirmation position is changed to the sync word as shown in FIGS. 8(b) and 8(c). Word does not match expected value.
図7に戻って、同期ワード確認位置のビット列と同期ワード期待値とが一致する場合(S251:YES)、フレーム抽出部22により抽出されたフレームにデータ喪失が無いと判断される(S252)。一方、同期ワード確認位置のビット列と同期ワード期待値とが一致しない場合(S251:NO)、現フレームにおけるデータ喪失数を取得する(S253)。なお、「現フレーム」とは、同期バッファ221から読み出されたフレームに含まれるデータの内、フレームの固定長に対応するデータ(1~64バイト目のデータ)である。データ喪失数は、同期ワード確認位置を1ビットずつ前にシフトして同期ワード期待値と一致するビット列(同期ワード)を検索することで取得される。例えば、図8(b)では、1ビット前にシフトすることで同期ワード期待値と一致したため、データ喪失数は1ビットとなる。また、図8(c)では、2ビット前にシフトすることで同期ワード期待値と一致したため、データ喪失数は2ビットとなる。
Returning to FIG. 7, when the bit string of the synchronization word confirmation position and the synchronization word expected value match (S251: YES), it is determined that there is no data loss in the frame extracted by the frame extractor 22 (S252). On the other hand, if the bit string of the synchronization word confirmation position and the synchronization word expected value do not match (S251: NO), the number of lost data in the current frame is acquired (S253). The “current frame” is data corresponding to the fixed length of the frame (1st to 64th byte data) among the data contained in the frame read from the
そして、データ喪失数が62バイトより多いか否かが判断される(S254)。データ喪失数が62バイト以下の場合は(S254:NO)、現フレームにデータ喪失があると判断される(S255)。この場合は、現フレームの同期ワード以外のデータが喪失されたと考えられる。一方、データ喪失数が62バイトより多い場合(S254:YES)、現フレームの同期ワードのデータが喪失したと考えられるため、次フレームのデータ喪失数を取得する(S256)。 Then, it is determined whether or not the number of lost data is greater than 62 bytes (S254). If the number of lost data is 62 bytes or less (S254: NO), it is determined that data is lost in the current frame (S255). In this case, data other than the sync word of the current frame is considered lost. On the other hand, if the number of lost data is more than 62 bytes (S254: YES), it is considered that the data of the synchronization word of the current frame is lost, so the number of lost data of the next frame is acquired (S256).
図9は、実施の形態1に係るデータ喪失検出処理において、同期ワードのデータを喪失した場合の例を説明する図である。図9に示すように、現フレーム(1~64バイト)に同期ワード期待値と一致するビット列がない場合、少なくとも同期ワードのデータが喪失したと考えられる。そのため、この場合は、フレーム抽出部22により抽出されたフレームの65~128バイト目のデータを次フレームの1~64バイトのデータとして、次フレームにおけるデータ喪失数を取得する。この場合は、次フレームの63~64バイトを同期ワード確認位置とし、同期ワード確認位置を1ビットずつ前にシフトしながら同期ワード期待値と一致するビット列(同期ワード)を検索する。
FIG. 9 is a diagram for explaining an example of a case where synchronization word data is lost in the data loss detection process according to the first embodiment. As shown in FIG. 9, if there is no bit string matching the sync word expected value in the current frame (
そして、次フレームのデータ喪失数が63バイトより多いか否かが判断される(S257)。ここで、次フレームのデータ喪失数が63バイト以下の場合(S257:NO)、現フレームと次フレームにデータ喪失があると判断される(S258)。図9の例では、次フレームのデータ喪失数は、2ビットである。この場合は、現フレームの同期ワードのデータが2ビット喪失されたか、現フレームの同期ワードのデータ及び同期ワード以外のデータがそれぞれ1ビット喪失されたか、又は現フレームの同期ワードのデータが1ビット喪失され、次フレームの同期ワード以外のデータが1ビット喪失されたか、の何れかの状況が考えられる。その後、データ喪失検出処理を終了し、図5のフローチャートに戻る。 Then, it is determined whether or not the number of lost data in the next frame is greater than 63 bytes (S257). Here, if the number of data lost in the next frame is 63 bytes or less (S257: NO), it is determined that data is lost in the current frame and the next frame (S258). In the example of FIG. 9, the number of lost data in the next frame is 2 bits. In this case, 2 bits are lost in the data of the sync word of the current frame, 1 bit is lost in each of the data of the sync word and data other than the sync word of the current frame, or 1 bit of the data of the sync word of the current frame is lost. Either one bit of data other than the sync word of the next frame is lost. After that, the data loss detection process is terminated, and the process returns to the flowchart of FIG.
一方、次フレームのデータ喪失数が63バイトより多い場合(S257:YES)、ステップS24へ移行し、再びフレーム抽出処理を行う。現フレーム及び次フレームの何れにも同期ワード期待値と一致するビット列(同期ワード)が存在しない場合、次フレームのデータ喪失数が63バイトより多くなる。この場合は、現フレーム及び次フレームの少なくとも同期ワードのデータが喪失したと考えられる。そのため、次フレームでも同期ワードを検出できない場合は、再度フレーム抽出処理を行って、同期捕獲をやり直すこととする。なお、ここでは次フレームの同期ワードまでの検索としているが、さらに次のフレームの同期ワード確認位置にて同様の検索を行ってもよい。なお、何フレームまで検索するかはシステム仕様によって決定すればよい。 On the other hand, if the number of data lost in the next frame is greater than 63 bytes (S257: YES), the process proceeds to step S24 and performs the frame extraction process again. If there is no bit string (synchronization word) that matches the synchronization word expected value in either the current frame or the next frame, the number of lost data in the next frame is greater than 63 bytes. In this case, it is considered that at least the sync word data of the current frame and the next frame has been lost. Therefore, if the synchronization word cannot be detected in the next frame as well, the frame extraction process is performed again to redo the synchronization capture. Here, the search is performed up to the synchronization word of the next frame, but the same search may be performed at the synchronization word confirmation position of the next frame. The number of frames to be retrieved may be determined according to system specifications.
データ喪失検出処理が終了すると、フレーム修正部24によるフレーム修正処理が行われる(S26)。図10は、実施の形態1に係るフレーム修正処理のフローチャートである。フレーム修正処理では、データ喪失検出部23によって同期バッファ221から読み出されたフレームにデータ喪失が無いと判断された場合(S261:NO)、同期バッファ221から読み出されたフレームをそのまま出力バッファ241に保存する(S262)。
When the data loss detection process ends, the frame correction process is performed by the frame correction unit 24 (S26). 10 is a flowchart of frame correction processing according to
一方、データ喪失検出部23によって同期バッファ221から読み出されたフレームにデータ喪失があると判断された場合(S261:YES)、フレーム修正部24は、疑似データと同期ワード期待値を用いて疑似フレームを生成する。具体的には、データ喪失検出部23によって現フレームと次フレームとにデータ喪失があると判断された場合(S263:YES)、疑似データと同期ワード期待値を用いて現フレームと次フレームに対応する2つの疑似フレームが生成される(S264)。一方、データ喪失検出部23によって現フレームのみにデータ喪失があると判断された場合(S263:NO)、疑似データと同期ワード期待値を用いて現フレームに対応する1つの疑似フレームが生成される(S265)。
On the other hand, if the data
図11は、実施の形態1に係るフレーム修正部24で生成される疑似フレームの一例を示す図である。図11は、2つの疑似フレームを生成した場合を示す。図11に示すように、フレーム修正部24によって生成される疑似フレームは、62バイトの疑似データと、フレームに対応する同期ワード期待値とからなる。疑似データは、通信システム100の用途又は特性を考慮して値が決定される。例えば音声データの場合は、無音の値、1つ前のフレームと同じ値、又は1つ前と1つ後のフレームの値の平均値などが疑似データとして使用される。また、上記のようにデータ喪失検出部23では、データ喪失数を求めることはできるが、フレームのどのデータが喪失されたのかを判断することはできない。そのため、フレーム修正部24では、データが喪失した可能性のあるフレーム全体を疑似フレームに置き換える。
FIG. 11 is a diagram showing an example of pseudo frames generated by the frame correction unit 24 according to the first embodiment. FIG. 11 shows a case where two pseudo frames are generated. As shown in FIG. 11, the pseudo frame generated by the frame corrector 24 consists of 62 bytes of pseudo data and a sync word expected value corresponding to the frame. The values of the pseudo data are determined in consideration of the usage or characteristics of the
そして、ステップS264又はS265で生成された疑似フレームが、出力バッファ241に保存される(S266)。これにより、出力バッファ241に保存されたフレームは、全て固定長64バイトのデータを含み、フレーム同期が維持される。その後、フレーム修正処理を終了して、図5のフローチャートに戻る。
Then, the pseudo frame generated in step S264 or S265 is stored in the output buffer 241 (S266). As a result, all frames stored in the
フレーム修正処理が終了すると、出力部25によって、出力バッファ241に保存されたフレームが読み出され、読み出されたフレームから31チャネル分の音声データが抽出されて、アプリケーションプログラム等に出力される(S27)。
When the frame correction process is completed, the
本実施の形態によれば、以下の効果が期待できる。まず、送信装置1で生成される同期ワードが、2つの固定値を繰り返す繰り返し部とシーケンス番号とを含むことにより、同期ワードが1つの固定値からなる場合よりも、受信装置2においてフレーム同期捕獲時の誤同期を抑制することができる。また、同期ワードが繰り返し部とシーケンス番号とを含むことにより、同期ワードが1つの固定値の場合よりも検出確度が高くなり、受信装置2におけるデータ喪失検出処理において、同期ワード期待値と一致するビット列を検索する際の判定精度が向上する。
According to this embodiment, the following effects can be expected. First, since the synchronization word generated by the
また、同期ワードがシーケンス番号を含むことにより、フレーム毎に異なる同期ワードの値とすることができる。そのため、受信装置2におけるデータ喪失検出処理において、同期ワード期待値と一致するビット列を検索する際に、データ喪失数がフレームの大きさに達した場合、すなわちフレーム単位の喪失が発生した場合、同期ワードのデータが喪失されたことを判断できる。
Also, since the sync word includes a sequence number, the value of the sync word can be different for each frame. Therefore, in the data loss detection process in the receiving
また、受信装置2がデータ喪失検出部23を備えることで、データ喪失の有無、データ喪失が生じた場合のデータ喪失数、及びデータ喪失が生じたフレームの特定などのデータ喪失情報を得ることができる。さらに、受信装置2がフレーム修正部24を備えることで、データ喪失情報を用いてデータが喪失したフレームを削除し、疑似データと同期ワード期待値とにより生成した疑似フレームに置き換えることができる。これにより、フレームの同期を回復することができるため、フレームにおけるデータにずれが生じることがなく、隣り合うチャネルのビットが混在することを抑制できる。その結果、データ喪失したフレーム以外の正しいデータを確実に後段のアプリケーションに提供する事ができる。
In addition, since the receiving
また、データ喪失が生じた場合に、フレーム同期を再度確立する場合は、フレーム同期を確立するまでの間のデータがずれたままとなるが、本実施の形態では、データ喪失が生じた場合に疑似フレームを生成して出力するため、データのずれが発生することがない。また、フレーム同期を確立するまでのデータを廃棄する必要もないため、アプリケーションへのデータ供給の連続性を保つことができる。 Further, when frame synchronization is re-established when data loss occurs, the data remains out of sync until frame synchronization is established. Since pseudo frames are generated and output, there is no data deviation. Also, since there is no need to discard data until frame synchronization is established, continuity of data supply to applications can be maintained.
以上が本発明の実施の形態の説明であるが、本発明は、上記の実施の形態の構成に限定されるものではなく、その技術的思想の範囲内で様々な変形又は組み合わせが可能である。例えば、実施の形態1では、送信装置1から受信装置2に音声データを送信する場合を例に説明したが、これに限定されるものではない。送信装置1の送信バッファ141のオーバフロー発生要因が、受信装置2からの読み出し動作に依存するシステムでも同じ課題が存在する。特に、送信装置1の簡素化、低価格化等により、オーバフローが生じた事を受信装置2に伝える仕組みがとれない装置において、本発明を適用することが有効である。
Although the embodiments of the present invention have been described above, the present invention is not limited to the configurations of the above embodiments, and various modifications and combinations are possible within the scope of the technical idea thereof. . For example, in
また、受信装置2の出力バッファ241において、正しい音声データを含むフレームと疑似フレームとを識別可能に保存し、出力部25におけるデータ出力の際に疑似フレームか否かに関する情報を出力してもよい。これにより、後段のアプリケーションにおいて、疑似フレームか否かに関する情報を利用することができる。例えば、疑似フレームの数が閾値を超えた場合に、送信バッファ141のオーバフロー又は通信障害などの不具合が発生していると判断し、使用者に警告することなどができる。
In addition, the
また、データ喪失検出部23において、同期ワードの誤検出を抑制するための処理を行ってもよい。図12は、変形例に係るデータ喪失検出処理を説明する図である。変形例において、データ喪失検出部23は、同期ワード確認位置から1ビットずつ前にシフトしながら、フレームの全てのビットに対して同期ワード期待値と一致するかを判断する。そして、同期ワード期待値と一致するビット列を同期ワード候補として抽出する。図12の例では、62~63バイト目のビット列が同期ワード候補C1とされ、40~41バイト目のビット列が同期ワード候補C2とされる。
Further, the data
そして、データ喪失検出部23は、次フレームの同期ワード候補C1及びC2の位置に同期ワード期待値に一致するビット列があるか否かを判断し、各候補が同期ワードであるか否かを検証する。ここで、本実施の形態では、発生率が極めて低いデータを同期ワードとして用いている。そのため、2つのフレームの同じ位置に同期ワードと同じビット列が存在する場合は、正しい同期ワードであると判断することができる。図12の例の場合は、次フレームにおける同期ワード候補C2の位置、すなわち40~41バイト目には同期ワード期待値と一致するビット列が存在しないため、同期ワード候補C2は同期ワードではないと判断される。一方、同期ワード候補C1の位置、すなわち62~63バイト目には同期ワード期待値と一致するビット列が存在するため、同期ワードであると判断される。なお、データ喪失等により同期ワードの位置がずれることがあるため、同期ワード候補の位置に範囲を設けてもよい。
Then, the
データ喪失検出部23は、例えば、現フレーム内に1つの同期ワード候補が検出された場合であって、上記の誤検出抑制処理を行った結果、同期ワードではないと判断された場合は、現フレームに同期ワードが検出されなかったものとして処理を進める。具体的には、図7のステップS256以降の処理を行う。これにより、フレーム同期回復の精度を向上させることができる。なお、同期ワードの位置を確認するフレームの数を増やすことで、誤検出回避の精度を向上させることができる。
For example, when one synchronization word candidate is detected in the current frame and it is determined that it is not a synchronization word as a result of performing the erroneous detection suppression process, the data
1 送信装置、2 受信装置、11 入力部、12 同期ワード生成部、13 フレーム生成部、14 送信バッファ部、15 送信部、21 受信部、22 フレーム抽出部、23 データ喪失検出部、24 フレーム修正部、25 出力部、100 通信システム、111 マイク、141 送信バッファ、142 バッファ制御部、211 受信バッファ、221 同期バッファ、241 出力バッファ。
1 transmitter, 2 receiver, 11 input unit, 12 synchronization word generator, 13 frame generator, 14 transmission buffer unit, 15 transmitter, 21 receiver, 22 frame extractor, 23 data loss detector, 24
Claims (8)
前記同期ワードに基づいて前記フレームの同期を行うフレーム抽出部と、
前記フレームにおいてデータの喪失が生じたか否かを判断するデータ喪失検出部と、
前記データ喪失検出部において、前記フレームにおいてデータの喪失が生じたと判断された場合、疑似フレームを生成するフレーム修正部と、
前記疑似フレームを出力する出力部と、を備える受信装置。 a receiver for receiving frames containing data and synchronization words;
a frame extraction unit for synchronizing the frame based on the synchronization word;
a data loss detection unit that determines whether data loss has occurred in the frame;
a frame correction unit that generates a pseudo frame when the data loss detection unit determines that data loss has occurred in the frame;
and an output unit that outputs the pseudo frame.
前記フレーム修正部は、疑似データと前記同期ワード期待値とを用いて前記疑似フレームを生成する請求項1又は2に記載の受信装置。 The frame extraction unit generates a synchronization word expected value based on the synchronization word,
3. The receiving apparatus according to claim 1, wherein the frame correction section generates the pseudo frame using pseudo data and the synchronization word expected value.
送信装置と、を備え
前記送信装置は、
前記データを生成する入力部と、
前記同期ワードを生成する同期ワード生成部と、
前記データ及び前記同期ワードを含む前記フレームを生成するフレーム生成部と、
前記フレームを前記受信装置に送信する送信部と、を備える通信システム。 a receiving device according to any one of claims 1 to 6;
a transmission device, wherein the transmission device is
an input unit that generates the data;
a synchronization word generator that generates the synchronization word;
a frame generator for generating the frame containing the data and the synchronization word;
and a transmitting unit configured to transmit the frame to the receiving device.
前記同期ワードに基づいて前記フレームの同期を行う工程と、
前記フレームにおいてデータの喪失が生じたか否かを判断する工程と、
前記フレームにおいてデータの喪失が生じたと判断された場合、疑似フレームを生成する工程と、
前記疑似フレームを出力する工程と、を含むフレーム同期回復方法。 receiving a frame containing data and a synchronization word;
synchronizing the frame based on the synchronization word;
determining whether a loss of data has occurred in the frame;
generating a pseudo frame if it is determined that data loss has occurred in the frame;
and outputting the pseudo frame.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2021141533A JP2023034981A (en) | 2021-08-31 | 2021-08-31 | Receiving device, communication system, and frame synchronization recovery method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2021141533A JP2023034981A (en) | 2021-08-31 | 2021-08-31 | Receiving device, communication system, and frame synchronization recovery method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2023034981A true JP2023034981A (en) | 2023-03-13 |
Family
ID=85504623
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2021141533A Pending JP2023034981A (en) | 2021-08-31 | 2021-08-31 | Receiving device, communication system, and frame synchronization recovery method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2023034981A (en) |
-
2021
- 2021-08-31 JP JP2021141533A patent/JP2023034981A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5233165B2 (en) | Data transmission device | |
CN107087132B (en) | Receiver and signal transmission method | |
US8842793B2 (en) | Communication circuit and method of adjusting sampling clock signal | |
JP5936030B2 (en) | Information processing apparatus, information processing method, and program | |
KR100330196B1 (en) | Method of transmitting variable-length frame, transmitter, and receiver | |
JP2023034981A (en) | Receiving device, communication system, and frame synchronization recovery method | |
US6982994B2 (en) | Synchronization correction circuit | |
US9094911B2 (en) | Data communication system, method of optimizing preamble length, and communication apparatus | |
US6829315B1 (en) | Alignment of parallel data channels using header detection signaling | |
JP3712422B2 (en) | Method and apparatus for encoding, transmitting and decoding digital data | |
US7366207B1 (en) | High speed elastic buffer with clock jitter tolerant design | |
JP2009260643A (en) | Data stream analysis apparatus, decoder, and data stream analysis method | |
JP2003244085A (en) | Phase matching control system and phase matching control method in a plurality of system transmission lines | |
CN113688083A (en) | Data frame header identification system and method based on synchronous 422 interface | |
US6687318B1 (en) | Method and communication system for synchronizing two devices with a predeterminable data transmission method | |
JP7296686B1 (en) | Communication device, communication method, communication program and communication system | |
KR100386558B1 (en) | fast detection method for data rate | |
KR100442372B1 (en) | Data transmission apparatus and method | |
JP4472711B2 (en) | Audio data processing apparatus and audio data processing method | |
JP3290966B2 (en) | Frame synchronization device and frame synchronization method | |
JP5308193B2 (en) | Serial communication method | |
JP4879846B2 (en) | FRAME SYNCHRONIZATION DATA TRANSFER METHOD, TRANSMITTER DEVICE AND RECEPTION DEVICE | |
JP2658927B2 (en) | Multiplex transmission method and apparatus | |
KR100684564B1 (en) | Frame synchronization method and apparatus therefor | |
JP2005050153A (en) | Method of clock synchronized serial data transfer |