¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: QRP Labs xciever with SSB capability


 

P.S. I forgot another thing I was going to mention.?

The two tone transmission is analogous to transmission of zero in a BPSK (Binary Phase Shift Keying) system such as PSK31. In PSK31 a zero is transmitted by the occurrence of a 180-degree phase change. A one is transmitted by no phase change. A cosine filter shapes the amplitude, and the 180¡ã phase change occurs at zero amplitude. See? paragraph titled "Technical information". The result in the time domain (oscilloscope) is amplitude modulation exactly the same as we see on a two-tone test. The result in the frequency domain (spectrum analyzer) is also exactly the same, two tones appear.?

So I think the two tone SSB test is the practically the same thing as PSK31 transmitting zeroes. There's a 180-degree phase change at every zero amplitude point. If you like, you can consider that the fact the big frequency shift that effects the 180¡ã phase change occurs when the amplitude is zero. Which is why you don't see any spike at that frequency offset on the spectrum analyzer display.?

Just different ways of thinking it through.?

73 Hans G0UPL


On Sun, Aug 18, 2024, 15:21 Hans Summers via <hans.summers=[email protected]> wrote:
Hello Ron
?
I took a look at my final code that I thought sounded pretty good.?? I see that I allowed excursions to +- 3200 hz from the SSB suppressed carrier.

That would explain why your previously presented traces earlier in this topic have constant frequency (no 180-degree jump at the zero-amplitude transitions). Assuming you are using 4800 samples/second as per the original uSDX, a 180-degree phase change would be represented by a 2400 Hz shift. Your two tones are 700 and 1300, so they have a 1,000 Hz mid point. So your frequency shift would be 1,000 Hz except at the phase transition, at where it would be 1,000 Hz =? 2,400 Hz =? 3,400 Hz. So if you have constrained?it to?+/- 3200 Hz you'll be deleting that phase transition point. Which will mean you won't get SSB - as per my demonstration yesterday you'll get a strong peak tone at 1,000 Hz with two sidebands at?+/- 300Hz relative to the center, and a bunch of further out sidebands. Not SSB, not AM either.?

As per my demonstration yesterday, constraining the frequency isn't necessary anyway; just because you momentarily set a frequency offset outside the SSB band does not mean you create a significant or noticeable component there on the frequency spectrum.?
?
? ?if( dp < -_UA/2 ) dp += _UA;?????? using -UA/2 allows the residual opposite sideband to be transmitted.? Guido's code has dp < 0.

Interesting, I just tried that. In my code UA is 2PI, so all angles?are represented in radians. Since I am using floating point and the standard math.h trigonometry function calls this is most convenient. In uSDX everything uses 16-bit integer and the maths used approximate expansions, so _UA was set to 600 for best use of the approximations for the best available precision.?

So in my code, if dp is the difference in phase (current audio sample relative to the previous sample) then my equivalent would be:
? ? ?if (dp < -PI) dp?+= 2.0 * PI;

I just tried that experimentally, and attached the results here. I am still using two tones at 450 Hz and 650 Hz, 9V supply for 2.6W PEP output, 40m band at 7030 kHz, and the spectrum analyzer is now centered on 7030 kHz? with 20kHz width (2kHz / horizontal division).?

"dp 0 to 2PI.jpg" is my original case before change; the phase-change between one sample? and the next is constrained to the range 0 to 2PI (0 to 360 in degree terms). The 450 Hz and 650 Hz peaks are shown cleanly.?

"dp 0 to 2PI zoom.jpg" is the same thing zoomed to 4kHz width, showing clean two-tone with about -30dBc IMD3 (-36db PEP IMD3).

"dp -PI to PI.jpg" is the case using -UA/2 as per your above comment; the result is very poor;?

-dp -PI to PI zoom.jpg" is a zoom to 4kHz width on the same result, showing no visible two-tone spectrum.?

Therefore doing this -_UA/2 thing doesn't appear to work...??
?
And elsewhere in another function ?just in case something is way off.? I don't think this line comes into play if all is working correctly.
dp = constrain(e.dp, -3200, 3200 );?

If the constraint is -3200 Hz to?+3200 Hz then that would cut off the necessary frequency shift to effect the phase reversal, so you wouldn't get SSB. If the constraint is on dp in units of _UA and _UA is 600 (like in uSDX) then this line would never make any difference since nothing ever gets to such big numbers as 3200.??
?
So I think maybe I may have the phase reversal but it could be a positive or negative frequency transition.? Maybe??? I don't have a spectrum analyzer to actually test the rf output but voice sounded ok and was inband on my nearby SDR receiver.

I think your graph you showed earlier in the topic shows no phase reversal, there are no jumps on the frequency, it's constant; I think that is because you constrained it to max 3200 Hz, but the phase reversal would require 1000?+ 2400 (assuming 4800 samples/sec) therefore 3400 being over 3200, it gets ignored. So I think this is probably what happened in your case.?

I prefer to look at the two-tone testing results and others tests, first, and voice later. Voice sounded OK could be a quite subjective measure that could be misleading. A two-tone test is a very harsh test of the whole system and if it comes out well, then the rest should follow.?
?
Your use of floating point and no approximations may be a key feature.? I notice my AMP modulation graph doesn't always reach zero when it should.??

So far I have tested a lot of different things. I found some of the numeric approximations in uSDX were pretty good, both for the magnitude and the arctan. If I try those in my code instead of the real square root and the real math.h atan2, it makes only a small difference. The Hilbert Transform made a HUGE difference (using a full 201 tap floating point transform, compared to the much smaller approximation in the uSDX code). I think the other big difference is the hardware capabilities of the QMX amplitude modulator, having a wide amplitude control range with very good linearity (back to the Drain modulation vs Gate modulation debate).?

That's what I've found so far.?

The next thing to try is variable delay between phase and amplitude because I think at the moment there is some error here, which may be significant. The amplitude gets applied immediately. At 8,000 samples/sec and 1MHz I2C bus speed, the frequency change gets communicated to the '5351 almost half a sample later. It then takes another full sample to reach the desired actual phase shift. So the amplitude modulation sample needs to be delayed by something over 1 sample to get synchronized to the corresponding phase modulation.?

73 Hans G0UPL

Join [email protected] to automatically receive all group messages.