Here is the Matlab function to calculate the beam profile of a Gaussian beam using error function fit.
Transmission(x-x0) = 0.5(1+erf(sqrt(2).(x-x0)./w))
where x is the position of the knife edge (measured in mm usually), x0 is the beam center, w is the beam waist that we will calculate, erf is the error function.
Here is the Matlab Function:
function [w, x0, fitresult, gof] = knifEdge(x, TransmittedPower)
% Knife edge method: Calculation of beam waist and center of the beam
% Input :
% X Input : Knife position (eg. in mm)
% Y Output: Power for each of the x position.
% w = beam waist
% x0 = center of the beam
% fitresult : a fit object representing the fit.
% gof : structure with goodness-of fit info.
%% Fit: ‘Error Function Fitting’.
NormalizedPower = TransmittedPower./max(TransmittedPower); % Normalizing Power
x = x-min(x);
lincoeff = polyfit(x, NormalizedPower, 1);
a = lincoeff(1);
[xData, yData] = prepareCurveData( x, NormalizedPower );
% Fit Type
ft = fittype( ‘0.5*(1-erf(sqrt(2).*(x-x0)./w))’, ‘independent’, ‘x’, ‘dependent’, ‘y’ );
ft = fittype( ‘0.5*(1+erf(sqrt(2).*(x-x0)./w))’, ‘independent’, ‘x’, ‘dependent’, ‘y’ );
opts = fitoptions( ‘Method’, ‘NonlinearLeastSquares’ );
opts.Display = ‘Off’;
opts.StartPoint = [0.913375856139019 0.63235924622541];
% Fit model to data.
[fitresult, gof] = fit( xData, yData, ft, opts );
% Plot fit with data.
figure( ‘Name’, ‘Error Function Fitting’ );
h = plot( fitresult, xData, yData );
legend( h, ‘x vs Normalized Power ‘, ‘Error Function Fitting’, ‘Location’, ‘NorthEast’ );
w = fitresult.w;
x0 = fitresult.x0;
% Label axes
How to upgrade or downgrade raspberrypi’s kernel?
Lately, I got some problems with servoblaster and some other softwares because of the kernel version. That is why sometimes it is good idea to have previous kernels rather than very last one. To solve these kind of problems we can downgrade linux kernel.
For those who had problem with servoblaster on raspberrypi2, servoblaster DID work on kernel 4.0.9 ! !!
Here how we downgrade(upgrade) our kernel to a specific kernel with rpi-update.
First, install rpi-update
sudo apt-get install rpi-update
Then, go to the firmware repository of rpi: https://github.com/Hexxeh/rpi-firmware/commits/master
Find your kernel version. I will install 4.09 so here how I do:
Then get the git hash as shown in the following image:
After copying the git hash, type this in the terminal:
sudo rpi-update 46d179597370c5145c7452796acbee0f1ff93392->This is kernel 4.0.9’s git hash you should use the one that you copied.
You should get something like in the following image:
Then reboot your system.
Writing/Reading Integer 2D Arrays to/from Arduino’s Internal EEPROM – Arduinonun Harici EEPROM una Tamsayi Matris Yazip Okuma
To download EEPROMex Library, please visit http://thijs.elenbaas.net/2012/07/extended-eeprom-library-for-arduino/
Here is all the documentation. Make your own robot!
Isa Hatipoglu © WordPress Post
Arduino Uno R3
QRD1113 IR Sensors (x2)
(This writing is a summary of Barry Boehm’s “Value-Based Software Engineering” article.)
The paper written by Barry Boehm discusses “Value-Based Software Engineering” which is basically about “value”. The dictionary meaning of value is that the regard that something is held to deserve; the importance, worth, or usefulness of something. According to Boehm, in order to have a more realistic software design, division of value should be separated correctly. To give an example, earlier software designs were value-neutral, so they are used to fail due to lack of user input, incomplete requirements, changing requirements, lack of resources, unrealistic expectations, unclear objectives, and unrealistic time frames. Failures occur because the process of design is done without considering essential factors adequately.
He introduces seven key elements which form value based software engineering framework. According to this framework, the first part is shared vision, gathering all information, ideas, concerns, expectations and so on in order to have a realistic prediction for the future of the software, the part which includes first three elements. First one is “Benefits Realization Analysis” in which “Result Chain” which is to determine the initiatives and the stakeholders’ desired outcomes, and the other factors connecting these first two in order to complete the system is used. In this part, the factors are not only the software related but also related to other ingredient such as economic, time, human, and so forth. Second, “Stakeholder Value Proposition Elicitation and Reconciliation” meaning that eliminating arguments by using “Model-Clash Spiderweb” in order to reconcile. In other words, this step is the decision making with various values of different people. Third, “Business Case Analysis” which aims at creating a realistic financial plan considering return on investment across a system’s lifecycle.
The second section of the framework is “Planning and Execution” where the fourth and fifth elements are placed. The fourth element is “Continuous Risk and Opportunity Management” in which risk analysis and risk management are performed, so that eliminating uncertainties by prototypes, surveys, focal point person who watches marketplace or technology. Risk analysis and management is important because there might be rapid changes which might affect the performance of the design. The fifth element is “Concurrent System and Software Engineering” that stands for performing simultaneously product’s or service’s operational concept, requirements, architecture, lifecycle plans, and key sections of code because the changes affect these processes simultaneously. Therefore to be able to respond rapidly to changes, fifth element occurs to fix this emerging issue.
Third part of the framework is monitoring which is the sixth element: “Value Based Monitoring and Control”. Monitoring is the process of checking whether assumptions, outcomes, contributions, cost predictions are the same as the original plan. If not, a corrective action is required.
The last element, “Change as Opportunity”, is proposed by the author in order to identify and reorient the project to address unexpected risks and opportunities. According to Boehm, design should be adaptable to changes because change is the inherent character of the real world.
To sum up, Boehm introduces the value-based software engineering and shows that it has countless advantages compared to value neutral approaches because, as he says, “Better decision making is the key enabler of greater value added.” In order to make better decisions, we need to integrate the value consideration into our design process.
Isa Hatipoglu – 09/24/2014
(This writing is a summary of Barry Boehm’s “Value-Based Software Engineering” article.)
“Önce mahallede akan yağmur suyuna bırakılan kağıttan gemiler gibiydik. Sular birikti, aktı aktı derelere ulaştı. Sonra dereler gün yüzüne çıktığı yüksek yaylalardan, dağlardan kaçarak denizlere… Uzun bir süre dalgalar dövdü bizi. Uzaklara gitmek için her deneyişte o büyük heybetli dalgalar engel oldu. Ama o açıkta demirlemiş gemi hep bizi çağırdı sanki, bizi bekliyor gibiydi. Kıyıdan bakıldığında görünen heybetiyle, koskoca denize aldırmayan cesaretiyle adeta büyülüyordu bizleri. Sonra bir gün dalgaların o kadar da büyük olmadığını fark ettik. Bir cesaretle, boğulmayı göze alarak yüzmeye başladık açıktaki gemiye doğru. Karadan uzaklaştıkça açıklayamadığımız duygularla boğuşmaktan denizi, gemiyi unuttuk gitti. Atılan her kulaç o kaçmaya çalıştığımız sahili daha da güzelleştirdi. Aslında açıktaki o heybetli gemide yaklaştıkça güzelliğini yitiriyordu. Her yorgunluk hissinde arkaya bakıp o muhteşemliği görüp buna rağmen uzaklaşmaya devam etmek en büyük çelişki oldu içinden çıkamadığımız… “
People dream, but very few of them make dreams come true. Mustafa Kemal Ataturk was such person who was one of those heroes. He was born in 1881 in Salonica, which is in Greece now. His mother was a housewife, and his father was a military officer in Ottoman Army, as Ataturk would be. He grew up in a very harsh time during which Ottoman was stuck politically and economically. He shined in World War I, and these tough times challenged him, therefore he became the leader of Turkish National Movement as an excellent soldier. He was not only a great soldier but also the first President of Republic of Turkey and a revolutionary statesman.
The first reason why I admire him is that he was an intelligent soldier. Although his parents wanted him to study trade, he took the military entrance exam. As a result, he study at Salonica Military School. After graduating from Salonica Military School, he continued his education at Monastir Military High School. After he had graduated from Ottoman Military Academy, he was assigned to the fifth Army of Ottoman. To give an example, in the army, he accomplished massive goals. He started to shine because of his intelligence. Similarly, in the World War I, he succeeded to be a great commander, and made Ottoman stand against its enemies especially in Battle of Gallipoli, which was a turning point for Ataturk. On 19th of May 1919, he set a huge movement off in order to be independent, and he was successful. After that, he founded Republic Of Turkey by making people believe in an idea which claims that Turkish War of Independence would be successful. He was an excellent soldier that he guided his people to freedom.
The second reason why I admire him is that he was the first President of Turkey. The most important thing that I was influenced was Ataturk’s determination to found the Turkish Republic. To illustrate, during World War I, he arranged several meetings which let him to explain his aim which was to establish a new government instead of continuing with stucked Ottoman. First, under his leadership, the legitimate government was established on 23 April 1920. On 29 October 1923 the Republic Of Turkey was officially proclaimed. Ataturk was chosen the first President of Turkey. He was the only one person that deserved this hundred percent. If he had not founded Republic Of Turkey, my nation would not have had freedom. This is one of the most important reasons that he is my role model and I admire him.
Thirdly, I admire him because he was a revolutionary statesman. For instance, after he had been chosen as the first President, he made a lot of things which were transformed from the old style of ideas into modern ideas by him. For example, he published a lot of book to explain himself. His reforms taught the people of Turkey to be free and democratic. He is still being criticized by the citizens of Turkey in some ways especially a secular government system which provide the people who live in Turkey equality in terms of religious differences. Some examples of his reforms are new alphabet, to cease the caliphate, some educational reforms, and so on.
To sum up, at the same time, he was an intelligent soldier, the first President of Turkey and a revolutionary statesman. He affected a lot because of his determination even in the worse times. He taught me not to give up and to be aware of my potential. In spite of the fact that some people adversely criticize him, he was a great person and a real hero for me and I will always follow his way as long as I live.
08 October 2013 – Essay
Öncelikle work and travel geçmişim 4 5 yıl olmasa da bazı sorunlarla karşılaştığımız için bu yazıyı yazmayı ve programa katılmayı düşünen arkadaşlara özellikle gitmeden önce dikkat etmeleri gereken hususlar hakkında bilgi vermek istedim.
Öncelikle ilk dönem sonunda pasaportunuzu çıkartmanızda fayda var. Neden diyeceksiniz şubat 15 ten önce şirkete tüm evraklarınızı vermiş olmalısınız ki herhangi bir aksilik çıktığında (isim soruşturması ds formlarının gelmesi vize almada herhangi bir sorun gibi…) zamanınız olsun.
Ardından en önemlisi aracı şirket seçimi… Bu konu hayati önem taşıyor. Neden sorusunun cevabı da Türkiye’de bu işi iyi yapan bir şirket var… Benim tavsiyem United Towers tabi tercih sizin. Gerek ds formları gerek işler açısından en güvenilir şirket… Bu yazıyı United Towersla hiçbir alakam olmadan yazdığıma sizi temin ederim. Geçen yıl United Towers ile gitmiştim ve bu yıl farklı bir şirketle gidiyorum ve aradaki uçurumları gördüm benim yaptığım hatayı sizin de yapmanızı istemem…
Ardından gerekli evraklarınızı şirkete verdikten sonra ds formunu bekleyeceksiniz bu arada uçak biletinizi de almanızda fayda var.
Ds formunuz sevis belgeleriniz ve diğer evraklarınız hazır olduğunda en geç mart ayında vizeye gitmenizde fayda var çünkü isim taraması 2 ay bile sürebilir… Bu yüzden en geç martta gitmenizi tavsiye ederim.
Ardından vizenizi aldığınızda gerisi kolay… İyi bir yaz geçirmeniz dileğiyle.