Program-controlled microstrip filter based on UART protocol and sine wave generation method

文档序号:1046135 发布日期:2020-10-09 浏览:21次 中文

阅读说明:本技术 一种基于uart协议的程控微带滤波器及正弦波产生方法 (Program-controlled microstrip filter based on UART protocol and sine wave generation method ) 是由 吴佳 陈佳 戴华 李礼 刘碧贞 于 2020-07-08 设计创作,主要内容包括:本发明公开了一种基于UART协议的程控微带滤波器及正弦波产生方法。包括UART接口、微处理器、继电器、子微带滤波器、阻抗匹配器。UART接口用于接收传输到滤波器的控制信号;微处理器用于将接收到的UART信号解码转换为控制信号,控制继电器的通断;继电器接收来自微处理器的控制信号,用于选择子滤波器的通道;子滤波器用于滤除不同频率范围的方波信号;阻抗匹配器用于匹配通带的阻抗值,保证导线两端负载均衡。本发明通过程序选择通过的微带滤波器通路,保证了由方波滤出的正弦波信号不存在二次谐波等高阶数的谐波,解决了通信系统在宽工作频段下方波转换为正弦波的问题,提升了通信系统的自动化水平。(The invention discloses a program-controlled microstrip filter based on a UART protocol and a sine wave generation method. The device comprises a UART interface, a microprocessor, a relay, a sub-microstrip filter and an impedance matcher. The UART interface is used for receiving the control signal transmitted to the filter; the microprocessor is used for decoding and converting the received UART signal into a control signal and controlling the on-off of the relay; the relay receives a control signal from the microprocessor and is used for selecting a channel of the sub-filter; the sub-filters are used for filtering square wave signals in different frequency ranges; the impedance matcher is used for matching the impedance value of the pass band to ensure the load balance at the two ends of the lead. The invention ensures that the sine wave signal filtered by the square wave has no harmonic wave with high order such as second harmonic wave and the like by selecting the passing micro-strip filter path through a program, solves the problem that the square wave is converted into the sine wave in a wide working frequency band of the communication system, and improves the automation level of the communication system.)

1. A programmable microstrip filter based on UART protocol, comprising:

the system comprises a UART interface, a microprocessor, a relay, a sub-microstrip filter and an impedance matcher;

the UART interface is used for receiving a control signal transmitted to the filter; the microprocessor is used for decoding the received UART signal, converting the decoded UART signal into a control signal and controlling the on-off of the relay; the relay is used as a channel switch, receives a control signal from the microprocessor and is used for selecting a channel of the sub-microstrip filter; the sub-microstrip filter is a basic filtering unit and is used for filtering square wave signals in different frequency ranges; the impedance matcher is used for matching the impedance value of the pass band to ensure the load balance at the two ends of the lead.

2. A sine wave generation method based on UART protocol is characterized by comprising the following steps:

(1) connecting a signal sent by a phase-locked loop to an input interface of a filter, and starting the phase-locked loop;

(2) the upper computer sends a corresponding control signal through the UART interface, a corresponding filter channel is selected, and the microprocessor receives the UART signal and transcodes the UART signal into a signal for controlling the relay;

(3) the relay receives the signal of the microprocessor and controls whether the sub-filter passage is on or off, thereby finishing the work of selecting the filter passage.

Technical Field

The invention belongs to the field of electronic communication, relates to a signal processing and filter design method, and particularly relates to a program-controlled microstrip filter based on a UART protocol and a sine wave generation method.

Background

As the existing signal environment becomes more complex, the operating frequency band of the sinusoidal signal that needs to be input by the analog communication system circuit becomes wider and wider. The anti-interference capability of the communication system can be improved by using a wider working frequency band in a channel coding mode, and the interference of earth surface noise of a low frequency band is avoided. The currently common frequency bands for digital communications have reached gigahertz (GHz) frequencies. For example, the 4G operating frequency range specified by 3GPP is 1880-2635MHz, the operating frequency range required by IEEE 802.11ac is 5170-5835MHz, and the operating frequency of the millimeter wave radar request signal is greater than 30 GHz. The wide signal operating range requires the use of a tunable filter with a wider bandwidth.

A communication system, if operable, must require a local oscillator to provide its underlying operating frequency. The local oscillator of the communication system is generally provided by a Phase Locked Loop (PLL) or a crystal oscillator, a signal output by the crystal oscillator is a sine wave or a square wave, and a signal output by the PLL is a square wave. For a conventional communication system, a sine wave is required as its local oscillator. Since the crystal oscillator has a narrow operating frequency range and is difficult to adjust, it is rarely used as a local oscillator in a broadband communication system. The phase-locked loop has wide operating frequency and controllable frequency, and is widely used in clock sources of communication systems. According to the Fourier expansion law, square waves are generated by overlapping multi-order sine wave signals, if a sine wave signal with the same frequency as the square waves is obtained, secondary signals need to be completely filtered, the secondary signals are often integral multiples of the square wave signals, and therefore the problem can be solved by using a filter.

Filters used in communication systems can be classified into passive filters and active filters according to used devices, and can be classified into high-pass filters, band-pass filters, low-pass filters and band-stop filters according to pass band frequency bands. The passive filter is composed of passive devices such as a capacitor, a resistor and an inductor, and the active filter is composed of active devices such as a transistor or an operational amplifier. In order to solve the filtering problem of high frequency signals, microstrip filters are designed and widely used. Microstrip filters are made to have the properties of a filter by drawing the shape of the corresponding circuit on FR4 or other materials so that the drawn circuit contains both capacitive and resistive properties. Microstrip filters are often used in high frequency signal environments above gigahertz, since the capacitive and resistive properties exhibited on the microstrip can be on the order of the femtocells (fC) and milliohms (mR). The microstrip filter is classified into a hairpin type, a parallel coupled line, a comb line, an interdigital type, and the like, according to a drawn pattern. In order to solve the problem of filtering out the sine wave from the square wave, the above problem can be effectively solved by using a low-pass filter.

Universal Asynchronous Receiver/Transmitter (UART) is commonly referred to as UART. It converts data to be transmitted between serial communication and parallel communication. The operating principle is to transmit each character of the transmission data bit by bit, including a start bit, a data bit, a parity bit and a stop bit. The specific structure of the device can be divided into an output buffer register, an output shift register, an input buffer register, a control register and a state register. The UART protocol is often used for short-range low-speed communication between chips or computers, and is a widely-used communication protocol.

Disclosure of Invention

The inventor finds that after the design of the conventional passive filter is finished, the working frequency and the bandwidth of the conventional passive filter are fixed parameters, and the problem that the passband is short and flexible adjustment is difficult to realize exists in the generation of the local oscillator for the communication system with wide working frequency, so that the conventional passive filter is difficult to completely filter the multi-order harmonic waves contained in the square wave and is difficult to be used for the generation of the local oscillator. In order to solve the technical problem, the invention provides a program-controlled microstrip filter based on a UART protocol, which can effectively use a passive filter for local oscillator generation of a communication system. The specific technical scheme is as follows:

a programmable microstrip filter based on UART protocol, comprising: the system comprises a UART interface, a microprocessor, a relay, a sub-microstrip filter and an impedance matcher;

the UART interface is used for receiving a control signal transmitted to the filter from the upper computer; the microprocessor is used for decoding the received UART signal, converting the decoded UART signal into a control signal and controlling the on-off of the relay; the relay is used as a channel switch, receives a control signal from the microprocessor and is used for selecting a channel of the sub-filter; the sub-filter is a basic filtering unit and is used for filtering square wave signals in different frequency ranges and selecting whether the signals pass through the filtering path or not by the relay; the impedance matcher is used for matching the impedance value of the pass band to ensure the load balance at the two ends of the lead.

A sine wave generation method of a multi-order program-controlled filter based on a UART protocol comprises the following steps:

(1) connecting a signal sent by a phase-locked loop to an input interface of a filter, and starting the phase-locked loop;

(2) the upper computer sends a corresponding control signal through the UART interface, a corresponding filter channel is selected, and the microprocessor receives the UART signal and transcodes the UART signal into a signal for controlling the relay;

(3) the relay receives the signal of the microprocessor and controls whether the sub-filter passage is on or off, thereby finishing the work of selecting the filter passage.

The invention has the following beneficial effects:

the invention ensures that the sine wave signal filtered by the square wave has no harmonic wave with high order such as second harmonic wave and the like by selecting the passing micro-strip filter path through a program, solves the problem that the square wave is converted into the sine wave in a wide working frequency band of the communication system, and improves the automation level of the communication system.

Drawings

Fig. 1 is a schematic diagram of a programmable microstrip filter based on a UART protocol according to an embodiment of the present invention.

In the figure: the device comprises a UART signal interface 1, a microprocessor 2, a square wave signal input interface 3, a sine wave signal output interface 4, a relay 5, a sub-microstrip filter 6 and an impedance matcher 7.

Detailed Description

In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

Referring to fig. 1, a schematic diagram of a programmable microstrip filter based on a UART protocol according to an embodiment of the present invention is described below with reference to an example of converting an input square wave into a sine wave, where a corresponding square wave generating device may be a phase-locked loop, an output signal load may be a resistive load, and an upper computer control system may be a personal computer.

The system comprises: the device comprises a UART signal interface 1, a microprocessor 2, a square wave signal input interface 3, a sine wave signal output interface 4, a relay 5, a sub-microstrip filter 6 and an impedance matcher 7.

The UART signal interface 1 is connected with a personal computer, the square wave signal input interface 3 is connected with a phase-locked loop output signal, and the sine wave signal output interface 4 is connected with an output load.

Those skilled in the art will appreciate that the signal interface has many forms, and any interface capable of ensuring the electrical characteristics can be used for the UART signal interface 1, the square wave signal input interface 3 and the sine wave signal output interface 4. The present invention is not particularly limited.

Those skilled in the art will appreciate that there are many ways to perform impedance matching, and in this example, impedance matching is performed only by using a resistor ground to maintain signal quality, but the present invention is not limited thereto. The present invention is not limited to the specific design of the impedance matcher 7.

Those skilled in the art can understand that the types of microstrip filters are various to meet different index requirements, and therefore, the present invention is not limited to each channel and its corresponding type in the sub-microstrip filter 6.

Preferably, the number of the sub microstrip filters may be greater or less than the three channels shown in fig. 1, so as to optimize the filtering level of the harmonic waves and widen the operating frequency of the program-controlled microstrip filter, and therefore the number of the channels of the sub microstrip filter 6 is not specifically limited in the present invention.

Correspondingly, the present invention further provides an embodiment of a method for converting an input square wave into a sine wave, which can be applied to the program-controlled microstrip filter system described in the above embodiment. The method may specifically include:

s1, electrifying the program control microstrip filter system, and outputting square waves to the square wave signal input interface 3 by the phase-locked loop;

s2, the personal computer sends a control instruction to the microprocessor 2 through the UART signal interface 1, and the control instruction is used for selecting a microstrip path or closing all microstrip filter paths;

s3, after receiving the instruction obtained from the UART signal interface 1, the microprocessor 2 processes the instruction, converts the instruction into a signal for controlling the relay 5, and controls the on-off of the corresponding relay;

and S4, the signal passes through the impedance matcher 7 and outputs the program-controlled microstrip filter through the sine wave signal output interface 4, and the sine wave is transmitted to the resistive load.

The specific state diagram of this step can be referred to as shown in fig. 1.

Preferably, the analysis method and algorithm for the UART protocol executed by the microprocessor 2 may be designed by a user, so as to improve the working efficiency of the program-controlled microstrip filter, which is not limited herein.

The technical scheme provided by the embodiment solves the problem of local oscillation generation of the communication system, so that the microstrip filter can be better applied to a wide-bandwidth communication system, the communication system obtains a local oscillation source with a higher signal-to-noise ratio, and the quality and the automation level of the communication system are improved.

The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

6页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:周期信号的参数确定方法及电子设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类