Tuesday, November 26, 2013

What Is The Collision Possibility Of Car Remote Control

What Is The Collision Possibility Of Car Remote Control


by cawan (cawan[at]ieee.org or chuiyewleong[at]hotmail.com)

on 26/11/2013


Assume there are a number of car remote controls which are operating in
315 MHz where each of them will occupy 50 ms for any button being
pressed. If each of the car remote control be pressed for every 1 second
randomly, then what is the number of the car remote control should
have to induce the collision possibility to 0.5 ? Well, that's almost similar
to birthday paradox which is the fundamental of ancient syn flood attack.

In one second (1000 ms), there are 1000/50 = 20 of 50 ms time slots.
While there are only 2 car remote controls, the possibility they don't
collide each other is 20/20 x 19/20. Yes, the possibility seems high.
However, while the number of car remote controls go up to 6, the
possibility they don't collide each other become

20/20 x 19/20 x 18/20 x 17/20 x 16/20 x 15/20 = 0.44

So, the possibility they will collide each other is 1 - 0.44 = 0.56. Thus,
the possibility for the 6 car remote controls will collide each other in
1 second is higher than 0.5. Well, this might not an issue at all because
while the first press has no response, just press the second time and it
should trigger. For those who looking for jamming the system, simply
fill all the time slots, it should work.


Saturday, November 9, 2013

Why An Angle Of 180° Can Be Represented By Pi (π) ?

Why An Angle Of 180° Can Be Represented By π ?


by cawan (cawan[at]ieee.org or chuiyewleong[at]hotmail.com)

on 09/11/2013


An angle can be represented in two units, degree (°) or radian (rad).  In the unit of degree, a full circle is 360°.  So, half circle is 180° and quarter circle is 90° (orthogonal).  However, in the unit of radian, 1 rad is defined as the arc of a circle has same length as the radius (j) of that circle.  We all know the perimeter of a full circle is 2πj.  So, a full circle is 2πj / j = 2π rad, a half circle 2π / 2 = π rad, and of course a quarter circle is π/2 rad.  Anyway, both of them are just a representation of an angle, nothing special.  When a an angle becomes a parameter of a trigonometry function such as cosine, then it makes more senses.  We know the cosine of an angle is the ratio of adjacent to the hypotenuse.  So, when an angle is near to 0 rad, the adjacent is almost equal to hypotenuse.  Thus, the cosine of 0 rad is 1.  While the angle start to increase, the adjacent will decrease accordingly.  When the angle is near to π/2 rad or 90° (quarter circle), the adjacent will close to 0.  Hence, the cosine of π/2 rad or 90° is 0.  If the angle keep increasing, the adjacent will start to increase again, but in opposite direction.  When the angle is near to π rad or 180° (half circle), the adjacent becomes almost equal to hypotenuse again.  So, the cosine of π rad or 180° is -1 (remember the adjacent is in opposite direction ?).  For the same reason, the cosine of 270° and 360° are 0 and 1, respectively.  If we plot the variation of cosine of an angle from 0° to 360° and keep repeating, then we get a standard cosine wave.  The variation of angle from 0° to 360° is defined as a cycle.  The variation speed of the angle is defined as angular frequency (ω) in the unit of radian per second, which concerning how many cycle can be completed in 1 second.  For this reason, a frequency in the unit of Hz can be expressed in radian per second by multiplying with 2π (remember 2π rad is equal to 360° ?).  Thus, ω = 2πf.  In addition, a cosine wave can be expressed in cos(ωt), where the t is the time axis.  Now, how about the sine of an angle ? Well, I will leave this as your own exercise.

Sunday, November 3, 2013

A Brief Discussion Of j and e From The Perspective Of Signal Processing

A Brief Discussion Of j and e From The Perspective Of Signal Processing


by cawan (cawan[at]ieee.org or chuiyewleong[at]hotmail.com)

on 03/11/2013


We all know about this equation





When we multiply an integer n with j, then it becomes nj.  If we multiply nj with j again, 
then it becomes –n.  Again, if we multiply –n with j, it becomes –nj.  If we multiply the
–nj with j again, then we get n.  So, if we keep multiplying an integer with j, then we 
get a repeating series, n, nj, -n, -nj, n, nj, -n, -nj, n,… 

If we assume the j is residing at imaginary axis, which is orthogonal to the real axis in a 
complex plane, then the repeating series can be plotted on the complex plane as a rotating 
circle in anticlockwise.  On the other hand, if the integer n keeps multiplying with –j 
(instead of +j), then the rotating circle is in clockwise.  Now, we need to prove the j is really 
orthogonal to the real axis.  If we define the real axis as x-axis and imaginary axis as y-axis, 
for any point located at the complex plane can be expressed as (x, y).  For the case of a circle 
on the complex plane, if a point (x, y) rotates an angle θ in anticlockwise, the new point 
(x1, y2) can be expressed as






On the other hand, if we represent (x, y) as a complex number, x+jy, and multiply it with 
e^(jθ) , then what will happen?  Well, Euler’s equation told us





So, 







Apparently, equation (5) is matching to equation (2) and (3).  Thus, we can say that now 
for any point (x, y) located at a complex plane, if the point rotates an angle θ in anticlockwise, 
then the new point (x1, x2) can be obtained by multiplying (x, y) with e^(jθ) .  For the same 
reason, if a point at real axis rotates 90° in anticlockwise, then the point should multiply with 
e^(j(π/2)) in order to get to the new point.  If we express e^(j(π/2)) in polar form, then









Well, now there is no issue for imaginary axis is always orthogonal to the real axis.  However, 
while a point keep rotating as a circle in a complex plane, then the number of cycle being 
completed for a full circle in one second is defined as frequency in the unit of radians per 
second, ω.  So,













Where the unit of f  is in Hz.  So now, 







From (10) and (11), we know that a complex sinusoidal signal will comprise of two sinusoidal 
signals in same frequency but with 90° of phase difference.  However, in practical, we normally 
deal with real number signal, instead of complex signal.  For the case of cos(ωt), it can be expressed 
in exponential form.






From (12), it shows a real number frequency will comprise of a positive and a negative complex
frequencies, which is well known as even symmetry of magnitude spectrum.  If there is a signal 
with center frequency at f1 multiply with cos(2πf1t), then we can two signals with different center
frequency, 2f1 and 0.  So, if we use a low pass filter to remove 2f1 from the product signal, then 
we can get a signal with center frequency at 0 Hz.  In software-defined radio (SDR), such approach 
is useful for analog to digital converter (ADC) to sample high frequency signal.  Now, how about 
sin(ωt)?  Well, it can be expressed in exponential form too.






From (13), it shows for any signal which multiply with sin(ωt), it will be turned into imaginary axis
(because it is multiplying with j).  As similar to cos(ωt), sin(ωt) also comprises of a positive and a 
negative frequencies.  However, the positive frequency would have a negative magnitude spectrum as 
oppose to negative frequency, which is well known as odd symmetry.  When we multiply a signal with 
sin(ωt) where the ω is equal to the center frequency of the signal, we can bring the signal to 0 Hz as 
center frequency.  In additional, since there is a j come together with sin(ωt), while multiplying the 
signal with sin(ωt), the spectrum of the signal with 0 Hz as center frequency is actually located at the 
imaginary axis.  As we know, the process of quadrature sampling is about to transform a real number 
signal into a complex number signal.  Thus, by multiplying a real number signal with cos(ωt) and 
sin(ωt) in individual, after being processed by low pass filter, we get Re(t) and Im(t), respectively.  
The Re(t) and Im(t) are sometimes defined as i(t) and q(t), respectively, where the i stand for in-phase 
and the q stand for quadrature.  Besides, both of them having half magnitude at center frequency of 0 
Hz (we assume the original center frequency of the signal is identical to the ω).  However, Im(t) is at 
imaginary axis, which is orthogonal to the real axis, so, we need to twist it 90° in clockwise by 
multiplying with -j to make it aligned to real axis.  Whiles both of them with half magnitude are 
superposed in real axis, they construct a full magnitude real number signal with 0 Hz as center 
frequency.  As a result, the complex number signal of a real number signal x(t) can be expressed as 
x(t)cos(ωt) -jx(t)sin(ωt).  Someone might argue the x(t) should have its negative spectrum as it is a 
real number signal, and we didn’t consider about the impact of positive spectrum of cos(ωt) and
sin(ωt) yet.  Well, I leave that part as your own exercise to show the signals cancellation among them.