Showing posts with label IoT. Show all posts
Showing posts with label IoT. Show all posts

Wednesday, January 31, 2018

What is PLC, DCS, SCADA, IoT?

What is Programmable logic controller?

PLC’s are everywhere, inside your washing machine, elevators, car manufacturing, making your favorite iPhone or Samsung galaxy phones, bundling toilet papers, etc. Simply PLC means automation of a process.

“A programmable logic controller (PLC), or programmable controller is an industrial digital computer which has been ruggedized and adapted for the control of manufacturing processes” – Wiki

PLC is basically “a digital computer” used for Industrial automation of electromechanical processes. So Unlike Personal computer, they are ruggedized and have electrical noise immunity, vibration and impact resistance, varied temperature ranges, etc.

Programmable: We can write a custom program, to interpret inputs (motor switched on) and how to output (to start motor). Later, we can change, and update or replace a program according to our future requirement so it’s called programmable.

Logic: If two conditions are met or A and B conditions are true do something. For ex: If 60 seconds over and no object in front of the gate, closed the gate. At the heart of microprocessor there are billions of transistors which is nothing but switches, opens or close the circuits based on logics or gates.

Controller: at the heart of PLC resides a Microcontroller, it is very much like a microprocessor, except that it has been designed specifically for use in embedded systems. Microcontrollers typically include a CPU, memory (a small amount of RAM, ROM, or both), and other peripherals in the same integrated circuit. If you purchase all of these items on a single chip, it is possible to reduce the cost of an embedded system substantially.

In laymen words, PLC is an electronic device, electronic means technique to control flow of electrons via semi-conductors like transistors. Transistors is like switches, which allow electrons to flow or stop. Once we have the power to control the flow of electrons, we can use that for logic purpose or decision making, that’s all.

History:
General motors issued a RFP to replace hard wired Relay based machine control systems (before the dawn of transistors, relay system was used to automate the process). Bedford associates, created the first PLC by implementing GM’s specification.

PLC System:







How to automate an Industry:

To automate an Industry, you requires minimu two things:

a) Process or Business domain knowledge: here Process means, what are the activities occurs inside an automobile industry to produce a car. For ex: building frames, painting of the car, assembling engine parts, fixing tires etc. entire these steps or full life cycle of a car production are called as Processes or Business Domain of an Industry.
A good understanding of processes helps to understand the areas to automate or improve automation of production.
   
b) PLC (microcontroller):

Programming languages of PLC:

Ladder Diagram (is used for relay diagrams, so its easy for engineers to upgrade from relay to PLC)
Functional Block Diagram
Structured Text
Sequential Function Chart (SFC)

User IDE to write program, Ex: CODESYS. Usually PLC manufactures will provide IDE's

Steps to Setup and Deploy a PLC:

Understand the Process of an Industry
          Write custom program according to automate the process
Upload custom program into PLC

Different Process/Industrial Control Systems:

PLC:
PLCs are more suitable for local area control (plants, assembly plants, production lines, etc.)
PLC is for small industries, where discrete (means, we know how many phones we are going to manufacture in a day) input and output.

DCS (distributed control system):
DCS tends to be used on large continuous process plants where high reliability and security is important, and the control room is not geographically remote. DCS is for large, spread out industry like oil and refineries, mining. Unlike PLC DCS is analog/continuous input and output.
DCS uses RTU, it is based on microprocessor, because it support wireless, wider geographical telemetry, etc.

SCADA (Supervisory control and data acquisition)/HMI: This system is similar to DCS. is a control system architecture that uses computers, networked data communications and graphical user interfaces for high-level process supervisory management, but uses other peripheral devices such as programmable logic controllers and discrete PID controllers to interface to the process plant or machinery.” wiki

IoT: is modern or next generation SCADA. Recently Industrial giants started to think to exploit the potential of IoT. Its gamer changer, where imagination is the limit how much you can automate, user can control plants, etc.  Unlike SCADA we don't need a dedicated engineer in front of graphical control system and monitor the plant or machines. Field engineer, supervisor/manager or even a company CEO can access and control the plant from his mobile phone. That’s the power of the IoT
IoT provides TLS (transport layer security) inherited technology, which was missing in SCADA.


PS: PLC, DCS, SCADA, IoT, each worth couple of books materials or more. Here I am trying to briefly describe what is PLC and other systems.

One important mention here is unlike typical software industries, inside Industrial software go through lot of processes, more testing, each version will take years to release because they deal with life and death, environment and other issues.

Thursday, December 14, 2017

Hello world in Microsoft Quantum Computing #qsharp #quantum

This week Microsoft Quantum Computing research team released their first quantum development kit (free preview release).

Steps to play around Quantum!

a) You need Windows 64 bit
b) Visual Studio
c) Download quantum development kit, and install it (download link at the end)
d) Download the quantum library's & samples from git hub(download link at the end)
e) Compile and run any one of the samples.

I have compiled and ran the TeleportationSample project:



Link to github MS quantum libs and code: https://github.com/Microsoft/Quantum.git


Tuesday, November 28, 2017

Fundamentals of Wireless Communication 5G

 

What is wireless communication?

Data or information transferred from point A to B without any wire or dedicated cables is called wireless communication.

Mother Nature is doing wireless communication for millions of years*.  Let me give few real examples of how nature does wireless communication:
   a)   When you make an eye contact with other person, the light bouncing off from your body will enter into other person’s eyes, then inside their eyes millions of light sensitive rods and cones or photoreceptor neuron receives and transfers it to brain, where your actual picture is drawn.
   
   b)   When you are talking to other person, vocal cord\folds in your body, generates pressure in the air, that converted into sound waves and enters into the ears, then ear drum vibrates and converts into electrical signal then passed it to brain and different part of brain processes it.

In both the scenario, main point is humans are doing wireless communication unconsciously.

If you are one of the smart people, you might have asked this question, ‘how come I can hear and understand multiple sounds at a time, like car honking, hearing voices people passing by, etc. at the same time’ trick is all these sounds have different hertz or frequency of sound waves. So ear drum vibrates differently for different sounds waves’ frequency.

That’s it, wireless communication in simple sentences:

A gentleman says hello to a lady, his vocal cord generates a sound wave and her ear drum receives sound waves and processes it.

A transmitter antenna, encodes information and  generates radio waves by vibrating electrons, then radio waves travels at the speed of light , when it its receiver antenna, information will be decoded”.

Compare above both the sentences lot of similarities, isn’t it?  When you are stuck in traffic jam, you turn on the radio station. It follows same principle transmitter antenna broadcast and a receiver antenna in your car receives and plays it.
The very key point here is at what hertz the radio waves are broad casted. Don’t worry hertz is simple words for a second how many time it rotates or vibrates. Basically sender and receiver should know the language which they are talking about.

Let’s get little bit technical:

Electricity, Automation, Wireless communication … all these things boils down to “Electromagnetic Spectrum” after understanding this spectrum led to revolution in wireless communication.

There are two types of wireless communication, analog and digital. Analog, all nature communication is analog which is continuous in time and value, ex: sun light. Digital is discrete in both time and value.

After the dawn of transistors and integrated circuits, it revolutionized the wireless communication, after this point of time, wireless means mostly digital wireless.

Below flow path explains steps inside modern wireless communication system:
Analog Signal -> ADC -> Signal Processing -> DAC -> Analog Signal

What is this 1G, 2G, 3G, 4G and now 5G?

In simple words, A telecom company called X, which has setup of lot of cell sites or antennas, and users who want to pay for wireless service like talk or text, subscribes to X’s wireless services. With this setup is in place, here is all what that Gs does as follow:
1G (first generation): user can send and receive couple kb bytes – approx.
4G, user can send and receive few Megabytes – approx.
5G, user can send and receive few Giga bytes – approx.

So basically in 1G user can send and receive just text msg’s but in 5G user can send and receive HD videos, high res pics etc.


PS: I am trying to simplify the technology into simple English words and approximating the measurement or units. This is not for any references, just to create the abstraction of complex ideas into simple real life examples and intention is to reach technology to wider audiences.

Sunday, December 4, 2016

What is IoT?



What is IoT. Internet of things or devices connected to internet.

In simple words the devices which are connected to internet, interact with each other, collect and exchange data. A device is connected to internet can be controlled or operated by remote control room.

History:

Necessity is the mother of invention, Retail industry were struggling to track the items, inventory, to meet demand and supply. Researchers at MIT found a way to improve Procter and Gamble business by linking RFID info to the internet, and also with the invention of RFID, internet led to the era of IoT.

Term IoT was first coined by Peter T Lewis in 1985 speech to FCC, he said “IoT is the integration of people, processes and technology with connectable devices”.
Kevin Ashton is one of key member in development of IoT, while working at MITs autoID lab developed technique to linking RFID information to the internet.  Ashton wrote:
“RFID and sensor technology enable computers to observe, identify and understand the world—without the limitations of human-entered data”

Though its simple automation solution at that time but not simple anymore now.


Bottom line of IoT are automation, no human intervention, less errors, improve productivity, machine to machine communications, cost savings.

Things which make IoT to work: (Sensor | IP number | Internet | Cloud | You)


Actually its convergence of multiple technologies makes IoT to work. But here are the main components of IoT:
Sensor:a device that detects or measures a physical property and records, indicates, or otherwise responds to it” – wiki. It can any sensor heat, pressure, bio, touch, … if you don’t know, your (human) body is full of sensors!!
IP number: thanks to IPv6, without this it’s tough to implement IoT. IPv6 is based on 128 bit address so theoretically 2 ^ 128 addresses. Based on ipv6 we can assign a unique number to each device.
Internet:  another major component through this we transfer data or communicate.
Cloud: via internet we store the sensor data, process and analyze it
You: you or smart phone or machine will have the information about a device. You will decide what to do with that data.

Here is a hypothetical scenario of how above components work together:
You have installed a temp monitor Sensor at your home. Sensor detects that air temperature inside your home is above 85 deg F. Sensor has connected to internet, so it will send data to cloud. Your smartphone is hooked up to cloud data or registered to receive alert from cloud. So on cloud you have logic if data of air temperature rise above certain level you inform registered devices. So you get an alert notification. You can respond to that alert by saying to reduce the temperature.  In reverse order signal goes to cloud, cloud to sensor via internet and sensor reduces the temperature.

IoT is heavily used in Industrial automation, Health care, Power & Utilities and many other. You can even monitor your refrigerator too.

Create your own IoT device:


With little effort you can create your own IoT device. I have listed things you need to create a device.

Scripting/Programming language. (ex: Python, C)
You need to know a scripting\programming language. With very basics if else conditions you can create script to-do on and off functionality.  If you need here is the link to learn python.
https://wiki.python.org/moin/BeginnersGuide/Programmers

Basics of Electronics
You should know basics of electronics like voltage, current, resistors, capacitors and couple others. Here is the link if you need to learn or brush up.
https://www.clear.rice.edu/elec201/Book/basic_elec.html

Arduino or Raspberry pi
Both are often misunderstood about the usage. Here is basic difference of them:
Arduino is a microcontroller / basic computer, you can run just one program at a time. (Costs around 20$)
Raspberry pi is full-fledged computer with Linux OS. You can run multiple programs at a time. (Costs around 35$)

I suggest you start with Arduino, because it’s simple and easy to learn.

Download Arduino IDE: https://www.arduino.cc/en/Guide/HomePage
Buy Arduino basic controller
Follow: https://www.arduino.cc/en/Tutorial/HomePage