CN110473558B - Real-time multifunctional coder-decoder of 450M locomotive radio station unit - Google Patents

Real-time multifunctional coder-decoder of 450M locomotive radio station unit Download PDF

Info

Publication number
CN110473558B
CN110473558B CN201910698609.3A CN201910698609A CN110473558B CN 110473558 B CN110473558 B CN 110473558B CN 201910698609 A CN201910698609 A CN 201910698609A CN 110473558 B CN110473558 B CN 110473558B
Authority
CN
China
Prior art keywords
codec
data
voice
audio
coding
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.)
Active
Application number
CN201910698609.3A
Other languages
Chinese (zh)
Other versions
CN110473558A (en
Inventor
黄小兵
张州平
薛保建
马艳霞
王勇
赵轶骢
李宗靖
房甜甜
罗勇
何德喜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Changlong Railway Electronic Engineering Co ltd
Original Assignee
Shenzhen Changlong Railway Electronic Engineering Co ltd
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 Shenzhen Changlong Railway Electronic Engineering Co ltd filed Critical Shenzhen Changlong Railway Electronic Engineering Co ltd
Priority to CN201910698609.3A priority Critical patent/CN110473558B/en
Publication of CN110473558A publication Critical patent/CN110473558A/en
Application granted granted Critical
Publication of CN110473558B publication Critical patent/CN110473558B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/008Multichannel audio signal coding or decoding using interchannel correlation to reduce redundancy, e.g. joint-stereo, intensity-coding or matrixing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0061Error detection codes

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention discloses a real-time multifunctional codec of a 450M locomotive radio station unit, which comprises an embedded Linux minimum system, related peripheral hardware and an application layer codec software module, wherein the software module comprises a voice codec module, a scheduling command data codec module, an audio sub-audio codec module, a CAN bus protocol stack and a codec parameter adjusting module; the voice coding and decoding module is responsible for converting voice signals and digital signals within a hearing range and transmitting the voice signals and the digital signals in real time; the dispatching command data coding and decoding module is responsible for coding and decoding railway data signals, and the audio sub-audio coding and decoding module is responsible for signaling coding and decoding of key calling or incoming call calling; the railway voice communication service is completed by a voice coding and decoding module and an audio subaudio coding and decoding module, and the data communication service is completed by a scheduling command data coding and decoding module. The invention realizes the functions of the coder and the decoder through software, has flexible signal processing and simple structure, and reduces the hardware cost and the labor cost.

Description

Real-time multifunctional coder-decoder of 450M locomotive radio station unit
[ technical field ]
The invention relates to locomotive integrated wireless communication equipment, in particular to a real-time multifunctional coder-decoder of a 450M locomotive radio station unit.
[ background art ]
With the rapid development of the railway industry in China, the locomotive integrated wireless communication equipment used on a truck or a common passenger car also passes through the first generation and the second generation, and the related standard and test of the new generation of locomotive integrated wireless communication equipment (CIR3.0) are in progress. At the heart of the locomotive integrated wireless communication device, mature radio technology is used in railway services, and the railway services are divided into voice services and data services. Voice traffic of the railway includes train scheduling, yard shunting, voice calls, etc., and data traffic includes scheduling commands, train number calibration, train protection alarm, etc. In the next few years, the second generation locomotive integrated wireless communication equipment is still used in the railway industry of China.
In this context, second generation locomotive integrated wireless communication devices have many disadvantages in use and maintenance, and the following disadvantages exist for the prior devices and methods for 450MHz units.
Most of the existing 450MHz units adopt two hardware codecs, one is an audio sub-audio signaling codec, and the other is a data codec such as a scheduling command. However, in order to enable the 450MHz unit audio sub-audio codec and the data codec such as the scheduling command to meet the standard requirements of the railway industry, both the two codec circuits need an adjustable resistor with relatively high design precision. When the 450MHz unit leaves the factory, the debugging department performs rotary fine adjustment on the adjustable resistor, and performs parameter calibration on the waveform of the data coder-decoder such as the audio sub-audio coder-decoder and the scheduling command, so that the waveform reaches the standard of the railway industry. The method increases the cost of hardware at the cost of increasing a plurality of adjustable resistors, occupies the space of the PCB and increases the layout difficulty of the circuit board; moreover, manually trimming the adjustable resistor would require more labor time costs, increasing the cycle time to produce 450MHz communication modules.
[ summary of the invention ]
The invention aims to provide a real-time multifunctional codec of a 450M locomotive radio station unit, which has a simple structure and low cost.
In order to solve the technical problem, the technical scheme adopted by the invention is that the real-time multifunctional codec of the 450M locomotive radio station unit comprises an embedded Linux minimum system, peripheral hardware related to the embedded Linux minimum system and an application layer codec software module, wherein the application layer codec software module comprises a voice codec module, a scheduling command data codec module, an audio subaudio codec module, a CAN bus protocol stack and a codec parameter adjusting module; the voice coding and decoding module is responsible for converting voice signals and digital signals within the hearing range of 300 Hz-3400 Hz and transmitting the voice signals and the digital signals in real time; the dispatching command data coding and decoding module is responsible for coding and decoding railway data signals, and the audio sub-audio coding and decoding module is responsible for signaling coding and decoding of key calling or incoming call calling; the railway voice communication service is completed by a voice coding and decoding module and an audio subaudio coding and decoding module, and the data communication service is completed by a scheduling command data coding and decoding module; and the codec parameter adjusting module is communicated with the upper computer through a serial port to calibrate parameters.
In the real-time multifunctional CODEC, the embedded Linux minimum system adopts a minimum system core board, and the minimum system core board provides operating system layer drivers including a serial port driver, a CAN bus driver, an Ethernet driver and a CODEC audio driver; peripheral hardware related to the minimal Linux system comprises a serial port level conversion circuit, a CAN bus isolation circuit, an Ethernet network transformer, a single sound track CODEC control circuit and a simulation radio station peripheral control circuit; the minimum system core board is respectively connected with the serial port level conversion circuit, the CAN bus isolation circuit, the Ethernet network transformer, the single sound channel CODEC control circuit and the analog radio station peripheral control circuit, the Ethernet drive and the Ethernet network transformer provide the Ethernet transmission function, and the program is downloaded and debugged through the Ethernet; the CAN drive and CAN bus isolation circuit provides a Socket CAN programming interface, and the Socket CAN programming interface and a CAN network protocol stack are used for transmitting voice and data with an MMI unit of the locomotive integrated wireless communication equipment; the analog radio station peripheral control circuit comprises a serial port level conversion circuit, an OB option board and a radio station ignition switch, wherein a serial port drive and serial port level conversion circuit provides a serial port transmission function, and the serial port level conversion circuit is connected with the analog radio station through the OB option board and controls channel setting and power selection of the analog radio station; the OB option board is responsible for explaining the instruction sent by the serial port; the minimum system core board controls a radio station ignition switch through the GPIO so as to control the radio station ignition switch; the single-channel CODEC control circuit comprises a single-channel CODEC chip and an audio sub-audio frequency amplifying circuit, the single-channel CODEC chip is in communication connection with the minimum system core board, and an audio signal output end of the analog radio station is connected with the single-channel CODEC chip through the audio sub-audio frequency amplifying circuit; the single-channel CODEC chip converts the analog signal into a digital signal and sends the digital signal into the embedded Linux minimum system; the analog data coded by the single-channel CODEC chip is directly sent out through an analog radio station.
The real-time multifunctional coder-decoder, the voice signal coder of the voice coding-decoding module comprises the following steps in sequence when working: opening a voice handle by using a mixer technical mode provided by an embedded Linux system, and setting a voice handle parameter; using a CAN protocol stack to receive voice data sent by the MMI unit; decompressing voice data and putting decompressed voice data packets into a voice output queue; judging whether the voice output queue is empty, if so, adopting a data structure of a ring buffer queue to buffer the voice data packet; otherwise, calling CODEC audio frequency drive to play voice through a single-channel CODEC chip.
The real-time multifunctional coder-decoder comprises the following steps when a voice signal decoder of the voice coding-decoding module works: opening a receiving handle of the CODEC, initializing a receiving handle parameter, wherein the initialized receiving handle is used by the voice coding and decoding module, the scheduling command data coding and decoding module and the audio sub-audio coding and decoding module; the sampled data of the CODEC is read in a round robin fashion. Sampling the sampling data according to a set proportion to obtain sampling points, entering the next step when the number of the sampling points meets the algorithm requirement, and otherwise, continuously reading CODEC sampling data; copying a frame of voice data packet of a plurality of sampling points meeting the algorithm requirement to a voice input queue; judging whether a voice data packet exists in the voice input queue column, if so, compressing the data packet, and sending the compressed voice data packet to an MMI unit by using a CAN protocol stack; and sleeping for a set time if there is no packet.
The real-time multifunctional coder-decoder comprises the following steps when the coder of the scheduling command data coding-decoding module works: opening a data playing handle by using a mixer technical mode provided by an embedded Linux system, and setting a data playing handle parameter; constructing an FSK data frame sending format, and calculating a forward error correction code of an FSK data frame data part; and modulating FSK data by adopting a table look-up method, and calling CODEC audio frequency drive to play through a single-channel CODEC chip when the data number of the modulated FSK sampling points meets the set sampling point number.
The real-time multifunctional codec comprises the following working steps when the decoder of the scheduling command data codec module works: opening a receiving handle of the CODEC and setting a receiving handle parameter; the sampled data of the CODEC is read in a round robin fashion. Sampling the sampling data according to a set proportion to obtain sampling points, entering the next step when the number of the sampling points meets the algorithm requirement, and otherwise, continuously reading CODEC sampling data; and sending the sampling points to an FSK decoding algorithm for analysis.
The encoder of the real-time multifunctional codec and the audio sub-audio signaling codec module sequentially comprises the following steps in working: opening a play handle by using a mixer technical mode, and setting a play handle parameter; and obtaining a sampling point array by the signaling frequency through a table look-up method, multiplying the sampling point value by a signaling correction amplitude coefficient, and calling CODEC audio frequency to drive and play through a single-channel CODEC chip.
The real-time multifunctional codec, the decoder of the audio subaudio signaling codec module comprises the following steps in sequence when working: opening a receiving handle of the CODEC and setting a receiving handle parameter; the sampled data of the CODEC is read in a round robin fashion. Sampling the sampling data according to a set proportion to obtain sampling points, entering the next step when the number of the sampling points meets the algorithm requirement, and otherwise, continuously reading CODEC sampling data; copying the sampling point data to a signaling input queue, and then judging whether the signaling input queue is empty; if the time is empty, sleeping for the set time, otherwise, entering a signaling decoding step; in the signaling decoding step, filtering the original data, and only reserving the frequency within the set frequency; converting the sampling point data from a time domain to a frequency domain through a conversion algorithm, respectively calculating the intensity of all signaling, and judging that the signaling is received when the signal intensity is higher than a preset threshold value; the number represented by the signaling is transmitted to the MMI unit through the CAN protocol stack, and the MMI unit is told to call the number.
The parameter adjustment of the voice coding and decoding module of the real-time multifunctional coder-decoder is used for finely adjusting the correction coefficient of the output audio amplitude of a standard test voice packet from an MMI unit of the locomotive integrated wireless communication equipment until the signal output by the radio station end meets the amplitude requirement; the standard input signal received by the radio station finely adjusts the correction coefficient of the MMI input audio amplitude until the signal output by the MMI unit loudspeaker reaches the test standard; adjusting parameters of a scheduling command data coding and decoding module, including adjusting an FSK amplitude correction coefficient until a signal output by a radio station end meets the amplitude requirement; adjusting parameters of an FSK decoding algorithm to enable the capability of a scheduling command data coding and decoding module decoder to meet the test requirement; the parameter adjustment of the audio sub-audio coding and decoding module comprises fine adjustment of amplitude of an encoder, namely, the output signaling reaches the test requirement by multiplying the output sampling point by the correction coefficient of the amplitude of the output signaling; the parameters adjusted by the decoder are the signaling decoding amplification factor and the signaling decision threshold.
The invention realizes the functions of the coder and the decoder through software, has flexible signal processing and simple structure, and reduces the hardware cost and the labor cost.
[ description of the drawings ]
The present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
FIG. 1 is a block diagram of the general architecture of a 450M locomotive radio unit real-time multifunction codec according to an embodiment of the present invention.
FIG. 2 is a hardware block diagram of a 450M locomotive radio unit real-time multifunctional codec according to an embodiment of the present invention.
Fig. 3 is a flow chart of the speech signal codec module encoder according to the embodiment of the present invention.
FIG. 4 is a flow chart of a speech signal codec module according to an embodiment of the present invention.
FIG. 5 is a flow chart of an encoder of the codec module for scheduling command data according to an embodiment of the present invention.
FIG. 6 is a flowchart of a codec module for scheduling command data according to an embodiment of the present invention.
Fig. 7 is a flow chart of an FSK demodulation algorithm according to an embodiment of the present invention.
Fig. 8 is a flowchart of an audio sub-audio signaling codec module encoder according to an embodiment of the present invention.
Fig. 9 is a flowchart of an audio sub-audio signaling codec module decoder according to an embodiment of the invention.
[ detailed description of the invention ]
The technical solutions in the embodiments of the present invention are described clearly and completely below, and it is obvious that the described embodiments are only a part of the key embodiments of the present invention, and not all embodiments.
The core components of the 450MHz unit real-time multifunctional codec specifically shown below are the minimum core board, the peripheral circuit module, and the codec software, respectively.
As shown in fig. 2, the ethernet driver and the ethernet transformer of the embedded Linux minimum system provide a complete ethernet transmission function, and the program is downloaded and debugged through the ethernet. The CAN driver and the CAN bus isolation circuit of the embedded Linux minimum system in the figure 2 provide a basic Socket CAN programming interface, and units such as MMI and the like of the locomotive integrated wireless communication equipment CAN transmit voice and data with 450MHz units through the CAN protocol stack by using the Socket CAN programming interface and the CAN network protocol stack in the figure 1. The serial port driver and the serial port level conversion circuit of the embedded Linux minimum system in fig. 2 provide a serial port transmission function, and can control channel setting, high-low power selection and the like of the analog radio station through the serial port. The OB option in fig. 2 is a hardware interface circuit module for operating the station, and is responsible for interpreting commands sent by the serial port, and the OB board is provided by the station provider. The embedded Linux minimum system can control a radio station ignition circuit through the GPIO so as to control a radio station switch. The CODEC audio driver (ALSA advanced sound card interface) of the embedded Linux minimal system in fig. 2 and the single channel CODEC chip (WM8974) provide the sound card function, the communication between the analog radio and the core board is accomplished through the sound card, the single channel CODEC chip realizes the conversion between the analog signal and the digital signal, the single channel CODEC chip is a half-duplex chip which temporarily stops receiving and decoding when sending voice, data, etc., thereby sending the encoded analog data out through the analog radio. After the data is sent, the bottom layer of the Linux operating system can automatically convert into a receiving and decoding state. In a receiving and decoding state, the analog radio station sends the received analog signals to the audio sub-audio amplification circuit, the amplification circuit amplifies the signals and sends the amplified signals to the single-channel CODEC chip, and the single-channel CODEC chip converts the analog signals into digital signals and sends the digital signals to the Linux minimum system.
The codec of the invention specifically refers to a speech signal coding and decoding module, a scheduling command data coding and decoding module and an audio sub-audio signaling coding and decoding module.
1) The voice signal coding and decoding module:
in a 450MHz unit, the railway voice service undertakes the conversion of analog signals and digital signals in the human ear range of 300Hz to 3400Hz for real-time transmission.
In order to allow Pulse Code Modulation (PCM) encoding of speech signals without distortion, the sampling rate should satisfy the sampling theorem, specifying a sampling rate of 8000 samples per second. In order to transmit digital voice signals in real time in the locomotive integrated wireless communication equipment by using the CAN bus, a low-bandwidth voice compression coding algorithm is selected, and a voice compression algorithm G.723.1 is selected. Therefore, the PCM sampling rate is 8000, 16 bits are quantized, 240 sampling points are collected each time, and voice real-time conversation of one frame data within 37.5ms at most is completed through G.723.1.
2) The scheduling command data coding and decoding module:
in 450MHz unit, railway data service is wireless data transmission of scheduling command (i.e. scheduling command information, train route advance notice information, driving certificate, shunting operation notice, shunting request) and train number. In order to complete the transmission of railway data service in 450MHz units, f4 frequency points are adopted when 450MHz units transmit, and fn frequency points are adopted for receiving. fn refers to f1, f2 or f3, and the specific f4 and fn depend on the working standard of the locomotive integrated wireless communication device, which is another software functional module of the locomotive integrated wireless communication device and is not discussed here.
The modulation and demodulation mode adopts FSK, the transmission rate is 1200bps, and the characteristic frequency of 1200Hz represents 1,1800Hz represents 0. A 51 bit sync 1010., a 31 bit frame sync 0x0DD 4259F. The data frame content adopts forward error correction code, the forward algorithm is shortened cyclic code BCH (26,16), and the error correction coding and decoding generation polynomial is g (X) ═ X10+ X8+ X7+ X5+ X4+ X3+ 1. The data content is subjected to forward error correction once every 16 bits, and less than 16 bits are supplemented with 0. And decoding the data frames in the frame format in real time to meet the real-time communication of data communication.
3) The audio sub-audio signaling coding and decoding module:
in the 450MHz unit communication service, a key call or an incoming call is to complete a call to an opposite party through audio sub-audio signaling, that is, 3s or 5s audio sub-audio signaling is sent before the call to the opposite party, and the opposite party can enter a communication state after successfully completing signaling decoding. The incoming call is also called by the other party through the audio sub-audio signaling, namely, the other party sends the audio sub-audio signaling for 3s before calling, and the 450M unit enters a conversation state after successfully decoding the signaling. The accuracy (described in terms of frequency accuracy in 450MHz cells) and amplitude (described in terms of frequency offset in 450MHz cells) of the transmitted signaling needs to meet a certain range, as well as the reception bandwidth and detected characteristics (described in terms of the received normal signal amplitude of the 450MHz cell receiver, expressed in terms of frequency offset) of the received signaling decoding. The signaling transmission needs to meet the requirements that the frequency accuracy of 1520Hz of the audio signaling is within +/-0.5 percent and the frequency deviation is within 3 +/-15 percent KHz. The signaling is sent to meet the requirement that the frequency accuracy of common subaudio signaling such as 114.8Hz, 123Hz, 131.8Hz, 151.4Hz and the like is within +/-0.5 percent and the frequency deviation is within 0.5 +/-15 percent KHz. The decoding of the received signaling needs to meet the requirements that the audio signaling 1960Hz can detect the characteristic frequency deviation of +/-1.5 kHz, the decoding of the received bandwidth is successful within the range of 1912-2009 Hz, and the decoding of the received signaling needs to meet the requirements that the decoding of the commonly used subaudio signaling such as 114.8Hz, 123Hz, 131.8Hz, 151.4Hz and the like can detect the characteristic frequency deviation of +/-0.25 kHz, and the decoding of the received bandwidth is successful within the range of +/-2%.
The invention realizes the coding and decoding functions through the algorithm flow, so the waveform parameter calibration of the signal can be realized through the software calibration of an upper computer. The upper computer software refers to PC parameter calibration software which is connected to the locomotive integrated wireless communication equipment through a serial port so as to transmit calibration parameters to the locomotive integrated wireless communication equipment.
As shown in fig. 3, in the process of the encoder of the speech signal CODEC module, step 301 uses the mixer technology provided by the phyCore-AM335x minimal system core board to open the voice handle phandle8K, which allows the CODEC chip to play samples at 8K sampling rate or at 24K sampling rate. The voice handle is opened using the Linux system CODEC audio driver (ALSA advanced sound card interface). Step 302 initializes phandle8K parameters such as 8K sample rate, 16 bit quantization, buffer cycle size 240, cycle number 16, and so on. Step 303 the voice receive thread loops around the voice data sent by the MMI unit using the CAN protocol stack, which data is 20 bytes. Step 304 decompresses the 20 bytes of data of step 303 into 240 sample points using the G723.1 decompression algorithm. Step 305 the voice receive thread places a frame of voice data packets represented by the sample point into a voice output queue. Step 306, the voice output processing thread circularly reads the voice output queue and judges whether the voice queue is empty, if so, the step 307 is carried out; otherwise jump to 308. Step 307 the voice output processing thread will sleep for 30ms, leaving the queue for voice data buffering. Step 308 multiplies the sampling point value by the audio correction coefficient and calls the Linux ALSA interface to play voice.
As shown in fig. 4, in the flow of the voice signal CODEC module decoder, step 401 uses the CODEC audio driver (Linux ALSA interface) to open the receive handle chandle of the CODEC. Step 402 initializes chandle parameters, such as 24K sample rate, 16 bit quantization, buffer cycle size 360, cycle number 16, etc., which are used by the speech codec module, the schedule command data codec module, and the audio subaudio codec module. The CODEC read thread cycles the sampled data of the CODEC at step 403. Step 404 downsamples the sample data of step 403 by 3: 1. Step 405 judges whether the number of the sampling points meets 240 sampling points required by the G723.1 algorithm, if so, the step 406 is entered; otherwise 403 proceeds to continue reading CODEC sample points. Step 406 the CODEC read thread copies a frame of voice data packets for 240 sample points to the voice input queue, which buffers the voice data packets using a circular buffer queue data structure. The queue is adopted for real-time guarantee, the sound card reading speed is high, and long-time operation cannot be carried out in the thread. Step 407, the voice input processing thread circularly judges whether a voice data packet exists in the queue, if so, the process enters 408; otherwise, the process proceeds to 410. Step 408 performs G723.1 data compression in the voice input processing thread, compressing 240 samples into 20 bytes. Step 409 sends the one-frame voice data packet of step 408 to the MMI unit using the CAN protocol stack. Step 410 the voice input processing thread uses the Linux sleep function to let the thread sleep for 30ms for buffering the voice input data.
As shown in fig. 5, in the flow of the encoder of the schedule command data codec module, step 501 uses the mixer technology to open the data play handle phandle 24K. Step 502 initializes phandle24K parameters such as 24K sample rate, 16 bit quantization, buffer cycle size 1024, cycle number 16, and so on. Step 503, the data receiving thread receives data such as a scheduling command from the MMI unit through the CAN bus. Step 504 constructs a FSK transmitted data frame structure header comprising a 51-bit sync 1010., a 31-bit frame sync 0x0DD 4259F. Step 505 constructs the load portion of the FSK data frame structure and the railway traffic data from the MMI unit will invoke the BCH (26,16) algorithm to calculate the checksum and copy the data and checksum to the load portion of the FSK. The generator polynomial of BCH (26,16) is g (X) 10+ X8+ X7+ X5+ X4+ X3+1, error correction bits 10 bits, data bits 16 bits, and data bits less than 16 bits are compensated by 0 by default. Step 506 modulates the data of step 505 into FSK waveforms, i.e., sample point data, using a table lookup. Sample point data is formed multiplied by the FSK amplitude correction factor and then played through the CODEC chip using the CODEC audio driver. The transmission rate for FSK is 1200bps with a characteristic frequency of 1200Hz for 1,1800Hz for 0. In order to accelerate the calculation speed, a cos table of one period is manufactured in the FSK modulation algorithm, a cosine function of one period is stored, the cos table is represented by a C language array, and the length of the array is 12K. The step size for transmitting 1200Hz waveform is 1200 (waveform step k means that every k points in the cos table, the program takes one sample point in the cos table), and the step size for transmitting 1800Hz waveform is 900. To achieve FSK at the rate of 1200bps, each bit needs a representation of 20 samples (the number of samples depends on the sampling rate of the encoder and the rate of FSK, where 20 samples is the sampling rate 24K divided by the FSK rate of 1200 bps). And 507, when the number of the sampling points meets 1024, using CODEC audio drive to play through a CODEC chip, and when one frame of data is sent to the last remaining less than 1024 sampling points, complementing 0 by the remaining sampling points, and calling the CODEC audio drive to play through the CODEC chip.
As shown in fig. 6, the steps 601, 602, and 603 of the decoder of the scheduling command data codec module are the same as the steps 401, 402, and 403 of the speech signal decoder, respectively, and the description thereof will not be repeated. Step 604 downsamples the sample data of step 603 by 2: 1. Step 605, judging whether the number of the sampling points reaches 1024, and entering step 606 if the number of the sampling points meets the condition; otherwise, go to step 603 to continue sampling. Step 606CODEC read thread copies the sample point into the data decode queue. Step 607 the data decode thread loops through the read data decode queue to determine if it is empty. If empty, enter 609; otherwise 608 is entered. Step 608, the data decoding thread sends the sampling point to the FSK decoding algorithm for analysis, and the FSK algorithm of the invention can only receive 12K samples at present. Step 609 the data decoding thread calls the Linux sleep function to sleep for 30 ms.
Fig. 7 is a flow chart of an FSK demodulation algorithm of a data decoder, wherein the FSK decoding algorithm first calls a differential detection algorithm to identify a sampling point as a bit stream, then identifies the bit stream as frame data by using a bit state machine, and finally actively submits the frame data to an application layer when the frame data is analyzed. The initialization of step 701 is the parameters of the differential detection algorithm, in the differential detection algorithm, a low-pass filter and a high-pass filter are cascaded to form a band-pass input filter, and they are all implemented by using an elliptic filter, wherein the minimum order n of the filter is 2, the maximum ripple Rp of the pass-band is 1dB, and the attenuation Rs of the stop-band is 40 dB. The cut-off frequency Wn of the low-pass filter is 2000Hz, and the cut-off frequency Wn of the high-pass filter is 1000 Hz. In the differential detection algorithm, an elliptical low-pass filter is used as a low-pass output filter, the minimum order n of the filter is 2, the maximum pass-band ripple Rp is 1dB, the stop-band attenuation Rs is 40dB, and the cut-off frequency Wn is 600 Hz. The delay time τ in the differential detection algorithm is 2. Step 702 is a band pass filter that filters the discrete sample point data input in step 608 in the range of 1000Hz to 2000 Hz. Step 703 is to perform the differential operation of the sampling point sequence, send one path of the data in step 702 to the multiplier, and send the other path of the delay time τ to the multiplier. Step 704 low-pass filters the result of step 703, the cut-off frequency of the low-pass filter being 600 Hz. Step 705, performing frequency discrimination, determining the amplitude output in step 704, and outputting bit 0 when the amplitude V > is equal to a threshold Thres, otherwise, outputting bit 1; when V < ═ Thres, the bit 1 is output, otherwise 0, and the differential detection algorithm finishes the frequency discrimination. The threshold of step 705 is a parameter that can be adjusted in order to improve the decoding capability. Step 706 copies the bit stream identified by the differential detection algorithm into a ring buffer. Step 707 fetches data from the buffer, and if the data satisfies 26 bits, the step 708 is entered, and if not, the step 702 continues to receive the sampling points, and the bit stream determination is performed. Step 708 receives the 26-bit input of step 707, followed by parsing the bit stream into frame data. There are 3 states in the 26-bit real-time parsing state machine, namely, sync state, mode length state, data state, and when bit sync and frame sync are successfully identified, the mode length state is entered, in which the 1-byte mode word and the 1-byte length field are decoded using BCH (26,16) algorithm. The data state is entered after the pattern length state is correctly parsed, and the same BCH (26,16) is used to parse 2 bytes of data. After the 3 state analysis fails, the synchronous state is entered, and the data is analyzed again. When the parsed data reaches the length specified by the length field, the FSK decoding algorithm delivers the data to the application layer. Step 709 sends the successfully analyzed data such as the scheduling command to the MMI unit for display through the CAN protocol stack.
As shown in fig. 8, in the encoder of the audio sub-audio signaling codec module, steps 801 and 802 are the same as steps 501 and 502 of the encoder of the scheduling command data codec module in fig. 5. Step 803 the number receive thread receives the call number from the MMI unit. Step 804 looks up the signaling corresponding to the calling number because different numbers correspond to unique signaling. The array of sampling points of the signaling is obtained by a table look-up method, wherein the table look-up step size is the signaling frequency divided by the sampling rate multiplied by the length of a cos table, for example, the step size of the 114.8Hz signaling is 114.8/24K 12K (the sampling rate is 24K, and the length of the cos table is 12K). Step 805 implements the time length for sending the signaling, the number of times of the circular playing can be used as the time length for sending the signaling, and the CODEC audio driver (Linux ALSA interface) can be called to operate the CODEC chip to play the signaling by multiplying the sampling point value in the array in the step by the signaling correction amplitude coefficient.
As shown in fig. 9, in the decoder of the audio sub-audio signaling codec module, steps 901, 902, 903 are the same as steps 601, 602, 603 of the decoder of the scheduling command data codec module of fig. 6. Step 904 performs a 2:1 downsampling of the sample data of step 903. Step 905, judging whether the number of the sampling points reaches 4096, and entering step 906 if the number of the sampling points meets the condition; otherwise, go to step 903 to continue sampling. Step 906 the CODEC read thread copies the sample point data to the signaling input queue, thus separating the received data from the processed data and ensuring real-time reception of the CODEC data. Step 907, circularly reading the queue by the signaling processing thread, judging whether the queue is empty, and if the queue is empty, entering step 914, and sleeping for 30ms by the signaling processing thread; otherwise, go to step 908. Step 908 the signaling processing thread multiplies the sample points in the array by signaling decoding amplification factors, fine tuning of which can improve the decoding capability of the signaling decoder. The signaling processing thread next performs a series of signaling decodings. Step 909 filters the raw data using a hanning window function, only preserving frequencies within 2000 Hz. Step 910 transforms the sample point data from the time domain to the frequency domain by a fast fourier transform algorithm. Step 911 calculates all signaling strengths, primarily by calculating the energy of each signaling component. Step 912 identifies the signaling, and when the signal strength is higher than a predetermined signaling determination threshold, it can be determined that the signaling is received. Step 913 transmits the number represented by the signaling to the MMI unit via the CAN protocol stack telling the MMI unit to call the number.
In the three CODECs described above, the amplitude of the output waveform can be fine-tuned by software parameters to avoid the output error caused by the difference between the CODEC chip and the radio station hardware. Similarly, the amplitude and other parameters of the original analog signal input by the radio station can be subjected to software parameter fine adjustment, so that the decoding capability of the decoder is improved. The parameters of the voice coder-decoder are adjusted, for a standard test voice packet from an MMI unit of the locomotive integrated wireless communication equipment, the 450MHz unit does not directly broadcast the data through a CODEC chip, but multiplies a correction coefficient of output audio frequency amplitude, and finely adjusts the correction coefficient until a signal output by a radio station end meets the amplitude requirement. The standard input signal received by the radio station needs to be multiplied by a correction coefficient of the input audio amplitude at the MMI unit, and the correction coefficient is finely adjusted to reach the test standard of the signal output by the speaker CODEC of the MMI unit. And the data encoder adopts an FSK modulation mode, and the FSK waveform amplitude needs to be multiplied by an FSK amplitude correction coefficient and is increased or decreased until a signal output by the radio station end meets the amplitude requirement. When the radio station receives a signal distorted by interference, relevant parameters need to be adjusted in order to improve the decoding capability of the FSK decoding algorithm. The FSK decoding algorithm adopts a differential detection algorithm in the communication field, and the main parameters to be adjusted are a band-pass filter parameter, a low-pass filter parameter and a delay tau. Adjusting the parameters of the FSK decoding algorithm will make the decoder capability meet the test requirements. And adjusting parameters of the audio sub-audio codec, wherein the audio sub-audio signaling is a sine wave signal, for example, the signaling of 114.8Hz is a sine wave with the frequency of 114.8Hz and the duration of 3 s. The amplitude can be finely adjusted for a signaling encoder, namely, the output signaling reaches the test requirement by multiplying the output sampling point by the output signaling amplitude correction coefficient. When the radio station receives a signal distorted by interference, in order to improve the decoding capability of the audio sub-audio, the main parameters to be adjusted are a signaling decoding amplification factor and a signaling judgment threshold.
The above embodiment of the invention realizes the codec function of 450MHz unit by software mode, and the signal processing is more flexible; the signal processing effect reaches the railway industry standard by adjusting the software parameters, the structure is simple, and the hardware cost and the labor cost are reduced.

Claims (4)

1. A real-time multifunctional codec of a 450M locomotive radio station unit is characterized by comprising an embedded Linux minimum system, peripheral hardware related to the embedded Linux minimum system and an application layer codec software module, wherein the application layer codec software module comprises a voice codec module, a scheduling command data codec module, an audio subaudio codec module, a CAN bus protocol stack and a codec parameter adjusting module; the voice coding and decoding module is responsible for converting voice signals and digital signals within the hearing range of 300 Hz-3400 Hz and transmitting the voice signals and the digital signals in real time; the dispatching command data coding and decoding module is responsible for coding and decoding railway data signals, and the audio sub-audio coding and decoding module is responsible for signaling coding and decoding of key calling or incoming call calling; the railway voice communication service is completed by a voice coding and decoding module and an audio subaudio coding and decoding module, and the data communication service is completed by a scheduling command data coding and decoding module; the codec parameter adjusting module is communicated with the upper computer through a serial port to calibrate parameters;
the embedded Linux minimum system adopts a minimum system core board, and the minimum system core board provides operating system layer driving, including serial port driving, CAN bus driving, Ethernet driving and CODEC audio driving; peripheral hardware related to the minimal Linux system comprises a serial port level conversion circuit, a CAN bus isolation circuit, an Ethernet network transformer, a single sound track CODEC control circuit and a simulation radio station peripheral control circuit; the minimum system core board is respectively connected with the serial port level conversion circuit, the CAN bus isolation circuit, the Ethernet network transformer, the single sound channel CODEC control circuit and the analog radio station peripheral control circuit, the Ethernet drive and the Ethernet network transformer provide the Ethernet transmission function, and the program is downloaded and debugged through the Ethernet; the CAN drive and CAN bus isolation circuit provides a Socket CAN programming interface, and the Socket CAN programming interface and a CAN network protocol stack are used for transmitting voice and data with an MMI unit of the locomotive integrated wireless communication equipment; the analog radio station peripheral control circuit comprises a serial port level conversion circuit, an OB option board and a radio station ignition switch, wherein a serial port drive and serial port level conversion circuit provides a serial port transmission function, and the serial port level conversion circuit is connected with the analog radio station through the OB option board and controls channel setting and power selection of the analog radio station; the OB option board is responsible for explaining the instruction sent by the serial port; the minimum system core board controls a radio station ignition switch through the GPIO so as to control the radio station ignition switch; the single-channel CODEC control circuit comprises a single-channel CODEC chip and an audio sub-audio frequency amplifying circuit, the single-channel CODEC chip is in communication connection with the minimum system core board, the audio signal output end of the analog radio station is connected with the single-channel CODEC chip through the audio sub-audio frequency amplifying circuit, and the single-channel CODEC chip converts the analog signals into digital signals and sends the digital signals into the embedded Linux minimum system; analog data coded by the single-channel CODEC chip is directly sent out through an analog radio station;
the voice signal encoder of the voice coding and decoding module sequentially comprises the following steps when in work: opening a voice handle by using a mixer technical mode provided by an embedded Linux system, and setting a voice handle parameter; using a CAN protocol stack to receive voice data sent by the MMI unit; decompressing voice data and putting decompressed voice data packets into a voice output queue; judging whether the voice output queue is empty, if so, adopting a data structure of a ring buffer queue to buffer the voice data packet; otherwise, calling CODEC audio frequency drive to play voice through a single-channel CODEC chip;
the voice signal decoder of the voice coding and decoding module sequentially comprises the following steps when in work: opening a receiving handle of the CODEC, initializing a receiving handle parameter, wherein the initialized receiving handle is used by the voice coding and decoding module, the scheduling command data coding and decoding module and the audio sub-audio coding and decoding module; reading the sampling data of the CODEC according to a circulation mode; sampling the sampling data according to a set proportion to obtain sampling points, entering the next step when the number of the sampling points meets the algorithm requirement, and otherwise, continuously reading CODEC sampling data; copying a frame of voice data packet of a plurality of sampling points meeting the algorithm requirement to a voice input queue; judging whether a voice data packet exists in the voice input queue column, if so, compressing the data packet, and sending the compressed voice data packet to an MMI unit by using a CAN protocol stack; sleeping for a set time if there is no packet;
when the encoder of the scheduling command data encoding and decoding module works, the method sequentially comprises the following steps: opening a data playing handle by using a mixer technical mode provided by an embedded Linux system, and setting a data playing handle parameter; constructing an FSK data frame sending format, and calculating a forward error correction code of an FSK data frame data part; modulating FSK data by adopting a table look-up method, and calling CODEC audio frequency to drive to play through a single-channel CODEC chip when the data number of the modulated FSK sampling points meets the set sampling point number;
when the decoder of the scheduling command data coding and decoding module works, the following steps are sequentially included: opening a receiving handle of the CODEC and setting a receiving handle parameter; reading the sampling data of the CODEC according to a circulation mode; sampling the sampling data according to a set proportion to obtain sampling points, entering the next step when the number of the sampling points meets the algorithm requirement, and otherwise, continuously reading CODEC sampling data; and sending the sampling points to an FSK decoding algorithm for analysis.
2. The real-time multifunctional codec of claim 1, wherein the encoder of the audio sub-audio signaling codec module sequentially comprises the following steps: opening a play handle by using a mixer technical mode, and setting a play handle parameter; and obtaining a sampling point array by the signaling frequency through a table look-up method, multiplying the sampling point value by a signaling correction amplitude coefficient, and calling CODEC audio frequency to drive and play through a single-channel CODEC chip.
3. The real-time multifunctional codec of claim 1, wherein the decoder of the audio sub-audio signaling codec module is operative to sequentially include the following steps: opening a receiving handle of the CODEC and setting a receiving handle parameter; reading the sampling data of the CODEC according to a circulation mode; sampling the sampling data according to a set proportion to obtain sampling points, entering the next step when the number of the sampling points meets the algorithm requirement, and otherwise, continuously reading CODEC sampling data; copying the sampling point data to a signaling input queue, and then judging whether the signaling input queue is empty; if the time is empty, sleeping for the set time, otherwise, entering a signaling decoding step; in the signaling decoding step, filtering the original data, and only reserving the frequency within the set frequency; converting the sampling point data from a time domain to a frequency domain through a conversion algorithm, respectively calculating the intensity of all signaling, and judging that the signaling is received when the signal intensity is higher than a preset threshold value; the number represented by the signaling is transmitted to the MMI unit through the CAN protocol stack, and the MMI unit is told to call the number.
4. The real-time multi-function codec of claim 1, wherein the parameter adjustment of the voice codec module is configured to fine-tune the correction factor of the output audio amplitude for a standard test voice packet from the MMI unit of the locomotive integrated radio communication device until the signal output from the radio station side meets the amplitude requirement; the standard input signal received by the radio station finely adjusts the correction coefficient of the MMI input audio amplitude until the signal output by the MMI unit loudspeaker reaches the test standard; adjusting parameters of a scheduling command data coding and decoding module, including adjusting an FSK amplitude correction coefficient until a signal output by a radio station end meets the amplitude requirement; adjusting parameters of an FSK decoding algorithm to enable the capability of a scheduling command data coding and decoding module decoder to meet the test requirement; the parameter adjustment of the audio sub-audio coding and decoding module comprises fine adjustment of amplitude of an encoder, namely, the output signaling reaches the test requirement by multiplying the output sampling point by the correction coefficient of the amplitude of the output signaling; the parameters adjusted by the decoder are the signaling decoding amplification factor and the signaling decision threshold.
CN201910698609.3A 2019-07-31 2019-07-31 Real-time multifunctional coder-decoder of 450M locomotive radio station unit Active CN110473558B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910698609.3A CN110473558B (en) 2019-07-31 2019-07-31 Real-time multifunctional coder-decoder of 450M locomotive radio station unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910698609.3A CN110473558B (en) 2019-07-31 2019-07-31 Real-time multifunctional coder-decoder of 450M locomotive radio station unit

Publications (2)

Publication Number Publication Date
CN110473558A CN110473558A (en) 2019-11-19
CN110473558B true CN110473558B (en) 2022-01-14

Family

ID=68509930

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910698609.3A Active CN110473558B (en) 2019-07-31 2019-07-31 Real-time multifunctional coder-decoder of 450M locomotive radio station unit

Country Status (1)

Country Link
CN (1) CN110473558B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112380036A (en) * 2020-11-23 2021-02-19 深圳市长龙铁路电子工程有限公司 Locomotive signal host software system
CN113835689A (en) * 2021-09-14 2021-12-24 深圳市长龙铁路电子工程有限公司 Decoding algorithm verification method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106952650A (en) * 2017-02-28 2017-07-14 大连理工大学 A kind of train voice amplifying unit based on ARM+FPGA frameworks
CN109120295A (en) * 2018-11-13 2019-01-01 天津七二移动通信有限公司 A kind of wireless vehicle microscope carrier master functionality module and its implementation
CN208939940U (en) * 2018-11-13 2019-06-04 天津七一二移动通信有限公司 Applied to wireless vehicle microscope carrier master functionality module

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7272556B1 (en) * 1998-09-23 2007-09-18 Lucent Technologies Inc. Scalable and embedded codec for speech and audio signals
US10354667B2 (en) * 2017-03-22 2019-07-16 Immersion Networks, Inc. System and method for processing audio data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106952650A (en) * 2017-02-28 2017-07-14 大连理工大学 A kind of train voice amplifying unit based on ARM+FPGA frameworks
CN109120295A (en) * 2018-11-13 2019-01-01 天津七二移动通信有限公司 A kind of wireless vehicle microscope carrier master functionality module and its implementation
CN208939940U (en) * 2018-11-13 2019-06-04 天津七一二移动通信有限公司 Applied to wireless vehicle microscope carrier master functionality module

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
在定点DSP上实现G.722.2语音编解码的无线收发***;肖启洋;《中国优秀硕士学位论文全文数据库》;20130815(第08期);第1-59页 *

Also Published As

Publication number Publication date
CN110473558A (en) 2019-11-19

Similar Documents

Publication Publication Date Title
CN106664161B (en) The system and method that packet error of transmission based on redundancy restores
US20070174046A1 (en) Method and apparatus to perform speech recognition over a data channel
JP5268952B2 (en) Apparatus and method for transmitting a sequence of data packets and decoder and apparatus for decoding a sequence of data packets
CN110473558B (en) Real-time multifunctional coder-decoder of 450M locomotive radio station unit
WO2008150756A1 (en) Method and system to configure audio processing paths for voice recognition
JP2001318694A (en) Device and method for signal processing and recording medium
MXPA04007668A (en) Tandem-free intersystem voice communication.
CN101789853B (en) Method and terminal for processing retransmission request and method for managing retransmission request
US10529352B2 (en) Audio signal processing
RU2445737C2 (en) Method of transmitting data in communication system
CN105722183A (en) Sharing method and apparatus for Wi-Fi (wireless fidelity) link information
CN101834964A (en) Voice data transmission processing method and voice data transmission processor
JPH0846669A (en) Mobile telephone set
US11545161B2 (en) Wireless communication device, and method and apparatus for processing voice data
CN106412767B (en) Sound mixing method and sound mixing circuit
JP2000004171A (en) Mobile communication method
JPH07283757A (en) Sound data communication equipment
KR100613054B1 (en) Digital wireless microphone system having multi channel and method thereof
US8055980B2 (en) Error processing of user information received by a communication network
CN212463209U (en) Self-adaptive receiving and self-adaptive vocoder communication circuit
JP4222695B2 (en) Digital wireless microphone system
CN202503628U (en) Digital interphone adopting self-adaption vocoder
CN220342463U (en) Audio system based on sound wave pairing
JP2630307B2 (en) Channel test equipment
JP2000286741A (en) Digital wireless microphone system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant