Configuration of X4M03 with regard to EIRP, SNR, measurement time, and range window.

Discussion in 'X4M03' started by Timofey Savelyev, Apr 16, 2018.

  1. Timofey Savelyev

    Timofey Savelyev New Member

    Dear experts,

    I received an X4M03 module and set it up to run in MATLAB via ModuleConnector.
    Example XEP_X4_plot_frame.m is working fine, thank you for the great job.
    The default radar configuration looks as follows

    % Input parameters
    COM = 'COM10'; % this I changed from COM4
    FPS = 20;
    dataType = 'bb';

    % Chip settings
    PPS = 26;
    DACmin = 949;
    DACmax = 1100;
    Iterations = 16;
    FrameStart = 0.2; % meters.
    FrameStop = 9.4; % meters.

    Now can you please help me clarify the questions below.

    1. On the transmitting side, can I change the peak EIRP? Is there any setting for that available to the user?
    2. On the receiving side, can you give me a configuration example which illustrates how to increase the SNR by 10 dB compared with the default settings? Which settings should I change to which values? In theory the integration time should increase by factor 10.
    3. An inverse of FPS defines the measurement time Tframe which depends on PPS, DACmin, DACmax, Iterations and other parameters as given by formula (7.6) in the X4 chip datasheet, correct? If so, does it make sense to use that formula in the script directly?
    4. The length of the measured range window is defined by 1536 range bins inside the X4 chip. Is this 9.2 m sharp (FrameStop - FrameStart)?
    5. I can slide with the range window to measure at larger distances, say from 10.2 m to 19.4 m, correct?

    Thank you very much in advance!
    Best regards,
  2. Charlie Shao

    Charlie Shao Moderator Staff Member

    1. There are two settings controlling the transmitting output power, the Pulse Repetition Frequency (PRF) and TX power level. See X4 datasheet for details and corresponding XEP functions: x4driver_set_tx_power and x4driver_set_prf_div. See the X4M05 datasheet ( for regulatory limitations on output power.

    2. In addition to the integration done in the DAC sweep, pulses_per_step and iterations controls how many pulses to integrate in one frame. Every doubling of integration gives theoretically 3 dB improvement in SNR. It is recommended to set iterations to 64 and adjust pulses_per_step according to the desired Frames Per Second (FPS). See this community post for a spread sheet that calculates maximum FPS for given settings:

    iterations and pulses_per_step suppress different types of noise. Keep iterations and pps similar for high FPS, where iterations has to be < 64. Remember to keep iterations integer divisible by 4.

    3. Yes, you can use the formula in the script. There is one thread has discussed this topic. The formula has been transformed into an excel table, here is the link:

    4. Given Fs=23.328GHz, the frame length is:
    LightSpeed = 299792458
    Out[18]: 9.8632849586
    ~9.86 meters.

    5. I reviewed our setting about detection range on X4M200/X4M300, which share the same default detection range setting with X4M03:
    trx_clocks_per_pulse register(CPP) is set to 16 as default, this gives default PRF = Frefclk/CPP = 243MHz/16 = 15.1875 MHz.
    Max detection range = (1/PRF)*LightSpeed/2 =9,8697m.
    If you set CPP to 32, this will double Max detection range to 19,7394m, but the total range from Min to Max should be still 9,8697m since X4 has fixed frame size.
    If you want the detection range to be 9,8697m to 19,7394m, rx_wait should be set to 0x10.
    I also want to remind you that the longer distance will result in week reflection signal so you may need more integration to get a better signal. This will decrease maximum FPS. Also, note that the PRF limits the maximum frame length and that the frame sampling delay can still be increased with rx_wait. You do not want to send the next pulse at the same time you are sampling, since the direct coupled energy from TX to RX will generate noise.
    There is one python example called in module connector, it shows how to change the setting of X4 register. You can do some test to check the result. Let’s keep in touch if you need more discussion.
    Timofey Savelyev likes this.
  3. Timofey Savelyev

    Timofey Savelyev New Member

    Thank you Charlie. This gives me a smooth start.
  4. TimothyYu

    TimothyYu New Member

    Hi Charlie,

    Would you please clarify the following questions:

    (1) What is rx_wait and where can I find the setting?
    (2) What is Frefclk? Is the value adjustable?
    (3) How does the total range from Min to Max related to the frame size?
    (4) Are the sampling rates fixed?

    Thank you very much.
  5. Charlie Shao

    Charlie Shao Moderator Staff Member



    Hi, what about less distance? For example, I would like to read something between 8cm and 80cm, how should I configure my device (X4M06)?
  7. Charlie Shao

    Charlie Shao Moderator Staff Member

    The closer area has very strong direct-pass signal from TX to RX, so the target signal may be covered by this strong signal. I suggest you try to extend DAC range by following X4 radar user guide, this may help to get more information from the target reflection.
    VALMIRO RANGEL likes this.


    Thanks, I will try.
    Another thing, do you have any idea about the "strenght" of this signal from Tx-Rx? By knowing this signal, I could eliminate it by software, implementing a signal cancellation algorithm.
  9. Charlie Shao

    Charlie Shao Moderator Staff Member

    You can evaluate from the data you get.


    Hi Charlie, I have another question, is it possible to configurate the central frequency of transmission of the device?
  11. Charlie Shao

    Charlie Shao Moderator Staff Member

    Yes, it is possible. The central frequency has two options as you can find from X4 datasheet section 1.5. They are targeted for regulations in different countries and area. This MC example shows how to change.
  12. osama almasalmeh

    osama almasalmeh New Member

    my aim is to monitor the hard rate.
    i have X4M03 and i have XEP_X4_plot_frame.m cod which enabled me to plot the motion on y_axis and distance on x_axis. i am wondering if there is a way to plot time on x_axis instead of distance?
  13. Padala Bhaskara Rao

    Padala Bhaskara Rao New Member

    Respected sir

    We have for conversion of .dat file to .mat file.
    This code is working for base band data but not for pulse doppler data

    can u give solution for converting .dat to .csv or .mat