Python Forum
Create sensor data for a IoT project
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Create sensor data for a IoT project
#6
Hi dead_Eye

ye thats my issue also, jsut using a random function will create a random noise,

looking for someone that might have written something a bit more intelligent...

or might have access to a datafile from a real world set of sensors: Temp, pressure, rpm, speed, flow rate,

looking for approx 10 streams, use less... water temp and engine temp I can simulate by taking one and upping the others level by say 50 deg c.

water flow rate can be used to simulate a belt speed also, by increasing decreasing it by x.

this way the lines don't look just like random noise.

G

(Dec-14-2019, 02:26 AM)DeaD_EyE Wrote: I work currently on a project, where I receive measurement data over a serial interface.
Generating random Test-Data is not very good, because it will be very noisy.

Example:



import random
import matplotlib.pyplot as plt


def random_delta(size, start_value, min_delta, max_delta, precision=1):
    value_range = max_delta - min_delta
    half_range = value_range / 2
    for _ in range(size):
        delta = random.random() * value_range - half_range
        yield round(start_value, precision)
        start_value += delta


plt.plot(list(random_delta(200, 10, -1, 1)))
plt.show()

little bit of background,

A:) I'm trying to simulate 5 factories... 100 sensors min each, maybe more towards 200/300... pushing data every minute, I'll have collector processors that in this case would actually run this random generate code (in real world they would be getting data from the sensors.

The idea these collectors would push the data onto a Kafka topic.

B:) think 5-10... race teams, each team 4 cars, each car 20sensors, each sensor pushing 1 data point/second. All grabbed/received by a collector, all collectors pushing onto a topic.

All received, and graphed using Grafana.

so data that looks more than just noise would be great as it will display better on the Grafana dashboard.

G
Reply


Messages In This Thread
Create sensor data for a IoT project - by georgelza - Dec-12-2019, 07:31 PM
RE: Create sensor data for a IoT project - by georgelza - Dec-15-2019, 04:05 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Is it possible to extract 1 or 2 bits of data from MS project files? cubangt 8 1,369 Feb-16-2024, 12:02 AM
Last Post: deanhystad
  Create X Number of Variables and Assign Data RockBlok 8 1,209 Nov-14-2023, 08:46 AM
Last Post: perfringo
  Better python library to create ER Diagram by using pandas data frames as tables klllmmm 0 1,389 Oct-19-2023, 01:01 PM
Last Post: klllmmm
  Create simple live plot of stock data dram 2 3,062 Jan-27-2023, 04:34 AM
Last Post: CucumberNox
  Trying to Get Arduino sensor data over to excel using Python. eh5713 1 1,964 Dec-01-2022, 01:52 PM
Last Post: deanhystad
  Create a function for writing to SQL data to csv mg24 4 1,340 Oct-01-2022, 04:30 AM
Last Post: mg24
  An important question is how to create a zigzag in price data? epsilon 0 1,363 Nov-18-2020, 08:06 PM
Last Post: epsilon
  PyTest >> Yaml parsed data to create api test request AmR 0 1,930 Apr-14-2020, 11:41 AM
Last Post: AmR
  Project, Reading Data from a spreadsheet. Error message!! Shafla 1 5,384 Sep-27-2019, 10:44 AM
Last Post: buran
  Code Wireless Temperature sensor and send sensor readings to google sheet jenkins43 0 2,264 Nov-29-2018, 12:44 PM
Last Post: jenkins43

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020