How can I get a high frame rate more than 400 ?

Discussion in 'X2 & X4 SoC' started by erpeng, Jun 2, 2017.

  1. erpeng

    erpeng New Member

    Can X4 get a high frame rate more than 400 ? Now my max frame rate is 30, so how can I improve the frame rate in x4?
  2. erpeng

    erpeng New Member

    My Radar sensor is XEP X4m03
  3. Magnus Bache

    Magnus Bache New Member Staff Member

    Just to make sure I have understood your setup; you are using an X4M03 module and the XEP interface in python? Currently we have not been running frame rates above 500 FPS internally, and I'm not exactly sure of the exact upper limit.

    When you modify the frame rate, it's important that you also modify the X4 chip integration parameters (iterations, pulses per step and DAC range) to make sure that the sweep time (the time it takes to build one frame) is below the frame rate period. For running 500 FPS i suggest the following set of parameters:
    - Iterations = 16
    - PulsesPerStep = 10
    - DACmin = 949
    - DACmax = 1100
    - DACstep = 1

    Be aware that default queue length in ModuleConnetor is 1000, so if you do not process the data fast enough on the host side, you might lose radar frames. Let me know how this works out.

  4. erpeng

    erpeng New Member

    Hi Magnus:
    Yes, I am using an X4M03 module and the XEP interface in python
    And I have set the parameters you give me:
    - Iterations = 16
    - PulsesPerStep = 10
    - DACmin = 949
    - DACmax = 1100
    - DACstep = 1
    I test it in "",and set the FPS num 500
    I find some questions here:
    (1) I use the demo python code "", it worked ! but the real FPS is not 500 , the real FPS is 130! The frame is lost. I use the "time.time()" in python to calculate the real FPS
    (2) when I set a high FPS, I can not change effective action distance. what is this mean is that:r.x4driver_set_frame_area(FrameStart,FrameStop) is not worked ! I can not set FrameStart,FrameStop because I will get a error.
    (3) the last question is that, when I use r.x4driver_set_downconversion(1) to downconversion the frame data , the max FPS is 250! . I should use the "time.time()" to calculate the real FPS

    I just do not kown why these happen and how I can get a stable high frame data
    thank you very much

    Last edited: Jun 7, 2017
  5. Magnus Bache

    Magnus Bache New Member Staff Member

    Hi erpeng,

    Sorry for the late response.

    1) It might be that the python example you are trying to run is not fast enough to plot 500 FPS, and that you end up losing data. Try to remove the plotting part of the code, and only read the frames into a buffer. To avoid overusing memory use a buffer that you overwrite each time or a cyclic one. The point is to try to minimize the processing done on each frame. I suspect that slow processing speed is the problem.

    2) What kind of values are you trying to set in x4driver_set_frame_area?

    3) I'm not sure exactly what you mean here. I think it might be related to point 1).

    Let me know how it goes!

  6. yu_rong

    yu_rong New Member

    Hi Magnus:

    What is the frame rate range of this X4M03 development kit? Is it convenient to change fps?
    This parameter is very important to us. Can you provide some information on that or any documentation?

    Thanks very much.
  7. Olav Liseth

    Olav Liseth Administrator Staff Member


    Just made a simple test of setting the Frames Per Second (FPS). I've added a script that initiates a module supporting XEP. The X4 device is set up with minimum sweep time settings (DACMin, DACMax, iterations, pulses_per_step). Frames are streamed for some seconds and the result is checked for:

    * Frame counter consistency
    * Actual sampling time is approximately as expected

    Important that the computer timing in this test is not mixed up with module FPS accuracy.

    I added a test function that can be run with:

    python <device_name>
    Where <device_name> is the module mount point. Here's the summary from a run:


    Attached Files:

    Charlie Shao and Shweta like this.
  8. Chinhan

    Chinhan New Member

    Hi all,

    Is any formula describe relationship between FPS and frame integration. The frame integration is product of pps, iterations and DAC range. How to map FPS to pps, iterations and DAC range? And how to describe pps and iteration.
  9. Nikolaj Andersen

    Nikolaj Andersen New Member Staff Member


    I've attached an excel sheet you can use to calculate the frame time and maximum FPS for a given set of parameters. The most commonly used parameters are the four top ones, PulsesPerStep, Iterations, DacMin and DacMax. You can also change the PRF by changing the PRF Div parameter.

    As an example, with PulsesPerStep=300, Iterations=16, DacMin=949, DacMax=1100 we get a maximum FPS of 20.8. For an FPS of 17, the X4 chip is active about 81.67% of the time.


    Attached Files:

    Charlie Shao and Shweta like this.
  10. Othmane

    Othmane New Member

    Hello Nikolaj,

    Is this excel sheet also valid for the X4M200 ?


  11. Charlie Shao

    Charlie Shao Moderator Staff Member

    Hi Othmane,
    Yes, this excel sheet is fit for sensors based on X4 chip including X4M200.