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.
The shape I need is like the magenta one in here:
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')