Simulation - Algorithm to introduce noise?

Paullys50

Lifetime Supporting Member
Join Date
Jan 2006
Location
WI
Posts
2,188
Have a new project and I'd like to get my simulation logic a bit more realistic, as such I'd like to add noise to the simulated analog feedback the process requires (temperatures, pressures). It Would be nice to configure things like amplitude, rate, offset... so I could vary the noise across all the different analog feedback devices I want to try this on.

Anyone have a good place to start? I can already generate nice simulated analog signals (sine waves/ramps), but I'd like to dirty this up. Probably the opposite of a low-pass filter?

Reason for this, the process we are upgrading has a very long cycle time. I've got very basic captures of the data and as I build the SCADA and trending getting a sense of what real data might look like on-screen and in the reports will be helpful. I'd like to leave this simulation run for 24+ hours and look at the data and not just see a straight line.

Plus, I always like to add a littl' something to my development simulation as new projects come at me.

Suggestions? Note, I'm not trying to model this process, just some dirty analog feedback.
 
One idea that comes to mind...
A poor mans modified pseudorandom noise generator.
Create math code that will continuously output 2 lots of random numbers at a input time value (tick). I faintly remember that there may be some code for this floating around on this forum somewhere. These numbers will be your x and y values.
Use those numbers to create a pulse train. The amplitude varies with the y value, and the pulse width will vary with the x value. x is scaleable to your chosen time resolution.
Put the randomised pulse train through a simple first order filter and add that to your analog signal.
Rough, but will give you some very random noise
 
I always like using the least significant bits of the clock as my noise generator. PLCs often reply back down to the basement these days
 
PLCs often reply back down to the basement these days

That was supposed to be "nanoseconds" not "basement". Way too late to edit, but that was a heck of an autocorrect.
 

Similar Topics

Hi, I would like to assemble a simulator/practice booster pump system that uses PID to maintain steady water pressure under various outlet demands...
Replies
0
Views
74
I am trying to set up a piece of equipment with a Horner HE-X4R. I'd like to use structured text and so far I'm just trying to get a basic On/off...
Replies
0
Views
70
hello every one. i'm new to tiaportal, i have created new project and HMI screen the program works fine with PLC-sim, but when i try to cntrol the...
Replies
9
Views
405
I am looking to upgrade a CompactLogix on V18 to an L83E on V32 which is currently using a Beijer E1151. Does anyone know if the E1151 is directly...
Replies
3
Views
644
I use the HMI simulation as our production lines are pretty big and we've put an upgrade in over the last couple of months and I've used it most...
Replies
3
Views
728
Back
Top Bottom