Friday, April 30, 2010

Strain gage Amplifier


รูปบนซ้ายคือ PCB วงจรขยายสัญญาณจาก Stain Gage โดยสามารถวัดได้ถึงสองช่องโดยอาศัยวงจร bridge circuit ตรวจจับการเปลี่ยนแปลงความต้านทานภายใน เมื่อมีโหลดมากระทำจะทำให้ความต้านทานภายใน stain gage มีการเปลี่ยนแปลงดังนั้นจะทำให้ bridge circuit เกิดความไม่สมดุลย์ด้วยความสัมพันธ์ Eo/Ei=Rg2/(Rg2+R)-Rg1/(Rg1+R) และจะใช้การเปลี่ยนเปลงของแรงดันนี้นำไปขยายสัญญาณด้วย INA129 หรือ INA 2126P เมื่อขยายสัญญาณแล้วก็ใส่ LPF เพื่อกำจัดสัญญาณที่ไม่ต้องการออกไปซึ่งในที่นี้ ตัดที่ความถี่ 10Hz หลังจากนั้นก็ทำการปรับค่า DC-offset เพื่อที่จะสามารถปรับให้แรงดันเริ่มต้นอยู่ที่ศูนย์หรือที่ค่าไดก็ได้ และหลังจากนั้นก็นำสัญญาณ Vo ออกไปสู่ Digital Signal Processing เช่น DAQ or Micro controllerและนำไป ติดต่อผ่าน Rs-232


ส่วนรูปซ้ายล่างคือ Diagram ของวงจร


วีดีโอสาธิตนำไปใช้งานจริง

Friday, April 9, 2010

spectrum analysis

เมื่อเราสามารถวัดสัญญาณที่อยู่ใรูปของ waveform graph จากนั้นเราก็จะสามารถนำสัญญาณนั้นมาวิเคราะห์หา spectrum ว่าสัญญาณมีความถ๊่เท่าไหร่ถ้าในกรณีที่สัญญานเรามีหลายความถี่ที่รวมมาด้วกันการวิเคราะห์ spectrum จึงเป็นส่วนที่สำคัญมาก ขั้นตอนการนำสัญญาณมาวิเคราะห์หา spectrum มีดังนี้
1.ให้ไปที่ signal processing
2.เลือก wmf measurement
3.เลือก Spectral แล้วนำมาวางใน blog diagramดังรูป แล้วก็นำ waveform มาเชื่อมต่อเราก็สามารถวิเคราะห์สัญญาณได้แล้ว

ความสำคัญของ spectrum analysis ก็คือสมมุติสัญญาณที่เราต้องการวัดเกิดมีสัญญาณรบกวนเกิดขึ้นเราก็จำเป็นที่จะต้องกรองสัญญาณรบกวนออกไปแต่ถ้าเราไม่รู้ว่าสัญญาณรบกวนมีความถี่เท่าไหร่เราก็ไม่สามารถออกแบบfilterได้ว่าให้มัน cut-off ถี่ความถี่เท่าได ดังนั้นเมื่อเรานำสัญญาณมาหา spemturm เราก็จะรู้ได้แล้วว่าสัญญาณเหล่านั้นมีความถี่เท่าไหร่บ้าง นี้เป็นเพียงตัวอย่างหนึ่งในความสำคัญของ spectrum

Monday, April 5, 2010

การควบคุมแบบป้อนกลับ(Feedback Control)

การควบคุมแบบป้อนกลับ(Feedback Control)สามารถจำแนกได้เป็นสองส่วนหลัก คือ การควบคุมแบบเก่า และการควบแบบใหม่ การควบคุมแบบเก่าก็เช่นการใช้ pid control โดยเริ่มจากการหาแบบจำลองทางคณิตศาสตร์ที่อยู่ในรูปของสมการเชิงอนุพันธ์แล้วจากนั้นก็ทำการแปลงจากโดเมนเวลาไปสู่โดเมนความถี่แล้วเขียนเป็น block diagram ซึ่งปรกติแล้วการควบคุมแบบนี้จะสามารถควบคุมได้แบบ SISO ส่วนการวิเคราะห์ระบบจะใช้ root rocut มาวิเคราะห์เสถีรภาพของของระบบและออกแบบหาค่าเกนของตัวควบคุม ส่วนการควบคุแบบใหม่ก็หาแบบจำทางคณิตศาสตร์เช่นเดียวกันแต่ไม่ต้องแปลงจากโดเมนเวลามาเป็นโดเมนความถี่ และจะใช้วิธีที่เรียกว่า state space จากนั้นก็หากฎการควบคุมเช่น pole placement หรือ LQR,LQG เพื่อหาค่าเกนของตัวควบคุมการใช้การควบแบบใหม่จะมีตัวแปลที่เพิ่มขึ้นมาเช่นระบบที่เป็นอันดับสองเมื่อทำ state space แล้วระบบจะมีสองตัวแปร x1,x2 ดังนั้นเราต้องวัดมาทั้งสอง state นั้นหมายความว่าเราต้องมีเซนเซอร์สองตัว(นี้คือ full state feedback ) แต่ยังมีเครื่องมืออย่างหนึ่งที่ช่วยให้ไม่ต้องวัด state มาทั้งสองตัว นั้นก็คือ state estimator เช่น Kalman filter โดยจะทำการประมาณ state โดยต้องการแค่แบบจำลองทางคณิตศาสตร์และ state ที่เราสามารถวัดได้เท่านั้นเราก็ได้ state ที่เหลือโดยไม่จำเป็นต้องมีเซนเซอร์ถึงสองตัว แต่เราต้องเช็คก่อนว่าระบบมันสามารถสังเกตได้หรือไม่ คราวหน้าจะมาคุยกันว่าจะใช้ stste estimator อย่างไร


Saturday, April 3, 2010

System identification


System identification เป็นวิธีการหนึ่งที่ใช้สำหรับหาแบบจำลองทางคณิตศาสตร์ของระบบ Plant ซึ่งเป็นวิธีง่ายกว่าใช้กฎทางฟิสิกส์ทั่วไปเช่น Newton law หรือ Lagrange method เนื่องจากการใช้วิธี newton law เราจะต้องมีความรู้ทางด้าน Mechanic พอสมควรเราจะต้องสามารถเขียน FBD เป็นแล้วจึงสามารถหา plantได้ ส่วนวิธี Lagrange นั้นเราต้องมีความรู้เกี่ยวกับพลังงานในระดับหนึ่งเพราะวิธีการนี้จะมองระบบอยู่ในรูปของพลังงาน ซึ่งมี ทั้งพลังงานงานจลน์ และพลังงานศักย์ ยิ่งถ้าระบบที่มีความซับซ้อนมากๆแล้วทั้งสองวิธีที่กล่าวมาข้างต้นนั้นอาจจะไม่สามารถใช้งานได้เลย บทความนี้จะพูดถึึงวิธีการหาแบบจำลองทางคณิตศาสตร์ วิธีการก็คือ


ต้องการข้อมูลของ Input และ output ตัวอย่างเช่นเราต้องการหาแบบจำลองทางคณิตศาสตร์ของมอเตอร์ inputของระบบก็คือแรงดันไฟฟ้าที่ป้อนให้มอเตอร์ ส่วนสัญญาณ output ก็อาจจะเป็นมุม หรือความเร็วเชิงมุมก็ได้ ถ้ามองที่ความเร็วเชิงมุมเราจะได้แบบจำลองเป็นสมการเชิงอนุพันธ์อันดับหนึ่ง ถ้ามอง output เป็นมุม เราก็จะได้แบบจำลองที่มีสมการเชิงอนุพันธ์อันดับสอง จากนั้นก็นำข้อมูล import เข้ามาที่โปรแกรม matlab แล้วใช้คำสั่ง ident แล้วก็สามารถเลือกได้ว่าต้องการให้แบบจำลองเราเป็นสมการเชิงอนุพันธ์อันดับเท่าใดก็ได้ เมื่อเราได้สมการเชิงอนุพันธ์แล้วเราก็ Laplace Transform เราก็จะได้ Transfer function เราก็สามารถนำไปออกแบบหาเกนต่อไปได้

Tuesday, March 30, 2010

Labview Application building

ข้อดีของการทำ Labview Application คือผู้ที่นำโปรแกรมเราไปใช้งานจะไม่สามารถเห็น Code ของเราว่าเขียนอะไรลงไปบ้าง และสามารถนำไปใช้งานได้อย่างสะดวกเหมือนโปรแกรมที่เราใช้งานทั่วๆไป เช่น data logger ที่มีขายทั่วไป ซึ่งขั้นแรกจะต้องลง driver ก่อน จากนั้นก็คือทำการ Install Program ก่อนแล้วจึงจะสามารถใช้งานโปรแกรมได้ ใน บทความนี้เราจะมาพูดถึงวิธีการทำ Labview Application กัน เมื่อเราเขียนโปรแกรมที่เป็น file.vi แล้วให้เราสร้าง labview project ขึ้นมาจากนั้นก็นำเอา file.viที่สร้างมาก่อนหน้านี้ เข้ามาใน labview project ที่หน้าต่างของ labview project ให้คลิกขวาที่ Build Specfications แล้วไปที่new>>Application(exe) แล้วจะได้หน้าต่างขึ้นไหม่ ขั้นต่อมาเราจะมาปรับแต่งเล็กน้อยโดยให้ไปที่ Source file settings ดูที่มุมขวาแล้วเลือก startup VI

จากนั้นให้ไปที่ advanced แล้วคลิกช่องสี่เหลี่ยมที่ว่างช่องที่สองและสาม ในช่องที่สองจะมีช่องที่เขียนว่า Wait for debugger on launchให้ เลือกด้วย เพื่อที่จะให้โปรแกรมทำงานก็ต่อเมื่อกดปุ่ม run 

เพราะถ้าไม่คลิกช่องนี้ถ้าเราเปิดโปรแกรมมามันจะ run อัตโนมัติ จากนั้นก็คลิก build เลยที่มุมด้านขวาล่างเป็นอันเรียบร้อย







Monday, March 29, 2010

Asimo - The Engineering of the Humanoid Robot

By Benedict Yossarian

Asimo (Advanced Step in Innovative Mobility) is a two-legged humanoid robot that stands at 130 centimeters and weighs 54 kilograms. Asimo resembles an astronaut who wears a backpack. He can walk or run at speeds up to 4.3 mph on its two feet.
This humanoid robot was created by the engineers of Honda Motors, a company that is known as a producer of cars and power supplies. They began developing helper robots in 1986. Their vision is to create a robot that can easily move around or inside the house, and that means they have to perfect the walking technology of their project. Honda engineers started their first attempt with the use of boxes with legs. After the walking mechanism has been developed, they had added the head, arms and hands.
After all the hard work, Honda engineers developed a new technology that created a walking robot, and named it Asimo. Asimo is using a PowerPC that controls all the 26 joints. He can be controlled using a workstation or via remote control. He is powered by small but powerful servo motors that have a rotating shaft which can move the limbs or surfaces to an angle as commanded by the use of a controller. In addition, Honda engineers had created a 3D CPU that will give Asimo more computing power.

Asimo has many features that enables him to interact better with the people, here are some of them:
(a) Asimo can recognize moving objects- with the use of visual data captured by his camera that is attached to his head, he can recognize the movements of an object, the direction were it going and the distance it travels. Other applications that are included in this feature is the ability to follow a person, follow his/her movements or greet them when he or she approaches him.
(b) Asimo can recognize gestures and postures - because Asimo can interpret the movement and position of the human hand, Asimo can react accordingly to the natural movements of people. An example of this is when a person offers a handshake or give a wave, he will then respond to them by accepting the handshake or wave back to them. In addition to that, he can also recognize given directions like pointing to a specific place.
(c) Asimo can also recognize its environment and act in a safe way for him and to humans. An example of this is that he can recognize potential hazards like stairs and avoid humans being hit or bump by him.
(d) Asimo can distinguish sounds - he can distinguish voices and other sounds and identify the source of it. He can identify the person that is talking and responds to the persons name and face. Also, he can respond to different questions as he can either nod for yes or shake his head for no and can even speak out with a verbal answer.
As of year 2007, there are already 46 Asimo units being assembled by Honda engineers. Each of these units is available to for hire for $166,000 a year and cost less than $1,000,000 to manufacture.
Emics is a UKAS accredited laboratory specialising in Calibration [http://www.emics.co.uk/] and Inspection services.

Article Source: http://EzineArticles.com/?expert=Benedict_Yossarian

http://EzineArticles.com/?Asimo---The-Engineering-of-the-Humanoid-Robot&id=1508116

Mini fuel cell powering a robot fish

 Robots of all kinds fascinate us, regardless of how big or how small they are. Now it seems that some of the brains at the Faculty of Engineering at Osaka City University have come up with a robotic fish that can swim around the tank powered by just a solid-polymer fuel cell, dubbed the “Power Tube”. The 10cm long robotic fish can swim, as well as dive and rise, owing to a joint at the front end of the fish. Initially the idea was to use a motor to get this little fish alive and kicking (swimming), but when they found out that the power consumption was about 1W, they switched to a magnet system that reduced the number to just 10mW. It seems that they’re planning to eventually develop a robotic fish that can swim for three consecutive days on a single charge. Maybe someday we’ll see such cool little fishes being mass produced and sold at your local toy store, eh? Video of this robotic fish in action is available after the jump.

                                                     


VDO:Reference By...

Sunday, March 28, 2010

Waveform Graph building

ในบางกรณีข้อมูลที่เราอ่านมาจะเป็นแบบหนึ่งค่า(point)ต่อรอบการทำงานของ while loop/For loop หรือเป็นข้อมูลชนิด double ซึ่งการรับข้อมูลแบบนี้เราจะไม่สามารถนำไป plotใน waveform graph ได้ และหรือ ไม่สามารถนำไปวิเคราะห์เกี่ยวกับสัญญาณได้ เช่นการวิเคราะห์ spectrum เนื่องจากข้อมูลที่วัดมาได้นั้นยังไม่ได้นำเวลามาเกี่ยวข้องเลย(dt) ดังนั้นในหัวข้อนี้จะผูดถึงการสร้าง waveform graph โดยจะอาศัย feed black node หรืออาจจะใช้ shift register ก็ได้ซึ่งใช้งานได้เหมือนกันเราจะใช้ feed black node เก็บข้อมูลให้อยู่ในรูปของ array ก่อนและหลังจากนั้นก็สร้างเป็น waveform graph ในภายหลังเพียงเท่านี้เราก็สามารถนำข้อมูลไปวิเคราะห์หรือไป save เก็บไว้ใน PC ได้อย่างง่ายและสะดวก                                                   




Saturday, March 27, 2010

การใช้ Property Node ของ Program labview

การใช้ Porperty Node
ในบางครั้งเราต้องการที่จะเปลี่ยนแปลงคุณสมบัติต่างๆของกราฟ แต่ก็ไม่รู้ว่าจะไปปรับแต่งที่ไหนในหัวข้อนี้เราจะกล่าวถึงเรื่องนี้กัน ก่อนอื่นหลังจากเปิดโปรแกรมขึ้นมาสมมุติเราต้องการปรับเปลี่ยนผลการแสดงแกนในแนวแกนx ของกราฟ ให้เราคลิกขวาที่กราฟ (ในbock diagram)ไปที่ create-->Proper node-->y-scal-->Rank-->Maximumเราก็จะได้กล่องสี่เหลี่มขึ้นมา จากนั้นให้คลิกขวาที่กล่องนั้นแล้วเลือกไปที่ Chang to Readจากนั้นเราก็สามารถที่จะกำหนดค่าการแสดงผลตามที่เราต้องการโดยอาจจะใช้ปุ่ม Knob มาเป็นตัวควบคุมก็ได้ เพียงเท่านี้เราก็สามารถนำไปประยุกต์ใช้งานต่างๆอีกมากมาย การสร้าง Osilloscope


ขั้นตอนการเลือก Property Node





Block Diagram


Front Panel

Friday, March 26, 2010

การควบคุมแบบปรับตัว ( adaptive control)

เนื่องจากในระบบควบคุมในโรงงานอุตสาหกรรมโดยส่วนมากแล้วจะใช้ controller pid มาทำการควบคุมซึ่งมันก็ทำงานได้ดีในช่วงที่เรา Liberalization รอบๆจุดทำงานแต่เมื่อใดก็ตามถ้าจุดทำงานของเราเริ่มมีการเปลี่ยนแปลงหรือว่า Parameter บางตัวมีการเปี่ยนแปลงเช่น มวลของระบบ,ความยาว และอื่นๆหรืออาจมีparameter ที่เราไม่ได้นำมาคิด (Uncertainty) มันจะทำให้controller ที่เราออกแบบไว้เริ่มทำงานไม่ได้หรือไม่สามารถทำงานได้เลยดังนั้น Adaptive control จึงเป็นอีกทางเลือกหนึ่งที่นำมาใชแก้ปัญหานี้

จุดสำคัญหลักๆของการควบคุมแบบ adaptive controlคือมันสามารถปรับ gain ของตัวเองได้ถ้าเมื่อระบบมีการเปลี่ยนแปลง parameter ดังนั้นค่า gain จะเปลี่ยนแปลงไปตามความเหมาะสม เนื่องจากมันจะนำเอาค่าความผิดผลาดที่ไดจาก plant จริงมาเปรียบเทียบกับ model ที่เราออกแบบเมื่อไดที่มีค่าความผิดพลาดเกินขึ้นค่า gain จะมีการปรับตัวโดยอัตโนมัติโดยที่จะเอาข้อมูลที่เก็บไว้ในอดีต(i-1) y(r),u(r) โดยที่ r น้อยกว่า t เมื่อ t คือเวลาปัจุบัน มาทำการประมวลผล