Thursday, March 27, 2008
C++ Rant
A rant about C++:
"...the solution is _not_ to design everything on paper first, then implement, although this is the way that C++ would actually have worked out well -- if it were _possible_ to design like that in our world. all experience has taught us that solving a complex problem uncovers hidden assumptions and ever more knowledge, trade-offs that we didn't anticipate but which can make the difference between meeting a deadline and going into research mode for a year, etc."
Wednesday, March 26, 2008
Basic Control Theory and Examples
If you want to have a basic understanding of control methods visit Control Tutorials for Matlab and Simulink. Since the examples are in Matlab and Simulink, it is easy to see the results of control decisions.
A nice linearization example: First Order System: Linearizing System Equation
Good system identification example: First Order System: System Identification
Kudos to Michigan Engineering College for sharing knowledge.
A nice linearization example: First Order System: Linearizing System Equation
Good system identification example: First Order System: System Identification
Kudos to Michigan Engineering College for sharing knowledge.
Saturday, March 22, 2008
A rocket to nowhere
Criticism of the space shuttle design and manned spaceflight A Rocket to nowhere:
"In essence, each 'pure science' Shuttle science mission consists of several dozen automated experiments alongside an enormous, irrelevant, repeated experiment in keeping a group of primates alive and healthy outside the atmosphere."
"While half the NASA budget gets eaten by the manned space program, the other half is quietly spent on true aerospace work and a variety of robotic probes of immense scientific value."
"...ineffectual projects can be sustained indefinitely if cancelling them is sufficiently awkward."
"...no one has pointed out the inherent contradiction in requiring that a program justified on irrational grounds be run in a rational manner."
"In essence, each 'pure science' Shuttle science mission consists of several dozen automated experiments alongside an enormous, irrelevant, repeated experiment in keeping a group of primates alive and healthy outside the atmosphere."
"While half the NASA budget gets eaten by the manned space program, the other half is quietly spent on true aerospace work and a variety of robotic probes of immense scientific value."
"...ineffectual projects can be sustained indefinitely if cancelling them is sufficiently awkward."
"...no one has pointed out the inherent contradiction in requiring that a program justified on irrational grounds be run in a rational manner."
Merkezkaç Kuvveti
Dün eşimin kardeşinin fizikte kavramsal hatalar konulu sunumunu izlerken merkezkaç kuvvetini tartıştık (Bu durum çevremdeki mühendis arkadaşları hasetinden çatlatacaktır; kaçı eşi ile fizikteki kavramsal hatalar konulu bir sohbeti 3 saniyeden fazla sürdürebilir :P). Okullarımızda ve dershanelerde yaygın olarak kullanılmaktaydı merkezkaç kuvveti. Yine tipik bir yanlış yoldan doğru çözümü bulma yöntemi ile karşı karşıyaydık. Eğitim sistemimiz gidiş yolu ile değil sadece cevabın doğruluğu ile ilgilendiği için merkezkaç kuvveti gibi mistik icatlar hayat bulabiliyor kitaplarda ve derslerde.
Eh, madem sistem anlatmıyor, biz anlatalım bari. Merkezkaç kuvveti kullanılarak çözülen tipik bir soruyu ele alalım:

Merkezkaç kuvveti ile çözüm: Cisim tepe noktasındayken üzerine m*g ve ipteki gerilim kuvveti olan T etki eder. Sadece bu kuvvetler etki ederse kuvvetlerin toplamı sıfır olmadığından F = m*a gereği aşağı doğru ivme (a) oluşur cisim aşağı düşer. Cisim aşağı düşmediğine göre kuvvetlerin toplamı sıfır olmalıdır. Bunu sağlayan da merkezkaç kuvvetidir (Fm) ve dengeyi sağlayacak şekilde etki etmektedir:
Merkezkaç kuvvetinin değeri m*V^2/r'dir (ezbere bilinmesi gerekiyor, türetmek mümkün değil). Şimdi kuvvet dengesini yazarsak:
Doğru cevabı bulduğumuza göre dünyevi işlerimize dönebiliriz...
Buradaki hata cismi duruyor kabul etmektir. Duran bir cisimde kuvvet dengesi bozulursa cisim aşağı düşecektir, düşmediğine göre merkezkaç kuvveti vardır. Bu düşünce şekli fizikten çok meta-fiziktir. İlkel zamanlarda insanlar tabiatta olan biteni anlamadıklarında en fantastik açıklamalara itibar edebilmişlerdir (ne yazık ki günümüzde de bu durum utanç verici boyutlarda devam etmektedir, ama o ayrı bir bloğa kalsın).
Şimdi işin doğrusunu görelim. Evet, cisim tepe noktasındayken kuvvetlerin toplamı sıfır değil, mg + T'dir. Hareket kanunları gereği F = mg + T= m*a olduğundan cisim ivmelenecektir. Sabit hızlı dairesel hareket için ivme merkeze doğrudur ve değeri a = V^2/r'dir (hatırlamadığında türetmek kolaydır). Hareket denklemini o zaman şöyle yazabiliriz: mg + T = m*a = m*V^2/r. Buradan da T = m(V^2/r - g) bulunur.
Peki ama cisim niye direkt aşağı düşmüyor? Soruda hızın değerinin değişmediği verilmiş. Hız bir vektör olduğundan ortamda ivme varken hızın değeri değişmiyorsa yönü değişecektir. Tepe noktasından 45 derece sonraki durumu ele alalım:

Görüldüğü gibi dairesel harekette hız vektörü aşağı doğru bükülmekte, hız vektöründe dV kadar bir değişim meydana gelmektedir. Bükülmenin nedeni merkeze doğru etki eden ivmedir. Eğer ivme sıfır olsaydı cisim dairesel hareket yapamazdı, çünkü o zaman hızın değeri değişmediği gibi yönü de değişmezdi ve düz bir çizgi üzerinde devam ederdi:

Merkezkaç kuvvetinin uydurulmuş olmasının nedeni bence hızın bir vektör olduğunun algılanmamasıdır. Sanki sadece değeri varmış, yönü yokmuş gibi bir düşünce ile dairesel hareket sorusunu çözmenin tek yolu mistik kuvvetler icat etmektir.
Peki bu icat doğru cevabı buluyorsa niye kullanmayalım? Çünkü birincisi F = ma dışında yeni bir kural daha öğrenmek gerekiyor, üstelik de bu kural başka kurallarla çelişiyor (işkembeden kuvvet uydurulamaz kuralı) ve sadece belirli durumlarda işe yarıyor. Oysa F = ma tüm hareket problemlerini çözmek için gerekli tek kuraldır (o kadar da iddalıyım yani). Hem her durum için ayrı kurallar öğren, hem çelişkiler yumağı içinde yolunu bulmaya çalış... İnsanları fizikten tiksindirmenin daha emin bir yolu olamaz herhalde.
Soru üzerinde düşünürken aynı denklemle bir cismin dünya çevresinde dairesel bir yörüngede durması için sahip olması gereken hızı hesaplayabileceğimizi farkettik. Ortada herhangi bir ip olmayacağından T=0, F = mg, a = V^2/r olur. r cismin dünya merkezinden uzaklığıdır. O zaman F = m*a'dan m*g = m*V^2/r --> V = karekök(g*r) olur.

Örneğin yerden 400 km yükseklikteki yörüngeye bir uydu yerleştirmek istiyorsak uyduyu ulaştırmamız gereken hız = karekök(9.81 * (6400 + 400)) = 8.2 km/saniye (tabanca mermisi hızının 8 katı!). 6400 km = Dünyanın yarıçapı. Uzay roketlerinin o kadar büyük olmasının nedeni bu devasa yörünge hız gereksinimidir.
Güncelleme, 4 Mayıs 2014: Yerçekimini sabit kabul ettik. Biraz daha hassas hesap için Dünya yarıçapına bağlı formülü kullanmalı: g(400km) = 9.81*(6400)^2/(6400+400)^2 = 8.7 m/s^2
İşte fiziğin/matematiğin güzelliği de burada. Basit bir sarkaç için geçerli olan kuralla dünya çevresine uydu yerleştirmek için kullanacağınız kural aynı prensiplere dayanmaktadır. Bunları farkettiğinde başı dönen, gözleri yaşaran fizik-şinas nesillere kavuşmak dileği ile, esen kalınız...
Bu yazı için ilham veren eşime ve kardeşine teşekkür ederim :)
mp3: Britney Spears - Everytime
Eh, madem sistem anlatmıyor, biz anlatalım bari. Merkezkaç kuvveti kullanılarak çözülen tipik bir soruyu ele alalım:
Merkezkaç kuvveti ile çözüm: Cisim tepe noktasındayken üzerine m*g ve ipteki gerilim kuvveti olan T etki eder. Sadece bu kuvvetler etki ederse kuvvetlerin toplamı sıfır olmadığından F = m*a gereği aşağı doğru ivme (a) oluşur cisim aşağı düşer. Cisim aşağı düşmediğine göre kuvvetlerin toplamı sıfır olmalıdır. Bunu sağlayan da merkezkaç kuvvetidir (Fm) ve dengeyi sağlayacak şekilde etki etmektedir:
Merkezkaç kuvvetinin değeri m*V^2/r'dir (ezbere bilinmesi gerekiyor, türetmek mümkün değil). Şimdi kuvvet dengesini yazarsak:
Fm = m*V^2/r = m*g + T --> T = m(V^2/r - g) olur.
Doğru cevabı bulduğumuza göre dünyevi işlerimize dönebiliriz...
Buradaki hata cismi duruyor kabul etmektir. Duran bir cisimde kuvvet dengesi bozulursa cisim aşağı düşecektir, düşmediğine göre merkezkaç kuvveti vardır. Bu düşünce şekli fizikten çok meta-fiziktir. İlkel zamanlarda insanlar tabiatta olan biteni anlamadıklarında en fantastik açıklamalara itibar edebilmişlerdir (ne yazık ki günümüzde de bu durum utanç verici boyutlarda devam etmektedir, ama o ayrı bir bloğa kalsın).
Şimdi işin doğrusunu görelim. Evet, cisim tepe noktasındayken kuvvetlerin toplamı sıfır değil, mg + T'dir. Hareket kanunları gereği F = mg + T= m*a olduğundan cisim ivmelenecektir. Sabit hızlı dairesel hareket için ivme merkeze doğrudur ve değeri a = V^2/r'dir (hatırlamadığında türetmek kolaydır). Hareket denklemini o zaman şöyle yazabiliriz: mg + T = m*a = m*V^2/r. Buradan da T = m(V^2/r - g) bulunur.
Peki ama cisim niye direkt aşağı düşmüyor? Soruda hızın değerinin değişmediği verilmiş. Hız bir vektör olduğundan ortamda ivme varken hızın değeri değişmiyorsa yönü değişecektir. Tepe noktasından 45 derece sonraki durumu ele alalım:
Görüldüğü gibi dairesel harekette hız vektörü aşağı doğru bükülmekte, hız vektöründe dV kadar bir değişim meydana gelmektedir. Bükülmenin nedeni merkeze doğru etki eden ivmedir. Eğer ivme sıfır olsaydı cisim dairesel hareket yapamazdı, çünkü o zaman hızın değeri değişmediği gibi yönü de değişmezdi ve düz bir çizgi üzerinde devam ederdi:
Merkezkaç kuvvetinin uydurulmuş olmasının nedeni bence hızın bir vektör olduğunun algılanmamasıdır. Sanki sadece değeri varmış, yönü yokmuş gibi bir düşünce ile dairesel hareket sorusunu çözmenin tek yolu mistik kuvvetler icat etmektir.
Peki bu icat doğru cevabı buluyorsa niye kullanmayalım? Çünkü birincisi F = ma dışında yeni bir kural daha öğrenmek gerekiyor, üstelik de bu kural başka kurallarla çelişiyor (işkembeden kuvvet uydurulamaz kuralı) ve sadece belirli durumlarda işe yarıyor. Oysa F = ma tüm hareket problemlerini çözmek için gerekli tek kuraldır (o kadar da iddalıyım yani). Hem her durum için ayrı kurallar öğren, hem çelişkiler yumağı içinde yolunu bulmaya çalış... İnsanları fizikten tiksindirmenin daha emin bir yolu olamaz herhalde.
Soru üzerinde düşünürken aynı denklemle bir cismin dünya çevresinde dairesel bir yörüngede durması için sahip olması gereken hızı hesaplayabileceğimizi farkettik. Ortada herhangi bir ip olmayacağından T=0, F = mg, a = V^2/r olur. r cismin dünya merkezinden uzaklığıdır. O zaman F = m*a'dan m*g = m*V^2/r --> V = karekök(g*r) olur.
Örneğin yerden 400 km yükseklikteki yörüngeye bir uydu yerleştirmek istiyorsak uyduyu ulaştırmamız gereken hız = karekök(9.81 * (6400 + 400)) = 8.2 km/saniye (tabanca mermisi hızının 8 katı!). 6400 km = Dünyanın yarıçapı. Uzay roketlerinin o kadar büyük olmasının nedeni bu devasa yörünge hız gereksinimidir.
Güncelleme, 4 Mayıs 2014: Yerçekimini sabit kabul ettik. Biraz daha hassas hesap için Dünya yarıçapına bağlı formülü kullanmalı: g(400km) = 9.81*(6400)^2/(6400+400)^2 = 8.7 m/s^2
İşte fiziğin/matematiğin güzelliği de burada. Basit bir sarkaç için geçerli olan kuralla dünya çevresine uydu yerleştirmek için kullanacağınız kural aynı prensiplere dayanmaktadır. Bunları farkettiğinde başı dönen, gözleri yaşaran fizik-şinas nesillere kavuşmak dileği ile, esen kalınız...
Bu yazı için ilham veren eşime ve kardeşine teşekkür ederim :)
mp3: Britney Spears - Everytime
Friday, March 21, 2008
You weren't meant to have a boss
You weren't meant to have a boss:
"Tribes of hunter-gatherers have more freedom. The leaders have a little more power than other members of the tribe, but they don't generally tell them what to do and when the way a boss can."
"If people have to choose between something that's cheap, heavily marketed, and appealing in the short term, and something that's expensive, obscure, and appealing in the long term, which do you think most will choose?"
"In an artificial world, only extremists live naturally."
"If you're not allowed to implement new ideas, you stop having them. And vice versa: when you can do whatever you want, you have more ideas about what to do."
"Mediocre hires hurt you twice: they get less done, but they also make you big, because you need more of them to solve a given problem."
"Tribes of hunter-gatherers have more freedom. The leaders have a little more power than other members of the tribe, but they don't generally tell them what to do and when the way a boss can."
"If people have to choose between something that's cheap, heavily marketed, and appealing in the short term, and something that's expensive, obscure, and appealing in the long term, which do you think most will choose?"
"In an artificial world, only extremists live naturally."
"If you're not allowed to implement new ideas, you stop having them. And vice versa: when you can do whatever you want, you have more ideas about what to do."
"Mediocre hires hurt you twice: they get less done, but they also make you big, because you need more of them to solve a given problem."
Thursday, March 20, 2008
Scientific American
I had the opportunity to read some Scientific American magazines. I liked what I saw and put its link to my link list on the right. Here is an example, The (Other) Secret:
"A pantheon of shiny, happy people assures viewers that The Secret is grounded in science: "It has been proven scientifically that a positive thought is hundreds of times more powerful than a negative thought." No, it hasn't."
Skeptic:
"Our mission is to serve as an educational tool for those seeking clarification and viewpoints on ... controversial ideas and claims"
Insight Cruises:
"Take your mind on a vacation! InSight Cruises is everything you’re looking for from an educational experience: stimulating seminars by the top names in the field as well as relaxation, adventure, and family time."
"A pantheon of shiny, happy people assures viewers that The Secret is grounded in science: "It has been proven scientifically that a positive thought is hundreds of times more powerful than a negative thought." No, it hasn't."
Skeptic:
"Our mission is to serve as an educational tool for those seeking clarification and viewpoints on ... controversial ideas and claims"
Insight Cruises:
"Take your mind on a vacation! InSight Cruises is everything you’re looking for from an educational experience: stimulating seminars by the top names in the field as well as relaxation, adventure, and family time."
Wednesday, March 19, 2008
On compatibility
Read Joel's Martian Headsets to understand problems of standards and compatibility.
Raymond Chen:
"You bought programs X, Y and Z. You then upgraded to Windows XP. Your computer now crashes randomly, and program Z doesn't work at all. You're going to tell your friends, "Don't upgrade to Windows XP. It crashes randomly, and it's not compatible with program Z." Are you going to debug your system to determine that program X is causing the crashes, and that program Z doesn't work because it is using undocumented window messags? Of course not. You're going to return the Windows XP box for a refund. (You bought programs X, Y, and Z some months ago. The 30-day return policy no longer applies to them. The only thing you can return is Windows XP.)"
Exercise: Replace "XP" above by "Vista" to understand the present anti-Vista climate.
Bonus:
David Ogilvy:
"If each of us hires people who are smaller than we are, we shall become a company of dwarfs. But if each of us hires people who are bigger than we are, we shall become a company of giants."
Isaac Newton:
"If I have seen further it is by standing on the shoulders of Giants."
"I do not know what I may appear to the world, but to myself I seem to have been only like a boy playing on the sea-shore, and diverting myself in now and then finding a smoother pebble or a prettier shell than ordinary, whilst the great ocean of truth lay all undiscovered before me."
Raymond Chen:
"You bought programs X, Y and Z. You then upgraded to Windows XP. Your computer now crashes randomly, and program Z doesn't work at all. You're going to tell your friends, "Don't upgrade to Windows XP. It crashes randomly, and it's not compatible with program Z." Are you going to debug your system to determine that program X is causing the crashes, and that program Z doesn't work because it is using undocumented window messags? Of course not. You're going to return the Windows XP box for a refund. (You bought programs X, Y, and Z some months ago. The 30-day return policy no longer applies to them. The only thing you can return is Windows XP.)"
Exercise: Replace "XP" above by "Vista" to understand the present anti-Vista climate.
Bonus:
David Ogilvy:
"If each of us hires people who are smaller than we are, we shall become a company of dwarfs. But if each of us hires people who are bigger than we are, we shall become a company of giants."
Isaac Newton:
"If I have seen further it is by standing on the shoulders of Giants."
"I do not know what I may appear to the world, but to myself I seem to have been only like a boy playing on the sea-shore, and diverting myself in now and then finding a smoother pebble or a prettier shell than ordinary, whilst the great ocean of truth lay all undiscovered before me."
Subscribe to:
Posts (Atom)
