Thread Subject: Vibration Simmulation

Subject: Vibration Simmulation

From: Alexander Wei?brich

Date: 22 Jun, 2009 10:06:01

Message: 1 of 7

Hello Guys,

I write my smaller thesis (calles "Studienarbeit in Germany). For my subject, the person who supports me, asked me, to program a code with Matlab/Simulink, which generates a 2nd and 4th order vibration.

The target is, to connect the Laptop with a power amplifier and give this signal out with speakers. There should be a possibility to have a button, to give out 2nd order and a button to give out 4th order.

Unfortunately I did not find any post about programing a code like this. I have a little experience with Matlab/Simulink.

Is anyone there, who can give me some advices who to reach that target?

Subject: Vibration Simmulation

From: Adam Chapman

Date: 22 Jun, 2009 10:24:30

Message: 2 of 7

On Jun 22, 11:06 am, "Alexander Wei?brich" <a...@weissbrich.de> wrote:
> Hello Guys,
>
> I write my smaller thesis (calles "Studienarbeit in Germany). For my subject, the person who supports me, asked me, to program a code with Matlab/Simulink, which generates a 2nd and 4th order vibration.
>
> The target is, to connect the Laptop with a power amplifier and give this signal out with speakers. There should be a possibility to have a button, to give out 2nd order and a button to give out 4th order.
>
> Unfortunately I did not find any post about programing a code like this. I have a little experience with Matlab/Simulink.
>
> Is anyone there, who can give me some advices who to reach that target?

I wouldn't be able to advise on how to use individual buttons to
excite the system. I assume it's going to e used in a lab so I would
just use individual programs for each combinatiion of orders (e.g. one
program for 2nd order demo, then another for 4th order demo).

It's been a few years since i studied vibration so I couldn't give you
code for the signal output.

However I can tell you that the function sound(y,Fs) (where y is the
vibration signal and Fs is the sample rate) in matlab would provide an
easy way to output the signal through audio, without the tricky
business of serial outputs.

Hope this helps
Adam

Subject: Vibration Simmulation

From: Rune Allnor

Date: 22 Jun, 2009 10:34:56

Message: 3 of 7

On 22 Jun, 12:06, "Alexander Wei?brich" <a...@weissbrich.de> wrote:
> Hello Guys,
>
> I write my smaller thesis (calles "Studienarbeit in Germany). For my subject, the person who supports me, asked me, to program a code with Matlab/Simulink, which generates a 2nd and 4th order vibration.
>
> The target is, to connect the Laptop with a power amplifier and give this signal out with speakers. There should be a possibility to have a button, to give out 2nd order and a button to give out 4th order.
>
> Unfortunately I did not find any post about programing a code like this. I have a little experience with Matlab/Simulink.
>
> Is anyone there, who can give me some advices who to reach that target?

Haven't done anything like this but there is one main
question you need to resolve before you start:

Is it sufficient that you play stored sounds (that is,
the sounds have finite durations), or do you need the
thing to play, once started, until the user explicity
stops it?

If the former, the task is very easy. All you need is
a GUI and two pre-recorded sound files.

If the latter, you are in for some serious programming,
coordinating sound generation, sound card buffers and
the GUI. Not for the faint-hearted!

Make an executive decision up front. Base this decision
on how much time and effort is reasonable to invest in
this program, *not* what you would like to make it do.

Rune

Subject: Vibration Simmulation

From: Alexander Wei?brich

Date: 22 Jun, 2009 11:13:01

Message: 4 of 7

Thanks for your advice.
I don't have to think long about your point. There is only one possibility for me. I have to spend more time in programing that, because it is the start for the subject.
Later I have to modify some things and have to keep on working with it.
That's why a solution with playing stored sound files isn't a possibility. It's necessary to play the generated sounds up to the point someone stops it.

Subject: Vibration Simmulation

From: Adam Chapman

Date: 22 Jun, 2009 13:56:43

Message: 5 of 7

On Jun 22, 12:13 pm, "Alexander Wei?brich" <a...@weissbrich.de> wrote:
> Thanks for your advice.
> I don't have to think long about your point. There is only one possibility for me. I have to spend more time in programing that, because it is the start for the subject.
> Later I have to modify some things and have to keep on working with it.
> That's why a solution with playing stored sound files isn't a possibility. It's necessary to play the generated sounds up to the point someone stops it.


Maybe you could do something with the signal generator and a switch in
simulink to turn it on and off

Subject: Vibration Simmulation

From: Alexander Wei?brich

Date: 23 Jun, 2009 08:02:02

Message: 6 of 7

 > Maybe you could do something with the signal generator and a switch in
> simulink to turn it on and off

Yes, I thought about that, too. But it's not as easy as it sounds. You can not set different orders or something like that. Perhaps with some filters it is possible, but I dont have any experience with 2nd and 4th order vibration. So setting signals and filters isn't a good start.

Subject: Vibration Simmulation

From: Adam Chapman

Date: 23 Jun, 2009 17:08:47

Message: 7 of 7

On Jun 23, 9:02 am, "Alexander Wei?brich" <a...@weissbrich.de> wrote:
>  > Maybe you could do something with the signal generator and a switch in
>
> > simulink to turn it on and off
>
> Yes, I thought about that, too. But it's not as easy as it sounds. You can not set different orders or something like that. Perhaps with some filters it is possible, but I dont have any experience with 2nd and 4th order vibration. So setting signals and filters isn't a good start.

I have a simulink file that you could use. If you give me your email I
can send it to you.

It's basically a colck source, where the time goes into a function
block. That funtion is something of the form y=exp(cos(t)), which I
assume is the form of your vibration equations (http://
books.google.co.uk/books?id=G2UyBTji18oC&pg=PA33&lpg=PA33&dq=2nd+order
+vibration
+equation&source=bl&ots=4hupeIcTqB&sig=Pw3tGclRwoig2PClKgKJCC2ZzxA&hl=en&ei=0gVBSs6jCN64jAeSzIScCQ&sa=X&oi=book_result&ct=result&resnum=4) .
There is a switch to flick between 2nd order and 4th order simuations.
The output y goes to an audio device (the amp throught the computer
audio jack) and also a scope to show y with time.

You'd have to change the functions to be relevant to you, but it would
give you a good example to start from

Adam

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
vibration Alexander Weißbrich 22 Jun, 2009 06:09:05
simulation Alexander Weißbrich 22 Jun, 2009 06:09:05
order Alexander Weißbrich 22 Jun, 2009 06:09:05
rssFeed for this Thread

Contact us at files@mathworks.com