2
$\begingroup$

I have an FMCW radar I am working on where I am also attempting to remove a specific target from the received signal (before it is sampled by the ADC). To do so, during each FMCW sweep, I am subtracting out (via a DAC output going to an INA) a calibration signal which is the output of an FIR filter (whose passband has the specific signal) applied on the previous FMCW sweep return. Effectively, I have a DAC correction signal which I update after each sweep to try and remove the specific target. Here is a crude drawing of this system represented as a controls system. Note, each of the nodes here represents a vector (one point for each frequency in time), so I'm not sure that it translates perfectly to a control system as drawn. Crude description of target subtraction method. I have already implemented this, and it mostly works. The issue is that over time, the impulse response from the FIR filter seems to build in the DAC correction signal (at both the start and end, because of forward and backward filtering?) and thus builds in the return signal. Below is a screenshot of the raw IFQ response when using this method with a low pass FIR filter (trying to remove close targets) while the radar pointed at the same target ~2 meters away for several hours while sweeping with a 1 GHz bandwidth trapezoidal chirp. Example of impulse response appearing in radar return over time. Is there an obvious reason why this happens? I'm having a hard time finding explanations or causes, so I wanted to ask here. Also, I apologize if this is too poor/vague of a description. Please let me know if there's any context that could help describe this scenario.

Thank you for your help!

$\endgroup$
10
  • $\begingroup$ What is the actual goal? What kind of targets are you trying to "remove"? From your post, it seems there's close-in returns you don't want. In that case, there are more straight-forward things you can do in the digital domain. $\endgroup$
    – Envidia
    Commented Jul 4 at 2:54
  • $\begingroup$ The idea is removing larger unwanted targets before a large amplification stage, to allow higher gains of smaller target returns without saturating the ADCs $\endgroup$ Commented Jul 4 at 2:58
  • $\begingroup$ My bad, I forgot about the pre-ADC requirement. Are these targets constrained to a particular range? Or can they move around the entire instrumented range you're considering? If the case is the former, you can apply a sensitivity-time-control (STC) to attenuate the closer in returns. That does however require that you can control the amplification/attenuation of the amplifiers in time. $\endgroup$
    – Envidia
    Commented Jul 4 at 3:03
  • 1
    $\begingroup$ I think your diagram is wrong. You have a delay free loop around the lower left summing node. I think you need a frame delay in there. My attempt would be to write the whole thing out as equations and than calculate the closed loop transfer function, but this block diagram cannot be transcribed as is. $\endgroup$
    – Hilmar
    Commented Jul 4 at 7:42
  • 1
    $\begingroup$ An FIR filter in a closed loop is no longer an FIR. An FIR filter in the feedback path is an FIR filter in a closed loop. It's possible to tweek this to be stable, but that's not a given. In fact, when I was a graduate student taking advanced control-theory classes, almost any time there was added delay anywhere in the loop, it caused a stable system to become unstable. $\endgroup$ Commented Jul 4 at 21:04

3 Answers 3

3
$\begingroup$

FIR filters are typically a bad idea to include in the feedback of a control loop, unless the system is significantly oversampled such that the delay of the filter is insignificant. If an additional filter is to be used, care should be made to implement a minimum phase filter with review of system stability. The stability of a simple loop like this is easily determined from the Bode Stability criterion (in general when working with unstable plants using the Nyquist Criterion would be more robust): The Bode Stability Criterion is to review the frequency response for the "open loop gain" and ensure that the phase does not surpass -180° while that magnitude of the gain in dB is still positive.

For this simple loop, without considering yet the filter given by $H(z)$, the open loop gain is frequency response of the unit sample delay cascaded with the accumulator. We get the frequency response by replacing $z$ with $e^{j\omega}$ in the transfer function, where $\omega$ is the normalized radian frequency in units of radians/sample ($\pi$ corresponds to the Nyquist frequency $f_s/2$, where in this case $f_s$ is the OP's sweep repetition rate). The transfer function of the unit delay is $z^{-1}$ and the transfer function for the accumulator is $1/(1-z^{-1})$. Cascading the two results in the open loop transfer function or "open loop gain":

$$G_{OL}(z) = \frac{z^{-1}}{1-z^{-1}}$$

We can solve this simple case manually, but in general the frequency response (as the DTFT for a digital system) is readily provided by the function freqz which is available in MATLAB, Octave and Python's scipy.signal library) demonstrated below:

import scipy.signal as sig
w, h = sig.freqz([0, 1], [1, -1])

Bode Plot

We see that without the filter even included, there is about 60° of phase margin when the frequency reaches the 0 dB crossing (which is where the loop BW would be). If the delay of the additional filter results in a phase that exceeds -60° at this frequency, the closed-loop system will be unstable, and even if it is less than -60°, as the phase margin decreases below approximately 35°, significant ringing in a step changes will result. A single additional unit sample delay (let alone multiple delays as done with an FIR filter implementation) has a phase versus frequency transfer function that goes from 0 to -180° as the frequency extends from DC to Nyquist, thus it is clear that even one more sample delay in the OP's loop will result in instability.

In general it is good practice to let the control loop itself do the filtering (it is a filter!): With the accumulator (digital integrator) alone the result would be a first order loop and thus provide filtering of -20 dB/decade beyond the loop bandwidth (which is set by adjusting the gain of the input to (or output from) the accumulator. For tighter filtering (and to track first order dynamics to zero error) you can add a second accumulator, but this would also necessitate a proportional term (to be a second order Proportional-Integral or PI loop). When the system is significantly oversampled, an additional low-pass filter with a cut-off much higher than the loop bandwidth would also have proportionally much less delay, so it is for these cases, if done properly, that additional filtering can be included.

$\endgroup$
6
  • $\begingroup$ Thanks for the in depth response! I have some questions about applying that to my system. In my case, the FIR filter is applied to a full time series sweep of frequency points and is applied forward/backward, so there shouldn't be any phase shift. Additionally, the next freq sweep does not occur until after the FIR filter is finished, so is delay an issue in my case? I drew my diagram because it made sense to me visually, but I'm wondering if it doesn't fully characterize the timing of the system and the idea of each node being a vector of points. $\endgroup$ Commented Jul 4 at 16:14
  • $\begingroup$ A "forward-backward" FIR filter is non-causal and can only be done in post-processing--- is that what you are doing here (post-processing only)? Yes if you compute the FIR result completely before the next sweep occurs, then that is basically running the FIR filter at a much higher rate (so wouldn't be consistent with your diagram as a function of $H(z)$, so I think I agree the diagram may not match your implementation. Still if you are seeing an instability, my first inclination would be to blame that on delay so actually mapping out your system with a consistent processing rate to see... $\endgroup$ Commented Jul 4 at 20:39
  • $\begingroup$ what the equivalent open loop response and predicted stability would be should be helpful (I thought) $\endgroup$ Commented Jul 4 at 20:40
  • $\begingroup$ //"A "forward-backward" FIR filter is non-causal and can only be done in post-processing"// - - - - There is a way to do filtfilt() causally, if you're willing to put some delay into it. Like that Powell-Chau thing. $\endgroup$ Commented Jul 4 at 21:08
  • 1
    $\begingroup$ No, it isn't, of course, zero-phase. The only real-time zero-phase thingy is a wire, I think. But I just wanted to say that you can do real-time linear-phase filtering with Truncated IIR filters and the Powell-Chau filtfilt thingie and overlap-adding. $\endgroup$ Commented Jul 4 at 23:45
1
$\begingroup$

As I proposed in the comments, implementing a sensitivity-time-control (STC) scheme might suit you better if your hardware can handle it.

Let's assume two identical targets at different ranges. We have the first target at 10 m and the second at 200 m. Their return power will then be scaled in range $R$ by $1/R^4$ assuming a monostatic system (two-way travel).

Also, lets use the ADC's max input voltage to be $\pm\ 1\ V$. The amplifier has a 50 dB gain and for this example, does not saturate at any input power. We're strictly getting the output of the amplifier and hoping that it's within the specs of the ADC.

We send out a single chirp and get the following returns:

enter image description here

Not good, the input voltage is beyond $\pm\ 1\ V$ and we get our dreaded 0xFFFFF... data stream of death. Also note that, there's two targets in the scene, where the farther one is completely dominated by the closer in target. Assuming you could process this return, you would get:

Hypothetical return of saturated ADC

Thus you can reliably only see the close-in target.

Applying STC

Now lets use the ability to sweep the gain/attenuation of the amplifier as a function of time. We'll levy on ourselves the requirement that we also want to be able to see close-in returns, so we can't simply blank the receiver (it is FMCW after all). The nominal STC curve we'll use is:

enter image description here

This shows that we're interested in targets at the 200 m range and beyond. The attenuated portion is also scaled by $\alpha/R^4$, where $\alpha$ is some factor based on your design.

We send a single chirp out again, but this time we apply the STC on the raw returns:

enter image description here

Both targets are now visible, and well within the range of the ADC. After performing the DFT to process them in range, we get:

enter image description here

And both targets are detectable.

$\endgroup$
0
$\begingroup$

Your problem is that you have a multiple input multiple output system which couples the elements of your sweep, thus we indeed expect the edge effects of your zero-phase digital FIR filter to work their way inwards. To analyse your system, because your correction term is a cumulative sum of the vectors output from your FIR filter (that is, the "append to existing correction signal"), you can consider that at each sweep you get a vector of inputs, rather than a timeseries of data, with the transfer function of your system being: $$\mathbf{y}=\mathbf{x}-\left(\frac{1}{1-z^{-1}}\mathbf{I}\right)\mathbf{H}\left(z^{-1}\mathbf{I}\right)\mathbf{y}=\left((z-1)\mathbf{I}+\mathbf{H}\right)^{-1}(z-1)\mathbf{x}$$ Where lower case boldface are vectors, and upper case boldface are matrices ($\mathbf{I}$ being the identify matrix). That matrix $\mathbf{H}$ (your FIR filter) is coupling everything, which is why it's expected that the edge effects will work their way inwards. To assess stability, you have to solve the following, which gives the pole locations: $$\mathbf{det}\left(z\mathbf{I}-(\mathbf{I}-\mathbf{H})\right)=0$$ The solutions for $z$ (the pole locations) can be recognised as the eigenvalues of $\mathbf{I}-\mathbf{H}$. Your system is stable if the magnitudes of all the solutions are less than one, as usual for z domain transfer functions (that is, if all the poles are inside the unit circle).

As a simpler solution that will guarantee stability and prevent the edge effects creeping inwards, redesign your control loop as per the figure below, which has the transfer function given by: $$\mathbf{e}=\mathbf{H}\left(L[z]z^{-1}\mathbf{I}\right)(\mathbf{e}+(\mathbf{x}-\mathbf{e}+\mathbf{d}))=\mathbf{H}L[z]z^{-1}(\mathbf{x}+\mathbf{d})$$ $$\mathbf{y}=\mathbf{x}-\mathbf{e}+\mathbf{d}=\left(\mathbf{I}-\mathbf{H}L[z]z^{-1}\right)(\mathbf{x}+\mathbf{d})$$ Where $L$ is the transfer function of a low pass filter to provide some averaging of uncorrected sweeps (probably a moving average filter will do, but I'll leave that decision to you), and I have included a disturbance, $\mathbf{d}$, to be more rigorous because I presume your DAC and ADC will have some inaccuracy that is uncorrelated with the signal (e.g. noise). This system has no poles, except possibly in the low pass filter, $L$, so design a stable low pass filter, and you're guaranteed a stable system. Hopefully that final transfer function is quite intuitive in that, ignoring the disturbance, $\mathbf{d}$, it takes $\mathbf{x}$ and subtracts the component you don't want to give you $\mathbf{y}$, which is exactly what you want it to do. Note that the role of the low pass filter is to just give some averaging between sweeps to attenuate their noise, which I guess you're aware of the need for since you used that cumulative sum, and in fact this is really to try to attenuate the effect of $\mathbf{d}$ on your correction. On the first iteration, I would initialise the low pass filter so that its output immediately is equal to the first sweep signal, like what your integrator did.

system redesign

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.