BPCL Pure For Sure - FDS V2

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 17

BPCL PURE FOR SURE

FUNCTIONAL DESIGN DOCUMENT


(FDD)

DOCUMENT VERSION 1.0


27-July-2023
I. Introduction
1. Purpose of the document
This FDD is a formal document that describes the functional and non-functional requirements, their design
specifications required for the AI based Video Analytics system. This document is intended to be used by the
members of the project team to implement and verify the functioning of the system.
 BPCL Lucknow LPG bottling plant– Consumer of the application to review & ensure the features are in
line with the outcomes and to provide the signoff.
 ZestIOT – Application Development and Support Team which will be responsible for delivering the
application, providing technical support during the initial production deployments, and UAT support.
 Data Architects, Application Architects, Developers, and Technical Architects would also find the information
in this document useful to design & develop a solution that will address these business requirements.
2. Intended Audience
The main intended audiences for this document are the business owners of the proposed system and the Engineering
and Implementation team.

3. Project Scope
The scope of the project includes tracking the cylinders with the help of unique QR code assigned to them, to the
trucks they will load on within the plant. During this process cylinders with invalid QR code will be identified for
rejection line.
Thus, the given below will be the Project scope:
 Includes reading the QR Code of the cylinders placed on the belt.
 Validating the QR codes with the valid QR codes list.
 Integrate with Kosan system to read the weight of indexed cylinders.
 ANPR detection of trucks arriving at the 2 loading bays.
 Tracking the cylinder with the help of unique QR code to the truck number, to which it is loaded.
4. Out of Scope
Changes to the agreed scope in-terms of look and feel, new use cases that are not specified in the tender document
which extends workaround, complex changes/enhancements to the application functionality may require further
planning & formal agreement between both the parties to develop & implement.

5. Process Flow

Given below diagram explains how the AI system would read the QR code of a cylinder and track the truck on which
it is placed.
A. Scan and Read QR Code at FLP Setup -1
Cylinders are placed on the conveyor belt. The top view camera will read the QR code on top of the cylinder and send to database.

B. Database record
The database will have record of valid QR codes received from BPCL plant. Each time, the QR code of the cylinder is read, it will record in
the table, of cylinder number and QR code.

C. Validation of QR code
The database will validate the QR code read against the data of QR codes stored and send the status – valid/invalid to Kosan system along
with index number.

D. Integration with Kosan


The Kosan system will receive the status of QR code read for each cylinder. It will then weigh each cylinder and send this entire data –
cylinder number, QR code and weight back to the database, to be stored there. Cylinders with invalid QR codes will be rejected by Kosan
system.

E. QR code detection on Track 1 or Track 2


The cylinders with valid QR code are then placed on track 1 or track 2, to be loaded on trucks parked at Bay 1 or Bay 2 respectively. The
cameras at each of the track’s scan and read the QR code and send data to database.

F. ANPR at Bay 1 and 2


Cameras placed at the bays will read the truck number and send to database.

G. Sync between QR code, ANPR and Kosan


The database will fetch the record of the cylinder detected at step E with the help of QR Code and maintain a record of the
Cylinder number: QR code::Weight:: ANPR

H. Integration with Lynkit


Lynkit is a mobile app. Our system will integrate with Lynkit. We must send the entire data of
Cylinder number: QR code:: Weight:: ANPR at step G.
II. IOT and Kosan Integration
1.1.1 System Design:

2.1.2 System Components

Sr. No. Component Purpose Input/Output


Cylinder Detection
1 Proximity Sensor 1 and trigger for camera Input to IoT Device
to capture Image
Accumulation
2 Proximity Sensor 2 Input to IoT device
detection
3 IoT Device Gateway for data IO/MODBUS Gateway
exchange
Read QR code of
4 QR Camera Input of System
Cylinder
Senses weight of
cylinder and sends
5 Kosan weight system Data Exchange
data to IoT device over
MODBUS

2.1.3 Data flow

2.1.4 Working:
a. LOOP – 1:
1. Initial state of the stopper will be closed state by default (Using IOT)
2. Read Sensor 2
3. If sensor 2 is HIGH (Accumulation detected)
4. Stopper engaged (No Cylinder Pass)
5. Wait for Sensor 2 to go LOW (Accumulation cleared)
6. Read QR via QR/Camera reader
7. Receive seq. ID & status of QR from server (over MQTT)
8. Frame MODBUS packet with seq. ID and QR status
9. 24V HIGH on Data Pin
10. KOSAN issues a register read request on MODBUS
11. Send Sequence ID with QR status over MODBUS to KOSAN
12. KOSAN reads the MODBUS packet from step 8
13. Read sensor 1 - If HIGH; Release the stopper (cylinder allowed to pass)
14. When LOW: Stopper engaged (cylinder blocked)
15. KOSAN sends 200ms pulse on acknowledge
16. 24V LOW on Data Pin
17. Return to step 1
b. LOOP – 1:
1. KOSAN writes seq. ID and gross weight to MODBUS registers
2. IoT reads every 500ms these registers for sq.ID and weight
3. IoT writes acknowledgement in a register 0: success 1: failure

2.1.5 Protocol Design:


a. Protocol Type : MODBUS
b. Connection : 4 Core shielded wire (full duplex)
c. Device Mode : Slave
d. Device ID :
e. Baud Rate : 9600
f. Full Duplex : Yes

2.1.6 Packet Structure:


Following data packet will be sent when requested by KOSAN for sequence ID
I. IoT to KOSAN :

Sr. No. Frame contents Size Description


Start 8 bits Start of MODBUS
1
Frame
2 Slave Address 8 bits Currently set at 1
3 Function Code 8 bits Read Sequence ID
8 bits Sequence Status
4 Data (OK/Not-OK)
16 bits Sequence ID
5 CRC 16 bits CRC Check

Sr. No. Address Object Type Type of Size Description


Sequence
Status
1 Single Bit Read - Write 8-bit
(0:OK ; 1: Not-
OK)
Sequence ID
2 16-bit Word Read - Write 16-bit
(Cylinder ID)

II. KOSAN to IoT:

Data packet sent in response to read weight


Sr. No. Frame contents Size Description
Start 8 bits Start of MODBUS
1
Frame
2 Slave Address 8 bits Currently set at 1
3 Function Code 8 bits Read weight register
4 Data 8 bits Read status (0:
Success; 1:Fail)
32 bits Weight of Cylinder
16 bits Sequence (Cylinder)
ID
5 CRC 16 bits CRC Check

Sr. No. Address Object Type Type of Size Description

Read Success
1 Single Bit Read -Write 8-bit (0: Success; 1:
Failure)
Sequence ID
2 16-bit Word Read -Write 16-bit
(Cylinder ID)

Weight
3 16-bit Word Read -Write 32-bit
(Cylinder ID)

Note:
1. Weight is assumed to be floating point single precision data.
2. The address fields in the table are left blank – to be filled by KOSAN

III. LynKit Integration

IV. Features & Specifications


Use Case 1 Cylinder Numbering
Description This use case is to index the cylinders.
Pre-condition The Sick sensor detects an obstruction at the cylinder stopper, this obstruction detection
can additionally be used as a validation count to the Cylinder numbering/ Indexing
AI Logic  Define and configure the ROI as illustrated in the image below.
 When the AI model detects a cylinder within the ROI, a bounding box is drawn for
one cylinder and assigned a number.
 The count will reset after every 255th cylinder.
Reference Image
Objects to  Cylinder ring
Annotate  QR code sticker

Use Case 2 Validate and record QR Code


Description This use case is to validate the QR code read on a cylinder.
Pre-condition A list of valid QR codes will be provided.
AI Logic  Define and configure the ROI as illustrated in the image below.
 Detect and read the QR code within the ROI.
 The list of valid QR codes will be saved in database.
 Validate the QR code read with the given list of QR codes.
 This information, whether the QR code is valid/ invalid will be sent to Kosan system.
 The QR code for each unique cylinder will be stored in database.
Reference Image
Objects to QR code sticker
Annotate

Use Case 3 Weight of the cylinder


Description This use case is to read the weight of the cylinders.
Pre-condition Integration with Kosan system
AI Logic  After validating the QR codes, the Cylinder index is sent to KOSAN system to read the
weight of the indexed cylinder.
 The weight read from the Kosan system is associated with the QR and sent to the AI
System.
 This weight along with QR code and cylinder number will be saved in database.

Use Case 4 ANPR


Description This use case is to read and record the truck number arriving at the loading bays.
Pre-condition The truck number is clearly visible.
AI Logic  Define and configure an ROI as illustrated in the figure below:
 Detect truck front and truck is stationery for 10 frames.
 Read and record the number of the truck.
Reference Image
Objects to Numbers on Number Plate
Annotate

Use Case 5 QR Code – ANPR


Description This use case is to track and maintain a record of each cylinder along with QR code and
truck number on which it is loaded.
Pre-condition
AI Logic  Define and configure the ROI as shown in the illustration below on track 1 and track
2.
 Detect a cylinder.
 Read the QR code of the cylinder.
 Read the truck number for that truck on that bay and attach to the QR code of the
cylinder and save in database.
Reference Image

V. UI Screens
a) Login Screen
 By logging in you will be allowed to create and modify existing records.
 Open Internet Explorer, key the IP address below and press Enter. The login screen displays as shown below.
 Only registered users with unique username and password will be able to login to the application.
Figure 1

b) Dashboard Page
 There are 4 cards on this page:
i. A card to give the count for total truck departing the plant for the day/time period.
ii. A card to give the total count of cylinders loaded on trucks.
iii. Bay 1 and Bay 2 card - If there is a truck being loaded the status would show as active or else
inactive. The user should also be able to see the truck number and count of cylinders being
incremented, if the status is active.
iv. Live video for each of the bays will be visible on the bay card.
v. Expand button will show the details as in table 1.
Table 1

Name of the Field Business Rule

Image Captures the top view image of the cylinder from FLP setup 1

Date & Time DD/MM/YYYY & HH:MM format for when image captured in FLP setup 1

Bay Number Captures the Bay number where the truck is standing.

Total Cylinders Count of cylinders loaded on that truck

Truck Number Record the truck number of the truck on which the corresponding cylinder is loaded

As an admin user I want to bulk upload the QR codes to the application, so that they can be stored in database
for system to cross verify QR codes and check whether valid or not.

Acceptance criteria:
When:
 The user logins into the application on the side bar show an icon for Imports.
 Import reports open on screen.
 On the same screen there shall be a button for <IMPORT>
Then:
Screen 1: Import File
 A single click on the import shall open a browse window (Similar to one shown below)
to search for the file to upload into the application.
 The user can upload data only from an excel file/CSV file.
 A single click on Upload will allow users to search and select the file to upload.
 If the user selects formats other than CSV file, show an error message: Only CSV files can be
 uploaded.
Screen 2: Duplication Strategy
 Once the file is uploaded, there should be a duplication strategy screen as shown below:
 If the uploaded file has QR codes match that already exist in the system, choose one of the 2 options:
1. Only add missing QR codes.
2. Replace the existing QR code list entirely. (Note: this re-writes the information and cannot be
undone.)
NOTE: The following formats of QR code in the CSV shall be acceptable to upload.

Input mode Max. characters Bits/char. Possible characters, default encoding

Numeric only 7,089 3 1 ⁄3 0, 1, 2, 3, 4, 5, 6, 7, 8, 9

Alphanumeric 4,296 5 1 ⁄2 0–9, A–Z (upper-case only), space, $, %, *, +, -, ., /, :

Binary/byte 2,953 8 ISO/IEC 8859-1

Kanji/kana 1,817 13 Shift JIS X 0208

 Multiple users should be able upload a file at a given point of time.


 When the user clicks on import after screen 2 should be navigated to the import report screen.
Import Report
 Show a report after the imports as given below:

Batch ID Date Created Failed Skipped


BH1234 03-Sept-2023 200 20 55

 Batch Id Format
 Skipped count: Download a CSV containing all the rows from the original spreadsheet that were detected
as duplicates and skipped.
 Failed Count: Download a CSV containing all the rows that failed validation.
 Created Count: details of QR codes imported successfully.
c) Camera Configuration

Camera Card:

o This is screen provides details of cameras configured for the location.


o Area Name: Location in the plant where camera is setup.
o Camera Name: A unique name assigned to each camera.
o Camera IP: IP address of each camera
o Resolution: the size of the digital image the camera produces.
o Username: The username to access the camera
o Use Case: With on click of the + symbol, the form to enable/disable the use cases will be opened.
o Base Image: Captures the basic view from the camera.
o Status: If the camera is active/ Inactive. Toggle button to change the status.
o Edit Icon: To edit any of the mentioned camera details.
o Delete: to delete the camera mapping.
o Add Camera: A click on it will open a new screen to add a camera to the configuration list as shown
below.

o With on click of the + symbol, the form to enable/disable the use cases as shown below will be
opened.

Figure: Feature Configuration Screen


 The third tab on the camera configuration screen
 The screen provides insight on use cases mapped for video analytics.
 Each use case mapped to category, location, severity, time frequency is visible in tabular form.
 Time frequency refers to time taken for the first alert to raise.
 Search Box to search for a particular use case. One can filter data here based on any of the column data.

Live Feed
Figure: Live Video feed of the camera
 This Screen is to monitor the live feed of the camera.
 The live feed of the camera can be viewed by selecting an area and camera name from the dropdown.

d) User Management Section

Role Screen

Figure: Role Screen

 Screen to configure the role (s) in the application. Eg. Administrator, manager etc
 4 Columns to capture Unique role name, designation, and Department.
 Action Section: to edit the existing role details or to delete a role from the application.
 Create Role: To add a new role in the application. A pop screen is opened as shown below upon
clicking that button.

Role Policies Screen

Figure: Role Policies Screen


 Screen to define the role permissions to the configured roles/designations in the application.
 Users with these configured role policies (permissions) can access the screens and perform actions.
 User selects the Role dropdown on the top right corner & enables/disables the screen permission.
User Management Screen

Figure: User Management Screen


 Screen to view the user profiles configured in the application.
 Only the users configured in this screen will be able to Login into the application.
 User profiles can be configured using Create User button.
 Each user will have a unique username and password to login into the application.
 The access in the application of each user depends on the roles they are mapped to.
 Action Section: Only Admin could edit or delete the existing user.
 To give access to a new user to the application, click on ADD USER and fill required fields to configure a new
user.

Note: All the information given in the manual is accurate, however in case of any discrepancy changes may be made.

e) Camera Configuration

Camera Card:
o This is screen provides details of cameras configured for the location.
o Area Name: Location in the plant where camera is setup.
o Camera Name: A unique name assigned to each camera.
o Camera IP: IP address of each camera
o Resolution: the size of the digital image the camera produces.
o Username: The username to access the camera
o Use Case: With on click of the + symbol, the form to enable/disable the use cases will be opened.
o Base Image: Captures the basic view from the camera.
o Status: If the camera is active/ Inactive. Toggle button to change the status.
o Edit Icon: To edit any of the mentioned camera details.
o Delete: to delete the camera mapping.
o Add Camera: A click on it will open a new screen to add a camera to the configuration list as shown
below.

o With on click of the + symbol, the form to enable/disable the use cases as shown below will be
opened.
Figure: Feature Configuration Screen
 The third tab on the camera configuration screen
 The screen provides insight on use cases mapped for video analytics.
 Each use case mapped to category, location, severity, time frequency is visible in tabular form.
 Time frequency refers to time taken for the first alert to raise.
 Search Box to search for a particular use case. One can filter data here based on any of the column data.

Live Feed

Figure: Live Video feed of the camera


 This Screen is to monitor the live feed of the camera.
 The live feed of the camera can be viewed by selecting an area and camera name from the dropdown.

f) User Management Section

Role Screen

Figure: Role Screen

 Screen to configure the role (s) in the application. Eg. Administrator, manager etc
 4 Columns to capture Unique role name, designation, and Department.
 Action Section: to edit the existing role details or to delete a role from the application.
 Create Role: To add a new role in the application. A pop screen is opened as shown below upon
clicking that button.
Role Policies Screen

Figure: Role Policies Screen


 Screen to define the role permissions to the configured roles/designations in the application.
 Users with these configured role policies (permissions) can access the screens and perform actions.
 User selects the Role dropdown on the top right corner & enables/disables the screen permission.

User Management Screen

Figure: User Management Screen


 Screen to view the user profiles configured in the application.
 Only the users configured in this screen will be able to Login into the application.
 User profiles can be configured using Create User button.
 Each user will have a unique username and password to login into the application.
 The access in the application of each user depends on the roles they are mapped to.
 Action Section: Only Admin could edit or delete the existing user.
 To give access to a new user to the application, click on ADD USER and fill required fields to configure a new
user.

Note: All the information given in the manual is accurate, however in case of any discrepancy changes may be made.

You might also like