INTRODUCTION
MOTIVATION FOR THE RESEARCH
1.3 Method To Switch In The Network
As mentioned above, our lab system is now becoming overloaded with a shortage of flashing equipment for labs Moreover, the setup of these devices is very simple, but it takes a lot of time for testing engineers to disassemble manually In addition, these devices do not have a clear management system for usage time When someone has a need to use them, they have to contact each person in the team to know which lab the device is connected to and whether it is being used or not That is the reason why we develop a switch-in network device.
Price for each setup of IC5000 devices for lab could be take over €3000 So that if we prepare for each lab 1 IC5000 it will cost overall €12000 The same as IC5000 for each XCP setup it will cost for device and license €1800 and for the whole lab in the rack is €7200 Full cost for debugger device in test lab is €19200 It could be a huge amount for test lab setup These devices is require for testing lab but we don’t need to plug it all the time for lab it can be use in sharing mode With sharing mode, it could save €14400.
As our measure it takes around 15mins overall for each time for one person to switching debugger through the lab (10 mins in that for travel form the office to laboratory location) and it could be up to 30 mins of switching debugger support is require from another person due to it could take time to wait the setup success full confirmation from requester.
Full lab setup Sharing mode
Table 1: Estimate cost of lab setup
Support setup require Project owner setup
Moving from office to 10mins 10mins lab
Setup lab and check 5mins 5mins stability
Wait time for setup 5-15mins confirmation
Table 2: Estimate time to setup lab
METHOD TO SWITCH IN THE NETWORK
As mentioned above, our lab system is now becoming overloaded with a shortage of flashing equipment for labs Moreover, the setup of these devices is very simple, but it takes a lot of time for testing engineers to disassemble manually In addition, these devices do not have a clear management system for usage time When someone has a need to use them, they have to contact each person in the team to know which lab the device is connected to and whether it is being used or not That is the reason why we develop a switch-in network device.
Price for each setup of IC5000 devices for lab could be take over €3000 So that if we prepare for each lab 1 IC5000 it will cost overall €12000 The same as IC5000 for each XCP setup it will cost for device and license €1800 and for the whole lab in the rack is €7200 Full cost for debugger device in test lab is €19200 It could be a huge amount for test lab setup These devices is require for testing lab but we don’t need to plug it all the time for lab it can be use in sharing mode With sharing mode, it could save €14400.
As our measure it takes around 15mins overall for each time for one person to switching debugger through the lab (10 mins in that for travel form the office to laboratory location) and it could be up to 30 mins of switching debugger support is require from another person due to it could take time to wait the setup success full confirmation from requester.
Full lab setup Sharing mode
Table 1: Estimate cost of lab setup
Support setup require Project owner setup
Moving from office to 10mins 10mins lab
Setup lab and check 5mins 5mins stability
Wait time for setup 5-15mins confirmation
Table 2: Estimate time to setup lab
1.2.1 Scope And Objective of Project
This device will use to switch debugger ( XCP ) and flashing device ( IC5000 ) automatically and remotely control it through Raspberry Pi between 4 lab in available testing rack of EDA9 With the scope switching these device we would build a tool to monitor the lab user and locking lab access for which lab setup under test.
- Automatically setup flashing/debugging device
- Provide a booking system to book the device and also check the status of the flashing device.
- Size of the device: fit with a laboratory rack(160cm x 50cm x 25cm)
- Run with AC voltage – 220V AC or 12V DC.
- Implement with fastest solution to maintain the lack of device in lab
- Run with full function as human setup and can control manuals when error occurs.
- Reduce time to switch debugger more than 50% as manual work
Figure 1: Rack setup for switching device
1.3 METHOD TO SWITCH IN THE NETWORK
Switched communication networks route data from a source to a destination through a number of intermediary nodes The method by which nodes control or switch data to transmit it between particular points on a network is known as switching There are 3 common switching techniques:
Message Switching is a connectionless network switching approach in which the complete message is routed from the sender node to the receiver node one hop at a time.
It served as the predecessor to packet switching Before the invention of packet switching, message switching adequately replaced circuit switching Data transmissions over telex networks and paper tape relay systems were its first uses Ad hoc sensor networks, military networks, and satellite communications networks continue to use message switching even though packet switching has completely replaced it [1]
The message-switched network stores and delays the message if all of the network's resources are exhausted or if the network becomes congested until enough resources are available for efficient transmission In message switching, the source node and destination nodes are not directly coupled Instead, the task of sending messages from one node to the next is handled by intermediary nodes, most often switches Because of this, each intermediate node in the network must store each message before sending it again as soon as the necessary resources are available If the resources are not available, messages are kept on file indefinitely Store and forward is the name given to this procedure Every message must have a header, which typically includes routing details like the source and destination, expiration time, priority level, and other information.
Because message switching treats each message as a single complete entity, each switching node in a message switching network needs to have enough storage to buffer messages As a result, the message is strictly discarded if its size exceeds the switch's storage capacity One of the key drawbacks of using these switching methods is this.
Figure 2: Message switching method diagram
Packet Switching is a switching mechanism that divides a message into smaller bits and sends them separately rather than all at once The message is broken up into smaller pieces called packets, and each packet is assigned a specific number to indicate its position upon receipt The source address, destination address, and sequence number are all contained in a packet's header Throughout the network, packets will take the shortest route before being reassembled in the right order at the receiving end [2]
Each packet in a packet switching technique consists of a header and a payload The addressing information used by the intermediate routers to guide the packet to its destination is contained in the packet header The payload carries the actual data.
A packet is transmitted as soon as it becomes available in a node based on its header information The packets that make up a message are not all sent on the same path. The message's packets consequently reach their destination out of order Rearranging the packets at the destination is necessary to find the original message.
Circuit switching is a network technology implemented in telecommunications networks In circuit switching, before two network nodes can communicate, they must first create a dedicated communications channel (circuit) through the network This technique creates and maintains a dedicated physical circuit between two nodes or locations for the duration of a connection Circuit switched networks are also known as connection-oriented networks because a dedicated circuit must be established before data can be sent over it [3]
The fundamental concept is to establish a connection path or link between two hosts so they can exchange data (messages) Once the connection has been made, the two hosts are prepared to start speaking Because voice traffic needs a single, dedicated physical path with consistent timing to maintain a constant delay on the circuit, telephone networks are typically circuit switched The traditional telephone network is the largest circuit switched network (POTS) Circuit switching is also used in the original GSM network.
LITERATURE REVIEW
DEVICE IN THE SYSTEM SPECIFICATIONS REVIEW
● 2.1.2 Vector VX1000 series 2.2 JTAG INTERFACE OF ECU 2.3 NETWORK SWITCHING REVIEW
● 2.3.3 Architecture of a network 2.4 MECHANICAL ANALYSIS
- 2.5.1.5 Identification And Interpolation ● 2.5.2 Features Haar – Like
● 2.5.4 Multi-tasking Cascaded Convolutional Networks (MTCNN)
2.1 DEVICE IN THE SYSTEM SPECIFICATIONS REVIEW 2.1.1 IC5000
Connector: 14-pin 2.54mm MPC5xxx Debug Adapter
This debug adapter is used to connect the iC5000 and the iC5700 BlueBox to the MPC5xxx/SPC5 based target It’s used to connect to the embedded target featuring a 14-pin 2.54mm pitch target debug connector with the MPC5xxx/SPC5 pinout The debug adapter connects to the 25 cm 40-pin ribbon cable coming from the BlueBox and to the target debug connector on the other side.
14-pin 2.54mm MPC5xxx Debug Adapter features resettable fuses on all connected pins These protect debug signals against overcurrent and cycle back to a conductive state after the excessive current fades away Mandatory pins on the microcontroller side are the GND, Vref, nRESET, TMS, TDI, TDO and TCK [5]
Figure 7: 14-pin 2.54mm MPC5xxx Debug Adapter
The VX1000 system is a scalable solution with top performance for your measurement and calibration tasks It can be used in the vehicle – both in the interior and in the engine compartment – on test benches and in the laboratory Especially When developing ADAS ECUs, this allows you to control raw data captured by high resolution radar sensors in combination with XCP data, e g object/tracking lists [6]
The system forms the interface between the ECU and a measurement and calibration tool such as CANape.For high data throughput with minimal impact on ECU run-time, data is accessed over the microcontroller-specific data trace and debug ports.
The VX1000 Base Module is connected to the PC over XCP on Ethernet, an OEMindependent ASAM standard (www.asam.net) that is widely used in the automotive industry The VX1000 measurement hardware is connected to the ECU via a POD (Plug-On device).Depending on the available microcontroller interface, either the data trace or a copying method can be used to acquire measurement data.
Figure 8: VX1060 Base module specsification
The VX1000 System is a scalable solution with top performance for your ECU measurement and calibration tasks It can be used in the vehicle – both in the cabin and in the engine compartment – on test benches and in the laboratory Especially when developing ADAS ECUs, this allows you to control raw data captured by high- resolution radar sensors in combination with XCP data The system forms the interface between the ECU and a measurement and calibration tool.
The VX1000 Base Module is connected to the PC over XCP on Ethernet, anOEM-independent ASAM standard that is widely used in the automotive industry TheVX1000 measurement hardware is connected to the ECU via a POD (Plug-On device).
NETWORK SWITCHING REVIEW
● 2.3.3 Architecture of a network 2.4 MECHANICAL ANALYSIS
- 2.5.1.5 Identification And Interpolation ● 2.5.2 Features Haar – Like
● 2.5.4 Multi-tasking Cascaded Convolutional Networks (MTCNN)
2.1 DEVICE IN THE SYSTEM SPECIFICATIONS REVIEW 2.1.1 IC5000
Connector: 14-pin 2.54mm MPC5xxx Debug Adapter
This debug adapter is used to connect the iC5000 and the iC5700 BlueBox to the MPC5xxx/SPC5 based target It’s used to connect to the embedded target featuring a 14-pin 2.54mm pitch target debug connector with the MPC5xxx/SPC5 pinout The debug adapter connects to the 25 cm 40-pin ribbon cable coming from the BlueBox and to the target debug connector on the other side.
14-pin 2.54mm MPC5xxx Debug Adapter features resettable fuses on all connected pins These protect debug signals against overcurrent and cycle back to a conductive state after the excessive current fades away Mandatory pins on the microcontroller side are the GND, Vref, nRESET, TMS, TDI, TDO and TCK [5]
Figure 7: 14-pin 2.54mm MPC5xxx Debug Adapter
The VX1000 system is a scalable solution with top performance for your measurement and calibration tasks It can be used in the vehicle – both in the interior and in the engine compartment – on test benches and in the laboratory Especially When developing ADAS ECUs, this allows you to control raw data captured by high resolution radar sensors in combination with XCP data, e g object/tracking lists [6]
The system forms the interface between the ECU and a measurement and calibration tool such as CANape.For high data throughput with minimal impact on ECU run-time, data is accessed over the microcontroller-specific data trace and debug ports.
The VX1000 Base Module is connected to the PC over XCP on Ethernet, an OEMindependent ASAM standard (www.asam.net) that is widely used in the automotive industry The VX1000 measurement hardware is connected to the ECU via a POD (Plug-On device).Depending on the available microcontroller interface, either the data trace or a copying method can be used to acquire measurement data.
Figure 8: VX1060 Base module specsification
The VX1000 System is a scalable solution with top performance for your ECU measurement and calibration tasks It can be used in the vehicle – both in the cabin and in the engine compartment – on test benches and in the laboratory Especially when developing ADAS ECUs, this allows you to control raw data captured by high- resolution radar sensors in combination with XCP data The system forms the interface between the ECU and a measurement and calibration tool.
The VX1000 Base Module is connected to the PC over XCP on Ethernet, an OEM-independent ASAM standard that is widely used in the automotive industry The VX1000 measurement hardware is connected to the ECU via a POD (Plug-On device).
Joint Test Action Group (JTAG) is the common name used for a debugging, programming, and testing interface typically found on microcontrollers, ASICs, and FPGAs It makes it possible to test, program, and/or debug all components with this interface using a single connector on a PC board that can daisy chain them all together.
The organization that created the IEEE 1149.1 standard is known as JTAG. The Test Access Port (TAP) controller logic used in processors with JTAG interfaces is defined by this standard [7]
TMS - selects the device under test
TCK - clocks data into TDI
TDI - the test or programming data input, cascaded through all JTAG compliant devices in the system
There is no standard JTAG connector or pinout, so suppliers are able to define their own.
The physical and logical arrangement of nodes and connections in a network is referred to as network topology Switches, routers, and software with switch and router features are common components of nodes Graphs are commonly used to represent network topologies.
The arrangement of networks and the relative location of traffic flows are described by network topologies Administrators can use network topology diagrams to determine the best node placements and the best traffic flow path Network topology has a significant impact on how a network operates The topology, in particular, has a direct impact on network functionality Choosing the right topology can help boost performance because a well-chosen and maintained network topology improves energy efficiency and data transfer rates.
Physical network topologies and logical network topologies are the two types of network topologies The actual arrangement of nodes and links makes up a network's physical topology Logical network topologies specify a network's configuration, including the nodes that connect and how they do so, as well as the way that data is transferred.
Figure 11: Types of network topology
There are several types of topologies For example, physical topologies include the following:
• Bus network Every node in the bus network topology is linked in series by a single wire Today's cable broadband distribution networks are the main places where this configuration may be found.
• Star network A central device in the star network design links to every other node via a central hub The majority of wired home and office networks as well as switched local area networks using Ethernet switches have a physical star topology.
• Ring network The nodes are linked together in a closed-loop manner in the ring network topology While some rings can only transmit data in one direction, others can transmit data in both directions As traffic can flow in either direction to reach a node, bidirectional ring networks are more resilient than bus networks.
There are many different types of network topology tools available, such as setup and administration tools, network performance software, and network mapping software For instance, network configuration software automates repetitive activities while assisting in network configuration These technologies can automatically discover network nodes, highlight obvious risks, and are frequently used to create complex network topologies.
MACHINE VISION
- 2.5.1.5 Identification And Interpolation ● 2.5.2 Features Haar – Like
● 2.5.4 Multi-tasking Cascaded Convolutional Networks (MTCNN)
2.1 DEVICE IN THE SYSTEM SPECIFICATIONS REVIEW 2.1.1 IC5000
Connector: 14-pin 2.54mm MPC5xxx Debug Adapter
This debug adapter is used to connect the iC5000 and the iC5700 BlueBox to the MPC5xxx/SPC5 based target It’s used to connect to the embedded target featuring a 14-pin 2.54mm pitch target debug connector with the MPC5xxx/SPC5 pinout The debug adapter connects to the 25 cm 40-pin ribbon cable coming from the BlueBox and to the target debug connector on the other side.
14-pin 2.54mm MPC5xxx Debug Adapter features resettable fuses on all connected pins These protect debug signals against overcurrent and cycle back to a conductive state after the excessive current fades away Mandatory pins on the microcontroller side are the GND, Vref, nRESET, TMS, TDI, TDO and TCK [5]
Figure 7: 14-pin 2.54mm MPC5xxx Debug Adapter
The VX1000 system is a scalable solution with top performance for your measurement and calibration tasks It can be used in the vehicle – both in the interior and in the engine compartment – on test benches and in the laboratory Especially When developing ADAS ECUs, this allows you to control raw data captured by high resolution radar sensors in combination with XCP data, e g object/tracking lists [6]
The system forms the interface between the ECU and a measurement and calibration tool such as CANape.For high data throughput with minimal impact on ECU run-time, data is accessed over the microcontroller-specific data trace and debug ports.
The VX1000 Base Module is connected to the PC over XCP on Ethernet, an OEMindependent ASAM standard (www.asam.net) that is widely used in the automotive industry The VX1000 measurement hardware is connected to the ECU via a POD (Plug-On device).Depending on the available microcontroller interface, either the data trace or a copying method can be used to acquire measurement data.
Figure 8: VX1060 Base module specsification
The VX1000 System is a scalable solution with top performance for your ECU measurement and calibration tasks It can be used in the vehicle – both in the cabin and in the engine compartment – on test benches and in the laboratory Especially when developing ADAS ECUs, this allows you to control raw data captured by high- resolution radar sensors in combination with XCP data The system forms the interface between the ECU and a measurement and calibration tool.
The VX1000 Base Module is connected to the PC over XCP on Ethernet, an OEM-independent ASAM standard that is widely used in the automotive industry The VX1000 measurement hardware is connected to the ECU via a POD (Plug-On device).
Joint Test Action Group (JTAG) is the common name used for a debugging, programming, and testing interface typically found on microcontrollers, ASICs, and FPGAs It makes it possible to test, program, and/or debug all components with this interface using a single connector on a PC board that can daisy chain them all together.
The organization that created the IEEE 1149.1 standard is known as JTAG. The Test Access Port (TAP) controller logic used in processors with JTAG interfaces is defined by this standard [7]
TMS - selects the device under test
TCK - clocks data into TDI
TDI - the test or programming data input, cascaded through all JTAG compliant devices in the system
There is no standard JTAG connector or pinout, so suppliers are able to define their own.
The physical and logical arrangement of nodes and connections in a network is referred to as network topology Switches, routers, and software with switch and router features are common components of nodes Graphs are commonly used to represent network topologies.
The arrangement of networks and the relative location of traffic flows are described by network topologies Administrators can use network topology diagrams to determine the best node placements and the best traffic flow path Network topology has a significant impact on how a network operates The topology, in particular, has a direct impact on network functionality Choosing the right topology can help boost performance because a well-chosen and maintained network topology improves energy efficiency and data transfer rates.
Physical network topologies and logical network topologies are the two types of network topologies The actual arrangement of nodes and links makes up a network's physical topology Logical network topologies specify a network's configuration, including the nodes that connect and how they do so, as well as the way that data is transferred.
Figure 11: Types of network topology
There are several types of topologies For example, physical topologies include the following:
• Bus network Every node in the bus network topology is linked in series by a single wire Today's cable broadband distribution networks are the main places where this configuration may be found.
• Star network A central device in the star network design links to every other node via a central hub The majority of wired home and office networks as well as switched local area networks using Ethernet switches have a physical star topology.
• Ring network The nodes are linked together in a closed-loop manner in the ring network topology While some rings can only transmit data in one direction, others can transmit data in both directions As traffic can flow in either direction to reach a node, bidirectional ring networks are more resilient than bus networks.
There are many different types of network topology tools available, such as setup and administration tools, network performance software, and network mapping software For instance, network configuration software automates repetitive activities while assisting in network configuration These technologies can automatically discover network nodes, highlight obvious risks, and are frequently used to create complex network topologies.
DESIGN AND IMPLEMENTATION
BLOCK DIAGRAM
FLOWCHART DESIGN
• 3.3.2 Switch Box Controller And Function Flowchart
ELECTRICAL DESIGN
• 3.5.1 The Slection Of Electric Components
MECHANICAL DESIGN
- 3.6.1.2 Calculation On Lead Screw Drive ( Y Axis):
SWITCH BOX TOOL DESIGN
: To supply 5VDC and 12VDC power for the whole circuit.
: To receive control signals from application, process, transfer control signal to actuator servo motor via a4988 driver, receive feed-back signals from board to app to show status of device
: Moving flashing headers through predefined location connector
: To checking lab status and control the switch box : Store status data of the lab under format txt and csv
: a bat script to get data from the lab and store to share folder to checking status
Figure 31: Mechanical BLock Diagram Of Switch Box
Block listing of mechanical part
: 12 V power supply for stepper motor
: 5V power supply for Raspberry Pi
: Output board connect to lab
: Input board connect to debugger
For this block diagram we have the switch box overview Firstly, Input board will be connected with the debugger to switch it to each lab Output board will be connected to output board to transfer data from Input debugger.
Raspberry Pi will handle our system with switch tool It collects data from share folder and use train model to process the system After get control from user it will send command to Arduino.
Arduino get the command from Raspberry will control operating header to plug into respective labs Operating header moves by operation of 2 x-axis (mini servo motor) and z-axis (A4988 driver control the Stepper motor).
To operation switch box we use EDA9 lab tool to control the switch
- For control switch device to switch debugger to needed lab.
To control any channel, Users will use the EDA9 lab tool application to communicate with the device though the switch The App connects to switch via internal network to the Raspberry Pi then, it transmits them to Arduino Uno through serial communication protocol The Arduino Uno then processes that input signal and triggers the servo motor to switch debugger to the correspondent channels The status of the channel will be sent back to the model Arduino USB serial port again.
- For check availibility of labs
To check the lab application will access to share folder location which store all lab data ( lab name, user using, availibility of lab, ECU type connected to lab, ) and show it to user For collecting these data Executable file will run in each lab continously, it will collect status of the lab and save these data as txt and csv file to share location Each lab will have there own folder to save data.
The program starts with turn on the application for box controlling and lab management, which is contained inside the main processor The processor will connect with LAN server network of BOSCH and SQLite database to read data from csv file and latest variable in the database Then the tool will check whether the user make any change in the system and update the variable to database system will run the actuators the make the variable correct arcording to the change that the user makes Also, the user can use some function to communicate with others labs, such as:message or check the history of the latest user After using these functions, the tool with save a folder of text to save all the changes and records in network folder The statistic will be update to database and save as a value in csv file This method will also save time for managing lab usage by looking up in the csv might be much faster than checking in normal database.
3.3.2 Switch Box Controller And Function Flwchart
The switch box controller will read data from database to update all the records to the monitoring table so that the user can check the status of the lab, who using it at that moment and whether that lab is locked or not.
The first function is the “Choose lab”: The user will choose the lab and setup they want to connect after checking the lab state in lab monitor table When the user decides the lab that he/she want, the function will send a data of that lab to the
The “Connect” function is for controlling the actuator and helping connecting the setup remotedly If the lab user wants to connect is accessed by another, it will send a notification to let the user know When the checking is finish and the lab is also available, the function send signal from mainprocessor to the controller part From here, the controller receive signal and run the actuator to the position of the output port and plug in to complete the process Then, there is a table show up to inform the user about the status.
The data about the status is also updated to the database and “Disconnect” function Then, when the user needs to unplug the setup, the mainprocessor will send a signal to the controller and run the request from user After finishing, the data are also updated to the database and show on the monitoring table to let the user know.
For the “Message” function, the user will need to choose which lab they want to send the message to Then, the text file will be created in the LAN network folder.
At the same moment, on the computer of the lab, a text file containing the message will be automatically opened on the display to inform other teammates.
The information of all recent users will be store in BOSCH network Our tool application will read the information and send it back to current user as notification window when them press the “History” function Every lab in BOSCH is connected to a Real Time Transport Protocol (RTPC) and a computer The “Access” function will connect to the remote file to access into the computer of the lab The rdp files of the labs are stored in the LAN folder to record the usage also A rdp file contains the necessary information for a connection to a terminal server, including the configuration of the options when the file was saved; used by Microsoft's Remote Desktop Services and related applications.
The user can also refresh the data in monitor table using “Refesh” function By doing this, the application will read the data in LAN folder and SQLite database to check if there is any change, then it will update the table with the newest statistics.
When the user is using the lab and want to keep it for automation run overnight, he/she can use the “Lock” or “Unlock” function The function works base on the face recognition using Cascade and CNN to operate The lab after locking will not allow another to login and only be unlocked by “Unlock” function The data about the lock or unlock status are sent to the database and csv file in LAN network.
All the status will be stored in database and csv file for checking purpose and all users can trace back to the latest user if there is any issue.
Figure 34: Machine Vision Method Flowchart
The system will connect to the database and csv file in LAN network and show the information in the table The system and user are able to check the current state of the lab.Then user need to access to lab first Then, the user could run the lock or unlock function.The face recognition will open to check by activate the webcam It will detect base onCascade method and recognize base on the trained dataset and model with CNN After recognizing the face correctly, the function saves the label information and compare with the BOSCH ID that user provides If it is a match case, it will generate the lock process and avoid any outside login The data about the state and user also update to database and monitor table However, if not, the application sends notification “Please check again”, then shutdown the function window At this step, to run the function again, the user needs to run back to step face detection.
Figure 35: Switch Box Body 3D design
3.5.1 The Slection Of Electric Components
DESIGN ANALYSIS
ESTABLISH TARGET SPECIFICATIONS
1 It need to switch debugger exactly to destination lab
2 It need to have stable face detection function
3 It need to control easily
4 System size is space efficient and flexible
5 It needs to be easy to maintain
6 It needs to be easy to install
7 It needs to have low noise
10 Able to work continuously and stably
11 It need to be ESD protected
AccurateSwitch CostSetupLab RecognitionFace Shape Weight Dimension Loudness StepsInstruction ConsumptionPower ESD
4.1.3 Proposed specifications and experimental methods
Metric No Specification Name Unit Marginal Ideal value Type Measurement
1 Total Mass kg 0 - 5 2 Basic Weight scale
8 Face Recognition % 90-100 100 Basic Test on sample
9 Switch Accurate % 90-100 100 Basic Test on sample
Table 6: Proposed specifications and experimental methods
EXPERIMENTS
METRICS DESIGN VALUE ACTUAL VALUE
In order to have the most objective results and evaluate the performance of the system, the research team conducts tests for switch debugger between labs randomly The team performed the debugger switch to the labs 10 times in turn for each lab The labs that implement switch debugger are HC-C-000QT, HC-UT31181C, HC-
Figure 71: Rack of lab use for testing
Step 1: Setup the switch box to 4 defined lab, ECU and debugger respectively.
Figure 72: Setup switch box with lab device
Step 2: Turn on check lab tool and select lab to connect
Figure 73: Choosing lab to connect
Step 3: Check debugger connection status on the flashing tool
Figure 74: Check communication of debugger with lab
Figure 75: Start flashing to ECU
After the experiment, the group obtained the following results:
No Lab name Exact number of times Exact ratio Fail ratio
Table 8: Result of switch box testing
The average plug success rate of the switch box is 90% (NOT PASS)
We had asked some members for a clip of their face The video is about 40 seconds to 1 minute Then, we will use Cascade Classifier technique to cut the frames that contain faces The resulted images then save in the output folder for training purpose later A Haar-like feature consists of dark regions and light regions It produces a single value by taking the difference of the sum of the intensities of the dark regions and the sum of the intensities of light regions It is done to extract useful elements necessary for identifying an object.
The Cascade Classifier will detect the face in clip base on the training xml file. Then, the resulted images with the ratio of width and height 1:1 will be added to output folders.
The data of faces of every member will cut from the video that has their faces Then, we will choose and preprocess the given data For each dataset of one face, we will label into specific folder which named by their name or BOSCH ID For each data we will take 100 samples and put them together in the labeled folders.
Figure 77: Collect data user face to train
As using matplotlib to check the label whether it is mapped to the correct sample As the result, 16 random samples is called out and the labels are mapped correctly to the images.
Adam optimization is a stochastic gradient descent method that is based on adaptive estimation of first-order and second-order moments Adam is an optimization algorithm that can be used instead of the classical stochastic gradient descent procedure to update network weights iterative based in training data
According to Kingma et al., 2014, the method is "computationally efficient, has little memory requirement, invariant to diagonal rescaling of gradients, and is well suited for problems that are large in terms of data/parameters".
When introducing the algorithm, the authors list the attractive benefits of using Adam on non-convex optimization problems, as follows:
• Invariant to diagonal rescale of the gradients.
• Well suited for problems that are large in terms of data and/or parameters.
• Appropriate for non-stationary objectives.
• Appropriate for problems with very noisy/or sparse gradients.
• Hyper-parameters have intuitive interpretation and typically require little tuning.
Adam is a combination of the advantages of two other extensions of stochastic gradient descent Specifically:
• Adaptive Gradient Algorithm (AdaGrad) that maintains a per-parameter learning rate that improves performance on problems with sparse gradients (e.g. natural language and computer vision problems).
• Root Mean Square Propagation (RMSProp) that also maintains per-parameter learning rates that are adapted based on the average of recent magnitudes of the gradients for the weight (e.g how quickly it is changing) This means the algorithm does well on online and non-stationary problems (e.g noisy).
Adam realizes the benefits of both AdaGrad and RMSProp.
Keras also provides a function to create a plot of the network neural network graph that can make more complex models easier to understand:
• The layers and their order in the model.
• The output shape of each layer.
• The number of parameters (weights) in each layer.
• The total number of parameters (weights) in the model.
The function on the application working pretty correctly in both condition normal light and reduced light Also, we try to check whether it recognize correctly if there is glasses and no glasses The trained data, however, have some duplicated samples, which cause the label have a percentage of around 10 to 15 is wrong detection.
Despite that, the trained model could recognize face although we test in facemask condition One withdraw in this condition is that the delay for the system to detect a face is quite slow The user might have to turn there head a little bit to both side so that the system could start to detect and recognize.
Also, there are two testing condition related to the background: no complex object behind and with object and in the dark In the simple background, the detection is good-performance The delay in detection is very fast so the user might not feel uncomfortable.
In the dark and complex background, the detection may get a wrong result due to some light object in the dark cause interrupt in detection process Moreover, the delay in recognition is also a bit slower, but it still manage to recognize the face In the enviroment of completely dark, the face detection could not work properly and cause many fault detection and recognition This defect could come from the reason that the dataset is not cover enough for all cases Also, in the xml file for Cascade Classifier, the data are not having faces in dark environment.
Figure 82: Face recognition Test with dark environment
We also test the “lock” function at the office condition The office condition has better brightness and less direct light to camera, which may cause blur effect.
We test in normal condition at office with a few conplex objects behind For every test, we will perform it for 5 to 10 times with some different backgrounds and face angles.
Figure 83: Face recognition test in office
The function works properly at most of the time However, when there are other subjects such as, picture of faces or more colleagues’ faces in the frame, the function detects them also At the moment, the function takes the latest data that it recognized This could be a defect in comparing data input by the users.
The function could detect face with no more than 45 degrees turning around.Also, we test the situation while users are having a meeting or a call and they need to use headphone, the function can find and label the face correctly despite there are many objects behind could cause interrupt.
Figure 84: Face recognition with many angles and headset
Figure 85: Face recognition with headset
For mask-wearing condition, the face detection could not work properly and cause some faults in detection and recognition The function will cause some errors such as: no face detection, wrong detection, long time delay and detecting others objects beside the user This problem could come from the dataset, which is not cover all situations, and the CNN algorithms with model are not the best optimization.
Figure 86: Error in face recognition
Figure 87: Wrong detection when wearing mask
CONCLUSIONS
PROBLEMS AND SOLUTION
After a period of research, learn with the help of MS Nguyen Minh Triet, the topic "Research, Design And Implementation Of Switch-In Network Device Connecting With Flashing Devices And Multiple Ecus" that the team completed, met the requirements quite well Switch Box works relatively stably, greatly reducing the time for lab setup Tool to support check lab works smoothly, stable function help to update correctly and fully the current status of the lab as well as the current user.
The project implemented by the team has achieved about 90% of the set target:
- Raspberry Pi 4 is still limited in terms of security, so it can't access the company's network to get data (The alternative is to use the lab server directly to operate the tool and soon find a way to get the right to transfer the tool to the Raspberry Pi to operate).
- The direct use of the camera on the user's personal laptop is a cheap but limited solution when the camera quality is not uniform There are still many backlogs of security issues as well as limitations when the camera is mechanically locked.
- After many experimental runs, the system model has been designed and built with a relatively stable operation: switch box can switch successful 85%, the time to setup the lab is significantly reduced from 15-30mins to 5-10mins (not require effort to support if user not availble in office)
Estimate cost save for switch box compare with full setup: €14250
Switch box setup Full lab setup
Table 10: Calculated cost save with switch box
Estimate effort save for switch box setup compare with manual setup
Switch box setup Manual lab setup Support lab setup
Moving from office - ~10 mins ~10 mins to lab
Setup Lab ~5 mins ~5 mins ~5 mins
Total time ~5 mins ~15 mins ~25-30 mins
Table 11: Calculated time save with switch box
Compare with manual setup Switch box save 10mins effort each time
Compare with manual lab setup support switch box save effort 20-25mins each time
- Switch box operation is not really stable, location accuracy is not high.
- Raspberry Pi not yet can read data from company intranet due to security.
- The face recognition system for lock / unlock feature only works stably under full office lighting conditions Under low light conditions, the system is noisy and unstable
- Add a sensor to determine the position to help plug more accurately at the plug position
- Raise access right for Raspberry Pi to access the company intranet and share drive
- Optimize the recognition algorithm and add appropriate filters to make the system work more accurately in low light conditions
FUTURE WORK
Research to find a way to stabilize the switch box as well as the tool Develop a switch box that can be applied to other departments with similar needs but different lab structures.
Improved size of the switch box to save more space
Develop switch box to integrate with Jenkins system to support continuous automation testing
Design a new method for booking lab system with high security feature Change the plug header design to meet industrial standard
[1] P Pandey, "scaler," 8 2022 [Online] Available: https://www.scaler.com/topics/message-switching/.
[2] Avinetworks, "Avinetworks," [Online] Available: https://avinetworks.com/glossary/packet-switching/.
[3] B Lutkevich, "Techtarget," [Online] Available: https://www.techtarget.com/searchnetworking/definition/circuit-switched.
[4] iSYSTEM, iC5000 BlueBox user manual.
[5] iSYSTEM, IC50150 Hardware User Manual.
[6] Vector, VX000 Series User Manual.
[7] Hardwarebee, "Hardwarebee," [Online]. https://hardwarebee.com/introduction-to-jtag-interface/.
[8] Trần Văn Tuấn, Phạm Văn Long, "Thiết kế và thi công hệ thống phân loại sản phẩm bít chì theo màu sắc," Trường ĐH SPKT, Ho Chi Minh, 2020.
[9] Nông Văn Tân, Trần Thị Mỹ Khiêm, "Ứng dụng xử lý ảnh vào việc phát hiện ngủ gật dùng kit Raspberry, Đồ án tốt nghiệp," Trường ĐH SPKT, Ho Chi Minh, 2018.
[10] H Ha, "viblo," [Online] Available: https://viblo.asia/p/tim-hieu-ve-phuong- phap-nhan-dien-khuon-mat-cua-violas-john-ByEZkNVyKQ0.
[11] C M Hieu, "viblo," [Online] Available: https://viblo.asia/p/adaboost-buoc-di- dau-cua-boosting-gAm5yrGwKdb.
[13] R Pi, "Raspberry Pi 4 Model B Specification".
[14] NIDEC, "NIDEC Bipolar Type Catalogue".
[15] Lê Văn Uyển, Vũ Lê Huy, "A DESIGNING AND SECLECTING METHOD FOR BALL SCREW TRANMISSION," Trường Đại học Bách Khoa Hà Nội , Ha
[17] Jadem-Tech, "Jadem-Tech," [Online] Available: http://jadem-tech.com/san- pham/16503/vo%CC%80ng-bi-truo%CC%A3t-lm.
103
Tool application code: import os import sys import csv import pyautogui import serial import time import pandas as pd import tkinter as tk from tkinter import * from tkinter import ttk from tkinter.ttk import * from tkinter import messagebox from threading import Thread from pathlib import Path import numpy as np from PIL import Image from datetime import datetime import tensorflow as tf from tensorflow.python import keras from tensorflow.keras import layers import cv2 import sqlite3
_sb_dir = str(Path( file ).resolve().parents[0]) sys.path.append(_sb_dir) path_name = os.path.join(_sb_dir, 'Name.txt') path =
'//hc-c-004dj/nky7hc/Lab_Monitoring/' dir_data = "Data" dir_ac_data = "Data/AC_Lab" dir_hs = "Data/History" status_path = 'C:/Users/nky7hc/Downloads/status.csv' rlab_path = 'C:/Users/nky7hc/Downloads/recent_lab.csv' path_dir_lb = os.path.join(path,dir_data,'NameLab.txt') path_database = os.path.join(path,dir_data,'database.csv') path_sys = os.path.join(path,dir_data,'sys.txt') path_hs_display = os.path.join(path,dir_hs,'history.txt') path_icon = os.path.join(path,dir_data,'icon_2.ico')
Name_Lab = [] data = [] name = "" def dir_Name_Lab(): try: global Name_Lab
Name_Lab = [] if not os.path.exists(path_dir_lb):
Write_txt(path_dir_lb,'Name') with open(path_dir_lb,"r") as file:
Name_Lab = file.readlines() except Exception as bug:
Write_txt(path_sys,bug) def Pathconfig(path,dir_Lab): path_ui = "CheckLab/share/user_info.txt" path_user_infor = os.path.join(path,dir_Lab,path_ui) return path_user_infor def Pathconfig_ms(path,dir_Lab): path_ui = "CheckLab/share/message.txt" path_user_infor = os.path.join(path,dir_Lab,path_ui) return path_user_infor def Pathconfig_hs(path,dir_Lab): path_ui = "CheckLab/log/remote_log.txt" path_cp_hs = os.path.join(path,dir_Lab,path_ui) return path_cp_hs def Pathconfig_ac(path,dir_ac_data,Name): path_cp_ac = os.path.join(path,dir_ac_data,Name+'.rdp') def Path_UI_fn(): global Path_UI,Name_Lab
Path_UI = [] for i in range(len(Name_Lab)):
Name_Lab = str(Name_Lab[i]).strip()
Path_UI_Lab = Pathconfig(path,Name_Lab )
Path_UI.append(Path_UI_Lab) def Path_Message(): try: global Path_MS,Name_Lab
Path_MS = [] for i in range(len(Name_Lab)):
Name_Lab = str(Name_Lab[i]).strip()
Path_MS_Lab = Pathconfig_ms(path,Name_Lab ) Path_MS.append(Path_MS_Lab) except Exception as bug:
Write_txt(path_sys,bug) def Path_history(): try: global Path_HS,Name_Lab
Path_HS = [] for i in range(len(Name_Lab)):
Name_Lab = str(Name_Lab[i]).strip()
Path_HS_Lab = Pathconfig_hs(path,Name_Lab )
Path_HS.append(Path_HS_Lab) except Exception as bug:
Write_txt(path_sys,bug) def path_ac_data(): global Path_AC,Name_Lab
Path_AC = [] for i in range(len(Name_Lab)):
Name_Lab = str(Name_Lab[i]).strip()
Path_AC_Lab = Pathconfig_ac(path,dir_ac_data,Name_Lab ) Path_AC.append(Path_AC_Lab) def Group_Data(): global data,Path_UI,Name_Lab data.clear()
Path_UI_fn() for i in range(len(Name_Lab)): temp = read_data(Path_UI[i]) data.append(temp)
# # # Process data def read_data(path_user_infor): try: f_cp = files[2].split(":") f_ECU = files[3].split(":") f_State = files[4].split(":") f_user = f_user[1] f_IP = f_IP[1] f_cp = f_cp[1] f_ECU = f_ECU[1] f_State = f_State[1] data = f_ECU,f_State,f_user,f_IP except: data = "Error","Error","Error","Error" return data def get_myComputer(): fqdn = None cmd_resp = os.popen('net config workstation | findstr /C:"Full Computer name"').readlines() if(len(cmd_resp) > 0): fqdn = cmd_resp[0].split('Full Computer name')
[1].strip().lower() return fqdn def get_myIP(): ipv4_addr = None cmd_resp = os.popen('ipconfig | findstr /C:"IPv4 Address"').readlines() if(len(cmd_resp) > 0): ipv4_addr = cmd_resp[0].split(':')[1].strip() return ipv4_addr def get_myName(): global name my_name = None
105 cmd_resp = os.popen('net user %USERNAME% /domain | FIND /I
"Full Name"').readlines() if(len(cmd_resp) > 0): my_name = cmd_resp[0].split('Full Name')[1].strip() name = my_name def FileWrite(path_database,my_name): with open(path_database,'a+', encoding='UTF8',newline='') as f: writer = csv.writer(f) writer.writerow([my_name]) def write_data_db(path_name,data_database_user): global name f_cp = get_myComputer() f_ip = get_myIP() name = check_Name(path_name) if not os.path.exists(path_database):
FileWrite(path_database,['admin_computer;admin_Ip;admin_name']) my_name = f_cp.strip() + ';' + f_ip+ ";"+ str(name) df = pd.read_csv(path_database) name = name + "\n" if name in data_database_user: for i in range (len(data_database_user)): if name == data_database_user[i]: def Read_cp(path_database): try: data_buffer = [] data_buffer_cp = [] data_buffer_user = [] with open(str(path_database), "r", errors = None) as files: data_buffer.extend(files.readlines()) files.close() user_database = data_buffer
#take computer for user_data in user_database: user_data = str(user_data) user_computer_database, user_ip_database,user_name_database = user_data.split(";") data_buffer_cp.append(user_computer_database) data_buffer_user.append(user_name_database) except: data_buffer_cp,user_ip_database,data_buffer_user = "Error", "Error",
"Error" return data_buffer_cp,user_ip_database,data_buffer_user def Read(path_name): try: with open(path_name,"r") as f: contents = f.readlines() name = contents[0] except: name = "Error" return name def write_data(path_database,path_name):
106 f_cp = get_myComputer() f_ip = get_myIP() user_database_cp,user_ip_database,data_database_user = Read_cp(path_database) f_cp= str(f_cp) if f_ip.strip() in user_ip_database: pass else: write_data_db(path_name,data_database_user) def Write_txt(path_name,name): name = str(name) if not os.path.exists(path_name): with open(path_name, "w") as f: f.write(name) else: with open(path_name, "w") as f: f.write(name) def check_Name(path_name): global name name = "" if not os.path.exists(path_name): get_myName() name = Write_txt(path_name,name) name = Read(path_name) def Fn_history(Path_HS): hs = [] x = [] value = 0 try: if not os.path.exists(Path_HS):
Write_txt(Path_HS,"History") else: with open(Path_HS,"r") as file: files = file.readlines() for i in range (len(files)): f = files[i].split(",") sum = f[0]+"\t\t"+f[3] hs.append(sum) for i in range(len(hs)): if "Free" in hs[i]: x.append(i) if "Error" in hs[i]: x.append(i) for i in range(len(x)): value = x[i] hs[value] = "" if not os.path.exists(path_hs_display):
Write_txt(path_hs_display,"History") with open(path_hs_display,"w") as output: for i in range(len(hs)): if '' != hs: output.write(hs[i])
107 os.popen(path_hs_display) except: if not os.path.exists(Path_HS):
Write_txt(Path_HS,"Error") def app(): win_GUI_1 = Tk() # This is to create a basic windo xw win_GUI_1.geometry("1020x500") # this is for the size of the window win_GUI_1.resizable(0, 0) # this is to prevent from resizing the window win_GUI_1.title("SWITCH BOX CONTROLLER") label1_GUI_1 = tk.Label(win_GUI_1, text='Choose LabCar') label1_GUI_1.place(x ,y )
- # def lc_app(): llc_app = Tk() llc_app.geometry("240x200")
# lc_table = Frame(llc_app)
# lc_table.place(x 0,y0) lc_scroll = Scrollbar(llc_app) lc_scroll.pack(side=RIGHT, fill=Y)
# lc_scroll = Scrollbar(lc_table,orient='horizontal')
# lc_scroll.pack(side= BOTTOM,fill=X) lc = ttk.Treeview(llc_app,yscrollcommand=lc_scroll.set) lc.pack() lc_scroll.config(command=lc.yview)
# lc_scroll.config(command=lc.xview) lc_columns = 'LabCar','State' lc['columns']= (lc_columns) lc.column("#0", width=0, stretch=NO) lc.column("LabCar",anchorTER, width) lc.column("State",anchorTER, width0) lc.heading("#0",text="",anchorTER) lc.heading("LabCar",text="LabCar",anchorTER) lc.heading("State",text="State",anchorTER) with open(rlab_path) as f: reader = csv.DictReader(f) for row in reader:
State_2 = row['State'] lc.insert("", 'end', values=(LabCar,State_2)) llc_app.mainloop() options = [
# initial menu text clicked.set(options[0]) lab_id = OptionMenu(win_GUI_1, clicked, *options) lab_id.place(x ,yP)
# for text, value, a in LabCar:
# Gradio_1 = tk.Radiobutton(win_GUI_1, text=text, variable=Labb, value=value)
# Gradio_1.place(x= a,y= 50) with open(rlab_path) as f: reader = csv.DictReader(f) for row in reader:
State_2 = row['State'] label1 = tk.Label(win_GUI_1, text='Please choose your LabCar') label1.place(x,y)
# label_lc = tk.Label(win_GUI_1, text='Connect State: ' + clicked.get() + ' '
# label_lc.place(x,y3) def click1(value): label1.config(text='You choose ' + value) label1.place(x,y) def lc_state(): with open (rlab_path,'a') as f: fieldnames = ['0','LabCar','State'] writer = csv.DictWriter(f,fieldnames=fieldnames) writer.writerow({'0':'0','LabCar': clicked.get(), 'State':
# lc.insert('','end',values=(clicked.get(),"Connected")) def lc_state_2(): with open (rlab_path,'a') as f: fieldnames =
['0','LabCar','State'] writer = csv.DictWriter(f,fieldnames=fieldnames) writer.writerow({'0':'0','LabCar': clicked.get(), 'State':
# lc.insert('','end',values=(clicked.get(),'Connected'))
# ser = serial.Serial('/dev/ttyACM0', 9600)
GButton_508=tk.Button(win_GUI_1, text = "Confirm",command=lambda: click1(clicked.get()))
# label3 = tk.Label(win_GUI_1,text='Connect State: ' + clicked.get() + ' ' + State_2)
# label3.place(x,y3) def click3(): label3 = tk.Label(text='') label3.place(x,y3) ser = serial.Serial('/dev/ttyACM0', 9600) time.sleep(5)