X4 Simple way to read a X4M03

Discussion in 'X2 & X4 SoC' started by Maximilian, Jan 23, 2018.

  1. Maximilian

    Maximilian New Member

    Hi,
    I own a X4M03, because I was interested how precise this device could work.
    Unfortunately I have very basic knowledge in this sector.
    How could I easily read and plot what the device is able to read?

    Thanks
    Max
     
  2. Charlie Shao

    Charlie Shao Moderator Staff Member

    Hi Maximilian,
    The X4M03 is designed for developers who can programming on MCU to implement their own radar DSP algorithm. The default XEP on X4M03 support raw data output through USB or serial port, so you can start from computer side at first to verify your idea.

    I am not sure if you have some knowledge of programming, but Matlab or Python script should be a good start. XeThru sensor software API on computer called ModuleConnector, there are some ready to use examples your can try.
    Python example:
    XEP_plot_record_playback.py
    x4_pulsedoppler.py
    Matlab example:
    XEP_X4_plot_frame.m
     
  3. Shihab Khan

    Shihab Khan New Member

    Hi Charlie, I have a few questions on XEP_X4_plot_frame.m, please help me out.

    1. What does 'frame' in the script signify? Is it the raw reflected signal?

    2. Can you please tell me what the following function does (from the matlab script) ?
    % Get frame (uses read_message_data_float)
    [frame, ctr] = radar.GetFrameNormalized();

    Thanks
     
  4. Faisel Tubbal

    Faisel Tubbal New Member

    I am also looking for answer for this question.
     
  5. Charlie Shao

    Charlie Shao Moderator Staff Member

    Hi Shihab, here are answers to your questions:
    1. 'Frame' means the raw radar reflected data created by module, it could be RF data or baseband data.
    The X4 chip has a built-in down-conversion chain and then you can select RF data or complex baseband data output. Since the signal is digitized at RF, the down-conversion from RF to BB is implemented digitally. This is done by multiplying every frame with a complex down-conversion vector and subsequent anti-aliasing LP filtering and decimation by a factor of 8. This is equivalent to an analogue down-conversion chain (I/Q mixers and LP filters). However the digital process guarantees perfect amplitude/phase balance.
    baseband data: https://en.wikipedia.org/wiki/Baseband

    2. This command requires module to output normalized float data instead of byte data. Please refer to XeThru File Format document.
     
    Faisel Tubbal likes this.
  6. Maximilian

    Maximilian New Member

    Which data is the one shown with "XEP_plot_record_playback.py"?
    Doppler radar or pulse radar? Or a combination?
    Thanks
     
  7. Charlie Shao

    Charlie Shao Moderator Staff Member

    It is pulse radar, or so-called radar raw data. The radar raw data could be RF data or baseband data.
     
  8. Angela B

    Angela B New Member

    I have a question about the raw data output obtained through the read_message_data_float() function of xep instances. (As in the XEP_plot_record_playback.py file for example).
    What are the units of this output? Or alternativley, what are the x-/y- axes labels in the plot generated in this file?
    Or is there an example file with the x-/y-Axis noted down?
     
  9. Charlie Shao

    Charlie Shao Moderator Staff Member

    Hi Angela,

    read_message_data_float() support output RF data or baseband data.

    The X4 chip has a built-in down-conversion chain and then you can select RF data or complex baseband data output. Since the signal is digitized at RF, the down-conversion from RF to BB is implemented digitally. This is done by multiplying every frame with a complex down-conversion vector and subsequent anti-aliasing LP filtering and decimation by a factor of 8. This is equivalent to an analog down-conversion chain (I/Q mixers and LP filters). However the digital process guarantees perfect amplitude/phase balance.
    baseband data: https://en.wikipedia.org/wiki/Baseband

    There is no specific meaning to the unit of received data. For RF data, they are relative numbers standing for the strength of reflection. For baseband data, they are complex number can be used to calculate amplitude and phase.
     
  10. Cliffern12

    Cliffern12 New Member

    Hi,
    What form of data is in the baseband data in the form of ( is it Magnitude vs frequency) or is it the signal acquired when the received signal and the transmitted signal are mixed
     
  11. NSANGOU CHOUAIBOU

    NSANGOU CHOUAIBOU Active Member

    Hi Cliffen12,
    The baseband data is a down-converted RF data in the form of a complex vector with 8 times less samples than the original RF data (decimation by a factor of 8). The RF signal is acquired at the RX antenna via RF sampling CTBV (Continuous Time Binary Valued ) signal processing implementation approach and the BB signal is the down-converted and decimated version of the RF signal.
    Each sample is a pair of I (In-phase) / Q (quadrature) or A (Amplitude) / P (Phase) numbers according to how you want to represent your signal.

    B;R,
    Chouaibou.