difficulty decoding on-off keyed signal #1143
Replies: 1 comment
-
Oh I know, urh expects demoduleted data. Below is a hacky python script to obtain I and Q vectors import pandas as pd
import numpy as np
from scipy import signal
import matplotlib.pyplot as plt
# Read the CSV file
df = pd.read_csv('RigolDS1.csv')
# Assuming the data is in a column named 'signal'
sig = df['CH1(V)'].values#[12020000:12030000]
# Generate time array
t = np.arange(len(sig))
# Create sin and cos with a period of 10 samples
f = 0.1
sin_wave = np.sin(2 * np.pi * t * f)
cos_wave = np.cos(2 * np.pi * t * f)
# Demodulate into I and Q components
I = sig * sin_wave
Q = sig * cos_wave
b, a = signal.butter(5, f)
If = signal.lfilter(b, a, I)
Qf = signal.lfilter(b, a, Q)
# Create a new DataFrame with the results
result_df = pd.DataFrame({
'I': If,
'Q': Qf,
#'sin': sin_wave,
#'sig': sig,
})
# Write the results to a new CSV file
result_df.to_csv('demodulated_output.csv', index=False)
#result_df.plot()
#plt.show() |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I recorded the following signal from my Remeha R-bus thermostat, which seems to be a dead simple on-off keyed signal.
RigolDS1.zip
However, I can't figure out at all how to decode it with urh. When I press autodetect it detects the bit width as 10 samples which is about the frequency of the carrier. It seems like the actual bit width is more like 500 samples, but if I try that it decodes complete nonsense:
I feel like I'm missing something super obvious but after trying everything I can think of I'm about ready to decode it manually with hacky python scripts.
Beta Was this translation helpful? Give feedback.
All reactions