geez0x1 / CompliantJointToolbox

Compliant Joint Toolbox (CJT) for MATLAB and Simulink
GNU General Public License v3.0
37 stars 14 forks source link

Unit tests with noise - checksum computation? #56

Open geez0x1 opened 6 years ago

geez0x1 commented 6 years ago

We compute checksums based on output data, but in some cases noise is enabled. I'm not sure what the source of entropy is for MATLAB's noise generator, or whether it depends on platform. On a single platform, single version, MATLAB will produce reproducible noise (rand()) on every startup unless instructed to re-seed properly (very misleading behaviour actually).

Can we be sure that the "Band-limited white noise" blocks that we use actually produce the same output on each MATLAB version and platform? (seeds are provided in the blocks).

@joernmalzahn Do you have any idea?

joernmalzahn commented 6 years ago

Hmm, that is a tricky one. No immediate idea. For most tests, we can just make sure, no noise is involved. But the noise generation and its effect on the rest of the code should be tested as well.

Requires some study of the noise generator functions...

wes: edited to remove mangling by email client..