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

Extraction of modal data #34

Open
moritzhuelsebrock opened this issue Nov 15, 2017 · 33 comments
Open

Extraction of modal data #34

moritzhuelsebrock opened this issue Nov 15, 2017 · 33 comments

Comments

@moritzhuelsebrock
Copy link

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
Copy link
Contributor

jankoslavic commented Nov 15, 2017

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
Copy link
Author

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

@ghost
Copy link

ghost commented Nov 18, 2017

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
Copy link
Contributor

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
Copy link

ghost commented Nov 18, 2017

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
Copy link

ghost commented Nov 18, 2017

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
Copy link
Contributor

Dear Sainag!

Do you have a working OpenModal in your environment?

@ghost
Copy link

ghost commented Nov 19, 2017

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
Copy link
Contributor

miha-pirnat commented Nov 19, 2017 via email

@ghost
Copy link

ghost commented Nov 19, 2017

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

@moritzhuelsebrock
Copy link
Author

moritzhuelsebrock commented Nov 20, 2017

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
Copy link
Contributor

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

PS: We still need to resolve this issue (pyFRF has been updated since):
#4

@moritzhuelsebrock
Copy link
Author

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
Copy link
Contributor

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
Copy link
Author

moritzhuelsebrock commented Nov 23, 2017

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
Copy link
Contributor

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

@moritzhuelsebrock
Copy link
Author

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
Copy link
Contributor

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

@moritzhuelsebrock
Copy link
Author

@jankoslavic thank you for your fast response!!!

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

OpenModal.zip

@jankoslavic
Copy link
Contributor

we (@sbtlaarzc ) are working on it:)

@sbtlaarzc
Copy link
Contributor

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
Copy link
Author

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
Copy link
Contributor

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:

  • the style sheet files or
  • the uff files.

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
Copy link
Author

moritzhuelsebrock commented Dec 5, 2017

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
Copy link
Contributor

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
Copy link
Author

moritzhuelsebrock commented Dec 6, 2017

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
Copy link
Contributor

sbtlaarzc commented Dec 6, 2017

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

@moritzhuelsebrock
Copy link
Author

moritzhuelsebrock commented Dec 6, 2017

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

Measurements.zip

@sbtlaarzc
Copy link
Contributor

Yes

@moritzhuelsebrock
Copy link
Author

It's not nicely coded though...

@sbtlaarzc
Copy link
Contributor

... that is not a problem :).

@zoppellari
Copy link

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
Copy link
Contributor

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants