Thursday, November 11, 2021

Interchannel Subsample Delays in Commodity USB Audio Interfaces

Summary

Some USB audio interfaces suffer from left/right output channel delays which tend to be at subsample magnitude, manifesting as frequency-dependent phase distortion.

Test results

Some had interchannel delays, some did not:

Subsample Delay: Behringer UCA202 (ID 08bb:2902 Texas Instruments PCM2902 Audio Codec)


Subsample Delay: Cable Creation (ID 0d8c:0014 C-Media Electronics, Inc. Audio Adapter [Unitek Y-247A])


 ... the back is featureless black.

 

No Delay: Behringer U-Phoria UMC404HD (and 202HD) (ID 1397:0509 BEHRINGER International GmbH): 


 

No Delay: Early 2000s unbranded white USB audio dongle, UMD-10 (ID 074d:3556 Micronas GmbH Composite USB-Device):





Significance Of Delays

For users who strictly listen casually, these phase issues are negligible and possibly an enhancement. All of these interfaces were enjoyable.

For producing audio content, I don't recommend these devices- even for casual listening- as they can train the listener to prefer this phase distortion and develop a habit of expecting it in the content they produce.

The consequent phase distortion is unacceptable for pro audio for obvious reasons, and ham radio use when encoding I/Q streams, as they will introduce frequency-dependent imaging at baseband.

Discovery

James Ahlstrom's extensive write-up illustrated the issue of between-channel (left/right) sample delays in some consumer computer audio interfaces introducing phase distortion and imaging on transmission and receive when using in-phase/quadrature (I/Q) intermediate frequency in software-defined transceivers.

Especially of note was the image on the writeup labeled "Phase correction at fixed VFO for the 40 meter band" which showed a ramping of phase adjustment whose deviation increased linearly with frequency away from center (zero Hz).

In practice, compensating for phase was difficult because the offset would change between power-ups of the device. The linear nature of the phase distortion hinted that there may still be between-channel time delay despite optimal sample delay settings, pointing to the possibility that there is a sub-sample delay happening internally with these interfaces. In other words, though these devices generally max out at 48khz sample rates to the user, their internal sampling rate may be much higher, then down-sampled within the chip, possibly to introduce steeper anti-aliasing filters for better frequency response at a reduced price.

A compensatory subsample delay was achieved in GNU Radio Companion by first upsampling the stream by an arbitrarily large number (i.e. 10) with no antialiasing filters, applying the delay to said stream, applying an antialiasing lowpass followed by a decimator. This causes the delay to still manifest as frequency-dependent phase shift.

This addressed the issue very well - at least until a reboot. There was no need to apply additional phase corrections in quisk. Delays tended to be on the order of 0.5-1.5 samples.

Adjustments had to be made with each use and it's far more practical to use a proper audio interface which doesn't have these issues. I had good luck with the Behringer UMC***HD interfaces, pending frequency content is kept below 45khz, above which introduces spurs as found in this forum thread.

Test Proofs

Testing was performed by a Behringer UMC404HD. It was verified by engaging the mono switch, and routing its headphone output to inputs 1/2 and checking the sample alignment with a 20khz sine with 192khz sample rate. This means every sample output from a tested interface at 48khz would have a 4-sample-long sample as seen by the UMC404HD at 129khz:


Sine generation is with GNU Radio Companion: 


Sometimes subsample anomalies are hard to see if the offset is close to 1 sample. Then a 1-sample delay is applied:


... the remainder is then easier to see in the graphs below.

Tested items output a stereo 20khz sine (identical per channel) at 48khz sample rate, routed into channels 1/2 of the UMC404HD.

Behringer UCA202 (PCM2902 Audio Codec)

At first glance this looks like a 1-sample offset (4 oversamples), but applying the 1-sample (4-oversample) delay and trying again we still see a roughly quarter-sample misalignment (1 oversample).

Cable Creation (Unitek Y-247A) from Amazon

... 2 oversample delay, probably 0.5 samples.

Unbranded early-2000s white audio dongle "UMD-10"


... no issues, even after several plug/unplug cycles.

Compensation/Proof

A subsample delay as described above was constructed in GNU Radio Companion 3.8.10 and can be downloaded here. A pulseaudio dummy and loopback sink had to be employed to splice it into the audio or I/Q stream.


...this temporarily fixed the issues well.


Wednesday, September 4, 2013

Comparing tropo fade rates of closely-clustered Green Bay TV stations

A comparison of Green Bay TV stations over ~180 mi. tropo to explore whether their fades are in sync or if fades are frequency dependent. These stations were chosen because of their similar power levels, heights, and tight grouping which make them within 5 degrees of each other in relation to the antenna beam. Taken between 1am and 2:30am EST.

Antenna used was UHF Parabolic Antenna w/ 20-22dB reflector.


Tuesday, September 3, 2013

UHF Parabolic Antenna (assembly)

This is part of a larger article, Parabolic UHF Troposcatter Antenna for TV and Amateur Radio.



Parts List
20+
Itemqty
10' ABS 1.5" DWV pipe9
ABS Cement8oz
5' ABS 2" DWV pipe1
U-bolt Nest Assembly6
wood, 10' 2x22
10'x6" OSB (smaller pieces mended ok)1
20' x 5' galv. screen 2" x 4" grid1
4-way ABS Tee, all 1.5"2
3-way ABS Tee, all 1.5"4
45 deg. ABS elbow, 1.5"1
Zip ties, >8"
Bolt, 1/4"D x 2"L (or similar) w/ nut1
Bolt, 1/4"D x 3"L (or similar) w/ nut1
Washer, 1/4" Hole Dia, 1" outer Dia (or similar) w/ nut15+
2"x1" copper pipe (instead of washers between swivel plates)1
Screw Eye 1/2" eye dia, 1/8" screw Dia. (or similar)14
1/8" nylon rope~40ft
AntennasDirect C11 or 4
Sealable Container1
PPC AquaTight RG-6 conn.11+
RG6 raw cable20ft+
4:1 RG6 combiner1
#10 Copper Wire20ft+
3/16" Wire Rope Clamp15+
Grounding Clamp (if tripod is new install)1
Installed Tripod w/ Rotor1
Stainless Steel (or painted steel) plate 6" x 6" x 1/4"2

Tool List
Saw, blade 18 teeth/inch or coarser (for ABS)
Metal-cutting saw (for trimming bolts)
Metal-cutting oil
Metal file (for deburring trimmed bolts)
Drill w/ metal-capable bits 1/8"-1/4"
Socket wrench (extender recommended)


CONSTRUCTION
All pieces follow same curvature and thus need only one form.
ABS plastic is light and good strength to weight ratio. Must be painted to resist UV. ABS is invisible to UHF.
Spine of form should be at least 2x2 as it must oppose the force of the bent pipe(s) until they soften.
Legs of form were 2x2
curved surface was 1/2" OSB. Overlap not particularly crucial.
Heat gun in 750 degree mode was used, about 20min per end, pipe was covered in fiberglass insulation. If there is a smell then it is too hot. Hair dryer is too weak.
1100 degree mode is too hot; causes burning.
First pipe was overheated and melted on one end, strap was melted. Still usable.
Second and third were doubled into the form. Strap was used mostly near center to minimize melting. Some negligible deformation due to crushing strap force.
Wanted to avoid using sand so that pipe could be heated inside-out without tedious scanning of the pipe with heat gun.
Duct tape was used dead-center as temporary anchor to hold pipes in place while strap was applied.

Duct tape negligibly gunked on the pipe (not surprising as its max temp is close to ABS softening temp). Consider hi-temp tape or remove prior to heat.
Ideas: Use old shirts/rags as straps pending they have high melting point; more surface area, less crush. Or wrap hi-temp insulative quilt.
Nylon strap has melted due to
overheating.
Not flawless but good enough for the antenna,
4-way 1.5" tee may be difficult to find as they tend to be banned in plumbing codes. Menards sells in batches in 5 if pre-ordered.
Also consider internet for Tee, as phone searching may be more cost in time.
Mesh attached with zip-ties.
Reflector mesh uses widest squares available without leaking too much of upper frequencies. 2x4" menards.
   
1.5" high would be ideal however 2" high will be lighter and losses may be negligible.
If using reciprocating saw, use 18 teeth per inch or coarser.
Cut spine into thirds, be sure to label parts and write which way is 'up' and which way is 'forward' such that curve doesn't end up crooked.
Cut arms into halves, label the direction toward the spine so they don't get reversed and 'forward' as with the spine.

Dry-fit the parts, sand inside edges of tees with Dremel grinder if deformation of pipes made them too tight.
Glue, ensure arms are going to be parallel with ground and not perpendicular to spine's curve.
Sand down surface and paint white. No primer necessary but multiple coats needed.
Side-arms must be bent half-at-a-time,
flipped around and bent again.
Rest heat gun on elevated
platform to avoid blowing directly
on pipe walls
The 3/4" PVC vertical curvature supports on either side of the reflector could have been made of 1.5" ABS as it has similar weight but greater strength due to greater diameter.
Testing finds that PVC softens (and burns) far more easily than ABS.

Swivel
for 1+1/4" dia pipe, used 1+3/4 in-dia u-bolt.
for 1+1/2" ABS, used 2" in-dia u-bolt
Cut off excess bolt thread to make room. File roughness on bolt after cutting to make easier for nut to thread. The area between the two plates can be separated with all washers or a piece of copper pipe between two washers.

Optionally paint inside of LNA container with conductive paint or foil to reduce static. Drill holes in LNA container for RG6, add LNA, drill a weep hole on the lowest part of container to drain accumulated water. Seal around RG6 and container lid with hot glue (or something better if you have it). Shown in picture is a 98.7MHz choke balun to quell outer shield noise spillage into C1s.




Reflector spine plate attaches to spine with one or two U-bolts; mast plate attaches to mast with one toothed U-bolt. Plates connect with bolt/washers through hole on top right of picture. After parts are attached to mast, all ropes are to attached and secured to screw eyes using wire rope clamps so they may be adjusted easier. (no knotting)

Early version set up on the ground
to find best position for the feed.
Note the distortions in the reflector
before the curvature supports were added.

Antenna was built on the ground and modified there before being finalized. This was also important for finding the focal cloud for feed position and making necessary adjustments prior to roof install.

Disclaimers
The brands and products mentioned in this article are for reference and example only and do not constitute an endorsement, recommendation, or affiliation with any mentioned party. Though this information is intended to be useful and functional, it is offered AS-IS without warranty even for safety or fitness for any particular purpose.

Tuesday, August 27, 2013

Parabolic UHF Troposcatter Antenna for TV and Amateur Radio

A parabolic UHF antenna
For scale, top of the 4-element feed is chest-height.
to investigate the feasibility and challanges of TV and amateur radio over troposcatter using parabolic reflectors was designed and built.

Troposcatter enables UHF and microwave signals to be received beyond the horizon limit (~70mi), which is traditionally considered the practical limit for these frequencies. The downside of tropo is signal fading with severe degradation in signal quality and strength which require extreme measures to receive.

Antenna is dismantled because the 1+1/4" galv. steel rotor mast pipe has bent from stress, causing it to increasingly point toward the ground. With the reflector's narrow beamwidth, this factor became non-negligible fairly quickly and it eventually ceased to perform. Because this started happening sleetfall, ice weight is suspected.

Results
An extremely well-performing antenna which shows that parabolic reflectors are still good for very high gains in the UHF range. It is, however, very high-maintenance and a hazard challenge to install. Its tropo reception is unreliable and a lot of time has to be put into its assembly and use. Fade behavior is comparable to that of shortwave, but with ranges of hundreds of miles instead of thousands. Tropo performance likely will vary by location; third-party verification or improvements on this design would be interesting. The experience from this project may be used for fine-tuning future projects.
CallsignChannelDistanceReliabilityNotes
WLUCRF3564mi99%
WZMQRF1962mi80% night, 30% dayTransmitter is beam-steered away from antenna
WJMNRF48104mi60%Night Only
WBAYRF23188mi15%Choppy day/night
WCWFRF21~180mi15%Choppy day/night
WFRVRF39~180mi15%Choppy day/night
With deep fading of tropo, figures are given in percent reliability (how often a tuner lock can be acquired) instead of signal strength. Antenna stands 25ft AGL on the side of a shallow <50ft hill.



Images Copyright ©2013 tvfool.com
Design
This is a 10'x10' offset-feed parabolic reflector made of 2"x4"-grid galvanized steel screen supported by a painted, heat-formed 1.5" ABS DWV pipe frame. The feed consists of four AntennasDirect C1s (SWR <1.5, UHF only, ~30dB attenuation in VHF) spaced approximately 1.5 feet apart and held in position by nylon rope. Each C1's output passes through a Laird Technologies 28A0640-0A2 ferrite choke and converges to a 4-way combiner followed by a Research Communications 9261 LNA (0.4dB NF, UHF only, with upper and lower boundary filtering) prior to downlead, connected via Aquatight PPC. Testing tuner is HDHomeRun. Total calculated weight is approx. 37 pounds. Reflector inclination, feed distance and position are adjustable. Including tripod mount, the structure rises approx. 13 feet off the roof.

Overdrive
Overdrive is a serious concern, which is why the feed and LNA are UHF-only and were selected to reject out-of-band signals. Despite this, there was still some overdrive and resulting harmonic LNA overdrive from WGLI (98.7MHz 200kW@4mi.), possibly due to coax shield spillover making it through the choke at the C1s. Another strong emitter were the various cell towers broadcasting in the upper UHF "white space." These bright stations created blind angles which could not be used for reception of tropo.

Influences
This antenna is inspired by the Channel Master 4251 and commercial antennas developed by Wade in an attempt to develop a very light-duty antenna of a similar performance caliber.


Performance
Extremely good performance: Stations too weak to be received by the stack can be received with this reflector. The calculated (before LNA) gain is approximately 20-22dB at 550MHz with a full beamwidth of about 13 degrees at 3dB contour down. Actual performance is roughly within 3 dB of this calculation. In practice it is aggressively directional and exceeds the granularity of the rotor. It also has a 10dB backlobe and two 12dB rear sidelobes from feed spillover at about 40 degrees.  There is a signal strength gap between where line-of-sight reception is lost and the maximum strength of typical tropo. This antenna successfully traverses that gap but with issues more complex than signal strength alone.

Wind Profile
Wind profile is surprisingly good for this antenna because of the minimal materials used, but the feed has a more significant wind profile with its broader surfaces and the added torsion of 7 feet which has no counter-torsion behind the reflector. Leverage, spring action of the mast, and elasticity of the nylon ropes also caused the entire feed to bounce (details in next section) but these did not greatly affect reception.

Structure
Bolstering supportive structure increases wind profile and could potentially decrease durability, particularly near the edges where wind torsion potential is greatest. This antenna's lightweight design required very careful balancing of both the quantity and vectors of loads. Most failures involved screw-eyes (fixed with thicker screw eyes) and rope-slip failures. The ABS frame itself has endured up to winds of up to 45 MPH without direct issue. This delicate balancing means that the failure of one part will result in the cascading failure of additional parts as their torsions and loads become unbalanced. Repairs must be done quickly to avoid further damage.

Limitations
There are many channels whose signal strength should be high enough to acquire a lock but lack the S/N ratio to do so, apparently due to severe multipath-of both static and dynamic varieties which leave the signal quality in poor condition: By the time a signal reaches the antenna is may have traveled hundreds of miles among mountains, temperature inversions and buildings. Further increases in signal strength have diminishing returns in the case of multipath as interference scales up alongside desired signal, with a speculative exception of narrowing the beamwidth. There is also the issue that this antenna is....awfully large.

Improvements
Increasing aperture size is unlikely to happen for practical reasons. There is a lot of promise in using or implementing a more advanced tuner, such as a diversity mobile tuner. Solving multipath would sharply improve performance.

The original plan was to have a single C1 at the end of the feed. When this was changed to four C1s the feed became heavier making the antenna front-heavy. This, combined with bouncing of the feed and ice buildup resulted in the steel rotor mast pipe slowly bending from stress.

In the future this could be addressed by switching back to a single C1, and compensating for the wider feed pattern by shortening the feed arm, which would reduce front-weight greatly. In compensation for needing a shorter focal point, the reflector curvature would have to be sharpened, resulting in a slightly increased reflector weight relative to aperture size which would be far compensated by the benefits of the redesigned feed.

80% strength and no tuner lock.
An extreme example of multipath gone awry from tropo cells.
(LNA distortion, co-channel and jamming ruled out)


Durability
Reflector shakes in wind but survives storms without breaking. Effective wind profile is relatively small because of the use of screen, rope and cylindrical pipe. This antenna will be kept over the winter to test its ice/snow handling. Dismantled due to mast pipe stress following sleet.
Bent mast pipe

Weather
Reception is affected dramatically by weather: Humid, calm, clear nights are best while nights preceding a storm are also good while dry and/or windy weather are most detrimental. This antenna can detect lightning as raw signal strength will momentarily spike on lower channels with each strike. Jokingly, 'passive weather radar' may be a better application than HDTV.

Amateur Radio
70cm (420MHz) feasibility is being investigated. Dismantled before testing could be done.

Assembly
Sub-article is here.

Disclaimers
The brands and products mentioned in this article are for reference and example only and do not constitute an endorsement, recommendation, or affiliation with any mentioned party. Though this information is intended to be useful and functional, it is offered AS-IS without warranty even for safety or fitness for any particular purpose.

Wednesday, July 17, 2013

Sweeping spectrum analyzer for FunCube Dongle Pro+


 A GUI-based variable-range sweeping (non-realtime) spectrum analyzer program called fcd-spectrum has been implemented in java for use with the FUNCube Dongle Pro+ SDR. It aims to report approximate input power in units of dBm relative to frequency. Automatically adjusting-and compensating for-gain, fcd-spectrum writes to a .CSV file and has a built-in viewer. Example sweep times are about 1 minute for 88-108MHz and about 2 hours for the entire 150k-2G range. CLI-only mode operation is also supported. This application is licensed under GPL3.

Note: There are issues with running this software in Mac OSX (see Issues tab on project page)

https://github.com/cjritola/fcd-spectrum

Friday, April 26, 2013

Ubuntu .deb package for Funcube Dongle Pro+ support in GNURadio Companion

This .DEB package installs a Funcube Dongle Pro+ sourceblock for GNU Radio Companion to Ubuntu. It is built from source posted by DL1KSV, implementing the FCDPP as a complex source and provides variable control to LNA On/Off, Center Frequency, Mixer Gain On/Off, Frequency Correction, and IF Gain from within GNU Radio Companion.

The * * Pro sourceblock which comes standard with GNU Radio will not properly control the * * Pro+ and vice versa. Like the source, the package is licensed GPL. The versioning scheme is year.month.day.branch_name representing the date the code was pulled from git and the git branch name.


libgnuradio-fcdpp_13.05.16.master-2_amd64.deb
Built and tested against Ubuntu 13.04 and Ubuntu's gnuradio package (3.6.1).

libgnuradio-fcdpp_13.04.26.master-2_amd64.deb
Built and tested against Ubuntu 12.10 AMD64 and ubuntu's gnuradio package (3.6.1).

Following installation, the FCDPP may need to be disconnected and reconnected in order to detect properly.

Note: I am fairly inexperienced with generating .deb packages. If there is a problem with the package please let me know.

Monday, September 17, 2012

Format Description Toolkit for Java

A small library to ease parsing and encoding of non-bean files and streams has been implemented, mapping them to/from Java Beans. This allows the developer to write a single format description, mapping parsed data to Bean properties without writing separate code between reading and writing.

jFDT has the potential to improve development time of larger file and stream parsing projects by minimizing boilerplate code.

 Link To Google Code Project