Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
university:tools:m2k:scopy:adcdigitalfilters [25 Feb 2020 06:44] – [ADC digital filters] Pop Andreeauniversity:tools:m2k:scopy:adcdigitalfilters [01 Jul 2022 16:03] (current) – add clarification note on exponential compensation Doug Mercer
Line 18: Line 18:
 suppression, wave shaping, smoothing, etc. suppression, wave shaping, smoothing, etc.
  
-The digital filters provide a solution for the hardware calibration mismatch issue between low gain and high gain modes. The setting of these compensation parameters can be determined by following these steps. The AWG outputs of the ADALM2000 should be connected to the Scope inputs. Scope +1 to AWG W1 and Scope 2+ to AWG W2 with 1- and 2- tied to GND. The AWG channels should be set for Square wave shape and the amplitude set to +2.4 V with 0 offset. Set the Frequency to 4 KHz ( generally a good place to start but other frequencies might work better ). Adjust the Scope time scale to show two cycles of the waveform. With the vertical scale set to 0.5 V/Div observe the shape of the waveform. If the hardware trim was done properly the top and bottom of the wave should be flat. Now switch to 1.0 V/Div setting. The waveform might now be either under or over compensated. If it is under compensated the gain correction parameter should be a positive number. If it is over compensated the gain correction parameter should be a negative number. The value of the gain parameter can be estimated by the ratio of the size of the exponential portion of the waveform to the settled wave amplitude ( P-P step ) which is 4.8 V in this case. The Time Constant parameter can be estimated from the 63% settled time point in the waveform in microSeconds. Once these estimated values are entered and the filter is enabled further fine tuning of the values can be done to make the wave as square topped as possible.+<note tip> 
 +**Exponential compensation**\\ 
 +The software frequency compensation technique used in Scopy is often called Exponential compensation which adds one or more exponentially decaying terms to a step in the signal. With 2 available stages, Scopy can correct for multiple spurious inductances and capacitances in the internal or external input divider circuit (such as a 10X probe). **Exponential compensation works best for overshoots and undershoots smaller than about 10% of the step height.** In this case, a sum of exponential terms is an accurate generic model for such defects. 
 +</note> 
 + 
 +The digital filters provide a solution for the hardware calibration mismatch issue between low gain and high gain modes. The setting of these compensation parameters can be determined by following these steps. The Signal Generator outputs of the ADALM2000 should be connected to the Oscilloscope inputs. Oscilloscope +1 to Signal Generator CH 1 and Oscilloscope 2+ to Signal Generator CH 2 with 1- and 2- tied to GND. The Signal Generator channels should be set for Square wave shape and the amplitude set to +2.4 V with 0 offset. Set the Frequency to 4 KHz ( generally a good place to start but other frequencies might work better ). Adjust the Scope time scale to show two cycles of the waveform. With the vertical scale set to 0.5 V/Div observe the shape of the waveform. If the hardware trim was done properly the top and bottom of the wave should be flat. Now switch to 1.0 V/Div setting. The waveform might now be either under or over compensated. If it is under compensated the gain correction parameter should be a positive number. If it is over compensated the gain correction parameter should be a negative number. The value of the gain parameter can be estimated by the ratio of the size of the exponential portion of the waveform to the settled wave amplitude ( P-P step ) which is 4.8 V in this case. The Time Constant parameter can be estimated from the 63% settled time point in the waveform in microSeconds. Once these estimated values are entered and the filter is enabled further fine tuning of the values can be done to make the wave as square topped as possible.
  
 =====Calibration using the hardware trimmers===== =====Calibration using the hardware trimmers=====
-The boards are calibrated in the factory during production test but sometimes the trimmers, highlighted in Figure 1, might need be adjusted by the user as well.+The boards are calibrated in the factory during production test but sometimes the trimmers, highlighted in Figure 3, might need be adjusted by the user as well.
  
-{{ :university:tools:m2k:scopy:m2k_trimmers_highlighted.jpg?800 |}} +{{:university:tools:m2k:scopy:m2k_trimmers_highlighted.jpg?800|}} 
-<WRAP centeralign>Figure 2. M2k calibration trimmers highlighted</WRAP>+<WRAP centeralign>Figure 3. M2k calibration trimmers highlighted</WRAP>
  
 It is necessary to connect the AWG signal generator output channels to the oscilloscope input channels in a loopback configuration as described above in the section on the software filter adjustments driving the scope 1+ and 2+ inputs or the scope 1- and 2- inputs for the corresponding trim capacitors. Generate a square wave with 2.4 V amplitude and 4kHz frequency then analyze the oscilloscope window, in high gain mode (vertical range setting should be 0.5 V/Div or less). The waveform should look as square, flat top and bottom as possible. It is necessary to connect the AWG signal generator output channels to the oscilloscope input channels in a loopback configuration as described above in the section on the software filter adjustments driving the scope 1+ and 2+ inputs or the scope 1- and 2- inputs for the corresponding trim capacitors. Generate a square wave with 2.4 V amplitude and 4kHz frequency then analyze the oscilloscope window, in high gain mode (vertical range setting should be 0.5 V/Div or less). The waveform should look as square, flat top and bottom as possible.
  
 {{ :university:tools:m2k:scopy:waweform_before_adjustment.png?900 |}} {{ :university:tools:m2k:scopy:waweform_before_adjustment.png?900 |}}
-<WRAP centeralign>Figure 3. Waveform before high gain hardware calibration</WRAP>+<WRAP centeralign>Figure 4. Waveform before high gain hardware calibration</WRAP>
  
-If the waveform does not have the desired square shape, then you should adjust the trimmers of the corresponding channel until the waveform looks like the example in Figure 4.+If the waveform does not have the desired square shape, then you should adjust the trimmers of the corresponding channel until the waveform looks like the example in Figure 5.
  
 {{ :university:tools:m2k:scopy:waveform_after_adjustment.png?900 |}} {{ :university:tools:m2k:scopy:waveform_after_adjustment.png?900 |}}
-<WRAP centeralign>Figure 4. Waveform after high gain hardware calibration</WRAP>+<WRAP centeralign>Figure 5. Waveform after high gain hardware calibration</WRAP>
  
 The inputs are now calibrated but you may notice a difference in response if you switch from high gain mode to low gain mode ( 1V/Div or higher). The inputs are now calibrated but you may notice a difference in response if you switch from high gain mode to low gain mode ( 1V/Div or higher).
Line 40: Line 45:
  
 {{ :university:tools:m2k:scopy:waveform_adjusted_lowgain.png?900 |}} {{ :university:tools:m2k:scopy:waveform_adjusted_lowgain.png?900 |}}
-<WRAP centeralign>Figure 5. Waveform after high gain hardware calibration, but visualized in low gain mode</WRAP>+<WRAP centeralign>Figure 6. Waveform after high gain hardware calibration, but visualized in low gain mode</WRAP>
  
 =====Compensation using the digital filters===== =====Compensation using the digital filters=====
 The slight overshoot that appear in low gain mode after the board is calibrated in high gain mode can be removed using the digital filters. The slight overshoot that appear in low gain mode after the board is calibrated in high gain mode can be removed using the digital filters.
 For better results, we can enable both filters with corresponding parameters, so the wave will be perfectly square. For better results, we can enable both filters with corresponding parameters, so the wave will be perfectly square.
-If we zoom in on the signal presented in Figure we can notice the 50 mV overshoot. +If we zoom in on the signal presented in Figure we can notice the 50 mV overshoot. 
 {{ :university:tools:m2k:scopy:slight_overshoot.png?900 |}} {{ :university:tools:m2k:scopy:slight_overshoot.png?900 |}}
-<WRAP centeralign>Figure 6. 50 mV Overshoot of the signal</WRAP>+<WRAP centeralign>Figure 7. 50 mV Overshoot of the signal</WRAP>
  
 This can be removed if we apply a digital filter with the following parameters: TC=60 and gain=-0.025 This can be removed if we apply a digital filter with the following parameters: TC=60 and gain=-0.025
-The filtered signal will appear as in Figure 7.+The filtered signal will appear as in Figure 8.
 {{ :university:tools:m2k:scopy:one_filter.png?900 |}} {{ :university:tools:m2k:scopy:one_filter.png?900 |}}
-<WRAP centeralign>Figure 7.Initial signal (green) and filtered signal(orange)</WRAP>+<WRAP centeralign>Figure 8.Initial signal (green) and filtered signal(orange)</WRAP>
 It is noticed an improvement in the shape of the signal, but we can obtain an even better result using the second filter cascaded. It is noticed an improvement in the shape of the signal, but we can obtain an even better result using the second filter cascaded.
-With Filter 2 enabled and its  parameters set to TC=9 and gain=0.047 the response is visibly improved, as shown in Figure 8.+With Filter 2 enabled and its  parameters set to TC=9 and gain=0.047 the response is visibly improved, as shown in Figure 9.
 {{ :university:tools:m2k:scopy:two_filters.png?900 |}} {{ :university:tools:m2k:scopy:two_filters.png?900 |}}
-<WRAP centeralign>Figure 7.Initial signal (green),Filter 1 signal(cyan), cascaded filters signal(orange)</WRAP> +<WRAP centeralign>Figure 9.Initial signal (green),Filter 1 signal(cyan), cascaded filters signal(orange)</WRAP> 
-In Figure you can see the same signal previously presented in Figure but with the digital filters enabled. Is visible that the slight overshoot has disappeared.+In Figure 10 you can see the same signal previously presented in Figure but with the digital filters enabled. Is visible that the slight overshoot has disappeared.
 Now you can change between high and low gain modes and have an almost perfect square signal in both cases. Now you can change between high and low gain modes and have an almost perfect square signal in both cases.
  
 {{ :university:tools:m2k:scopy:final_filtered_signal.png?900 |}} {{ :university:tools:m2k:scopy:final_filtered_signal.png?900 |}}
-<WRAP centeralign>Figure 8.Filtered signal</WRAP>+<WRAP centeralign>Figure 10.Filtered signal</WRAP>
 Further you can find some examples on how to determine the suitable filter parameters depending on the signal characteristics. Further you can find some examples on how to determine the suitable filter parameters depending on the signal characteristics.
  
Line 78: Line 83:
 ===Undershoot=== ===Undershoot===
  
-To find 𝛿, place one horizontal cursor at the initial point of the signal and the other one at the point where the signal settles. In the case presented in Figure the peak to peak value of the signal is 5 V.+To find 𝛿, place one horizontal cursor at the initial point of the signal and the other one at the point where the signal settles. In the case presented in Figure the peak to peak value of the signal is 5 V.
  
 <m>delta=2.491-2.141=0.35 V</m> <m>delta=2.491-2.141=0.35 V</m>
Line 85: Line 90:
  
 {{ :university:tools:m2k:scopy:delta_undershoot.png?900 |}} {{ :university:tools:m2k:scopy:delta_undershoot.png?900 |}}
-<WRAP centeralign>Figure 9. Cursors placement to find delta</WRAP>+<WRAP centeralign>Figure 11. Cursors placement to find delta</WRAP>
  
 To find TC place one vertical cursor at the initial point and the other one at the point where signal is equal with its initial value plus 63.2% of 𝛿. To find TC place one vertical cursor at the initial point and the other one at the point where signal is equal with its initial value plus 63.2% of 𝛿.
Line 94: Line 99:
  
 {{ :university:tools:m2k:scopy:tc_undershoot.png?900 |}} {{ :university:tools:m2k:scopy:tc_undershoot.png?900 |}}
-<WRAP centeralign>Figure 10. Cursors placement to find TC</WRAP>+<WRAP centeralign>Figure 12. Cursors placement to find TC</WRAP>
  
-To see the difference between the initial signal and the digital filtered signal, take a snapshot and align it to the initial signal then enable Filter 1 with the parameters TC=15 and gain=0.07, as in Figure11.+To see the difference between the initial signal and the digital filtered signal, take a snapshot and align it to the initial signal then enable Filter 1 with the parameters TC=15 and gain=0.07, as in Figure 13.
  
 {{ :university:tools:m2k:scopy:filtered_undershoot.png?900 |}} {{ :university:tools:m2k:scopy:filtered_undershoot.png?900 |}}
-<WRAP centeralign>Figure 11. Initial signal(green) and filtered signal(orange)</WRAP>+<WRAP centeralign>Figure 13. Initial signal(green) and filtered signal(orange)</WRAP>
  
 ===Overshoot=== ===Overshoot===
Line 110: Line 115:
  
 {{ :university:tools:m2k:scopy:delta_overshoot.png?900 |}} {{ :university:tools:m2k:scopy:delta_overshoot.png?900 |}}
-<WRAP centeralign>Figure 12. Cursors placement to find delta</WRAP>+<WRAP centeralign>Figure 14. Cursors placement to find delta</WRAP>
  
 <m>63.2% * delta=0.632*(-0.25)=-0.158</m> <m>63.2% * delta=0.632*(-0.25)=-0.158</m>
Line 116: Line 121:
 In this example TC is 31 micro seconds. In this example TC is 31 micro seconds.
 {{ :university:tools:m2k:scopy:tc_overshoot.png?900 |}} {{ :university:tools:m2k:scopy:tc_overshoot.png?900 |}}
-<WRAP centeralign>Figure 13. Cursors placement to find TC</WRAP>+<WRAP centeralign>Figure 15. Cursors placement to find TC</WRAP>
  
-Take a shapshot of the initial filter and enable Filter 1 with the parameters TC=31 and gain=-0.05, as in Figure 14.+Take a shapshot of the initial filter and enable Filter 1 with the parameters TC=31 and gain=-0.05, as in Figure 16.
 {{ :university:tools:m2k:scopy:filtered_overshoot.png?900 |}} {{ :university:tools:m2k:scopy:filtered_overshoot.png?900 |}}
-<WRAP centeralign>Figure 14. Initial signal(green) and filtered signal (orange)</WRAP>+<WRAP centeralign>Figure 16. Initial signal(green) and filtered signal (orange)</WRAP>
university/tools/m2k/scopy/adcdigitalfilters.1582609465.txt.gz · Last modified: 25 Feb 2020 06:44 by Pop Andreea