Genetic algorithm (GA) calculated values compared to measured
Show older comments
Hi!
I want to use a number of measured values and try to minimize the differences between the measured values and the calculated values. I calculate the values, with Cb and Lb as inputs.
Rd = 0.1; %0.1;
Rb = 164;
for i=1:num_samples
w = i*pi*2*(10^6);
part1 = (j*w*Lb*Rb);
part2 = (Rb-(w^2)*Cb*Lb*Rb+j*w*Lb);
z_calc(i) = real(Rd + part1/part2);
end
and then taking the difference between the calculated and the measured.
diff(k) = abs(z_calc_n(k)-z_mes(k));
With the differences i can apply a fitness equation
fit = 1/28*sum(diff/max(z_mes));
y = (1/fit)^(-1/3);
I want to achieve a fitness based on two variables Lb and Cb. As a total new user to GA I can't understand how to generally approach this problem in a good manner. However, when i look at the GA function and examples included i see that i can pass a number of constrains. For example non of Rb or Lb can be negative.
How should i approach the problem? Is it solvable?
B.r. Mattias
Accepted Answer
More Answers (0)
Categories
Find more on Genetic Algorithm in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



