Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Using data from cftool inside Simulink

Subject: Using data from cftool inside Simulink

From: Sebastian Gatzka

Date: 15 Dec, 2009 15:03:04

Message: 1 of 2

Hello World.

I'm facing a kind of standard-problem but did not find a way to work my way around.

I need the drag coefficient data for a Simulink model. I just have discrete values from a measurement which is just a list of values containing Reynolds number (Re) and drag coefficient data cd(Re):

0,05875 492
0,1585 169,8
0,4786 58,88
(...)
1778000 0,1778
2291000 0,1862
5012000 0,1862

Because the Reynolds number is computet continously from inside the Simulink model but is affected by the drag coefficient and vice versa I need an interpolated value for cd(Re) while doing the simulation. Lets make it more clear: I need to know the drag data for a specific Reynolds number without knowing the Reynolds number a priori.
So, while doing the Simulink run I need to do an interpolation to the drag data corresponding to the appropriate Reynolds number.

Does any one know how this kind of interpolation (linear piecewise would be sufficient) can be done on runtime?

Hope I made myself clear.
Have a nice day & See you.
Sebastian

Subject: Using data from cftool inside Simulink

From: Arnaud Miege

Date: 15 Dec, 2009 16:20:18

Message: 2 of 2


"Sebastian Gatzka" <sebastian.gatzka.NOSPAM@stud.tu-darmstadt.de> wrote in
message news:hg88f8$frp$1@fred.mathworks.com...
> Hello World.
>
> I'm facing a kind of standard-problem but did not find a way to work my
> way around.
>
> I need the drag coefficient data for a Simulink model. I just have
> discrete values from a measurement which is just a list of values
> containing Reynolds number (Re) and drag coefficient data cd(Re):
>
> 0,05875 492
> 0,1585 169,8
> 0,4786 58,88
> (...)
> 1778000 0,1778
> 2291000 0,1862
> 5012000 0,1862
>
> Because the Reynolds number is computet continously from inside the
> Simulink model but is affected by the drag coefficient and vice versa I
> need an interpolated value for cd(Re) while doing the simulation. Lets
> make it more clear: I need to know the drag data for a specific Reynolds
> number without knowing the Reynolds number a priori.
> So, while doing the Simulink run I need to do an interpolation to the drag
> data corresponding to the appropriate Reynolds number.
>
> Does any one know how this kind of interpolation (linear piecewise would
> be sufficient) can be done on runtime?
>
> Hope I made myself clear.
> Have a nice day & See you.
> Sebastian
>

Use one of the look-up tables:
http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/ug/bqiqpa3.html

HTH,

Arnaud

Tags for this Thread

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.

Contact us