Ringing at falling edge

Just about everything about Red Pitaya
Post Reply
cgottard
Posts: 2
Joined: Wed Jul 06, 2016 9:33 am

Ringing at falling edge

Post by cgottard » Wed Jul 06, 2016 10:05 am

Hello everybody,

With the RedPitaya I am generating a signal with a custom shape that features a very steep falling edge and a very smooth rising one.
However I am not satisfied by the ringing I see at the falling edge. I tried different amplitudes and DC offset but this ringing does not fade.
The RedPitaya OUT2 is connected directly to an Tektronix MSO4104B oscilloscope.

To let you understand what is the problem I attach
- 2 close-ups of what I am talking about
- 1 picture of how waveform I need
- the code I use to generate the signal with the RedPitaya

I would like to know if I am doing something wrong and/or how I can improve the situation.
Thank you very much.

Carlo


The ringing.
Image
Image

The shape I need is like the magenta one in here:
Image

The code I use to generate the waveform is the following:

Code: Select all

import redpitaya_scpi as scpi
import sys
import math
import time
rp_s = scpi.scpi(sys.argv[1])

rp_s.tx_txt('ACQ:BUF:SIZE?')
BUFF_SIZE = int(rp_s.rx_txt())
pulse = ''
high = 0.85
low = 0.0
amp = high - low
p1 = BUFF_SIZE*0.2
p2 = BUFF_SIZE*0.8

m = float(amp/(p2-p1))
q = float(-m*p1+low)

for i in range(0, BUFF_SIZE-1):
	if(i != BUFF_SIZE-2):
		if(i>=0 and i<p1): 
			pulse += str(low)+ ', '	
		if(i>=p1 and i<=p2): 
			pulse += str(m*i+q)+ ', '
		if(i>p2): 
			pulse += str(high)+ ', '
	else:
		pulse += str(high)

rp_s.tx_txt('GEN:RST')
rp_s.tx_txt('SOUR2:FUNC ARBITRARY')
rp_s.tx_txt('SOUR2:TRAC:DATA:DATA ' + pulse)
rp_s.tx_txt('SOUR2:FREQ:FIX 80000')
rp_s.tx_txt('SOUR2:VOLT 1')
rp_s.tx_txt('OUTPUT2:STATE ON')

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: Ringing at falling edge

Post by Nils Roos » Wed Jul 06, 2016 11:20 am

Hi,

you can't really achieve an instant 0.85V to 0.0V transition without ringing. The output from a DAC is commonly passed through a lowpass filter to cut off the high frequency components of its step-like waveform and produce a signal with the bandwidth limited to half the sample frequency. Steep edges have a lot of high frequency components outside of this bandwidth, and when those are filtered out, ringing and slurred edges remain.

To counteract that, you should taper off the falling edge of your waveform towards 0.0V instead of an instant transition.

cgottard
Posts: 2
Joined: Wed Jul 06, 2016 9:33 am

Re: Ringing at falling edge

Post by cgottard » Wed Jul 06, 2016 2:05 pm

Hi Nils,

I totally agree with what you say, and, as a matter of fact, in an earlier version of the code the "vertical" falling edge was replaced by a line with an high slope but with a similar outcome. However I cannot relax this steepness requirement much as I need this signal for a specific purpose (injection in a Si pixel detector). In addition I was trying to replace a pricy lab device that performs as in the picture below.
So basically my question is: can I get the same with the RedPitaya?
Image

Cheers,
Carlo

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: Ringing at falling edge

Post by Nils Roos » Wed Jul 06, 2016 11:45 pm

I would suggest that instead of a linear downward slope you try an exponential decay over 2-3 samples (eg. 0.85, 0.2, 0.0 - experiment a little), to keep most of the initial high slew rate but soften the landing, so to speak. I don't have access to the kind of measuring equipment required to test this myself. If it doesn't sufficiently improve the shape, then I'd have to assume the answer to your question is no.

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: No registered users and 100 guests