A control method for local oscillator module based on domestic FPGA
Through the control method based on domestic FPGA, the DDS, reference ring and main ring are initially configured and the phase-locked loop parameters are calculated, which solves the problem of insufficient frequency adjustment of the local oscillator module, and accurately control of the local oscillator module is achieved, and the improvement of the local oscillator module is improved. System performance and stability, suitable for RF microwave communication field.
Patent Information
- Application Number
- CN202411132651.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-08-19
AI Technical Summary
The existing local oscillator modules are not flexible enough in frequency adjustment, making it difficult to achieve precise control, affecting signal stability. Especially in the field of radio frequency microwave communication, domestic FPGAs are insufficiently used in local oscillator module control.
Using the control method based on domestic FPGA, the configuration frequency division ratio parameters and polarity parameters of the phase-locked loop are calculated through the initial configuration process of DDS, reference ring and main ring, and the precise adjustment of the local oscillator module, including reset signal processing, SPI data conversion and state machine control ensure frequency stability and signal quality.
It improves system performance and stability, realizes precise adjustment of the local oscillator module, is suitable for the communication field and the wide application of radio spectrum, and enhances the application value of domestic FPGA chips in local oscillator control.
Smart Images

Figure CN118659780B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of radio frequency microwave communication and the field of FPGA application, and in particular to a control method for a local oscillator module based on a domestically produced FPGA. Background Art
[0002] The local oscillator module is the abbreviation of the local oscillator. It is generally used in the receiver. Its function is to generate a frequency (local oscillator frequency) and mix it with the signal frequency received by the receiver to generate a fixed frequency intermediate frequency signal. The intermediate frequency signal frequency is fixed, so the intermediate frequency amplifier circuit is easy to implement. In the existing circuit design system, a single-frequency fiber local oscillator is generally used. Its advantage is stable frequency, but its disadvantage is that it is difficult to adjust the frequency and the accuracy is not enough. The multi-frequency fiber local oscillator is more flexible than the single-frequency fiber local oscillator because it can adjust the frequency within a range, but because the phase difference between its multiple frequencies varies, it will affect the stability of the signal. Therefore, how to control the local oscillator module is of great significance.
[0003] Therefore, the present invention proposes a control method for a local oscillator module based on a domestic FPGA. Summary of the invention
[0004] In order to overcome the shortcomings and deficiencies of the prior art, the present invention proposes a control method for a local oscillator module based on a domestic FPGA, the method comprising:
[0005] Step S1: After the local oscillator module is powered on, the FPGA performs a reset, and the reset signal Set to 1, the delay counter counts for 500ms and then resets the signal Set to 0;
[0006] Step S2: When the reset signal is set to 0, the initialization configuration process is started for the DDS, the reference ring, and the main ring at the same time;
[0007] Step S3: After the initialization configuration of the loop is completed, the initialization frequency point is calculated to obtain the configuration frequency division ratio parameter and polarity parameter of the phase-locked loop;
[0008] The reference loop is the loop that needs to be configured first, and is used to provide a frequency-stable reference input signal to the main loop. The main loop is configured after the reference loop is configured, and the main loop is used to ultimately output a stable frequency synthesis signal or FM modulation signal.
[0009] Furthermore, the step S2 comprises:
[0010] For the DDS chip (reference loop, modulation mode reference input), convert the data into the SPI data format that can be recognized by the chip interface and send it to the configuration registers Reg0: 0x00B0, Reg4: 0x0406004006, Reg0: 0x0040 in sequence;
[0011] For the benchmark ring chip, the SPI data conversion module is called in the same way, and the initialization configuration data 0x1FFA13, 0x1FFA12, 0x000010, and 0x000C19 are sent in sequence;
[0012] For the main ring chip, the SPI data conversion module is called in the same way to send the initialization configuration data 0x1DFA53, 0x1DFA52, 0x000010, and 0x000101 in sequence.
[0013] Furthermore, the frequency point calculation includes:
[0014] Assume the final output frequency is , the actual phase-locked frequency of the main loop is , the reference loop output frequency is , the final output frequency after frequency division is ,have to ;
[0015] Assume that the polarity parameters of the main ring are M and N respectively, and round them off to the nearest integer. , ,have to
[0016] ;
[0017] Assume the division ratio parameter of the reference loop is , , rounded to the nearest integer , the intermediate frequency value is The actual phase-lock frequency is ,have to ;
[0018] Assume the reference input frequency of the reference loop DDS is , the input clock is 800MHz, we get .
[0019] Further, the phase-locked loop configuration includes:
[0020] When the frequency calculation process is completed, the reference input DDS chip of the reference loop is first configured, including: , sent to the frequency control word register Reg6, set is the reference input frequency, and the frequency control word is FTW , according to the calculated frequency control word FTW , convert the data into SPI data format that can be recognized by the chip interface and send it to the configuration register Reg6, so that the DDS output frequency is The reference ring reference input signal;
[0021] After completing the DDS configuration, start the configuration process for the reference loop and determine the R frequency division parameters. and N frequency division parameters ;
[0022] After completing the configuration of the reference ring, start the configuration process for the primary ring.
[0023] Furthermore, the main ring configuration includes:
[0024] According to the manual, the timing state machine is designed to configure the main loop. The state machine includes two states: CFG_IDLE and CFG_POL_STATE. The state machine control logic is as follows: CFG_IDLE is the standby state, which determines whether the current working mode has been switched. When working in single-frequency point mode or reference loop FM modulation mode, the 4-frequency division register configuration process of R division is started. When working in other FM modulation modes, the 2-frequency division register configuration process of R division is started, and the state machine jumps to CFG_POL_STATE. If the working mode has not been switched, when the trigger signal of the completion of the reference loop configuration is received, the polarity configuration register configuration process is started, and the state machine jumps to CFG_POL_STATE; CFG_POL_STATE is the polarity configuration register configuration state. When the trigger signal of the completion of the polarity register configuration is received, the state machine jumps to CFG_IDLE.
[0025] Further, the modulation is implemented, including:
[0026] According to the principle of analog FM modulation, is the modulation signal, is the carrier signal, For the output signal, the known algorithm formula is:
[0027] ;
[0028] in: is the frequency modulation index before quantization, and its expression is:
[0029] ;
[0030] in, is the frequency modulation index before quantization, A m is the amplitude of the modulating signal, is the angular velocity of the modulation signal, f m is the frequency of the modulating signal, is the maximum angular frequency deviation, is the maximum frequency deviation.
[0031] Furthermore, the method includes two implementation modes: a reference loop and a main loop. The modulation signal There are two types of modulation signals: external modulation signals and internal modulation signals. The external modulation signal is input through an external modulation source, converted into an analog modulated digital signal by DAC and transmitted to the modulation module. The internal modulation signal is generated by the DDS IP Core of the FPGA, and the frequency control word is determined by the host computer instruction.
[0032] The present invention has the following beneficial effects:
[0033] The present invention proposes a control method for a local oscillator module based on a domestic FPGA. The method uses a domestic programmable logic device and simultaneously starts an initialization configuration process for a DDS, a reference loop, and a main loop. The method aims to achieve effective control of the local oscillator module through different configuration processes. The method can be widely used in the fields of communications and radio spectrum. The method achieves precise adjustment of the local oscillator through a domestic FPGA chip, thereby improving system performance and stability. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings:
[0035] Figure 1 It is a flow chart of a control method of a local oscillator module based on a domestic FPGA of the present invention;
[0036] Figure 2 The present invention is a phase-locked loop control block diagram of a control method for a local oscillator module based on a domestic FPGA. DETAILED DESCRIPTION
[0037] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the control method of the local oscillator module based on the domestic FPGA proposed by the present invention, its specific implementation method, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0038] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0039] The following is a detailed description of a specific solution of a control method for a local oscillator module based on a domestic FPGA provided by the present invention in conjunction with the accompanying drawings.
[0040] like Figure 1 As shown, the hardware topology of the present invention includes two phase-locked loops, the reference loop and the main loop. The reference loop is the loop that needs to be configured first, and its main function is to provide a frequency-stable reference input signal to the main loop. The main loop is configured after the reference loop is configured. The main function of the main loop is to finally output a stable frequency synthesis signal or FM modulation signal. The specific FPGA configuration process is as follows:
[0041] A1. Initialization configuration process:
[0042] S1. After the local oscillator module is powered on, the FPGA performs a reset, and the reset signal Set to 1, after the delay counter counts 500m, the reset signal Set to 0;
[0043] S2. When the reset signal is set to 0, the initialization configuration process is started for the DDS, reference ring, and main ring at the same time.
[0044] For the DDS chip (reference loop, modulation mode reference input), convert the data into the SPI data format that can be recognized by the chip interface and send it to the configuration registers Reg0: 0x00B0, Reg4: 0x0406004006, Reg0: 0x0040 in sequence;
[0045] For the benchmark ring chip, the SPI data conversion module is called in the same way, and the initialization configuration data 0x1FFA13, 0x1FFA12, 0x000010, and 0x000C19 are sent in sequence;
[0046] For the main ring chip, the SPI data conversion module is called in the same way to send the initialization configuration data 0x1DFA53, 0x1DFA52, 0x000010, and 0x000101 in sequence;
[0047] S3. After the initialization configuration of the two loops is completed, the initialization frequency point is calculated to obtain the configuration frequency division ratio parameters and polarity parameters of the phase-locked loop.
[0048] A2. Frequency calculation process:
[0049] Assume the final output frequency is , the actual phase-locked frequency of the main loop is , the reference loop output frequency is , the final output frequency after frequency division is ,have to
[0050] (3)
[0051] Assume that the polar parameters of the main ring are , , rounded to the nearest integer , ,have to
[0052] (4)
[0053] (5)
[0054] The solution of is as follows:
[0055] (7)
[0056] Assume the division ratio parameter of the reference loop is , , rounded to the nearest integer , the intermediate frequency value is The actual phase-lock frequency is ,have to:
[0057] (8)
[0058] When 30MHz≤ ≤50MHz, ;
[0059] (9)
[0060] When 50MHz< ≤100MHz, ;
[0061] (10)
[0062] (11)
[0063] Assume the reference input frequency of the reference loop DDS is , the input clock is 800MHz, then:
[0064] (12)
[0065] A3, Phase-locked loop configuration:
[0066] When the frequency calculation process is completed, first configure the reference input DDS chip of the reference loop, such as Figure 2 As shown, the configuration process is as follows:
[0067] According to the frequency calculation process , sent to the frequency control word register Reg6, set is the reference input frequency (800MHz), the frequency control word is (48 bits), the calculation formula is as follows:
[0068] (13)
[0069] According to the calculated frequency control word , convert the data into SPI data format that can be recognized by the chip interface and send it to the configuration register Reg6 (address bit 0x06), making the DDS output frequency The reference loop references the input signal.
[0070] After completing the configuration of DDS, start the configuration process for the benchmark ring:
[0071] The benchmark ring configuration process is as follows:
[0072] Determine the R frequency division parameter according to the calculation process (9), (10), (11) and N frequency division parameters , according to the manual and The data bit widths in the register are 14 bits and 13 bits respectively. According to formula (12), the mathematical relationship is as follows:
[0073] (14)
[0074] According to the manual, the timing state machine is designed to configure the main loop. The state machine includes four states: CFG_IDLE, CFG_DDS_STATE, CFG_R_STATE, and CFG_N_STATE. The state machine control logic is as follows: CFG_IDLE is a standby state, waiting for the trigger signal of the completion of the frequency division parameter calculation, and the state machine jumps to CFG_DDS_STATE; CFG_DDS_STATE is the R frequency division register configuration state, waiting for the trigger signal of the completion of the DDS chip configuration, calling the SPI data conversion module to start the R register configuration process, and the state machine jumps to CFG_R_STATE; CFG_R_STATE is the N frequency division register configuration state, waiting for the trigger signal of the completion of the R register configuration, calling the SPI data conversion module to start the N register configuration process, and the state machine jumps to CFG_N_STATE; CFG_N_STATE is the N register configuration waiting state, waiting for the trigger signal of the completion of the N register configuration, and the state machine jumps back to CFG_IDLE to continue waiting for the next frequency switching process.
[0075] After completing the configuration of the reference ring, start the configuration process for the primary ring:
[0076] The main ring configuration process is as follows:
[0077] According to the manual, the timing state machine is designed to configure the main loop. The state machine includes two states: CFG_IDLE and CFG_POL_STATE. The state machine control logic is as follows: CFG_IDLE is the standby state, which determines whether the current working mode has been switched (single frequency point mode or modulation mode). When working in single frequency point mode or reference loop FM modulation mode, the R frequency division (4-frequency division) register configuration process is started. When working in other FM modulation modes, the R frequency division (2-frequency division) register configuration process is started, and the state machine jumps to CFG_POL_STATE. If the working mode has not been switched, when the trigger signal of the reference loop configuration completion is received, the polarity configuration register configuration process is started, and the state machine jumps to CFG_POL_STATE; CFG_POL_STATE is the polarity configuration register configuration state. When the trigger signal of the polarity register configuration completion is received, the state machine jumps to CFG_IDLE.
[0078] A4. Modulation implementation:
[0079] According to the principle of analog FM modulation, is the modulation signal, is the carrier signal, For the output signal, the known algorithm formula is:
[0080] (17)
[0081] Where: is the frequency modulation index before quantization, and its expression is:
[0082] (18)
[0083] in, is the frequency modulation index before quantization, A m is the amplitude of the modulating signal, is the angular velocity of the modulation signal, f m is the frequency of the modulating signal, is the maximum angular frequency deviation, is the maximum frequency deviation.
[0084] The present invention includes three implementation modes: reference loop FM and main loop FM. The modulation signal There are two types of modulation signals: external modulation signals and internal modulation signals. The external modulation signal is input through the external modulation source, converted into an analog modulation digital signal through the DAC and transmitted to the modulation module; the internal modulation signal is generated by the DDS IP Core of the FPGA, and the frequency control word is determined by the host computer instruction. The specific implementation method of the reference ring FM modulation based on the internal modulation signal is as follows:
[0085] According to the principles of (17) and (18), the first parameters to be determined include the maximum frequency deviation value Considering that the final control effect is reflected in the amplitude of the modulation signal, the maximum frequency deviation defined in the present invention is , here is the maximum frequency deviation value of the final output of the main loop. Assume that the output of the reference loop DDS is The maximum frequency deviation is , Available through The calculation process of the above formulas (1)-(12) is used to obtain the value, which will not be repeated here. Next, the DDS output frequency needs to be determined. and carrier frequency ,in Assuming it as the center frequency, the calculation process of the above equations (1)-(12) can also be used to obtain After knowing the above conditions, the FM modulation function is implemented. The specific process in FPGA is as follows:
[0086] Determine through the host computer command , , according to the frequency calculation process to get the center frequency , let the FM modulation discrete expression of the reference ring DDS be . Internal modulation data Generated by DDS IP Core, it is 16-bit signed digital modulation data with an amplitude output range of - , assuming the frequency deviation step value is , call the divider IP Core to calculate the frequency deviation step value = , assuming the instantaneous frequency deviation is , call the multiplier IP Core to calculate the instantaneous frequency deviation value ,at this time . Known center frequency value and instantaneous frequency deviation ,have to According to formula (13), the instantaneous frequency of DDS can be obtained , the FM modulation function is realized by updating the frequency control word of DDS in real time. The implementation method of the modulation function of the main loop FM is similar to the above, the difference is that the calculation of the frequency deviation value and the center frequency value can be obtained through the frequency point calculation process, which will not be repeated here.
[0087] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0088] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A control method for a local oscillator module based on a domestic FPGA, characterized in that: The method includes: Step S1: After the local oscillator module is powered on, the FPGA performs a reset, and the reset signal Set to 1, the delay counter counts for 500ms and then resets the signal Set to 0; Step S2: When the reset signal is set to 0, the initialization configuration process is started for the DDS, the reference ring, and the main ring at the same time; Step S3: After the initialization configuration of the three loops is completed, the initialization frequency point is calculated to obtain the configuration frequency division ratio parameters and polarity parameters of the phase-locked loop; The DDS chip is the loop that needs to be configured first. After completing the configuration of the DDS, the configuration process of the reference loop is started to provide a frequency-stable reference input signal to the main loop. The main loop is configured after the configuration of the reference loop is completed. The main loop is used to finally output a stable frequency synthesis signal or FM modulation signal; The step S2 comprises: For the DDS chip reference ring and modulation mode reference input, the data is converted into the SPI data format that can be recognized by the chip interface and sent to the configuration registers Reg0: 0x00B0, Reg4: 0x0406004006, and Reg0: 0x0040 in sequence; For the benchmark ring chip, the SPI data conversion module is called in the same way, and the initialization configuration data 0x1FFA13, 0x1FFA12, 0x000010, and 0x000C19 are sent in sequence; For the main ring chip, the SPI data conversion module is called in the same way to send the initialization configuration data 0x1DFA53, 0x1DFA52, 0x000010, and 0x000101 in sequence; After completing the DDS configuration, start the configuration process for the reference loop and determine the R frequency division parameters. and N frequency division parameters ; The reference ring configuration process includes: configuring the main ring according to the manual design timing state machine, the state machine includes four states: CFG_IDLE, CFG_DDS_STATE, CFG_R_STATE, and CFG_N_STATE. The state machine control logic is: CFG_IDLE state is a standby state, waiting for the trigger signal of the completion of the frequency division parameter calculation, and the state machine jumps to CFG_DDS_STATE; CFG_DDS_STATE is the R frequency division register configuration state, waiting for the trigger signal of the completion of the DDS chip configuration, calling the SPI data conversion module to start the R register configuration process, and the state machine jumps to CFG_R_STATE; CFG_R_STATE is the N frequency division register configuration state, waiting for the trigger signal of the completion of the R register configuration, calling the SPI data conversion module to start the N register configuration process, and the state machine jumps to CFG_N_STATE; CFG_N_STATE is the N register configuration waiting state, waiting for the trigger signal of the completion of the N register configuration, and the state machine jumps back to CFG_IDLE to continue waiting for the next frequency switching process; The main loop configuration process includes: configuring the main loop according to the manual design timing state machine, the state machine includes two states, CFG_IDLE and CFG_POL_STATE, and the state machine control logic is: the CFG_IDLE state is the standby state, judging whether the current working mode is switched, when working in single frequency point mode or reference loop FM modulation mode, starting the R-division 4-frequency division register configuration process, when working in other FM modulation modes, starting the R-division 2-frequency division register configuration process, and the state machine jumps to CFG_POL_STATE at the same time, if the working mode is not switched, when receiving the trigger signal of the completion of the reference loop configuration, starting the polarity configuration register configuration process, and the state machine jumps to CFG_POL_STATE at the same time; CFG_POL_STATE is the polarity configuration register configuration state, when receiving the trigger signal of the completion of the polarity register configuration, the state machine jumps to CFG_IDLE.
2. A control method for a local oscillator module based on a domestic FPGA as claimed in claim 1, characterized in that: The frequency point calculation includes: Assume the final output frequency is , the actual phase-locked frequency of the main loop is , the reference loop output frequency is , the final output frequency after frequency division is ,have to ; Assume that the polarity parameters of the main ring are M and N respectively, and round them off to the nearest integer. , ,have to: ; Assume the division ratio parameter of the reference loop is , , rounded to the nearest integer , the intermediate frequency value is The actual phase-lock frequency is ,have to ; Assume the reference frequency of the reference ring DDS reference input is , the input clock is 800MHz, we get .
3. A control method for a local oscillator module based on a domestic FPGA as claimed in claim 1, characterized in that: Phase-locked loop configuration, including: When the frequency calculation process is completed, the reference input DDS chip of the reference loop is first configured, including: , sent to the frequency control word register Reg6, set The reference input frequency, the frequency control word is FTW, according to the calculated frequency control word FTW, the data is converted into the SPI data format that can be recognized by the chip interface, and sent to the configuration register Reg6, so that the DDS output frequency is The reference loop reference input signal; After completing the DDS configuration, start the configuration process for the reference loop and determine the R frequency division parameters. and N frequency division parameters ; After completing the configuration of the reference ring, start the configuration process for the primary ring.
4. A control method for a local oscillator module based on a domestic FPGA as claimed in claim 1, characterized in that: Modulation implementation, including: According to the principle of analog FM modulation, is the modulation signal, is the carrier signal, For the output signal, the known algorithm formula is: ; in: is the quantized frequency modulation index, and its expression is: in, is the frequency modulation index before quantization, A m is the amplitude of the modulating signal, is the angular velocity of the modulation signal, f m is the frequency of the modulating signal, is the maximum angular frequency deviation, is the maximum frequency deviation.
5. A control method for a local oscillator module based on a domestic FPGA as claimed in claim 4, characterized in that: The method includes the implementation of the reference loop and the main loop, and the modulation signal There are two types of modulation signals: external modulation signals and internal modulation signals. The external modulation signal is input through an external modulation source, converted into an analog modulated digital signal by DAC and transmitted to the modulation module. The internal modulation signal is generated by the DDS IP Core of the FPGA, and the frequency control word is determined by the host computer instruction.
