A method of resolving a phase ambiguity between subarrays in a virtual array of a time-division multiplexing, TDM, multiple-input multiple-output, MIMO, frequency-modulated continuous-wave, FMCW, radar, wherein the TDM MIMO FMCW radar comprises an array of physical receivers including at least one row of physical receivers with a first spacing ( L 1) in a first direction, and further comprises a plurality of physical transmitters arranged with a second spacing ( L 2) in said first direction, wherein each of the subarrays in the virtual array is generated by a combination of the array of physical receivers and one of the physical transmitters, the method comprising: obtaining a virtual array signal of a range-Doppler bin relating to a scene with a moving object, each element of the virtual array signal corresponding to one virtual antenna element of the virtual array; compensating a velocity-induced phase shift of the virtual array signal using a phase compensation method, which introduces a phase ambiguity between the subarrays if the moving object's velocity exceeds a threshold, thereby obtaining a compensated virtual array signal; computing, based on elements of the compensated virtual array signal corresponding to one subarray at a time, a spatial phase change rate with respect to the first direction; from the spatial phase change rate with respect to the first direction and the second spacing ( L 2), predicting a spatial phase shift between a pair of the subarrays; determining a residual phase shift between said pair of subarrays by comparing (710.1) an actual phase shift of the compensated virtual array signal and the spatial phase shift; and applying an inverse of the residual phase shift to the compensated virtual array signal. wherein the TDM MIMO FMCW radar comprises an array of physical receivers including at least one row of physical receivers with a first spacing ( L 1) in a first direction, and further comprises a plurality of physical transmitters arranged with a second spacing ( L 2) in said first direction, wherein each of the subarrays in the virtual array is generated by a combination of the array of physical receivers and one of the physical transmitters, the method comprising: obtaining a virtual array signal of a range-Doppler bin relating to a scene with a moving object, each element of the virtual array signal corresponding to one virtual antenna element of the virtual array; compensating a velocity-induced phase shift of the virtual array signal using a phase compensation method, which introduces a phase ambiguity between the subarrays if the moving object's velocity exceeds a threshold, thereby obtaining a compensated virtual array signal; computing, based on elements of the compensated virtual array signal corresponding to one subarray at a time, a spatial phase change rate with respect to the first direction; from the spatial phase change rate with respect to the first direction and the second spacing ( L 2), predicting a spatial phase shift between a pair of the subarrays; determining a residual phase shift between said pair of subarrays by comparing (710.1) an actual phase shift of the compensated virtual array signal and the spatial phase shift; and applying an inverse of the residual phase shift to the compensated virtual array signal. obtaining a virtual array signal of a range-Doppler bin relating to a scene with a moving object, each element of the virtual array signal corresponding to one virtual antenna element of the virtual array; compensating a velocity-induced phase shift of the virtual array signal using a phase compensation method, which introduces a phase ambiguity between the subarrays if the moving object's velocity exceeds a threshold, thereby obtaining a compensated virtual array signal; computing, based on elements of the compensated virtual array signal corresponding to one subarray at a time, a spatial phase change rate with respect to the first direction; from the spatial phase change rate with respect to the first direction and the second spacing ( L 2), predicting a spatial phase shift between a pair of the subarrays; determining a residual phase shift between said pair of subarrays by comparing (710.1) an actual phase shift of the compensated virtual array signal and the spatial phase shift; and applying an inverse of the residual phase shift to the compensated virtual array signal.