openmodal / OpenModal

Open source experimental modal analysis software.
http://www.openmodal.com
Other
103 stars 46 forks source link

Extraction of modal data #34

Open moritzhuelsebrock opened 6 years ago

moritzhuelsebrock commented 6 years ago

Dear @jankoslavic,

I managed to run the programme (ubuntu-linux-tested branch) and upload a .uff-file. When I perform the analysis it also works decently but how do I extract the modal parameters (eigen frequencies, damping and mode shape). When I click on export and select the analysis results it saves an almost empty .uff-file (see .txt file)

Thank you in advance!!

Moritz

Model.txt

jankoslavic commented 6 years ago

please see this stackoverflow question:

https://stackoverflow.com/questions/47311737/how-do-i-export-modal-data-from-the-program-openmodal/47311738#47311738

And star-it if it helps:)

moritzhuelsebrock commented 6 years ago

Thank you so much @jankoslavic! It worked perfectly!!!

ghost commented 6 years ago

Hi,

I need a help from you guys. My python3 (Jupyter notebook) is dying when I run the code to get my Modal Vectors or analysis results out as .xlsx. Can any one run the .mdd, I would appreciate that. Here is the link: https://drive.google.com/open?id=1FnlfOwGo9zLkj6m142a0NFFA5AzFv7Ii

Thank you in advance, Sainag.

jankoslavic commented 6 years ago

Dear Sainag! Please use https://stackoverflow.com/questions/47311737/how-do-i-export-modal-data-from-the-program-openmodal/47311738#47311738 and do your homework and the provide minimal code. Regards, JS

ghost commented 6 years ago

I actually did that but my poor VM dies every time I execute :) ....Here is what I did step1: pip install -r requirements.txt step2: ran the 2 cells inside WingModalVec.ipynb I have the folder in here:link: https://drive.google.com/open?id=1F5cZJOFVGRFzSYGblurtSd6FMh3vrg6v

Thanks, Sainag.

ghost commented 6 years ago

Hi Jankoslavic,

Here is the explicit error:

sainag@sainag:~/Desktop/OpenModal-ubuntu-linux-tested$ python3 Python 3.5.2 (default, Nov 17 2016, 17:05:23) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information.

import OpenModal as OM import pickle import sys import pandas as pd sys.modules['openModal'] = OM file_name=r'wing.mdd' f = open(file_name, 'rb') data = pickle.load(f) Segmentation fault (core dumped) sainag@sainag:~/Desktop/OpenModal-ubuntu-linux-tested$

Could you please suggest, how can I proceed from here.

Thanks in advance, Sainag.

jankoslavic commented 6 years ago

Dear Sainag!

Do you have a working OpenModal in your environment?

ghost commented 6 years ago

Hi Jankoslavic,

I am able to launch the Guyee in the VM but not being able to open any saved project. Here is what the error shows, no module openmodal which is kind of absurd for me.

sainag@sainag:~/Desktop/OpenModal-ubuntu-linux-tested/OpenModal$ python3 openmodal.py Welcome update time: 5.0067901611328125e-06 seconds Clearing previous models Storing model id: 0 Geometry update time: 0.07305335998535156 seconds Exc type changed Measurement update time: 0.04697227478027344 seconds Identification update time: 0.08475923538208008 seconds Clearing previous models Storing model id: 0 2D data not available. Animation update time: 0.12900257110595703 seconds libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: cHRM chunk does not match sRGB libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: cHRM chunk does not match sRGB libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: cHRM chunk does not match sRGB libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: cHRM chunk does not match sRGB Traceback (most recent call last): File "/home/sainag/Desktop/OpenModal-ubuntu-linux-tested/OpenModal/gui/skeleton.py", line 822, in run data = pickle.load(f) ModuleNotFoundError: No module named 'openModal' Error in sys.excepthook: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook from apport.fileutils import likely_packaged, get_recent_crashes File "/usr/lib/python3/dist-packages/apport/init.py", line 5, in from apport.report import Report File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in import apport.fileutils File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in from apport.packaging_impl import impl as packaging File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 23, in import apt File "/usr/lib/python3/dist-packages/apt/init.py", line 23, in import apt_pkg ModuleNotFoundError: No module named 'apt_pkg'

Original exception was: Traceback (most recent call last): File "/home/sainag/Desktop/OpenModal-ubuntu-linux-tested/OpenModal/gui/skeleton.py", line 822, in run data = pickle.load(f) ModuleNotFoundError: No module named 'openModal'

miha-pirnat commented 6 years ago

This is due to paths in pickled files...check out stackoverflow questions:

https://stackoverflow.com/questions/47311737/how-do-i-export-modal-data-from-the-program-openmodal/47311738#47311738

https://stackoverflow.com/questions/13398462/unpickling-python-objects-with-a-changed-module-path

  1. nov. 2017 10:44 je oseba "ISN2473" notifications@github.com napisala:

Hi Jankoslavic,

I am able to launch the Guyee in the VM but not being able to open any saved project. Here is what the error shows, no module openmodal which is kind of absurd for me.

sainag@sainag:~/Desktop/OpenModal-ubuntu-linux-tested/OpenModal$ python3 openmodal.py Welcome update time: 5.0067901611328125e-06 seconds Clearing previous models Storing model id: 0 Geometry update time: 0.07305335998535156 seconds Exc type changed Measurement update time: 0.04697227478027344 seconds Identification update time: 0.08475923538208008 seconds Clearing previous models Storing model id: 0 2D data not available. Animation update time: 0.12900257110595703 seconds libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: cHRM chunk does not match sRGB libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: cHRM chunk does not match sRGB libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: cHRM chunk does not match sRGB libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: cHRM chunk does not match sRGB Traceback (most recent call last): File "/home/sainag/Desktop/OpenModal-ubuntu-linux-tested/OpenModal/gui/skeleton.py", line 822, in run data = pickle.load(f) ModuleNotFoundError: No module named 'openModal' Error in sys.excepthook: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook from apport.fileutils import likely_packaged, get_recent_crashes File "/usr/lib/python3/dist-packages/apport/init.py", line 5, in from apport.report import Report File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in import apport.fileutils File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in from apport.packaging_impl import impl as packaging File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 23, in import apt File "/usr/lib/python3/dist-packages/apt/init.py", line 23, in import apt_pkg ModuleNotFoundError: No module named 'apt_pkg'

Original exception was: Traceback (most recent call last): File "/home/sainag/Desktop/OpenModal-ubuntu-linux-tested/OpenModal/gui/skeleton.py", line 822, in run data = pickle.load(f) ModuleNotFoundError: No module named 'openModal'

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/openmodal/OpenModal/issues/34#issuecomment-345504196, or mute the thread https://github.com/notifications/unsubscribe-auth/AKiOTqGqiIvNz5vXDsTrYmL2Gq9xVWP7ks5s3_iPgaJpZM4Qe5ex .

ghost commented 6 years ago

Thank you very much! I will check that out and try...

moritzhuelsebrock commented 6 years ago

Hello @jankoslavic , I was able to extract the modal data but unfortunately when I use it to rebuild the transfer function the outcome isn't as nice as it seems in OpenModal. The natural frequencies and the damping factor are perfectly identified but the mode shapes are somehow not scaled accuratly. In the first picture you can see what OpenModal displays while the identification. In the second picture you can see what I get when I use the identified modal data to rebuild the transfer function. If I use the "real" eigen vectors of the system both graphs fit.

The "r"-values saved to the values sheet are suppose to be the modal shape constants, right? Do I have to scale them somehow (if so how?) to get a better result?

openmodal

untitled4

Thank you in advance! Moritz

jankoslavic commented 6 years ago

Dear @moritzhuelsebrock This looks strange. @sbtlaarzc do you have an idea?

PS: We still need to resolve this issue (pyFRF has been updated since): https://github.com/openmodal/OpenModal/issues/4

moritzhuelsebrock commented 6 years ago

Dear @jankoslavic & @sbtlaarzc ,

Do I need to manually install pyFRF? Do you think this could be the solution to my problem?

The system I'm trying to identify is the following:

M = [1 0 0; 0 1 0; 0 0 1];

C = [40 0 0; 0 40 0; 0 0 40];

K = [237315 -161000 0; -161000 398315 -161000; 0 -161000 398315];

The transfer functions are saved in the uff 58 format.

Example.txt

Maybe you could run it through OpenModal and see if it works.

Thank you in advance! Moritz

PS: I can't inset a geometry in OpenModal because the programme crashes when I click on the icon. I don't know if this could be a reason for the poorly identified mode shapes.

jankoslavic commented 6 years ago

Dear @moritzhuelsebrock

The frf.py used by OM performs modal analysis using the accelerance frf form while the proper way would be the receptance frf form. See "frf_form" in pyFRF. Try converting from accelerance to receptance or the other way around (you can use also the fft_tools inside pyFRF: see function frequency_integration and frequency_derivation)

moritzhuelsebrock commented 6 years ago

Dear @jankoslavic

I changed from the accelerance to receptance and this is my result: untitled

The result is better but still not perfect. Do you have another idea where this shift could come from? Here is my Receptance uff file. Feel free to test it!!

Receptance.txt

jankoslavic commented 6 years ago

It looks like it is scaled. I would propose to double check the units?

moritzhuelsebrock commented 6 years ago

Dear @jankoslavic,

I double checked the units and still have an offset between the "Original" and the "Generated" transfer function.

I would really appreciate if you would be so nice and check whether you experience the same problem while analysing this small test model (see information below).

M = [1 0 0; 0 1 0; 0 0 1];

C = [40 0 0; 0 40 0; 0 0 40];

K = [237315 -161000 0; -161000 398315 -161000; 0 -161000 398315];

I'm suppose to write a blog post on "How to get modal parameters with OpenModal" on https://www.openadaptronik.de/ and I would love to present a well fitted model.

Thank you in advance!! Moritz

jankoslavic commented 6 years ago

@moritzhuelsebrock can you please send me your original file where you get from M K to FRF's?

moritzhuelsebrock commented 6 years ago

@jankoslavic thank you for your fast response!!!

I did this in Matlab, I hope that's not a problem.

OpenModal.zip

jankoslavic commented 6 years ago

we (@sbtlaarzc ) are working on it:)

sbtlaarzc commented 6 years ago

This seems to be a bug, which occurs during saving (some unnecessary scaling is performed).

I removed the scaling and I think this should resolve the issue. You can find the updated version on branch blaz). I will be doing some testing in the following week and if everything is ok, I will merge it with the master branch.

moritzhuelsebrock commented 6 years ago

Hello @sbtlaarzc @jankoslavic thank you so much for all the support!

I tried using the blaz branch and but when I click on the Analyse button nothing happens. The error text is: "UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 75: character maps to "... Do you know what that means?

The only version that works on my computer is the ubuntu-linux-tested branch. Does OpenModal in general work better on linux?

sbtlaarzc commented 6 years ago

The error seems to be connected to reading files, which do not have encoding set to UTF-8 (see link).

I think this could be connected either to reading:

I fixed the first (check branch blaz), not sure if there is also the same problem with pyuff (@jankoslavic ?).

The software should be running on Windows, since it was developed on it.

If you find any further issues, post them and we will try to resolve them.

moritzhuelsebrock commented 6 years ago

Hello @jankoslavic @sbtlaarzc I tested the updated branch blaz with the measurment.uff from the pyuff example and I get this every time: Warning: There is no INFO or UNITS field! Storing model id: 0 Traceback (most recent call last): File "..\OpenModal\gui\widgets\analysis.py", line 267, in stab_diag self.fft_popout = FFTLengthPopout(temp_f) File "..\OpenModal\gui\widgets\analysis.py", line 309, in __init__ src = Template(fh.read()) File "C:\Python36\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 75: character maps to <undefined>

When I use the ubuntu-linux-tested branch it works...

sbtlaarzc commented 6 years ago

Hi @moritzhuelsebrock .

We did some code updating. The master branch is now updated.

We moved the ubuntu-linux-tested branch to master and also added the changes from blaz branch.

moritzhuelsebrock commented 6 years ago

Hello! I did some testing on the new master branch. It got better but it's still not correctly scaled... Have you tested the measurement.uff file from the pyuff showcase? My results look like this...

h11

h21

h31

Apart from the scaling and the light dropping of the amplitude in the first picture the extimation looks really good! I hope you can figure out where the problem is :)

sbtlaarzc commented 6 years ago

Thanks for the response, I will check where the problem is. Can you also add the code for the upper plot?

moritzhuelsebrock commented 6 years ago

Do you mean the code where I calculate the FRF's?

Measurements.zip

sbtlaarzc commented 6 years ago

Yes

moritzhuelsebrock commented 6 years ago

It's not nicely coded though...

sbtlaarzc commented 6 years ago

... that is not a problem :).

zoppellari commented 5 years ago

Hello. I’m seeing the same problem but I think the fitted curve is ok. The problem is the measure. The LSCF is trying to fit a shifted curve. I have impacted the same structure twice. One with openModal and another with a labview program. The shift between the FRFs are about 250x.

image

When I multiply the openModal curve by 250 the curves fit better:

image

jankoslavic commented 5 years ago

Please try replacing the current frf.py with the file pyFRF (which you rename to frf.py) https://github.com/openmodal/pyFRF

(the current frf.py implementation does not have proper frf scaling)