Page 1 of 1

Calculate Standard Deviation

Posted: Thu Jun 09, 2022 6:30 pm
by wayne_millard
Hi Team

Is there a componet that will calculate standard deviation?
If not then it may be nice to have.

Thanks,
Wayne M

Re: Calculate Standard Deviation

Posted: Fri Jun 10, 2022 10:31 am
by BenR
Hi Wayne,

Good suggestion, we could certainly look to add this into the DSP library for you. Would you want a none DSP version too?

Re: Calculate Standard Deviation

Posted: Fri Jun 10, 2022 2:20 pm
by wayne_millard
Hi Ben

Yes I would love that please. Because I do not have DSP license.

Thanks
Wayne M

Re: Calculate Standard Deviation

Posted: Fri Jun 10, 2022 4:24 pm
by BenR
Hi Wayne,

I've had a quick go at a component for you and pushed it to the library update system. Once you have it it should appear under storage.

The source project is here if you're interested.

StandardDeviation.fcfx
(15.66 KiB) Downloaded 405 times

Let me know how you get on. If it works ok I'll try and add a DSP version too.

A minor future optimisation would be to upgrade the FIFO to a circular buffer so we don't have to keep shifting the values through the buffer but might not make a big difference for small buffers. A none float based version might also be good.

Re: Calculate Standard Deviation

Posted: Fri Jun 10, 2022 5:38 pm
by wayne_millard
Hi Ben,

Thanks for putting this togeather.
i have had a quick play with it and can the number of Samples be assigned with a variable so that the sample number can be changed based on number of sample that was gathered. And not a fixed amount that is assigned to the commonent.

Thanks,
Wayne M :D

Re: Calculate Standard Deviation

Posted: Mon Jun 13, 2022 8:20 pm
by wayne_millard
Hi Ben,

Is it posible to assign a veriable to number of samples and not have it fixed to the component.

Thanks,
Wayne M :D

Re: Calculate Standard Deviation

Posted: Tue Jun 14, 2022 9:38 am
by BenR
Hi Wayne,

That's been added for you now. I've pushed the latest component to the library update system for you.

The latest source is here if you're interested.

StandardDeviation.fcfx
(28.4 KiB) Downloaded 411 times

Re: Calculate Standard Deviation

Posted: Tue Jun 14, 2022 9:55 pm
by wayne_millard
Thanks Ben.

Wayne M