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:
Genetic Algorithms in Matlab Simulink

Subject: Genetic Algorithms in Matlab Simulink

From: Keong

Date: 29 Jul, 2002 05:32:21

Message: 1 of 3

I have modelled a Fuzzy Logic Controlled system in Matlab Simulink. I
am currently working to use Genetic Algorithm to tune the Fuzzy Logic
Membership Functions. Can anybody help me how to integrate Genetic
Algorithm into Simulink?

Subject: Genetic Algorithms in Matlab Simulink

From: rocky

Date: 29 Jul, 2002 06:59:55

Message: 2 of 3

Keong wrote:
>
>
> I have modelled a Fuzzy Logic Controlled system in Matlab Simulink.
I
> am currently working to use Genetic Algorithm to tune the Fuzzy
Logic
> Membership Functions. Can anybody help me how to integrate Genetic
> Algorithm into Simulink?
>


I have a m-function block in my mfc simulink model. In this
m-function I applied Genetic Algorithm to get the control signal on
line.
But the simulating speed is very slow.
who can help me? thanks in advance.
sorry for my poor english

Subject: Genetic Algorithms in Matlab Simulink

From: Joe Foran

Date: 31 Jul, 2002 20:51:56

Message: 3 of 3

I am doing a very similar project for my Master's dissertation.
The approach I took was to write an S-Function block to implement the GA.
In the S-Function the number of discrete states is equal to the (number of
individuals plus one(representing best up till now for elitist method)
multilied by (num of var +1(for fitness)) plus two (current generation,
current chromosome).
Firstly the population is initialised (either randomly or by loading in a
saved initial population). Then for each individual the parameters are
output to be evaluated. The fitness is read in and written to the state
corresponing to that individual. When all individuals have been evaluated,
the selection crossover and mutation functions are called, and the next
generation begins.
It is important that the sample time for this block is set to equal the time
it takes to evaluate an individual. This can be done by setting ts when
initializing the block.
Hope this helps,
Joe

"Keong" <ywooik@yahoo.com> wrote in message
news:eeb0485.-1@WebX.raydaftYaTP...
> I have modelled a Fuzzy Logic Controlled system in Matlab Simulink. I
> am currently working to use Genetic Algorithm to tune the Fuzzy Logic
> Membership Functions. Can anybody help me how to integrate Genetic
> Algorithm into Simulink?

Tags for this Thread

No tags are associated with 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