Tuesday, June 12, 2012

Radar Jammer in matlab


Radar Jammer in matlab

Project Objective

The basic objective was to design a program in Matlab that simulates how police radar guns work and various methods of how to jam those radar signals. Simulation is split into three separate programs that each generated a signal or value that results from some analysis of a provided target.

CAR

Generates the spectrum of the speed beam reflected off of a stationary landscape and moving vehicle.

POLICE

Analyzes the reflected spectrum from the vehicle, removes the original speed beam frequency and then uses a match filter to determine the speed that the remaining frequencies represent.

JAM

Outputs a modified version of the spectrum emitted from the car so as to fool the match filter in the Police Program. There are several differently implemented versions of jam.

Theory of the basic operation

One of the basic operating theory behind this simulation of speed guns is that of the Doppler Effect. We assume the outgoing beam Gaussian and propagates towards a moving vehicle and surrounding objects that are stationary. Each surrounding object will reflect the Gaussian beam with no frequency shift according to the Doppler Effect. The gun then reads in the reflected waves and gets a combined signal at, ideally, two different frequencies: the reflection from nonmoving objects, and the frequency from the moving object. Using some signal analysis, the gun then determines how large the frequency shift was and from that, calculates the speed of the vehicle. The reason this works is that the frequency shift and the speed of the vehicle are proportional.
The process of jamming requires knowledge of how the gun determines these frequency shifts. More than likely it will use a matched filter, so the point of the 'jammers' is to manipulate this calculation to give the wrong answer. A 'jammer' works by outputting a signal at a frequency that will overshadow any reflections from the car.

Car Simulation Using Matlab



Car Simulation

The car program simulates the reflection and subsequent Doppler shift of the signal coming off the car. The program will take in a certain frequency (measured in GHz) and the angle at which the car is traveling relative to the police vehicle. The car program essentially takes the Gaussian pulse generated by the radar gun, and uses the Fourier transform to compute the shifted pulse from the car, adds in the unshifted reflection from the background, then adds in random noise from these frequency ranges. This results in a frequency spectrum. An example is shown below.
Figure 1
Figure 1 (doppler_spectrum.gif)
In order to simulate the normal functions of the police radar gun, this vector can be fed directly into the police program. In order to study the jamming programs, this vector can be run through the three jam programs to simulate the spectrums that result from the various methods of jamming.


A police gun radar and how it works



Police Simulation

The police simulation simulates the function of the radar gun translating the received spectrum into a speed estimate. The police program takes in the sent frequency and the spectrum from the car or the jammed signal. With this, the police program can reconstruct the unshifted, attenuated reflection of the pulse from the background and reflected signal to obtain a spectrum. Using a matched filter, the simulation shifts through the frequency spectrum and compares to the Gaussian pulse to the received spectrum using the inner product to produce a vector of comparison values. The maximum index of the vector can be interpreted as the shifted freqnecy, and using this value, the speed of the car can be computed. The final output of the police gun is the estimated velocity of the car, which is the original frequency over the recieved frequency, multiplied by the speed of light.
For the program simulations, this velocity can be compared to the original input to the car simulation to check the accuracy of the police program, as well as the relative effectiveness of the various jamming methods.

Example

Let's suppose that the frequency of the pulse was 1GHz. Figure 1 shows what the spectrum of the police gun is. The pulse is centered around 0.
Figure 1
Figure 1 (police_spectrum.gif)
Figure 2 shows a doppler effect of the signal reflected back. The first spike is the reflected, non-shifted surroundings portion, and the second, smaller spike is the Doppler shifted portion, which is reflected off of the car. We have a certain amount of background noise that is added to the signal.
Figure 2
Figure 2 (doppler_spectrum.gif)
The radar gun does recognize the non-shifted part, and strips it off, leaving only the shifted part, shown in figure 3:
Figure 3
Figure 3 (match_filter.gif)


Angle dependencies of speed detection


A radar gun can only read the portion of the speed which is parallel to the beam. Thus, at different angles, we will get different Doppler shifts and different speed readings as shown below:
Figure 1
Figure 1 (noangle.gif)
Figure 2
Figure 2 (angle30.gif)
Figure 3
Figure 3 (angle60.gif)
Figure 4
Figure 4 (angle90.gif)
As shown above, the closer the angle is to 90, the less visible the peak of the second pulse that is reflected back. That is why a radar gun has to be shot within a specific angle range to get accurate readings.

Method of Active Noise Jamming


There are several different methods of jamming available, all with their own strengths and weaknesses. One of these is active noise jamming explained below.

Active, Continuous Noise Jamming:

Continuously broadcasts white noise of high amplitude, causing radar guns to read random numbers, preventing a reading of the actual speed of the car. The radar gun takes about 8 measurements of speed, and only outputs a speed if the 8 measurements agree.

Advantages

  • Always works except sometimes at VERY close range
  • Very easy to build and operate, since it is always on

Disadvantages

  • Very Illegal: Jamming or attempting to jam a police radar gun is a federal felony punishable by fines up to $75,000 and one year in jail.
  • Very easy to detect, since you are broadcasting a loud signal to everyone around. Most modern radar guns have detectors for these signals, alerting the cop when he is being jammed in this manner.
  • Radar detectors will not work, since your own jammer is constantly broadcasting radar anyhow.
  • The cops can shoot an anti-speeder missile which homes in on your jamming signal.

Active, Selective Noise Jamming:

This is a variation on how the Active Noise Jammer is used. This is not continually on, as the implementation above is. Instead, a radar detector detects radar, and then triggers the active jammer described above for several seconds while the driver slows down to a legal speed. The jammer then shuts off.
Note: this requires that the jammer operate faster than the radar gun, so that the jamming signal is outputted before the reading is complete.

Advantages

  • Works most of the time.
  • Less likely to be detected by jammer detectors, since it is on for a shorter period of time, and since it will be on only when the cop’s radar gun is transmitting. Many radar guns’ jammer detectors do not work when the gun is transmitting, because it reads the radar being transmitted by the gun itself.
  • The anti-speeder missile described above will not work.

Disadvantages

  • Just as illegal as continuous active jammers, with the same penalties
  • If the radar gun is well built and faster than the jammer device, it can get a reading of a car’s speed before the jammer turns on
  • Some more modern DSP radar guns can detect radar jamming even when the gun is transmitting

Example

Both jammers above work the same but differ in when and how long they are broadcast. Now we output tons of noise at all frequencies, filling the spectrum up like this:
Figure 1
Figure 1 (continuousjam.gif)
As is easily seen, the true peaks are completely lost in a noisy haze. This causes the radar gun’s matched filter to look something like this:
Figure 2
Figure 2 (continuousresult.gif)
Thus, the radar gun outputs go crazy, and no believable result is found. Since a radar gun requires 8 subsequent readings to all output the same velocity before making a measurement, this prevents the guns from making any measurement whatsoever.

Method of Active Deceptive Jamming


Active, Deception Jamming:

A radar detector detects radar, and then transmits a frequency corresponding to a given (legal) speed. This frequency is read by the radar detector, which mistakes it for the Doppler shifted echo off of the car, and gives it a fake reading of whatever speed the jammer prefers. This method requires that the jammer knows the EXACT frequency that the cops are transmitting.

Advantages

  • It is not detected by the radar gun as jamming.
  • Works very well if one knows the frequency which the cops are using (which is a given for the X and K bands). Radar detectors operating in the Ka band can use any number of different frequencies. Some deception jammers are actually sophisticated enough to read a (fixed) Ka frequency and then transmit the appropriate jamming frequency; however, due to constant FCC crackdowns on jammer manufacturers, these are very difficult to find.

Disadvantages

  • Still just as illegal as all active jammers, with the same penalties
  • Once again, if the radar gun is well built and faster than the jammer device, it can get a reading of a car’s speed before the jammer turns on.
  • Many modern day Ka band radar guns switch rapidly between many different frequencies, foiling all deception jammers since they cannot determine which frequency to transmit

Example

Say we want to send the signal sent to read that we were actually driving a (legal) 55 mph. Then our jammer outputs a false peak at a frequency corresponding to 55 mph:
Figure 1
Figure 1 (deceptivejam.gif)
This causes the radar gun’s matched filter to incorrectly output 55 mph:
Figure 2
Figure 2 (deceptiveresult.gif)
Thus, the radar reads the 100mph car’s speed as actually 55 mph.

Method of Passive Jamming


Passive Jammers:

These devices re-radiate the radar signal after distorting it (adding noise and/or shifting frequency) in such a way the true target reflection is masked by the distorted signal. A passive jammer does not generate or amplify a signal, only channel or redirect the radar signal (after distorting) back toward the radar.

Advantages

  • Legal in most states.

Disadvantages

  • Certain states (including California, Utah, Minnesota, Ohio, Indiana and Oklahoma) have laws prohibiting any jamming device
  • The large antennas required to absorb the incident radar beams can actually increase your car’s visibility to radar detectors, allowing them to get a reading from a larger distance than otherwise possible.
  • For this method to work the jammer (distorted signal) power must be as large as or greater than target reflected power -- the jammer antenna would need to capture well over half of all the radar energy striking the target (a very large jammer antenna), and be aligned to the radar antenna. To date all known passive jammers have had no effect on any radar under any circumstances.

Example

Now here is an example of a passive jammer that slightly shifts the frequency of incoming radar. Thus, the reflection from a car equipped with this sort of passive jammer will have three peaks:
Figure 1
Figure 1 (threepeaks.gif)
This causes the radar detector matched filter to output this:
Figure 2
Figure 2 (passivework.gif)
Thus, the passive jammer has foiled the police without ever transmitting any energy of its own. In this case, the cop incorrectly read the car’s speed as 62 mph, instead of the real 100 mph. However, in practice, a passive jammer NEVER works. The reason for this is that for the passive jammer to work it must reflect over 50% of the light. An example of this is shown below. This is a Passive Jammer which reflects 60% of the light incident on the car:
Figure 3
Figure 3 (threepeaks.gif)
Figure 4
Figure 4 (passivework.gif)
In this case, the matched filter reads the jammer signal instead of the real Doppler shifted signal. Now, observe what happens when the passive jammer only reflects 40% of the signal incident on the car:
Figure 5
Figure 5 (threepeaks.gif)
Figure 6
Figure 6 (passivenowork.gif)
Thus, when the passive jammer only reflects 40% of the incident beam, it does not work at all. The police still correctly read the speed of the car at 100mph. This is summed up by the graph below:
Figure 7
Figure 7 (percentage.gif)
This graph shows that if the passive jammer does not pick up at least 50% of the incoming beam, it does not work at all, the police still correctly read a speed of ~100 mph. Since cars are much larger than the jammer antenna, in practice the passive jammer can never reflect much more than 10% of the incident beam. Thus, passive jammers NEVER work.

Radar Jammer Project Conclusion


Conclusions to our simulation observations

Passive Jamming

Passive Jamming is the only legal form of radar gun jamming, as it does not output any type of radiation into space. Through our simulations though, it shows that at least half the signal must be absorbed in order to fool the police gun radar. In real life, most vehicles can only absorb up to 40% of the signal so it would not work most of the time. It would also be very expensive to implement.

Active Noise Jamming

Active Noise Jamming is an illegal form of radar gun jamming because it adds radio waves into the air. This method works in that it will definitely keep the police radar from correctly reading the original speed of the car. However, in real life, blaring loud signals requires a massive amount of energy (equivalent to turning your car into a mini broadcast tower). Also, anyone with the proper equipment would be able to determine which car was blaring these signals. The method of active selective noise jamming would be more efficient except that it becomes a test of quickness. First it must detect the police radar and then immediately emit loud noises BEFORE the other device can get a reading. Implementing something with such a fast response would be difficult.

Deceptive Jamming

Deceptive Jamming is another illegal form of radar gun jamming because it too adds radio waves into the air. This method is similar to Active Selective Noise Jamming in that it must detect police radar and emit signals before the police radar can get a reading. Another problem with this method is that the jammer would need to know the frequency of the Gaussian pulse sent by the police radar. This would be hard to predict because the band of possible radio frequencies is broad. These are listed below in Figure 1:
Figure 1
Figure 1 (range.gif)
Even being off by a few Hz would be enough to allow the police gun to get a correct reading on the real speed of the car, thus wasting the effort of the deceptive jamming.

No comments:

Post a Comment