Friday, July 27, 2018

Compressing an IP packet

If we looked at the format of an IP packet below (image was taken from Internet), we could see that the Frame Header, IP header, and UDP header have occupied lots of space in an IP packet.
In some cases, the IP header contains the (main) IP address of the gateway and then the subnet IP address of the sender or receiver. This would leave little room for data in an IP packet.

Each network or relay node(s) would need to unpack an IP packet for the contained IP address in order to relay or pick it up.
If we could compress the entire IP packet except the Frame Header/Footer and main IP address or gateway IP address, this would give more room for the packet data. Internet networks would deliver IP packets based on its gateway IP address. The gateway would pick up the packet; decompress its contents including subnet IP, which could be encoded, and then deliver to its final destination or subnet.

By keeping the destination gateway IP and frame header/footer intact, this protocol offers backward compatibility to previous version of IP packets. New system would determine if a packet was compressed or not based on “included characters”. Gateway address, subnet IP address, and UDP address contain a specific “numeric” format.

Monday, May 7, 2018

Smart city, province, or country

Smart city with 5G and Internet networks

There are companies, which have been advertising smart cities with all information linked and displayed. I don’t think that is a good idea.
There could be an umbrella with all information databases from all public departments linked, e.g. city data, provincial data, federal data, public transportation, income tax agency, citizenship department, etc. With all information linked and analyzed, staff could have an overview of a city, province, or country quickly and accurately.

Could government ask private sectors for user data? I don’t think this is a good idea to ask private sectors such as private company, publicly traded company, wireless network operators, ISP, etc. to provide data or open databases. There is an issue of privacy, confidential information, trade secrets, etc. that governments should not get involve in case of leaking.
The packet analyzer team is different as they must monitor Internet, phone communications, etc. to provide secure and safety to everyone. They could ask wireless operators and ISP for secured links to a R/O mirrored database for that purpose. They could also link to some less sensitive government database such as public transportation for more information. However they should not ask private companies or sensitive government’s databases access, because if data was leaking, they would be blamed for that.

In brief, smart cities to monitor and control everything in a city could be done with current technologies, but we should not do so due to privacy, trade secrets, confidentiality, and secured data by different parties involved.

Monday, January 29, 2018

Miniaturizing an electronic circuit

1. Miniaturizing a circuit

Currently there are many equipment with large sizes in the market having similar functionality. For example, Windows laptop and Windows phone use the same operating system, but the hardware, circuit board, and chips on a phone are smaller in size.

If we could take a photograph of a larger electronic circuit with ID of those electronic chips, and then use database to search for smaller alternative circuits/chips, the miniaturizing task would be easier.

If a chip came with firmware, the smaller circuit should also support functionality in the firmware.

The operating system is more complex, but it seems to me that Windows OS is the same for both Windows laptop and Windows mobile phone.

2. Building a huge database

This could be done by creating a huge database for

-         ID of smaller chips comparable with larger chips. For example, Intel has made many larger chips (less expensive) for laptop and equivalent smaller chips (expensive) for a mobile phone. Those equivalent chips are saved in database.

-         Smaller alternative circuit equivalent to a larger circuit. In this case, hardware designers have to come up with designs for possible equivalent circuit. Those alternative designs would be saved in database.

-         Usually smaller printed circuit would be less resistance, capacitance, or inductance. System would suggest the additional resistors, inductors, or capacitors appropriately for a smaller circuit board.

The issue would be building a database. The hard part would be design of alternative circuits, and try to match the alternative circuit with other parts of a system. For example,

-         An equivalent smaller microprocessor may have 10 pins, but the larger microprocessor has 20 pins.
-         The data bus would be different between 2 printed circuits
-         The hard drive may be different in number of pins for both circuits
-         Etc.

The alternative design would consider those facts and propose a design to cover the above scenario, i.e. matching printed circuit or coming up with additional components to bridge the difference.

Saturday, January 27, 2018

Pattern recognition v1.1

1. Image recognition

To teach a computer to learn an object, we could let it taking images of sample objects and stored in database.
For example, taking photo of a hot dog with maximum and minimum sizes recognized for a hot dog. The max and min size would properly be scaled in sample images stored in database. Of course, operators must enter the real max/min size of that hot dog in database.

Assuming we take photo of an object (hot dog) at the same distance as when taking sample, the photo of an object (hot dog) with appropriate photo scale could be recognized as a hot dog or not. With max or min sizes’ photo in database, we could estimate the size of the captured hot hog. If an object is larger than a max hot dog, system would rule it out.
Speaking of pattern recognition, we could think the sample object as a transparent. When an object is captured in photo, we could apply the transparent of sample objects on top of the captured image. Operators must train the system to determine some acceptable variation of the captured image. If variation conditions of the sample image and captured image are met, that object is identified.

We could think of an object is composed of curves, straight lines, etc. We could zoom in or out of sample image on top of a captured object to compare its shapes in terms of curves, straight lines, etc. Some curves of the captured image could be varied a little bit as compared to the sample object. (Operators must train the system to determine some acceptable variation of curves and lines.)
If we take photo of an object at the same distance, we could estimate size of another object placed at the same distance.

If we know the size of an object, we could estimate the distance between the camera to the same object placed at different distance.

If an object image is captured at a known zoom, the real size of that object could be estimated as well as the distance between the object and the cameras, i.e. the size of a photo image must be a constant in width and length. For example, at a certain zoom, system would be able to tell the real size of the scene in a photo; so an object’s real size and its distance could be estimated.
2. Voice pattern recognition

When we talked, our voice was captured as waves in an image. If we used the same strategy as in image recognition, we could determine correct words, letters, or phrases.

Friday, January 26, 2018

Self-driving cars with sensors v1.4

1. Equipment

A self-driving car would be equipped with many sensors to provide information about road conditions in order to control its speed, brake, steering wheel as well as safe distance with other objects or cars on the roads. Those equipment could be

-         GPS with precision to lane

-         Photo sensor with image processing or pattern recognition capability

-         Radar or laser beam to estimate safe distance between the car and other objects

-         Weather forecast center or the information control dashboard should be connected to a local weather forecast station via wireless (mobile router of a cellular phone) in order to know the current weather such as raining or snowing.


Figure 1. A self-driving car with its sensors

2. Laser beam

The car would be equipped with 8 laser beams in order to estimate the distance between itself and other objects in front of, behind, and around it.

There are many laser tools to estimate distance of an object and a laser tool in the market.

The laser beam would help to estimate, or control speed of a car, or its position (moving a little bit to the right or left) for a safe distance on the roads with other objects around it.
There is a physic formula to calculate distance based on the bounced back signal strength of a wave signal, i.e. used by laser beam in this case.

If the car in front of it is driving at slower speed than the upper speed limit suggested by the GPS, the car could try to change lane to pass that car.

The front/rear of the car could be equipped with 3 laser beams each to detect objects in the front/back of it.

In this note, the laser beams and photo sensors were used to determine safe distance. For changing lanes and other tasks, more laser beams and sensors would be needed.

3. Photo sensor or capture

a. Laser beam failed

There is a case that the laser beams would fail, i.e. snowing or raining days.

In the case that the distance reported by the laser beam changed drastically, the photo sensors would be activated to confirm the weather around the car and estimate safe distance along with the laser beam.

The photo sensor is special that it could estimate if an object similar with a car’s shape is so close to itself in order to slow down the vehicle.

b. Rain fall and snow fall

The rain fall and snow fall could be such a way that it blocked the laser beam to make system thinks that a wall was around the car.
There would be a sample of data reported by the laser periodically. For example, the car was so close to an object, but 50 msec later the car is at safe distance to objects around it. By confirming the laser data reported with weather forecast, system would mark this situation as rain fall or snow fall. Otherwise, system would report laser beam failed, and repair was suggested.

The laser beam on the side of a car would likely report intermittent safe distance and dangerously close repeatedly. However, to make system less expensive the photo sensors would be equipped at the front and back of the car, i.e. direction of a fast moving car.


By coupling a photo sensor and laser beam the car could keep safe distance with other objects.

4. Clarification
By adding more laser beams or photo sensors in around a car would increase the chance to detect safe distance in snowy or rainy days, but it is not a bullet proof solution.
To detect a car was in its blind spot, the car could be equipped with more laser beams and photo sensors installed on the left side, right side, and corners of the car.
5. Explanation of devices
a. GPS navigator
With precision to lane, the control center could help to keep a car in correct lane. With knowledge of number of lanes on a road, control center could help the car to change lanes correctly.
b. Laser beam
The laser beam is using technology as used in radar. It beams waves and catches the rebound waves in order to determine rebounded signal strength. Based on the rebounded signal strength, it estimates the distance between the car and the object blocking the beams.
c. Photo sensor
The photo sensor would capture images. Image processing software would compare the captured image with its data in database for image recognition, i.e. snow, rain, car, walls, etc. in the photo. Based on the captured image, the control center would take appropriate actions.
I don’t think a photo sensor could estimate the distance between the car and object in the photo unless it knew the object’s size in advance. For example, photo of the back of a Toyota Camry is stored in database. Based on photo, system uses recorded real size of a Camry plus size of the Camry in the photo, it could estimate the distance.
d. Weather forecast center or car’s control center
Based on information received from a local Weather Forecast Station via wireless Internet, the control center could confirm and decide appropriate actions.
A photo sensor could also detect snow or rain based on sample data in its database stored in the control center.
The car’s computer system or control system could connect to the information control dashboard, where users could connect it to a cellular phone via WiFi.
6. Using photo sensors for traffic signs

Unless each traffic intersection implement signal transmitters to inform the current traffic light such as red, yellow, green AND stop sign, a car must use its photo sensors to detect traffic signs.

If traffic signal transmitters implemented, the car could catch the signals and adjust its speed, and use photo sensors to detect cars around it in order to move correctly.

The photo sensors could detect “green, yellow, red, or color arrow” or “stop sign” used in a traffic intersection. It compared to its database for a known patterns such as square box around a green, yellow, red spots.

Basically the car must have a database of images for known objects on the roads, so it can compare and decide the meaning of objects captured in a photo.

7. Backup strategy in case of technology failed

Self-driving cars have been relying on first on GPS for lane precision, or second on lane marking to keep a vehicle travelling in correct lane.

However, military or GPS providers could take the satellites back for upgrade or different tasks. Thus the backup plan would be return to check the lane marking to guide vehicle correctly if GPS system failed. The lane marking is not a reliable source neither as many locations covered with snow during winter time. Snow plowing process would erase or fade lane marking, too. We cannot expect cities to maintain lane marking in perfect conditions.

If the system could not find solid lane marking for 1 meter or missed a broken lane marking, it should slow down; notify the driver to take over control; if the driver didn’t take over control for 2 seconds, it should turn on the hazard lights and bring the car into full stop on the current lane (the last known trajectory would be the best guess by the system in this situation) if it couldn’t change lane and park on the side road. The car system should be disabled for 1 minute to calm down the upset driver as well as giving the driver time to access traffic around the car before merging back into traffic manually.

8. Wireless protocol

If many car manufacturers used the same laser beam and frequency for detecting safe distance between cars on the roads, then a simple protocol embedded in the laser waves should be implemented by those car manufacturers. For example,
-         Common message ID: the first few characters to identify this is a laser beam message.

-         Next 5 characters to identify a car manufacturer, e.g. TOYOT for Toyota

-         The next 9 characters are proprietary to contain ID of the car, e.g. the first 2 characters for model, and the last 7 characters for unique ID of that car.
Since there wouldn’t be necessary for vehicle to vehicle communications to avoid hackers manipulate all cars on a road causing accidents, the last 9 characters reserved for each manufacturers providing flexibility.
Manufacturers should avoid using unique ID such as vehicle’s VIN and serial number as those numbers should remain private for law enforcement, insurance, and vehicle maintenance.

Saturday, December 30, 2017

General marketing and selling a product

A. Marketing

First I would find some unique characteristics of my product that made it stand out from my competitor’s products.
Most of companies are buying external equipment or external products to support their operations or product development, which would generate profits for their own firms.

Do buyers really care about buying a premium or fashionable product for company’s use? They would consider the following criteria:
-        Is the product performed as expected or as marketed?

-        Could they use the product to shorten development cycle?
-        Does it help to generate more profits and lower internal expense?

-        Is this product affordable based on allocated budget?
-        Is this a long term investment or must be replaced after a short period of time?

We have to market our products based on benefits to customers. We have to avoid telling customers about "paying premium prices for our exceptional products."
B. Selling

There is a simple strategy to sell your products. Of course your product must be good performance or comparable to your competitors:
1. Lower price than your competitor if both products are about the same performance and quality.

2. Same price as your competitors if your product outperformed your competitors.
The above 2 strategies would help your customers to pick your product quickly. You don't need to spend time talking and convincing your customers, i.e. time is also money.

If you have to travel and book a hotel for a series of conversation with your customers in order to sell your outperformed products at higher prices, it'd be expensive or factored in/lower the profits.
You may try to sell your "outperformed" products at a little higher price in such a way that it's negligible to customers, and then they'd pay. For example, $105 for your product while your competitors quoted $100. If you quoted $200, customers may think twice.

C. Sell your product to governments or public sector
Usually you shouldn't expect high profit margin by selling products to governments. However, it's good to sell products to governments for other indirect benefits.

For example, Tesla sold 100MW batteries to Southern Australia; they got worldwide free media coverage, i.e. like huge free marketing and recognition.
Governments are usually careful in purchase a product for its performance and price. If they made a bad purchase, they would be scrutinized by media and tax payers. Thus it's good to sell a product to government, i.e. your product is good and reliable.

Of course if you sold a good product to governments, you would be able to ask for some help in some legitimate administrative issues, if needed. I'm not talking about bribery or corruption.
D. Quote your product

How to price your product in order to make sales is a hardest part.
To come up with an idea and R&D was a concrete step. You could develop a product based on staff expertise and research.

We don't have anything to base on for a quote.
If there are similar products in the market, we could try to see the price range, where our products could be priced for quick sales. Otherwise we have to guess the reasonable profit margin in the industry or sector that our products are in.

Monday, October 30, 2017

Implementation of Supply Chain Management

1. RFID and barcode functionality

A printed barcode could be associated with an item. A barcode reader would scan an item’s barcode relayed it to a computer; the associated item with this barcode would be retrieved from database.
A passive RFID tag is a special chip with unique ID, which could be scanned and picked up by a passive RFID reader's antenna. The range of passive RFID antenna is typically less than a meter. Passive RFID tag has an issue with a box of metallic items, because those items interfered/obstructed the communication between the passive RFID antenna and the passive RFID tag.

An active RFID tag is a special chip with unique ID powered with battery, which could emit signals with data and picked up by an active RFID reader's antenna. The range of an active RFID antenna is typically a few meters.

Passive RFID reader could read the unique ID of a passive RFID tag. The passive RFID reader could be connected to a computer network. Thus information could be recorded in database. A software application could be developed to handle data read by a reader.

The same configuration to a passive RFID reader is applicable to an active RFID reader for an active RFID tag.
2. Packaging process before shipping in a container


Figure 1. Packaging process and positions of active RFID antennae

-         Each item would be associated with a barcode on its packaging.

-         Each item would be scanned and placed in a box, which is associated with a unique passive RFID tag.

-         After the box is full, the box would be taped. The number of items loaded in this box has been recorded in database. By scanning this passive RFID tag, we could load all items stored in this box as those was associated with this tag from database.
Instead of a passive RFID tag, we could use a unique barcode to link all items in a box with this barcode.
-         All boxes would be loaded on a pallet, which is associated with a unique active RFID tag. The number of boxes loaded will be scanned during loading process, thus we have the total number of boxes on a pallet as well as items loaded.

-         Each recorded pallet would be scanned by an active RFID antenna, and loaded into a container. This container must be uniquely identified by a unique barcode, unique active RFID tag, or a wireless modem. A passive RFID tag attached to a container wouldn’t work, if the container is metallic.

With wireless modem, we could track the container’s movement by using the mobile telephony network, but this option is expensive.
This inventory warehouse could be a large manufacturing plant producing items packed in each box.
3. Managing incoming or outgoing pallets in/out a warehouse
The communication range of an active antenna and its tags is around a couple of meters, thus the entrance and exit doors must be far apart. This would prevent picking up wrong signals for incoming or outgoing pallets.
The area around an active RFID antenna must be also clear of pallets. The active antenna should only pick up signals of an active RFID tag leaving or entering the warehouse.
When a pallet entered the entrance, the active RFID antenna would pick up the ID of the unique RFID tag, thus we could tell the number of boxes as well as all items on this pallet. These items could be loaded into the inventory database at receiver’s end.
When a pallet left the exit, the active RFID antenna would pick up the ID of the unique RFID tag, thus we could tell the number of boxes as well as all items on this pallet. These items would be removed from the inventory database at the shipping’s end.
4. Receiving and unpacking process
At the other end, the container arrived would be scanned its unique barcode, unique active RFID tag, or wireless modem.
We could link to the database of the “packaging source” to retrieve data about all pallets, boxes, and items loaded in this container.
Similarly, by scanning the pallet’s unique active RFID tag we could tell number of boxes and items loaded.
By scanning a box’s unique passive RFID tag or unique barcode we could tell number of items packed.
Those items would be loaded or added into the inventory database of the receiver.
5. Retailer’s process
If the receiver is a retailer, they could deduct each item sold in the database by scanning its barcode. If the number of remaining items was less than a threshold, a message would be sent to a manager to trigger a replenishing process.

6. Clarification

The process above was to describe how to associate a container to pallets, boxes, and items in each box. The receiver could easily retrieve data or items shipped in a container from a shipping source using an application on a computer network.

In a manufacturing plant setting, the assembly line could be automated or robotized; therefore any implementer of this supply chain management process must study the assembly line in order to add in “labels” (barcode, passive RFID tag, or active RFID tag) appropriately. It is unlikely that a manufacturer would scrap their entire automated assembly chain in order to implement this supply chain management, i.e. minimum changes must be proposed to the manufacturer.

Software application could be developed in order to handle items shipped or to control all shipments automatically at the shipper site. The receiving site software is to handle items received, etc. If they wanted to link all items to an invoice or payment process, it could also be done.

Sunday, August 27, 2017

Reading IS-41 Rev B standard

Why reading (ANSI-41) IS-41 Rev B protocol standard for TDMA is good? This document was written for 2G wireless network protocol, but they’re talking about 5G developments out there.

This standard was written by many top engineers from many telecom companies around the world, i.e. well reviewed and written.
This document was well documented and structured.

A section described the interaction of many telecom elements such as MSC, HLR, and RBS. It was written at high level for an ease of understanding with enough details. Thus readers didn’t get lost in details, but focused on the key features.
Each feature is separated in a chapter, i.e. easy to search for an interested feature.

One of the last section listed details of a protocol message with all parameters in bit and byte. This was a good reference chapter.
If you’re developing a system with a programming language similar to PLEX-C of Ericsson, you could view a subsystem as an element in IS-41 Rev B such as MSC or HLR. Therefore, you could build a dispatch interface (similar to an API) for other subsystems to access internal functionality of this subsystem. This would help to encapsulate this subsystem. If you optimize this subsystem for some reasons, but remain the dispatch interface unchanged, other subsystems don’t need to be updated.

The goal to read this standard was to learn how to write a good document for a protocol application.