- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This project demonstrates Envelope Detection using a Hilbert transformer method.
The amplitude modulated sinusoidal carrier signal is sampled by DelSig_ADC, digitally processed to extract the AM envelope and outputted using VDAC8.
The envelope extraction is done using the Hilbert transformer method, utilizing the Filter component. Both channels of the Filter are preset with custom coefficients to form 63-point Hilbert band-pass filter, (0.1 to 0.9) x (Fs / 2), producing
analytical (vector) signal from the ADC data. Both channels are identical, except that Channel_A has added Hilbert phase +45 deg, and Channel_B has added phase of -45 deg, producing orthogonal vector (x,y), which magnitude (length) is proportional to the AM envelope amplitude.
The Filter coefficients are calculated using IowaHills Hilbert Filter Designer v3.0, which is available for download.
The vector length is calculated by CPU using CORDIC algorithm. To speed up processing, the procedure is restricted to only vector length (atan is ignored), and the number of iterations is reduced down to 6 (from 14), taking 58 clocks.
Optional custom Low Pass (moving average) filter can be applied to reduce step transition effects from the Hilbert filter.
The resulting envelope is sent to the VDAC8 and observed by o-scope.
Project includes optional test AM signal generator, which produces amplitude modulated signal at carrier frequency 23.4kHz. The signal generator is comprised of WaveDAC8, which is set to switch between the two Sine waves of different amplitudes, and PWM, which controls the AM period and duty cycle.
Credits:
The Filter custom coefficients were produced using IowaHills Hilbert Filter Designer v3.0 by Iowa Hills Software LLC (IowaHills.com)
Uses:
Project uses optional custom component MovingAverage Filter (included into the project) : MAFilter_v0_0
/odissey1
Figure 1. Project schematic. The Moving Average filter (Filter_1) is optional. Capacitor C_13 is a KIT-059 onboard capacitor, connected to Pin 0[3].
Figure 2. Optional signal generator, producing amplitude modulated signal at carrier frequency 23.4kHz. The WaveDAC8 is set to switch between the two Sine waves of different amplitudes. PWM controls the AM period and duty cycle.
Figure 3. Project annotation drafted using PSoC Annotation Library v1.0 . ADC is configured in differential mode. Capacitor C1 decouples signal generator from the ADC. Resistor R1 provides DC offset of 1.024V for ADC input (-). The signal generator is optional, it is not needed if an external AM signal is available.
Figure 4. IowaHills Hilbert Filter Designer v3.0. Filter coefficients for Channel A (Phase Add +45deg) are shown at the right pane. Channel B calculations are the same, except it uses Phase Add of -45deg (not shown).
Figure 5. Filter settings for Channel A. Filter coefficients are directly copied from the Hilbert Filter Designer.
Figure 6. Scope traces: Blue - input signal, Yellow - envelope output, Cyan - reference. AM amplitude 1.0V, amplitude modulation 50%. Carrier frequency 23.3 kHz, AM frequency 0.583 kHz (PWM Period=40). The output is delayed by the Filter by (63-1)/2 samples.
Figure 7. Scope traces: Blue - input signal, Yellow - envelope output, Cyan - reference. AM amplitude 1.0V, amplitude modulation 50%, AM frequency 2.33 kHz (PWM Period=10). Carrier frequency 23.3 kHz.
Figure 8. Scope traces: Blue - input signal, Yellow - envelope output, Cyan - reference. AM amplitude 0.012V, amplitude modulation 50%, AM frequency 2.33 kHz (PWM Period=10). Carrier frequency 23.3 kHz. The output (Yellow trace) is digitally scaled up by 32 to match 8-bit scale of VDAC8.
- Labels:
-
CY8CKIT-059
-
PSoC5LP
- Tags:
- AM modulation
- amplitude modulation
- cordic
- detector
- Envelope
- Envelope detector
- filter
- Hilbert
- Hilbert transformer
- Moving Average
- odissey1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
odissey,
Kudos!
"Engineering is an Art. The Art of Compromise."