Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to simulate arbitrary data which is fed to pypmu? #2

Closed
Tibalt opened this issue Oct 20, 2017 · 3 comments
Closed

how to simulate arbitrary data which is fed to pypmu? #2

Tibalt opened this issue Oct 20, 2017 · 3 comments
Labels

Comments

@Tibalt
Copy link

Tibalt commented Oct 20, 2017

Hi,
Or how do I feed arbitrary data to pypmu to send out in 32.118?

Thanks.

Regards
Tibalt

@sstevan
Copy link
Contributor

sstevan commented Oct 20, 2017

Hello @Tibalt,

Please check randomPMU.py script inside examples folder.

pmu.send_data(phasors=[(random.uniform(215.0, 240.0), random.uniform(-0.1, 0.3)),
                                   (random.uniform(215.0, 240.0), random.uniform(1.9, 2.2)),
                                   (random.uniform(215.0, 240.0), random.uniform(3.0, 3.14))],
                          analog=[9.91],
                          digital=[0x0001])

Method send_data will pack custom phasor values into data frame. Eg.

pmu.send_data(phasors=[(220.0, 0.01), (221.5, 1.9), (219.0, 3.12)],
                          analog=[9.91],
                          digital=[0x0001])

Where the first element of the tuple (220.0, 0.01) represents the magnitude and the second one represents the angle of the phasor.

@Tibalt
Copy link
Author

Tibalt commented Oct 25, 2017

Hello @sstevan

Thanks for the quick response!
I found randomPMU.py yesterday and verified it with PMU connection tester from GridProtectionAlliance.
Briefly went through the code and the protocol is separated from communication which make each part easy to understand. Good job.

Since it is in python, I wonder do you have any experience running it in embedded environment? If there is, what hardware is it?

Thanks!

Regards,
Tibalt

@sstevan
Copy link
Contributor

sstevan commented Oct 27, 2017

We have not tried to run it on embedded hardware, but you should be able to run it if you have Python 3 on it. Performance depends mostly on data reporting rate.

@sstevan sstevan closed this as completed Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants