Tuesday, 17 October 2017

How to gather energy for the long 'run' ahead!

Gosh! I don't know what I was thinking when I quit sports (or perhaps, any other physical activities). It was all so stressed out for the past 2 months! Thinking that saving that 1-hour training can help you concentrate on coursework, is I must say it aloud, Absurd!

I knew I had to start back, but honestly there is no time for sports activities to follow, but certainly, there is time for physical training. So, I did that last Saturday. I fired up my laptop for TU Delft sports center and without further ado, I had to get my sports card. Still uncertain of my association duration, I registered for one month to start with. 19 Euro well spent.

Today, we had the running activity. Though I have been in a habit of long distance runs but its always good to learn some good techniques to boost the stamina. Plus, these trainers are really qualified guys! His name was Jos and we were joined by 5 other. I remember Adi and Jolien. It was a great run and indeed I have lost a good deal of stamina in the past few months, which I intend to get back.

There were many exercises of stretching, that you can easily substitute for any stretching exercise you know. I did learn a few good techniques for training long runs though.

1. Always start by walking. A medium paced walk which should gain more pace in 3-4 minutes. At this point, start to walk fast (just your casual fast walk, not the intense fast walk). Use shoulders and arms in synchronization. Keep going like this for 1-2km (just about time, you start feeling warm in the legs). Relax now and get back to your normal walk.

2. Dribble - Light jogging with arms and shoulders in sync.

3. Sprint Ahead: We used to dribble ahead in a row each 5 meters apart from the other. At this point, the last one sprints ahead to the front (rest continue to dribble). Again the new one at the last makes the sprint and this way each one gets a chance to sprint ahead. A good training for energy. Feel free to do it for 4-5 mins (depending on your stamina).

4. Interval Training - We set a stopwatch for one minute. We fast dribble (for 1 minute) and relax (normal walk) for the next one minute. This is repeated at least 10 times (more if you can, just don't overdo this)

By simply doing interval training, one can easily build up a great amount of stamina in 1-2 weeks. This should be done every day. Try to go 5+ km and push your limits. In no time you'll be confident to go for 20 km. The trick here is - relax during runs but not too much (keep your heat on).

Saturday, 14 October 2017

Lets talk about computing in Sounding Rockets?

The idea of rockets was conceived well before the idea of flight. It was well before even Sir Issac Newton gave his laws of motion. Interestingly, it is his third law of motion that governs the flight of a rocket [1].
For every action, there is an equal and opposite reaction.
The earliest mention of the rocket was in 400BC in a Greek story, where a character Archytas uses a wooden pigeon suspended by wires and propelled by steam to amaze and mystify the Tarentum locals [2]. This is related to the history of rockets for the simple fact that it is the earliest known mention of a man using Newton’s Third Law of action and reaction as a means of propulsion.

The actual gun powered rocket that we know of today was developed first in China back in the 13th century [1]. But is that possible? There were no computers back then!

With time, the idea of rocketry and rocket applications has undergone tremendous changes. First developed as a firework show and then for warfare. Today's rockets find applications in atmospheric research, space applications, payload/satellite launch, and would someday in transportation. A systems overview of Falcon 9 rocket will surely give you a good idea on the interdependencies of a rocket avionics systems. But, here we won't discuss too much on the rockets for space launch. We'll start with something simpler, a Sounding Rocket.

It may be a simpler in design, but sounding rockets are extremely complicated to build, difficult to use and (often) risky to handle. According to definition by Indian Space Research Organisation (ISRO),"Sounding Rockets are one or two-stage solid propellant rockets used for probing the upper atmospheric regions and for space research." There are different altitude ranges for developing sounding rockets. The simplest cover the range from 1 to 10km. More complicated ones go beyond, up till 20-30km. The sounding rockets developed by commercial space/rocket companies go beyond 500km (in space) [3].

How do we determine the altitude to aim for, you ask? It depends on the application. If its atmospheric research, we aim for altitudes below the 'Karman line'. So, an altitude of 50-80 km is apt. If it is space research, we go beyond 100km. For a comparison, you can imagine that the International Space Station revolves around the early at 408km altitude; and the space shuttle missions orbital altitudes were in the range of 304 kilometers to 528 kilometers [4]. That's the region you can experience microgravity.

A sounding rocket is launched by 'ignition' of the Rocket engine (or motor) which is often done through an e-match. But once a rocket is launched, how do we use it, operate it and possibly, guide it? It is the sole responsibility of the onboard electronics system, sensing systems, telemetry systems, control system, payload deployment and recovery systems to check the state of rockets and take the necessary decisions, without a human supervision.
(An example of sounding rocket) [5]

Stratos-I by DARE

Let's go through the basic operation of a rocket:
1. Rocket Launch - a manually driven electronic system for igniting the rocket engine. Often this system is made with an engine valve control (as the Flight Termination System). A rocket launch can be dangerous and all necessary steps must be taken before any launch parameters considered. An inbuilt system check mechanism is made that checks for connectivity and proper functioning of each of the onboard electronics, sensor, and telemetry. Only after a successful check, it the launch allowed.

2. Lift Off - The ignition chamber of the rocket is the lowest and has a burnout time in seconds. Within seconds of burnout, the rocket gains enough inertia to cross miles in the sky. All this while, the sensor subsystem inside, records and analyses the data from the various onboard sensor such as temperature, barometric pressure (for altitude), time, spin, acceleration, position (GPS) and others. All this data helps the rocket to be aware of its exact position and state at all points during a flight. This data is usually sampled every microsecond from each sensor.

It is essential that rocket behaves in the determined way else the consequences can be bad. For this purpose, a trajectory is predefined for a rocket and everything is designed to strictly achieve that. Advanced control of sounding rocket consists of canards, driven by a separate servo that allows the rocket to actively stabilize its flight trajectory.

3. Apogee - Rockets follow a projectile motion during flight, and no matter how fast it can go, face it, it comes to a rest at some point. This is the highest point, called apogee. To achieve highest possible apogee, a correctly implemented trajectory and a strongly stabilized flight are essential. At this point, we need our rocket to deploy the payload. It is necessary that the payload is deployed after ascent has ceased and preferably near the apogee. At this point, the computing system of the rocket decides (based on the sensor data) to actuate the payload release mechanism (often implemented by servos). This decision making is crucial. A wrong decision can completely sabotage the mission. Inaccurate release, say during ascent, can interfere with rocket trajectory and can misguide a rocket in habitated areas. No matter how small a rocket is, a fall from that height is extremely dangerous. Therefore, for advanced control, we implement a triple modular redundancy in the system for accurate decision making.

4. Decent - As soon as the decent of rocket begins, it is essential to keep a track of the rocket's position, speed and orientation in the 3-dimensional space. A rocket falling from a height of 80km can easily cross the sound barrier while decent. To stop the devastating aftermath, we equip the rocket with parachutes. And interestingly, there are two of these - the drogue-chute and the main-chute. Drogue-chute is bestowed by the responsibility for initial deacceleration. This is smaller than the main-chute, as a sudden impact on the rocket body due to parachute ejection can easily create an impulse to tear the rocket apart. Further, the high altitude wind currents can absurdly drift the rocket far away from the expected landing site. This is usually done at a predetermined altitude but along with a manual override from the ground station. The main chute is deployed only after a considerable decent has been achieved. This is again governed by the rocket's electronics control system.

5. Landing and Recovery - Let's assume, everything went well and we have landed safely. Know it and accept it, this is rocketry and even after all the cake and watermelon, there is a good chance that anything can go wrong. Therefore, it is supremely important to take every possible step of caution.

So, we have landed but we need data and recover the rocket body. It has survived and is well enough to be reused. The onboard GPS is always connected with the transmitter that lets the ground control be aware of the rocket's position at all times and enables them to recover it after the successful landing. On recovery, we also remove the onboard 'black box' that contains all the data from the flight for post-analysis.

The ground control is a completely electronic and computing system that always keeps a track of the rocket performance and trajectory. It is in constant contact with the rocket and often controls the functioning of the onboard systems such as flight stabilization using canards, manual parachute deployment, manual mission abort (closing engine valve to cut propellant supply), recovery etc.

After all these operations done successfully, can we say, we have mentioned all the important points of a rocket electronics system? But, we forget the most important of all. One without which, none of the systems can work. And that is power. All electronics run on power and in such an agitated environment, the power consideration is highly demanded. A single glitch from the power system can cause the system to power down or worst, reset. Not to mention, the consequences. Thus, power is at the pinnacle of rocket electronics design. One must always start with formulating a power budget for the complete system. I'd say it exclusively here, "This is the first step" in rocket electronics design.

A perfect rocket would also implement video recording and telemetry system (my opinion). Because after all the effort, one definitely wants to see how well it performed and all the phases it went through - looking far at the straight horizon all across, to reaching the point where you see the earth getting its curve, to seeing the change in color of the sky from blue to darkness of space and to see the contrast of day and night in the sky as the rocket spins about its axis.

It is after all these efforts, constant work and support from all the divisions of the rocket team, that the magnificent flies. Contrary to my notion, that I would not be able to summarise a rocket electronic system in a general and 'brief' manner, I seem to have covered a considerable ground here. But, let me just give you a warm gist that rocket electronics is vast and complicated- it brings together the power electronics team, computing team, algorithms team, data handling team, embedded systems team, robotics team and RF and Microwave team to handle all the operations of the electronic system. But if it weren't that complicated, the old joke 'It ain't rocket science' wouldn't be so funny [2].

If you are interested into rocketry, Introduction to Rocket Science and Engineering by Travis S. Taylor, CRC Press is an interesting read.

References:
1. Wikipedia
2. Introduction to Rocket Science and Engineering, Travis S. Taylor, CRC Press.
3. ISRO - www.isro.gov.in
4. NASA - www.nasa.gov
5. Delft Aerospace Rocket Engineering

Friday, 29 September 2017

Let the parallel hacking begin!

Its a Friday evening and the challenge for the weekends is Image Processing on NVIDIA GPU!

Its a Lab Assignment, yet so interesting that a formal log of the same is a must. Thus this is gonna be it.

Friday, September 29, 2017
The task is implementing a parallel algorithm for image processing on the NVIDIA Tesla K40c GPU. We are going to use CUDA (in C++). Sequential approach is not so complicated, but the challenge is to implement the same in parallel components by invoking kernels for the same in the GPU. Its going to be a 2 day hackathon, so stay tuned for updates!

Saturday, September 30, 2017
CUDA is a bit complicated to begin. A lot of new concepts of grid, blocks, and threads had to be brought into the picture to even get started. Luckily for me, I had been following the parallel computing course on Udacity to get started. Also, there are a few good webinars on CUDA from NVIDIA to get started. The first task is to convert the image into grayscale. This should not be very difficult. A few ideas are coming into the mind. I can simply begin to read out the image as a 2D array using x for width and y for the height. Implementing on the GPU means invoking threadIdx.x and threadIdx.y; Plan is to read one byte at a time (not very efficient, i know) from the array and from each pixel, we can note down the values of RGBA using the inputImage array. I still cannot figure out what exactly is the role of CImg.h file. For the record, its gigantic - something like 45,000 lines of code. (That clearly means, don't go into the details)

Thursday, 28 September 2017

Not so fancy intro in Quantum!

As a lay man, I used to wonder what quantum is? Is it breaking into another abstraction of the sub atomic? Can we harness quanta? What does it look like? Just breaking into the ice, I'd quote it simply, Quantum is real. And along comes its spectacular properties.

Two weeks have been passed since I dived into Quantum Computing. It is motivating indeed to think of the quantum phenomena of entanglement and quantum teleportation. But as intriguing and spectacular the world of quantum is, even more is the complexity. Prof Feynman once said, "If you think you understand quantum mechanics, you don't understand quantum mechanics". That was a thought somewhere in the corner of my head while choosing this as a major, but despite the odds it needs to be done. Thus, I sit here in the classroom of roughly 150 (and a few people live from University of Twente and TU Eindhoven). My professors are Leo DiCarlo and David Elkouss from QuTech in Applied Sciences. They are one of the best and leading research scientists in the Quantum World. I was reading about the loophole free bell-test that was performed at TU Delft a couple of years ago and these people were the ones who actually did that! They disproved Einstein! (Read: Loophole Free Bell Test - Nature)
Leo DiCarlo and Brian Krzanich, CEO, Intel
Quantum starts with qubits, the fundamental unit of quantum computation, a state that can be |0⟩, |1⟩ or a superposition of |0⟩ and |1⟩, represented as |ψ⟩ = α|0⟩ + β|1⟩ which is the only basic  stuff that you can actually manage to remember during the course.
Qubit have representation, along is qubit measurements and qubit computation using quantum gates. The beauty of quantum fundamentals appears when we represent it mathematically and we can actually see phenomena being proved through maths. Its all in the math!

Why do I study quantum, you ask? A theory that was once unacceptable to Einstein, is emerging. Moore's Law got the world of digital computing so far. What is the future of computing? How would you solve large computations, so complex, not be solved using parallel computing or even super computers? The answer lies in quantum. As an analogy, here's a fact: To simulate a quantum computer with 100 qubits we would require twice the amount of data storage as is the total of data of the world, at present, which is a few Zetabytes.

In fact, to be fair, if you ask what other problems can be solved on a quantum computer? We do not know yet.

Quantum is no doubt a weirdo of Physics. Coming up with good quantum algorithms is hard. But Why? Our human intuition is rooted in the classical world. To design good quantum algorithms, one must turn-off one’s classical intuition for at least part of the design process using truly quantum effects to achieve the desired algorithmic end. And, It is not enough to design that is only quantum mechanical. It must be better than any existing classical algorithm.

Quantum Computation and Quantum Information requires quantum mechanics, computer science, information theory and cryptography. And most important of all, it requires a leap in the imagination to progress in such a field of study. After these two weeks, I can say Quantum is fun, It just needs to be viewed right.

Thursday, 29 June 2017

Fixing Rx_Core with SERDES primitive for Xilinx 7 Series FPGAs

I have been having trouble in implementing a Serializer and Deserialize (SERDES) primitive with my VHDL Rx_Core Firware for the past few days, which was resolved today. Aparantly for the new Kintex and Virtex 7 series FPGAs they have updated their primitives to handle more incoming data. Earlier mine was a 4 bit, I had to replace it with a new one of 8-bits, thus, grounding the higher order bits.
more info on the same can be found in the application note by Xilinx: LVDS Source Synchronous 7:1 Serialization and Deserialization Using Clock Multiplication

Xilinx Primitives are components that can be implemented in our HDL. They are defined in the UNISIM library.

Next challenge that appears in the vicinity is fixing the clock multiplication problem to run our Rx_Core. Timon had just now suggested me to look into PLLs to achieve this. I also have help from Daniel from University of Valencia, Spain who is working on the gigabit transceiver (GBT) framework for optical communication. So, we can get going now!

Saturday, 3 June 2017

A day of firsts.. an account of my first visit to a foreign country

I could not think of a more apt title as this day, 2nd June 2017 is one of the biggest days of my life (like literally the biggest, due to time difference, you see).

Today morning, 4:45am I am about to set sail (not literally) to a foreign land. It is going to be Genève, Suisse! The first ever visit to a foreign country. Though it sounds like an amazing idea where you can't stop yourself to overjoy with happiness, but for me, it had mixed feelings. The place no doubt would be amazing but my concern was the life there, the cultural difference and most importantly the work for which I am taking this journey. It would be my first paid work, that I can officially call, 'a job'.






I reached the Indira Gandhi International Airport Terminal 3 quite early, 2 AM in New Delhi. I was aware of the proceedings later so I bid farewell to Mom and Dad outside and went in. Though, Mom and Dad stayed there until the flight left. Love you guys, you're the best! I went in to see my flight EY-211 Etihad Airways (This was a Boeing 777-300) and went directly to their counter to check in. I left my check in luggage there and proceeded. I received my boarding pass, a luggage slip and an immigration form. Filled it up and moved to the next step: the immigration counter. These guys 'tried' to look very strict but it was interesting as I was quite in a mood of confidence. (lol) So, after getting a stamp there I moved to the security check where I left my coat and belongings in a tray to be checked and after that proceeded to the waiting area. This place was marked by shops and showrooms of brands from all over the world. The first one being the Vine Shop. Elegant vines from all over the world costing in Lakhs! If felt funny in the stomach here but I moved ahead. Gate No 7 was my flight waiting but I still had a little over 1 hour so I went to eat something instead and on the way purchased a travel adapter for Europe. This was necessary. At 4:00AM, when they opened the gates for boarding, I went in. It was an interesting process and now I was in the flight, for the first time waiting anxiously for it to lift off.


The flight experience was amazing, the take off and landing specially. There is nothing much to do after the flight is in the air. So I won't write much about it. Next I reached Abu Dhabi Airport T3 at 7AM in the morning (Abu Dhabi local time). The connecting flight was at 9:00AM (Abu Dhabi local time). We got off the place, moved to the security check and done. Here I accidently lost my luggage slip (though it was not a necessary thing) and I had to go back and look when I realized it. More importantly, all this while you will be in a state of panic regarding your passport. Keep it safe as you don't want yourself left with the Arabs and their security personnel. I then went to gate number 53 from there passing through all the showrooms as were at IGI T3. There I had to wait for sometime before the gates open. Here, because it is worth mentioning, I saw, one of the most beautiful persons I've ever seen, like literally, she was out of the world! and she sat right in front of me! But she had to take another flight and it was just a brief encounter.

Sunrise (just after take off from India)
Landing at Abu Dhabi (Look! Desert Below)

When the gates opened, our boarding pass was checked and we went in the bus that took us to our plane EY-51 Etihad Airways. This was an Airbus A330-300 and a little smaller compared to my previous plane. Many Indians accompaied me till Abu Dhabi but later on, there were mostly Europeans and a few other nationals from Japan, Thailand and England. I fell asleep soon in this and missed the take off. It was a long flight ~8hours and I woke up a couple of times to have lunch or to wash my face or to watch the TV. We flew at 40,000 ft so it was too sunny to keep the window shutter open. It was all closed and again, nothing much to do. I used to turn on the Plane's Nadir camera at certain places, like when we flew over Venice, over the Adriatic Sea and also when we flew over the Alps (It was -66 degree C at that point outside!). And finally when it was 35 mins to reach Geneva, our captain announced, we were about to decent and we should put our seat belts on. I adhered. It was all amazing and when we flew over Geneva, I could say nothing else, but it was heaven!

Buses! (a type of)
Geneva Airport!


I landed at the Geneva Airport at around 2:50PM (Geneva Local Time). The Airport was a comparatively small one and the person sitting next to me (whose this Geneva visit was the 17th) told me that they shut down the airport at night so that people living nearby do not get disturbed. He was a Sri Lankan Diplomat and was there for a UN visit. We arrived here and proceeded to the arrivals counter where I got my passport stamped and directly went for the luggage collection counter number 5. The bag that I left in Delhi was here! I took my belongings and also on the way collected a free travel ticket for 1 day in Geneva. This was valid in all buses for 80mins to go around in Geneva. The weather outside was very pleasant, sunny and cool at the same time.

Outside the airport, I helped out an African fellow visitor in finding the correct direction to his bus stop but ironically myself boarded the wrong bus! Unaware of the destinations, I accidently boarded the wrong bus 'Y' Destination to Ferney-Voltaire and ended up reaching France! The same bus at the destination, changed its route to Destination Val-Thoiry (in France) and it dropped me at the CERN entrance without much hassle. (Half of CERN is in Suisse and other half in France!) It look me around 45 mins in the Bus to reach when it could be done in less than 20mins.

Next I went to the CERN main reception, Building 33. It is a relatively small office. They directed me to the Hostel from inside as I did not yet have an access card. As it happens, I was the first summer student to arrive and the receptionist at the hostel building number 39 greeted me. I had to show her my invite, my room bookings and passport and then she handed me over my hostel card. All rooms and buildings access is RFID based. So, you can't really get into rooms without an access card. I had reached at around 4pm and it was a Friday. I knew if I didn't get access to the internet today, I will have to wait till Tuesday. If not done, I would not be able to even contact home and tell that I reached safely. It was a major issue. I immediately went back to the reception to inquire this and she directed me to building number 55. This is situated at the entrance B, a little over 10mins of walk from the Hostel. There, on the 2nd floor, they had the computer service desk. She asked me if I already had a CERN account. Unaware about it, I told I did not but I'm not sure. She checked and Voila! There was an account! Thank you summer student team! She was very supportive and helped me all the way to activate my CERN computer access, set up the Wi-Fi access for my devices and set up the email ID. (amitabh.yadav@cern.ch). Just a little shy of the closing time, I got got access to WiFi! First things first, I called up home!

Room
Room, again!

Restaurant 1 (Not the building!)

Nataraj @ CERN
Route Marie CURIE (The buildings are no 39 and 38, L to R)

Honestly, the time after this was boring! I knew no one and it all came as a cultural shock. Added to it, Building 38 (where I got room number 29, bed A) is a Co-Ed hostel. Yes, it is. Though this usually happens to girls, I instead, felt a little insecure. (though, this feeling passed the next day, just saying) I passed by Restaurant 1 here (the main hangout place) where everyone (scientists, students, PhD fellows and even Nobel laureates) come together in the evening, hangout, eat and share a beer! Uncertain of the protocols, I simply went in. I wore a tracksuit upper and Jeans and floaters (or slippers, as we call them in India). I took some time to understand whats going on in this place. There was food all around and yes, it was a Buffet! So, step 1, find the plates. Get the gear (cutlery) and you are ready to explore. As tempting as it was to see the huge collection of beer, I kept my hands off those babies for today! I had a decent dinner (believe it or not, it was almost 8:30 and it was bright out there as day!). It costed me 12.50 CHF (1 Suisse Francs (CHF) = 68.45 INR).

The cuisine at Restaurant 1
Looking out of the beautiful scene from my room's window, I decided to call it a day. And went off to sleep. A beautiful day worth recording! Thank you God!
Peace Out! :)

Sunday, 30 April 2017

New? Start Here!

Hi! Welcome to my weblog, The Hard Computer Engineering.

However misleading the title may seem, I assure you, the primary objective of this initiative is to observe the charisma of a computing paradigm and to bring forth the hard aspect of a computer system into light in the most simplistic manner. Computers exists everywhere, from interstellar satellites to desktop computers, from a space shuttle's control system to your own mobile phone and from the high-speed data crunching servers running at the CERN's Large Hadron Collider to your office's coffee machine!

So, the question is, if something is so versatile, how could we understand it? Is there a common link to understand all the different types of computer systems?

Fortunately, a link exists and it has been the driving force that has marked the works of computer scientists in the past 5 decades.

Computer Engineering (abbr. as CE) encompasses a wide range of study disciplines, thinking methodologies and design ideas. Whether you are a scientific expert on CE or a lay-man looking for some of the most unique applications of CE in the scientific world you'll definitely find something new here to read and learn about. The topics of articles might not be well-structured all through the way, but you can always catch up on the related topics by going through the Categories option.

We'll trace the origins of computers; ponder over new computing paradigms like quantum computing, computation-in-memory, parallel-architectures etc.; and study their functioning on how the unique combination of Electronics and Computer Science bridges the hardware and software aspects of a computer system. I'll also share some of my works in CE that'll surely help provide a real world application of CE.

If you like my work, please share it with others, as well. You are now all set to dive right in! Click here to go to articles. To know more about me, click here.