0
$\begingroup$

I have a newbie question:

Let's say I have a signal (fc = 308 kHz, B= 30 kHz) as plotted below

enter image description here I demodulate the signal to derive I and Q components at evenly-distributed time steps as (only the first 100 components are here)

inphase = {-0.00902895, -0.0115296, -0.0145557, -0.0181772, -0.0224645, 
-0.0274873, -0.0333117, -0.0399985, -0.0476, -0.0561575, -0.0656982, -0.076232, 
-0.0877488, -0.100215, -0.113573, -0.127735, -0.142583, -0.15797, -0.173713, 
-0.1896, -0.205382, -0.220782, -0.235495, -0.249186, -0.261502, -0.272069, 
-0.280503, -0.286413, -0.289407, -0.289105, -0.285139, -0.277166, -0.264874, 
-0.247992, -0.226294, -0.199609, -0.167828, -0.130907, -0.0888732, -0.0418304, 
0.0100423, 0.0664869, 0.127168, 0.191676, 0.259526, 0.33017, 0.402999, 0.477349, 
0.552516, 0.627762, 0.702328, 0.775446, 0.846349, 0.914288, 0.978543, 1.03843, 
1.09333, 1.14268, 1.186, 1.22287, 1.25299, 1.27615, 1.29223, 1.30124, 1.30326, 
1.2985,1.28727, 1.26995, 1.24704, 1.2191, 1.18676, 1.1507, 1.11167, 1.07042, 
1.02774, 0.984411, 0.941214, 0.898898, 0.858177, 0.819715, 0.784118, 0.751921, 
0.723581, 0.699473, 0.679881, 0.665, 0.65493, 0.649683, 0.649181, 0.653262, 
0.661686, 0.674144, 0.690263, 0.709618, 0.731743, 0.756139, 0.782286, 0.809654, 
0.837712, 0.86594};

quad = {0.00478817, 0.00628673, 0.00816114, 0.0104807, 0.0133221, 0.0167685, 
0.0209097, 0.0258405, 0.0316602, 0.0384707, 0.0463751, 0.0554753, 0.0658703, 
0.0776529, 0.0909077, 0.105708, 0.122112, 0.140162, 0.159879, 0.18126, 0.204278, 
0.228877, 0.25497, 0.282439, 0.311133, 0.340867, 0.371422, 0.402548, 0.433963, 
0.465356, 0.496389, 0.526703, 0.555921, 0.583652, 0.609497, 0.633057, 0.653935, 
0.671749, 0.686131, 0.696739, 0.703264, 0.705432, 0.703013, 0.695827, 0.683746, 
0.6667, 0.644678, 0.617732, 0.585976, 0.549589, 0.508809, 0.463934, 0.415317, 
0.363362, 0.30852, 0.251277, 0.192154, 0.131694, 0.070454, 0.00899987, 
-0.0521064, -0.112314, -0.171092, -0.227939, -0.282388, -0.334018, -0.382455, 
-0.427383, -0.468544, -0.505744, -0.538853, -0.567809, -0.592612, -0.61333, 
-0.630089, -0.643074, -0.65252, -0.658712, -0.66197, -0.662652, -0.661136, 
-0.657819, -0.653106, -0.6474, -0.641098, -0.634579, -0.6282, -0.622286, 
-0.617126, -0.612968, -0.610012, -0.608409, -0.608258, -0.609603, -0.612437, 
-0.616697, -0.622269, -0.62899, -0.636651, -0.645001};

How can I plot the resulting signal amplitude (inphase+i quad) over time to compare it with the original signal? I am also interested to see how noise increases in the power spectrum after demodulation.

$\endgroup$
4
  • $\begingroup$ with two line plots, for example. What is it that your plot is supposed to demonstrate, what is its purpose? $\endgroup$ Aug 19 at 18:04
  • $\begingroup$ edited the question to address your comments. $\endgroup$ Aug 19 at 18:10
  • $\begingroup$ noise doesn't increase through demodulation. Why should it? Demodulation is a complex multiplication with a complex sinusoid. $\endgroup$ Aug 19 at 18:11
  • $\begingroup$ I'm using different techniques for demodulation and according to Lyons noise increases with digital demodulation. (If I understood it correctly) $\endgroup$ Aug 19 at 18:27
0
$\begingroup$

How can I plot the resulting signal amplitude

Your signal is $s(t) = i(t) + j q(t)$, so the amplitude is $|s(t)| = \sqrt{i^2(t)+q^2(t)}$; no magic here, just plot that function of time.

$\endgroup$
1
  • $\begingroup$ while the signal amplitude fluctuates between roughly -1 and +1, |s(t)| is always positive. Should I multiply s(t) with -1 if phase > pi ? $\endgroup$ Aug 19 at 18:29
0
$\begingroup$

How can I plot the resulting signal amplitude (inphase+i quad) over time to compare it with the original signal?

If you want to recreate the transmitted signal, you need to remodulate it. Assuming the I and Q components you gave us are before the matched filter of the detector, you can do this with the following equation:

$r(t) = \sqrt{2}i(t)cos(2{\pi}f_{c}t) - \sqrt{2}q(t)sin(2{\pi}f_{c}t)$

Then you can just plot r(t) as a function of time.

I am also interested to see how noise increases in the power spectrum after demodulation.

The entire detection process does introduce some noise to the signal along with the channel. If it's wireless, the temperature of the antenna will introduce noise, the amplifier will add some noise, and the ADC and associated hardware will also add noise. The digital calculations done to demodulate the signal however will not add any noticeable noise unless you're using a fixed-point processor.

That said, if you want to look at the power spectral density of the signal, the easiest way to do this is probably autocorrelate the signal and take the FFT.

$\endgroup$
1
  • $\begingroup$ Great. Thanks. Solved my problem. $\endgroup$ Aug 22 at 2:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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